commit
This commit is contained in:
@@ -585,7 +585,7 @@ layout("/layouts/platform.html"){
|
|||||||
<courier-number-info ref="courierNumberInfo"></courier-number-info>
|
<courier-number-info ref="courierNumberInfo"></courier-number-info>
|
||||||
|
|
||||||
<el-dialog :visible.sync="addWelfareListDialog" title="添加福利名单" width="50%">
|
<el-dialog :visible.sync="addWelfareListDialog" title="添加福利名单" width="50%">
|
||||||
<el-form :model="addWelfareListData" label-width="120px" ref="editWelfareForm">
|
<el-form :model="addWelfareListData" label-width="120px" ref="addWelfareListForm">
|
||||||
<el-form-item label="福利项目名称">
|
<el-form-item label="福利项目名称">
|
||||||
<el-input :value="addWelfareListData.projectName" readonly></el-input>
|
<el-input :value="addWelfareListData.projectName" readonly></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -1035,25 +1035,31 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
doEditWelfareData() {
|
doEditWelfareData() {
|
||||||
this.$refs["editWelfareForm"].validate(async (valid) => {
|
this.$refs["editWelfareForm"].validate(async (valid) => {
|
||||||
if (valid) {
|
if (!valid) {
|
||||||
//获取用户当前选择的数量
|
if (this.ifReceiveAddress && !this.editWelfareData.receiveAddress) {
|
||||||
const selectNums = this.welfareOptions.map((v) => v.selectNum)
|
this.notifyWarning("请选择收货地址")
|
||||||
const sum = selectNums.reduce((accumulator, currentValue) => accumulator + currentValue, 0)
|
|
||||||
if (sum === 0) {
|
|
||||||
this.notifyWarning("请先选择份数")
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const resp = await $.post(loc() + "/doEditWelfareData", {
|
this.notifyWarning("请完善福利选择信息")
|
||||||
editWelfareData: JSON.stringify(this.editWelfareData),
|
return
|
||||||
welfareOptions: JSON.stringify(this.welfareOptions)
|
}
|
||||||
})
|
//获取用户当前选择的数量
|
||||||
this.exportWelfareListDialog = false
|
const selectNums = this.welfareOptions.map((v) => v.selectNum)
|
||||||
if (resp.code === 0) {
|
const sum = selectNums.reduce((accumulator, currentValue) => accumulator + currentValue, 0)
|
||||||
this.notifySuccess(resp.msg)
|
if (sum === 0) {
|
||||||
this.pageData()
|
this.notifyWarning("请先选择份数")
|
||||||
} else {
|
return
|
||||||
this.notifyWarning(resp.msg)
|
}
|
||||||
}
|
const resp = await $.post(loc() + "/doEditWelfareData", {
|
||||||
|
editWelfareData: JSON.stringify(this.editWelfareData),
|
||||||
|
welfareOptions: JSON.stringify(this.welfareOptions)
|
||||||
|
})
|
||||||
|
this.exportWelfareListDialog = false
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.notifySuccess(resp.msg)
|
||||||
|
this.pageData()
|
||||||
|
} else {
|
||||||
|
this.notifyWarning(resp.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user