修改bug
This commit is contained in:
parent
8dcaadfb03
commit
365d20a95c
|
|
@ -7,6 +7,7 @@ enum Api {
|
|||
list = '/invoicing/configMaterialInfo/list',
|
||||
save='/invoicing/configMaterialInfo/add',
|
||||
edit='/invoicing/configMaterialInfo/edit',
|
||||
editInfo='/invoicing/configMaterialInfo/editInfo',
|
||||
wlqianyi='/invoicing/configMaterialInfo/wlqianyi',
|
||||
deleteOne = '/invoicing/configMaterialInfo/delete',
|
||||
deleteBatch = '/invoicing/configMaterialInfo/deleteBatch',
|
||||
|
|
@ -68,7 +69,7 @@ export const batchDelete = (params, handleSuccess) => {
|
|||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
let url = isUpdate ? Api.editInfo : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
export const wlqianyi = (params, isUpdate) => {
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@
|
|||
twoUnitProportion: undefined,
|
||||
twoUnitPrice: undefined,
|
||||
multiUnitType: '3',
|
||||
izEnabled: '0',
|
||||
izEnabled: 'Y',
|
||||
suppliers: '',
|
||||
materialImg: '',
|
||||
materialIdent: '',
|
||||
|
|
@ -296,6 +296,20 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
console.log("🚀 ~ submitForm ~ model.oneUnitProportion:", model.oneUnitProportion)
|
||||
console.log("🚀 ~ submitForm ~ model.oneUnitPrice:", model.oneUnitPrice)
|
||||
if(model.oneUnit || model.oneUnitPrice || model.oneUnitProportion ){
|
||||
if(!model.oneUnit || !model.oneUnitPrice || !model.oneUnitProportion ){
|
||||
createMessage.warning("一级单位、一级单位兑换比例、一级单位价格不能为空!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(model.twoUnit || model.twoUnitPrice || model.twoUnitProportion ){
|
||||
if(!model.twoUnit || !model.twoUnitPrice || !model.twoUnitProportion){
|
||||
createMessage.warning("二级单位、二级单位兑换比例、二级单位价格不能为空!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue