|
|
|
@ -64,19 +64,12 @@
|
|
|
|
|
@click="handleViewCheck(slotProps.scope.row)" |
|
|
|
|
>查 看</el-text |
|
|
|
|
> |
|
|
|
|
<el-text |
|
|
|
|
type="primary" |
|
|
|
|
text |
|
|
|
|
icon="el-icon-view" |
|
|
|
|
@click="handleEditCheck(slotProps.scope.row)" |
|
|
|
|
>编 辑</el-text |
|
|
|
|
> |
|
|
|
|
<el-text |
|
|
|
|
type="primary" |
|
|
|
|
text |
|
|
|
|
icon="el-icon-view" |
|
|
|
|
@click="handleDeleteCheck(slotProps.scope.row)" |
|
|
|
|
>删 除</el-text |
|
|
|
|
>废 弃</el-text |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
@ -144,33 +137,11 @@
|
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<!-- 盘点订单状态 --> |
|
|
|
|
<template v-if="isEdit"> |
|
|
|
|
<el-form-item label="盘点订单状态"> |
|
|
|
|
<el-select v-model="form.dictKey" placeholder="请选择订单状态" clearable> |
|
|
|
|
<template v-if="this.typeData.length !== 0"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in this.typeData" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</template> |
|
|
|
|
</el-form> |
|
|
|
|
<!-- 表单按钮 --> |
|
|
|
|
<template #footer> |
|
|
|
|
<span v-if="!view" class="dialog-footer"> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
v-if="isEdit" |
|
|
|
|
icon="el-icon-circle-check" |
|
|
|
|
@click="handleEditSubmit" |
|
|
|
|
>修 改</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" v-else icon="el-icon-circle-check" @click="handleSubmit" |
|
|
|
|
<span class="dialog-footer"> |
|
|
|
|
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit" |
|
|
|
|
>提 交</el-button |
|
|
|
|
> |
|
|
|
|
<el-button icon="el-icon-circle-close" @click="box = false">取 消</el-button> |
|
|
|
@ -337,10 +308,6 @@ export default {
|
|
|
|
|
search: true, |
|
|
|
|
// 加载中 |
|
|
|
|
loading: true, |
|
|
|
|
// 是否为查看模式 |
|
|
|
|
view: false, |
|
|
|
|
// 是否为修改提交 |
|
|
|
|
isEdit: false, |
|
|
|
|
// 查询信息 |
|
|
|
|
query: {}, |
|
|
|
|
// 分页信息 |
|
|
|
@ -662,6 +629,7 @@ export default {
|
|
|
|
|
formData.list = []; |
|
|
|
|
|
|
|
|
|
// 商场名称列表 |
|
|
|
|
if (this.form.selectList.length !== 0) { |
|
|
|
|
this.form.selectList.forEach(val => { |
|
|
|
|
if (this.form.clientList.includes(val.id)) |
|
|
|
|
formData.list.push({ |
|
|
|
@ -669,61 +637,15 @@ export default {
|
|
|
|
|
refName: val.clientName, |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
// 开始时间 |
|
|
|
|
formData.startTime = this.form.time[0].toLocaleString(); |
|
|
|
|
// 结束时间 |
|
|
|
|
formData.endTime = this.form.time[1].toLocaleString(); |
|
|
|
|
console.log('formData :>> ', formData); |
|
|
|
|
|
|
|
|
|
const res = await postAddtaskQuest(formData); |
|
|
|
|
const { code, msg } = res.data; |
|
|
|
|
|
|
|
|
|
if (code === 200) |
|
|
|
|
this.$message({ |
|
|
|
|
message: msg, |
|
|
|
|
type: 'success', |
|
|
|
|
}); |
|
|
|
|
// 初始化页面 |
|
|
|
|
this.onLoad(); |
|
|
|
|
// 关闭弹窗 |
|
|
|
|
this.box = false; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 修改提交 |
|
|
|
|
async handleEditSubmit() { |
|
|
|
|
console.log('this.form :>> ', this.form); |
|
|
|
|
// 检测是否选择时间 |
|
|
|
|
if (!this.form.time || this.form.time.length === 0) { |
|
|
|
|
return this.$message({ |
|
|
|
|
type: 'error', |
|
|
|
|
message: '请选择盘点时间', |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const formData = {}; |
|
|
|
|
formData.list = []; |
|
|
|
|
|
|
|
|
|
// 商场名称列表 |
|
|
|
|
this.form.selectList.forEach(val => { |
|
|
|
|
if (this.form.clientList.includes(val.id)) |
|
|
|
|
formData.list.push({ |
|
|
|
|
refId: val.id, |
|
|
|
|
refName: val.clientName, |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
// 开始时间 |
|
|
|
|
formData.startTime = this.form.time[0].toLocaleString(); |
|
|
|
|
// 结束时间 |
|
|
|
|
formData.endTime = this.form.time[1].toLocaleString(); |
|
|
|
|
console.log('formData :>> ', formData); |
|
|
|
|
formData.questStatus = this.form.dictKey; |
|
|
|
|
formData.id = this.form.id; |
|
|
|
|
|
|
|
|
|
const res = await postEditTaskQuestUpdate(formData); |
|
|
|
|
const res = await postAddtaskQuest(formData); |
|
|
|
|
const { code, msg } = res.data; |
|
|
|
|
console.log('msg :>> ', msg); |
|
|
|
|
|
|
|
|
|
console.log('res :>> ', res); |
|
|
|
|
|
|
|
|
|
if (code === 200) |
|
|
|
|
this.$message({ |
|
|
|
|