优化财务单据

This commit is contained in:
季圣华
2021-07-03 00:44:42 +08:00
parent cc10923600
commit 090ca66a72
11 changed files with 57 additions and 37 deletions

View File

@@ -98,22 +98,27 @@
if (!err) {
that.confirmLoading = true;
let formData = Object.assign(this.model, values);
let obj;
if(!this.model.id){
obj=addUnit(formData);
}else{
obj=editUnit(formData);
}
obj.then((res)=>{
if(res.code === 200){
that.$emit('ok');
}else{
that.$message.warning(res.data.message);
}
}).finally(() => {
if(formData.basicUnit === formData.otherUnit) {
that.$message.warning('抱歉基本单位与副单位不能相同');
that.confirmLoading = false;
that.close();
})
} else {
let obj;
if(!this.model.id){
obj=addUnit(formData);
}else{
obj=editUnit(formData);
}
obj.then((res)=>{
if(res.code === 200){
that.$emit('ok');
}else{
that.$message.warning(res.data.message);
}
}).finally(() => {
that.confirmLoading = false;
that.close();
})
}
}
})
},

View File

@@ -149,11 +149,6 @@
if (!err) {
that.confirmLoading = true;
let formData = Object.assign(this.model, values);
if(this.model.beginNeedGet && this.model.beginNeedPay) {
that.$message.warn("期初应收和期初应付不能同时输入");
that.confirmLoading = false;
return;
}
formData.type = "供应商";
let obj;
if(!this.model.id){