|
@@ -94,9 +94,21 @@ export default defineComponent({
|
|
|
|
|
|
// 判断使用优惠券之后还有没有其它优惠券可用
|
|
|
this.list.forEach((item: any) => {
|
|
|
- const disItem: any = this.orderGoodsType.find((goods: any) => goods.orderType === item.couponCategory)
|
|
|
- const useLastAmount = disItem ? disItem.price - (usedMap.get(item.couponCategory) || 0) : 0
|
|
|
- if (!item.checked && (useList.length > 0 || Number(item.useLimit) > useLastAmount)) {
|
|
|
+ let disabled = true
|
|
|
+ if(item.couponCategory === 'UNIVERSAL') {
|
|
|
+ this.orderGoodsType.forEach((goods: any) => {
|
|
|
+ const useLastAmount = goods ? goods.price - (usedMap.get(item.couponCategory) || 0) : 0
|
|
|
+ if(Number(item.useLimit) <= useLastAmount && disabled) {
|
|
|
+ disabled = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const disItem: any = this.orderGoodsType.find((goods: any) => goods.orderType === item.couponCategory)
|
|
|
+ const useLastAmount = disItem ? disItem.price - (usedMap.get(item.couponCategory) || 0) : 0
|
|
|
+ disabled = Number(item.useLimit) > useLastAmount
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!item.checked && (useList.length > 0 || disabled)) {
|
|
|
item.disabled = true
|
|
|
} else {
|
|
|
item.disabled = false
|