Browse Source

Merge branch 'intex' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into intex

intex_online20241111
songguoqiang 4 weeks ago
parent
commit
d35da66481
  1. 15
      src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue
  2. 2
      src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts

15
src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue

@ -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)
}) })

2
src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts

@ -153,7 +153,7 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isFormModel:true, // filters中添加筛选的数据--取于formModel isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用 required:true, // 前置添加必有,和isFormModel结合使用
isSearch: true, isSearch: true,
isMainValue: false isMainValue: true
}], }],
verificationParams: [ verificationParams: [
{ {

Loading…
Cancel
Save