|
|
|
@ -86,7 +86,7 @@ |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label=" " style="margin-top: -11px"> |
|
|
|
<el-button @click="openCreateDialog()" type="success" v-if="isAuth('erf:apply:add')" plain class="add-btn">新增申请单</el-button> |
|
|
|
<el-button @click="openCreateDialog()" type="success" v-if="isAuth('erf:apply:add')" plain class="add-btn">新增试验单</el-button> |
|
|
|
<el-button |
|
|
|
@click="deleteApplyFromToolbar()" |
|
|
|
:disabled="!currentRow.applyNo || currentRow.status !== '草稿'" |
|
|
|
@ -283,7 +283,7 @@ |
|
|
|
@refresh="handleDetailRefresh"> |
|
|
|
</exp-project-detail> |
|
|
|
<div v-else class="empty-tip"> |
|
|
|
请在上方表格中选择一条申请单记录 |
|
|
|
请在上方表格中选择一条试验单记录 |
|
|
|
</div> |
|
|
|
</el-tab-pane>--> |
|
|
|
<el-tab-pane label="附件上传" name="attachment"> |
|
|
|
@ -295,7 +295,7 @@ |
|
|
|
:height="detailHeight"> |
|
|
|
</erf-attachment-manager> |
|
|
|
<div v-else class="empty-tip"> |
|
|
|
请在上方表格中选择一条申请单记录 |
|
|
|
请在上方表格中选择一条试验单记录 |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
<!-- Tab: 三方确认 --> |
|
|
|
@ -309,7 +309,7 @@ |
|
|
|
:height="detailHeight"> |
|
|
|
</exp-tri-confirm> |
|
|
|
<div v-else class="empty-tip"> |
|
|
|
请在上方表格中选择一条申请单记录 |
|
|
|
请在上方表格中选择一条试验单记录 |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
@ -326,7 +326,7 @@ |
|
|
|
</exp-raw-material-list> |
|
|
|
<div v-else class="empty-tip"> |
|
|
|
<i class="el-icon-document" style="font-size: 40px; color: #C0C4CC; margin-bottom: 10px"></i> |
|
|
|
<p style="font-size: 13px">请选择申请单查看原材料清单</p> |
|
|
|
<p style="font-size: 13px">请选择试验单查看原材料清单</p> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
@ -421,7 +421,7 @@ |
|
|
|
</div> |
|
|
|
<div v-else class="empty-tip"> |
|
|
|
<i class="el-icon-document" style="font-size: 40px; color: #C0C4CC; margin-bottom: 10px"></i> |
|
|
|
<p style="font-size: 13px">请选择申请单查看审批状态</p> |
|
|
|
<p style="font-size: 13px">请选择试验单查看审批状态</p> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
@ -445,7 +445,7 @@ |
|
|
|
</div> |
|
|
|
<div v-else class="empty-tip"> |
|
|
|
<i class="el-icon-edit-outline" style="font-size: 40px; color: #C0C4CC; margin-bottom: 10px"></i> |
|
|
|
<p style="font-size: 13px">请选择申请单填写备注</p> |
|
|
|
<p style="font-size: 13px">请选择试验单填写备注</p> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
@ -524,15 +524,15 @@ |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 复制申请单弹窗 --> |
|
|
|
<!-- 复制试验单弹窗 --> |
|
|
|
<el-dialog |
|
|
|
title="复制申请单" |
|
|
|
title="复制试验单" |
|
|
|
:visible.sync="copyDialogVisible" |
|
|
|
width="400px" |
|
|
|
:close-on-click-modal="false"> |
|
|
|
<div style="margin-bottom: 15px;margin-left: 40px; color: #606266; font-size: 13px"> |
|
|
|
<i class="el-icon-info" style="color: #409EFF"></i> |
|
|
|
选择需要复制的内容,将创建一个新的草稿申请单 |
|
|
|
选择需要复制的内容,将创建一个新的草稿试验单 |
|
|
|
</div> |
|
|
|
<el-form :model="copyData" label-width="120px" size="small"> |
|
|
|
<el-form-item label="源试验单号"> |
|
|
|
@ -697,7 +697,7 @@ export default { |
|
|
|
|
|
|
|
// 弹窗相关 |
|
|
|
dialogVisible: false, |
|
|
|
dialogTitle: '新增申请单', |
|
|
|
dialogTitle: '新增试验单', |
|
|
|
dialogReadonly: false, |
|
|
|
currentApply: {}, |
|
|
|
saveLoading: false, |
|
|
|
@ -752,7 +752,7 @@ export default { |
|
|
|
finalFinishDate: '' |
|
|
|
}, |
|
|
|
|
|
|
|
// 复制申请单弹窗 |
|
|
|
// 复制试验单弹窗 |
|
|
|
copyDialogVisible: false, |
|
|
|
copyLoading: false, |
|
|
|
copyData: { |
|
|
|
@ -785,7 +785,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取申请单列表 |
|
|
|
* 获取试验单列表 |
|
|
|
*/ |
|
|
|
getDataList(flag) { |
|
|
|
if (flag === 'Y') { |
|
|
|
@ -859,7 +859,7 @@ export default { |
|
|
|
* 打开新增对话框 |
|
|
|
*/ |
|
|
|
openCreateDialog() { |
|
|
|
this.dialogTitle = '新增申请单' |
|
|
|
this.dialogTitle = '新增试验单' |
|
|
|
this.dialogReadonly = false |
|
|
|
this.currentApply = {} |
|
|
|
this.dialogVisible = true |
|
|
|
@ -869,24 +869,24 @@ export default { |
|
|
|
* 查看详情 |
|
|
|
*/ |
|
|
|
viewDetail(row) { |
|
|
|
this.dialogTitle = '查看申请单' |
|
|
|
this.dialogTitle = '查看试验单' |
|
|
|
this.dialogReadonly = true |
|
|
|
this.currentApply = { ...row } |
|
|
|
this.dialogVisible = true |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 编辑申请单 |
|
|
|
* 编辑试验单 |
|
|
|
*/ |
|
|
|
editApply(row) { |
|
|
|
this.dialogTitle = '修改申请单' |
|
|
|
this.dialogTitle = '修改试验单' |
|
|
|
this.dialogReadonly = false |
|
|
|
this.currentApply = { ...row } |
|
|
|
this.dialogVisible = true |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 保存申请单 |
|
|
|
* 保存试验单 |
|
|
|
*/ |
|
|
|
saveApply() { |
|
|
|
const formData = this.$refs.applyForm.getFormData() |
|
|
|
@ -906,10 +906,10 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 下达申请单 - 打开审批人确认弹窗 |
|
|
|
* 下达试验单 - 打开审批人确认弹窗 |
|
|
|
*/ |
|
|
|
submitApply(row) { |
|
|
|
// 第一步:所有申请单都必须验证附件 |
|
|
|
// 第一步:所有试验单都必须验证附件 |
|
|
|
console.log('🔍 开始验证附件...') |
|
|
|
this.validateAttachmentByApi(row.applyNo).then(hasAttachment => { |
|
|
|
if (!hasAttachment) { |
|
|
|
@ -924,7 +924,7 @@ export default { |
|
|
|
if (row.experimentType === 'High Risk') { |
|
|
|
this.validateHighRiskProcessByApi(row.applyNo).then(isValid => { |
|
|
|
if (!isValid) { |
|
|
|
this.$alert('High Risk申请单必须至少有一条完整的工序(包含车间、质量、技术三个负责人)才能下达', '操作提示', { |
|
|
|
this.$alert('High Risk试验单必须至少有一条完整的工序(包含车间、质量、技术三个负责人)才能下达', '操作提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
type: 'warning' |
|
|
|
}) |
|
|
|
@ -945,9 +945,9 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 通过API验证申请单是否已上传附件 |
|
|
|
* 通过API验证试验单是否已上传附件 |
|
|
|
* |
|
|
|
* @param {String} applyNo 申请单号 |
|
|
|
* @param {String} applyNo 试验单号 |
|
|
|
* @return {Promise<Boolean>} 验证结果 |
|
|
|
*/ |
|
|
|
validateAttachmentByApi(applyNo) { |
|
|
|
@ -973,7 +973,7 @@ export default { |
|
|
|
/** |
|
|
|
* 通过API验证High Risk工序 |
|
|
|
* |
|
|
|
* @param {String} applyNo 申请单号 |
|
|
|
* @param {String} applyNo 试验单号 |
|
|
|
* @return {Promise<Boolean>} 验证结果 |
|
|
|
*/ |
|
|
|
validateHighRiskProcessByApi(applyNo) { |
|
|
|
@ -1155,7 +1155,7 @@ export default { |
|
|
|
|
|
|
|
/** |
|
|
|
* 触发全局审批通知检查 |
|
|
|
* 在申请单下达成功后调用,立即通知审批人 |
|
|
|
* 在试验单下达成功后调用,立即通知审批人 |
|
|
|
*/ |
|
|
|
triggerApprovalNotification() { |
|
|
|
try { |
|
|
|
@ -1176,10 +1176,10 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 删除申请单 |
|
|
|
* 删除试验单 |
|
|
|
*/ |
|
|
|
deleteApply(row) { |
|
|
|
this.$confirm('确定删除该申请单?', '操作提示', { |
|
|
|
this.$confirm('确定删除该试验单?', '操作提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
@ -1196,10 +1196,10 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 撤回申请单 |
|
|
|
* 撤回试验单 |
|
|
|
*/ |
|
|
|
withdrawApply(row) { |
|
|
|
this.$confirm('确定撤回该申请单?撤回后将变为草稿状态', '操作提示', { |
|
|
|
this.$confirm('确定撤回该试验单?撤回后将变为草稿状态', '操作提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
@ -1263,7 +1263,7 @@ export default { |
|
|
|
*/ |
|
|
|
saveRemarkHandle() { |
|
|
|
if (!this.currentRow.applyNo) { |
|
|
|
this.$message.warning('请先选择申请单') |
|
|
|
this.$message.warning('请先选择试验单') |
|
|
|
return |
|
|
|
} |
|
|
|
this.remarkSaving = true |
|
|
|
@ -1541,16 +1541,16 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 工具栏删除申请单 |
|
|
|
* 工具栏删除试验单 |
|
|
|
*/ |
|
|
|
deleteApplyFromToolbar() { |
|
|
|
if (!this.currentRow.applyNo) { |
|
|
|
this.$message.warning('请先选择一条申请单记录') |
|
|
|
this.$message.warning('请先选择一条试验单记录') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.currentRow.status !== '草稿') { |
|
|
|
this.$message.warning('只能删除草稿状态的申请单') |
|
|
|
this.$message.warning('只能删除草稿状态的试验单') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -1558,11 +1558,11 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 工具栏撤回申请单 |
|
|
|
* 工具栏撤回试验单 |
|
|
|
*/ |
|
|
|
withdrawApplyFromToolbar() { |
|
|
|
if (!this.currentRow.applyNo) { |
|
|
|
this.$message.warning('请先选择一条申请单记录') |
|
|
|
this.$message.warning('请先选择一条试验单记录') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -1576,16 +1576,16 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 工具栏取消申请单 |
|
|
|
* 工具栏取消试验单 |
|
|
|
*/ |
|
|
|
cancelApplyFromToolbar() { |
|
|
|
if (!this.currentRow.applyNo) { |
|
|
|
this.$message.warning('请先选择一条申请单记录') |
|
|
|
this.$message.warning('请先选择一条试验单记录') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.currentRow.status === '草稿') { |
|
|
|
this.$message.warning('草稿状态的申请单请直接删除') |
|
|
|
this.$message.warning('草稿状态的试验单请直接删除') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -1594,7 +1594,7 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.$confirm('确定取消该申请单?取消后将终止所有待审批流程,状态变更为已取消', '操作提示', { |
|
|
|
this.$confirm('确定取消该试验单?取消后将终止所有待审批流程,状态变更为已取消', '操作提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
@ -1616,11 +1616,11 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 打开复制申请单弹窗 |
|
|
|
* 打开复制试验单弹窗 |
|
|
|
*/ |
|
|
|
openCopyDialog() { |
|
|
|
if (!this.currentRow.applyNo) { |
|
|
|
this.$message.warning('请先选择一条申请单记录') |
|
|
|
this.$message.warning('请先选择一条试验单记录') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -1638,7 +1638,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 确认复制申请单 |
|
|
|
* 确认复制试验单 |
|
|
|
*/ |
|
|
|
confirmCopy() { |
|
|
|
if (!this.copyData.applyNo) { |
|
|
|
@ -1658,7 +1658,7 @@ export default { |
|
|
|
copyExpApply(copyParams).then(({data}) => { |
|
|
|
this.copyLoading = false |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('复制成功,已创建新的草稿申请单:' + data.newApplyNo) |
|
|
|
this.$message.success('复制成功,已创建新的草稿试验单:' + data.newApplyNo) |
|
|
|
this.copyDialogVisible = false |
|
|
|
this.getDataList() |
|
|
|
} else { |
|
|
|
@ -1671,15 +1671,15 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 催办:向该申请单所有未确认的审批人(技术经理、生产经理、质量经理、计划员)发送催办邮件 |
|
|
|
* 催办:向该试验单所有未确认的审批人(技术经理、生产经理、质量经理、计划员)发送催办邮件 |
|
|
|
*/ |
|
|
|
urgeApproval() { |
|
|
|
if (!this.currentRow.applyNo) { |
|
|
|
this.$message.warning('请先选择一条申请单记录') |
|
|
|
this.$message.warning('请先选择一条试验单记录') |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm( |
|
|
|
`确定向申请单【${this.currentRow.applyNo}】的所有未确认审批人发送催办邮件?`, |
|
|
|
`确定向试验单【${this.currentRow.applyNo}】的所有未确认审批人发送催办邮件?`, |
|
|
|
'催办确认', |
|
|
|
{ |
|
|
|
confirmButtonText: '确定发送', |
|
|
|
|