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) // 过滤空值