1200 lines
54 KiB
Vue
1200 lines
54 KiB
Vue
<template>
|
|
<a-spin :spinning="loading">
|
|
<a-form-model :model="formInline" v-if="isFormInline" class="form-add" :rules="rules" ref="ruleForm">
|
|
<!-- 基础信息部分 -->
|
|
<div class="collapsible-panel-form">
|
|
<div class="collapsible-panel-form-header">
|
|
<!-- 基础信息 -->
|
|
<span>{{ $t('basicInformation') }}</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">
|
|
<!-- 标准立项-制定 -->
|
|
<template v-if="projectType && projectType === ProjectType.ENACT.value">
|
|
<!-- 企标编号 -->
|
|
<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="newEnStandardNo">
|
|
<a-input class="box-input"
|
|
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">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="newEnStandardName">
|
|
<a-input class="box-input"
|
|
v-model="formInline.newEnStandardName"
|
|
:disabled="disabled"
|
|
:maxLength="200"
|
|
@blur="newEnStandardNameBlur"
|
|
: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="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"
|
|
:disabled="disabled"
|
|
v-model="formInline.enStandardCode"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode')"
|
|
:type="'select'"
|
|
:triggerChange="false"
|
|
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"
|
|
:disabled="disabled"
|
|
v-model="formInline.enNameCode"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode')"
|
|
:type="'select'"
|
|
:triggerChange="false"
|
|
:options="enNameCodeOption" />
|
|
</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"
|
|
:disabled="disabled"
|
|
v-model="formInline.standardCategoryCode"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardCategoryCode')"
|
|
:type="'select'"
|
|
:triggerChange="false"
|
|
dictCode="standard_category_code" />
|
|
</a-form-model-item>
|
|
</div>
|
|
</template>
|
|
<!-- 标准立项-修订 -->
|
|
<template v-else-if="projectType && projectType === ProjectType.MODIFY.value">
|
|
<!-- 企标编号 -->
|
|
<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="originEnStandardNo">
|
|
<standard-selection :source="StandardSource.ENTERPRISE.value"
|
|
:placeholder="$t('pleaseSelect') + $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')"
|
|
:disabled="disabled"
|
|
:disabledSourceSearch="true"
|
|
type="radio"
|
|
:selectOnly="true"
|
|
v-model="formInline.originEnStandardNo"
|
|
@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>
|
|
<a-form-model-item class="item-model" prop="originEnStandardName">
|
|
<a-input class="box-input"
|
|
v-model="formInline.originEnStandardName"
|
|
:maxLength="200"
|
|
disabled
|
|
: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="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">
|
|
<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"
|
|
:disabled="disabled"
|
|
v-model="formInline.newEnStandardName"
|
|
:maxLength="200"
|
|
@blur="newEnStandardNameBlur"
|
|
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
</template>
|
|
<!-- 年代号 -->
|
|
<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"
|
|
:disabled="disabled"
|
|
v-model="formInline.decadeCode"
|
|
date-format="YYYY"
|
|
:defaultValue="decadeCodeDefaultValue"
|
|
@change="decadeCodeChange"
|
|
: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.standardEnglishName')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="enStandardEnglishName">
|
|
<a-input class="box-input"
|
|
:disabled="disabled"
|
|
v-model="formInline.enStandardEnglishName"
|
|
:maxLength="500"
|
|
: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%"
|
|
:disabled="disabled"
|
|
:tree-data="standardSystemOptions"
|
|
tree-checkable
|
|
treeCheckStrictly
|
|
: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.standardType')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.standardType') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="standardType">
|
|
<j-dict-select-tag class="box-input"
|
|
:disabled="disabled"
|
|
v-model="formInline.standardType"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardType')"
|
|
:type="'select'"
|
|
:triggerChange="false"
|
|
dictCode="esp_standard_type" />
|
|
</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.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 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" style="width: 100%;" @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.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">
|
|
<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">
|
|
<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="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.partName')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.partName') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="componentName">
|
|
<tree-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.partName')"
|
|
v-model="formInline.componentName"
|
|
@nameChange="treeSelectNameChange"
|
|
filedName="componentName"
|
|
type="checkbox"
|
|
:nameStr="formInline.componentName_dictText"
|
|
options-href="/laws/standard/partName/"
|
|
:disabled="disabled" />
|
|
</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.authorizationDepart')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="authDept">
|
|
<j-select-depart v-model="formInline.authDept"
|
|
:disabled="disabled || authDeptDisabled"
|
|
:selectRange="authDeptSelectRange"
|
|
:multi="true"
|
|
: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.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">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardPusher')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.standardPusher') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="standardPromoter">
|
|
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardPusher')"
|
|
v-model="formInline.standardPromoter"
|
|
:disabled="disabled"
|
|
filedName="standardPromoter"
|
|
@nameChange="userSelectNameChange"
|
|
:nameStr="formInline.standardPromoter_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.suitUnit')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.suitUnit') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="cooperationUnit">
|
|
<j-select-depart v-model="formInline.cooperationUnit"
|
|
:disabled="disabled"
|
|
:multi="true"
|
|
: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.revisionPlanActivelyReport.affiliatedWorkingGroup')">
|
|
{{ $t('workCenter.revisionPlanActivelyReport.affiliatedWorkingGroup') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="workGroup">
|
|
<a-tree-select
|
|
tree-node-filter-prop="title"
|
|
v-model="formInline.workGroup"
|
|
:maxTagCount="1"
|
|
:show-search="true"
|
|
labelInValue
|
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
|
style="width: 100%"
|
|
:tree-data="workingGroupTreeList"
|
|
:disabled="disabled"
|
|
:placeholder="$t('pleaseSelect') + $t('workCenter.revisionPlanActivelyReport.affiliatedWorkingGroup')"
|
|
/>
|
|
</a-form-model-item>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 立项说明部分 -->
|
|
<div class="collapsible-panel-form">
|
|
<div class="collapsible-panel-form-header">
|
|
<!-- 立项说明 -->
|
|
<span>{{ $t('projectStatement') }}</span>
|
|
<div class="retractable-btn" @click="handleChangeRetractable('projectStatement')">
|
|
<a-icon type="double-right" :class="retractableFlag.projectStatement ? 'pack-up-btn' : 'unfold-btn'" />
|
|
{{ retractableFlag.projectStatement ? $t('putAway') : $t('open') }}
|
|
</div>
|
|
</div>
|
|
<div class="form-flex-box collapsible-panel-form-content" v-show="retractableFlag.projectStatement">
|
|
<!-- 立项/变更原因 -->
|
|
<div class="box-title-text form-flex-item form-flex-item-long">
|
|
<div class="title-text title-text-long">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.projectApprovalChangeReason')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.projectApprovalChangeReason') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="changeReason">
|
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.projectApprovalChangeReason')"
|
|
:maxLength="500"
|
|
:disabled="disabled"
|
|
v-model="formInline.changeReason" :rows="4" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 立项背景、立项依据 -->
|
|
<div class="box-title-text form-flex-item form-flex-item-long">
|
|
<div class="title-text title-text-long">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.projectBackground')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.projectBackground') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="projectBackground">
|
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.projectBackground')"
|
|
:maxLength="500"
|
|
:disabled="disabled"
|
|
v-model="formInline.projectBackground" :rows="4" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 国际、国家及行业同类标准分析 -->
|
|
<div class="box-title-text form-flex-item form-flex-item-long">
|
|
<div class="title-text title-text-long">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.homogeneousStandardAnalysis')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.homogeneousStandardAnalysis') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="similarNaStandardsAnalysis">
|
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.homogeneousStandardAnalysis')"
|
|
:maxLength="500"
|
|
:disabled="disabled"
|
|
v-model="formInline.similarNaStandardsAnalysis" :rows="4" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 企业同类标准对比分析 -->
|
|
<div class="box-title-text form-flex-item form-flex-item-long">
|
|
<div class="title-text title-text-long">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardContrastiveAnalysis')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.standardContrastiveAnalysis') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="similarEnStandardsAnalysis">
|
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardContrastiveAnalysis')"
|
|
:maxLength="500"
|
|
:disabled="disabled"
|
|
v-model="formInline.similarEnStandardsAnalysis" :rows="4" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 立项标准的领先性与必要性 -->
|
|
<div class="box-title-text form-flex-item form-flex-item-long">
|
|
<div class="title-text title-text-long">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.leadershipAndNecessity')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.leadershipAndNecessity') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="standardLeadingNecessity">
|
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.leadershipAndNecessity')"
|
|
:maxLength="500"
|
|
:disabled="disabled"
|
|
v-model="formInline.standardLeadingNecessity" :rows="4" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 立项目的及预期效果等 -->
|
|
<div class="box-title-text form-flex-item form-flex-item-long">
|
|
<div class="title-text title-text-long">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.initiatedProject')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.initiatedProject') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="projectExpectedEffects">
|
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.initiatedProject')"
|
|
:maxLength="500"
|
|
:disabled="disabled"
|
|
v-model="formInline.projectExpectedEffects" :rows="4" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 上传附件 -->
|
|
<div class="box-title-text form-flex-item form-flex-item-long">
|
|
<div class="title-text title-text-long">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.uploadAttachment')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.uploadAttachment') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="uploadAttachment">
|
|
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('uploadAttachment')">
|
|
{{
|
|
(formInline.uploadAttachment === 'null' || formInline.uploadAttachment === ''
|
|
|| formInline.uploadAttachment === null || formInline.uploadAttachment === undefined)
|
|
? $t('uploadFile.clickUpload')
|
|
: $t('uploadFile.viewUploadedFiles')
|
|
}}
|
|
</a-button>
|
|
</a-form-model-item>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 上传文件弹框 -->
|
|
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
|
|
</a-form-model>
|
|
</a-spin>
|
|
</template>
|
|
|
|
<script>
|
|
import Vue from 'vue'
|
|
import { USER_INFO } from '@/store/mutation-types'
|
|
import {
|
|
StandardSource,
|
|
ProjectType,
|
|
StandardGradeClassify,
|
|
EnterpriseNameCode,
|
|
EnterpriseStandardCode
|
|
} from '@/enums/commonEnums.js'
|
|
import StandardSelection from '@/components/selection/StandardSelection'
|
|
import UserSelection from '@/components/selection/UserSelection'
|
|
import UploadFile from '@/components/UploadFile'
|
|
import TreeSelection from '@/components/selection/TreeSelection'
|
|
import { getEnStandardNo } from '@/api/workCenter'
|
|
import {
|
|
getEnterpriseStandardInfoById,
|
|
getTreeList,
|
|
getStandardGradeClassification
|
|
} from '@/api/enterpriseStandardLibraryApi'
|
|
import { getWorkGroupTreeList, ajaxGetDictItems } from '@/api/api'
|
|
|
|
export default {
|
|
name: 'ApprovalBaseInfo',
|
|
components: { StandardSelection, UserSelection, UploadFile, TreeSelection },
|
|
props: {
|
|
projectType: {
|
|
type: [Number, String],
|
|
required: false,
|
|
default: ProjectType.ENACT.value
|
|
},
|
|
disabled: {
|
|
type: Boolean,
|
|
required: false,
|
|
default: false
|
|
},
|
|
// 是否正在初始化数据,是的话不获取企标编号
|
|
isInitData: {
|
|
type: Boolean,
|
|
required: false,
|
|
default: false
|
|
}
|
|
},
|
|
watch: {
|
|
projectType () {
|
|
this.$refs.ruleForm.resetFields()
|
|
const formInline = {}
|
|
const userInfo = Vue.ls.get(USER_INFO)
|
|
// 初始化主起草人信息
|
|
formInline.mainDraftingUser = userInfo.id
|
|
formInline.mainDraftingUser_dictText = userInfo.realname
|
|
// 初始化主起草单位信息,只有一个部门时才带入
|
|
if (userInfo.departIds && userInfo.departIds.split(',').length === 1) {
|
|
formInline.mainDraftingUnit = userInfo.departIds
|
|
}
|
|
// 重置年代号
|
|
formInline.decadeCode = new Date().getFullYear() + ''
|
|
formInline.enStandardSystem = []
|
|
this.formInline = Object.assign({}, formInline)
|
|
this.$forceUpdate()
|
|
},
|
|
// 企业标准代号
|
|
'formInline.enStandardCode' (val) {
|
|
if (!this.isEditSetData) {
|
|
if (val === EnterpriseStandardCode.Q.value) {
|
|
// 选的Q,企业名称代号只能选ZZ\ZR
|
|
this.enNameCodeOption.map(item => {
|
|
if (![EnterpriseNameCode.ZZ.value, EnterpriseNameCode.ZR.value].includes(item.value)) {
|
|
item.disabled = true
|
|
} else {
|
|
item.disabled = false
|
|
}
|
|
})
|
|
} else if (val === EnterpriseStandardCode.TS.value) {
|
|
// 选的TS,企业名称代号只能选ZZ
|
|
this.enNameCodeOption.map(item => {
|
|
if (![EnterpriseNameCode.ZZ.value].includes(item.value)) {
|
|
item.disabled = true
|
|
} else {
|
|
item.disabled = false
|
|
}
|
|
})
|
|
}
|
|
if (this.formInline.enNameCode !== EnterpriseNameCode.ZZ.value) {
|
|
this.formInline.enNameCode = undefined
|
|
this.formInline = Object.assign({}, this.formInline)
|
|
}
|
|
}
|
|
this.getEnStandardNo()
|
|
},
|
|
// 企业名称代号
|
|
'formInline.enNameCode' (value) {
|
|
this.getEnStandardNo()
|
|
},
|
|
// 标准类别代号
|
|
'formInline.standardCategoryCode' (value) {
|
|
this.getEnStandardNo()
|
|
},
|
|
// 原企标编号改变,新企标编号随之改变
|
|
'formInline.originEnStandardNo' (value) {
|
|
this.getEnStandardNo()
|
|
},
|
|
// 标准等级分类改变后授权部门需要自动带出
|
|
'formInline.enStandardClassification' (val) {
|
|
if (val && !this.isEditSetData) {
|
|
if (val === StandardGradeClassify.ZERO_LEVEL.value) {
|
|
// 选的是0级,授权部门带出不可编辑
|
|
this.formInline.authDept = this.standardGradeClassification.find(item => item.level + '' === '0').deptIds
|
|
this.authDeptDisabled = true
|
|
} else if (val === StandardGradeClassify.ONE_LEVEL.value) {
|
|
// 选的是1级
|
|
// 带出主起草单位
|
|
this.formInline.authDept = this.formInline.mainDraftingUnit
|
|
// 设置可选择项
|
|
this.authDeptSelectRange = this.standardGradeClassification.find(item => item.level + '' === '1').deptIds.split(',')
|
|
this.formInline = JSON.parse(JSON.stringify(this.formInline))
|
|
// 设置授权部门可编辑
|
|
this.authDeptDisabled = false
|
|
} else if (val === StandardGradeClassify.TWO_LEVEL.value) {
|
|
// 选的是2级
|
|
// 带出主起草单位
|
|
this.formInline.authDept = this.formInline.mainDraftingUnit
|
|
// 设置可选择项
|
|
this.authDeptSelectRange = this.standardGradeClassification.find(item => item.level + '' === '2').deptIds.split(',')
|
|
this.formInline = JSON.parse(JSON.stringify(this.formInline))
|
|
// 设置授权部门可编辑
|
|
this.authDeptDisabled = false
|
|
} else if (val === StandardGradeClassify.THREE_LEVEL.value) {
|
|
// 选的是3级,带出主起草单位,不可编辑
|
|
this.formInline.authDept = this.formInline.mainDraftingUnit
|
|
this.authDeptDisabled = true
|
|
}
|
|
} else if (val && this.isEditSetData) {
|
|
// 使用定时器是因为有可能授权部门组件还没有获取完部门列表
|
|
setTimeout(() => {
|
|
if (val === StandardGradeClassify.ZERO_LEVEL.value) {
|
|
// 选的是0级,授权部门带出不可编辑
|
|
this.authDeptDisabled = true
|
|
} else if (val === StandardGradeClassify.ONE_LEVEL.value) {
|
|
// 选的是1级
|
|
// 设置可选择项
|
|
this.authDeptSelectRange = this.standardGradeClassification.find(item => item.level + '' === '1').deptIds.split(',')
|
|
// 设置授权部门可编辑
|
|
this.authDeptDisabled = false
|
|
} else if (val === StandardGradeClassify.TWO_LEVEL.value) {
|
|
// 选的是2级
|
|
// 设置可选择项
|
|
this.authDeptSelectRange = this.standardGradeClassification.find(item => item.level + '' === '2').deptIds.split(',')
|
|
// 设置授权部门可编辑
|
|
this.authDeptDisabled = false
|
|
} else if (val === StandardGradeClassify.THREE_LEVEL.value) {
|
|
// 选的是3级,授权部门带出不可编辑
|
|
this.authDeptDisabled = true
|
|
}
|
|
}, 500)
|
|
} else if (!val) {
|
|
// 清空授权部门的可选项
|
|
this.authDeptSelectRange = []
|
|
// 设置授权部门可编辑
|
|
this.authDeptDisabled = false
|
|
// 清空授权部门
|
|
this.formInline.authDept = ''
|
|
}
|
|
},
|
|
// 主起草单位改变后,需要将选中的主起草单位增加到授权部门
|
|
'formInline.mainDraftingUnit' (val) {
|
|
if (val && !this.isEditSetData) {
|
|
if (this.formInline.enStandardClassification === StandardGradeClassify.ONE_LEVEL.value ||
|
|
this.formInline.enStandardClassification === StandardGradeClassify.TWO_LEVEL.value) {
|
|
// 标准等级分类是1级或者2级需要,把主起草单位追加到授权部门
|
|
let authDeptArr = (this.formInline.authDept || '').split(',')
|
|
// 把旧的主起草部门刨出去,否则每换一次企标编号都会把其主起草单位累计
|
|
authDeptArr = authDeptArr.filter(item => item !== this.oldMainDraftingUnit)
|
|
authDeptArr.push(val)
|
|
this.formInline.authDept = authDeptArr.join(',')
|
|
} else if (this.formInline.enStandardClassification === StandardGradeClassify.THREE_LEVEL.value) {
|
|
// 标准等级分类是3级,把授权部门替换成主起草单位
|
|
this.formInline.authDept = val
|
|
}
|
|
this.oldMainDraftingUnit = val
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
// 年代号默认值
|
|
decadeCodeDefaultValue () {
|
|
console.log(new Date().getFullYear() + '')
|
|
return new Date().getFullYear() + ''
|
|
}
|
|
},
|
|
data () {
|
|
return {
|
|
StandardSource,
|
|
ProjectType,
|
|
loading: false,
|
|
workingGroupTreeList: [], // 隶属工作组下拉框数据
|
|
standardSystemOptions: [], // 标准体系下拉框数据
|
|
formInline: {},
|
|
isFormInline: true,
|
|
rules: {
|
|
// 企标编号
|
|
originEnStandardNo: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
// 企标名称
|
|
originEnStandardName: [
|
|
{
|
|
required: false,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + this.$t('cannotEmpty'),
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
// 企业标准代号
|
|
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'
|
|
}
|
|
],
|
|
// 新企标号
|
|
newEnStandardNo: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum') + this.$t('cannotEmpty'),
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
// 新企标名称
|
|
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'
|
|
}
|
|
],
|
|
// 标准类型
|
|
standardType: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.standardType') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 标准等级分类
|
|
enStandardClassification: [
|
|
{
|
|
required: false,
|
|
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'
|
|
}
|
|
],
|
|
// 征求意见稿计划完成日期
|
|
solicitationDraftPlanCompleteDate: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 计划报批日期
|
|
planApprovalDate: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.planSubmissionDate') + 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'
|
|
}
|
|
],
|
|
// 标准推进人
|
|
standardPromoter: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.standardPusher') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
]
|
|
},
|
|
// 各模块的收齐和展开状态
|
|
retractableFlag: {
|
|
baseInfo: true, // 基础信息部分
|
|
rangeOfApplication: true, // 适用范围部分
|
|
projectStatement: true // 立项说明部分
|
|
},
|
|
uploadName: '',
|
|
standardGradeClassification: [], // 企标级别映射数据
|
|
isEditSetData: false, // 是否正在初始化数据
|
|
authDeptDisabled: false, // 授权部门不可修改
|
|
authDeptSelectRange: [], // 授权部门的可选项
|
|
oldMainDraftingUnit: '', // 上一次的主起草单位
|
|
enNameCodeOption: [] // 企业名称代号下拉框数据
|
|
}
|
|
},
|
|
created () {
|
|
// 获取标准体系下拉框数据
|
|
this.initStandardSystemOptions()
|
|
// 获取企标级别映射数据
|
|
this.getStandardGradeClassification()
|
|
// 获取隶属工作组数据
|
|
this.getWorkGroupTree()
|
|
// 获取企业名称代号下拉框数据
|
|
this.getEnNameCodeOption()
|
|
},
|
|
mounted () {
|
|
console.log(this.$route.query.processId)
|
|
if (!this.$route.query.processId) {
|
|
const userInfo = Vue.ls.get(USER_INFO)
|
|
const formInline = {}
|
|
// 初始化主起草人信息
|
|
formInline.mainDraftingUser = userInfo.id
|
|
formInline.mainDraftingUser_dictText = userInfo.realname
|
|
// 初始化主起草单位信息
|
|
if (userInfo.departIds && userInfo.departIds.split(',').length === 1) {
|
|
formInline.mainDraftingUnit = userInfo.departIds
|
|
}
|
|
// 初始化年代号
|
|
formInline.decadeCode = new Date().getFullYear() + ''
|
|
this.formInline = Object.assign({}, formInline)
|
|
this.$forceUpdate()
|
|
}
|
|
},
|
|
methods: {
|
|
// watch监视年代号会滞后
|
|
decadeCodeChange (value) {
|
|
this.getEnStandardNo()
|
|
},
|
|
newEnStandardNameBlur (value) {
|
|
// 企标名称,企标名称修改流程名称需要自动更改
|
|
this.returnProcessName()
|
|
},
|
|
// 返回流程名称
|
|
returnProcessName () {
|
|
const processName = (this.formInline.newEnStandardNo || '') + '-' + (this.formInline.newEnStandardName || '') + '-' + '立项'
|
|
this.$emit('processNameChange', processName)
|
|
},
|
|
// 获取内部工作组树
|
|
getWorkGroupTree () {
|
|
getWorkGroupTreeList().then((res) => {
|
|
if (res.success) {
|
|
this.workingGroupTreeList = this.dealTreeData(res.result)
|
|
} else {
|
|
this.workingGroupTreeList = []
|
|
}
|
|
})
|
|
},
|
|
// 处理内部工作组数据结构
|
|
dealTreeData (treeData) {
|
|
return treeData.map(item => {
|
|
item.label = item.name
|
|
item.value = item.id
|
|
item.children = this.dealTreeData(item.subset)
|
|
return item
|
|
})
|
|
},
|
|
// 获取企标级别映射数据
|
|
getStandardGradeClassification () {
|
|
getStandardGradeClassification().then(res => {
|
|
if (res.success) {
|
|
this.standardGradeClassification = res.result
|
|
}
|
|
})
|
|
},
|
|
// 获取企业名称代号下拉框数据
|
|
getEnNameCodeOption () {
|
|
ajaxGetDictItems('enterprise_name_code').then(res => {
|
|
if (res.success) {
|
|
const result = JSON.parse(JSON.stringify(res.result))
|
|
for (const dictItem of result) {
|
|
if ([EnterpriseNameCode.WQ.value, EnterpriseNameCode.JC.value, EnterpriseNameCode.JHK.value].includes(dictItem.value)) {
|
|
dictItem.disabled = true
|
|
} else {
|
|
dictItem.disabled = false
|
|
}
|
|
}
|
|
this.enNameCodeOption = result
|
|
}
|
|
})
|
|
},
|
|
// 根据三个代号和一个年代号获取企标编号
|
|
getEnStandardNo () {
|
|
// 正在初始化数据,不获取新企标编号
|
|
if (this.isInitData) {
|
|
return
|
|
}
|
|
// 如果是制定根据填的三个代号和一个年代号获取
|
|
if (this.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.$refs.ruleForm.clearValidate('newEnStandardNo')
|
|
this.$forceUpdate()
|
|
// 返回流程名称
|
|
this.returnProcessName()
|
|
}
|
|
})
|
|
} 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.$refs.ruleForm.clearValidate('newEnStandardNo')
|
|
this.$forceUpdate()
|
|
// 返回流程名称
|
|
this.returnProcessName()
|
|
}
|
|
}
|
|
},
|
|
// 获取标准体系下拉框数据
|
|
initStandardSystemOptions () {
|
|
getTreeList({ option: 1 }).then(res => {
|
|
if (res.success) {
|
|
this.standardSystemOptions = res.result
|
|
}
|
|
})
|
|
},
|
|
// 改变内容区域收起和展开
|
|
handleChangeRetractable (module) {
|
|
this.$set(this.retractableFlag, module, !this.retractableFlag[module])
|
|
this.$forceUpdate()
|
|
},
|
|
// 标准选择组件完成返回标准列表
|
|
listChange (value) {
|
|
this.loading = true
|
|
// 企标名称
|
|
this.formInline.originEnStandardName = value[0].standardName
|
|
// 根据返回的id查询企标数据
|
|
getEnterpriseStandardInfoById({ id: value[0].id, type: '2' }).then(res => {
|
|
if (res.success) {
|
|
const result = res.result
|
|
// 标准英文名称
|
|
this.formInline.enStandardEnglishName = result.standard_english_name
|
|
// 标准体系
|
|
this.formInline.enStandardSystem = result.standard_system ? result.standard_system.split(',').map(item => {
|
|
return { value: item }
|
|
}) : []
|
|
console.log(this.formInline.standardSystem)
|
|
// 标准类型
|
|
this.formInline.standardType = result.standard_class || undefined
|
|
// 标准等级分类
|
|
this.formInline.enStandardClassification = result.grade_classification || undefined
|
|
// 编制说明
|
|
this.formInline.compilationDescription = result.comp_illustration
|
|
// 零部件分类
|
|
this.formInline.componentName = result.part_name
|
|
this.formInline.componentName_dictText = result.part_name_dictText
|
|
// 授权部门
|
|
this.formInline.authDept = result.auth_dept
|
|
// 主起草人
|
|
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.mainDraftingUnitResponsiblePerson = result.main_drafting_unit_responsible_person
|
|
this.formInline.mainDraftingUnitResponsiblePerson_dictText = result.main_drafting_unit_responsible_person_dictText
|
|
// 标准推进人
|
|
this.formInline.standardPromoter = result.standard_promoter
|
|
this.formInline.standardPromoter_dictText = result.standard_promoter_dictText
|
|
// 配合单位
|
|
this.formInline.cooperationUnit = result.cooperation_unit
|
|
this.formInline = Object.assign({}, this.formInline)
|
|
}
|
|
}).finally(() => {
|
|
this.loading = false
|
|
})
|
|
},
|
|
// 零部件分类选择完成的回调
|
|
treeSelectNameChange (value, fieldName) {
|
|
this.formInline[fieldName + '_dictText'] = value
|
|
},
|
|
// 点击文件上传
|
|
clickButtonToUpload (fieldName) {
|
|
this.$refs.uploadFile.open(this.formInline[fieldName])
|
|
this.uploadName = fieldName
|
|
},
|
|
// 文件上传改变后的回调
|
|
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 }
|
|
},
|
|
// 选择用户得到用户名
|
|
userSelectNameChange (value, fieldName) {
|
|
this.formInline[fieldName + '_dictText'] = value
|
|
}
|
|
}
|
|
}
|
|
</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 {
|
|
width: 220px !important;
|
|
}
|
|
}
|
|
|
|
.title-text {
|
|
width: 140px !important;
|
|
}
|
|
|
|
/deep/ .ant-form-item-children > .ant-calendar-picker {
|
|
width: 100%;
|
|
}
|
|
</style>
|