From bd3aab844aedab2ce75fb7e870c5f666c15d3ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Fri, 1 Dec 2023 11:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E6=96=99=E7=94=B3=E8=AF=B7=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=8E=E7=BB=86=E6=95=B0=E6=8D=AE=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E7=BA=BF=E5=B7=A5=E4=BD=8D=E4=B8=8D=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issue/issueRequestMain/index.vue | 25 ++++++++++++- .../issueRequestMain/issueRequestMain.data.ts | 36 +++++++++---------- 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index c47a81102..6d1cd909b 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -294,7 +294,13 @@ const tableData = ref([]) // 添加明细 const handleAddTable = () => { - tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) + // 添加明细 已有数据 添加的明细 生产线 工位按照之前数据进行添加 + let tableForm = JSON.parse(JSON.stringify(tableFormKeys)) + if (tableData.value.length > 0) { + tableForm.productionLineCode = tableData.value[0].productionLineCode + tableForm.workStationCode = tableData.value[0].workStationCode + } + tableData.value.push(tableForm) } // 删除明细 const handleDeleteTable = (item, index) => { @@ -304,6 +310,23 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 + // 判断子表中,是否有不同的生产线和工位 + if (tableData.value.length > 0) { + let productionLineCode = tableData.value[0].productionLineCode + let workStationCode = tableData.value[0].workStationCode + for(var i=0;i([ - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.REQUEST_STATUS, - dictClass: 'string', - isSearch: true, - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - form: { - value: '1', - componentProps: { - disabled: true - } - } - }, { label: '车间代码', field: 'workshopCode', @@ -76,6 +58,24 @@ export const IssueRequestMain = useCrudSchemas(reactive([ } } }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, { label: '从仓库代码', field: 'fromWarehouseCode',