Commit 2c27fcec authored by 15008242619's avatar 15008242619 Committed by jingnan

产品质量记录整改说明 申请节点设置后续所有参与者

parent 48cabd0d
...@@ -68,6 +68,16 @@ export default { ...@@ -68,6 +68,16 @@ export default {
multiple: true, multiple: true,
options: [] options: []
} }
}, {
title: '设置检验员',
key: 'testerIds',
component: {
clearable: true,
name: 'el-select',
placeholder: '请选择',
multiple: true,
options: []
}
}] }]
}], }],
rules: { rules: {
...@@ -77,6 +87,13 @@ export default { ...@@ -77,6 +87,13 @@ export default {
message: '请填写负责人', message: '请填写负责人',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
} }
],
testerIds: [
{
required: true,
message: '请填写检验员',
trigger: ['blur', 'change']
}
] ]
} }
} }
...@@ -134,22 +151,65 @@ export default { ...@@ -134,22 +151,65 @@ export default {
if (item.key === 'userIds') { if (item.key === 'userIds') {
item.component.options = arr item.component.options = arr
} }
/** })
item.key === 'userIds' && (item.component.options = arr.map(row => { }).catch((err) => {
return { console.log(err)
value: row.value, })
label: row.label const httpParams1 = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'source.name',
'operator': 'IN',
'value': ['检验技术员']
}
],
'operator': 'AND'
},
'openProps': [
{
'name': 'source',
'pageFrom': 1,
'pageSize': 9999
},
{
'name': 'target',
'pageFrom': 1,
'pageSize': 9999
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
} }
]
}
post('/DxGroupMemberLink/search', httpParams1).then(res => {
const arr = []
const ids = []
res.items.content.forEach(item => {
if (ids.indexOf(item.target.id) === -1) {
ids.push(item.target.id)
arr.push({
value: item.target.id,
label: item.target.name + '/' + item.target.number
})
}
})
this.formData[0].data.forEach(item => {
if (item.key === 'testerIds') {
item.component.options = arr
} }
))
*/
}) })
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
}) })
}, },
tableToolHandler(e) { tableToolHandler(e) {
console.log(e.key.btnValue)
if (e.key.btnValue === 'ZGSMApply') { if (e.key.btnValue === 'ZGSMApply') {
this.ZGSMApply() this.ZGSMApply()
} }
...@@ -170,26 +230,28 @@ export default { ...@@ -170,26 +230,28 @@ export default {
if (this.selectionRows && this.selectionRows.length) { if (this.selectionRows && this.selectionRows.length) {
this.selectionRows.forEach(item => ids.push(item.id)) this.selectionRows.forEach(item => ids.push(item.id))
} }
if (this.form.userIds && this.form.userIds.length !== 0) { if (this.form.userIds && this.form.userIds.length !== 0 && this.form.testerIds && this.form.testerIds.length !== 0) {
post('/QualityRecord/creator/apply?userIds=' + this.form.userIds, ids).then(res => { post('/QualityRecord/creator/apply?userIds=' + this.form.userIds + '&testerIds=' + this.form.testerIds, ids).then(res => {
this.$utils.showMessageSuccess('提交成功') this.$utils.showMessageSuccess('提交成功')
setTimeout(() => { setTimeout(() => {
this.$refs.applyTable.$refs.asCom.getData() this.$refs.applyTable.$refs.asCom.getData()
}, 1500) }, 1500)
}).catch(err => { }).catch(() => {
this.$utils.showMessageWarning('出现异常,提交失败') this.$utils.showMessageWarning('出现异常,提交失败')
}).finally(() => { }).finally(() => {
this.dialogVisible = false this.dialogVisible = false
this.setPersonVisible = false this.setPersonVisible = false
this.$set(this.form, 'userIds', '') this.$set(this.form, 'userIds', '')
this.$set(this.form, 'testerIds', '')
}) })
} else { } else {
this.$utils.showMessageWarning('请选择审批负责人') this.$utils.showMessageWarning('请填写相关人员')
} }
}, },
setPersonCancle() { setPersonCancle() {
this.setPersonVisible = false this.setPersonVisible = false
this.$set(this.form, 'userIds', '') this.$set(this.form, 'userIds', '')
this.$set(this.form, 'testerIds', '')
}, },
selectionChange(val) { selectionChange(val) {
this.selectionRows = val this.selectionRows = val
......
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
} }
const data = this.$utils.findByNameVnode(this, 'DeeAsCom') const data = this.$utils.findByNameVnode(this, 'DeeAsCom')
post('/QualityRecord/saveAssessment?id=' + data.basicData.id, this.input).then(() => { post('/QualityRecord/saveAssessment?id=' + data.basicData.id, this.input).then(() => {
this.$utils.showMessageSuccess('保存成功') this.$utils.showMessageSuccess('填写内容保存成功')
this.history = this.input this.history = this.input
}).catch(() => { }).catch(() => {
this.$utils.showMessageWarning('出现异常,保存失败') this.$utils.showMessageWarning('出现异常,保存失败')
......
...@@ -40,8 +40,9 @@ ...@@ -40,8 +40,9 @@
import { post } from '@/utils/http' import { post } from '@/utils/http'
export default { export default {
name: 'ZGSMApply', name: 'ZGSMList',
components: {}, componentName: '整改说明',
components: { },
props: { props: {
selectData: { selectData: {
type: Object, type: Object,
...@@ -67,6 +68,16 @@ export default { ...@@ -67,6 +68,16 @@ export default {
multiple: true, multiple: true,
options: [] options: []
} }
}, {
title: '设置检验员',
key: 'testerIds',
component: {
clearable: true,
name: 'el-select',
placeholder: '请选择',
multiple: true,
options: []
}
}] }]
}], }],
rules: { rules: {
...@@ -76,6 +87,13 @@ export default { ...@@ -76,6 +87,13 @@ export default {
message: '请填写负责人', message: '请填写负责人',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
} }
],
testerIds: [
{
required: true,
message: '请填写检验员',
trigger: ['blur', 'change']
}
] ]
} }
} }
...@@ -133,22 +151,65 @@ export default { ...@@ -133,22 +151,65 @@ export default {
if (item.key === 'userIds') { if (item.key === 'userIds') {
item.component.options = arr item.component.options = arr
} }
/** })
item.key === 'userIds' && (item.component.options = arr.map(row => { }).catch((err) => {
return { console.log(err)
value: row.value, })
label: row.label const httpParams1 = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'source.name',
'operator': 'IN',
'value': ['检验技术员']
}
],
'operator': 'AND'
},
'openProps': [
{
'name': 'source',
'pageFrom': 1,
'pageSize': 9999
},
{
'name': 'target',
'pageFrom': 1,
'pageSize': 9999
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
} }
]
}
post('/DxGroupMemberLink/search', httpParams1).then(res => {
const arr = []
const ids = []
res.items.content.forEach(item => {
if (ids.indexOf(item.target.id) === -1) {
ids.push(item.target.id)
arr.push({
value: item.target.id,
label: item.target.name + '/' + item.target.number
})
}
})
this.formData[0].data.forEach(item => {
if (item.key === 'testerIds') {
item.component.options = arr
} }
))
*/
}) })
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
}) })
}, },
tableToolHandler(e) { tableToolHandler(e) {
console.log(e.key.btnValue)
if (e.key.btnValue === 'ZGSMApply') { if (e.key.btnValue === 'ZGSMApply') {
this.ZGSMApply() this.ZGSMApply()
} }
...@@ -169,8 +230,8 @@ export default { ...@@ -169,8 +230,8 @@ export default {
if (this.selectionRows && this.selectionRows.length) { if (this.selectionRows && this.selectionRows.length) {
this.selectionRows.forEach(item => ids.push(item.id)) this.selectionRows.forEach(item => ids.push(item.id))
} }
if (this.form.userIds && this.form.userIds.length !== 0) { if (this.form.userIds && this.form.userIds.length !== 0 && this.form.testerIds && this.form.testerIds.length !== 0) {
post('/QualityRecord/creator/apply?userIds=' + this.form.userIds, ids).then(res => { post('/QualityRecord/creator/apply?userIds=' + this.form.userIds + '&testerIds=' + this.form.testerIds, ids).then(res => {
this.$utils.showMessageSuccess('提交成功') this.$utils.showMessageSuccess('提交成功')
setTimeout(() => { setTimeout(() => {
this.$refs.applyTable.$refs.asCom.getData() this.$refs.applyTable.$refs.asCom.getData()
...@@ -181,14 +242,16 @@ export default { ...@@ -181,14 +242,16 @@ export default {
this.dialogVisible = false this.dialogVisible = false
this.setPersonVisible = false this.setPersonVisible = false
this.$set(this.form, 'userIds', '') this.$set(this.form, 'userIds', '')
this.$set(this.form, 'testerIds', '')
}) })
} else { } else {
this.$utils.showMessageWarning('请选择审批负责人') this.$utils.showMessageWarning('请填写相关人员')
} }
}, },
setPersonCancle() { setPersonCancle() {
this.setPersonVisible = false this.setPersonVisible = false
this.$set(this.form, 'userIds', '') this.$set(this.form, 'userIds', '')
this.$set(this.form, 'testerIds', '')
}, },
selectionChange(val) { selectionChange(val) {
this.selectionRows = val this.selectionRows = val
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment