[update] 调了一部分年度制修订计划
This commit is contained in:
+205
-113
@@ -38,19 +38,19 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.itemCategory') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="itemCategory">
|
||||
<a-select v-model="formInline.itemCategory"
|
||||
@change="itemCategoryChange"
|
||||
<a-form-model-item class="item-model" prop="projectType">
|
||||
<a-select v-model="formInline.projectType"
|
||||
@change="projectTypeChange"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
|
||||
<a-select-option :value="1">{{ $t('workCenter.enterpriseInitChangePlan.formulate') }}</a-select-option>
|
||||
<a-select-option :value="2">{{ $t('workCenter.enterpriseInitChangePlan.revise') }}</a-select-option>
|
||||
<a-select-option :value="ProjectType.ENACT.value">{{ $t('workCenter.enterpriseInitChangePlan.formulate') }}</a-select-option>
|
||||
<a-select-option :value="ProjectType.MODIFY.value">{{ $t('workCenter.enterpriseInitChangePlan.revise') }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 标准立项-制定 -->
|
||||
<template v-if="formInline.itemCategory && formInline.itemCategory === 1">
|
||||
<!-- 企标编号 -->
|
||||
<template v-if="formInline.projectType && formInline.projectType === ProjectType.ENACT.value">
|
||||
<!-- 企标编号-新企标编号 -->
|
||||
<div class="box-title-text form-flex-item-half">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
@@ -58,15 +58,15 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="enterpriseStandardNum">
|
||||
<a-form-model-item class="item-model" prop="newEnStandardNo">
|
||||
<a-input class="box-input"
|
||||
v-model="formInline.enterpriseStandardNum"
|
||||
v-model="formInline.newEnStandardNo"
|
||||
:maxLength="50"
|
||||
disabled
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 企标名称 -->
|
||||
<!-- 企标名称-新企标名称 -->
|
||||
<div class="box-title-text form-flex-item-half">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
@@ -74,9 +74,9 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="enterpriseStandardName">
|
||||
<a-form-model-item class="item-model" prop="newEnStandardName">
|
||||
<a-input class="box-input"
|
||||
v-model="formInline.enterpriseStandardName"
|
||||
v-model="formInline.newEnStandardName"
|
||||
:maxLength="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
|
||||
@@ -90,9 +90,10 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="enterpriseStandardCode">
|
||||
<a-form-model-item class="item-model" prop="enStandardCode">
|
||||
<j-dict-select-tag class="box-input"
|
||||
v-model="formInline.enterpriseStandardCode"
|
||||
ref="enStandardCodeRef"
|
||||
v-model="formInline.enStandardCode"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
@@ -108,9 +109,9 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseNameCode') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="enterpriseNameCode">
|
||||
<a-form-model-item class="item-model" prop="enNameCode">
|
||||
<j-dict-select-tag class="box-input"
|
||||
v-model="formInline.enterpriseNameCode"
|
||||
v-model="formInline.enNameCode"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
@@ -144,19 +145,20 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.yearNumber') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="yearNumber">
|
||||
<a-form-model-item class="item-model" prop="decadeCode">
|
||||
<j-date show-type="year"
|
||||
v-model="formInline.yearNumber"
|
||||
v-model="formInline.decadeCode"
|
||||
:default-value="yearNumberDefaultValue"
|
||||
date-format="YYYY"
|
||||
:disabled="disabled"
|
||||
@change="decadeCodeChange"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 标准立项-修订 -->
|
||||
<template v-else-if="formInline.itemCategory && formInline.itemCategory === 2">
|
||||
<!-- 企标编号 -->
|
||||
<template v-else-if="formInline.projectType && formInline.projectType === ProjectType.MODIFY.value">
|
||||
<!-- 企标编号-原企标编号 -->
|
||||
<div class="box-title-text form-flex-item-half">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
@@ -164,46 +166,46 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="enterpriseStandardNum">
|
||||
<a-form-model-item class="item-model" prop="originEnStandardNo">
|
||||
<standard-selection :source="StandardSource.ENTERPRISE.value"
|
||||
:disabledSourceSearch="true"
|
||||
type="radio"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.enterpriseStandardNum"
|
||||
v-model="formInline.originEnStandardNo"
|
||||
@nameChange="nameChange"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 企标名称 -->
|
||||
<!-- 企标名称-原企标名称 -->
|
||||
<div class="box-title-text form-flex-item-half">
|
||||
<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="enterpriseStandardName">
|
||||
<a-form-model-item class="item-model" prop="originEnStandardName">
|
||||
<a-input class="box-input"
|
||||
v-model="formInline.enterpriseStandardName"
|
||||
v-model="formInline.originEnStandardName"
|
||||
:maxLength="50"
|
||||
disabled
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 新企标编号 根据选的企标编号的那三个代号,生成新的编号?? -->
|
||||
<div class="box-title-text form-flex-item-half">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')">
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="newEnterpriseStandardNum">
|
||||
<a-input class="box-input"
|
||||
v-model="formInline.newEnterpriseStandardNum"
|
||||
:maxLength="50"
|
||||
disabled
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 新企标编号 审批结束后才回显?? -->
|
||||
<!--<div class="box-title-text form-flex-item-half">-->
|
||||
<!-- <div class="title-text">-->
|
||||
<!-- <span class="required">*</span>-->
|
||||
<!-- <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')">-->
|
||||
<!-- {{ $t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum') }}-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-form-model-item class="item-model" prop="newEnStandardNo">-->
|
||||
<!-- <a-input class="box-input"-->
|
||||
<!-- v-model="formInline.newEnStandardNo"-->
|
||||
<!-- :maxLength="50"-->
|
||||
<!-- disabled-->
|
||||
<!-- :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!--</div>-->
|
||||
<!-- 新企标名称 -->
|
||||
<div class="box-title-text form-flex-item-half">
|
||||
<div class="title-text">
|
||||
@@ -212,9 +214,9 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="newEnterpriseStandardName">
|
||||
<a-form-model-item class="item-model" prop="newEnStandardName">
|
||||
<a-input class="box-input"
|
||||
v-model="formInline.newEnterpriseStandardName"
|
||||
v-model="formInline.newEnStandardName"
|
||||
:maxLength="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName')" />
|
||||
@@ -228,9 +230,9 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="standardEnglishName">
|
||||
<a-form-model-item class="item-model" prop="enStandardEnglishName">
|
||||
<a-input class="box-input"
|
||||
v-model="formInline.standardEnglishName"
|
||||
v-model="formInline.enStandardEnglishName"
|
||||
:maxLength="50"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" />
|
||||
@@ -244,9 +246,9 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.standardSystem') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="standardSystem">
|
||||
<a-form-model-item class="item-model" prop="enStandardSystem">
|
||||
<a-tree-select
|
||||
v-model="formInline.standardSystem"
|
||||
v-model="formInline.enStandardSystem"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
style="width: 100%"
|
||||
:tree-data="standardSystemOptions"
|
||||
@@ -283,9 +285,9 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.standardGradeClassification') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="standardGradeClassification">
|
||||
<a-form-model-item class="item-model" prop="enStandardClassification">
|
||||
<j-dict-select-tag class="box-input"
|
||||
v-model="formInline.standardGradeClassification"
|
||||
v-model="formInline.enStandardClassification"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardGradeClassification')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
@@ -300,11 +302,11 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.compilationIllustration') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="compilationIllustration">
|
||||
<a-button type="primary" class="button-text" @click="clickButtonToUpload('compilationIllustration')">
|
||||
<a-form-model-item class="item-model" prop="compilationDescription">
|
||||
<a-button type="primary" class="button-text" @click="clickButtonToUpload('compilationDescription')">
|
||||
{{
|
||||
(formInline.compilationIllustration === 'null' || formInline.compilationIllustration === ''
|
||||
|| formInline.compilationIllustration === null || formInline.compilationIllustration === undefined)
|
||||
(formInline.compilationDescription === 'null' || formInline.compilationDescription === ''
|
||||
|| formInline.compilationDescription === null || formInline.compilationDescription === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
@@ -319,9 +321,9 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="draftPlanFinishDate">
|
||||
<a-form-model-item class="item-model" prop="draftPlannedCompleteDate">
|
||||
<a-date-picker
|
||||
v-model="formInline.draftPlanFinishDate"
|
||||
v-model="formInline.draftPlannedCompleteDate"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
@@ -336,9 +338,9 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="exposureDraftPlanFinishDate">
|
||||
<a-form-model-item class="item-model" prop="solicitationDraftPlanCompleteDate">
|
||||
<a-date-picker
|
||||
v-model="formInline.exposureDraftPlanFinishDate"
|
||||
v-model="formInline.solicitationDraftPlanCompleteDate"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
@@ -353,9 +355,9 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.planSubmissionDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="planSubmissionDate">
|
||||
<a-form-model-item class="item-model" prop="planApprovalDate">
|
||||
<a-date-picker
|
||||
v-model="formInline.planSubmissionDate"
|
||||
v-model="formInline.planApprovalDate"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
@@ -370,12 +372,13 @@
|
||||
{{ $t('workCenter.revisionPlanActivelyReport.affiliatedWorkingGroup') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="affiliatedWorkingGroup">
|
||||
<a-form-model-item class="item-model" prop="workGroup">
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="formInline.affiliatedWorkingGroup"
|
||||
v-model="formInline.workGroup"
|
||||
:maxTagCount="1"
|
||||
:show-search="true"
|
||||
labelInValue
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
style="width: 100%"
|
||||
:tree-data="workingGroupTreeList"
|
||||
@@ -397,8 +400,8 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.partName') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="partName">
|
||||
<a-tree-select v-model="formInline.partName"
|
||||
<a-form-model-item class="item-model" prop="componentName">
|
||||
<a-tree-select v-model="formInline.componentName"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
style="width: 100%"
|
||||
:tree-data="partNameOptions"
|
||||
@@ -415,9 +418,10 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="authorizationDepart">
|
||||
<j-select-depart v-model="formInline.authorizationDepart"
|
||||
<a-form-model-item class="item-model" prop="authDept">
|
||||
<j-select-depart v-model="formInline.authDept"
|
||||
:disabled="disabled"
|
||||
@back="authDeptBack"
|
||||
:backDepart="true" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -429,12 +433,12 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.principalDrafter') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="principalDrafter">
|
||||
<a-form-model-item class="item-model" prop="mainDraftingUser">
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.principalDrafter')"
|
||||
v-model="formInline.principalDrafter"
|
||||
filedName="principalDrafter"
|
||||
v-model="formInline.mainDraftingUser"
|
||||
filedName="mainDraftingUser"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.principalDrafter_dictText"
|
||||
:nameStr="formInline.mainDraftingUser_dictText"
|
||||
:disabled="disabled"
|
||||
type="radio" />
|
||||
</a-form-model-item>
|
||||
@@ -447,9 +451,10 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.mainDraftUnit') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="mainDraftUnit">
|
||||
<j-select-depart v-model="formInline.mainDraftUnit"
|
||||
<a-form-model-item class="item-model" prop="mainDraftingUnit">
|
||||
<j-select-depart v-model="formInline.mainDraftingUnit"
|
||||
:disabled="disabled"
|
||||
@back="mainDraftingUnitBack"
|
||||
:backDepart="true" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -461,12 +466,12 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="headOfMainDraftingUnit">
|
||||
<a-form-model-item class="item-model" prop="mainDraftingUnitResponsiblePerson">
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit')"
|
||||
v-model="formInline.headOfMainDraftingUnit"
|
||||
filedName="headOfMainDraftingUnit"
|
||||
v-model="formInline.mainDraftingUnitResponsiblePerson"
|
||||
filedName="mainDraftingUnitResponsiblePerson"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.headOfMainDraftingUnit_dictText"
|
||||
:nameStr="formInline.mainDraftingUnitResponsiblePerson_dictText"
|
||||
:disabled="disabled"
|
||||
type="radio" />
|
||||
</a-form-model-item>
|
||||
@@ -479,12 +484,12 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.standardPusher') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="standardPusher">
|
||||
<a-form-model-item class="item-model" prop="standardPromoter">
|
||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardPusher')"
|
||||
v-model="formInline.standardPusher"
|
||||
filedName="standardPusher"
|
||||
v-model="formInline.standardPromoter"
|
||||
filedName="standardPromoter"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.standardPusher_dictText"
|
||||
:nameStr="formInline.standardPromoter_dictText"
|
||||
:disabled="disabled"
|
||||
type="radio" />
|
||||
</a-form-model-item>
|
||||
@@ -504,7 +509,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { StandardSource } from '@/enums/commonEnums'
|
||||
import { StandardSource, ProjectType } from '@/enums/commonEnums'
|
||||
import { getWorkGroupTreeList, getFormDictTreeList } from '@/api/api'
|
||||
import UserSelection from '@/components/selection/UserSelection'
|
||||
import StandardSelection from '@/components/selection/StandardSelection'
|
||||
@@ -512,6 +517,7 @@ import UploadFile from '@/components/UploadFile'
|
||||
import { getTreeList } from '@/api/enterpriseStandardLibraryApi'
|
||||
import Vue from 'vue'
|
||||
import { USER_INFO } from '@/store/mutation-types'
|
||||
import { getEnStandardNo } from '@/api/workCenter'
|
||||
|
||||
export default {
|
||||
name: 'ContactEnterSendTaskModal',
|
||||
@@ -519,6 +525,7 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
StandardSource,
|
||||
ProjectType,
|
||||
workingGroupTreeList: [], // 隶属工作组下拉框数据
|
||||
partNameOptions: [], // 零部件名称下拉框数据
|
||||
standardSystemOptions: [], // 企标体系下拉框数据
|
||||
@@ -537,15 +544,23 @@ export default {
|
||||
}
|
||||
],
|
||||
// 项目类别
|
||||
itemCategory: [
|
||||
projectType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.itemCategory') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 企标编号
|
||||
enterpriseStandardNum: [
|
||||
// 企标编号-新企标编号(制定-企标编号,修订新企标编号)
|
||||
newEnStandardNo: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 企标编号-原企标编号(修订-企标编号)
|
||||
originEnStandardNo: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
|
||||
@@ -553,7 +568,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 企业标准代号
|
||||
enterpriseStandardCode: [
|
||||
enStandardCode: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode') + this.$t('cannotEmpty'),
|
||||
@@ -568,8 +583,8 @@ export default {
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 企标名称
|
||||
enterpriseStandardName: [
|
||||
// 企标名称-新企标名称(制定-企标名称,修订-新企标名称)
|
||||
newEnStandardName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + this.$t('cannotEmpty'),
|
||||
@@ -577,7 +592,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 企业名称代号
|
||||
enterpriseNameCode: [
|
||||
enNameCode: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode') + this.$t('cannotEmpty'),
|
||||
@@ -585,7 +600,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 年代号
|
||||
yearNumber: [
|
||||
decadeCode: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.yearNumber') + this.$t('cannotEmpty'),
|
||||
@@ -609,7 +624,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 标准体系
|
||||
standardSystem: [
|
||||
enStandardSystem: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.standardSystem') + this.$t('cannotEmpty'),
|
||||
@@ -617,7 +632,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 标准等级分类
|
||||
standardGradeClassification: [
|
||||
enStandardClassification: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.standardGradeClassification') + this.$t('cannotEmpty'),
|
||||
@@ -625,7 +640,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 草稿计划完成日期
|
||||
draftPlanFinishDate: [
|
||||
draftPlannedCompleteDate: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate') + this.$t('cannotEmpty'),
|
||||
@@ -633,7 +648,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 征求意见稿计划完成日期
|
||||
exposureDraftPlanFinishDate: [
|
||||
solicitationDraftPlanCompleteDate: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate') + this.$t('cannotEmpty'),
|
||||
@@ -641,7 +656,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 计划报批日期
|
||||
planSubmissionDate: [
|
||||
planApprovalDate: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.planSubmissionDate') + this.$t('cannotEmpty'),
|
||||
@@ -649,7 +664,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 隶属工作组
|
||||
affiliatedWorkingGroup: [
|
||||
workGroup: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.revisionPlanActivelyReport.affiliatedWorkingGroup') + this.$t('cannotEmpty'),
|
||||
@@ -657,7 +672,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 零部件名称
|
||||
partName: [
|
||||
componentName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.partName') + this.$t('cannotEmpty'),
|
||||
@@ -665,7 +680,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 授权部门
|
||||
authorizationDepart: [
|
||||
authDept: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.authorizationDepart') + this.$t('cannotEmpty'),
|
||||
@@ -673,7 +688,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 主起草人
|
||||
principalDrafter: [
|
||||
mainDraftingUser: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.principalDrafter') + this.$t('cannotEmpty'),
|
||||
@@ -681,7 +696,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 主起草单位
|
||||
mainDraftUnit: [
|
||||
mainDraftingUnit: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit') + this.$t('cannotEmpty'),
|
||||
@@ -689,7 +704,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 起草单位负责人
|
||||
headOfMainDraftingUnit: [
|
||||
mainDraftingUnitResponsiblePerson: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit') + this.$t('cannotEmpty'),
|
||||
@@ -697,7 +712,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 标准推进人
|
||||
standardPusher: [
|
||||
standardPromoter: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enterpriseInitChangePlan.standardPusher') + this.$t('cannotEmpty'),
|
||||
@@ -712,6 +727,20 @@ export default {
|
||||
return new Date().getFullYear() + ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 企业标准代号
|
||||
'formInline.enStandardCode' (value) {
|
||||
this.getEnStandardNo()
|
||||
},
|
||||
// 企业名称代号
|
||||
'formInline.enNameCode' (value) {
|
||||
this.getEnStandardNo()
|
||||
},
|
||||
// 标准类别代号
|
||||
'formInline.standardCategoryCode' (value) {
|
||||
this.getEnStandardNo()
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getWorkGroupTree()
|
||||
this.initPartNameOptions()
|
||||
@@ -722,19 +751,21 @@ export default {
|
||||
const userInfo = Vue.ls.get(USER_INFO)
|
||||
const formInline = {}
|
||||
// 初始化主起草人信息
|
||||
formInline.principalDrafter = userInfo.id
|
||||
formInline.principalDrafter_dictText = userInfo.realname
|
||||
// 初始化主起草单位信息
|
||||
formInline.mainDraftUnit = userInfo.departIds
|
||||
formInline.mainDraftingUser = userInfo.id
|
||||
formInline.mainDraftingUser_dictText = userInfo.realname
|
||||
// 初始化主起草单位信息,需要翻译当前登录用户的部门,因为表格回显
|
||||
formInline.mainDraftingUnit = userInfo.departIds
|
||||
formInline.mainDraftingUnit_dictText = userInfo.departIds_dictText
|
||||
// 初始化起草单位负责人 todo: 看怎么获取当前登录人的上级
|
||||
// 初始化年代号
|
||||
formInline.yearNumber = new Date().getFullYear() + ''
|
||||
formInline.decadeCode = new Date().getFullYear() + ''
|
||||
this.edit(formInline)
|
||||
},
|
||||
edit (record) {
|
||||
this.visible = true
|
||||
this.model = Object.assign({}, record)
|
||||
this.formInline = Object.assign({}, record)
|
||||
this.formInline.workGroup = { value: this.formInline.workGroup, label: this.formInline.workGroup_dictText }
|
||||
},
|
||||
look (record) {
|
||||
this.visible = true
|
||||
@@ -742,6 +773,40 @@ export default {
|
||||
this.formInline = Object.assign({}, record)
|
||||
this.disabled = true
|
||||
},
|
||||
// watch监视年代号会滞后
|
||||
decadeCodeChange (value) {
|
||||
this.getEnStandardNo()
|
||||
},
|
||||
// 根据三个代号和一个年代号获取企标编号
|
||||
getEnStandardNo () {
|
||||
// 如果是制定根据填的三个代号和一个年代号获取
|
||||
if (this.formInline.projectType === ProjectType.ENACT.value) {
|
||||
if (!this.formInline.enStandardCode || !this.formInline.enNameCode ||
|
||||
!this.formInline.standardCategoryCode || !this.formInline.decadeCode) {
|
||||
return
|
||||
}
|
||||
const param = {}
|
||||
param.enStandardCode = this.formInline.enStandardCode
|
||||
param.enNameCode = this.formInline.enNameCode
|
||||
param.standardCategoryCode = this.formInline.standardCategoryCode
|
||||
param.decadeCode = this.formInline.decadeCode
|
||||
getEnStandardNo(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$set(this.formInline, 'newEnStandardNo', res.message)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// 是修订,通过选中的企标编号和年代号拼接新企标编号
|
||||
if (this.formInline.originEnStandardNo && this.formInline.decadeCode) {
|
||||
const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode
|
||||
this.$set(this.formInline, 'newEnStandardNo', standardNo)
|
||||
this.$forceUpdate()
|
||||
// 返回流程名称
|
||||
this.returnProcessName()
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取零部件名称下拉框数据
|
||||
initPartNameOptions () {
|
||||
getFormDictTreeList({ dictId: '1696821512600637441' }).then(res => {
|
||||
@@ -777,19 +842,22 @@ export default {
|
||||
return item
|
||||
})
|
||||
},
|
||||
// 授权部门返回参数
|
||||
authDeptBack (value) {
|
||||
this.formInline.authDept_dictText = value.map(item => item.text).join(',')
|
||||
},
|
||||
// 主起草单位返回参数
|
||||
mainDraftingUnitBack (value) {
|
||||
this.formInline.mainDraftingUnit_dictText = value.map(item => item.text).join(',')
|
||||
},
|
||||
// 标准选择组件返回标准名称的回调
|
||||
nameChange (value) {
|
||||
this.formInline.enterpriseStandardName = value
|
||||
this.formInline.originEnStandardName = value
|
||||
},
|
||||
// 项目类别改变
|
||||
itemCategoryChange (value) {
|
||||
projectTypeChange (value) {
|
||||
console.log(value)
|
||||
if (value === 1) {
|
||||
this.rules.enterpriseStandardName[0].required = true
|
||||
} else {
|
||||
this.rules.enterpriseStandardName[0].required = false
|
||||
}
|
||||
this.formInline.yesrNumber = new Date().getFullYear() + ''
|
||||
this.formInline.decadeCode = new Date().getFullYear() + ''
|
||||
},
|
||||
// 选择用户得到用户名
|
||||
userSelectNameChange (value, fieldName) {
|
||||
@@ -829,6 +897,30 @@ export default {
|
||||
if (valid) {
|
||||
this.confirmLoading = true
|
||||
const formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
if (formInline.projectType) {
|
||||
// 翻译项目类别
|
||||
formInline.projectType_dictText = formInline.projectType === 1 ? ProjectType.ENACT.text : ProjectType.MODIFY.text
|
||||
// 设置变更状态
|
||||
if (formInline.projectType === 1) {
|
||||
// 是制定,变更状态是新增
|
||||
formInline.changeStatus_dictText = '新增'
|
||||
} else {
|
||||
// 是修订,变更状态是变更
|
||||
formInline.changeStatus_dictText = '变更'
|
||||
}
|
||||
}
|
||||
// 翻译隶属工作组
|
||||
if (formInline.workGroup) {
|
||||
formInline.workGroup_dictText = formInline.workGroup.label
|
||||
formInline.workGroup = formInline.workGroup.value
|
||||
}
|
||||
// 翻译企业标准代号
|
||||
if (formInline.enStandardCode) {
|
||||
formInline.enStandardCode_dictText = this.$refs.enStandardCodeRef.dictOptions.find(item => item.value === formInline.enStandardCode).text
|
||||
}
|
||||
// 配合单位弹框中没有该字段,是否要加??
|
||||
// 主起草单位的回显需要在登录信息中有当前登录人部门的翻译 ??
|
||||
console.log(formInline)
|
||||
this.$emit('ok', formInline)
|
||||
this.close()
|
||||
this.confirmLoading = false
|
||||
|
||||
Reference in New Issue
Block a user