From ac116c49c5496515db3dde29f7f809001f790b88 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 10 Jul 2024 13:40:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scrapContainerMainRequest/index.vue | 16 ++++++--- .../scrapContainerMainRequest.data.ts | 1 + .../scrap/scrapRequestMain/index.vue | 35 ++++++++++++++----- .../scrapRequestMain/scrapRequestMain.data.ts | 1 + .../preparetoissueMain/index.vue | 10 ++++-- .../preparetoissueMain.data.ts | 1 + .../productionreturnRequestMainNo/index.vue | 10 ++++-- .../productionreturnRequestMainNo.data.ts | 1 + .../productdismantleRequestMain/index.vue | 8 ++++- .../productdismantleRequestMain.data.ts | 1 + .../productrepairRequestMain/index.vue | 12 +++++-- .../productrepairRequestMain.data.ts | 1 + .../productscrapRequestMain/index.vue | 11 +++--- 13 files changed, 83 insertions(+), 25 deletions(-) diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue index 9f35176d5..1eaca15ea 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue @@ -42,6 +42,8 @@ nextTick(() => { if (type == 'tableForm') { if(formField == 'containerNumber') { - row['containerNumber'] = val[0]['itemCode'] - row['uom'] = val[0]['uom'] - row['fromLocationCode'] = val[0]['locationCode'] - row['fromInventoryStatus'] = val[0]['inventoryStatus'] - row['toInventoryStatus'] = 'SCRAP' + val.forEach(item=>{ + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + newRow['containerNumber'] = item['itemCode'] + newRow['uom'] = item['uom'] + newRow['fromLocationCode'] = item['locationCode'] + newRow['fromInventoryStatus'] = item['inventoryStatus'] + newRow['toInventoryStatus'] = 'SCRAP' + tableData.value.push(newRow) + }) }else if(formField == 'toLocationCode'){ row['toLocationCode'] = val[0]['code'] }else { diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts index 804623d5e..5516b76cb 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts @@ -357,6 +357,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ field: 'containerNumber', sort: 'custom', tableForm: { + multiple: true, isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择器具号', searchField: 'itemCode', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index 28d98d053..29df5e05e 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -42,6 +42,8 @@ { tableColumns.value = val @@ -114,16 +117,32 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 - row[formField] = val[0][searchField] - row['packingNumber'] = val[0]['packingNumber'] - row['batch'] = val[0]['batch'] - row['fromLocationCode'] = val[0]['locationCode'] - row['itemCode'] = val[0]['itemCode'] - row['uom'] = val[0]['uom'] + // val.forEach(item=>{ + // const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + // newRow[formField] = item[searchField] + // newRow['packingNumber'] = item['packingNumber'] + // newRow['batch'] = item['batch'] + // newRow['fromLocationCode'] = item['locationCode'] + // newRow['itemCode'] = item['itemCode'] + // newRow['uom'] = item['uom'] + // tableData.value.push(newRow) + // }) // 查询标准价格 - let param = {'itemCode':val[0]['itemCode'] as string} + let param = {'itemCodes':val.map(item=>item.itemCode).join(',') as string} StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => { - row['singlePrice'] = res.price + val.forEach(item=>{ + const itemCode = res.find(item1=>item1['itemCode']==item['itemCode']) + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + newRow[formField] = item[searchField] + newRow['packingNumber'] = item['packingNumber'] + newRow['batch'] = item['batch'] + newRow['fromLocationCode'] = item['locationCode'] + newRow['itemCode'] = item['itemCode'] + newRow['uom'] = item['uom'] + newRow['singlePrice'] = itemCode?itemCode['price']:'' + tableData.value.push(newRow) + }) + // row['singlePrice'] = res.price }) } else { const setV = {} diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts index 2c4787b5f..e329127c8 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts @@ -483,6 +483,7 @@ export const ScrapRequestDetail = useCrudSchemas(reactive([ width: 150 }, tableForm:{ + multiple:true, isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择包装号', searchField: 'packingNumber', diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue index b52587d8b..81cccfca0 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue @@ -42,6 +42,8 @@ row['itemCode'] = val[0]['componentItemCode'] row['uom'] = val[0]['componentUom'] } else { - row[formField] = val[0][searchField] - row['toLocationCode'] = val[0]['rawLocationCode'] + val.forEach(item=>{ + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + newRow[formField] = item[searchField] + newRow['toLocationCode'] = item['rawLocationCode'] + tableData.value.push(newRow) + }) } } else { const setV = {} diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts index ddf2e9d2c..d16192121 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts @@ -503,6 +503,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive([ } }, tableForm: { + multiple: true, isInpuFocusShow: true, searchListPlaceholder: '请选择工位', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index 81bc49646..3a703320f 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -42,6 +42,8 @@ }) } } else if(formField == 'workStationCode') { - row['workStationCode'] = val[0]['code'] - row['fromLocationCode'] = val[0]['rawLocationCode'] + val.forEach(item=>{ + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + newRow['workStationCode'] = item['code'] + newRow['fromLocationCode'] = item['rawLocationCode'] + tableData.value.push(newRow) + }) } else if(formField == 'packUnit') { row['packUnit'] = val[0]['packUnit'] row['packQty'] = val[0]['packQty'] diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts index 1901bc019..f4a9739fa 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts @@ -105,6 +105,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive row['bomVersion'] = '' row['childList'] = [] } else { - row[formField] = val[0][searchField] + val.forEach(item=>{ + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + newRow[formField] = item[searchField] + tableData.value.push(newRow) + }) } } else { const setV = {} diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts index c40d77a5f..cdd5e6572 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts @@ -474,6 +474,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive } else if(formField == 'productionLineCode'){ row['productionLineCode'] = val[0]['code'] } else if(formField == 'workStationCode'){ - row['fromLocationCode'] = val[0]['rawLocationCode'] - row['workStationCode'] = val[0]['code'] + + val.forEach(item=>{ + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + newRow['fromLocationCode'] = item['rawLocationCode'] + newRow['workStationCode'] =item['code'] + tableData.value.push(newRow) + }) + } else if(formField == 'formField'){ row['workStationCode'] = val[0]['code'] } else if(formField == 'bomVersion'){ diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts index bdcb195cd..2d2ddd79e 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts @@ -553,6 +553,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive }, sortTableDefault:5, tableForm:{ + multiple: true, isInpuFocusShow: true, searchListPlaceholder: '请选择工位代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index cae64b1f9..b1a0986b9 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -318,12 +318,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => row['bomVersion'] = '' row['childList'] = [] // 查询标准价格 - let param = {'itemCode':val[0]['itemCode'] as string} + let param = {'itemCodes':val[0]['itemCode'] as string} StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => { - console.log(res) - row['uom'] = res.uom - row['singlePrice'] = res.price - }) + if(res&&res.length>0){ + row['uom'] = res.uom + row['singlePrice'] = res.price + } + }) // 查看BOM版本 console.log(formRef.formModel) const param1 = {