From 6ca9d43673881cdb8b4efb6ade68adf8e52f2a4e Mon Sep 17 00:00:00 2001 From: zhangdi <15053473693@163.com> Date: Thu, 25 Dec 2025 16:02:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E5=8D=8F=E5=B7=A5=E5=BA=8F=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=A4=9A=E9=80=89=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/productionSchedulingPlan/basic.js | 9 +++++ .../basic/oemProcess.vue | 37 ++++++------------- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/api/productionSchedulingPlan/basic.js b/src/api/productionSchedulingPlan/basic.js index 728fbd1..b4a336d 100644 --- a/src/api/productionSchedulingPlan/basic.js +++ b/src/api/productionSchedulingPlan/basic.js @@ -323,4 +323,13 @@ export const updateOutsourceProcess = row => { method: 'post', data: row, }); +}; + + +export const getDetailOutsourceProcess = params => { + return request({ + url: '/blade-scheduling/outsourceProcess/detail', + method: 'get', + params: params, + }); }; \ No newline at end of file diff --git a/src/views/productionSchedulingPlan/basic/oemProcess.vue b/src/views/productionSchedulingPlan/basic/oemProcess.vue index 14129bb..7e4b116 100644 --- a/src/views/productionSchedulingPlan/basic/oemProcess.vue +++ b/src/views/productionSchedulingPlan/basic/oemProcess.vue @@ -17,6 +17,8 @@ @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" + :before-open="beforeOpen" + > @@ -33,6 +35,7 @@ import { removeOutsourceProcess, addOutsourceProcess, updateOutsourceProcess, + getDetailOutsourceProcess } from '@/api/productionSchedulingPlan/basic'; export default { components: {}, @@ -105,30 +108,9 @@ export default { value: 'id', }, change: (val, row) => { - console.log('change', val, row); this.onChangeData(val, 'processIds', row); }, }, - { - label: '工序', - prop: 'processIds', - search: true, - sortable: true, - span: 12, - type: 'select', - filterable: true, - multiple: false, - hide: true, - display:false, - dicUrl: '/blade-scheduling/processSet/findList', - props: { - label: 'name', - value: 'id', - }, - // change: (val, row) => { - // this.onChangeData(val, 'processIds', row); - // }, - }, { label: '工序', prop: 'processName', @@ -160,22 +142,25 @@ export default { }; }, methods: { + beforeOpen(done, type) { + if (['edit'].includes(type)) { + getDetailOutsourceProcess({id:this.form.id}).then(res => { + this.form.processIds=res.data.data.processId.split(',') + }); + } + done(); + }, onChangeData(val, type, row) { // if (val && type == 'workCenterId') { // this.form.workCenterName = val.wcName; // } if (val.value && type == 'processIds') { - // this.form.processName = val.name; if(!val.value){ return false } - // 获取字典数据(从select的选项中) - // const processDic = val.dic.find(col => col.prop === 'processId').dicData || []; - // console.log('processDic',val.dic) // 筛选选中id对应的名称并拼接 const selectedNames = val.value.map(id => { const item = val.dic.find(dic => dic.id === id); - console.log('item',item) return item ? item.name : ''; }) .filter(name => name) // 过滤空值