[update] 企标复审流程联调

This commit is contained in:
lideqin
2023-11-10 13:48:18 +08:00
parent 1f50b2bd28
commit a0725a1085
4 changed files with 156 additions and 170 deletions
@@ -81,7 +81,7 @@
</div>
<!-- 人员信息 -->
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
<process-detail-list :url="url">
<process-detail-list >
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode + ''"></personnel-info>
</process-detail-list>
</div>
@@ -125,8 +125,6 @@ import InternalDetailPage from '@/components/InternalDetailPage'
import ProcessDetailList from '@/components/ProcessDetailList'
import PersonnelInfo from '@/components/PersonnelInfo'
import UserSelectModal from '@/components/selection/UserSelectModal'
import { USER_INFO } from '@/store/mutation-types'
import Vue from 'vue'
import pick from 'lodash.pick'
import {
enStandardRecheckGetDataById,
@@ -141,41 +139,7 @@ import StandardizationInitBaseInfo from './modules/StandardizationInitBaseInfo'
import DrafterEnterOptionBaseInfo from './modules/DrafterEnterOptionBaseInfo'
import RecheckApproveBaseInfo from './modules/RecheckApproveBaseInfo'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
// 人员信息
const personalInfo = [ // 人员信息的数据
{
id: 1,
nodeName: '发起人发起',
nodeRoleName: '发起人',
canChoose: false,
userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
},
{ // 自动带出,可编辑
id: 2,
nodeName: '起草人填写意见',
nodeRoleName: '起草人',
canChoose: true,
chooseType: 'radio',
fieldName: ''
},
{
id: 3,
nodeName: '起草人部长审批',
nodeRoleName: '起草人部长',
canChoose: true,
chooseType: 'radio',
fieldName: ''
},
{
id: 4,
nodeName: '标准化审批',
nodeRoleName: '标准化',
canChoose: true,
chooseType: 'radio',
fieldName: ''
}
]
import { ProcessKey } from '../../../enums/commonEnums'
export default {
name: 'EnterpriseStandardRecheckFlow',
@@ -197,7 +161,7 @@ export default {
},
mounted () {
// 获取人员信息结构
this.getPersonInfoStructure()
this.getPersonInfoStructure(ProcessKey.ES_RECHECK.value)
if (this.$route.query.taskId) {
this.currentNodeName = this.$route.query.taskName
// 有流程id说明是从流程中心来的,需要初始化数据
@@ -228,7 +192,7 @@ export default {
if (this.currentNode === 1) {
this.disabled = false
// 是节点1的话还需要设置是联络人发起还是标准化发起 ??
// this.initRole =
this.initRole = 'contact'
} else {
this.disabled = true
// 如果不是第一个节点,人员信息全部不可选
@@ -1,127 +1,130 @@
<template>
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<div class="collapsible-panel-form">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
<!-- 企标编号 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
<a-spin :spinning="loading">
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<div class="collapsible-panel-form">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
<!-- 企标编号 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardNumber">
<standard-selection :source="StandardSource.ENTERPRISE.value"
:disabled="disabled"
:disabledSourceSearch="true"
type="radio"
v-model="formInline.standardNumber"
@listChange="listChange" />
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="enStandardNo">
<standard-selection :source="StandardSource.ENTERPRISE.value"
:disabled="disabled"
:disabledSourceSearch="true"
type="radio"
v-model="formInline.enStandardNo"
@listChange="listChange" />
</a-form-model-item>
</div>
<!-- 企标名称 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
<!-- 企标名称 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardName">
<a-input class="box-input"
v-model="formInline.standardName"
:maxLength="50"
disabled
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="enStandardName">
<a-input class="box-input"
v-model="formInline.enStandardName"
:maxLength="50"
disabled
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item>
</div>
<!-- 主起草人 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.principalDrafter')">
{{ $t('workCenter.enterpriseInitChangePlan.principalDrafter') }}
</span>
<!-- 主起草人 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.principalDrafter')">
{{ $t('workCenter.enterpriseInitChangePlan.principalDrafter') }}
</span>
</div>
<a-form-model-item class="item-model" prop="mainDraftingUser">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.principalDrafter')"
v-model="formInline.mainDraftingUser"
:disabled="disabled"
filedName="mainDraftingUser"
@nameChange="userSelectNameChange"
:nameStr="formInline.mainDraftingUser_dictText"
type="radio" />
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="mainDraftingUser">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.principalDrafter')"
v-model="formInline.mainDraftingUser"
:disabled="disabled"
filedName="mainDraftingUser"
@nameChange="userSelectNameChange"
:nameStr="formInline.mainDraftingUser_dictText"
type="radio" />
</a-form-model-item>
</div>
<!-- 主起草单位 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.mainDraftUnit')">
{{ $t('workCenter.enterpriseInitChangePlan.mainDraftUnit') }}
</span>
<!-- 主起草单位 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.mainDraftUnit')">
{{ $t('workCenter.enterpriseInitChangePlan.mainDraftUnit') }}
</span>
</div>
<a-form-model-item class="item-model" prop="mainDraftingUnit">
<j-select-depart v-model="formInline.mainDraftingUnit"
:disabled="disabled"
:backDepart="true" />
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="mainDraftingUnit">
<j-select-depart v-model="formInline.mainDraftingUnit"
:disabled="disabled"
:backDepart="true" />
</a-form-model-item>
</div>
<!-- 发布日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardChange.releaseDate')">
{{ $t('workCenter.enStandardChange.releaseDate') }}
</span>
<!-- 发布日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardChange.releaseDate')">
{{ $t('workCenter.enStandardChange.releaseDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="releaseDate">
<a-date-picker
v-model="formInline.releaseDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="releaseDate">
<a-date-picker
v-model="formInline.releaseDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<!-- 实施日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardChange.materialDate')">
{{ $t('workCenter.enStandardChange.materialDate') }}
</span>
<!-- 实施日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardChange.materialDate')">
{{ $t('workCenter.enStandardChange.materialDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="implementationDate">
<a-date-picker
v-model="formInline.implementationDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="materialDate">
<a-date-picker
v-model="formInline.materialDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<!-- 复审日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardRecheck.recheckDate')">
{{ $t('workCenter.enStandardRecheck.recheckDate') }}
</span>
<!-- 复审日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardRecheck.recheckDate')">
{{ $t('workCenter.enStandardRecheck.recheckDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="recheckDate">
<a-date-picker
v-model="formInline.recheckDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<a-form-model-item class="item-model" prop="recheckDate">
<a-date-picker
v-model="formInline.recheckDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
</div>
</div>
</a-form-model>
</a-form-model>
</a-spin>
</template>
<script>
import { StandardSource } from '@/enums/commonEnums'
import StandardSelection from '@/components/selection/StandardSelection'
import UserSelection from '@/components/selection/UserSelection'
import { getEnterpriseStandardInfoById } from '@/api/enterpriseStandardLibraryApi'
export default {
name: 'ContactInitBaseInfo',
components: { StandardSelection, UserSelection },
@@ -135,10 +138,11 @@ export default {
data () {
return {
StandardSource,
loading: false,
formInline: {},
rules: {
// 企标编号
enStandardNo: [
standardNumber: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
@@ -163,26 +167,42 @@ 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
},
// 选完企标编号了,需要回显内容,返回流程名称
listChange (value) {
console.log(value)
this.loading = true
// 企标名称
this.formInline.enStandardName = value[0].standardName
// 主起草人
// 主起草部门
// 发布日期
// 实施日期
// 复审日期
this.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (this.formInline.enStandardName || '') + '-' + '复审')
this.formInline.standardName = value[0].standardName
getEnterpriseStandardInfoById({ id: value[0].id, type: '2' }).then(res => {
if (res.success) {
const result = res.result
// 发布日期
this.formInline.releaseDate = result.release_date
// 实施日期
this.formInline.implementationDate = result.implementation_date
// 主起草人
this.formInline.mainDraftingUser = result.main_drafting_user
this.formInline.mainDraftingUser_dictText = result.main_drafting_user_dictText
// 主起草单位
this.formInline.mainDraftingUnit = result.main_drafting_unit
// 复审日期??
this.formInline = Object.assign({}, this.formInline)
}
}).finally(() => {
this.loading = false
})
this.$emit('processNameChange', (this.formInline.standardNumber || '') + '-' + (this.formInline.standardName || '') + '-' + '复审')
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
@@ -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">
@@ -112,14 +112,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
},
// 选完企标编号了,需要回显内容,返回流程名称
listChange (value) {