From abc40e8b4a5d655675948791a9554432662fdb5e Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期三, 29 十一月 2023 14:54:27 +0800
Subject: [PATCH] 流水码段自定义实现方式完善
---
Source/UBCS-WEB/src/components/FormTemplate/index.vue | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
index 2ad4a80..573c4b5 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -21,9 +21,9 @@
:templateOid="templateOid"
:type="type"
data-key="masterForm"
+ @dataYearCode="dataYearHandler"
@getFormData="getFormData"
@isShow="isShowHandler"
- @dataYearValue="dataYearHandler"
></FormTemplate>
<div
v-if="
@@ -346,22 +346,32 @@
},
//绯诲垪鍙疯鍒�
isShowHandler(val) {
- let that = this;
this.isShowStatus = val;
- this.secVOList.forEach(item => {
- if (item.name === "绯诲垪鍙�") {
- this.$set(item, "readOnly", val)
- }
- })
- if(this.$refs.CodeApply.changeChildItem ){
+ this.secVOList.forEach(item => {
+ if (item.name === "绯诲垪鍙�") {
+ this.$set(item, "readOnly", val)
+ }
+ })
+ if (this.$refs.CodeApply) { // 娣诲姞涓�涓垽鏂鍙ワ紝妫�鏌ュ璞℃槸鍚︿负undefined
this.$refs.CodeApply.changeChildItem(this.secVOList, this.TreeValue, this.type);
}
},
//骞翠唬鍙�
- dataYearHandler(val){
- console.log("val",val)
+ dataYearHandler(val) {
+ const readOnlyValue = val && Object.values(val).every(value => value !== '');
+ this.secVOList.forEach(item => {
+ if (item.name === "骞翠唬鍙�") {
+ const year = readOnlyValue ? val.value.slice(0, 4) : item.codeDateValue;
+ this.codeApplyForm[item.oid] = year;
+ this.$set(item, "readOnly", readOnlyValue);
+ }
+ });
+
+ if (this.$refs.CodeApply) {
+ this.$refs.CodeApply.changeChildItem(this.secVOList, this.TreeValue, this.type);
+ }
},
//灞炴�х爜娈佃祴鍊�
attrListForm(attrListForm) {
@@ -387,7 +397,7 @@
return item;
});
//this.$refs.CodeApply.templateRender(this.secVOList,this.TreeValue);
- this.$refs.CodeApply.changeChildItem(childItems,this.TreeValue,this.type);
+ this.$refs.CodeApply.changeChildItem(childItems, this.TreeValue, this.type);
},
resembleQuerySubmit() {
this.activeName = "resembleQuery";
--
Gitblit v1.10.0