[update] 联调已封存企标启用流程

This commit is contained in:
lideqin
2023-11-10 15:31:30 +08:00
parent 2e0ef053c5
commit 49daf53edf
2 changed files with 180 additions and 194 deletions
@@ -77,7 +77,7 @@
</div> </div>
<!-- 人员信息 --> <!-- 人员信息 -->
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0"> <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> <personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode + ''"></personnel-info>
</process-detail-list> </process-detail-list>
</div> </div>
@@ -112,8 +112,6 @@ import InternalDetailPage from '@/components/InternalDetailPage'
import ProcessDetailList from '@/components/ProcessDetailList' import ProcessDetailList from '@/components/ProcessDetailList'
import PersonnelInfo from '@/components/PersonnelInfo' import PersonnelInfo from '@/components/PersonnelInfo'
import UserSelectModal from '@/components/selection/UserSelectModal' import UserSelectModal from '@/components/selection/UserSelectModal'
import { USER_INFO } from '@/store/mutation-types'
import Vue from 'vue'
import pick from 'lodash.pick' import pick from 'lodash.pick'
import { import {
enStandardStartUseGetDataById, enStandardStartUseGetDataById,
@@ -125,41 +123,7 @@ import {
} from '@/api/workCenter' } from '@/api/workCenter'
import BaseInfoForm from './modules/BaseInfoForm' import BaseInfoForm from './modules/BaseInfoForm'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import { ProcessKey } from '../../../enums/commonEnums'
// 人员信息
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: 'checkbox',
fieldName: ''
},
{
id: 3,
nodeName: '起草人和会签人主管级领导审批',
nodeRoleName: '起草人和会签人主管级领导',
canChoose: true,
chooseType: 'radio',
fieldName: ''
},
{
id: 4,
nodeName: '标准化审批',
nodeRoleName: '标准化',
canChoose: true,
chooseType: 'radio',
fieldName: ''
}
]
export default { export default {
name: 'EnterpriseStandardStartUseFlow', name: 'EnterpriseStandardStartUseFlow',
@@ -178,7 +142,7 @@ export default {
}, },
mounted () { mounted () {
// 获取人员信息结构 // 获取人员信息结构
this.getPersonInfoStructure() this.getPersonInfoStructure(ProcessKey.ES_ENABLE.value)
if (this.$route.query.taskId) { if (this.$route.query.taskId) {
this.currentNodeName = this.$route.query.taskName this.currentNodeName = this.$route.query.taskName
// 有流程id说明是从流程中心来的,需要初始化数据 // 有流程id说明是从流程中心来的,需要初始化数据
@@ -350,7 +314,7 @@ export default {
paramObj.common = { ...values, ...approvalValues } paramObj.common = { ...values, ...approvalValues }
paramObj.flowUser = personnelObj paramObj.flowUser = personnelObj
paramObj.dataList = [data.formInline] paramObj.dataList = [data.formInline]
enStandardStartUseApproval(arr).then(res => { enStandardStartUseApproval(paramObj).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
} else { } else {
@@ -1,160 +1,163 @@
<template> <template>
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm"> <a-spin :spinning="loading">
<div class="collapsible-panel-form"> <a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head"> <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"> <div class="box-title-text form-flex-item">
<span class="required">*</span> <div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')"> <span class="required">*</span>
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }} <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')">
</span> {{ $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> </div>
<a-form-model-item class="item-model" prop="enStandardNo"> <!-- 企标名称 -->
<standard-selection :source="StandardSource.ENTERPRISE.value" <div class="box-title-text form-flex-item">
:disabled="disabled" <div class="title-text">
:disabledSourceSearch="true" <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
type="radio" {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
v-model="formInline.enStandardNo" </span>
@listChange="listChange" /> </div>
</a-form-model-item> <a-form-model-item class="item-model" prop="standardName">
</div> <a-input class="box-input"
<!-- 企标名称 --> v-model="formInline.standardName"
<div class="box-title-text form-flex-item"> :maxLength="50"
<div class="title-text"> disabled
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')"> @change="event => event.target.value = event.target.value.trim()"
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }} :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</span> </a-form-model-item>
</div> </div>
<a-form-model-item class="item-model" prop="enStandardName"> <!-- 标准英文名称 -->
<a-input class="box-input" <div class="box-title-text form-flex-item">
v-model="formInline.enStandardName" <div class="title-text">
:maxLength="50" <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardEnglishName')">
disabled {{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }}
@change="event => event.target.value = event.target.value.trim()" </span>
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" /> </div>
</a-form-model-item> <a-form-model-item class="item-model" prop="englishName">
</div> <a-input class="box-input"
<!-- 标准英文名称 --> disabled
<div class="box-title-text form-flex-item"> v-model="formInline.englishName"
<div class="title-text"> :maxLength="50"
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardEnglishName')"> @change="event => event.target.value = event.target.value.trim()"
{{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }} :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" />
</span> </a-form-model-item>
</div> </div>
<a-form-model-item class="item-model" prop="enStandardEnglishName"> <!-- 标准类型 -->
<a-input class="box-input" <div class="box-title-text form-flex-item">
disabled <div class="title-text">
v-model="formInline.enStandardEnglishName" <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardType')">
:maxLength="50" {{ $t('workCenter.enterpriseInitChangePlan.standardType') }}
@change="event => event.target.value = event.target.value.trim()" </span>
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" /> </div>
</a-form-model-item> <a-form-model-item class="item-model" prop="standardCategory">
</div> <j-dict-select-tag class="box-input"
<!-- 标准类型 --> disabled
<div class="box-title-text form-flex-item"> v-model="formInline.standardCategory"
<div class="title-text"> :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardType')"
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardType')"> :type="'select'"
{{ $t('workCenter.enterpriseInitChangePlan.standardType') }} :triggerChange="false"
</span> dictCode="esp_standard_type" />
</a-form-model-item>
</div> </div>
<a-form-model-item class="item-model" prop="standardType"> <!-- 代替企标编号 -->
<j-dict-select-tag class="box-input" <div class="box-title-text form-flex-item">
disabled <div class="title-text">
v-model="formInline.standardType" <span class="title-text-text" :title="$t('workCenter.enStandardAnnul.substituteStandardNumber')">
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardType')" {{ $t('workCenter.enStandardAnnul.substituteStandardNumber') }}
:type="'select'" </span>
:triggerChange="false" </div>
dictCode="esp_standard_type" /> <a-form-model-item class="item-model" prop="substituteStandardNumber">
</a-form-model-item> <a-input class="box-input"
</div> disabled
<!-- 代替企标编号 --> v-model="formInline.substituteStandardNumber"
<div class="box-title-text form-flex-item"> :maxLength="50"
<div class="title-text"> @change="event => event.target.value = event.target.value.trim()"
<span class="title-text-text" :title="$t('workCenter.enStandardAnnul.substituteStandardNumber')"> :placeholder="$t('pleaseEnter')+$t('workCenter.enStandardAnnul.substituteStandardNumber')" />
{{ $t('workCenter.enStandardAnnul.substituteStandardNumber') }} </a-form-model-item>
</span>
</div> </div>
<a-form-model-item class="item-model" prop="substituteStandardNumber"> <!-- 被代替企标编号 -->
<a-input class="box-input" <div class="box-title-text form-flex-item">
disabled <div class="title-text">
v-model="formInline.substituteStandardNumber" <span class="title-text-text" :title="$t('workCenter.enStandardAnnul.replacedByEnStandardNumber')">
:maxLength="50" {{ $t('workCenter.enStandardAnnul.replacedByEnStandardNumber') }}
@change="event => event.target.value = event.target.value.trim()" </span>
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardAnnul.substituteStandardNumber')" /> </div>
</a-form-model-item> <a-form-model-item class="item-model" prop="replacedByStandardNumber">
</div> <a-input class="box-input"
<!-- 被代替企标编号 --> disabled
<div class="box-title-text form-flex-item"> v-model="formInline.replacedByStandardNumber"
<div class="title-text"> :maxLength="50"
<span class="title-text-text" :title="$t('workCenter.enStandardAnnul.replacedByEnStandardNumber')"> @change="event => event.target.value = event.target.value.trim()"
{{ $t('workCenter.enStandardAnnul.replacedByEnStandardNumber') }} :placeholder="$t('pleaseEnter')+$t('workCenter.enStandardAnnul.replacedByEnStandardNumber')" />
</span> </a-form-model-item>
</div> </div>
<a-form-model-item class="item-model" prop="replacedByEnStandardNumber"> <!-- 发布日期 -->
<a-input class="box-input" <div class="box-title-text form-flex-item">
disabled <div class="title-text">
v-model="formInline.replacedByEnStandardNumber" <span class="title-text-text" :title="$t('workCenter.enStandardChange.releaseDate')">
:maxLength="50" {{ $t('workCenter.enStandardChange.releaseDate') }}
@change="event => event.target.value = event.target.value.trim()" </span>
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardAnnul.replacedByEnStandardNumber')" /> </div>
</a-form-model-item> <a-form-model-item class="item-model" prop="releaseDate">
</div> <a-date-picker
<!-- 发布日期 --> v-model="formInline.releaseDate"
<div class="box-title-text form-flex-item"> :showTime="false"
<div class="title-text"> disabled
<span class="title-text-text" :title="$t('workCenter.enStandardChange.releaseDate')"> value-format="YYYY-MM-DD">
{{ $t('workCenter.enStandardChange.releaseDate') }} </a-date-picker>
</span> </a-form-model-item>
</div> </div>
<a-form-model-item class="item-model" prop="releaseDate"> <!-- 实施日期 -->
<a-date-picker <div class="box-title-text form-flex-item">
v-model="formInline.releaseDate" <div class="title-text">
:showTime="false" <span class="title-text-text" :title="$t('workCenter.enStandardChange.materialDate')">
disabled {{ $t('workCenter.enStandardChange.materialDate') }}
value-format="YYYY-MM-DD"> </span>
</a-date-picker> </div>
</a-form-model-item> <a-form-model-item class="item-model" prop="implementationDate">
</div> <a-date-picker
<!-- 实施日期 --> v-model="formInline.implementationDate"
<div class="box-title-text form-flex-item"> :showTime="false"
<div class="title-text"> disabled
<span class="title-text-text" :title="$t('workCenter.enStandardChange.materialDate')"> value-format="YYYY-MM-DD">
{{ $t('workCenter.enStandardChange.materialDate') }} </a-date-picker>
</span> </a-form-model-item>
</div> </div>
<a-form-model-item class="item-model" prop="materialDate"> <!-- 启用理由 -->
<a-date-picker <div class="box-title-text form-flex-item">
v-model="formInline.materialDate" <div class="title-text">
:showTime="false" <span class="required">*</span>
disabled <span class="title-text-text" :title="$t('workCenter.enStandardStartUse.startUseReason')">
value-format="YYYY-MM-DD"> {{ $t('workCenter.enStandardStartUse.startUseReason') }}
</a-date-picker> </span>
</a-form-model-item> </div>
</div> <a-form-model-item class="item-model" prop="archiveReason">
<!-- 启用理由 --> <a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enStandardStartUse.startUseReason')"
<div class="box-title-text form-flex-item"> :disabled="disabled"
<div class="title-text"> :maxLength="500"
<span class="required">*</span> v-model="formInline.archiveReason" :rows="4" />
<span class="title-text-text" :title="$t('workCenter.enStandardStartUse.startUseReason')"> </a-form-model-item>
{{ $t('workCenter.enStandardStartUse.startUseReason') }}
</span>
</div> </div>
<a-form-model-item class="item-model" prop="startUseReason">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enStandardStartUse.startUseReason')"
:disabled="disabled"
:maxLength="500"
v-model="formInline.startUseReason" :rows="4" />
</a-form-model-item>
</div> </div>
</div> </div>
</div> </a-form-model>
</a-form-model> </a-spin>
</template> </template>
<script> <script>
import { StandardSource } from '@/enums/commonEnums' import { StandardSource } from '@/enums/commonEnums'
import StandardSelection from '@/components/selection/StandardSelection' import StandardSelection from '@/components/selection/StandardSelection'
import { getEnterpriseStandardInfoById } from '@/api/enterpriseStandardLibraryApi'
export default { export default {
name: 'BaseInfoForm', name: 'BaseInfoForm',
@@ -169,10 +172,11 @@ export default {
data () { data () {
return { return {
StandardSource, StandardSource,
loading: false,
formInline: {}, formInline: {},
rules: { rules: {
// 企标编号 // 企标编号
enStandardNo: [ standardNumber: [
{ {
required: true, required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'), message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
@@ -180,7 +184,7 @@ export default {
} }
], ],
// 启用理由 // 启用理由
startUseReason: [ archiveReason: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardStartUse.startUseReason') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardStartUse.startUseReason') + this.$t('cannotEmpty'),
@@ -205,27 +209,45 @@ export default {
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate (callback) { async getDataValidate () {
this.$refs.ruleForm.validate(valid => { let data = {}
await this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
const data = {}
data.formInline = this.formInline data.formInline = this.formInline
callback(data) } else {
data = false
} }
}) })
return data
}, },
// 选完企标编号了,需要回显内容,返回流程名称 // 选完企标编号了,需要回显内容,返回流程名称
listChange (value) { listChange (value) {
console.log(value) console.log(value)
this.loading = true
// 企标名称 // 企标名称
this.formInline.enStandardName = value[0].standardName this.formInline.standardName = value[0].standardName
// 英文名称 // 根据返回的id查询企标数据
// 企标类别 getEnterpriseStandardInfoById({ id: value[0].id, type: '2' }).then(res => {
// 代替企标编号 if (res.success) {
// 被代替企标编号 const result = res.result
// 实施日期 // 标准英文名称
// 复审日期 this.formInline.standardEnglishName = result.standard_english_name
this.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (this.formInline.enStandardName || '') + '-' + '启用') // 标准类型??
// this.formInline.standardEnglishName = result.standard_english_name
// 代替企标编号
this.formInline.substituteStandardNumber = result.substitute_standard_number
// 被代替企标编号
this.formInline.replacedByStandardNumber = result.replaced_by_standard_number
// 发布日期
this.formInline.releaseDate = result.release_date
// 实施日期
this.formInline.implementationDate = result.implementation_date
this.formInline = Object.assign({}, this.formInline)
}
}).finally(() => {
this.loading = false
})
this.$emit('processNameChange', (this.formInline.standardNumber || '') + '-' + (this.formInline.standardName || '') + '-' + '启用')
} }
} }
} }