[update] 修改标准化发起流程

This commit is contained in:
lideqin
2023-12-19 18:56:46 +08:00
parent 74dab3fa6a
commit 8e95a66b79
4 changed files with 34 additions and 25 deletions
@@ -149,10 +149,10 @@ export default {
methods: { methods: {
open (value) { open (value) {
this.visible = true this.visible = true
this.loadData()
if (value) { if (value) {
this.selectedRowKeys = value.split(',') this.selectedRowKeys = value.split(',')
this.getUserListByIds(value) this.getUserListByIds(value)
this.loadData()
} }
}, },
searchReset () { searchReset () {
@@ -196,7 +196,7 @@
<!-- 企标名称 原企标名称 --> <!-- 企标名称 原企标名称 -->
<div class="box-title-text form-flex-item-half"> <div class="box-title-text form-flex-item-half">
<div class="title-text"> <div class="title-text">
<span v-if="rules.originEnStandardName[0].required" class="required">*</span> <span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')"> <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }} {{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span> </span>
@@ -332,7 +332,7 @@
<a-date-picker <a-date-picker
v-model="formInline.draftPlannedCompleteDate" v-model="formInline.draftPlannedCompleteDate"
:showTime="false" :showTime="false"
:disabled="currentNode === 7 ? draftPlanFinishDateDisabled : (disabled || draftPlanFinishDateDisabled)" :disabled="[6, 7].includes(currentNode) ? draftPlanFinishDateDisabled : (disabled || draftPlanFinishDateDisabled)"
value-format="YYYY-MM-DD"> value-format="YYYY-MM-DD">
</a-date-picker> </a-date-picker>
</a-form-model-item> </a-form-model-item>
@@ -349,7 +349,7 @@
<a-date-picker <a-date-picker
v-model="formInline.solicitationDraftPlanCompleteDate" v-model="formInline.solicitationDraftPlanCompleteDate"
:showTime="false" :showTime="false"
:disabled="currentNode === 7 ? exposureDraftPlanFinishDateDisabled : (disabled || exposureDraftPlanFinishDateDisabled)" :disabled="[6, 7].includes(currentNode) ? exposureDraftPlanFinishDateDisabled : (disabled || exposureDraftPlanFinishDateDisabled)"
value-format="YYYY-MM-DD"> value-format="YYYY-MM-DD">
</a-date-picker> </a-date-picker>
</a-form-model-item> </a-form-model-item>
@@ -366,7 +366,7 @@
<a-date-picker <a-date-picker
v-model="formInline.planApprovalDate" v-model="formInline.planApprovalDate"
:showTime="false" :showTime="false"
:disabled="currentNode === 7 ? planSubmissionDateDisabled : (disabled || planSubmissionDateDisabled)" :disabled="[6, 7].includes(currentNode) ? planSubmissionDateDisabled : (disabled || planSubmissionDateDisabled)"
value-format="YYYY-MM-DD"> value-format="YYYY-MM-DD">
</a-date-picker> </a-date-picker>
</a-form-model-item> </a-form-model-item>
@@ -785,20 +785,23 @@ export default {
this.model = Object.assign({}, record) this.model = Object.assign({}, record)
this.formInline = Object.assign({}, record) this.formInline = Object.assign({}, record)
// 三个日期,如果标准化填写了,主起草人不能修改,标准化未填写,联络人必填 // 三个日期,如果标准化填写了,主起草人不能修改,标准化未填写,联络人必填
// 找出最初的这条表格数据
const dItem = this.initDataSource.find(item => item.id === this.formInline.id)
console.log(dItem)
if ([6].includes(this.currentNode)) { if ([6].includes(this.currentNode)) {
// 是主起草人的编辑 // 是主起草人的编辑
// 草稿计划完成日期的处理 // 草稿计划完成日期的处理
if (this.formInline.draftPlannedCompleteDate) { if (dItem.draftPlannedCompleteDate) {
// 草稿计划完成日期已经填写了, 主起草人不能修改 // 草稿计划完成日期已经填写了, 主起草人不能修改
this.draftPlanFinishDateDisabled = true this.draftPlanFinishDateDisabled = true
} }
// 征求意见稿计划完成日期 // 征求意见稿计划完成日期
if (this.formInline.solicitationDraftPlanCompleteDate) { if (dItem.solicitationDraftPlanCompleteDate) {
// 征求意见稿计划完成日期已经填写了, 主起草人不能修改 // 征求意见稿计划完成日期已经填写了, 主起草人不能修改
this.exposureDraftPlanFinishDateDisabled = true this.exposureDraftPlanFinishDateDisabled = true
} }
// 计划报批日期 // 计划报批日期
if (this.formInline.planApprovalDate) { if (dItem.planApprovalDate) {
// 计划报批日期已经填写了, 主起草人不能修改 // 计划报批日期已经填写了, 主起草人不能修改
this.planSubmissionDateDisabled = true this.planSubmissionDateDisabled = true
} }
@@ -810,7 +813,7 @@ export default {
// 是联络人的编辑,只能编辑3个日期,如果标准化填过了不能修改,未填的话必填 // 是联络人的编辑,只能编辑3个日期,如果标准化填过了不能修改,未填的话必填
this.disabled = true this.disabled = true
// 草稿计划完成日期的处理 // 草稿计划完成日期的处理
if (!this.formInline.draftPlannedCompleteDate) { if (!dItem.draftPlannedCompleteDate) {
// 草稿计划完成日期没有填写, 联络人必填 // 草稿计划完成日期没有填写, 联络人必填
this.rules.draftPlannedCompleteDate[0].required = true this.rules.draftPlannedCompleteDate[0].required = true
} else { } else {
@@ -818,7 +821,7 @@ export default {
this.draftPlanFinishDateDisabled = true this.draftPlanFinishDateDisabled = true
} }
// 征求意见稿计划完成日期 // 征求意见稿计划完成日期
if (!this.formInline.solicitationDraftPlanCompleteDate) { if (!dItem.solicitationDraftPlanCompleteDate) {
// 征求意见稿计划完成日期没有填写, 联络人必填 // 征求意见稿计划完成日期没有填写, 联络人必填
this.rules.solicitationDraftPlanCompleteDate[0].required = true this.rules.solicitationDraftPlanCompleteDate[0].required = true
} else { } else {
@@ -826,7 +829,7 @@ export default {
this.exposureDraftPlanFinishDateDisabled = true this.exposureDraftPlanFinishDateDisabled = true
} }
// 计划报批日期 // 计划报批日期
if (!this.formInline.planApprovalDate) { if (!dItem.planApprovalDate) {
// 计划报批日期没有填写, 联络人必填 // 计划报批日期没有填写, 联络人必填
this.rules.planApprovalDate[0].required = true this.rules.planApprovalDate[0].required = true
} else { } else {
@@ -947,6 +950,9 @@ export default {
this.formInline = {} this.formInline = {}
this.visible = false this.visible = false
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
this.draftPlanFinishDateDisabled = false
this.exposureDraftPlanFinishDateDisabled = false
this.planSubmissionDateDisabled = false
}, },
// 提交 // 提交
handleSubmit () { handleSubmit () {
@@ -246,7 +246,7 @@ export default {
width: 300, width: 300,
dataIndex: 'contactUser', dataIndex: 'contactUser',
customRender: (value, row, index) => { customRender: (value, row, index) => {
if (this.isRejectedTodo) { if (this.isRejectedTodo && row.id) {
// 是被驳回的待办 // 是被驳回的待办
return this.dataSource[index].contactUser_dictText return this.dataSource[index].contactUser_dictText
} else { } else {
@@ -278,15 +278,20 @@ export default {
selectNames: '' // 选完人的名字,批量设置人需要用 selectNames: '' // 选完人的名字,批量设置人需要用
} }
}, },
mounted () { watch: {
/** currentNode: {
* 需要能判断是否是被驳回,产生的待办点击进入的,是的话需要显示带出被驳回的法规的联络人, immediate: true,
* 并且去掉批量设置联络人按钮,如需修改联络人,删除该标准重新走标准化发起流程 ?? handler (val) {
*/ /**
if (this.$route.query.currentNode && this.$route.query.currentNode === 3) { * 需要能判断是否是被驳回,产生的待办点击进入的,是的话需要显示带出被驳回的法规的联络人,
this.isRejectedTodo = true * 并且去掉批量设置联络人按钮,如需修改联络人,删除该标准重新走标准化发起流程 ??
} else { */
this.isRejectedTodo = false if (val && ([3, 10].includes(val))) {
this.isRejectedTodo = true
} else {
this.isRejectedTodo = false
}
}
} }
}, },
methods: { methods: {
@@ -216,10 +216,8 @@ export default {
console.log('------执行initData了--------') console.log('------执行initData了--------')
// 给表格赋值 // 给表格赋值
this.dataSource = data this.dataSource = data
if (this.currentNode === 6) { // 记录最开始的表格数据,方便编辑对比是否
// 是主起草人填写信息节点 this.initDataSource = JSON.parse(JSON.stringify(data))
this.initDataSource = JSON.parse(JSON.stringify(data))
}
}, },
// 外层要获取数据 // 外层要获取数据
getData () { getData () {