lex 2 tahun lalu
induk
melakukan
e7598123ed

+ 5 - 0
src/components/MRefund.vue

@@ -54,6 +54,7 @@
     <Mcoupon
       class="Mcoupon"
       ref="Mcoupon"
+      :useSystem="useSystem"
       :showCoupon="showCoupon"
       :showBalance="balance > 0"
       :balance="balance"
@@ -192,6 +193,10 @@ export default {
     disCountList: {
       type: Array,
     },
+    useSystem: {
+      type: String,
+      default: "MEC",
+    },
     showCoupon: {
       type: Boolean,
       default: true,

+ 2 - 0
src/components/Mcoupon.vue

@@ -65,6 +65,7 @@
           :status="0"
           :isEdit="true"
           :buyList="buyList"
+          :useSystem="useSystem"
           :all="true"
           :studentId="studentIds"
           @resetTitle="resetTitle"
@@ -88,6 +89,7 @@ export default {
     "showCoupon",
     "balance",
     "payType",
+    "useSystem",
     "buyList",
     "studentId",
     "iconSrc",

+ 11 - 11
src/constant/index.js

@@ -36,15 +36,15 @@ export const musicGroupType = {
 
 export const coupontypeDetail = {
   OTHER: "其他",
-  MALLCOUPON: "商城",
-  MUSICAL: "乐器",
-  ACCESSORIES: "辅件",
-  MAINTENANCE: "乐保服务",
-  TEACHING: "教材",
-  PRACTICE: "网管课",
-  SINGLE: "声部课",
-  MIX: "合奏课",
-  VIP: "VIP",
-  FULLCOUPON: "全类券",
-  MEMBER: "云教练",
+  MALLCOUPON: "商城优惠券",
+  MUSICAL: "乐器优惠券",
+  ACCESSORIES: "辅件优惠券",
+  MAINTENANCE: "乐保服务优惠券",
+  TEACHING: "教材优惠券",
+  PRACTICE: "网管课优惠券",
+  SINGLE: "声部课优惠券",
+  MIX: "合奏课优惠券",
+  VIP: "VIP优惠券",
+  FULLCOUPON: "全类优惠券",
+  MEMBER: "云教练优惠券",
 };

+ 4 - 3
src/views/coupon/list.vue

@@ -47,7 +47,7 @@ import item from "./item";
 import { sysCouponCode } from "./api";
 import { isDuringDate } from "@/helpers/utils";
 export default {
-  props: ["status", "isEdit", "allMoney", "all", "buyList"],
+  props: ["status", "isEdit", "allMoney", "all", "buyList", "useSystem"],
   components: {
     MEmpty,
     "coupon-item": item,
@@ -61,6 +61,7 @@ export default {
       dataList: [],
       params: {
         page: 1,
+        useSystem: this.useSystem || "",
         usageStatus: this.status,
         rows: this.all ? 9999 : 10,
       },
@@ -126,7 +127,7 @@ export default {
       let faceValueList = {};
       let shopType = []; // 所以类型的商品
       this.buyList.forEach((item) => {
-        if (shopObj[item.couponType]) {
+        if (shopObj[item.couponType] || shopType.includes(item.couponType)) {
           shopObj[item.couponType] += Number(item.price);
         } else {
           shopObj[item.couponType] = Number(item.price);
@@ -147,7 +148,7 @@ export default {
        *      if (shopType.indexOf(copon.typeDetail) == -1) {
           copon.disabled = true;
         }
-       * 
+       *
        */
       this.dataList.forEach((item) => {
         if (list.indexOf(item.couponCodeId) != -1) {

+ 1 - 0
src/views/shopMall/GoodsSale.vue

@@ -244,6 +244,7 @@
       <m-refund
         @onClose="refundStatus = !refundStatus"
         @onPopupSure="onRefundSure"
+        useSystem="MALL"
         :ids="[1]"
         :buyList="buyList"
         :balance="balance"