|
@ -160,6 +160,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
const handleDetailSubmitForm = async (formType, data) => { |
|
|
const handleDetailSubmitForm = async (formType, data) => { |
|
|
|
|
|
if(data.qty > data.inventoryQty){ |
|
|
|
|
|
message.warning("换货数量不能大于库存数量") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|
await PurchaseBarterRequestDetailApi.createPurchaseBarterRequestDetail(data) |
|
|
await PurchaseBarterRequestDetailApi.createPurchaseBarterRequestDetail(data) |
|
|
message.success(t('common.createSuccess')) |
|
|
message.success(t('common.createSuccess')) |
|
@ -169,7 +173,7 @@ const handleDetailSubmitForm = async (formType, data) => { |
|
|
message.success(t('common.updateSuccess')) |
|
|
message.success(t('common.updateSuccess')) |
|
|
} |
|
|
} |
|
|
detailRef.value.submitUpdateList() |
|
|
detailRef.value.submitUpdateList() |
|
|
|
|
|
getList() |
|
|
} |
|
|
} |
|
|
// 查询页面返回——详情 |
|
|
// 查询页面返回——详情 |
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
@ -179,9 +183,12 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
if(formField == 'itemCode'){ |
|
|
if(formField == 'itemCode'){ |
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
setV['itemName'] = val[0]['itemName'] |
|
|
setV['itemName'] = val[0]['itemName'] |
|
|
setV['uom'] = val[0]['supplierUom'] |
|
|
setV['uom'] = val[0]['uom'] |
|
|
setV['packUnit'] = val[0]['packUnit'] |
|
|
setV['batch'] = val[0]['batch'] |
|
|
setV['batch'] = formatTime(new Date(), 'yyyyMMdd') |
|
|
setV['location'] = val[0]['batch'] |
|
|
|
|
|
setV['inventoryQty'] = val[0]['qty'] |
|
|
|
|
|
setV['locationCode'] = val[0]['locationCode'] |
|
|
|
|
|
setV['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
} |
|
|
} |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
}) |
|
|
}) |
|
|