[update] 修改新建流程页,企标计划立项/变更流程

This commit is contained in:
lideqin
2023-10-10 11:14:30 +08:00
parent f863ea3255
commit ea357bf590
11 changed files with 166 additions and 11 deletions
@@ -0,0 +1,939 @@
<template>
<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>基础信息</span>
<div class="retractable-btn" @click="handleChangeRetractable('baseInfo')">
<a-icon type="double-right" :class="retractableFlag.baseInfo ? 'pack-up-btn' : 'unfold-btn'" />
{{ retractableFlag.baseInfo ? '收起' : '展开' }}
</div>
</div>
<div class="form-flex-box collapsible-panel-form-content" v-show="retractableFlag.baseInfo">
<!-- 标准立项-制定 -->
<template v-if="itemCategory && itemCategory === 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')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enterpriseStandardNum">
<a-input class="box-input"
v-model="formInline.enterpriseStandardNum"
: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="enterpriseStandardName">
<a-input class="box-input"
v-model="formInline.enterpriseStandardName"
:disabled="disabled"
:maxLength="50"
: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="enterpriseStandardCode">
<j-dict-select-tag class="box-input"
:disabled="disabled"
v-model="formInline.enterpriseStandardCode"
: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="enterpriseNameCode">
<j-dict-select-tag class="box-input"
:disabled="disabled"
v-model="formInline.enterpriseNameCode"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode')"
:type="'select'"
:triggerChange="false"
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"
: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>
<!-- 年代号 -->
<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="yearNumber">
<j-date show-type="year"
:disabled="disabled"
v-model="formInline.yearNumber"
:default-value="yearNumberDefaultValue"
date-format="YYYY"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
</a-form-model-item>
</div>
</template>
<!-- 标准立项-修订 -->
<template v-else-if="itemCategory && itemCategory === 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')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enterpriseStandardNum">
<standard-selection :source="StandardSource.ENTERPRISE.value"
:disabled="disabled"
:disabledSourceSearch="true"
type="radio"
v-model="formInline.enterpriseStandardNum"
@nameChange="nameChange"/>
</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="enterpriseStandardName">
<a-input class="box-input"
v-model="formInline.enterpriseStandardName"
:maxLength="50"
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="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">
<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="newEnterpriseStandardName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.newEnterpriseStandardName"
:maxLength="50"
: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="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="yearNumber">
<j-date show-type="year"
:disabled="disabled"
v-model="formInline.yearNumber"
:default-value="yearNumberDefaultValue"
date-format="YYYY"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
</a-form-model-item>
</div>
</template>
<!-- 标准英文名称 -->
<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="standardEnglishName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.standardEnglishName"
:maxLength="50"
: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="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardSystem')">
{{ $t('workCenter.enterpriseInitChangePlan.standardSystem') }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardSystem">
<j-dict-select-tag class="box-input"
:disabled="disabled"
v-model="formInline.standardSystem"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardSystem')"
:type="'select'"
:triggerChange="false"
dictCode="standard_system" />
</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.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="standardGradeClassification">
<j-dict-select-tag class="box-input"
:disabled="disabled"
v-model="formInline.standardGradeClassification"
: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="compilationIllustration">
<a-button type="primary" class="button-text" :disabled="disabled" @click="clickButtonToUpload('compilationIllustration')">
{{
(formInline.compilationIllustration === 'null' || formInline.compilationIllustration === ''
|| formInline.compilationIllustration === null || formInline.compilationIllustration === undefined)
? $t('uploadFile.clickUpload')
: $t('uploadFile.viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</div>
</div>
</div>
<!-- 完成日期部分 -->
<div class="collapsible-panel-form">
<div class="collapsible-panel-form-header">
<span>完成日期</span>
<div class="retractable-btn" @click="handleChangeRetractable('finishDate')">
<a-icon type="double-right" :class="retractableFlag.finishDate ? 'pack-up-btn' : 'unfold-btn'" />
{{ retractableFlag.finishDate ? '收起' : '展开' }}
</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="draftPlanFinishDate">
<a-date-picker
v-model="formInline.draftPlanFinishDate"
: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="exposureDraftPlanFinishDate">
<a-date-picker
v-model="formInline.exposureDraftPlanFinishDate"
: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="planSubmissionDate">
<a-date-picker
v-model="formInline.planSubmissionDate"
: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>适用范围</span>
<div class="retractable-btn" @click="handleChangeRetractable('rangeOfApplication')">
<a-icon type="double-right" :class="retractableFlag.rangeOfApplication ? 'pack-up-btn' : 'unfold-btn'" />
{{ retractableFlag.rangeOfApplication ? '收起' : '展开' }}
</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="partName">
<a-tree-select v-model="formInline.partName"
: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.authorizationDepart')">
{{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }}
</span>
</div>
<a-form-model-item class="item-model" prop="authorizationDepart">
<j-select-depart v-model="formInline.authorizationDepart"
: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.principalDrafter')">
{{ $t('workCenter.enterpriseInitChangePlan.principalDrafter') }}
</span>
</div>
<a-form-model-item class="item-model" prop="principalDrafter">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.principalDrafter')"
v-model="formInline.principalDrafter"
:disabled="disabled"
filedName="principalDrafter"
@nameChange="userSelectNameChange"
:nameStr="formInline.principalDrafter_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="mainDraftUnit">
<j-select-depart v-model="formInline.mainDraftUnit"
: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="headOfMainDraftingUnit">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit')"
v-model="formInline.headOfMainDraftingUnit"
:disabled="disabled"
filedName="headOfMainDraftingUnit"
@nameChange="userSelectNameChange"
:nameStr="formInline.headOfMainDraftingUnit_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="standardPusher">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardPusher')"
v-model="formInline.standardPusher"
:disabled="disabled"
filedName="standardPusher"
@nameChange="userSelectNameChange"
:nameStr="formInline.standardPusher_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.suitUnit')">
{{ $t('workCenter.enterpriseInitChangePlan.suitUnit') }}
</span>
</div>
<a-form-model-item class="item-model" prop="suitUnit">
<j-select-depart v-model="formInline.suitUnit"
:disabled="disabled"
:backDepart="true" />
</a-form-model-item>
</div>
</div>
</div>
<!-- 立项说明部分 -->
<div class="collapsible-panel-form">
<div class="collapsible-panel-form-header">
<span>立项说明</span>
<div class="retractable-btn" @click="handleChangeRetractable('projectStatement')">
<a-icon type="double-right" :class="retractableFlag.projectStatement ? 'pack-up-btn' : 'unfold-btn'" />
{{ retractableFlag.projectStatement ? '收起' : '展开' }}
</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="projectApprovalChangeReason">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.projectApprovalChangeReason')"
:maxLength="500"
:disabled="disabled"
v-model="formInline.projectApprovalChangeReason" :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="homogeneousStandardAnalysis">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.homogeneousStandardAnalysis')"
:maxLength="500"
:disabled="disabled"
v-model="formInline.homogeneousStandardAnalysis" :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="standardContrastiveAnalysis">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardContrastiveAnalysis')"
:maxLength="500"
:disabled="disabled"
v-model="formInline.standardContrastiveAnalysis" :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="leadershipAndNecessity">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.leadershipAndNecessity')"
:maxLength="500"
:disabled="disabled"
v-model="formInline.leadershipAndNecessity" :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="initiatedProject">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.initiatedProject')"
:maxLength="500"
:disabled="disabled"
v-model="formInline.initiatedProject" :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" :disabled="disabled" 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" :file-max-size="fileMaxSize" @change="uploadFileChange" :return-url="false"></upload-file>
</a-form-model>
</template>
<script>
import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types'
import { StandardSource } from '@/enums/commonEnums.js'
import StandardSelection from '@/components/selection/StandardSelection'
import UserSelection from '@/components/selection/UserSelection'
import UploadFile from '@/components/UploadFile'
import { getFormDictTreeList } from '@/api/api'
export default {
name: 'ApprovalBaseInfo',
components: { StandardSelection, UserSelection, UploadFile },
props: {
itemCategory: {
type: Number,
required: false,
default: 1
},
disabled: {
type: Boolean,
required: false,
default: false
}
},
computed: {
yearNumberDefaultValue () {
return new Date().getFullYear() + ''
}
},
data () {
return {
StandardSource,
partNameOptions: [],
formInline: {},
isFormInline: true,
rules: {
// 企标编号
enterpriseStandardNum: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 企标名称
enterpriseStandardName: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 企业标准代号
enterpriseStandardCode: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 企业名称代号
enterpriseNameCode: [
{
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'
}
],
// 年代号
yearNumber: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.yearNumber') + this.$t('cannotEmpty'),
trigger: ['change', 'blur']
}
],
// 新企标号
newEnterpriseStandardNum: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 新企标名称
newEnterpriseStandardName: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 标准体系
standardSystem: [
{
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'
}
],
// 标准等级分类
standardGradeClassification: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.standardGradeClassification') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 草稿计划完成日期
draftPlanFinishDate: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.draftPlanFinishDate') + this.$t('cannotEmpty'),
trigger: ['change', 'blur']
}
],
// 征求意见稿计划完成日期
exposureDraftPlanFinishDate: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.exposureDraftPlanFinishDate') + this.$t('cannotEmpty'),
trigger: ['change', 'blur']
}
],
// 计划报批日期
planSubmissionDate: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.planSubmissionDate') + this.$t('cannotEmpty'),
trigger: ['change', 'blur']
}
],
// 授权部门
authorizationDepart: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.authorizationDepart') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 主起草人
principalDrafter: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.principalDrafter') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 主起草单位
mainDraftUnit: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 起草单位负责人
headOfMainDraftingUnit: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.headOfMainDraftingUnit') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 标准推进人
standardPusher: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.standardPusher') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 配合单位
suitUnit: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.suitUnit') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
// 各模块的收齐和展开状态
retractableFlag: {
baseInfo: true, // 基础信息部分
finishDate: true, // 完成日期部分
rangeOfApplication: true, // 适用范围部分
projectStatement: true // 立项说明部分
},
uploadName: '',
fileMaxSize: undefined
}
},
mounted () {
const userInfo = Vue.ls.get(USER_INFO)
// 初始化主起草人信息
this.formInline.principalDrafter = userInfo.id
this.formInline.principalDrafter_dictText = userInfo.realname
// 初始化主起草单位信息
this.formInline.mainDraftUnit = userInfo.departIds
// 获取零部件名称下拉框数据
this.initPartNameOptions()
},
methods: {
// 获取零部件名称下拉框数据
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()
},
// 标准选择组件返回标准名称的回调
nameChange (value) {
this.formInline.enterpriseStandardName = value
},
// 点击文件上传
clickButtonToUpload (fieldName) {
if (fieldName === 'uploadAttachment') {
this.fileMaxSize = 10
} else {
this.fileMaxSize = undefined
}
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">
/deep/ .ant-form-item-children {
width: 100%;
display: inline-block;
}
.form-flex-box {
display: flex;
flex-wrap: wrap;
}
.form-flex-item-line {
width: 100%;
}
.collapsible-panel-form {
margin-top: 20px;
&-header {
height: 56px;
line-height: 56px;
background: rgba(245, 245, 245, 0.6);
border-radius: 8px 8px 0 0;
border: 1px solid #E5E6EB;
padding: 0 20px;
font-size: 16px;
font-family: PingFang SC-Medium, PingFang SC, sans-serif;
font-weight: 600;
color: #1D2129;
display: flex;
justify-content: space-between;
.retractable-btn {
cursor: pointer;
font-size: 14px;
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
color: @primary-color;
}
.anticon {
margin-right: 8px;
}
.pack-up-btn {
transform: rotate(-90deg);
}
.unfold-btn {
transform: rotate(90deg);
}
}
&-content {
border: 1px solid #E5E6EB;
border-top: none;
border-radius: 0 0 8px 8px;
padding: 20px;
}
}
.collapsible-content-no-head {
border-top: 1px solid #E5E6EB;
border-radius: 8px 8px 8px 8px;
}
.form-flex-item {
width: calc(100% / 3);
}
.form-flex-item-long {
width: 100%;
}
.title-text-long {
width: 220px;
}
</style>