[update] 新增流程中心页,企标计划立项/变更流程

This commit is contained in:
lideqin
2023-10-11 18:07:14 +08:00
parent 4d45b77827
commit 505c07fd88
23 changed files with 3007 additions and 139 deletions
@@ -96,7 +96,7 @@
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
<a-select-option :value="1">{{ $t('workCenter.enterpriseInitChangePlan.completionTimeChange') }}</a-select-option>
<a-select-option :value="2">{{ $t('workCenter.enterpriseInitChangePlan.terminationOfWork') }}</a-select-option>
<a-select-option :value="3">{{ $t('workCenter.enterpriseInitChangePlan.masterDraftingDepartmentChanges') }}</a-select-option>
<a-select-option :value="3">{{ $t('workCenter.enterpriseInitChangePlan.dutyDepartChange') }}</a-select-option>
<a-select-option :value="4">{{ $t('workCenter.enterpriseInitChangePlan.merge') }}</a-select-option>
</a-select>
</a-form-model-item>
@@ -112,14 +112,36 @@
:currentNode="currentNode"
:itemCategory="formInline.itemCategory">
</approval-base-info>
<!-- 申请类型为变更时的业务基本信息部分组件 -->
<change-base-info
v-else-if="formInline.applicationType === 2"
<!-- 申请类型为变更,项目类型为完成时间变更时的业务基本信息部分组件 -->
<finish-time-change-base-info
v-else-if="formInline.applicationType === 2 && formInline.itemCategory === 1"
ref="changeBaseInfo"
:disabled="disabled"
:currentNode="currentNode"
>
</change-base-info>
</finish-time-change-base-info>
<!-- 申请类型为变更,项目类型为工作终止时的业务基本信息部分组件 -->
<job-end-base-info
v-else-if="formInline.applicationType === 2 && formInline.itemCategory === 2"
ref="changeBaseInfo"
:disabled="disabled"
:currentNode="currentNode"
>
</job-end-base-info>
<!-- 申请类型为变更,项目类型为责任部门变更的业务基本信息部分组件 -->
<duty-depart-change-base-info
v-else-if="formInline.applicationType === 2 && formInline.itemCategory === 3"
ref="changeBaseInfo"
:disabled="disabled"
>
</duty-depart-change-base-info>
<!-- 申请类型为变更,项目类型为合并的业务基本信息部分组件 -->
<merge-base-info
v-else-if="formInline.applicationType === 2 && formInline.itemCategory === 4"
ref="changeBaseInfo"
:disabled="disabled"
>
</merge-base-info>
<!-- 部分节点需要选人 -->
<a-form v-if="formInline.applicationType === 2 && [6, 7].includes(currentNode)" class="user-form" :form="userForm">
@@ -146,8 +168,8 @@
</a-form>
<!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
<a-form :form="approvalInfoForm">
<div class="process-part-title" v-if="!onlyLook">{{ $t('processApprovalInformation') }}</div>
<a-form :form="approvalInfoForm" v-if="!onlyLook">
<!--备注-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
@@ -162,11 +184,13 @@
</a-form>
</div>
<!-- 人员信息 -->
<div v-if="switchValue === 'user'" class="scroll-content personnel-info-wrapper">
<personnel-info :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
<div v-if="switchValue === 'user'" class="scroll-content">
<process-detail-list :url="url">
<personnel-info slot="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
</process-detail-list>
</div>
<!-- 操作按钮 -->
<div class="bottom-operate-box">
<div class="bottom-operate-box" v-if="!onlyLook">
<!-- 发起节点 -->
<template v-if="currentNode === 1">
<!-- 保存 -->
@@ -177,7 +201,7 @@
<!-- 变更的新起草部门主管级上一级领导下发节点 -->
<template v-else-if="formInline.applicationType === 2 && [6, 7].includes(currentNode)">
<!-- 转办 -->
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="upload">{{ $t('turnTo') }}</a-button>
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 提交 -->
@@ -189,13 +213,13 @@
</template>
<template v-else>
<!-- 转办 -->
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="upload">{{ $t('turnTo') }}</a-button>
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 同意 -->
<a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
<!-- 驳回 -->
<a-button type="primary" :loading="loading" @click="handleReject" icon="check-circle">{{ $t('reject') }}</a-button>
<a-button type="primary" :loading="loading" @click="handleReject" icon="close-circle">{{ $t('reject') }}</a-button>
</template>
</div>
@@ -216,7 +240,11 @@ import {
enterprisePlanApprovalDetermine
} from '@/api/workCenter'
import ApprovalBaseInfo from './modules/ApprovalBaseInfo'
import ChangeBaseInfo from './modules/ChangeBaseInfo'
import FinishTimeChangeBaseInfo from './modules/FinishTimeChangeBaseInfo'
import ProcessDetailList from '../../../components/ProcessDetailList'
import JobEndBaseInfo from './modules/JobEndBaseInfo'
import DutyDepartChangeBaseInfo from './modules/DutyDepartChangeBaseInfo'
import MergeBaseInfo from './modules/MergeBaseInfo'
// 标准立项的人员信息
const approvalPersonalInfo = [ // 人员信息的数据
@@ -338,7 +366,11 @@ const changePersonalInfo = [
export default {
name: 'PlanApprovalFlow',
components: {
ChangeBaseInfo,
MergeBaseInfo,
DutyDepartChangeBaseInfo,
JobEndBaseInfo,
ProcessDetailList,
FinishTimeChangeBaseInfo,
ApprovalBaseInfo,
UserSelectModal,
PersonnelInfo,
@@ -354,9 +386,21 @@ export default {
'formInline.applicationType' (value) {
if (value) {
if (this.formInline.applicationType === 1) {
this.personnelInfoData = approvalPersonalInfo
if (this.currentNode === 1) {
this.personnelInfoData = approvalPersonalInfo
} else {
this.personnelInfoData = approvalPersonalInfo.map(item => {
return { ...item, canChoose: false }
})
}
} else {
this.personnelInfoData = changePersonalInfo
if (this.currentNode === 1) {
this.personnelInfoData = changePersonalInfo
} else {
this.personnelInfoData = changePersonalInfo.map(item => {
return { ...item, canChoose: false }
})
}
}
}
if (this.formInline.itemCategory) {
@@ -365,14 +409,26 @@ export default {
}
},
mounted () {
this.personnelInfoData = approvalPersonalInfo
if (this.currentNode === 1) {
this.personnelInfoData = approvalPersonalInfo
} else {
this.personnelInfoData = approvalPersonalInfo.map(item => {
return { ...item, canChoose: false }
})
}
// 如果是查看进入的,不可编辑
if (this.$route.query.onlyLook) {
this.onlyLook = this.$route.query.onlyLook
this.disabled = this.$route.query.onlyLook
}
},
data () {
return {
loading: false,
switchValue: 'base', // 头部tab选中值
disabled: false,
currentNode: 1, // 当前节点
onlyLook: false, // 是否仅查看
currentNode: 2, // 当前节点
model: {},
processInfoForm: this.$form.createForm(this),
labelCol: {
@@ -441,7 +497,10 @@ export default {
},
userForm: this.$form.createForm(this), // 部分节点需要选人的表单
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
personnelInfoData: []
personnelInfoData: [],
url: {
list: '' // 人员信息的右侧表格获取接口
}
}
},
methods: {
@@ -681,10 +740,4 @@ export default {
}
}
// 人员信息
.personnel-info-wrapper {
/deep/ .ant-steps {
width: 400px;
}
}
</style>
@@ -12,7 +12,7 @@
<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>
@@ -28,7 +28,7 @@
: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>
@@ -274,7 +274,7 @@
</span>
</div>
<a-form-model-item class="item-model" prop="compilationIllustration">
<a-button type="primary" class="button-text" :disabled="disabled" @click="clickButtonToUpload('compilationIllustration')">
<a-button type="primary" class="button-text" @click="clickButtonToUpload('compilationIllustration')">
{{
(formInline.compilationIllustration === 'null' || formInline.compilationIllustration === ''
|| formInline.compilationIllustration === null || formInline.compilationIllustration === undefined)
@@ -577,7 +577,7 @@
</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')">
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('uploadAttachment')">
{{
(formInline.uploadAttachment === 'null' || formInline.uploadAttachment === ''
|| formInline.uploadAttachment === null || formInline.uploadAttachment === undefined)
@@ -591,7 +591,7 @@
</div>
<!-- 上传文件弹框 -->
<upload-file ref="uploadFile" :file-max-size="fileMaxSize" @change="uploadFileChange" :return-url="false"></upload-file>
<upload-file ref="uploadFile" :file-max-size="fileMaxSize" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
</a-form-model>
</template>
@@ -862,73 +862,13 @@ export default {
</script>
<style scoped lang="less">
@import '~@assets/less/common.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%;
}
@@ -0,0 +1,314 @@
<template>
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<div class="collapsible-panel-form">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
<!-- 企标编号 -->
<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="enterpriseStandardPlanId">
<enterprise-plan-selection type="radio"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')"
v-model="formInline.enterpriseStandardPlanId"
:standard-number="formInline.standardNo"
@standardNumberChange="standardNumberChange"
@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="standardName">
<a-input class="box-input"
disabled
v-model="formInline.standardName"
: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.originPrincipalDrafter')">
{{ $t('workCenter.enterpriseInitChangePlan.originPrincipalDrafter') }}
</span>
</div>
<a-form-model-item class="item-model" prop="principalDrafter">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.originPrincipalDrafter')"
v-model="formInline.principalDrafter"
disabled
filedName="originPrincipalDrafter"
@nameChange="userSelectNameChange"
:nameStr="formInline.originPrincipalDrafter_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.originMainDraftUnit')">
{{ $t('workCenter.enterpriseInitChangePlan.originMainDraftUnit') }}
</span>
</div>
<a-form-model-item class="item-model" prop="originMainDraftUnit">
<j-select-depart v-model="formInline.originMainDraftUnit"
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.originHeadOfMainDraftingUnit')">
{{ $t('workCenter.enterpriseInitChangePlan.originHeadOfMainDraftingUnit') }}
</span>
</div>
<a-form-model-item class="item-model" prop="originHeadOfMainDraftingUnit">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.originHeadOfMainDraftingUnit')"
v-model="formInline.originHeadOfMainDraftingUnit"
disabled
filedName="originHeadOfMainDraftingUnit"
@nameChange="userSelectNameChange"
:nameStr="formInline.originHeadOfMainDraftingUnit_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.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 form-flex-item-long">
<div class="title-text title-text-long">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.changeReason')">
{{ $t('workCenter.enterpriseInitChangePlan.changeReason') }}
</span>
</div>
<a-form-model-item class="item-model" prop="changeReason">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.changeReason')"
:maxLength="500"
v-model="formInline.changeReason" :rows="4" />
</a-form-model-item>
</div>
</div>
</div>
</a-form-model>
</template>
<script>
import EnterprisePlanSelection from '@/components/selection/EnterprisePlanSelection'
import UserSelection from '@/components/selection/UserSelection'
export default {
name: 'DutyDepartChangeBaseInfo',
components: { EnterprisePlanSelection, UserSelection },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
formInline: {},
rules: {
// 企标编号
enterpriseStandardPlanId: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + 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']
}
],
// 变更原因
changeReason: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.changeReason') + this.$t('cannotEmpty'),
trigger: 'blur'
}
]
}
}
},
methods: {
// 企标计划选择完成的企标编号回调
standardNumberChange (value) {
this.formInline.standardNo = value
},
// 企标选编号选择完成的回调
listChange (value) {
console.log(value)
if (value && value.length > 0) {
this.formInline.standardName = value[0].originEnStandardName
this.formInline.principalDrafter_dictText = value[0].mainDraftingUser
this.formInline.mainDraftUnit = value[0].mainDraftingUnit
this.formInline.originPrincipalDrafter_dictText = value[0].mainDraftingUser
this.formInline.originMainDraftUnit = value[0].mainDraftingUnit
}
},
// 选择用户得到用户名
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;
}
.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: 114px;
}
</style>
@@ -42,17 +42,17 @@
</j-table>
</div>
<change-base-info-drawer ref="changeBaseInfoDrawer" @ok="changeBaseInfoDrawerOk"></change-base-info-drawer>
<finish-time-change-base-info-drawer ref="changeBaseInfoDrawer" @ok="changeBaseInfoDrawerOk"></finish-time-change-base-info-drawer>
</div>
</template>
<script>
import ChangeBaseInfoDrawer from './ChangeBaseInfoDrawer'
import FinishTimeChangeBaseInfoDrawer from './FinishTimeChangeBaseInfoDrawer'
import JTable from '@/components/jero/JTable'
export default {
name: 'ChangeBaseInfo',
components: { ChangeBaseInfoDrawer, JTable },
name: 'FinishTimeChangeBaseInfo',
components: { FinishTimeChangeBaseInfoDrawer, JTable },
props: {
disabled: {
type: Boolean,
@@ -196,16 +196,14 @@
</template>
<script>
import { StandardSource } from '@/enums/commonEnums'
import UserSelection from '@/components/selection/UserSelection'
import EnterprisePlanSelection from '@/components/selection/EnterprisePlanSelection'
export default {
name: 'ChangeBaseInfoDrawer',
name: 'FinishTimeChangeBaseInfoDrawer',
components: { EnterprisePlanSelection, UserSelection },
data () {
return {
StandardSource,
visible: false,
confirmLoading: false,
model: {},
@@ -0,0 +1,186 @@
<template>
<div class="change-base-info-wrapper">
<!-- 操作区域 -->
<div class="table-operator">
<!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
{{ $t('newlyAdded') }}
</a-button>
<!-- 批量删除 -->
<a-button icon="delete" type="primary" ghost @click="batchDel" :disabled="disabled">
{{ $t('batchDelete') }}
</a-button>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="enterpriseStandardPlanId"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
<!-- 企标编号/企标名称 -->
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
</div>
</j-table>
</div>
<job-end-base-info-drawer ref="jobEndBaseInfoDrawer" @ok="jobEndBaseInfoDrawerOk"></job-end-base-info-drawer>
</div>
</template>
<script>
import JTable from '@/components/jero/JTable'
import JobEndBaseInfoDrawer from './JobEndBaseInfoDrawer'
export default {
name: 'JobEndBaseInfo',
components: { JobEndBaseInfoDrawer, JTable },
props: {
disabled: {
type: Boolean,
required: false,
default: false
},
currentNode: {
type: Number,
required: false,
default: 1
}
},
data () {
return {
loading: false,
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
width: 80,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 企标编号
title: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum'),
align: 'center',
width: 180,
dataIndex: 'standardNo',
scopedSlots: { customRender: 'toDetail' }
},
{ // 企标名称
title: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName'),
align: 'center',
width: 180,
dataIndex: 'standardName',
scopedSlots: { customRender: 'toDetail' }
},
{ // 主起草人
title: this.$t('workCenter.enterpriseInitChangePlan.principalDrafter'),
align: 'center',
width: 180,
dataIndex: 'principalDrafter_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 主起草单位
title: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftUnit',
scopedSlots: { customRender: 'text' }
},
{ // 变更原因
title: this.$t('workCenter.enterpriseInitChangePlan.changeReason'),
align: 'center',
width: 180,
dataIndex: 'changeReason',
scopedSlots: { customRender: 'text' }
},
{ // 操作
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
dataSource: [],
selectedRowKeys: [],
selectionRows: [],
url: {
list: ''
},
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
}
},
methods: {
// 企标编号,企标名称跳转详情
handleGoDetail (record) {
this.$openPageNewSheet({
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
query: {
standardNumber: record.standardNo
}
})
},
// 表格选中
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
this.selectionRows = selectionRows
},
// 新增或编辑完成
jobEndBaseInfoDrawerOk (value) {
console.log(value, this.modalType)
value.draftPlannedCompleteDate = value.originalDraftPlanFinishDate
value.solicitationDraftPlanCompleteDate = value.originalExposureDraftPlanFinishDate
value.planApprovalDate = value.originalPlanSubmissionDate
if (this.modalType === 'add') {
this.dataSource.push(value)
} else if (this.modalType && this.modalType.split(',')[0] === 'edit') {
this.dataSource.splice(Number(this.modalType.split(',')[1]), 1, value)
}
},
// 新增
handleAdd () {
this.modalType = 'add'
this.$refs.jobEndBaseInfoDrawer.add()
},
// 编辑
handleEdit (record, index) {
this.modalType = 'edit' + index
this.$refs.jobEndBaseInfoDrawer.edit(record)
},
// 删除
handleDelete (id, index) {
this.dataSource.splice(index, 1)
},
// 批量删除
batchDel () {
this.dataSource = this.dataSource.filter(item => !this.selectedRowKeys.includes(item.enterpriseStandardPlanId))
}
}
}
</script>
<style scoped lang="less">
.change-base-info-wrapper {
margin-top: 20px;
}
</style>
@@ -0,0 +1,212 @@
<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="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.enterpriseStandardNum')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enterpriseStandardPlanId">
<enterprise-plan-selection type="radio"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')"
v-model="formInline.enterpriseStandardPlanId"
:standard-number="formInline.standardNo"
@standardNumberChange="standardNumberChange"
@listChange="listChange"/>
</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="standardName">
<a-input class="box-input"
disabled
v-model="formInline.standardName"
:maxLength="50"
: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="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"
filedName="principalDrafter"
disabled
@nameChange="userSelectNameChange"
:nameStr="formInline.principalDrafter_dictText"
type="radio" />
</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.mainDraftUnit')">
{{ $t('workCenter.enterpriseInitChangePlan.mainDraftUnit') }}
</span>
</div>
<a-form-model-item class="item-model" prop="mainDraftUnit">
<j-select-depart v-model="formInline.mainDraftUnit"
disabled
:backDepart="true" />
</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="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.changeReason')">
{{ $t('workCenter.enterpriseInitChangePlan.changeReason') }}
</span>
</div>
<a-form-model-item class="item-model" prop="changeReason">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.changeReason')"
:maxLength="500"
v-model="formInline.changeReason" :rows="4" />
</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>
</a-drawer>
</template>
<script>
import UserSelection from '@/components/selection/UserSelection'
import EnterprisePlanSelection from '@/components/selection/EnterprisePlanSelection'
export default {
name: 'JobEndBaseInfoDrawer',
components: { EnterprisePlanSelection, UserSelection },
data () {
return {
visible: false,
confirmLoading: false,
model: {},
formInline: {},
rules: {
// 企标编号
enterpriseStandardPlanId: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 变更原因
changeReason: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.changeReason') + this.$t('cannotEmpty'),
trigger: 'blur'
}
]
}
}
},
methods: {
add () {
this.edit({})
},
edit (record) {
this.visible = true
this.model = Object.assign({}, record)
this.formInline = Object.assign({}, record)
},
// 企标计划选择完成的企标编号回调
standardNumberChange (value) {
this.formInline.standardNo = value
},
// 企标选编号选择完成的回调
listChange (value) {
console.log(value)
if (value && value.length > 0) {
this.formInline.standardName = value[0].originEnStandardName
this.formInline.principalDrafter_dictText = value[0].mainDraftingUser
this.formInline.mainDraftUnit = value[0].mainDraftingUnit
}
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 取消
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))
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>
@@ -0,0 +1,701 @@
<template>
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<!-- 合并标准信息 -->
<div class="collapsible-panel-form">
<div class="collapsible-panel-form-header">
<span>合并标准信息</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="collapsible-panel-form">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
<!-- 企标编号1 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text"
:title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '1'">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '1' }}
</span>
</div>
<a-form-model-item class="item-model" prop="enterpriseStandardPlanIdOne">
<enterprise-plan-selection type="radio"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')"
v-model="formInline.enterpriseStandardPlanIdOne"
:standard-number="formInline.standardNoOne"
@standardNumberChange="standardNumberChangeOne"
@listChange="listChange"/>
</a-form-model-item>
</div>
<!-- 企标名称1 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text"
:title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + '1'">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + '1' }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardNameOne">
<a-input class="box-input"
disabled
v-model="formInline.standardNameOne"
:maxLength="50"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item>
</div>
<!-- 制修订类型1 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text"
:title="$t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '1'">
{{ $t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '1' }}
</span>
</div>
<a-form-model-item class="item-model" prop="typeOfRevisionOne">
<a-input class="box-input"
disabled
v-model="formInline.typeOfRevisionOne_dictText"
:maxLength="50"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.typeOfRevision')" />
</a-form-model-item>
</div>
<!-- 企标编号2 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text"
:title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '2'">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '2' }}
</span>
</div>
<a-form-model-item class="item-model" prop="enterpriseStandardPlanIdTwo">
<enterprise-plan-selection type="radio"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')"
v-model="formInline.enterpriseStandardPlanIdTwo"
:standard-number="formInline.standardNoTwo"
@standardNumberChange="standardNumberChangeTwo"
@listChange="listChange"/>
</a-form-model-item>
</div>
<!-- 企标名称2 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text"
:title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + '2'">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') + '2' }}
</span>
</div>
<a-form-model-item class="item-model" prop="standardNameTwo">
<a-input class="box-input"
disabled
v-model="formInline.standardNameTwo"
:maxLength="50"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item>
</div>
<!-- 制修订类型2 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text"
:title="$t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '1'">
{{ $t('workCenter.enterpriseInitChangePlan.typeOfRevision') + '1' }}
</span>
</div>
<a-form-model-item class="item-model" prop="typeOfRevisionTwo">
<a-input class="box-input"
disabled
v-model="formInline.typeOfRevisionTwo_dictText"
:maxLength="50"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.typeOfRevision')" />
</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"
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="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"
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"
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="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"
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"
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"
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"
v-model="formInline.yearNumber"
:default-value="yearNumberDefaultValue"
date-format="YYYY"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
</a-form-model-item>
</div>
<!-- 编制说明 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.compilationIllustration')">
{{ $t('workCenter.enterpriseInitChangePlan.compilationIllustration') }}
</span>
</div>
<a-form-model-item class="item-model" prop="compilationIllustration">
<a-button type="primary" class="button-text" @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 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>
</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.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 form-flex-item-long">
<div class="title-text title-text-long">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.scopeOfApplication')">
{{ $t('workCenter.enterpriseInitChangePlan.scopeOfApplication') }}
</span>
</div>
<a-form-model-item class="item-model" prop="scopeOfApplication">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.scopeOfApplication')"
:maxLength="500"
v-model="formInline.scopeOfApplication" :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="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.changeReason')">
{{ $t('workCenter.enterpriseInitChangePlan.changeReason') }}
</span>
</div>
<a-form-model-item class="item-model" prop="changeReason">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.changeReason')"
:maxLength="500"
v-model="formInline.changeReason" :rows="4" />
</a-form-model-item>
</div>
</div>
</div>
</div>
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
</a-form-model>
</template>
<script>
import EnterprisePlanSelection from '@/components/selection/EnterprisePlanSelection'
import UserSelection from '@/components/selection/UserSelection'
import UploadFile from '@/components/UploadFile'
export default {
name: 'MergeBaseInfo',
components: { EnterprisePlanSelection, UserSelection, UploadFile },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
formInline: {},
// 各模块的收齐和展开状态
retractableFlag: {
baseInfo: true, // 基础信息部分
finishDate: true, // 完成日期部分
rangeOfApplication: true // 适用范围部分
},
rules: {
// 企标编号1
enterpriseStandardPlanIdOne: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '1' + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 企标编号2
enterpriseStandardPlanIdTwo: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + '1' + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 新企标名称
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'
}
],
// 企业标准代号
enterpriseStandardCode: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardCode') + 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'
}
],
// 标准等级分类
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']
}
],
// 零部件名称
partName: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.partName') + 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'
}
],
// 变更原因
changeReason: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.changeReason') + this.$t('cannotEmpty'),
trigger: 'blur'
}
]
}
}
},
methods: {
// 改变内容区域收起和展开
handleChangeRetractable (module) {
this.$set(this.retractableFlag, module, !this.retractableFlag[module])
this.$forceUpdate()
},
// 企标计划1选择完成的企标编号回调
standardNumberChangeOne (value) {
this.formInline.standardNoOne = value
},
// 企标计划2选择完成的企标编号的回调
standardNumberChangeTwo (value) {
this.formInline.standardNoTwo = value
},
// 企标选编号1选择完成的回调
listChange (value) {
console.log(value)
if (value && value.length > 0) {
// 企标名称1
this.formInline.standardNameOne = value[0].originEnStandardName
// 制修订类型1
this.formInline.typeOfRevisionOne = value[0].typeOfRevision
// 新企标名称
this.formInline.newEnterpriseStandardName = value[0].originEnStandardName
// 标准英文名称
this.formInline.standardEnglishName = value[0].originEnStandardName
// 标准体系
this.formInline.standardSystem = value[0].originEnStandardName
// 企业标准代号
this.formInline.enterpriseStandardCode = value[0].originEnStandardName
// 企业名称代号
this.formInline.enterpriseNameCode = value[0].originEnStandardName
// 标准类别代号
this.formInline.standardCategoryCode = value[0].originEnStandardName
// 年代号
this.formInline.yearNumber = value[0].originEnStandardName
// 编制说明
this.formInline.compilationIllustration = value[0].originEnStandardName
// 标准等级分类
this.formInline.standardGradeClassification = value[0].originEnStandardName
// 草稿计划完成日期
this.formInline.draftPlanFinishDate = value[0].originEnStandardName
// 征求意见稿计划完成日期
this.formInline.exposureDraftPlanFinishDate = value[0].originEnStandardName
// 计划报批日期
this.formInline.planSubmissionDate = value[0].originEnStandardName
// 零部件名称
this.formInline.partName = value[0].originEnStandardName
// 主起草人
this.formInline.principalDrafter_dictText = value[0].mainDraftingUser
// 主起草单位
this.formInline.mainDraftUnit = value[0].mainDraftingUnit
// 起草单位负责人
this.formInline.headOfMainDraftingUnit = value[0].mainDraftingUnit
// 标准适用范围
this.formInline.scopeOfApplication = value[0].mainDraftingUnit
// 变更原因
this.formInline.changeReason = value[0].mainDraftingUnit
}
},
// 选择用户得到用户名
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-long {
width: 220px;
}
</style>