991 lines
44 KiB
Vue
991 lines
44 KiB
Vue
<template>
|
|
<a-drawer
|
|
:title="$t('standardSelect.standardSelection')"
|
|
:maskClosable="false"
|
|
:width="1000"
|
|
placement="right"
|
|
:closable="true"
|
|
@close="handleCancel"
|
|
:visible="visible"
|
|
class="custom-drawer-style">
|
|
<div class="custom-drawer-style-scroll">
|
|
<a-spin :spinning="confirmLoading">
|
|
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
|
<!-- 基础信息 -->
|
|
<div class="header-text">{{ $t('basicInformation') }}</div>
|
|
<div class="form-flex-box">
|
|
<!-- 申请类型 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.applicationType')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.applicationType') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="applicationType">
|
|
<a-select v-model="formInline.applicationType"
|
|
:disabled="disabled"
|
|
:defaultValue="ApplicationCategory.INITIATION.value"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')">
|
|
<a-select-option :value="ApplicationCategory.INITIATION.value">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 项目类别 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.itemCategory')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.itemCategory') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="projectType">
|
|
<a-select v-model="formInline.projectType"
|
|
@change="projectTypeChange"
|
|
:disabled="disabled"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
|
|
<a-select-option :value="ProjectType.ENACT.value">{{ $t('workCenter.enterpriseInitChangePlan.formulate') }}</a-select-option>
|
|
<a-select-option :value="ProjectType.MODIFY.value">{{ $t('workCenter.enterpriseInitChangePlan.revise') }}</a-select-option>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 标准立项-制定 -->
|
|
<template v-if="formInline.projectType && formInline.projectType === ProjectType.ENACT.value">
|
|
<!-- 企标编号-新企标编号 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.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
|
|
@change="event => event.target.value = event.target.value.trim()"
|
|
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 企标名称-新企标名称 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<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"
|
|
:maxLength="50"
|
|
:disabled="disabled"
|
|
@change="event => event.target.value = event.target.value.trim()"
|
|
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 企业标准代号 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="enStandardCode">
|
|
<j-dict-select-tag class="box-input"
|
|
ref="enStandardCodeRef"
|
|
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-half">
|
|
<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-half">
|
|
<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-half">
|
|
<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"
|
|
:default-value="yearNumberDefaultValue"
|
|
date-format="YYYY"
|
|
:disabled="disabled"
|
|
@change="decadeCodeChange"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
</template>
|
|
<!-- 标准立项-修订 -->
|
|
<template v-else-if="formInline.projectType && formInline.projectType === ProjectType.MODIFY.value">
|
|
<!-- 企标编号-原企标编号 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="originEnStandardNo">
|
|
<standard-selection :source="StandardSource.ENTERPRISE.value"
|
|
:disabledSourceSearch="true"
|
|
type="radio"
|
|
:disabled="disabled"
|
|
v-model="formInline.originEnStandardNo"
|
|
@nameChange="nameChange"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 企标名称-原企标名称 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="originEnStandardName">
|
|
<a-input class="box-input"
|
|
v-model="formInline.originEnStandardName"
|
|
:maxLength="50"
|
|
disabled
|
|
@change="event => event.target.value = event.target.value.trim()"
|
|
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 新企标编号 审批结束后才回显?? -->
|
|
<!--<div class="box-title-text form-flex-item-half">-->
|
|
<!-- <div class="title-text">-->
|
|
<!-- <span class="required">*</span>-->
|
|
<!-- <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')">-->
|
|
<!-- {{ $t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum') }}-->
|
|
<!-- </span>-->
|
|
<!-- </div>-->
|
|
<!-- <a-form-model-item class="item-model" prop="newEnStandardNo">-->
|
|
<!-- <a-input class="box-input"-->
|
|
<!-- v-model="formInline.newEnStandardNo"-->
|
|
<!-- :maxLength="50"-->
|
|
<!-- disabled-->
|
|
<!--@change="event => event.target.value = event.target.value.trim()"-->
|
|
<!-- :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')" />-->
|
|
<!-- </a-form-model-item>-->
|
|
<!--</div>-->
|
|
<!-- 新企标名称 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.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"
|
|
@change="event => event.target.value = event.target.value.trim()"
|
|
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
</template>
|
|
<!-- 标准英文名称 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<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"
|
|
@change="event => event.target.value = event.target.value.trim()"
|
|
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 标准体系 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.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
|
|
:label-in-value="false"
|
|
:disabled="disabled"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardSystem')" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 标准类型 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardType')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.standardType') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="standardType">
|
|
<j-dict-select-tag class="box-input"
|
|
v-model="formInline.standardType"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardType')"
|
|
:type="'select'"
|
|
:triggerChange="false"
|
|
:disabled="disabled"
|
|
dictCode="esp_standard_type" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 标准等级分类 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardGradeClassification')">
|
|
{{ $t('workCenter.enterpriseInitChangePlan.standardGradeClassification') }}
|
|
</span>
|
|
</div>
|
|
<a-form-model-item class="item-model" prop="enStandardClassification">
|
|
<j-dict-select-tag class="box-input"
|
|
v-model="formInline.enStandardClassification"
|
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardGradeClassification')"
|
|
:type="'select'"
|
|
:triggerChange="false"
|
|
:disabled="disabled"
|
|
dictCode="standard_grade_classify" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 编制说明 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.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-half">
|
|
<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-half">
|
|
<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-half">
|
|
<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 class="box-title-text form-flex-item-half">
|
|
<div class="title-text title-text-long">
|
|
<span class="required">*</span>
|
|
<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')"
|
|
/>
|
|
</a-form-model-item>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 适用范围 -->
|
|
<div class="header-text">{{ $t('rangeOfApplication') }}</div>
|
|
<div class="form-flex-box">
|
|
<!-- 零部件名称 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.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"
|
|
dict-id="1696007957666533377"
|
|
:disabled="disabled" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 授权部门 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.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"
|
|
@back="authDeptBack"
|
|
:backDepart="true" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 主起草人 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.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"
|
|
filedName="mainDraftingUser"
|
|
@nameChange="userSelectNameChange"
|
|
:nameStr="formInline.mainDraftingUser_dictText"
|
|
:disabled="disabled"
|
|
type="radio" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 主起草单位 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.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"
|
|
@back="mainDraftingUnitBack"
|
|
:backDepart="true" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 起草单位负责人 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.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"
|
|
filedName="mainDraftingUnitResponsiblePerson"
|
|
@nameChange="userSelectNameChange"
|
|
:nameStr="formInline.mainDraftingUnitResponsiblePerson_dictText"
|
|
:disabled="disabled"
|
|
type="radio" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 标准推进人 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.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"
|
|
filedName="standardPromoter"
|
|
@nameChange="userSelectNameChange"
|
|
:nameStr="formInline.standardPromoter_dictText"
|
|
:disabled="disabled"
|
|
type="radio" />
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- 配合单位 -->
|
|
<div class="box-title-text form-flex-item-half">
|
|
<div class="title-text">
|
|
<span class="required">*</span>
|
|
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.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"
|
|
@back="cooperationUnitBack"
|
|
:backDepart="true" />
|
|
</a-form-model-item>
|
|
</div>
|
|
</div>
|
|
</a-form-model>
|
|
</a-spin>
|
|
</div>
|
|
<div class="custom-drawer-style-bottom-btn">
|
|
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
|
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
|
|
</div>
|
|
|
|
<!-- 文件上传弹框 -->
|
|
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
|
|
</a-drawer>
|
|
</template>
|
|
|
|
<script>
|
|
import { StandardSource, ProjectType, ApplicationCategory } from '@/enums/commonEnums'
|
|
import { getWorkGroupTreeList, getFormDictTreeList } from '@/api/api'
|
|
import UserSelection from '@/components/selection/UserSelection'
|
|
import StandardSelection from '@/components/selection/StandardSelection'
|
|
import UploadFile from '@/components/UploadFile'
|
|
import { getTreeList } from '@/api/enterpriseStandardLibraryApi'
|
|
import Vue from 'vue'
|
|
import { USER_INFO } from '@/store/mutation-types'
|
|
import { getEnStandardNo } from '@/api/workCenter'
|
|
import TreeSelection from '@/components/selection/TreeSelection'
|
|
|
|
export default {
|
|
name: 'ContactEnterSendTaskModal',
|
|
components: { UserSelection, StandardSelection, UploadFile, TreeSelection },
|
|
data () {
|
|
return {
|
|
StandardSource,
|
|
ProjectType,
|
|
ApplicationCategory,
|
|
workingGroupTreeList: [], // 隶属工作组下拉框数据
|
|
standardSystemOptions: [], // 企标体系下拉框数据
|
|
visible: false,
|
|
confirmLoading: false,
|
|
disabled: false,
|
|
model: {},
|
|
formInline: {},
|
|
rules: {
|
|
// 申请类型
|
|
applicationType: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.applicationType') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 项目类别
|
|
projectType: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.itemCategory') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 企标编号-新企标编号(制定-企标编号,修订新企标编号)
|
|
newEnStandardNo: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 企标编号-原企标编号(修订-企标编号)
|
|
originEnStandardNo: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 企业标准代号
|
|
enStandardCode: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 标准类别代号
|
|
standardCategoryCode: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.standardCategoryCode') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 企标名称-新企标名称(制定-企标名称,修订-新企标名称)
|
|
newEnStandardName: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + this.$t('cannotEmpty'),
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
// 企业名称代号
|
|
enNameCode: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseNameCode') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 年代号
|
|
decadeCode: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.yearNumber') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 新企标名称
|
|
newEnterpriseStandardName: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName') + this.$t('cannotEmpty'),
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
// 标准类型
|
|
standardType: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.standardType') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 标准体系
|
|
enStandardSystem: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.standardSystem') + 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'
|
|
}
|
|
],
|
|
// 征求意见稿计划完成日期
|
|
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'
|
|
}
|
|
],
|
|
// 隶属工作组
|
|
workGroup: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.revisionPlanActivelyReport.affiliatedWorkingGroup') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 零部件名称
|
|
componentName: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.partName') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
// 授权部门
|
|
authDept: [
|
|
{
|
|
required: true,
|
|
message: this.$t('workCenter.enterpriseInitChangePlan.authorizationDepart') + 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'
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
yearNumberDefaultValue () {
|
|
return new Date().getFullYear() + ''
|
|
}
|
|
},
|
|
watch: {
|
|
// 企业标准代号
|
|
'formInline.enStandardCode' (value) {
|
|
this.getEnStandardNo()
|
|
},
|
|
// 企业名称代号
|
|
'formInline.enNameCode' (value) {
|
|
this.getEnStandardNo()
|
|
},
|
|
// 标准类别代号
|
|
'formInline.standardCategoryCode' (value) {
|
|
this.getEnStandardNo()
|
|
}
|
|
},
|
|
mounted () {
|
|
this.getWorkGroupTree()
|
|
this.initStandardSystemOptions()
|
|
},
|
|
methods: {
|
|
add () {
|
|
const userInfo = Vue.ls.get(USER_INFO)
|
|
const formInline = {}
|
|
// 初始化主起草人信息
|
|
formInline.mainDraftingUser = userInfo.id
|
|
formInline.mainDraftingUser_dictText = userInfo.realname
|
|
// 初始化主起草单位信息,需要翻译当前登录用户的部门,因为表格回显
|
|
formInline.mainDraftingUnit = userInfo.departIds
|
|
formInline.mainDraftingUnit_dictText = userInfo.departIds_dictText
|
|
// 初始化起草单位负责人 todo: 看怎么获取当前登录人的上级
|
|
// 初始化年代号
|
|
formInline.decadeCode = new Date().getFullYear() + ''
|
|
this.edit(formInline)
|
|
},
|
|
edit (record) {
|
|
this.visible = true
|
|
this.model = Object.assign({}, record)
|
|
this.formInline = Object.assign({}, record)
|
|
if (this.formInline.workGroup) {
|
|
this.formInline.workGroup = { value: this.formInline.workGroup, label: this.formInline.workGroup_dictText }
|
|
}
|
|
if (!this.formInline.applicationType) {
|
|
this.formInline.applicationType = this.ApplicationCategory.INITIATION.value
|
|
}
|
|
if (this.formInline.enStandardSystem && this.formInline.enStandardSystem.length > 0) {
|
|
this.formInline.enStandardSystem = this.formInline.enStandardSystem ? this.formInline.enStandardSystem.split(',').map(item => {
|
|
return { value: item }
|
|
}) : []
|
|
}
|
|
},
|
|
look (record) {
|
|
this.visible = true
|
|
this.model = Object.assign({}, record)
|
|
this.formInline = Object.assign({}, record)
|
|
this.disabled = true
|
|
},
|
|
// watch监视年代号会滞后
|
|
decadeCodeChange (value) {
|
|
this.getEnStandardNo()
|
|
},
|
|
// 根据三个代号和一个年代号获取企标编号
|
|
getEnStandardNo () {
|
|
// 如果是制定根据填的三个代号和一个年代号获取
|
|
if (this.formInline.projectType === ProjectType.ENACT.value) {
|
|
if (!this.formInline.enStandardCode || !this.formInline.enNameCode ||
|
|
!this.formInline.standardCategoryCode || !this.formInline.decadeCode) {
|
|
return
|
|
}
|
|
const param = {}
|
|
param.enStandardCode = this.formInline.enStandardCode
|
|
param.enNameCode = this.formInline.enNameCode
|
|
param.standardCategoryCode = this.formInline.standardCategoryCode
|
|
param.decadeCode = this.formInline.decadeCode
|
|
getEnStandardNo(param).then(res => {
|
|
if (res.success) {
|
|
this.$set(this.formInline, 'newEnStandardNo', res.message)
|
|
this.$forceUpdate()
|
|
}
|
|
})
|
|
} else {
|
|
// 是修订,通过选中的企标编号和年代号拼接新企标编号
|
|
if (this.formInline.originEnStandardNo && this.formInline.decadeCode) {
|
|
const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode
|
|
this.$set(this.formInline, 'newEnStandardNo', standardNo)
|
|
this.$forceUpdate()
|
|
// 返回流程名称
|
|
this.returnProcessName()
|
|
}
|
|
}
|
|
},
|
|
// 获取标准体系下拉框数据
|
|
initStandardSystemOptions () {
|
|
getTreeList({ option: 1 }).then(res => {
|
|
if (res.success) {
|
|
this.standardSystemOptions = res.result
|
|
}
|
|
})
|
|
},
|
|
// 获取内部工作组树
|
|
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
|
|
})
|
|
},
|
|
// 授权部门返回参数
|
|
authDeptBack (value) {
|
|
this.formInline.authDept_dictText = value.map(item => item.text).join(',')
|
|
},
|
|
// 主起草单位返回参数
|
|
mainDraftingUnitBack (value) {
|
|
this.formInline.mainDraftingUnit_dictText = value.map(item => item.text).join(',')
|
|
},
|
|
// 配合单位返回参数
|
|
cooperationUnitBack (value) {
|
|
this.formInline.cooperationUnit_dictText = value.map(item => item.text).join(',')
|
|
},
|
|
// 标准选择组件返回标准名称的回调
|
|
nameChange (value) {
|
|
this.formInline.originEnStandardName = value
|
|
},
|
|
// 项目类别改变
|
|
projectTypeChange (value) {
|
|
console.log(value)
|
|
this.formInline.decadeCode = new Date().getFullYear() + ''
|
|
},
|
|
// 选择用户得到用户名
|
|
userSelectNameChange (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 }
|
|
},
|
|
// 取消
|
|
handleCancel () {
|
|
this.close()
|
|
},
|
|
close () {
|
|
this.model = {}
|
|
this.formInline = {}
|
|
this.visible = false
|
|
this.$refs.ruleForm.clearValidate()
|
|
},
|
|
// 提交
|
|
handleSubmit () {
|
|
if (this.confirmLoading) return
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
this.confirmLoading = true
|
|
const formInline = JSON.parse(JSON.stringify(this.formInline))
|
|
if (formInline.projectType) {
|
|
// 翻译项目类别
|
|
formInline.projectType_dictText = formInline.projectType === ProjectType.ENACT.value ? ProjectType.ENACT.text : ProjectType.MODIFY.text
|
|
// 设置变更状态
|
|
if (formInline.projectType === 1) {
|
|
// 是制定,变更状态是新增
|
|
formInline.changeStatus_dictText = '新增'
|
|
} else {
|
|
// 是修订,变更状态是变更
|
|
formInline.changeStatus_dictText = '变更'
|
|
}
|
|
}
|
|
// 翻译隶属工作组
|
|
if (formInline.workGroup) {
|
|
formInline.workGroup_dictText = formInline.workGroup.label
|
|
formInline.workGroup = formInline.workGroup.value
|
|
}
|
|
// 翻译企业标准代号
|
|
if (formInline.enStandardCode) {
|
|
formInline.enStandardCode_dictText = this.$refs.enStandardCodeRef.dictOptions.find(item => item.value === formInline.enStandardCode).text
|
|
}
|
|
// 处理标准体系
|
|
if (formInline.enStandardSystem && formInline.enStandardSystem.length > 0) {
|
|
formInline.enStandardSystem = formInline.enStandardSystem.map(item => item.value).join(',')
|
|
} else {
|
|
formInline.enStandardSystem = ''
|
|
}
|
|
// 主起草单位的回显需要在登录信息中有当前登录人部门的翻译 ??
|
|
console.log(formInline)
|
|
this.$emit('ok', formInline)
|
|
this.close()
|
|
this.confirmLoading = false
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</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-half {
|
|
width: 50%;
|
|
}
|
|
|
|
.form-flex-item-line {
|
|
width: 100%;
|
|
}
|
|
|
|
.form-flex-item-long {
|
|
width: 100%;
|
|
}
|
|
</style>
|