lex-xin 5 年之前
父節點
當前提交
451a059677
共有 3 個文件被更改,包括 25 次插入35 次删除
  1. 0 0
      dist/index.html
  2. 0 0
      dist/static/js/chunk-ee626eae.8c6cd8d6.js
  3. 25 35
      src/views/teamBuild/components/teamSoundMoney.vue

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-ee626eae.8c6cd8d6.js


+ 25 - 35
src/views/teamBuild/components/teamSoundMoney.vue

@@ -290,13 +290,11 @@ export default {
       checkfor: {},
       teamStatus: '',
       teamid: '',
-      tempGoodsList: [], // 临时商品
     }
   },
   methods: {
     // 改变checkbox
     changeList (e) {
-      // console.log(e);
     },
     handleSelectionChange (e) {
       // 点击改变勾选
@@ -322,7 +320,7 @@ export default {
             // 遍历循环所有的group 删除所选id
             for (let key in this.soundLists) {
               if (this.soundLists[key].indexOf(this.multipleSelection[j].id) != -1) {
-                // console.log(this.soundLists[key], this.multipleSelection[j].id, this.soundLists[key].indexOf(this.multipleSelection[j].id));
+               
                 this.soundLists[key].splice(this.soundLists[key].indexOf(this.multipleSelection[j].id), 1)
               }
             }
@@ -353,13 +351,10 @@ export default {
     chioseType (row) {
       // 根据id查询可选类型种类
       let id = row.id;
-      // console.log(row.id);
       // 'subjectId': id, ' type'='INSTRUMENT'
       getGoods({ 'subjectId': id, 'type': 'INSTRUMENT' }).then(res => {
         if (res.code == 200) {
           row.goodsList = res.data;
-          this.tempGoodsList = res.data
-          // console.log(row);
         }
       })
     },
@@ -369,13 +364,12 @@ export default {
     },
     // 根据声部id查询可选教辅
     chioseMark (row) {
-      console.log(row);
       row.markVisible = true
       let id = row.id;
       getGoods({ 'subjectId': id, 'type': 'ACCESSORIES' }).then(res => {
         if (res.code == 200) {
           row.markChioseList = res.data;
-          // console.log(row);
+          
         }
       })
     },
@@ -385,7 +379,6 @@ export default {
     },
     // 删除教辅
     removeMartItem (row, index) {
-      // console.log(index);
       row.markList.splice(index, 1);
     },
     // 点击保存或编辑
@@ -397,7 +390,6 @@ export default {
       this.$emit('chiosetab', 0);
     },
     submitInfo (type) {
-      // console.log(this.activeSoundList)
       // return;
       let status;
       if (type == 1) {
@@ -463,7 +455,7 @@ export default {
           // 乐器
           active.zhonglei.forEach(zl => {
             let goodsItem = []
-            this.tempGoodsList.forEach(goods => {
+            active.goodsList.forEach(goods => {
               if(goods.id == zl) {
                 goodsItem = goods
               }
@@ -480,14 +472,16 @@ export default {
 
           // 附件
           active.markList.forEach(mark => {
-            let some = {
-              subjectId: active.id,
-              type: 'ACCESSORIES',
-              goodsIdList: mark.goods.join(','),
-              name: mark.name,
-              price: mark.price
+            if(mark.goods.length >= 1) {
+              let some = {
+                subjectId: active.id,
+                type: 'ACCESSORIES',
+                goodsIdList: mark.goods.join(','),
+                name: mark.name,
+                price: mark.price
+              }
+              obj.musicGroupSubjectGoodsGroups.push(some);
             }
-            obj.musicGroupSubjectGoodsGroups.push(some);
           })
 
           // 添加声部
@@ -520,7 +514,7 @@ export default {
           // 乐器
           active.zhonglei.forEach(zl => {
             let goodsItem = []
-            this.tempGoodsList.forEach(goods => {
+            active.goodsList.forEach(goods => {
               if(goods.id == zl) {
                 goodsItem = goods
               }
@@ -537,14 +531,16 @@ export default {
 
           // 遍历声部里的教辅
           active.markList.forEach(mark => {
-            let some = {
-              subjectId: active.id,
-              type: 'ACCESSORIES',
-              goodsIdList: mark.goods ? mark.goods.join(',') : '',
-              name: mark.name,
-              price: mark.price
+            if(mark.goods.length >= 1) {
+              let some = {
+                subjectId: active.id,
+                type: 'ACCESSORIES',
+                goodsIdList: mark.goods.join(','),
+                name: mark.name,
+                price: mark.price
+              }
+              obj.musicGroupSubjectGoodsGroups.push(some);
             }
-            obj.musicGroupSubjectGoodsGroups.push(some);
           })
           // 添加声部
           let item = {
@@ -557,6 +553,7 @@ export default {
           }
           obj.musicGroupSubjectPlans.push(item);
         })
+
         // 发请求修改声部信息
         updateSubjectInfo(obj).then(res => {
           if (res.code == 200) {
@@ -658,7 +655,6 @@ export default {
   },
   mounted () {
     getSoundTree().then(res => {
-      // console.log(res);
       if (res.code == 200) {
         this.soundList = res.data.rows;
         // // 生成动态的checkList
@@ -698,8 +694,8 @@ export default {
                       this.activeSoundList[i].zhonglei = this.activeSoundList[i].zhonglei.concat(res.data.musicGroupSubjectGoodsGroups[j].goodsIdList)
 
                       this.activeSoundList[i].goodsList = this.activeSoundList[i].goodsList.concat(res.data.musicGroupSubjectGoodsGroups[j].goodsList);
+                      
                       // goodsList
-                      // console.log(this.activeSoundList[i].goodsList)
 
                     }
                     // 拿辅件
@@ -713,7 +709,7 @@ export default {
                         this.activeSoundList[i].markList.push(obj);
                         // this.activeSoundList[i].markList.goodsList.goods = JSON.parse(res.data.musicGroupSubjectGoodsGroups[j].goodsIdList)
                         this.activeSoundList[i].markChioseList = this.activeSoundList[i].markChioseList.concat(res.data.musicGroupSubjectGoodsGroups[j].goodsList);
-                        // console.log(this.activeSoundList[i].markChioseList);
+
 
                       }
 
@@ -735,11 +731,6 @@ export default {
     let type = this.topfor.type;
     // 判断进来的乐团状态
     this.teamStatus = this.$route.query.type;
-    console.log(this.teamStatus)
-
-    // console.log(this.topfor);
-    // console.log(this.checkfor);
-    // console.log(this.payfor);
 
   },
   watch: {
@@ -750,7 +741,6 @@ export default {
     chioseSoundNum () {
       let num = 0;
       for (let key in this.soundList) {
-        // console.log(this.soundLists[key])
         num += this.soundLists[key].length;
 
       }

Some files were not shown because too many files changed in this diff