|
|
|
|
@ -17,6 +17,8 @@ |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@on-load="onLoad" |
|
|
|
|
:before-open="beforeOpen" |
|
|
|
|
|
|
|
|
|
> |
|
|
|
|
<template #menu-left> </template> |
|
|
|
|
<template #menu-right> </template> |
|
|
|
|
@ -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) // 过滤空值 |
|
|
|
|
|