From e2002fc295a5f6ee1a978d077e1418b3e9838196 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Wed, 30 Oct 2024 11:07:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=8D=A2=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchaseBarterRequest/index.vue | 15 +++++++++++---- .../purchaseBarterRequestMain.data.ts | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue index 922eb890a..1e8500eca 100644 --- a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/index.vue +++ b/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) => { + if(data.qty > data.inventoryQty){ + message.warning("换货数量不能大于库存数量") + return + } if (formType === 'create') { await PurchaseBarterRequestDetailApi.createPurchaseBarterRequestDetail(data) message.success(t('common.createSuccess')) @@ -169,7 +173,7 @@ const handleDetailSubmitForm = async (formType, data) => { message.success(t('common.updateSuccess')) } detailRef.value.submitUpdateList() - + getList() } // 查询页面返回——详情 const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { @@ -179,9 +183,12 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { if(formField == 'itemCode'){ setV['itemCode'] = val[0]['itemCode'] setV['itemName'] = val[0]['itemName'] - setV['uom'] = val[0]['supplierUom'] - setV['packUnit'] = val[0]['packUnit'] - setV['batch'] = formatTime(new Date(), 'yyyyMMdd') + setV['uom'] = val[0]['uom'] + setV['batch'] = val[0]['batch'] + setV['location'] = val[0]['batch'] + setV['inventoryQty'] = val[0]['qty'] + setV['locationCode'] = val[0]['locationCode'] + setV['inventoryStatus'] = val[0]['inventoryStatus'] } formRef.setValues(setV) }) diff --git a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts index b724fb19f..2da4e98ce 100644 --- a/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchaseBarter/purchaseBarterRequest/purchaseBarterRequestMain.data.ts @@ -153,7 +153,7 @@ export const PurchaseBarterRequestDetail = useCrudSchemas(reactive isFormModel:true, // filters中添加筛选的数据--取于formModel required:true, // 前置添加必有,和isFormModel结合使用 isSearch: true, - isMainValue: false + isMainValue: true }], verificationParams: [ {