feat: 修改光芯供应商审批
This commit is contained in:
parent
dc58a447f3
commit
f360fa4d21
|
|
@ -134,17 +134,31 @@ export default {
|
|||
})
|
||||
},
|
||||
handleSave() {
|
||||
// 过滤掉 _ 后缀的对象字段,只发送后端需要的数据
|
||||
let data = {};
|
||||
for (let key in this.formData) {
|
||||
if (!key.endsWith('_')) {
|
||||
data[key] = this.formData[key];
|
||||
}
|
||||
}
|
||||
if (this.localMode == "add") {
|
||||
this.saveLoading = true;
|
||||
this.$API.pum.supplieraudit.create.req(this.formData).then(res=>{
|
||||
this.saveLoading = true;
|
||||
this.$API.pum.supplieraudit.create.req(data).then(res=>{
|
||||
this.saveLoading = false;
|
||||
this.$message.success("提交成功");
|
||||
this.$emit('success', this.localMode);
|
||||
}).catch(e=>{
|
||||
this.saveLoading = false;
|
||||
})
|
||||
} else if (this.localMode == "edit") {
|
||||
this.$message.error("不支持编辑!")
|
||||
this.saveLoading = true;
|
||||
this.$API.pum.supplieraudit.update.req(this.formData.id, data).then(res=>{
|
||||
this.saveLoading = false;
|
||||
this.$message.success("更新成功");
|
||||
this.$emit('success', this.localMode);
|
||||
}).catch(e=>{
|
||||
this.saveLoading = false;
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue