[update] 联调企标复审流程

This commit is contained in:
lideqin
2023-11-13 17:05:23 +08:00
parent 3ba58fed03
commit 2f0aff9002
13 changed files with 302 additions and 124 deletions
@@ -1,5 +1,5 @@
<template>
<internal-detail-page :title="pageTitle" :content-padding="0">
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
<!-- 标题右侧tab -->
<template v-slot:titleRightCustom>
<div class="table-operator-tab">
@@ -81,7 +81,7 @@
</div>
<!-- 人员信息 -->
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
<process-detail-list >
<process-detail-list>
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode + ''"></personnel-info>
</process-detail-list>
</div>
@@ -160,15 +160,6 @@ export default {
}
},
mounted () {
// 获取人员信息结构
this.getPersonInfoStructure(ProcessKey.ES_RECHECK.value)
if (this.$route.query.taskId) {
this.currentNodeName = this.$route.query.taskName
// 有流程id说明是从流程中心来的,需要初始化数据
this.getProcessData(this.$route.query.taskId)
} else {
this.currentNodeName = '发起人发起'
}
// 初始化节点
const taskName = this.$route.query.taskName
if (taskName) {
@@ -189,14 +180,26 @@ export default {
this.currentNode = 999
}
}
if (this.currentNode === 1) {
this.disabled = false
// 是节点1的话还需要设置是联络人发起还是标准化发起 ??
this.initRole = 'contact'
// 获取人员信息结构
this.getPersonInfoStructure(ProcessKey.ES_RECHECK.value, () => {
// 获取完人员信息结构,初始化人员信息是否可更改
if (this.currentNode === 1) {
this.disabled = false
// 是节点1的话还需要设置是联络人发起还是标准化发起 ??
this.initRole = 'contact'
this.initPersonInfoData(true)
} else {
this.disabled = true
// 如果不是第一个节点,人员信息全部不可选
this.initPersonInfoData(false)
}
})
if (this.$route.query.taskId) {
this.currentNodeName = this.$route.query.taskName
// 有流程id说明是从流程中心来的,需要初始化数据
this.getProcessData(this.$route.query.taskId)
} else {
this.disabled = true
// 如果不是第一个节点,人员信息全部不可选
this.initPersonInfoData()
this.currentNodeName = '发起人发起'
}
// 如果是查看进入的,不可编辑,不可操作
if (this.$route.query.onlyLook) {
@@ -248,7 +251,6 @@ export default {
},
formInline: {},
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
personnelInfoData: [],
url: {
list: '' // 人员信息的右侧表格获取接口
}
@@ -257,19 +259,25 @@ export default {
methods: {
// 根据流程id获取数据并回显
getProcessData (taskId) {
this.loading = true
enStandardRecheckGetDataById(taskId).then(res => {
if (res.success) {
this.model = res.result
this.$nextTick(() => {
// 初始化流程信息
this.processInfoForm.setFieldsValue(pick(this.model[0], 'processName', 'deadlineDate', 'processDescription'))
this.processInfoForm.setFieldsValue(pick(this.model.common, 'processName', 'deadlineDate', 'processDescription'))
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'remarks', 'attachment'))
// 初始化业务基本信息中组件内容
if (this.$refs.baseInfoRef) {
this.$refs.baseInfoRef.initData(this.model.data)
}
})
// 初始化业务基本信息中组件内容
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
// 头部tab改变
@@ -339,6 +347,7 @@ export default {
enStandardRecheckApproval(paramObj).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -366,6 +375,32 @@ export default {
enStandardRecheckTurnTo(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
}
})
},
// 提交
handleSubmit () {
if (this.loading) return
this.approvalInfoForm.validateFields(async (err, values) => {
const data = await this.$refs.baseInfoRef.getDataValidate()
if (!err && data) {
this.loading = true
const param = {}
param.common = Object.assign({}, values)
param.common.taskId = this.$route.query.taskId
param.data = Object.assign({}, data.formInline)
console.log(param)
enStandardRecheckAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -381,11 +416,13 @@ export default {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
param.taskId = this.$route.query.taskId
const param = {}
param.common = Object.assign({}, values)
param.common.taskId = this.$route.query.taskId
enStandardRecheckAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -406,11 +443,13 @@ export default {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
param.taskId = this.$route.query.id
const param = {}
param.common = Object.assign({}, values)
param.common.taskId = this.$route.query.taskId
enStandardRecheckReject(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -155,9 +155,8 @@ export default {
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表单赋值
// this.formInline =
this.formInline = data
},
// 外层要获取数据
getData () {
@@ -9,12 +9,12 @@
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardNo">
<a-form-model-item class="item-model" prop="standardNumber">
<standard-selection :source="StandardSource.ENTERPRISE.value"
disabled
:disabledSourceSearch="true"
type="radio"
v-model="formInline.enStandardNo" />
v-model="formInline.standardNumber" />
</a-form-model-item>
</div>
<!-- 企标名称 -->
@@ -24,9 +24,9 @@
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardName">
<a-form-model-item class="item-model" prop="standardName">
<a-input class="box-input"
v-model="formInline.enStandardName"
v-model="formInline.standardName"
:maxLength="50"
disabled
@change="event => event.target.value = event.target.value.trim()"
@@ -85,9 +85,9 @@
{{ $t('workCenter.enStandardChange.materialDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="materialDate">
<a-form-model-item class="item-model" prop="implementationDate">
<a-date-picker
v-model="formInline.materialDate"
v-model="formInline.implementationDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
@@ -118,8 +118,8 @@
{{ $t('workCenter.enStandardRecheck.recheck') }}
</span>
</div>
<a-form-model-item class="item-model" prop="recheck">
<a-radio-group v-model="formInline.recheck">
<a-form-model-item class="item-model" prop="recheckAdvice">
<a-radio-group v-model="formInline.recheckAdvice">
<!-- 继续有效 -->
<a-radio :value="Recheck.STAND_GOOD.value">
{{ $t('workCenter.enStandardRecheck.standGood') }}
@@ -166,7 +166,7 @@ export default {
formInline: {},
rules: {
// 复审
recheck: [
recheckAdvice: [
{
required: true,
message: this.$t('workCenter.enStandardRecheck.recheck') + this.$t('cannotEmpty'),
@@ -177,11 +177,12 @@ export default {
}
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
// 拿到外面传进来的数据初始化
initData (data) {
this.data = data
// 给表单赋值
// this.formInline =
this.$nextTick(() => {
this.formInline = Object.assign({}, data)
})
},
// 外层要获取数据
getData () {
@@ -191,14 +192,16 @@ export default {
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate (callback) {
this.$refs.ruleForm.validate(valid => {
async getDataValidate () {
let data = {}
await this.$refs.ruleForm.validate(valid => {
if (valid) {
const data = {}
data.formInline = this.formInline
callback(data)
} else {
data = false
}
})
return data
},
}
}
@@ -139,16 +139,14 @@ export default {
Recheck,
StandardSource,
formInline: {},
rules: {},
data: {}
rules: {}
}
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表单赋值
// this.formInline =
this.formInline = data
}
}
}
@@ -10,12 +10,12 @@
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardNo">
<a-form-model-item class="item-model" prop="standardNumber">
<standard-selection :source="StandardSource.ENTERPRISE.value"
:disabled="disabled"
:disabledSourceSearch="true"
type="radio"
v-model="formInline.enStandardNo"
v-model="formInline.standardNumber"
@listChange="listChange" />
</a-form-model-item>
</div>
@@ -26,9 +26,9 @@
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardName">
<a-form-model-item class="item-model" prop="standardName">
<a-input class="box-input"
v-model="formInline.enStandardName"
v-model="formInline.standardName"
:maxLength="50"
disabled
@change="event => event.target.value = event.target.value.trim()"
@@ -78,7 +78,7 @@ export default {
formInline: {},
rules: {
// 企标编号
enStandardNo: [
standardNumber: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
@@ -93,16 +93,14 @@ export default {
trigger: 'change'
}
]
},
data: {}
}
}
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表单赋值
// this.formInline =
this.formInline = data
},
// 外层要获取数据
getData () {
@@ -127,10 +125,10 @@ export default {
listChange (value) {
console.log(value)
// 企标名称
this.formInline.enStandardName = value[0].standardName
this.formInline.standardName = value[0].standardName
// 主起草人赋值给联络人
// this.formInline.contactPerson = value[0].
this.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (this.formInline.enStandardName || '') + '-' + '复审')
this.$emit('processNameChange', (this.formInline.standardNumber || '') + '-' + (this.formInline.standardName || '') + '-' + '复审')
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
@@ -131,8 +131,7 @@ export default {
url: {
list: '/workCenter/getTodoList'
},
currentTurnTo: {}, // 当前转办
currentTurnTo: {} // 当前转办
}
},
methods: {
@@ -157,6 +156,30 @@ export default {
case '9':
path = '/workCenter/annualRevisionPlanStandardizationInit/revisionPlanStandardizationInitFlow'
break
// 企标制修订流程
case '10':
path = '/workCenter/enterpriseStandardRevision/enterpriseStandardRevisionFlow'
break
// 企标更改流程
case '11':
path = '/workCenter/enterpriseStandardChange/enterpriseStandardChangeFlow'
break
// 企标复审流程
case '12':
path = '/workCenter/enterpriseStandardRecheck/enterpriseStandardRecheckFlow'
break
// 企标废止流程
case '13':
path = '/workCenter/enterpriseStandardAnnul/enterpriseStandardAnnulFlow'
break
// 企标封存流程
case '14':
path = '/workCenter/enterpriseStandardSealSave/enterpriseStandardSealSaveFlow'
break
// 已封存企标启用流程
case '15':
path = '/workCenter/enterpriseStandardStartUse/enterpriseStandardStartUseFlow'
break
}
this.$router.push({
path: path,