|
|
|
|
@ -55,7 +55,7 @@ export default { |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: '工艺员', |
|
|
|
|
prop: 'proMan', |
|
|
|
|
prop: 'processUserId', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
@ -71,9 +71,9 @@ export default { |
|
|
|
|
value: 'id', |
|
|
|
|
res: 'data.records', |
|
|
|
|
}, |
|
|
|
|
// formatter: (row, value, label, column) => { |
|
|
|
|
// return row.proManName || value || '-'; |
|
|
|
|
// }, |
|
|
|
|
change: (value) => { |
|
|
|
|
this.handleProcessUserChange(value); |
|
|
|
|
}, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
@ -198,6 +198,10 @@ export default { |
|
|
|
|
if (formData.reportUserId !== undefined && formData.reportUserId !== null) { |
|
|
|
|
formData.reportUserId = String(formData.reportUserId); |
|
|
|
|
} |
|
|
|
|
// 确保工艺员ID类型一致 |
|
|
|
|
if (formData.processUserId !== undefined && formData.processUserId !== null) { |
|
|
|
|
formData.processUserId = String(formData.processUserId); |
|
|
|
|
} |
|
|
|
|
this.formData = formData; |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
@ -218,6 +222,19 @@ export default { |
|
|
|
|
uploadExceed(limit, files, fileList, column) { |
|
|
|
|
this.$message.error('最多只能上传一个文件'); |
|
|
|
|
}, |
|
|
|
|
// 处理工艺员变化 |
|
|
|
|
handleProcessUserChange(value) { |
|
|
|
|
console.log('【工艺员变化】:', value); |
|
|
|
|
if (value && value.value) { |
|
|
|
|
// 保存工艺员ID |
|
|
|
|
this.formData.processUserId = value.value; |
|
|
|
|
// 保存工艺员名称 |
|
|
|
|
this.formData.processUserName = value.label; |
|
|
|
|
} else { |
|
|
|
|
this.formData.processUserId = ''; |
|
|
|
|
this.formData.processUserName = ''; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 处理提出人变化,获取岗位信息 |
|
|
|
|
handleReportUserChange(value) { |
|
|
|
|
console.log('【提出人变化】reportUserId:', value); |
|
|
|
|
@ -279,6 +296,16 @@ export default { |
|
|
|
|
params.fileUrl = params.fileUrl.map(item => item.link).join(','); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 从字典数据中获取工艺员名称 |
|
|
|
|
if (params.processUserId) { |
|
|
|
|
// avue 会将 dicUrl 加载的数据存储在 DIC 对象中 |
|
|
|
|
const dicData = this.$refs.form?.DIC?.processUserId || []; |
|
|
|
|
const userItem = dicData.find(item => String(item.id) === String(params.processUserId)); |
|
|
|
|
if (userItem) { |
|
|
|
|
params.processUserName = userItem.realName; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log('【表单提交】', this.infoTitle, params); |
|
|
|
|
console.log('【表单提交】reportUserId值:', params.reportUserId); |
|
|
|
|
|
|
|
|
|
|