From ac5f51510de5574ccaf4f4c9e949b7fb6b4c25bb Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Mon, 8 Jul 2024 12:17:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E6=96=99=E7=94=B3=E8=AF=B7=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=A1=B5=E9=9D=A2=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issue/issueRequestMain/index.vue | 32 ++++++++++++- .../issueRequestMain/issueRequestMain.data.ts | 47 ++++++++++--------- 2 files changed, 55 insertions(+), 24 deletions(-) diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index b70b6f50c..cac4c9dcd 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -42,6 +42,8 @@ @@ -104,14 +107,39 @@ const updataTableColumns = (val) => { tableColumns.value = val } +const onEnter = async (field,value) => { + if (field == 'productionLineCode') { + //生产线 + let res = await WorkstationApi.getWorkstationPage({ + productionLineCode:value, + pageSize: 20, + pageNo: 1 + }) + if(res&&res.list&&res.list.length>0){ + const setV = {} + setV['workStationCode'] = res.list[0].code + formRef.value.formRef.setValues(setV) + } + } +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(async() => { if (type == 'tableForm') { // 明细查询页赋值 if (formField == 'itemCode') { - row['itemCode'] = val[0]['code'] - row['uom'] = val[0]['uom'] + val.forEach(item=>{ + let tableForm = JSON.parse(JSON.stringify(tableFormKeys)) + if (tableData.value.length > 0) { + tableForm.productionLineCode = tableData.value[0].productionLineCode + tableForm.workStationCode = tableData.value[0].workStationCode + } + if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])) return + const newRow = JSON.parse(JSON.stringify({...tableForm,...item})) + newRow['itemCode'] = item['code'] + newRow['uom'] = item['uom'] + tableData.value.push(newRow) + }) } else { row[formField] = val[0][searchField] } diff --git a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts index 4b131b1bb..38245d0f1 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts @@ -112,6 +112,7 @@ export const IssueRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch:true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 @@ -161,6 +162,7 @@ export const IssueRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch:true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择工位代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 @@ -766,6 +768,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ sortSearchDefault:2, sortTableDefault:3, tableForm:{ + multiple: true, enterSearch:true, isInpuFocusShow: true, isSearchList: true, // 开启查询弹窗 @@ -809,7 +812,27 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ } } }, - + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + } + } + }, { label: '计量单位', @@ -991,27 +1014,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false }, - { - label: '数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - tableForm: { - type: 'InputNumber', - min: 0, - precision: 6 - }, - form: { - component: 'InputNumber', - componentProps: { - min: 0, - precision: 6 - } - } - }, + { label: '从货主代码', field: 'fromOwnerCode',