774 lines
34 KiB
Vue
774 lines
34 KiB
Vue
<template>
|
|
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
|
<!-- 合并标准信息 -->
|
|
<div class="collapsible-panel-form">
|
|
<div class="collapsible-panel-form-header">
|
|
<span>{{ $t('mergeStandardInformation') }}</span>
|
|
<div class="retractable-btn" @click="handleChangeRetractable('baseInfo')">
|
|
<a-icon type="double-right" :class="retractableFlag.baseInfo ? 'pack-up-btn' : 'unfold-btn'" />
|
|
{{ retractableFlag.baseInfo ? $t('putAway') : $t('open') }}
|
|
</div>
|
|
</div>
|
|
<div class="form-flex-box collapsible-panel-form-content" v-show="retractableFlag.baseInfo">
|
|
<!-- 企标编号1 -->
|
|
<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') + '1'">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '1' }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="standardIdOne">
|
|
<enterprise-plan-selection type="radio"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')"
|
|
v-model="formInline.standardIdOne"
|
|
:standard-number="formInline.standardNoOne"
|
|
:disabled="disabled"
|
|
:searchParam="{ projectType: projectType }"
|
|
@standardNumberChange="standardNumberChangeOne"
|
|
@listChange="listChangeOne"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 企标名称1 -->
|
|
<div class="box-title-text form-flex-item">
|
|
<div class="title-text">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + '1'">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + '1' }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="standardNameOne">
|
|
<a-input class="box-input"
|
|
disabled
|
|
v-model="formInline.standardNameOne"
|
|
:maxLength="50"
|
|
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 制修订类型1 -->
|
|
<div class="box-title-text form-flex-item">
|
|
<div class="title-text">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '1'">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '1' }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="projectTypeOne">
|
|
<a-select v-model="formInline.projectTypeOne"
|
|
disabled
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.typeOfRevision')">
|
|
<a-select-option :value="ApplicationCategory.INITIATION.value">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>
|
|
<a-select-option :value="ApplicationCategory.CHANGE.value">{{ $t('workCenter.enterpriseInitChangePlan.change') }}</a-select-option>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 企标编号2 -->
|
|
<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') + '2'">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '2' }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="standardIdTwo">
|
|
<enterprise-plan-selection type="radio"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')"
|
|
v-model="formInline.standardIdTwo"
|
|
:disabled="disabled"
|
|
:standard-number="formInline.standardNoTwo"
|
|
:searchParam="{ projectType: projectType }"
|
|
@standardNumberChange="standardNumberChangeTwo"
|
|
@listChange="listChangeTwo"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 企标名称2 -->
|
|
<div class="box-title-text form-flex-item">
|
|
<div class="title-text">
|
|
<span class="title-text-text"
|
|
:title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + '2'">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + '2' }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="standardNameTwo">
|
|
<a-input class="box-input"
|
|
disabled
|
|
v-model="formInline.standardNameTwo"
|
|
:maxLength="50"
|
|
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 制修订类型2 -->
|
|
<div class="box-title-text form-flex-item">
|
|
<div class="title-text">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '2'">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '2' }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="projectTypeTwo">
|
|
<a-select v-model="formInline.projectTypeTwo"
|
|
disabled
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.typeOfRevision')">
|
|
<a-select-option :value="ApplicationCategory.INITIATION.value">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>
|
|
<a-select-option :value="ApplicationCategory.CHANGE.value">{{ $t('workCenter.enterpriseInitChangePlan.change') }}</a-select-option>
|
|
</a-select>
|
|
</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.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"
|
|
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 新企标名称 -->
|
|
<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.newEnterpriseStandardName')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="newEnStandardName">
|
|
<a-input class="box-input"
|
|
v-model="formInline.newEnStandardName"
|
|
:maxLength="50"
|
|
:disabled="disabled"
|
|
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName')" />
|
|
</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.standardEnglishName')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="enStandardEnglishName">
|
|
<a-input class="box-input"
|
|
v-model="formInline.enStandardEnglishName"
|
|
:maxLength="50"
|
|
:disabled="disabled"
|
|
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 标准体系 -->
|
|
<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.standardSystem')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.standardSystem') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="enStandardSystem">
|
|
<a-tree-select
|
|
v-model="formInline.enStandardSystem"
|
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
|
style="width: 100%"
|
|
:tree-data="standardSystemOptions"
|
|
tree-checkable
|
|
treeCheckStrictly
|
|
:disabled="disabled"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardSystem')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 企业标准代号 -->
|
|
<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.enterpriseStandardCode')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="enStandardCode">
|
|
<j-dict-select-tag class="box-input"
|
|
v-model="formInline.enStandardCode"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode')"
|
|
:type="'select'"
|
|
:triggerChange="false"
|
|
:disabled="disabled"
|
|
dictCode="enterprise_standard_code" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 企业名称代号 -->
|
|
<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.enterpriseNameCode')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseNameCode') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="enNameCode">
|
|
<j-dict-select-tag class="box-input"
|
|
v-model="formInline.enNameCode"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode')"
|
|
:type="'select'"
|
|
:triggerChange="false"
|
|
:disabled="disabled"
|
|
dictCode="enterprise_name_code" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 标准类别代号 -->
|
|
<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.standardCategoryCode')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.standardCategoryCode') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="standardCategoryCode">
|
|
<j-dict-select-tag class="box-input"
|
|
v-model="formInline.standardCategoryCode"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardCategoryCode')"
|
|
:type="'select'"
|
|
:triggerChange="false"
|
|
:disabled="disabled"
|
|
dictCode="standard_category_code" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 年代号 -->
|
|
<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.yearNumber')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.yearNumber') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="decadeCode">
|
|
<j-date show-type="year"
|
|
v-model="formInline.decadeCode"
|
|
date-format="YYYY"
|
|
:disabled="disabled"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
|
|
</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.compilationIllustration')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.compilationIllustration') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="compilationDescription">
|
|
<a-button type="primary" class="button-text" @click="clickButtonToUpload('compilationDescription')">
|
|
{{
|
|
(formInline.compilationDescription === 'null' || formInline.compilationDescription === ''
|
|
|| formInline.compilationDescription === null || formInline.compilationDescription === undefined)
|
|
? $t('uploadFile.clickUpload')
|
|
: $t('uploadFile.viewUploadedFiles')
|
|
}}
|
|
</a-button>
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 标准等级分类 -->
|
|
<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.standardGradeClassification')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.standardGradeClassification') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="enStandardClassification">
|
|
<j-dict-select-tag class="box-input"
|
|
:disabled="disabled"
|
|
v-model="formInline.enStandardClassification"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardGradeClassification')"
|
|
:type="'select'"
|
|
:triggerChange="false"
|
|
dictCode="standard_grade_classify" />
|
|
</a-form-model-item>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 完成日期部分 -->
|
|
<div class="collapsible-panel-form">
|
|
<div class="collapsible-panel-form-header">
|
|
<span>{{ $t('finishDate') }}</span>
|
|
<div class="retractable-btn" @click="handleChangeRetractable('finishDate')">
|
|
<a-icon type="double-right" :class="retractableFlag.finishDate ? 'pack-up-btn' : 'unfold-btn'" />
|
|
{{ retractableFlag.finishDate ? $t('putAway') : $t('open') }}
|
|
</div>
|
|
</div>
|
|
<div class="form-flex-box collapsible-panel-form-content" v-show="retractableFlag.finishDate">
|
|
<!-- 草稿计划完成日期 -->
|
|
<div class="box-title-text form-flex-item">
|
|
<div class="title-text title-text-long">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="draftPlannedCompleteDate">
|
|
<a-date-picker
|
|
v-model="formInline.draftPlannedCompleteDate"
|
|
:showTime="false"
|
|
:disabled="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 title-text-long">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="solicitationDraftPlanCompleteDate">
|
|
<a-date-picker
|
|
v-model="formInline.solicitationDraftPlanCompleteDate"
|
|
:showTime="false"
|
|
:disabled="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 title-text-long">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.planSubmissionDate')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.planSubmissionDate') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="planApprovalDate">
|
|
<a-date-picker
|
|
v-model="formInline.planApprovalDate"
|
|
:showTime="false"
|
|
:disabled="disabled"
|
|
value-format="YYYY-MM-DD">
|
|
</a-date-picker>
|
|
</a-form-model-item>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 适用范围部分 -->
|
|
<div class="collapsible-panel-form">
|
|
<div class="collapsible-panel-form-header">
|
|
<span>{{ $t('rangeOfApplication') }}</span>
|
|
<div class="retractable-btn" @click="handleChangeRetractable('rangeOfApplication')">
|
|
<a-icon type="double-right" :class="retractableFlag.rangeOfApplication ? 'pack-up-btn' : 'unfold-btn'" />
|
|
{{ retractableFlag.rangeOfApplication ? $t('putAway') : $t('open') }}
|
|
</div>
|
|
</div>
|
|
<div class="form-flex-box collapsible-panel-form-content" v-show="retractableFlag.rangeOfApplication">
|
|
<!-- 零部件名称 -->
|
|
<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.partName')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.partName') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="componentName">
|
|
<a-tree-select v-model="formInline.componentName"
|
|
:disabled="disabled"
|
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
|
style="width: 100%"
|
|
:tree-data="partNameOptions"
|
|
:label-in-value="false"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.partName')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 主起草人 -->
|
|
<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.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>
|
|
<!-- 主起草单位 -->
|
|
<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.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>
|
|
<!-- 起草单位负责人 -->
|
|
<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.headOfMainDraftingUnit')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="mainDraftingUnitResponsiblePerson">
|
|
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit')"
|
|
v-model="formInline.mainDraftingUnitResponsiblePerson"
|
|
:disabled="disabled"
|
|
filedName="mainDraftingUnitResponsiblePerson"
|
|
@nameChange="userSelectNameChange"
|
|
:nameStr="formInline.mainDraftingUnitResponsiblePerson_dictText"
|
|
type="radio" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 变更原因 -->
|
|
<div class="box-title-text form-flex-item form-flex-item-long">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.changeReason')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.changeReason') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="changeReason">
|
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.changeReason')"
|
|
:maxLength="500"
|
|
:disabled="disabled"
|
|
v-model="formInline.changeReason" :rows="4" />
|
|
</a-form-model-item>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
|
|
</a-form-model>
|
|
</template>
|
|
|
|
<script>
|
|
import EnterprisePlanSelection from '@/components/selection/EnterprisePlanSelection'
|
|
import UserSelection from '@/components/selection/UserSelection'
|
|
import UploadFile from '@/components/UploadFile'
|
|
import { getTreeList } from '@/api/enterpriseStandardLibraryApi'
|
|
import { ApplicationCategory } from '@/enums/commonEnums'
|
|
import { getFormDictTreeList } from '@/api/api'
|
|
|
|
export default {
|
|
name: 'MergeBaseInfo',
|
|
components: { EnterprisePlanSelection, UserSelection, UploadFile },
|
|
props: {
|
|
disabled: {
|
|
type: Boolean,
|
|
required: false,
|
|
default: false
|
|
},
|
|
projectType: {
|
|
type: [Number, String],
|
|
required: false,
|
|
default: 1
|
|
}
|
|
},
|
|
watch: {
|
|
// 企标编号,企标编号修改流程名称需要自动更改
|
|
'formInline.newEnStandardNo' (value) {
|
|
this.returnProcessName()
|
|
},
|
|
// 企标名称,企标名称修改流程名称需要自动更改
|
|
'formInline.newEnStandardName' (value) {
|
|
this.returnProcessName()
|
|
}
|
|
},
|
|
data () {
|
|
return {
|
|
ApplicationCategory,
|
|
standardSystemOptions: [], // 标准体系下拉数据
|
|
partNameOptions: [], // 零部件名称下拉框数据
|
|
formInline: {},
|
|
// 各模块的收齐和展开状态
|
|
retractableFlag: {
|
|
baseInfo: true, // 基础信息部分
|
|
finishDate: true, // 完成日期部分
|
|
rangeOfApplication: true // 适用范围部分
|
|
},
|
|
rules: {
|
|
// 企标计划id1
|
|
standardIdOne: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '1' + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 企标计划id2
|
|
standardIdTwo: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '1' + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 新企标名称
|
|
newEnStandardName: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName') + this.$t('cannotEmpty'),
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
// 标准体系
|
|
enStandardSystem: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.standardSystem') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 企业标准代号
|
|
enStandardCode: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 企业名称代号
|
|
enNameCode: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 标准类别代号
|
|
standardCategoryCode: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.standardCategoryCode') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 年代号
|
|
decadeCode: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.yearNumber') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 标准等级分类
|
|
enStandardClassification: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.standardGradeClassification') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 草稿计划完成日期
|
|
draftPlannedCompleteDate: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate') + this.$t('cannotEmpty'),
|
|
trigger: ['change', 'blur']
|
|
}
|
|
],
|
|
// 征求意见稿计划完成日期
|
|
solicitationDraftPlanCompleteDate: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate') + this.$t('cannotEmpty'),
|
|
trigger: ['change', 'blur']
|
|
}
|
|
],
|
|
// 计划报批日期
|
|
planApprovalDate: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.planSubmissionDate') + this.$t('cannotEmpty'),
|
|
trigger: ['change', 'blur']
|
|
}
|
|
],
|
|
// 零部件名称
|
|
componentName: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.partName') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 主起草人
|
|
mainDraftingUser: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.principalDrafter') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 主起草单位
|
|
mainDraftingUnit: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 起草单位负责人
|
|
mainDraftingUnitResponsiblePerson: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 变更原因
|
|
changeReason: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.changeReason') + this.$t('cannotEmpty'),
|
|
trigger: 'blur'
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
mounted () {
|
|
// 获取标准体系下拉框数据
|
|
this.initStandardSystemOptions()
|
|
// 获取零部件名称下拉框数据
|
|
this.initPartNameOptions()
|
|
},
|
|
methods: {
|
|
// 返回流程名称
|
|
returnProcessName () {
|
|
const processName = (this.formInline.newEnStandardNo || '') + '-' + (this.formInline.newEnStandardName || '') + '-' + '立项'
|
|
console.log(processName)
|
|
this.$emit('processNameChange', processName)
|
|
},
|
|
// 获取标准体系下拉框数据
|
|
initStandardSystemOptions () {
|
|
getTreeList({ option: 1 }).then(res => {
|
|
if (res.success) {
|
|
this.standardSystemOptions = res.result
|
|
}
|
|
})
|
|
},
|
|
// 获取零部件名称下拉框数据
|
|
initPartNameOptions () {
|
|
getFormDictTreeList({ dictId: '1696821512600637441' }).then(res => {
|
|
if (res.success) {
|
|
this.partNameOptions = res.result
|
|
}
|
|
})
|
|
},
|
|
// 改变内容区域收起和展开
|
|
handleChangeRetractable (module) {
|
|
this.$set(this.retractableFlag, module, !this.retractableFlag[module])
|
|
this.$forceUpdate()
|
|
},
|
|
// 企标计划1选择完成的企标编号回调
|
|
standardNumberChangeOne (value) {
|
|
this.formInline.standardNoOne = value
|
|
},
|
|
// 企标计划2选择完成的企标编号的回调
|
|
standardNumberChangeTwo (value) {
|
|
this.formInline.standardNoTwo = value
|
|
},
|
|
// 企标选编号1选择完成的回调
|
|
listChangeOne (value) {
|
|
console.log(value)
|
|
if (value && value.length > 0) {
|
|
const formInline = {}
|
|
// 企标名称1
|
|
formInline.standardNameOne = value[0].originEnStandardName || ''
|
|
// 制修订类型1
|
|
formInline.projectTypeOne = value[0].applicationCategory || undefined
|
|
// 新企标名称
|
|
formInline.newEnStandardName = value[0].originEnStandardName || ''
|
|
// 标准英文名称
|
|
formInline.enStandardEnglishName = value[0].enStandardEnglishName || ''
|
|
// 标准体系
|
|
formInline.enStandardSystem = value[0].enStandardSystem ? value[0].enStandardSystem.split(',').map(item => { return { value: item } }) : []
|
|
// 企业标准代号
|
|
formInline.enStandardCode = value[0].enStandardCode || undefined
|
|
// 企业名称代号
|
|
formInline.enNameCode = value[0].enNameCode || undefined
|
|
// 标准类别代号
|
|
formInline.standardCategoryCode = value[0].standardCategoryCode || undefined
|
|
// 年代号
|
|
formInline.decadeCode = value[0].decadeCode || undefined
|
|
// 编制说明
|
|
formInline.compilationDescription = value[0].compilationDescription || undefined
|
|
// 标准等级分类
|
|
formInline.enStandardClassification = value[0].enStandardClassification || undefined
|
|
// 草稿计划完成日期
|
|
formInline.draftPlannedCompleteDate = value[0].draftPlannedCompleteDate || undefined
|
|
// 征求意见稿计划完成日期
|
|
formInline.solicitationDraftPlanCompleteDate = value[0].solicitationDraftPlanCompleteDate || undefined
|
|
// 计划报批日期
|
|
formInline.planApprovalDate = value[0].planApprovalDate || undefined
|
|
// 零部件名称
|
|
formInline.componentName = value[0].componentName || undefined
|
|
// 主起草人
|
|
formInline.mainDraftingUser = value[0].mainDraftingUser || undefined
|
|
formInline.mainDraftingUser_dictText = value[0].mainDraftingUser_dictText || undefined
|
|
// 主起草单位
|
|
formInline.mainDraftingUnit = value[0].mainDraftingUnit || undefined
|
|
// 起草单位负责人
|
|
formInline.mainDraftingUnitResponsiblePerson = value[0].mainDraftingUnitResponsiblePerson || undefined
|
|
formInline.mainDraftingUnitResponsiblePerson_dictText = value[0].mainDraftingUnitResponsiblePerson_dictText || undefined
|
|
this.formInline = Object.assign({}, this.formInline, formInline)
|
|
this.$forceUpdate()
|
|
this.returnProcessName()
|
|
}
|
|
},
|
|
// 企标选编号2选择完成的回调
|
|
listChangeTwo (value) {
|
|
console.log(value)
|
|
if (value && value.length > 0) {
|
|
const formInline = {}
|
|
// 企标名称2
|
|
formInline.standardNameTwo = value[0].originEnStandardName
|
|
// 制修订类型2
|
|
formInline.projectTypeTwo = value[0].applicationCategory
|
|
this.formInline = Object.assign(this.formInline, formInline)
|
|
this.$forceUpdate()
|
|
}
|
|
},
|
|
// 选择用户得到用户名
|
|
userSelectNameChange (value, fieldName) {
|
|
this.formInline[fieldName + '_dictText'] = value
|
|
},
|
|
// 文件上传改变后的回调
|
|
uploadFileChange (data) {
|
|
const attIdList = []
|
|
if (data && data.length > 0) {
|
|
data.map(item => {
|
|
attIdList.push(item.id)
|
|
})
|
|
}
|
|
/** 赋值给当前对应的表单文件 */
|
|
this.formInline[this.uploadName] = attIdList.join(',')
|
|
this.formInline = { ...this.formInline }
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
@import '~@assets/less/common.less';
|
|
|
|
/deep/ .ant-form-item-children {
|
|
width: 100%;
|
|
display: inline-block;
|
|
}
|
|
|
|
.form-flex-item-long {
|
|
width: 100%;
|
|
}
|
|
|
|
.title-text-long {
|
|
width: 220px !important;
|
|
}
|
|
</style>
|