commit
This commit is contained in:
@@ -585,7 +585,7 @@ layout("/layouts/platform.html"){
|
||||
<courier-number-info ref="courierNumberInfo"></courier-number-info>
|
||||
|
||||
<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-input :value="addWelfareListData.projectName" readonly></el-input>
|
||||
</el-form-item>
|
||||
@@ -1035,25 +1035,31 @@ layout("/layouts/platform.html"){
|
||||
|
||||
doEditWelfareData() {
|
||||
this.$refs["editWelfareForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
//获取用户当前选择的数量
|
||||
const selectNums = this.welfareOptions.map((v) => v.selectNum)
|
||||
const sum = selectNums.reduce((accumulator, currentValue) => accumulator + currentValue, 0)
|
||||
if (sum === 0) {
|
||||
this.notifyWarning("请先选择份数")
|
||||
if (!valid) {
|
||||
if (this.ifReceiveAddress && !this.editWelfareData.receiveAddress) {
|
||||
this.notifyWarning("请选择收货地址")
|
||||
return
|
||||
}
|
||||
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)
|
||||
}
|
||||
this.notifyWarning("请完善福利选择信息")
|
||||
return
|
||||
}
|
||||
//获取用户当前选择的数量
|
||||
const selectNums = this.welfareOptions.map((v) => v.selectNum)
|
||||
const sum = selectNums.reduce((accumulator, currentValue) => accumulator + currentValue, 0)
|
||||
if (sum === 0) {
|
||||
this.notifyWarning("请先选择份数")
|
||||
return
|
||||
}
|
||||
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