Browse Source

fix: 修复付款计划单条记录类型设置问题及优化代码

liujt 1 month ago
parent
commit
73531e906b

+ 11 - 1
src/BIZComponents/paymentCollectionPlan/Index.vue

@@ -579,12 +579,22 @@
           // });
           for(let i = 0; i < issueNumber; i++) {
             let item = JSON.parse(JSON.stringify(this.defaultForm));
+            if(issueNumber == 1) {
+              item.moneyName = '';
+              item.type = 2;
+              item.typeName = '交货款';
+              item.ratio = 100;
+              item.key = i + 1;
+              item.issueNumber = i + 1;
+            } else {
               item.moneyName = '';
               item.type = '';
               item.typeName = '';
+              item.ratio = '';
               item.key = i + 1;
               item.issueNumber = i + 1;
-              tempList.push(item);
+            }
+            tempList.push(item);
           }
         }
         console.log('tempList~~~', tempList);

+ 6 - 6
src/views/contractManage/contractBook/components/addDialog.vue

@@ -635,7 +635,7 @@
         <el-tab-pane label="物品清单" name="1">
           <inventoryTable1
             ref="inventoryTable"
-            isContractBook="true"
+            :isContractBook="true"
             :contractStartDate="this.form.contractStartDate"
             :isCustomerMark="form.type == '1'"
             :isSupplierMark="form.type == '2'"
@@ -1678,12 +1678,12 @@
             this.getOpportunityDetail(this.businessOpportunityData);
           }
 
-          this.$nextTick(() => {
+          // this.$nextTick(() => {
             // this.$refs.paymentListTable.defaultList();
-            this.$nextTick(() => {
-              this.issueNumberChange(this.form.issueNumber);
-            })
-          });
+          this.$nextTick(() => {
+            this.issueNumberChange(this.form.issueNumber);
+          })
+          // });
           if (this.curNodeData?.id) {
             console.log('44444444', this.curNodeData)
             this.form.type =