Browse Source

催办

ecss-tx
han\hanst 1 month ago
parent
commit
3cf00386e1
  1. 5
      src/api/erf/erf.js
  2. 68
      src/views/modules/erf/expApplyList.vue

5
src/api/erf/erf.js

@ -209,3 +209,8 @@ export const getSampleCycleReportList = data => createAPI(`/erf/sampleCycleRepor
* 统计从申请单发起日到三类经理技术/生产/质量全部审批完成的周期 * 统计从申请单发起日到三类经理技术/生产/质量全部审批完成的周期
*/ */
export const getApprovalCycleReportList = data => createAPI(`/erf/approvalCycleReport/list`, 'post', data) export const getApprovalCycleReportList = data => createAPI(`/erf/approvalCycleReport/list`, 'post', data)
/**
* 催办向指定申请单所有未确认的审批人技术经理生产经理质量经理计划员发送催办邮件
*/
export const urgeApproval = data => createAPI(`/erf/expApply/urgeApproval`, 'post', data)

68
src/views/modules/erf/expApplyList.vue

@ -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;

Loading…
Cancel
Save