Răsfoiți Sursa

修改协议录入显示已选数量的逻辑、完善协议费用审核协议点击之后的接口数据使用

wuguojie 1 an în urmă
părinte
comite
0213bc2e29

+ 31 - 43
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -2631,37 +2631,39 @@ export default {
         list.push(element.id)
       });
       this.agreementSelectionList = list;
-      if(val.length>0) {
-        this.$set(this.hasSelectedList, this.pageNum-1, val)
-        this.hadSelectedList = [...this.hasSelectedList]
-        if(this.hadSelectedList.length> 0) {
-          this.selectedLength = 0
-          this.hadSelectedList.forEach(item => {
-            this.selectedLength += item.length
-          })
-        }
-      } else {
-        this.$set(this.hasSelectedList, this.pageNum-1, [])
-        this.hadSelectedList = [...this.hasSelectedList]
-        if(this.hadSelectedList.length> 0) {
-          this.selectedLength = 0
-          this.hadSelectedList.forEach(item => {
-            this.selectedLength += item.length
-          })
-        }
-      }
+      this.selectedLength = val.length>0?val.length:0
+      // if(val.length>0) {
+      //   this.$set(this.hasSelectedList, this.pageNum-1, val)
+      //   this.hadSelectedList = [...this.hasSelectedList]
+      //   if(this.hadSelectedList.length> 0) {
+      //     this.selectedLength = 0
+      //     this.hadSelectedList.forEach(item => {
+      //       this.selectedLength += item.length
+      //     })
+      //   }
+      // } else {
+      //   this.$set(this.hasSelectedList, this.pageNum-1, [])
+      //   this.hadSelectedList = [...this.hasSelectedList]
+      //   if(this.hadSelectedList.length> 0) {
+      //     this.selectedLength = 0
+      //     this.hadSelectedList.forEach(item => {
+      //       this.selectedLength += item.length
+      //     })
+      //   }
+      // }
     },
     handleSelectChange(rows) {
-      if(rows.length>0) {
-        this.$set(this.hasSelectedList, this.pageNum-1, rows)
-        this.hadSelectedList = [...this.hasSelectedList]
-        if(this.hadSelectedList.length> 0) {
-          this.selectedLength = 0
-          this.hadSelectedList.forEach(item => {
-            this.selectedLength += item.length
-          })
-        }
-      }
+      this.selectedLength = rows.length>0?rows.length:0
+      // if(rows.length>0) {
+      //   this.$set(this.hasSelectedList, this.pageNum-1, rows)
+      //   this.hadSelectedList = [...this.hasSelectedList]
+      //   if(this.hadSelectedList.length> 0) {
+      //     this.selectedLength = 0
+      //     this.hadSelectedList.forEach(item => {
+      //       this.selectedLength += item.length
+      //     })
+      //   }
+      // }
     },
     agreementCurrentChange(val) {
       this.agreementActiveInfo = val;
@@ -3913,20 +3915,6 @@ export default {
           this.pageNum = res.data.pageNum;
           this.pageSize = res.data.pageSize;
           this.totalSize = res.data.totalSize;
-          this.$nextTick(() => {
-            if(this.hadSelectedList[this.pageNum-1]) {
-              this.hadSelectedList[this.pageNum-1].forEach(item => {
-                let row = this.pageResult.find(sub => item.id === sub.id)
-                this.$refs.multipleTable.toggleRowSelection(row)
-              })
-              if(this.hadSelectedList.length> 0) {
-                this.selectedLength = 0
-                this.hadSelectedList.forEach(item => {
-                  this.selectedLength += item.length
-                })
-              }
-            }
-          })
         } else {
           this.$message.error(res.msg);
         }

+ 6 - 2
src/views/AgreementManage/CarInsurance/ProductCostExamine.vue

@@ -769,8 +769,12 @@ export default {
       this.$api.insCompany
         .getUndwrtRulesQuery(params)
         .then((res) => {
-          this.underwritingRulesResult = res.content.filter(item => item.validInd == 1);
-          this.agreementListShow = true
+          if(res.content) {
+            this.underwritingRulesResult = res.content.filter(item => item.validInd == 1);
+            this.agreementListShow = true
+          } else {
+            this.$message.warning(res.msg)
+          }
         });
     }
   },