Explorar o código

fix: 选择售方需要传Id

liujt hai 6 meses
pai
achega
6896bc2c5a

+ 11 - 5
src/views/contractManage/contractBook/components/addDialog.vue

@@ -1312,6 +1312,7 @@
         let key = this.form.type == '1' || !this.form.type ? 'partb' : 'parta';
         let keyArr = [
           key + 'Name',
+          key + 'Id',
           key + 'UnifiedSocialCreditCode',
           key + 'Fax',
           key + 'Address'
@@ -1321,21 +1322,26 @@
             (item) => item.name == this.form[keyArr[0]]
           );
           this.form[keyArr[0]] = data.name;
-          this.form[keyArr[1]] = data.unifiedSocialCreditCode;
-          this.form[keyArr[2]] = data.fax;
-          this.form[keyArr[3]] = data.address;
+          this.form[keyArr[1]] = data.id;
+          this.form[keyArr[2]] = data.unifiedSocialCreditCode;
+          this.form[keyArr[3]] = data.fax;
+          this.form[keyArr[4]] = data.address;
           return;
         }
         if (this.enterprisePage.length > 0) {
           this.form[keyArr[0]] =
             this.form[keyArr[0]] || this.enterprisePage[0].name;
           this.form[keyArr[1]] =
-            this.form[keyArr[1]] ||
+            this.form[keyArr[1]] || this.enterprisePage[0].id;
+          this.form[keyArr[2]] =
+            this.form[keyArr[2]] ||
             this.enterprisePage[0].unifiedSocialCreditCode;
           this.form[keyArr[2]] =
             this.form[keyArr[2]] || this.enterprisePage[0].fax;
           this.form[keyArr[3]] =
-            this.form[keyArr[3]] || this.enterprisePage[0].address;
+            this.form[keyArr[3]] || this.enterprisePage[0].fax;
+          this.form[keyArr[4]] =
+            this.form[keyArr[4]] || this.enterprisePage[0].address;
         }
       },
       //选择合同分类

+ 4 - 0
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -993,6 +993,7 @@
 
         if (this.enterprisePage.length === 1) {
           this.form.partbName = this.enterprisePage[0].name;
+          this.form.partbId = this.enterprisePage[0].id;
           this.getEnterprise();
         }
 
@@ -1537,6 +1538,7 @@
           this.isUpdate = false;
           if (this.enterprisePage.length > 0) {
             this.form.partbName = this.enterprisePage[0].name;
+            this.form.partbId = this.enterprisePage[0].id;
             this.form.partbUnifiedSocialCreditCode =
               this.enterprisePage[0].unifiedSocialCreditCode;
             this.form.partbFax = this.enterprisePage[0].fax;
@@ -1586,6 +1588,7 @@
         }
         if (this.enterprisePage.length > 0) {
           this.form.partbName = this.enterprisePage[0].name;
+          this.form.partbId = this.enterprisePage[0].id;
           this.form.partbUnifiedSocialCreditCode =
             this.enterprisePage[0].unifiedSocialCreditCode;
           this.form.partbFax = this.enterprisePage[0].fax;
@@ -1607,6 +1610,7 @@
           (item) => item.name == this.form.partbName
         );
         this.form.partbName = data.name;
+        this.form.partbId = data.id;
         this.form.partbUnifiedSocialCreditCode = data.unifiedSocialCreditCode;
         this.form.partbFax = data.fax;
         this.form.partbAddress = data.address;