修改bug
This commit is contained in:
parent
8dcaadfb03
commit
365d20a95c
|
|
@ -7,6 +7,7 @@ enum Api {
|
||||||
list = '/invoicing/configMaterialInfo/list',
|
list = '/invoicing/configMaterialInfo/list',
|
||||||
save='/invoicing/configMaterialInfo/add',
|
save='/invoicing/configMaterialInfo/add',
|
||||||
edit='/invoicing/configMaterialInfo/edit',
|
edit='/invoicing/configMaterialInfo/edit',
|
||||||
|
editInfo='/invoicing/configMaterialInfo/editInfo',
|
||||||
wlqianyi='/invoicing/configMaterialInfo/wlqianyi',
|
wlqianyi='/invoicing/configMaterialInfo/wlqianyi',
|
||||||
deleteOne = '/invoicing/configMaterialInfo/delete',
|
deleteOne = '/invoicing/configMaterialInfo/delete',
|
||||||
deleteBatch = '/invoicing/configMaterialInfo/deleteBatch',
|
deleteBatch = '/invoicing/configMaterialInfo/deleteBatch',
|
||||||
|
|
@ -68,7 +69,7 @@ export const batchDelete = (params, handleSuccess) => {
|
||||||
* @param isUpdate
|
* @param isUpdate
|
||||||
*/
|
*/
|
||||||
export const saveOrUpdate = (params, 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 });
|
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||||
}
|
}
|
||||||
export const wlqianyi = (params, isUpdate) => {
|
export const wlqianyi = (params, isUpdate) => {
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@
|
||||||
twoUnitProportion: undefined,
|
twoUnitProportion: undefined,
|
||||||
twoUnitPrice: undefined,
|
twoUnitPrice: undefined,
|
||||||
multiUnitType: '3',
|
multiUnitType: '3',
|
||||||
izEnabled: '0',
|
izEnabled: 'Y',
|
||||||
suppliers: '',
|
suppliers: '',
|
||||||
materialImg: '',
|
materialImg: '',
|
||||||
materialIdent: '',
|
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)
|
await saveOrUpdate(model, isUpdate.value)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue