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',