|
|
@ -156,32 +156,61 @@ |
|
|
ref="processForm" |
|
|
ref="processForm" |
|
|
label-width="100px"> |
|
|
label-width="100px"> |
|
|
|
|
|
|
|
|
<el-form-item label="工序" required> |
|
|
|
|
|
|
|
|
<el-form-item required> |
|
|
|
|
|
<template #label> |
|
|
|
|
|
<span slot="label" style="" class="big-label"> |
|
|
|
|
|
<a href="#" @click="openTemplateDialog()">工序</a> |
|
|
|
|
|
</span> |
|
|
|
|
|
</template> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="processForm.processStep" |
|
|
v-model="processForm.processStep" |
|
|
:readonly="isEditMode" |
|
|
:readonly="isEditMode" |
|
|
placeholder="请输入工序名称"> |
|
|
|
|
|
|
|
|
placeholder="请输入工序名称或点击标题选择模版"> |
|
|
|
|
|
<el-button |
|
|
|
|
|
slot="append" |
|
|
|
|
|
type="success" |
|
|
|
|
|
@click="saveAsTemplate"> |
|
|
|
|
|
另存为 |
|
|
|
|
|
</el-button> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="车间负责人"> |
|
|
|
|
|
|
|
|
<el-form-item required> |
|
|
|
|
|
<template #label> |
|
|
|
|
|
<span slot="label" style="" class="big-label"> |
|
|
|
|
|
<a href="#" @click="openUserDialog('PROD')">车间负责人</a> |
|
|
|
|
|
</span> |
|
|
|
|
|
</template> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="processForm.prodApproverName" |
|
|
v-model="processForm.prodApproverName" |
|
|
placeholder="请输入车间负责人"> |
|
|
|
|
|
|
|
|
readonly |
|
|
|
|
|
placeholder="请选择车间负责人"> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="质量负责人"> |
|
|
|
|
|
|
|
|
<el-form-item required> |
|
|
|
|
|
<template #label> |
|
|
|
|
|
<span slot="label" style="" class="big-label"> |
|
|
|
|
|
<a href="#" @click="openUserDialog('QA')">质量负责人</a> |
|
|
|
|
|
</span> |
|
|
|
|
|
</template> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="processForm.qaApproverName" |
|
|
v-model="processForm.qaApproverName" |
|
|
placeholder="请输入质量负责人"> |
|
|
|
|
|
|
|
|
readonly |
|
|
|
|
|
placeholder="请选择质量负责人"> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="技术负责人"> |
|
|
|
|
|
|
|
|
<el-form-item required> |
|
|
|
|
|
<template #label> |
|
|
|
|
|
<span slot="label" style="" class="big-label"> |
|
|
|
|
|
<a href="#" @click="openUserDialog('TECH')">技术负责人</a> |
|
|
|
|
|
</span> |
|
|
|
|
|
</template> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="processForm.techApproverName" |
|
|
v-model="processForm.techApproverName" |
|
|
placeholder="请输入技术负责人"> |
|
|
|
|
|
|
|
|
readonly |
|
|
|
|
|
placeholder="请选择技术负责人"> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
@ -206,6 +235,111 @@ |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 工序模版选择弹框 --> |
|
|
|
|
|
<el-dialog |
|
|
|
|
|
title="选择工序模版" |
|
|
|
|
|
:visible.sync="templateDialogVisible" |
|
|
|
|
|
width="600px" |
|
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
|
|
|
|
|
|
|
|
<el-table |
|
|
|
|
|
:data="templateList" |
|
|
|
|
|
v-loading="templateLoading" |
|
|
|
|
|
border |
|
|
|
|
|
max-height="400px" |
|
|
|
|
|
@row-click="selectTemplate" |
|
|
|
|
|
style="width: 100%; cursor: pointer;"> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="templateName" |
|
|
|
|
|
label="工序名称" |
|
|
|
|
|
width="150" |
|
|
|
|
|
align="center" |
|
|
|
|
|
header-align="center"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="prodApproverName" |
|
|
|
|
|
label="车间负责人" |
|
|
|
|
|
width="120" |
|
|
|
|
|
align="center" |
|
|
|
|
|
header-align="center"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="qaApproverName" |
|
|
|
|
|
label="质量负责人" |
|
|
|
|
|
width="120" |
|
|
|
|
|
align="center" |
|
|
|
|
|
header-align="center"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="techApproverName" |
|
|
|
|
|
label="技术负责人" |
|
|
|
|
|
width="120" |
|
|
|
|
|
align="center" |
|
|
|
|
|
header-align="center"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
label="操作" |
|
|
|
|
|
width="80" |
|
|
|
|
|
align="center" |
|
|
|
|
|
header-align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<a |
|
|
|
|
|
type="text" |
|
|
|
|
|
size="small" |
|
|
|
|
|
style="color: #F56C6C" |
|
|
|
|
|
@click.stop="deleteTemplate(scope.row)"> |
|
|
|
|
|
删除 |
|
|
|
|
|
</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
|
|
<div slot="footer"> |
|
|
|
|
|
<el-button @click="templateDialogVisible = false">关闭</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 人员选择弹框 --> |
|
|
|
|
|
<el-dialog |
|
|
|
|
|
:title="userDialogTitle" |
|
|
|
|
|
:visible.sync="userDialogVisible" |
|
|
|
|
|
width="500px" |
|
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
|
|
|
|
|
|
|
|
<el-table |
|
|
|
|
|
:data="userList" |
|
|
|
|
|
v-loading="userLoading" |
|
|
|
|
|
border |
|
|
|
|
|
max-height="400px" |
|
|
|
|
|
@row-click="selectUser" |
|
|
|
|
|
style="width: 100%; cursor: pointer;"> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="userName" |
|
|
|
|
|
label="姓名" |
|
|
|
|
|
align="center" |
|
|
|
|
|
header-align="center"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="userId" |
|
|
|
|
|
label="用户ID" |
|
|
|
|
|
width="100" |
|
|
|
|
|
align="center" |
|
|
|
|
|
header-align="center"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
|
|
<div slot="footer"> |
|
|
|
|
|
<el-button @click="userDialogVisible = false">关闭</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 确认对话框 --> |
|
|
<!-- 确认对话框 --> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
:title="confirmDialogTitle" |
|
|
:title="confirmDialogTitle" |
|
|
@ -266,7 +400,17 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { getTriConfirmList, saveTriConfirmProcess, deleteTriConfirmProcess, confirmTriApproval, updateProcessSequence } from '@/api/erf/erf' |
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
getTriConfirmList, |
|
|
|
|
|
saveTriConfirmProcess, |
|
|
|
|
|
deleteTriConfirmProcess, |
|
|
|
|
|
confirmTriApproval, |
|
|
|
|
|
updateProcessSequence, |
|
|
|
|
|
getProcessTemplateList, |
|
|
|
|
|
saveProcessTemplate, |
|
|
|
|
|
deleteProcessTemplate, |
|
|
|
|
|
getUserListByRole |
|
|
|
|
|
} from '@/api/erf/erf' |
|
|
import Sortable from 'sortablejs' |
|
|
import Sortable from 'sortablejs' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
@ -280,6 +424,10 @@ export default { |
|
|
height: { |
|
|
height: { |
|
|
type: String, |
|
|
type: String, |
|
|
default: '35vh' |
|
|
default: '35vh' |
|
|
|
|
|
}, |
|
|
|
|
|
experimentType: { |
|
|
|
|
|
type: String, |
|
|
|
|
|
default: '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -297,11 +445,26 @@ export default { |
|
|
processForm: { |
|
|
processForm: { |
|
|
processStep: '', |
|
|
processStep: '', |
|
|
prodApproverName: '', |
|
|
prodApproverName: '', |
|
|
|
|
|
prodApproverUserId: null, |
|
|
qaApproverName: '', |
|
|
qaApproverName: '', |
|
|
|
|
|
qaApproverUserId: null, |
|
|
techApproverName: '', |
|
|
techApproverName: '', |
|
|
|
|
|
techApproverUserId: null, |
|
|
remark: '' |
|
|
remark: '' |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 工序模版弹框 |
|
|
|
|
|
templateDialogVisible: false, |
|
|
|
|
|
templateList: [], |
|
|
|
|
|
templateLoading: false, |
|
|
|
|
|
|
|
|
|
|
|
// 人员选择弹框 |
|
|
|
|
|
userDialogVisible: false, |
|
|
|
|
|
userDialogTitle: '', |
|
|
|
|
|
userList: [], |
|
|
|
|
|
userLoading: false, |
|
|
|
|
|
currentRoleTypeForUser: '', // 当前选择人员的角色类型 |
|
|
|
|
|
|
|
|
// 确认对话框 |
|
|
// 确认对话框 |
|
|
confirmDialogVisible: false, |
|
|
confirmDialogVisible: false, |
|
|
confirmDialogTitle: '', |
|
|
confirmDialogTitle: '', |
|
|
@ -442,8 +605,11 @@ export default { |
|
|
this.processForm = { |
|
|
this.processForm = { |
|
|
processStep: '', |
|
|
processStep: '', |
|
|
prodApproverName: '', |
|
|
prodApproverName: '', |
|
|
|
|
|
prodApproverUserId: null, |
|
|
qaApproverName: '', |
|
|
qaApproverName: '', |
|
|
|
|
|
qaApproverUserId: null, |
|
|
techApproverName: '', |
|
|
techApproverName: '', |
|
|
|
|
|
techApproverUserId: null, |
|
|
remark: '' |
|
|
remark: '' |
|
|
} |
|
|
} |
|
|
this.processDialogVisible = true |
|
|
this.processDialogVisible = true |
|
|
@ -458,13 +624,186 @@ export default { |
|
|
this.processForm = { |
|
|
this.processForm = { |
|
|
processStep: row.processStep, |
|
|
processStep: row.processStep, |
|
|
prodApproverName: row.prodApproverName || '', |
|
|
prodApproverName: row.prodApproverName || '', |
|
|
|
|
|
prodApproverUserId: row.prodApproverUserId || null, |
|
|
qaApproverName: row.qaApproverName || '', |
|
|
qaApproverName: row.qaApproverName || '', |
|
|
|
|
|
qaApproverUserId: row.qaApproverUserId || null, |
|
|
techApproverName: row.techApproverName || '', |
|
|
techApproverName: row.techApproverName || '', |
|
|
|
|
|
techApproverUserId: row.techApproverUserId || null, |
|
|
remark: row.remark || '' |
|
|
remark: row.remark || '' |
|
|
} |
|
|
} |
|
|
this.processDialogVisible = true |
|
|
this.processDialogVisible = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 打开工序模版选择弹框 |
|
|
|
|
|
*/ |
|
|
|
|
|
openTemplateDialog() { |
|
|
|
|
|
this.templateDialogVisible = true |
|
|
|
|
|
this.loadTemplateList() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 加载工序模版列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
loadTemplateList() { |
|
|
|
|
|
this.templateLoading = true |
|
|
|
|
|
getProcessTemplateList({ |
|
|
|
|
|
site: this.$store.state.user.site |
|
|
|
|
|
}).then(({data}) => { |
|
|
|
|
|
this.templateLoading = false |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.templateList = data.list || [] |
|
|
|
|
|
} else { |
|
|
|
|
|
this.templateList = [] |
|
|
|
|
|
this.$message.error(data.msg || '加载模版列表失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
this.templateLoading = false |
|
|
|
|
|
this.$message.error('加载模版列表异常') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 选择模版 |
|
|
|
|
|
*/ |
|
|
|
|
|
selectTemplate(row) { |
|
|
|
|
|
this.processForm.processStep = row.templateName |
|
|
|
|
|
this.processForm.prodApproverName = row.prodApproverName || '' |
|
|
|
|
|
this.processForm.prodApproverUserId = row.prodApproverUserId || null |
|
|
|
|
|
this.processForm.qaApproverName = row.qaApproverName || '' |
|
|
|
|
|
this.processForm.qaApproverUserId = row.qaApproverUserId || null |
|
|
|
|
|
this.processForm.techApproverName = row.techApproverName || '' |
|
|
|
|
|
this.processForm.techApproverUserId = row.techApproverUserId || null |
|
|
|
|
|
this.processForm.remark = row.remark || '' |
|
|
|
|
|
|
|
|
|
|
|
this.templateDialogVisible = false |
|
|
|
|
|
this.$message.success('已应用模版') |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 删除模版 |
|
|
|
|
|
*/ |
|
|
|
|
|
deleteTemplate(row) { |
|
|
|
|
|
this.$confirm('确定删除该模版?', '操作提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
deleteProcessTemplate({ id: row.id }).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success('删除模版成功') |
|
|
|
|
|
this.loadTemplateList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg || '删除模版失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
this.$message.error('删除模版异常') |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 另存为模版 |
|
|
|
|
|
*/ |
|
|
|
|
|
saveAsTemplate() { |
|
|
|
|
|
// 验证必填项 |
|
|
|
|
|
if (!this.processForm.processStep || !this.processForm.processStep.trim()) { |
|
|
|
|
|
this.$message.warning('请输入工序名称') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!this.processForm.prodApproverName || !this.processForm.qaApproverName || !this.processForm.techApproverName) { |
|
|
|
|
|
this.$message.warning('请先选择所有负责人') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.$confirm('确定将当前工序保存为模版?', '操作提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'info' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
saveProcessTemplate({ |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
templateName: this.processForm.processStep.trim(), |
|
|
|
|
|
prodApproverName: this.processForm.prodApproverName, |
|
|
|
|
|
prodApproverUserId: this.processForm.prodApproverUserId, |
|
|
|
|
|
qaApproverName: this.processForm.qaApproverName, |
|
|
|
|
|
qaApproverUserId: this.processForm.qaApproverUserId, |
|
|
|
|
|
techApproverName: this.processForm.techApproverName, |
|
|
|
|
|
techApproverUserId: this.processForm.techApproverUserId, |
|
|
|
|
|
remark: this.processForm.remark || '' |
|
|
|
|
|
}).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success('保存模版成功') |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg || '保存模版失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
this.$message.error('保存模版异常') |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 打开人员选择弹框 |
|
|
|
|
|
*/ |
|
|
|
|
|
openUserDialog(roleType) { |
|
|
|
|
|
this.currentRoleTypeForUser = roleType |
|
|
|
|
|
|
|
|
|
|
|
const roleNames = { |
|
|
|
|
|
'PROD': '车间负责人', |
|
|
|
|
|
'QA': '质量负责人', |
|
|
|
|
|
'TECH': '技术负责人' |
|
|
|
|
|
} |
|
|
|
|
|
this.userDialogTitle = `选择${roleNames[roleType]}` |
|
|
|
|
|
|
|
|
|
|
|
this.userDialogVisible = true |
|
|
|
|
|
this.loadUserList(roleType) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 加载人员列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
loadUserList(roleType) { |
|
|
|
|
|
this.userLoading = true |
|
|
|
|
|
getUserListByRole({ |
|
|
|
|
|
roleType: roleType, |
|
|
|
|
|
site: this.$store.state.user.site |
|
|
|
|
|
}).then(({data}) => { |
|
|
|
|
|
this.userLoading = false |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.userList = data.list || [] |
|
|
|
|
|
} else { |
|
|
|
|
|
this.userList = [] |
|
|
|
|
|
this.$message.error(data.msg || '加载人员列表失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
this.userLoading = false |
|
|
|
|
|
this.$message.error('加载人员列表异常') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 选择人员 |
|
|
|
|
|
*/ |
|
|
|
|
|
selectUser(row) { |
|
|
|
|
|
const roleType = this.currentRoleTypeForUser |
|
|
|
|
|
|
|
|
|
|
|
if (roleType === 'PROD') { |
|
|
|
|
|
this.processForm.prodApproverName = row.userName |
|
|
|
|
|
this.processForm.prodApproverUserId = row.userId |
|
|
|
|
|
} else if (roleType === 'QA') { |
|
|
|
|
|
this.processForm.qaApproverName = row.userName |
|
|
|
|
|
this.processForm.qaApproverUserId = row.userId |
|
|
|
|
|
} else if (roleType === 'TECH') { |
|
|
|
|
|
this.processForm.techApproverName = row.userName |
|
|
|
|
|
this.processForm.techApproverUserId = row.userId |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.userDialogVisible = false |
|
|
|
|
|
this.$message.success('已选择负责人') |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 保存工序 |
|
|
* 保存工序 |
|
|
*/ |
|
|
*/ |
|
|
@ -475,14 +814,33 @@ export default { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 验证三个负责人必须都选择 |
|
|
|
|
|
if (!this.processForm.prodApproverName) { |
|
|
|
|
|
this.$message.warning('请选择车间负责人') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!this.processForm.qaApproverName) { |
|
|
|
|
|
this.$message.warning('请选择质量负责人') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!this.processForm.techApproverName) { |
|
|
|
|
|
this.$message.warning('请选择技术负责人') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.processSaving = true |
|
|
this.processSaving = true |
|
|
|
|
|
|
|
|
saveTriConfirmProcess({ |
|
|
saveTriConfirmProcess({ |
|
|
applyNo: this.applyNo, |
|
|
applyNo: this.applyNo, |
|
|
processStep: this.processForm.processStep.trim(), |
|
|
processStep: this.processForm.processStep.trim(), |
|
|
prodApproverName: this.processForm.prodApproverName || '', |
|
|
|
|
|
qaApproverName: this.processForm.qaApproverName || '', |
|
|
|
|
|
techApproverName: this.processForm.techApproverName || '', |
|
|
|
|
|
|
|
|
prodApproverName: this.processForm.prodApproverName, |
|
|
|
|
|
prodApproverUserId: this.processForm.prodApproverUserId, |
|
|
|
|
|
qaApproverName: this.processForm.qaApproverName, |
|
|
|
|
|
qaApproverUserId: this.processForm.qaApproverUserId, |
|
|
|
|
|
techApproverName: this.processForm.techApproverName, |
|
|
|
|
|
techApproverUserId: this.processForm.techApproverUserId, |
|
|
remark: this.processForm.remark || '' |
|
|
remark: this.processForm.remark || '' |
|
|
}).then(({data}) => { |
|
|
}).then(({data}) => { |
|
|
this.processSaving = false |
|
|
this.processSaving = false |
|
|
@ -499,6 +857,41 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 验证High Risk是否有完整工序 |
|
|
|
|
|
* 供父组件调用 |
|
|
|
|
|
* @return {Boolean} true=验证通过, false=验证失败 |
|
|
|
|
|
*/ |
|
|
|
|
|
validateHighRiskProcess() { |
|
|
|
|
|
console.log('🔍 验证High Risk工序,experimentType:', this.experimentType) |
|
|
|
|
|
|
|
|
|
|
|
// 如果不是High Risk,直接通过 |
|
|
|
|
|
if (this.experimentType !== 'High Risk') { |
|
|
|
|
|
console.log('✅ 非High Risk,验证通过') |
|
|
|
|
|
return true |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 检查是否至少有一条完整的工序 |
|
|
|
|
|
const completeProcesses = this.processList.filter(process => { |
|
|
|
|
|
return process.prodApproverName && |
|
|
|
|
|
process.qaApproverName && |
|
|
|
|
|
process.techApproverName |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
console.log('📊 完整工序数量:', completeProcesses.length, '/', this.processList.length) |
|
|
|
|
|
|
|
|
|
|
|
if (completeProcesses.length === 0) { |
|
|
|
|
|
this.$alert('High Risk申请单必须至少有一条完整的工序(包含车间、质量、技术三个负责人)', '操作提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log('✅ High Risk验证通过') |
|
|
|
|
|
return true |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 删除工序行 |
|
|
* 删除工序行 |
|
|
*/ |
|
|
*/ |
|
|
|