Ver Fonte

Merge branch '03/03Lebao' into test

lex-xin há 4 anos atrás
pai
commit
75967f11d5
2 ficheiros alterados com 36 adições e 12 exclusões
  1. 33 9
      src/views/resetTeaming/modals/subject-preview.vue
  2. 3 3
      vue.config.js

+ 33 - 9
src/views/resetTeaming/modals/subject-preview.vue

@@ -257,7 +257,8 @@ export default {
             courseViewType: 0, // 收费模式,0 课程显示,1 AMR系统
             leBaoStatus: false,
 			buyMaintenance: false, // 是否开启乐保
-            isClickStatus: false
+            isClickStatus: false,
+            accessStatus: false, // 是否有辅件乐保
         };
     },
     mounted() {
@@ -434,9 +435,26 @@ export default {
                             }
                         })
 
+                        // 判断辅件是否有乐器维护(编号固定76)
+                        let accessStatus = false // 是否有乐保
+                        this.accessOries.forEach(item => {
+                            // 判断子商品是否有乐保
+                            if(item.childGoodsList && item.childGoodsList.length > 0) {
+                                item.childGoodsList.forEach(child => {
+                                    if(child.id == 76) {
+                                        accessStatus = true
+                                    }
+                                })
+                            }
+                            if(item.goodsIdList == 76) {
+                                accessStatus = true
+                            }
+                        })
+                        this.accessStatus = accessStatus
+
                         // 乐保服务初始化
                         this.instrumentResult.forEach(item => {
-                            if(item.checked && item.kitType == "GROUP") {
+                            if(item.checked && item.kitType == "GROUP" && !accessStatus) {
                                 this.leBaoStatus = true
                                 this.buyMaintenance = true
                             }
@@ -510,13 +528,16 @@ export default {
                 item.checked = false
             })
             item.checked = true
-            if(item.kitType == "GROUP") {
-                this.leBaoStatus = true
-                this.buyMaintenance = true
-            } else {
-                this.leBaoStatus = false
-                this.buyMaintenance = false
+            if(!this.accessStatus) {
+                if(item.kitType != "owned") {
+                    this.leBaoStatus = true
+                    this.buyMaintenance = true
+                } else {
+                    this.leBaoStatus = false
+                    this.buyMaintenance = false
+                }
             }
+
             // 重新计算金额
             this.calcPrice()
         },
@@ -571,6 +592,7 @@ export default {
                             tempGroupRemissionCourseFee += parseFloat(item.courseCurrentPrice)
                         }
                     });
+                    marketPrice += parseFloat(m)
                     buyList.unshift({
                         name: this.chargeTypeName,
                         type: paymentPatternType[this.paymentPattern],
@@ -581,13 +603,15 @@ export default {
                     csi.forEach(item => {
                         if (item.isStatus) {
                             musicClassFee += parseFloat(item.courseCurrentPrice)
-                            marketPrice += parseFloat(item.courseOriginalPrice)
+                            // marketPrice += parseFloat(item.courseOriginalPrice)
                             if (item.id > 0) {
                                 courseKeys.push(item.id)
                             }
                             // 不可选的课程才会减免课程费用
                             if (!item.isStudentOptional) {
                                 tempGroupRemissionCourseFee += parseFloat(item.courseCurrentPrice)
+                            } else {
+                                marketPrice += parseFloat(item.courseOriginalPrice)
                             }
                         }
                     })

+ 3 - 3
vue.config.js

@@ -17,11 +17,11 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // http://47.99.212.176:8000
 // //  https://online.dayaedu.com
 // let target = 'https://online.dayaedu.com' //线上
-let target = 'https://test.dayaedu.com' //test环境
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-// let target = 'http://47.114.176.40:8000' // 测试服
+// let target = 'http://dev.dayaedu.com' // 测试服
+let target = 'https://test.dayaedu.com' //开发环境
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
@@ -55,7 +55,7 @@ module.exports = {
     //   warnings: false,
     //   errors: true
     // },
-    // https: true,
+    https: true,
     proxy: {
       // change xxx-api/login => mock/login
       // detail: https://cli.vuejs.org/config/#devserver-proxy