wolyshaw 4 vuotta sitten
vanhempi
commit
7021081348

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/index.html


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/chunk-635a8cbe.07b0dd78.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.a77a3860.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/chunk-011056c1.c361ba18.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/chunk-635a8cbe.49168140.js


+ 19 - 16
src/views/teamBuild/modals/change-voice.vue

@@ -162,21 +162,24 @@ const formatAllGoods = (data, kitGroupPurchaseType) => {
           try {
             courseJson = JSON.parse(item.coursePurchaseTypeJson)
           } catch (error) {}
-          const _item = {
-            ...item,
-            kitGroupPurchaseTypePrice: json[kitGroupPurchaseType],
-            coursePurchaseTypeJsonTypePrice: courseJson[kitGroupPurchaseType]
-          }
-          musicalGoods.push(_item)
-          musicalGoodsById[item.goodsIdList] = _item
-          if (!types.ACCESSORIES) {
-            if (!accessoriesByGoods[item.goodsIdList]) {
-              accessoriesByGoods[item.goodsIdList] = []
+          if (json[kitGroupPurchaseType]) {
+            const _item = {
+              ...item,
+              kitGroupPurchaseTypePrice: json[kitGroupPurchaseType],
+              coursePurchaseTypeJsonTypePrice: courseJson[kitGroupPurchaseType],
+              _calculated_price: (kitGroupPurchaseType === 'FREE' ? 0 : (kitGroupPurchaseType === 'LEASE' ? item.depositFee : item.price))
             }
-            const acs = item.goodsList[0].goodsList ? item.goodsList[0].goodsList : []
-            for (const goods of acs) {
-              accessoriesByGoods[item.goodsIdList].push(goods)
-              accessoriesById[goods.id] = goods
+            musicalGoods.push(_item)
+            musicalGoodsById[item.goodsIdList] = _item
+            if (!types.ACCESSORIES) {
+              if (!accessoriesByGoods[item.goodsIdList]) {
+                accessoriesByGoods[item.goodsIdList] = []
+              }
+              const acs = item.goodsList[0].goodsList ? item.goodsList[0].goodsList : []
+              for (const goods of acs) {
+                accessoriesByGoods[item.goodsIdList].push(goods)
+                accessoriesById[goods.id] = goods
+              }
             }
           }
         } else if (item.type === 'ACCESSORIES') {
@@ -262,7 +265,7 @@ export default {
     editSpread() {
       const data = this.item
       const payed = (data.originalAccessoriesPrice || 0) + (data.originalCourseFee || 0) + (data.originalMusicalPrice || 0)
-      console.log(payed, data.changeMusicalPrice, data.changeAccessoriesPrice, data.changeCourseFee, {...data})
+      // console.log(payed, data.changeMusicalPrice, data.changeAccessoriesPrice, data.changeCourseFee, {...data})
       return (data.changeMusicalPrice || 0) + (data.changeAccessoriesPrice || 0) + (data.changeCourseFee || 0) - payed
     },
     spread() {
@@ -353,7 +356,7 @@ export default {
     musicalGoodsChange(val) {
       const item = this.musicalGoodsById[val]
       if (item) {
-        this.musicalPrice = this.numFormat(item.price)
+        this.musicalPrice = this.numFormat(item._calculated_price)
         this.kitGroupPurchaseTypePrice = this.numFormat(item.kitGroupPurchaseTypePrice)
         this.coursePurchaseTypeJsonTypePrice = this.numFormat(item.coursePurchaseTypeJsonTypePrice)
       } else {

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä