[update] 标准化发起流程修改
This commit is contained in:
+23
-22
@@ -331,7 +331,7 @@
|
|||||||
<a-date-picker
|
<a-date-picker
|
||||||
v-model="formInline.draftPlannedCompleteDate"
|
v-model="formInline.draftPlannedCompleteDate"
|
||||||
:showTime="false"
|
:showTime="false"
|
||||||
:disabled="editRole === 'contact' ? draftPlanFinishDateDisabled : (disabled || draftPlanFinishDateDisabled)"
|
:disabled="currentNode === 7 ? 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>
|
||||||
@@ -348,7 +348,7 @@
|
|||||||
<a-date-picker
|
<a-date-picker
|
||||||
v-model="formInline.solicitationDraftPlanCompleteDate"
|
v-model="formInline.solicitationDraftPlanCompleteDate"
|
||||||
:showTime="false"
|
:showTime="false"
|
||||||
:disabled="editRole === 'contact' ? exposureDraftPlanFinishDateDisabled : (disabled || exposureDraftPlanFinishDateDisabled)"
|
:disabled="currentNode === 7 ? 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>
|
||||||
@@ -365,7 +365,7 @@
|
|||||||
<a-date-picker
|
<a-date-picker
|
||||||
v-model="formInline.planApprovalDate"
|
v-model="formInline.planApprovalDate"
|
||||||
:showTime="false"
|
:showTime="false"
|
||||||
:disabled="editRole === 'contact' ? planSubmissionDateDisabled : (disabled || planSubmissionDateDisabled)"
|
:disabled="currentNode === 7 ? 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>
|
||||||
@@ -523,14 +523,13 @@ export default {
|
|||||||
components: { UserSelection, StandardSelection, UploadFile, TreeSelection },
|
components: { UserSelection, StandardSelection, UploadFile, TreeSelection },
|
||||||
props: {
|
props: {
|
||||||
/**
|
/**
|
||||||
* 编辑角色,是主起草人的话三个日期标准化填了的,主起草人不能修改;是联络人的话标准化未填写,联络人必填
|
* 部所联络人汇总节点的话三个日期标准化填了的,主起草人不能修改;是联络人的话标准化未填写,联络人必填
|
||||||
* drafter: 主起草人
|
|
||||||
* contact: 联络人
|
|
||||||
*/
|
*/
|
||||||
editRole: {
|
// 当前节点
|
||||||
type: String,
|
currentNode: {
|
||||||
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
default: ''
|
default: 1
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 来源:是tableBaseInfo的话必填项不一样
|
* 来源:是tableBaseInfo的话必填项不一样
|
||||||
@@ -750,7 +749,9 @@ export default {
|
|||||||
this.initStandardSystemOptions()
|
this.initStandardSystemOptions()
|
||||||
if (this.source === 'tableBaseInfo') {
|
if (this.source === 'tableBaseInfo') {
|
||||||
for (const item of Object.values(this.rules)) {
|
for (const item of Object.values(this.rules)) {
|
||||||
item[0].required = true
|
if (!['draftPlannedCompleteDate', 'solicitationDraftPlanCompleteDate', 'planApprovalDate'].includes(item)) {
|
||||||
|
item[0].required = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.rules = Object.assign({}, this.rules)
|
this.rules = Object.assign({}, this.rules)
|
||||||
console.log(this.rules)
|
console.log(this.rules)
|
||||||
@@ -775,7 +776,7 @@ export default {
|
|||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
this.formInline = Object.assign({}, record)
|
this.formInline = Object.assign({}, record)
|
||||||
// 三个日期,如果标准化填写了,主起草人不能修改,标准化未填写,联络人必填
|
// 三个日期,如果标准化填写了,主起草人不能修改,标准化未填写,联络人必填
|
||||||
if (this.editRole === 'drafter') {
|
if ([6].includes(this.currentNode)) {
|
||||||
// 是主起草人的编辑
|
// 是主起草人的编辑
|
||||||
// 草稿计划完成日期的处理
|
// 草稿计划完成日期的处理
|
||||||
if (this.formInline.draftPlannedCompleteDate) {
|
if (this.formInline.draftPlannedCompleteDate) {
|
||||||
@@ -792,7 +793,11 @@ export default {
|
|||||||
// 计划报批日期已经填写了, 主起草人不能修改
|
// 计划报批日期已经填写了, 主起草人不能修改
|
||||||
this.planSubmissionDateDisabled = true
|
this.planSubmissionDateDisabled = true
|
||||||
}
|
}
|
||||||
} else if (this.editRole === 'contact') {
|
// 三个日期不必填
|
||||||
|
this.rules.draftPlannedCompleteDate[0].required = false
|
||||||
|
this.rules.solicitationDraftPlanCompleteDate[0].required = false
|
||||||
|
this.rules.planApprovalDate[0].required = false
|
||||||
|
} else if ([7].includes(this.currentNode)) {
|
||||||
// 是联络人的编辑,只能编辑3个日期,如果标准化填过了不能修改,未填的话必填
|
// 是联络人的编辑,只能编辑3个日期,如果标准化填过了不能修改,未填的话必填
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
// 草稿计划完成日期的处理
|
// 草稿计划完成日期的处理
|
||||||
@@ -823,21 +828,17 @@ export default {
|
|||||||
if (!this.formInline.applicationType) {
|
if (!this.formInline.applicationType) {
|
||||||
this.formInline.applicationType = this.ApplicationCategory.INITIATION.value
|
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 => {
|
||||||
this.formInline.enStandardSystem = this.formInline.enStandardSystem ? this.formInline.enStandardSystem.split(',').map(item => {
|
return { value: item }
|
||||||
return { value: item }
|
}) : []
|
||||||
}) : []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
look (record) {
|
look (record) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
this.formInline = Object.assign({}, record)
|
this.formInline = Object.assign({}, record)
|
||||||
if (this.formInline.enStandardSystem && this.formInline.enStandardSystem.length > 0) {
|
this.formInline.enStandardSystem = this.formInline.enStandardSystem ? this.formInline.enStandardSystem.split(',').map(item => {
|
||||||
this.formInline.enStandardSystem = this.formInline.enStandardSystem ? this.formInline.enStandardSystem.split(',').map(item => {
|
return { value: item }
|
||||||
return { value: item }
|
}) : []
|
||||||
}) : []
|
|
||||||
}
|
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
},
|
},
|
||||||
// 获取标准体系下拉框数据
|
// 获取标准体系下拉框数据
|
||||||
|
|||||||
+1
-13
@@ -40,7 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 新增,编辑的弹框 -->
|
<!-- 新增,编辑的弹框 -->
|
||||||
<base-info-table-modal ref="baseInfoTableModal" source="tableBaseInfo" :edit-role="editRole" @ok="modelFormOk"></base-info-table-modal>
|
<base-info-table-modal ref="baseInfoTableModal" source="tableBaseInfo" :currentNode="currentNode" @ok="modelFormOk"></base-info-table-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -64,18 +64,6 @@ export default {
|
|||||||
default: 1
|
default: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
// 当前节点编辑的角色,用做弹框中的编辑特殊判断
|
|
||||||
editRole () {
|
|
||||||
if (this.currentNode === 4) {
|
|
||||||
return 'drafter'
|
|
||||||
} else if (this.currentNode === 5) {
|
|
||||||
return 'contact'
|
|
||||||
} else {
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user