[add] 企标废止流程,企标封存,已封存启用流程
This commit is contained in:
+31
-1
@@ -74,6 +74,26 @@ const enStandardAnnulAgree = (params) => postAction('/process/es/abolish/agree',
|
||||
// 驳回
|
||||
const enStandardAnnulReject = (params) => postAction('/process/es/abolish/reject', params)
|
||||
|
||||
// 企标封存流程
|
||||
// 转办
|
||||
const enStandardSealSaveTurnTo = (params) => postAction('/process/es/archive/transfer', params)
|
||||
// 同意
|
||||
const enStandardSealSaveAgree = (params) => postAction('/process/es/archive/agree', params)
|
||||
// 驳回
|
||||
const enStandardSealSaveReject = (params) => postAction('/process/es/archive/reject', params)
|
||||
// 根据id查询流程数据--办理
|
||||
const enStandardSealSaveGetDataById = (taskId, params) => getAction(`/process/es/archive/handle/${taskId}`, params)
|
||||
|
||||
// 已封存企标启用流程
|
||||
// 转办
|
||||
const enStandardStartUseTurnTo = (params) => postAction('/process/es/enable/transfer', params)
|
||||
// 同意
|
||||
const enStandardStartUseAgree = (params) => postAction('/process/es/enable/agree', params)
|
||||
// 驳回
|
||||
const enStandardStartUseReject = (params) => postAction('/process/es/enable/reject', params)
|
||||
// 根据id查询流程数据--办理
|
||||
const enStandardStartUseGetDataById = (taskId, params) => getAction(`/process/es/enable/handle/${taskId}`, params)
|
||||
|
||||
export {
|
||||
queryPermissionsByUser,
|
||||
getFormDictTreeList,
|
||||
@@ -104,5 +124,15 @@ export {
|
||||
enStandardAnnulGetDataById,
|
||||
enStandardAnnulTurnTo,
|
||||
enStandardAnnulAgree,
|
||||
enStandardAnnulReject
|
||||
enStandardAnnulReject,
|
||||
|
||||
enStandardSealSaveTurnTo,
|
||||
enStandardSealSaveAgree,
|
||||
enStandardSealSaveReject,
|
||||
enStandardSealSaveGetDataById,
|
||||
|
||||
enStandardStartUseTurnTo,
|
||||
enStandardStartUseAgree,
|
||||
enStandardStartUseReject,
|
||||
enStandardStartUseGetDataById
|
||||
}
|
||||
|
||||
@@ -106,6 +106,14 @@ module.exports = {
|
||||
materialDate: '实施日期',
|
||||
annulReason: '废止理由'
|
||||
},
|
||||
// 企标封存流程
|
||||
esSealSave: {
|
||||
sealSaveReason: '封存理由'
|
||||
},
|
||||
// 已封存企标启用流程
|
||||
esStartUse: {
|
||||
startUseReason: '启用理由'
|
||||
},
|
||||
// 标准征求意见流程
|
||||
standardConsultation: {
|
||||
standardText: '标准文本',
|
||||
|
||||
@@ -108,6 +108,14 @@ module.exports = {
|
||||
materialDate: '实施日期',
|
||||
annulReason: '废止理由'
|
||||
},
|
||||
// 企标封存流程
|
||||
esSealSave: {
|
||||
sealSaveReason: '封存理由'
|
||||
},
|
||||
// 已封存企标启用流程
|
||||
esStartUse: {
|
||||
startUseReason: '启用理由'
|
||||
},
|
||||
// 标准征求意见流程
|
||||
standardConsultation: {
|
||||
standardText: '标准文本',
|
||||
|
||||
@@ -19,6 +19,26 @@ export default [
|
||||
hasBack: true // 这个属性控制页面上面的导航栏 是否有返回按钮
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/workCenter/enterpriseStandardSealSave',
|
||||
name: 'EnterpriseStandardSealSave',
|
||||
component: (resolve) => require(['@/views/workCenter/enterpriseStandardSealSave/EnterpriseStandardSealSave.vue'], resolve),
|
||||
meta: {
|
||||
title: '企标封存流程',
|
||||
hasNavBar: true, // 这个属性控制页面是否显示上面的导航栏
|
||||
hasBack: true // 这个属性控制页面上面的导航栏 是否有返回按钮
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/workCenter/enterpriseStandardStartUse',
|
||||
name: 'EnterpriseStandardStartUse',
|
||||
component: (resolve) => require(['@/views/workCenter/enterpriseStandardStartUse/EnterpriseStandardStartUse.vue'], resolve),
|
||||
meta: {
|
||||
title: '已封存企标启用流程',
|
||||
hasNavBar: true, // 这个属性控制页面是否显示上面的导航栏
|
||||
hasBack: true // 这个属性控制页面上面的导航栏 是否有返回按钮
|
||||
}
|
||||
},
|
||||
// 标准法规入库/变更流程
|
||||
{
|
||||
path: '/workCenter/standardEntryOrChangeProcess',
|
||||
|
||||
+26
-4
@@ -4,6 +4,8 @@
|
||||
<van-button type="info" @click="logout">退出登录</van-button>
|
||||
<van-button type="primary" @click="goEnterpriseStandardInitChange">跳转企标计划立项、变更流程审批</van-button>
|
||||
<van-button type="primary" @click="goESAnnul">跳转企标废止流程</van-button>
|
||||
<van-button type="danger" @click="goESSealSave">跳转企标封存流程</van-button>
|
||||
<van-button type="primary" @click="goESStartUse">跳转已封存企标启用流程</van-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -27,8 +29,8 @@ export default {
|
||||
// taskId: '435135'
|
||||
// 责任部门变更
|
||||
processInstanceId: '447619',
|
||||
taskId: '447680',
|
||||
nodeId: 'sid-A26EC37C-7C93-4987-9833-363C4E25EC50'
|
||||
taskId: '475241',
|
||||
nodeId: 'sid-AB70F1CA-8311-4639-B3DA-204EF3332B29'
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -37,8 +39,28 @@ export default {
|
||||
path: '/workCenter/enterpriseStandardAnnul',
|
||||
query: {
|
||||
processInstanceId: '447681',
|
||||
taskId: '467520',
|
||||
nodeId: 'sid-B4157F9F-73E5-48F5-855D-AF87C0DB91C6'
|
||||
taskId: '467744',
|
||||
nodeId: 'sid-0BC5B3BC-ED99-4061-84B4-7320E25DE326'
|
||||
}
|
||||
})
|
||||
},
|
||||
goESSealSave () {
|
||||
this.$router.push({
|
||||
path: '/workCenter/enterpriseStandardSealSave',
|
||||
query: {
|
||||
processInstanceId: '467582',
|
||||
taskId: '467648',
|
||||
nodeId: 'sid-0BC5B3BC-ED99-4061-84B4-7320E25DE326'
|
||||
}
|
||||
})
|
||||
},
|
||||
goESStartUse () {
|
||||
this.$router.push({
|
||||
path: '/workCenter/enterpriseStandardStartUse',
|
||||
query: {
|
||||
processInstanceId: '467650',
|
||||
taskId: '467716',
|
||||
nodeId: 'sid-0BC5B3BC-ED99-4061-84B4-7320E25DE326'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -246,10 +246,10 @@ export default {
|
||||
param.taskId = this.$route.query.taskId
|
||||
enStandardAnnulTurnTo(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$message(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.$message(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
@@ -289,10 +289,10 @@ export default {
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
enStandardAnnulReject(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$message(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.$message(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
|
||||
@@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<process-common-layout class="page-box" :processKey="ProcessKey.ES_ARCHIVE.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>
|
||||
<!-- 企标编号 -->
|
||||
<van-field
|
||||
:label="$t('esInitChange.enterpriseStandardNum')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esInitChange.enterpriseStandardNum')"
|
||||
readonly
|
||||
type="textarea"
|
||||
autosize
|
||||
rows="1"
|
||||
v-model="baseInfoForm.standardNumber" />
|
||||
<!-- 企标名称 -->
|
||||
<van-field
|
||||
:label="$t('esInitChange.enterpriseStandardName')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esInitChange.enterpriseStandardName')"
|
||||
readonly
|
||||
type="textarea"
|
||||
rows="1"
|
||||
autosize
|
||||
v-model="baseInfoForm.standardName" />
|
||||
<!-- 标准英文名称 -->
|
||||
<van-field
|
||||
:label="$t('esInitChange.standardEnglishName')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esInitChange.standardEnglishName')"
|
||||
readonly
|
||||
type="textarea"
|
||||
rows="1"
|
||||
autosize
|
||||
v-model="baseInfoForm.englishName" />
|
||||
<!-- 标准类型 -->
|
||||
<picker-dict-field
|
||||
:label="$t('esAnnul.standardType')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esAnnul.standardType')"
|
||||
dict-code="esp_standard_type"
|
||||
readonly
|
||||
v-model="baseInfoForm.standardCategory" />
|
||||
<!-- 代替企标编号 -->
|
||||
<van-field
|
||||
:label="$t('esAnnul.substituteStandardNumber')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esAnnul.substituteStandardNumber')"
|
||||
readonly
|
||||
type="textarea"
|
||||
rows="1"
|
||||
autosize
|
||||
v-model="baseInfoForm.substituteStandardNumber" />
|
||||
<!-- 被代替企标编号 -->
|
||||
<van-field
|
||||
:label="$t('esAnnul.replacedByEnStandardNumber')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esAnnul.replacedByEnStandardNumber')"
|
||||
readonly
|
||||
type="textarea"
|
||||
rows="1"
|
||||
autosize
|
||||
v-model="baseInfoForm.replacedByStandardNumber" />、
|
||||
<!-- 发布日期 -->
|
||||
<calendar-field
|
||||
:label="$t('esAnnul.releaseDate')"
|
||||
v-model="baseInfoForm.releaseDate"
|
||||
type="date"
|
||||
readonly
|
||||
/>
|
||||
<!-- 实施日期 -->
|
||||
<calendar-field
|
||||
:label="$t('esAnnul.materialDate')"
|
||||
v-model="baseInfoForm.implementationDate"
|
||||
type="date"
|
||||
readonly
|
||||
/>
|
||||
<!-- 封存理由 -->
|
||||
<van-field
|
||||
:label="$t('esSealSave.sealSaveReason')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esSealSave.sealSaveReason')"
|
||||
readonly
|
||||
type="textarea"
|
||||
rows="1"
|
||||
autosize
|
||||
v-model="baseInfoForm.archiveReason" />
|
||||
</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 PickerDictField from '@/components/PickerDictField'
|
||||
import SelectUser from '@/components/SelectUser'
|
||||
import {
|
||||
enStandardSealSaveTurnTo,
|
||||
enStandardSealSaveAgree,
|
||||
enStandardSealSaveReject,
|
||||
enStandardSealSaveGetDataById
|
||||
} from '@/api/api'
|
||||
|
||||
export default {
|
||||
name: 'EnterpriseStandardSealSave',
|
||||
components: {
|
||||
ProcessCommonLayout,
|
||||
CalendarField,
|
||||
PickerDictField,
|
||||
SelectUser
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
ProcessKey,
|
||||
readonly: false,
|
||||
loading: false,
|
||||
processInfoForm: {}, // 流程信息表单
|
||||
// 流程信息校验
|
||||
processInfoRules: {
|
||||
commitText: [
|
||||
{ required: false, message: this.$t('pleaseEnter') + this.$t('remark') }
|
||||
]
|
||||
},
|
||||
baseInfoForm: {}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
initData () {
|
||||
this.loading = true
|
||||
enStandardSealSaveGetDataById(this.$route.query.taskId).then(res => {
|
||||
if (res.success) {
|
||||
const result = res.result
|
||||
this.processInfoForm = result.common
|
||||
this.baseInfoForm = result.data
|
||||
} 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
|
||||
enStandardSealSaveTurnTo(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
|
||||
this.$refs.processForm.validate().then(() => {
|
||||
const param = {} // 需要传给后端的数据
|
||||
param.common = Object.assign({}, this.processInfoForm)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
this.loading = true
|
||||
enStandardSealSaveAgree(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
|
||||
enStandardSealSaveReject(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>
|
||||
@@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<process-common-layout class="page-box" :processKey="ProcessKey.ES_ENABLE.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>
|
||||
<!-- 企标编号 -->
|
||||
<van-field
|
||||
:label="$t('esInitChange.enterpriseStandardNum')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esInitChange.enterpriseStandardNum')"
|
||||
readonly
|
||||
type="textarea"
|
||||
autosize
|
||||
rows="1"
|
||||
v-model="baseInfoForm.standardNumber" />
|
||||
<!-- 企标名称 -->
|
||||
<van-field
|
||||
:label="$t('esInitChange.enterpriseStandardName')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esInitChange.enterpriseStandardName')"
|
||||
readonly
|
||||
type="textarea"
|
||||
rows="1"
|
||||
autosize
|
||||
v-model="baseInfoForm.standardName" />
|
||||
<!-- 标准英文名称 -->
|
||||
<van-field
|
||||
:label="$t('esInitChange.standardEnglishName')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esInitChange.standardEnglishName')"
|
||||
readonly
|
||||
type="textarea"
|
||||
rows="1"
|
||||
autosize
|
||||
v-model="baseInfoForm.englishName" />
|
||||
<!-- 标准类型 -->
|
||||
<picker-dict-field
|
||||
:label="$t('esAnnul.standardType')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esAnnul.standardType')"
|
||||
dict-code="esp_standard_type"
|
||||
readonly
|
||||
v-model="baseInfoForm.standardCategory" />
|
||||
<!-- 代替企标编号 -->
|
||||
<van-field
|
||||
:label="$t('esAnnul.substituteStandardNumber')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esAnnul.substituteStandardNumber')"
|
||||
readonly
|
||||
type="textarea"
|
||||
rows="1"
|
||||
autosize
|
||||
v-model="baseInfoForm.substituteStandardNumber" />
|
||||
<!-- 被代替企标编号 -->
|
||||
<van-field
|
||||
:label="$t('esAnnul.replacedByEnStandardNumber')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esAnnul.replacedByEnStandardNumber')"
|
||||
readonly
|
||||
type="textarea"
|
||||
rows="1"
|
||||
autosize
|
||||
v-model="baseInfoForm.replacedByStandardNumber" />、
|
||||
<!-- 发布日期 -->
|
||||
<calendar-field
|
||||
:label="$t('esAnnul.releaseDate')"
|
||||
v-model="baseInfoForm.releaseDate"
|
||||
type="date"
|
||||
readonly
|
||||
/>
|
||||
<!-- 实施日期 -->
|
||||
<calendar-field
|
||||
:label="$t('esAnnul.materialDate')"
|
||||
v-model="baseInfoForm.implementationDate"
|
||||
type="date"
|
||||
readonly
|
||||
/>
|
||||
<!-- 启用理由 -->
|
||||
<van-field
|
||||
:label="$t('esStartUse.startUseReason')"
|
||||
:placeholder="$t('pleaseEnter') + $t('esStartUse.startUseReason')"
|
||||
readonly
|
||||
type="textarea"
|
||||
rows="1"
|
||||
autosize
|
||||
v-model="baseInfoForm.archiveReason" />
|
||||
</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 PickerDictField from '@/components/PickerDictField'
|
||||
import SelectUser from '@/components/SelectUser'
|
||||
import {
|
||||
enStandardStartUseTurnTo,
|
||||
enStandardStartUseAgree,
|
||||
enStandardStartUseReject,
|
||||
enStandardStartUseGetDataById
|
||||
} from '@/api/api'
|
||||
|
||||
export default {
|
||||
name: 'EnterpriseStandardStartUse',
|
||||
components: {
|
||||
ProcessCommonLayout,
|
||||
CalendarField,
|
||||
PickerDictField,
|
||||
SelectUser
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
ProcessKey,
|
||||
readonly: false,
|
||||
loading: false,
|
||||
processInfoForm: {}, // 流程信息表单
|
||||
// 流程信息校验
|
||||
processInfoRules: {
|
||||
commitText: [
|
||||
{ required: false, message: this.$t('pleaseEnter') + this.$t('remark') }
|
||||
]
|
||||
},
|
||||
baseInfoForm: {}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
initData () {
|
||||
this.loading = true
|
||||
enStandardStartUseGetDataById(this.$route.query.taskId).then(res => {
|
||||
if (res.success) {
|
||||
const result = res.result
|
||||
this.processInfoForm = result.common
|
||||
this.baseInfoForm = result.data
|
||||
} 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
|
||||
enStandardStartUseTurnTo(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
|
||||
this.$refs.processForm.validate().then(() => {
|
||||
const param = {} // 需要传给后端的数据
|
||||
param.common = Object.assign({}, this.processInfoForm)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
this.loading = true
|
||||
enStandardStartUseAgree(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
|
||||
enStandardStartUseReject(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>
|
||||
Reference in New Issue
Block a user