mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-11-04 20:28:45 +08:00 
			
		
		
		
	【功能修复】商城:修复满减送批量合并的错误部分
This commit is contained in:
		@@ -116,6 +116,7 @@ import {
 | 
			
		||||
  validityTypeFormat
 | 
			
		||||
} from '@/views/mall/promotion/coupon/formatter'
 | 
			
		||||
import * as CouponTemplateApi from '@/api/mall/promotion/coupon/couponTemplate'
 | 
			
		||||
import { CouponTemplateTakeTypeEnum } from '@/utils/constants'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'CouponSelect' })
 | 
			
		||||
 | 
			
		||||
@@ -138,7 +139,7 @@ const queryParams = reactive({
 | 
			
		||||
  pageSize: 10,
 | 
			
		||||
  name: null,
 | 
			
		||||
  discountType: null,
 | 
			
		||||
  canTakeTypes:[1]//只获得直接领取的券
 | 
			
		||||
  canTakeTypes: [CouponTemplateTakeTypeEnum.USER.type] // 只获得直接领取的券
 | 
			
		||||
})
 | 
			
		||||
const queryFormRef = ref() // 搜索的表单
 | 
			
		||||
const selectedCouponList = ref<CouponTemplateApi.CouponTemplateVO[]>([]) // 选择的数据
 | 
			
		||||
 
 | 
			
		||||
@@ -16,15 +16,14 @@ export const discountFormat = (row: CouponTemplateVO) => {
 | 
			
		||||
 | 
			
		||||
// 格式化【领取上限】
 | 
			
		||||
export const takeLimitCountFormat = (row: CouponTemplateVO) => {
 | 
			
		||||
  if(row.takeLimitCount){
 | 
			
		||||
  if (row.takeLimitCount) {
 | 
			
		||||
    if (row.takeLimitCount === -1) {
 | 
			
		||||
      return '无领取限制'
 | 
			
		||||
    }
 | 
			
		||||
    return `${row.takeLimitCount} 张/人`
 | 
			
		||||
  }else{
 | 
			
		||||
  } else {
 | 
			
		||||
    return ' '
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 格式化【有效期限】
 | 
			
		||||
 
 | 
			
		||||
@@ -118,7 +118,6 @@ const open = async (type: string, id?: number) => {
 | 
			
		||||
      data.startAndEndTime = [data.startTime, data.endTime]
 | 
			
		||||
      // 规则分转元
 | 
			
		||||
      data.rules?.forEach((item: any) => {
 | 
			
		||||
        item.limit = fenToYuan(item.limit || 0)
 | 
			
		||||
        item.discountPrice = fenToYuan(item.discountPrice || 0)
 | 
			
		||||
        if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
 | 
			
		||||
          item.limit = fenToYuan(item.limit || 0)
 | 
			
		||||
@@ -154,7 +153,6 @@ const submitForm = async () => {
 | 
			
		||||
    delete data.startAndEndTime
 | 
			
		||||
    // 规则元转分
 | 
			
		||||
    data.rules.forEach((item) => {
 | 
			
		||||
      item.limit = yuanToFen(item.limit || 0)
 | 
			
		||||
      item.discountPrice = yuanToFen(item.discountPrice || 0)
 | 
			
		||||
      if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
 | 
			
		||||
        item.limit = yuanToFen(item.limit || 0)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user