优化财务单据
This commit is contained in:
@@ -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();
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user