Browse Source

Merge branch 'change-voice' into online

wolyshaw 4 years ago
parent
commit
7256ba0e88
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/views/teamBuild/modals/change-voice.vue

+ 6 - 1
src/views/teamBuild/modals/change-voice.vue

@@ -220,6 +220,11 @@ const formatAllGoods = (data, kitGroupPurchaseType) => {
   }
 }
 
+const typeAndprice = {
+  GROUP: 'price',
+  LEASE: 'depositFee',
+}
+
 export default {
   props: ['detail', 'musicGroupId', 'voiceList'],
   components: {
@@ -402,7 +407,7 @@ export default {
       const item = this.musicalGoodsById[val]
       if (item) {
         this.musicalPrice = this.numFormat(item._calculated_price)
-        this.kitGroupPurchaseTypePrice = this.numFormat(item.kitGroupPurchaseTypeJsonParse[this.form.type] || 0)
+        this.kitGroupPurchaseTypePrice = this.numFormat(item[typeAndprice[this.form.type]] || 0)
         this.coursePurchaseTypeJsonTypePrice = this.numFormat(item.coursePurchaseTypeJsonTypePrice)
         this.types = item.kitGroupPurchaseTypeJsonParse
       } else {