Prechádzať zdrojové kódy

code review:优惠劵逻辑

YunaiV 1 rok pred
rodič
commit
d10530c9f5

+ 3 - 3
src/utils/constants.ts

@@ -213,15 +213,15 @@ export const CouponTemplateValidityTypeEnum = {
  * 优惠劵模板的领取方式的枚举
  */
 export const CouponTemplateTakeTypeEnum = {
-  BY_USER: {
+  USER: {
     type: 1,
     name: '直接领取'
   },
-  BY_ADMIN: {
+  ADMIN: {
     type: 2,
     name: '指定发放'
   },
-  BY_REGISTER: {
+  REGISTER: {
     type: 3,
     name: '新人券'
   }

+ 1 - 1
src/views/mall/product/spu/components/SpuTableSelect.vue

@@ -210,7 +210,7 @@ const emits = defineEmits<{
 
 /** 全选 */
 const handleCheckAll = (checked: boolean) => {
-  //todo 不触发?
+  debugger
   console.log('checkAll', checked)
   allChecked.value = checked
   const index = checkedPageNos.value.indexOf(queryParams.value.pageNo)

+ 1 - 1
src/views/mall/promotion/coupon/components/CouponSendForm.vue

@@ -107,7 +107,7 @@ const queryParams = ref({
   pageNo: 1,
   pageSize: 10,
   name: null,
-  canTakeTypes: [CouponTemplateTakeTypeEnum.BY_ADMIN.type]
+  canTakeTypes: [CouponTemplateTakeTypeEnum.ADMIN.type]
 }) // 查询参数
 const queryFormRef = ref() // 搜索的表单
 // 领取人的编号列表