From 6d9ec31175ae1b122ae6a3b535eb882c9db386fd Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 30 Jan 2024 13:36:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E8=A1=A8bom=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productdismantleRequestMain/index.vue | 11 ++++++++--- .../productrepairRequestMain/index.vue | 11 ++++++++--- .../productscrapRequestMain/index.vue | 17 ++++++++++++----- .../inspectRequestMain.data.ts | 19 ++++++++++++++----- 4 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue index c54688c27..ff61c947d 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue @@ -172,9 +172,14 @@ const buttonBaseClickBom = async (val) => { } }) } else { - // 详情下的 bom编辑功能 调用接口 保存数据 - await dismantleRequestDetailbApi.updateDismantleRequestDetailb(rowId.value, tableListBom.value) - message.success(t('common.updateSuccess')) + if(tableListBom.value.length > 0){ + // 详情下的 bom编辑功能 调用接口 保存数据 + await dismantleRequestDetailbApi.updateDismantleRequestDetailb(rowId.value, tableListBom.value) + message.success(t('common.updateSuccess')) + }else{ + message.warning('数量不能为0!') + return + } } bomModelVisible.value = false } diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue index 2a1647264..ad486d36f 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue @@ -176,9 +176,14 @@ const buttonBaseClickBom = (val) => { } }) }else { - // 详情下的 bom编辑功能 调用接口 保存数据 - ProductrepairRequestMainApi.updateProductscrapDetailRequestBom(rowId.value, tableListBom.value) - message.success(t('common.updateSuccess')) + if(tableListBom.value.length > 0){ + // 详情下的 bom编辑功能 调用接口 保存数据 + ProductrepairRequestMainApi.updateProductscrapDetailRequestBom(rowId.value, tableListBom.value) + message.success(t('common.updateSuccess')) + }else{ + message.warning('数量不能为0!') + return + } } bomModelVisible.value = false } diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 3ea6c74fb..dd8fc3e8c 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -158,6 +158,7 @@ const buttonBaseClickBom = (val) => { // 根据 填写的数量 为基准 不填写数量的忽略 let flag = false; detatableDataBom.tableList.forEach((item) => { + console.log("AAAAAA",item.qty) if(item.qty!=0 && (item.bomQty * detailQty.value < item.qty)){ flag = true; return; @@ -168,6 +169,8 @@ const buttonBaseClickBom = (val) => { return } tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && (item.bomQty * detailQty.value >= item.qty))) + console.log("tableListBom",tableListBom.value) + console.log("lsBomSave",lsBomSave.value) if (lsBomSave.value) { tableData.value.forEach((item, index) => { if(tableListBom.value[0].rowId == index) { @@ -175,12 +178,16 @@ const buttonBaseClickBom = (val) => { } }) }else { - // 更新操作 - // 详情下的 bom编辑功能 调用接口 保存数据 - ProductscrapRequestMainApi.updateProductscrapDetailRequestBom(rowId.value, tableListBom.value) - message.success(t('common.updateSuccess')) + if(tableListBom.value.length > 0){ + // 更新操作 + // 详情下的 bom编辑功能 调用接口 保存数据 + ProductscrapRequestMainApi.updateProductscrapDetailRequestBom(rowId.value, tableListBom.value) + message.success(t('common.updateSuccess')) + }else{ + message.warning('数量不能为0!') + return + } } - // console.log(157, tableData.value) bomModelVisible.value = false } // 关闭 diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts index 2a2880559..7f91ce727 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts @@ -51,17 +51,26 @@ export const InspectRequestMain = useCrudSchemas(reactive([ isSearch: true, }, { - label: '发货单号', - field: 'asnNumber', + label: '采购收货记录单号', + field: 'purchaseReceiptRecordNumber', sort: 'custom', table: { - width: 150 + width: 180 + }, + isForm: false, + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 180 }, isForm: false, }, { - label: '要货计划单号', - field: 'ppNumber', + label: '订单行', + field: 'poLine', sort: 'custom', table: { width: 150