Quellcode durchsuchen

修改 广告设计及素材库供应商必须连续选择 问题

wangguangping vor 3 Jahren
Ursprung
Commit
5012283874
1 geänderte Dateien mit 16 neuen und 4 gelöschten Zeilen
  1. 16 4
      src/pages/main/terminal/components/advert.vue

+ 16 - 4
src/pages/main/terminal/components/advert.vue

@@ -318,6 +318,7 @@
             },
             //添加
             dialogCli(v) {
+                
                 this.datalist.attList = [];
                 this.uploadstatus = false;
                 if (v === 3) {
@@ -331,12 +332,22 @@
                     let price = 0;
                     for (let i = 0; i < this.gys.length; i++) {
                         if(this.gys[i].sts){
-                            gys.push(this.gys[i])
-                            for (let j = 0; j < gys[i].list.length; j++) {
-                                price+=gys[i].list[j].num*gys[i].list[j].price;
-                            }
+                            gys.push(JSON.parse(JSON.stringify(this.gys[i])))
+                           // if(gys[i])
+                            
+                            // {
+                            //     for (let j = 0; j < gys[i].list.length; j++) {
+                            //         price+=gys[i].list[j].num*gys[i].list[j].price;
+                            //     }
+                            // }
+ 
                         }
                     }
+                    gys.forEach(n=>{
+                        for (let j = 0; j < n.list.length; j++) {
+                            price+=n.list[j].num*n.list[j].price;
+                        }
+                    });
                     this.infoApply.gys=gys;
                     this.infoApply.price=price;
                 }
@@ -493,6 +504,7 @@
                     res.data.forEach(item=>{
                         item.list = [{}];
                     })
+                    
                     this.gys = res.data;
                 });
             },