From 7c9c9433b7f57e2e3935685da967c29b76ebb939 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期二, 26 九月 2023 17:26:57 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/views/docking/infoForm.vue |   73 +++++++++++++++++++++++++++---------
 1 files changed, 55 insertions(+), 18 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/docking/infoForm.vue b/Source/UBCS-WEB/src/views/docking/infoForm.vue
index 530e651..a72bdfe 100644
--- a/Source/UBCS-WEB/src/views/docking/infoForm.vue
+++ b/Source/UBCS-WEB/src/views/docking/infoForm.vue
@@ -5,7 +5,7 @@
       <el-form ref="form" :model="formData" show-message="true" inline size="medium" label-suffix=":"
                class="dockingForm" :rules="rules" status-icon="true">
         <el-form-item label="鎺ュ彛绫诲瀷" prop="dataFlowType">
-          <el-select v-model="formData.dataFlowType" placeholder="璇烽�夋嫨" @change="dataFlowTypeChange">
+          <el-select v-model="formData.dataFlowType" placeholder="璇烽�夋嫨" @change="dataFlowTypeChange" :disabled="formData.type == 'edit'">
             <el-option v-for="item in dataFlowTypeList" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
@@ -31,6 +31,7 @@
         <div v-if="formData.dataFlowType=='push'">
           <el-form-item  label="鍒嗙被閫夋嫨" prop="classifyName">
             <vciWebRefer
+              key="classifyName" data-key="classifyName"
               :referConfig="{
                   title: '鍒嗙被閫夋嫨',
                   showField: 'classifyName',
@@ -48,6 +49,7 @@
           </el-form-item>
           <el-form-item label="闆嗘垚绯荤粺" prop="targetSystemName">
             <vciWebRefer
+              key="targetSystemName" data-key="targetSystemName"
               :referConfig="{
                   title: '闆嗘垚绯荤粺',
                   showField: 'targetSystemName',
@@ -69,6 +71,7 @@
 <!--          </el-form-item>-->
           <el-form-item  label="鍒嗙被閫夋嫨" prop="classifyName" v-if="formData.pushType !='5' && formData.pushType !='6'">
             <vciWebRefer
+              key="classifyName" data-key="classifyName"
               :referConfig="{
                   title: '鍒嗙被閫夋嫨',
                   showField: 'classifyName',
@@ -86,13 +89,14 @@
           </el-form-item>
           <el-form-item label="闆嗘垚绯荤粺" prop="sourceSystemName">
             <vciWebRefer
+              key="sourceSystemName" data-key="sourceSystemName"
               :referConfig="{
                   title: '闆嗘垚绯荤粺',
                   showField: 'sourceSystemName',
                   field: 'sourceSystemOid',
                   fieldMap:{'sourceSystemId':'id'},
                   placeholder: '璇烽�夋嫨',
-                  options: {isMuti: false, type: 'default', url: 'api/ubcs-code/dockingManagement/gridDockingSystem'},
+                  options: {isMuti: false, type: 'default', url: referUrl},
                 }"
               :value="formData.sourceSystemOid"
               :text="formData.sourceSystemName"
@@ -203,7 +207,6 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitAttribute">纭畾</el-button>
-        <el-button @click="cancelSubmit">鍙栨秷</el-button>
       </div>
     </el-dialog>
 
@@ -386,16 +389,52 @@
           // 閫夊畾琛�
           selectRow: ''
         },
-        dictEnums: []
+        dictEnums: [],
+
       }
     }
   },
   watch:{
-    formData:{
-      handler(newval,oldval){
-        console.log('newval',newval.dataFlowTypeText)
+    formData: {
+      handler(newval, oldval) {
+        // console.log(newval)
+        if (newval && newval.type === 'edit') {
+          if (this.formData.dataFlowType == 'accept') {
+            this.pushTypeList = [
+              { value: '3', label: '缂栫爜鐢宠' },
+              { value: '4', label: '缂栫爜鏇存敼锛堢姸鎬併�佸洖鏀讹級' },
+              { value: '5', label: '鍒嗙被鏌ヨ' },
+              { value: '6', label: '鍚鍒欎俊鎭殑鍒嗙被鏌ヨ' },
+              { value: '7', label: '鏁版嵁鏌ヨ' }
+            ];
+            this.$nextTick(() => {
+              // this.formData.pushType = '';
+              this.formData.targetSystemName = '缂栫爜绯荤粺';
+              this.formData.targetSystemOid = 'code00000001';
+              this.formData.targetSystemId = 'CODE';
+
+              // this.formData.sourceSystemName = '';
+              // this.formData.sourceSystemOid = '';
+              // this.formData.sourceSystemId = '';
+            });
+          } else {
+            this.pushTypeList = [
+              { value: '1', label: '鏁版嵁鎺ㄩ��' },
+              { value: '2', label: '鍒嗙被鎺ㄩ��' }
+            ];
+            this.$nextTick(() => {
+              this.formData.pushType = '1';
+              this.formData.sourceSystemName = '缂栫爜绯荤粺';
+              this.formData.sourceSystemOid = 'code00000001';
+              this.formData.sourceSystemId = 'CODE';
+              // this.formData.targetSystemName = '';
+              // this.formData.targetSystemOid = '';
+              // this.formData.targetSystemId = '';
+            });
+          }
+        }
       }
-    }
+    },
   },
   created() {
     //this.geDictData('interfaceType', this.interfaceTypeList)
@@ -414,7 +453,7 @@
         {value: '5', label: '鍒嗙被鏌ヨ'},
         {value: '6', label: '鍚鍒欎俊鎭殑鍒嗙被鏌ヨ'},
         {value: '7', label: '鏁版嵁鏌ヨ'}]
-      this.formData.pushType=''
+      // this.formData.pushType=''
       this.formData.targetSystemName='缂栫爜绯荤粺';
       this.formData.targetSystemOid='code00000001';
       this.formData.targetSystemId='CODE';
@@ -436,15 +475,14 @@
   },
   methods: {
     closeSubmitDialog() {
-      this.resetForm();
+      // this.resetForm();
       this.showSubmitDialog = false;
     },
     resetForm() {
-      this.formData={}
-      // this.formData = {
-      //   sysIntParamVOs: [],
-      //   sysIntHeaderVOs: []
-      // };
+      this.formData = {
+        sysIntParamVOs: [],
+        sysIntHeaderVOs: []
+      };
       this.$refs.form.resetFields();
     },
     setReferValue(data) {
@@ -490,7 +528,6 @@
       }
     },
     submitAttribute() {
-      console.log()
       const that = this;
       let pass=true
       if(this.formData.dataFlowType=='push' && (validatenull(this.formData.classifyName)||validatenull(this.formData.targetSystemName))){
@@ -511,7 +548,7 @@
       })
       this.$nextTick(function (){
         if(pass){
-          that.formData.sysIntParamDTOs=this.formData.sysIntParamVOs.map(item=>{
+          that.formData.sysIntParamDTOS=this.formData.sysIntParamVOs.map(item=>{
             return {
               ...item,
               ordernNo:item.$index
@@ -525,7 +562,7 @@
           })
           const apiCall = that.formData.type == 'edit' ? edit : add;
           const Message = that.formData.type == 'edit' ? "淇敼鎴愬姛" : "淇濆瓨鎴愬姛";
-          console.log( that.formData)
+          // console.log( that.formData)
           apiCall(that.formData).then(res => {
             that.$message.success(Message);
             that.showSubmitDialog = false;

--
Gitblit v1.9.3