diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index f92e3bbe8..27bf09a11 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -42,6 +42,8 @@ nextTick(async() => { if (type == 'tableForm') { // 明细查询页赋值 - await ItemBasicApi.getItembasicPage({ - code: row['itemCode'] - }).then(res => { - row['uom'] = res?.list[0].uom - }).catch(err =>{ - console.log(err); - }) - row[formField] = val[0][searchField] + // await ItemBasicApi.getItembasicPage({ + // code: row['itemCode'] + // }).then(res => { + // row['uom'] = res?.list[0].uom + // }).catch(err =>{ + // console.log(err); + // }) + if(formField=='itemCode'){ + row[formField] = val[0][searchField] + val.forEach(item=>{ + if(tableData.value.find(item1=>item1['id'] == item['id'])) return + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + tableData.value.push(newRow) + }) + } } else { const setV = {} if(formField == 'workshop'){ diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index af732e6da..e8b547ebc 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -635,6 +635,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ } }, tableForm:{ + multiple:true, isInpuFocusShow: true, searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 @@ -740,7 +741,10 @@ export const ProductionDetail = useCrudSchemas(reactive([ width: 150 }, tableForm:{ - type: 'Select' + type: 'Select', + disabled: true, + dictType: DICT_TYPE.UOM, + dictClass: 'string' } }, { diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue index 7133a4331..9aa2e429b 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue @@ -42,6 +42,8 @@ nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 - row[formField] = val[0][searchField] - row['poLine'] = val[0]['itemCode'] - row['packingNumber'] = val[0]['packingNumber'] - row['containerNumber'] = val[0]['containerNumber'] - row['batch'] = val[0]['batch'] - row['uom'] = val[0]['uom'] - row['inventoryStatus'] = val[0]['inventoryStatus'] - row['fromLocationCode'] = val[0]['locationCode'] + if(tableData.value.find(item1=>item1['id'] == item['id'])) return + val.forEach(item=>{ + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + newRow[formField] = item[searchField] + newRow['poLine'] = item['itemCode'] + newRow['packingNumber'] = item['packingNumber'] + newRow['containerNumber'] = item['containerNumber'] + newRow['batch'] = item['batch'] + newRow['uom'] = item['uom'] + newRow['qty'] = item['qty'] + newRow['inventoryStatus'] = item['inventoryStatus'] + newRow['fromLocationCode'] = item['locationCode'] + tableData.value.push(newRow) + }) } else { const setV = {} setV[formField] = val[0][searchField] diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts index 260b97875..66cd24c8b 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts @@ -447,6 +447,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive width: 150 }, tableForm:{ + multiple:true, isInpuFocusShow: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码', // 输入框占位文本 diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue index de28b40f4..6e88e7416 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue @@ -42,6 +42,8 @@ { nextTick(() => { if (type == 'tableForm') { - if (formField == 'itemCode') { - row['itemCode'] = val[0]['itemCode'] - row['qty'] = val[0]['qty'] - row['uom'] = val[0]['uom'] - row['packingNumber'] = val[0]['packingNumber'] - row['batch'] = val[0]['batch'] - row['packQty'] = val[0]['packQty'] - row['packUnit'] = val[0]['packUnit'] - row['inventoryStatus'] = val[0]['inventoryStatus'] - row['toLocationCode'] = val[0]['locationCode'] - } // 明细查询页赋值 row[formField] = val[0][searchField] + if (formField == 'itemCode') { + if(tableData.value.find(item1=>item1['id'] == item['id'])) return + val.forEach(item=>{ + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + newRow['itemCode'] = item['itemCode'] + newRow['qty'] = item['qty'] + newRow['uom'] = item['uom'] + newRow['packingNumber'] = item['packingNumber'] + newRow['batch'] = item['batch'] + newRow['packQty'] = item['packQty'] + newRow['packUnit'] = item['packUnit'] + newRow['inventoryStatus'] = item['inventoryStatus'] + newRow['toLocationCode'] = item['locationCode'] + tableData.value.push(newRow) + }) + } } else { const setV = {} setV[formField] = val[0][searchField] diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts index b70dabe87..5b447e22d 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts @@ -332,6 +332,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive } }, tableForm:{ + multiple:true, isInpuFocusShow: true, searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段