|
|
@ -1,5 +1,8 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="mod-config exp-apply-page"> |
|
|
|
|
|
|
|
|
<div class="mod-config exp-apply-page" v-loading="sendLoading" |
|
|
|
|
|
element-loading-text="正在发送邮件,请稍候..." |
|
|
|
|
|
element-loading-spinner="el-icon-loading" |
|
|
|
|
|
element-loading-background="rgba(0, 0, 0, 0.6)"> |
|
|
<!-- 查询条件表单 --> |
|
|
<!-- 查询条件表单 --> |
|
|
<el-form :inline="true" label-position="top" class="query-form"> |
|
|
<el-form :inline="true" label-position="top" class="query-form"> |
|
|
<el-form-item label="试验单号"> |
|
|
<el-form-item label="试验单号"> |
|
|
@ -108,6 +111,13 @@ |
|
|
type="primary" |
|
|
type="primary" |
|
|
plain |
|
|
plain |
|
|
class="copy-btn">复制</el-button> |
|
|
class="copy-btn">复制</el-button> |
|
|
|
|
|
<el-button |
|
|
|
|
|
@click="urgeApproval()" |
|
|
|
|
|
:disabled="!currentRow.applyNo || ['草稿', '已完成', '已取消', '已驳回'].includes(currentRow.status)" |
|
|
|
|
|
:loading="urgeLoading" |
|
|
|
|
|
type="warning" |
|
|
|
|
|
plain |
|
|
|
|
|
class="urge-btn">催办</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
@ -639,7 +649,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { searchExpApplyList, submitExpApply, deleteExpApply, withdrawExpApply, cancelExpApply, copyExpApply, getSubmitApprovers, getFlowStatus, getTriConfirmList, confirmSample, saveRemark } from '@/api/erf/erf' |
|
|
|
|
|
|
|
|
import { searchExpApplyList, submitExpApply, deleteExpApply, withdrawExpApply, cancelExpApply, copyExpApply, getSubmitApprovers, getFlowStatus, getTriConfirmList, confirmSample, saveRemark, urgeApproval } from '@/api/erf/erf' |
|
|
import { getBuList } from '@/api/factory/site' |
|
|
import { getBuList } from '@/api/factory/site' |
|
|
import { queryOss } from '@/api/oss/oss' |
|
|
import { queryOss } from '@/api/oss/oss' |
|
|
import ExpApplyForm from './components/expApplyForm.vue' |
|
|
import ExpApplyForm from './components/expApplyForm.vue' |
|
|
@ -661,6 +671,7 @@ export default { |
|
|
|
|
|
|
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
sendLoading: false, // 发送邮件的加载状态 |
|
|
buList: [], |
|
|
buList: [], |
|
|
// 查询条件 |
|
|
// 查询条件 |
|
|
queryHeaderData: { |
|
|
queryHeaderData: { |
|
|
@ -748,7 +759,10 @@ export default { |
|
|
sourceApplyNo: '', |
|
|
sourceApplyNo: '', |
|
|
applyNo: '', |
|
|
applyNo: '', |
|
|
copyOptions: ['triConfirm','rawMaterialList'] // 默认全选 |
|
|
copyOptions: ['triConfirm','rawMaterialList'] // 默认全选 |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 催办 |
|
|
|
|
|
urgeLoading: false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -1654,6 +1668,41 @@ export default { |
|
|
this.copyLoading = false |
|
|
this.copyLoading = false |
|
|
this.$message.error('复制异常') |
|
|
this.$message.error('复制异常') |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 催办:向该申请单所有未确认的审批人(技术经理、生产经理、质量经理、计划员)发送催办邮件 |
|
|
|
|
|
*/ |
|
|
|
|
|
urgeApproval() { |
|
|
|
|
|
if (!this.currentRow.applyNo) { |
|
|
|
|
|
this.$message.warning('请先选择一条申请单记录') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.$confirm( |
|
|
|
|
|
`确定向申请单【${this.currentRow.applyNo}】的所有未确认审批人发送催办邮件?`, |
|
|
|
|
|
'催办确认', |
|
|
|
|
|
{ |
|
|
|
|
|
confirmButtonText: '确定发送', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
} |
|
|
|
|
|
).then(() => { |
|
|
|
|
|
this.urgeLoading = true |
|
|
|
|
|
this.sendLoading = true |
|
|
|
|
|
urgeApproval({ applyNo: this.currentRow.applyNo }).then(({data}) => { |
|
|
|
|
|
this.urgeLoading = false |
|
|
|
|
|
this.sendLoading = false |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success(data.msg || '催办邮件已发送') |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg || '催办失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.urgeLoading = false |
|
|
|
|
|
this.sendLoading = false |
|
|
|
|
|
this.$message.error('催办请求异常') |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(() => {}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -1814,6 +1863,19 @@ export default { |
|
|
color: #FFFFFF; |
|
|
color: #FFFFFF; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 催办按钮 - 橙黄色扁平 */ |
|
|
|
|
|
.exp-apply-page .urge-btn { |
|
|
|
|
|
background-color: #FDF6EC; |
|
|
|
|
|
border-color: #FAECD8; |
|
|
|
|
|
color: #E6A23C; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.exp-apply-page .urge-btn:hover:not(:disabled) { |
|
|
|
|
|
background-color: #E6A23C; |
|
|
|
|
|
border-color: #E6A23C; |
|
|
|
|
|
color: #FFFFFF; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* 禁用按钮样式 */ |
|
|
/* 禁用按钮样式 */ |
|
|
.exp-apply-page .el-button:disabled { |
|
|
.exp-apply-page .el-button:disabled { |
|
|
opacity: 0.5; |
|
|
opacity: 0.5; |
|
|
|