[update] 修改企标计划立项/变更流程
This commit is contained in:
+262
-23
@@ -11,6 +11,7 @@
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 基础信息 -->
|
||||
<div v-if="switchValue === 'base'" class="scroll-content">
|
||||
<!-- 流程信息 -->
|
||||
<div class="process-part-title">{{ $t('processInformation') }}</div>
|
||||
@@ -36,14 +37,16 @@
|
||||
v-decorator="['expirationDate']" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 流程说明 -->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
:disabled="disabled"
|
||||
v-decorator="['processExplain']" />
|
||||
</a-form-item>
|
||||
<a-col :span="24">
|
||||
<!-- 流程说明 -->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
:disabled="disabled"
|
||||
v-decorator="['processExplain']" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
||||
@@ -90,7 +93,6 @@
|
||||
<a-select v-else
|
||||
v-model="formInline.itemCategory"
|
||||
:disabled="disabled"
|
||||
@change="itemCategoryChange"
|
||||
: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>
|
||||
@@ -107,6 +109,7 @@
|
||||
v-if="formInline.applicationType === 1"
|
||||
ref="approvalBaseInfo"
|
||||
:disabled="disabled"
|
||||
:currentNode="currentNode"
|
||||
:itemCategory="formInline.itemCategory">
|
||||
</approval-base-info>
|
||||
<!-- 申请类型为变更时的业务基本信息部分组件 -->
|
||||
@@ -114,9 +117,34 @@
|
||||
v-else-if="formInline.applicationType === 2"
|
||||
ref="changeBaseInfo"
|
||||
:disabled="disabled"
|
||||
:currentNode="currentNode"
|
||||
>
|
||||
</change-base-info>
|
||||
|
||||
<!-- 部分节点需要选人 -->
|
||||
<a-form v-if="formInline.applicationType === 2 && [6, 7].includes(currentNode)" class="user-form" :form="userForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<!-- 所长,节点6需要选所长 -->
|
||||
<a-form-item v-if="currentNode === 6" :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enterpriseInitChangePlan.superintendent')">
|
||||
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.enterpriseInitChangePlan.superintendent')"
|
||||
type="radio"
|
||||
v-decorator="['superintendent', validatorRules.superintendent]"
|
||||
input-type="textarea" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<!-- 相关人员,节点7需要选相关人员 -->
|
||||
<a-form-item v-if="currentNode === 7" :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enterpriseInitChangePlan.relatedPersonnel')">
|
||||
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.enterpriseInitChangePlan.relatedPersonnel')"
|
||||
type="checkbox"
|
||||
v-decorator="['relatedPersonnel', validatorRules.relatedPersonnel]"
|
||||
input-type="textarea" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
||||
<!-- 流程审批信息 -->
|
||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||
<a-form :form="approvalInfoForm">
|
||||
@@ -133,18 +161,33 @@
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 人员信息 -->
|
||||
<div v-if="switchValue === 'user'" class="scroll-content">
|
||||
<personnel-info></personnel-info>
|
||||
<personnel-info :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
|
||||
</div>
|
||||
<!-- 操作按钮 -->
|
||||
<div class="bottom-operate-box">
|
||||
<!-- 发起节点 -->
|
||||
<template v-if="currentNode === 1">
|
||||
<!-- 保存 -->
|
||||
<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="handleSubmit" icon="upload">{{ $t('agree') }}</a-button>
|
||||
</template>
|
||||
<template v-if="currentNode === 2">
|
||||
<!-- 变更的新起草部门主管级上一级领导下发节点 -->
|
||||
<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="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
|
||||
<!-- 提交 -->
|
||||
<a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('agree') }}</a-button>
|
||||
</template>
|
||||
<template v-else-if="formInline.applicationType === 2 && currentNode === 9">
|
||||
<!-- 确定, 谁发起的谁点确定抄送消息 -->
|
||||
<a-button type="primary" :loading="loading" @click="handleDetermine" icon="upload">{{ $t('determine') }}</a-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!-- 转办 -->
|
||||
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="upload">{{ $t('turnTo') }}</a-button>
|
||||
<!-- 保存 -->
|
||||
@@ -165,14 +208,133 @@
|
||||
import InternalDetailPage from '@/components/InternalDetailPage'
|
||||
import PersonnelInfo from '@/components/PersonnelInfo'
|
||||
import UserSelectModal from '@/components/selection/UserSelectModal'
|
||||
import UserSelection from '@/components/selection/UserSelection'
|
||||
import {
|
||||
enterprisePlanApprovalTurnTo,
|
||||
enterprisePlanApprovalAgree,
|
||||
enterprisePlanApprovalReject
|
||||
enterprisePlanApprovalReject,
|
||||
enterprisePlanApprovalDetermine
|
||||
} from '@/api/workCenter'
|
||||
import ApprovalBaseInfo from './modules/ApprovalBaseInfo'
|
||||
import ChangeBaseInfo from './modules/ChangeBaseInfo'
|
||||
|
||||
// 标准立项的人员信息
|
||||
const approvalPersonalInfo = [ // 人员信息的数据
|
||||
{
|
||||
id: 1,
|
||||
nodeName: '主起草人发起',
|
||||
nodeRoleName: '发起人',
|
||||
canChoose: false
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
nodeName: '部所联络人校对',
|
||||
nodeRoleName: '部所联络人',
|
||||
canChoose: true,
|
||||
chooseType: 'radio',
|
||||
chooseSource: 'contactManage'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
nodeName: '专家审批',
|
||||
nodeRoleName: '专家',
|
||||
canChoose: true,
|
||||
chooseType: 'checkbox',
|
||||
chooseSource: 'workGroup'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
nodeName: '发起人主管级领导审批',
|
||||
nodeRoleName: '发起人主管级领导',
|
||||
canChoose: true,
|
||||
chooseType: 'radio'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
nodeName: '发起人主管级上级领导审批',
|
||||
nodeRoleName: '发起人主管级上级领导',
|
||||
canChoose: true,
|
||||
chooseType: 'radio'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
nodeName: '标准化审批',
|
||||
nodeRoleName: '标准化',
|
||||
canChoose: true,
|
||||
chooseType: 'radio'
|
||||
}
|
||||
]
|
||||
// 变更的人员信息
|
||||
const changePersonalInfo = [
|
||||
{
|
||||
id: 1,
|
||||
nodeName: '主起草人发起',
|
||||
nodeRoleName: '发起人',
|
||||
canChoose: false
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
nodeName: '部所联络人校对',
|
||||
nodeRoleName: '部所联络人',
|
||||
canChoose: true,
|
||||
chooseType: 'radio',
|
||||
chooseSource: 'contactManage'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
nodeName: '主起草人主管级领导审批',
|
||||
nodeRoleName: '主起草人主管级领导',
|
||||
canChoose: true,
|
||||
chooseType: 'radio'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
nodeName: '主起草人主管级上一级领导审批',
|
||||
nodeRoleName: '主起草人主管级上一级领导',
|
||||
canChoose: true,
|
||||
chooseType: 'radio'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
nodeName: '标准化审批',
|
||||
nodeRoleName: '标准化',
|
||||
canChoose: true,
|
||||
chooseType: 'radio'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
nodeName: '新起草部门主管级上一级领导下发',
|
||||
nodeRoleName: '新起草部门主管级上一级领导',
|
||||
canChoose: true,
|
||||
chooseType: 'radio',
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
nodeName: '新起草部门主管级领导确认',
|
||||
nodeRoleName: '新起草部门主管级领导',
|
||||
canChoose: true,
|
||||
chooseType: 'radio',
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
nodeName: '相关人员会签',
|
||||
nodeRoleName: '相关人员',
|
||||
canChoose: true,
|
||||
chooseType: 'checkbox',
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
nodeName: '抄送主起草人',
|
||||
nodeRoleName: '主起草人',
|
||||
canChoose: true,
|
||||
chooseType: 'checkbox',
|
||||
disabled: true
|
||||
},
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'PlanApprovalFlow',
|
||||
components: {
|
||||
@@ -180,19 +342,37 @@ export default {
|
||||
ApprovalBaseInfo,
|
||||
UserSelectModal,
|
||||
PersonnelInfo,
|
||||
InternalDetailPage
|
||||
InternalDetailPage,
|
||||
UserSelection
|
||||
},
|
||||
computed: {
|
||||
pageTitle () {
|
||||
return this.$t('flowCenter') + this.$route.meta.title
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'formInline.applicationType' (value) {
|
||||
if (value) {
|
||||
if (this.formInline.applicationType === 1) {
|
||||
this.personnelInfoData = approvalPersonalInfo
|
||||
} else {
|
||||
this.personnelInfoData = changePersonalInfo
|
||||
}
|
||||
}
|
||||
if (this.formInline.itemCategory) {
|
||||
this.formInline.itemCategory = undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.personnelInfoData = approvalPersonalInfo
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
switchValue: 'base', // 头部tab选中值
|
||||
disabled: false,
|
||||
currentNode: 2, // 当前节点
|
||||
currentNode: 1, // 当前节点
|
||||
model: {},
|
||||
processInfoForm: this.$form.createForm(this),
|
||||
labelCol: {
|
||||
@@ -224,6 +404,20 @@ export default {
|
||||
{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }
|
||||
],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 所长
|
||||
superintendent: {
|
||||
rules: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.enterpriseInitChangePlan.superintendent') }
|
||||
],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
// 相关人员
|
||||
relatedPersonnel: {
|
||||
rules: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.enterpriseInitChangePlan.relatedPersonnel') }
|
||||
],
|
||||
validateTrigger: 'change'
|
||||
}
|
||||
},
|
||||
formInline: {},
|
||||
@@ -245,7 +439,9 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
approvalInfoForm: this.$form.createForm(this) // 审批信息表单
|
||||
userForm: this.$form.createForm(this), // 部分节点需要选人的表单
|
||||
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
|
||||
personnelInfoData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -255,6 +451,7 @@ export default {
|
||||
},
|
||||
// 项目类别改变
|
||||
itemCategoryChange (value) {
|
||||
console.log(value)
|
||||
if (value === 1) {
|
||||
this.$refs.approvalBaseInfo.rules.enterpriseStandardName[0].required = true
|
||||
} else {
|
||||
@@ -270,14 +467,27 @@ export default {
|
||||
if (this.loading) return
|
||||
this.processInfoForm.validateFields((err, values) => {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
this.$refs.approvalBaseInfo.$refs.ruleForm.validate(approvalBaseValid => {
|
||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||
if (valid && approvalBaseValid && !err && !approvalErr) {
|
||||
this.loading = true
|
||||
const param = Object.assign({}, this.$refs.approvalBaseInfo.formInline)
|
||||
console.log(param)
|
||||
}
|
||||
})
|
||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||
// 立项和变更的数据不一样,分开判断
|
||||
if (this.formInline.applicationType === 1) {
|
||||
// 是立项
|
||||
this.$refs.approvalBaseInfo.$refs.ruleForm.validate(approvalBaseValid => {
|
||||
if (valid && approvalBaseValid && !err && !approvalErr) {
|
||||
this.loading = true
|
||||
const param = Object.assign({}, this.$refs.approvalBaseInfo.formInline)
|
||||
console.log(param)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// 是变更
|
||||
this.userForm.validateFields((userErr, userValues) => {
|
||||
if (valid && !err && !approvalErr && !userErr) {
|
||||
this.loading = true
|
||||
const param = this.$refs.changeBaseInfo.dataSource
|
||||
console.log(param)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -352,6 +562,28 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 确定
|
||||
handleDetermine () {
|
||||
if (this.loading) return
|
||||
this.approvalInfoForm.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.loading = true
|
||||
let param = {}
|
||||
param = Object.assign({}, values)
|
||||
param.processId = this.model.id
|
||||
enterprisePlanApprovalDetermine(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
this.validatorRules.remarks.rules[0].required = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -441,4 +673,11 @@ export default {
|
||||
overflow: auto;
|
||||
padding: 32px;
|
||||
}
|
||||
|
||||
.user-form {
|
||||
margin-top: 24px;
|
||||
/deep/ .ant-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
rowKey="enterpriseStandardPlanId"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
@@ -34,32 +34,35 @@
|
||||
</template>
|
||||
|
||||
<!-- 操作栏 -->
|
||||
<div slot="action" slot-scope="{record}" class="action-span-cell">
|
||||
<a @click="handleEdit(record)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
|
||||
<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)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
|
||||
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
|
||||
</div>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
<change-base-info-drawer ref="changeBaseInfoDrawer"></change-base-info-drawer>
|
||||
<change-base-info-drawer ref="changeBaseInfoDrawer" @ok="changeBaseInfoDrawerOk"></change-base-info-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ChangeBaseInfoDrawer from './ChangeBaseInfoDrawer'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
|
||||
export default {
|
||||
name: 'ChangeBaseInfo',
|
||||
components: { ChangeBaseInfoDrawer, JTable },
|
||||
mixins: [JeroListMixin],
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
currentNode: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -94,14 +97,14 @@ export default {
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.principalDrafter'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'mainDraftingUser',
|
||||
dataIndex: 'principalDrafter_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 主起草单位
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'mainDraftingUnit',
|
||||
dataIndex: 'mainDraftUnit',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 原草稿计划完成日期
|
||||
@@ -114,7 +117,7 @@ export default {
|
||||
{ // 原征求意见稿计划完成日期
|
||||
title: this.$t('workCenter.enterpriseInitChangePlan.originalExposureDraftPlanFinishDate'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
width: 210,
|
||||
dataIndex: 'originalExposureDraftPlanFinishDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
@@ -158,10 +161,9 @@ export default {
|
||||
selectedRowKeys: [],
|
||||
selectionRows: [],
|
||||
url: {
|
||||
list: '',
|
||||
delete: '',
|
||||
deleteBatch: ''
|
||||
}
|
||||
list: ''
|
||||
},
|
||||
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -179,13 +181,35 @@ export default {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectionRows = selectionRows
|
||||
},
|
||||
// 新增或编辑完成
|
||||
changeBaseInfoDrawerOk (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.changeBaseInfoDrawer.add()
|
||||
},
|
||||
// 编辑
|
||||
handleEdit (record) {
|
||||
handleEdit (record, index) {
|
||||
this.modalType = 'edit' + index
|
||||
this.$refs.changeBaseInfoDrawer.edit(record)
|
||||
},
|
||||
// 删除
|
||||
handleDelete (id, index) {
|
||||
this.dataSource.splice(index, 1)
|
||||
},
|
||||
// 批量删除
|
||||
batchDel () {
|
||||
this.dataSource = this.dataSource.filter(item => !this.selectedRowKeys.includes(item.enterpriseStandardPlanId))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+65
-40
@@ -21,11 +21,13 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="enterpriseStandardNum">
|
||||
<standard-selection :source="StandardSource.ENTERPRISE.value"
|
||||
:disabledSourceSearch="true"
|
||||
v-model="formInline.enterpriseStandardNum"
|
||||
@listChange="listChange"/>
|
||||
<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>
|
||||
<!-- 企标名称 -->
|
||||
@@ -36,10 +38,10 @@
|
||||
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="enterpriseStandardName">
|
||||
<a-form-model-item class="item-model" prop="standardName">
|
||||
<a-input class="box-input"
|
||||
disabled
|
||||
v-model="formInline.enterpriseStandardName"
|
||||
v-model="formInline.standardName"
|
||||
:maxLength="50"
|
||||
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
|
||||
</a-form-model-item>
|
||||
@@ -171,6 +173,7 @@
|
||||
<!-- 变更原因 -->
|
||||
<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>
|
||||
@@ -194,12 +197,12 @@
|
||||
|
||||
<script>
|
||||
import { StandardSource } from '@/enums/commonEnums'
|
||||
import StandardSelection from '@/components/selection/StandardSelection'
|
||||
import UserSelection from '@/components/selection/UserSelection'
|
||||
import EnterprisePlanSelection from '../../../../../components/selection/EnterprisePlanSelection'
|
||||
|
||||
export default {
|
||||
name: 'ChangeBaseInfoDrawer',
|
||||
components: { StandardSelection, UserSelection },
|
||||
components: { EnterprisePlanSelection, UserSelection },
|
||||
data () {
|
||||
return {
|
||||
StandardSource,
|
||||
@@ -209,12 +212,44 @@ export default {
|
||||
formInline: {},
|
||||
rules: {
|
||||
// 企标编号
|
||||
enterpriseStandardNum: [
|
||||
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'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -228,41 +263,25 @@ export default {
|
||||
this.model = Object.assign({}, record)
|
||||
this.formInline = Object.assign({}, record)
|
||||
},
|
||||
// 企标计划选择完成的企标编号回调
|
||||
standardNumberChange (value) {
|
||||
this.formInline.standardNo = value
|
||||
},
|
||||
// 企标选编号选择完成的回调
|
||||
listChange (value) {
|
||||
// todo: 三个有校验的日期验证不会消失
|
||||
console.log(value)
|
||||
// 企标名称
|
||||
const serialNameArr = []
|
||||
// 主起草人
|
||||
const principalDrafterArr = []
|
||||
// 主起草单位
|
||||
const mainDraftUnitArr = []
|
||||
// 草稿计划完成日期
|
||||
const draftPlanFinishDateArr = []
|
||||
// 征求意见稿计划完成日期
|
||||
const exposureDraftPlanFinishDateArr = []
|
||||
// 计划报批日期
|
||||
const planSubmissionDateArr = []
|
||||
if (value && value.length > 0) {
|
||||
value.forEach(res => {
|
||||
serialNameArr.push(res.standardName || '')
|
||||
principalDrafterArr.push(res.principalDrafter)
|
||||
mainDraftUnitArr.push(res.mainDraftUnit)
|
||||
draftPlanFinishDateArr.push(res.draftPlanFinishDate || '')
|
||||
exposureDraftPlanFinishDateArr.push(res.exposureDraftPlanFinishDate || '')
|
||||
planSubmissionDateArr.push(res.planSubmissionDate || '')
|
||||
})
|
||||
this.formInline.standardName = value[0].originEnStandardName
|
||||
this.formInline.principalDrafter_dictText = value[0].mainDraftingUser
|
||||
this.formInline.mainDraftUnit = value[0].mainDraftingUnit
|
||||
this.formInline.originalDraftPlanFinishDate = value[0].draftPlannedCompleteDate
|
||||
this.formInline.originalExposureDraftPlanFinishDate = value[0].solicitationDraftPlanCompleteDate
|
||||
this.formInline.originalPlanSubmissionDate = value[0].planApprovalDate
|
||||
this.formInline.draftPlanFinishDate = value[0].draftPlannedCompleteDate
|
||||
this.formInline.exposureDraftPlanFinishDate = value[0].solicitationDraftPlanCompleteDate
|
||||
this.formInline.planSubmissionDate = value[0].planApprovalDate
|
||||
}
|
||||
// const formInline = {}
|
||||
this.formInline.enterpriseStandardName = serialNameArr.join(',')
|
||||
this.formInline.principalDrafter = principalDrafterArr.join(',')
|
||||
this.formInline.mainDraftUnit = mainDraftUnitArr.join(',')
|
||||
this.formInline.originalDraftPlanFinishDate = draftPlanFinishDateArr.join(',')
|
||||
this.formInline.originalExposureDraftPlanFinishDate = exposureDraftPlanFinishDateArr.join(',')
|
||||
this.formInline.originalPlanSubmissionDate = planSubmissionDateArr.join(',')
|
||||
this.formInline.draftPlanFinishDate = draftPlanFinishDateArr.join(',')
|
||||
this.formInline.exposureDraftPlanFinishDate = exposureDraftPlanFinishDateArr.join(',')
|
||||
this.formInline.planSubmissionDate = planSubmissionDateArr.join(',')
|
||||
},
|
||||
// 选择用户得到用户名
|
||||
userSelectNameChange (value, fieldName) {
|
||||
@@ -276,12 +295,18 @@ export default {
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user