[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,4 +1,5 @@
<template> <template>
<a-spin :spinning="loading">
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm"> <a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<div class="collapsible-panel-form"> <div class="collapsible-panel-form">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head"> <div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
@@ -10,12 +11,12 @@
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }} {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span> </span>
</div> </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" <standard-selection :source="StandardSource.ENTERPRISE.value"
:disabled="disabled" :disabled="disabled"
:disabledSourceSearch="true" :disabledSourceSearch="true"
type="radio" type="radio"
v-model="formInline.enStandardNo" v-model="formInline.standardNumber"
@listChange="listChange" /> @listChange="listChange" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -26,9 +27,9 @@
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }} {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="enStandardName"> <a-form-model-item class="item-model" prop="standardName">
<a-input class="box-input" <a-input class="box-input"
v-model="formInline.enStandardName" v-model="formInline.standardName"
:maxLength="50" :maxLength="50"
disabled disabled
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
@@ -42,10 +43,10 @@
{{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }} {{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="enStandardEnglishName"> <a-form-model-item class="item-model" prop="englishName">
<a-input class="box-input" <a-input class="box-input"
disabled disabled
v-model="formInline.enStandardEnglishName" v-model="formInline.englishName"
:maxLength="50" :maxLength="50"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" /> :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" />
@@ -58,10 +59,10 @@
{{ $t('workCenter.enterpriseInitChangePlan.standardType') }} {{ $t('workCenter.enterpriseInitChangePlan.standardType') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="standardType"> <a-form-model-item class="item-model" prop="standardCategory">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
disabled disabled
v-model="formInline.standardType" v-model="formInline.standardCategory"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardType')" :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardType')"
:type="'select'" :type="'select'"
:triggerChange="false" :triggerChange="false"
@@ -91,10 +92,10 @@
{{ $t('workCenter.enStandardAnnul.replacedByEnStandardNumber') }} {{ $t('workCenter.enStandardAnnul.replacedByEnStandardNumber') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="replacedByEnStandardNumber"> <a-form-model-item class="item-model" prop="replacedByStandardNumber">
<a-input class="box-input" <a-input class="box-input"
disabled disabled
v-model="formInline.replacedByEnStandardNumber" v-model="formInline.replacedByStandardNumber"
:maxLength="50" :maxLength="50"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardAnnul.replacedByEnStandardNumber')" /> :placeholder="$t('pleaseEnter')+$t('workCenter.enStandardAnnul.replacedByEnStandardNumber')" />
@@ -123,9 +124,9 @@
{{ $t('workCenter.enStandardChange.materialDate') }} {{ $t('workCenter.enStandardChange.materialDate') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="materialDate"> <a-form-model-item class="item-model" prop="implementationDate">
<a-date-picker <a-date-picker
v-model="formInline.materialDate" v-model="formInline.implementationDate"
:showTime="false" :showTime="false"
disabled disabled
value-format="YYYY-MM-DD"> value-format="YYYY-MM-DD">
@@ -140,21 +141,23 @@
{{ $t('workCenter.enStandardStartUse.startUseReason') }} {{ $t('workCenter.enStandardStartUse.startUseReason') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="startUseReason"> <a-form-model-item class="item-model" prop="archiveReason">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enStandardStartUse.startUseReason')" <a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enStandardStartUse.startUseReason')"
:disabled="disabled" :disabled="disabled"
:maxLength="500" :maxLength="500"
v-model="formInline.startUseReason" :rows="4" /> v-model="formInline.archiveReason" :rows="4" />
</a-form-model-item> </a-form-model-item>
</div> </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.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.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (this.formInline.enStandardName || '') + '-' + '启用') this.formInline = Object.assign({}, this.formInline)
}
}).finally(() => {
this.loading = false
})
this.$emit('processNameChange', (this.formInline.standardNumber || '') + '-' + (this.formInline.standardName || '') + '-' + '启用')
} }
} }
} }