[add] 年度制修订计划标准化发起

This commit is contained in:
lideqin
2023-12-12 16:30:03 +08:00
parent cd01e500f7
commit fc65f01545
4 changed files with 403 additions and 1 deletions
+15
View File
@@ -80,6 +80,16 @@ const activelyReportAgree = (params) => postAction('/process/es/annualReport/agr
// 拒绝
const activelyReportReject = (params) => postAction('/process/es/annualReport/reject', params)
// 年度制修订计划(标准化发起)
// 根据流程id获取流程信息
const standardizationInitGetDataById = (taskId, params) => getAction(`/process/es/annualInit/handle/${taskId}`, params)
// 转办
const standardizationInitTurnTo = (params) => postAction('/process/es/annualInit/transfer', params)
// 同意
const standardizationInitAgree = (params) => postAction('/process/es/annualInit/agree', params)
// 拒绝
const standardizationInitReject = (params) => postAction('/process/es/annualInit/reject', params)
// 企标复审流程
// 保存
const enStandardRecheckSave = (params) => postAction('/process/es/recheck/save', params)
@@ -216,6 +226,11 @@ export {
activelyReportAgree,
activelyReportReject,
standardizationInitGetDataById,
standardizationInitTurnTo,
standardizationInitAgree,
standardizationInitReject,
enStandardRecheckSave,
enStandardRecheckTurnTo,
enStandardRecheckAgree,
+10
View File
@@ -19,6 +19,16 @@ export default [
hasBack: true // 这个属性控制页面上面的导航栏 是否有返回按钮
}
},
{
path: '/workCenter/annualRevisionPlanStandardizationInit',
name: 'AnnualRevisionPlanStandardizationInit',
component: (resolve) => require(['@/views/workCenter/annualRevisionPlanStandardizationInit/AnnualRevisionPlanStandardizationInit.vue'], resolve),
meta: {
// title: '年度制修订计划(标准化发起)',
hasNavBar: true, // 这个属性控制页面是否显示上面的导航栏
hasBack: true // 这个属性控制页面上面的导航栏 是否有返回按钮
}
},
{
path: '/workCenter/enterpriseStandardRecheck',
name: 'EnterpriseStandardRecheck',
+1 -1
View File
@@ -72,7 +72,7 @@ export default {
break
// 年度制修订计划(标准化发起)
case '9':
path = '/workCenter/annualRevisionPlanStandardizationInit/revisionPlanStandardizationInitFlow'
path = '/workCenter/annualRevisionPlanStandardizationInit'
break
// 企标制修订流程
case '10':
@@ -0,0 +1,377 @@
<template>
<process-common-layout class="page-box" :processKey="ProcessKey.ES_ANNUAL_INIT.value" :loading="loading">
<template v-slot:process>
<!-- 流程信息 -->
<div class="process-part">
<div class="process-part-title">{{ $t('processInformation') }}</div>
<van-form
ref="form"
input-align="right"
error-message-align="right"
:readonly="readonly"
>
<!-- 流程名称 -->
<van-field
:label="$t('processName')"
:placeholder="$t('pleaseEnter') + $t('processName')"
readonly
type="textarea"
rows="1"
autosize
v-model="processInfoForm.prcName" />
<!-- 截止日期 -->
<calendar-field
:label="$t('expirationDate')"
v-model="processInfoForm.dueTime"
type="date"
readonly
/>
<!-- 流程说明 -->
<van-field
v-model="processInfoForm.prcMes"
:label="$t('processExplain')"
type="textarea"
autosize
disabled
rows="2"
:placeholder="$t('pleaseEnter')+$t('processExplain')"
:border="false"
input-align="left"
class="vertical-form-item"/>
</van-form>
</div>
<van-form
ref="baseInfoFormRef"
input-align="right"
error-message-align="right"
:readonly="readonly"
>
<!-- 业务基本信息 -->
<div class="process-part">
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<a-table
bordered
:scroll="{x: '100%'}"
ref="table"
rowKey="espId"
:columns="columns"
:dataSource="baseInfoForm"
:pagination="false">
</a-table>
</div>
</van-form>
<!-- 流程审批信息 -->
<div class="process-part">
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
<van-form
ref="processForm"
input-align="right"
error-message-align="right"
:readonly="readonly">
<!-- 备注 -->
<van-field
v-model="processInfoForm.commitText"
:rules="processInfoRules.commitText"
:label="$t('remark')"
name="commitText"
type="textarea"
autosize
rows="2"
:placeholder="$t('pleaseEnter')+$t('remark')"
:border="false"
input-align="left"
class="vertical-form-item"/>
</van-form>
</div>
</template>
<template v-slot:operation>
<!-- 转办 -->
<van-button class="operation-common-btn" @click="handleTurnTo">
<template #icon>
<van-icon class="iconfont" class-prefix="icon" name="xunhuan" />
</template>
{{ $t('turnTo') }}
</van-button>
<!-- 同意 -->
<van-button class="operation-common-btn" type="primary" @click="handleAgree">
<template #icon>
<van-icon class="iconfont" class-prefix="icon" name="check" />
</template>
{{ $t('agree') }}
</van-button>
<!-- 驳回 -->
<van-button class="operation-common-btn light-color-button" @click="handleReject">
<template #icon>
<van-icon class="iconfont" class-prefix="icon" name="close" />
</template>
{{ $t('reject') }}
</van-button>
</template>
<select-user ref="selectUserRef" @selected-change="selectUserChange"></select-user>
</process-common-layout>
</template>
<script>
import ProcessCommonLayout from '@/components/ProcessCommonLayout'
import { ProcessKey } from '@/enums/commonEnums'
import CalendarField from '@/components/CalendarField'
import SelectUser from '@/components/SelectUser'
import {
standardizationInitGetDataById,
standardizationInitTurnTo,
standardizationInitAgree,
standardizationInitReject, activelyReportGetDataById, activelyReportTurnTo, activelyReportAgree, activelyReportReject
} from '@/api/api'
export default {
name: 'AnnualRevisionPlanStandardizationInit',
components: {
ProcessCommonLayout,
CalendarField,
SelectUser
},
data () {
return {
ProcessKey,
readonly: false,
loading: false,
processInfoForm: {}, // 流程信息表单
// 流程信息校验
processInfoRules: {
commitText: [
{ required: false, message: this.$t('pleaseEnter') + this.$t('remark') }
]
},
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 制修订类型
title: this.$t('revisionPlanActivelyReport.revisionType'),
align: 'center',
width: 180,
dataIndex: 'projectType_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 原企标编号
title: this.$t('revisionPlanActivelyReport.oldEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardNo',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标编号
title: this.$t('revisionPlanActivelyReport.newEnterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardNo',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 原企标名称
title: this.$t('revisionPlanActivelyReport.oldEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'originEnStandardName',
scopedSlots: { customRender: 'toDetailOld' }
},
{ // 新企标名称
title: this.$t('revisionPlanActivelyReport.newEnterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'newEnStandardName',
scopedSlots: { customRender: 'toDetailNew' }
},
{ // 授权部门
title: this.$t('revisionPlanActivelyReport.authDepartment'),
align: 'center',
width: 180,
dataIndex: 'authDept_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 企业标准代号
title: this.$t('revisionPlanActivelyReport.enterpriseStandardCode'),
align: 'center',
width: 180,
dataIndex: 'enStandardCode_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 配合单位
title: this.$t('revisionPlanActivelyReport.suitUnit'),
align: 'center',
width: 180,
dataIndex: 'cooperationUnit_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 主起草人
title: this.$t('revisionPlanActivelyReport.principalDrafter'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUser_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位
title: this.$t('revisionPlanActivelyReport.mainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnit_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位负责人
title: this.$t('revisionPlanActivelyReport.headOfMainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnitResponsiblePerson_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 标准推进人
title: this.$t('revisionPlanActivelyReport.standardPusher'),
align: 'center',
width: 180,
dataIndex: 'standardPromoter_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 草稿计划完成日期
title: this.$t('revisionPlanActivelyReport.draftPlanFinishDate'),
align: 'center',
width: 180,
dataIndex: 'draftPlannedCompleteDate',
scopedSlots: { customRender: 'text' }
},
{ // 征求意见稿计划完成日期
title: this.$t('revisionPlanActivelyReport.exposureDraftPlanFinishDate'),
align: 'center',
width: 200,
dataIndex: 'solicitationDraftPlanCompleteDate',
scopedSlots: { customRender: 'text' }
},
{ // 计划报批日期
title: this.$t('revisionPlanActivelyReport.planSubmissionDate'),
align: 'center',
width: 180,
dataIndex: 'planApprovalDate',
scopedSlots: { customRender: 'text' }
},
{ // 变更状态
title: this.$t('revisionPlanActivelyReport.changeState'),
align: 'center',
width: 180,
dataIndex: 'changeStatus_dictText',
scopedSlots: { customRender: 'text' }
}
],
baseInfoForm: {}
}
},
created () {
this.initData()
},
methods: {
// 初始化数据
initData () {
this.loading = true
standardizationInitGetDataById(this.$route.query.taskId).then(res => {
if (res.success) {
const result = res.result
this.processInfoForm = result.common
this.baseInfoForm = result.dataList
} else {
this.$message(res.message)
}
}).finally(() => {
this.loading = false
})
},
// 转办
handleTurnTo () {
if (this.loading) return
// 点击显示选人组件
this.$refs.selectUserRef.open()
},
// 转办选完人的回调
selectUserChange (userIds) {
this.loading = true
const param = {}
param.userId = userIds
param.taskId = this.$route.query.taskId
standardizationInitTurnTo(param).then(res => {
if (res.success) {
this.$message(res.message)
this.goBack()
} else {
this.$message(res.message)
}
}).finally(() => {
this.loading = false
})
},
// 同意
handleAgree () {
if (this.loading) return
this.processInfoRules.commitText[0].required = false
if (!this.processInfoForm.commitText) {
this.processInfoForm.commitText = '同意'
}
this.$refs.processForm.validate().then(() => {
const param = {} // 需要传给后端的数据
param.common = Object.assign({}, this.processInfoForm)
param.common.taskId = this.$route.query.taskId
this.loading = true
standardizationInitAgree(param).then(res => {
if (res.success) {
this.$message(res.message)
this.goBack()
} else {
this.$message(res.message)
}
}).finally(() => {
this.loading = false
})
}).catch((errorInfo) => {
console.log(errorInfo)
})
},
// 驳回
handleReject () {
if (this.loading) return
this.processInfoRules.commitText[0].required = true
this.$refs.processForm.validate().then(() => {
this.loading = true
const param = {}
param.common = Object.assign({}, this.processInfoForm)
param.common.taskId = this.$route.query.taskId
standardizationInitReject(param).then(res => {
if (res.success) {
this.$message(res.message)
this.goBack()
} else {
this.$message(res.message)
}
}).finally(() => {
this.loading = false
this.processInfoRules.commitText[0].required = false
})
}).catch((errorInfo) => {
console.log(errorInfo)
if (errorInfo.find(item => item.name === 'commitText')) {
// 没通过校验的有备注,弹窗提示输入备注
this.$message(this.$t('pleaseEnterRemarks'))
}
})
},
goBack () {
this.$router.go(-1)
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>