From e86c36c68a4a7efe6a8f9fcf64adc6fd34f7da8e Mon Sep 17 00:00:00 2001 From: chenfang Date: Fri, 26 Jan 2024 16:08:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E9=A1=B5=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=B8=8D=E5=8F=AF=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../labelManage/manufacturePackage/index.vue | 4 ++++ .../manufacturePackage/manufacturePackage.data.ts | 15 ++++++++++----- .../labelManage/purchasePackage/index.vue | 4 ++++ .../purchasePackage/purchasePackage.data.ts | 11 ++++++++--- .../deliver/deliverRequestMain/index.vue | 9 +++++++-- .../deliverplan/deliverPlanMain/index.vue | 13 ++++++++++--- 6 files changed, 43 insertions(+), 13 deletions(-) diff --git a/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue b/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue index fbdb7b39d..f1d5a3b17 100644 --- a/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue +++ b/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue @@ -102,6 +102,10 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row setV['itemName'] = val[0]['name'] setV['itemDesc1'] = val[0]['desc1'] setV['itemDesc2'] = val[0]['desc2'] + setV['uom'] = val[0]['uom'] + setV['produceDate'] = val[0]['activeTime'] + setV['expireDate'] = val[0]['expireTime'] + setV['validityDays'] = val[0]['validityDays'] await Itempackaging.getItempackagingPage({ itemCode: val[0]['code'] }).then(res => { diff --git a/src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts b/src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts index df91c428a..296e93f68 100644 --- a/src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts +++ b/src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts @@ -193,14 +193,16 @@ export const PackageInventory = useCrudSchemas(reactive([ style: {width:'100%'}, valueFormat: 'YYYY-MM-DD HH:mm:ss', type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')], + disabled: true } }, form: { component: 'DatePicker', componentProps: { type: 'datetime', - valueFormat: 'x' + valueFormat: 'x', + disabled: true } }, table: { @@ -215,7 +217,8 @@ export const PackageInventory = useCrudSchemas(reactive([ component: 'InputNumber', componentProps: { min: 0, - precision: 0 + precision: 0, + disabled: true }, value: 0 }, @@ -234,14 +237,16 @@ export const PackageInventory = useCrudSchemas(reactive([ style: {width:'100%'}, valueFormat: 'YYYY-MM-DD HH:mm:ss', type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')], + disabled: true } }, form: { component: 'DatePicker', componentProps: { type: 'datetime', - valueFormat: 'x' + valueFormat: 'x', + disabled: true } }, table: { diff --git a/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue b/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue index ed1d6dffc..ae1df17dd 100644 --- a/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue +++ b/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue @@ -102,6 +102,10 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row setV['itemName'] = val[0]['name'] setV['itemDesc1'] = val[0]['desc1'] setV['itemDesc2'] = val[0]['desc2'] + setV['uom'] = val[0]['uom'] + setV['produceDate'] = val[0]['activeTime'] + setV['expireDate'] = val[0]['expireTime'] + setV['validityDays'] = val[0]['validityDays'] await Itempackaging.getItempackagingPage({ itemCode: val[0]['code'] }).then(res => { diff --git a/src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts b/src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts index d70460fda..d5a04a2cd 100644 --- a/src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts +++ b/src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts @@ -202,6 +202,7 @@ export const PackageInventory = useCrudSchemas(reactive([ style: {width:'100%'}, valueFormat: 'YYYY-MM-DD HH:mm:ss', type: 'daterange', + disabled: true, defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, @@ -209,7 +210,8 @@ export const PackageInventory = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', - valueFormat: 'x' + valueFormat: 'x', + disabled: true } }, table: { @@ -224,7 +226,8 @@ export const PackageInventory = useCrudSchemas(reactive([ component: 'InputNumber', componentProps: { min: 0, - precision: 0 + precision: 0, + disabled: true }, value: 0 }, @@ -243,6 +246,7 @@ export const PackageInventory = useCrudSchemas(reactive([ style: {width:'100%'}, valueFormat: 'YYYY-MM-DD HH:mm:ss', type: 'daterange', + disabled: true, defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, @@ -250,7 +254,8 @@ export const PackageInventory = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', - valueFormat: 'x' + valueFormat: 'x', + disabled: true, } }, table: { diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 5317064fe..ef69eeaf7 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -117,7 +117,12 @@ const updataTableColumns = (val) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { if (type == 'tableForm') { - row[formField] = val[0][searchField] + if(formField == 'itemCode') { + row['itemCode'] = val[0]['itemCode'] + row['uom'] = val[0]['customerUom'] + }else { + row[formField] = val[0][searchField] + } } else { const setV = {} setV[formField] = val[0][searchField] @@ -483,7 +488,7 @@ const submitForm = async (formType, data) => { try { if (formType === 'create') { if(tableData.value.length <= 0){ - message.warning(`子表明细不能为空!`) + message.warning(`子表明细不能为空!`) flag.value = true formRef.value.formLoading = false return; diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue index adee6c55b..df2e09909 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue @@ -129,9 +129,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => row[formField] = val[0][searchField] } else { const setV = {} - if(formField == 'itemCode') { - row['uom'] = val[0]['customerUom'] - } setV[formField] = val[0][searchField] formRef.setValues(setV) } @@ -378,6 +375,16 @@ const flag = ref(false) // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 + // 判断是否重复物料 + let isExist = false + tableData.value.forEach(item => { + let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode)) + if(rs.length > 1) isExist = true + }) + if (isExist) { + formRef.value.formLoading = false + return message.warning('物料代码重复') + } data.subList.forEach(obj => { if(obj.qty == 0){ message.error(`数量不能为0!`)