Skip to content

Commit 1a8c04d

Browse files
YunaiVgitee-org
authored andcommitted
!553 批量优化或修改BUG
Merge pull request !553 from 痴货/develop-mall
2 parents 8dafe26 + f069f80 commit 1a8c04d

File tree

9 files changed

+37
-14
lines changed

9 files changed

+37
-14
lines changed

src/api/mall/promotion/reward/rewardActivity.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ export const getReward = async (id: number) => {
4747
return await request.get({ url: '/promotion/reward-activity/get?id=' + id })
4848
}
4949

50-
// 关闭拼团活动
51-
export const closeRewardActivity = async (id: number) => {
52-
return await request.put({ url: '/promotion/reward-activity/close?id=' + id })
53-
}
54-
55-
// 删除限时折扣活动
50+
// 删除满减送活动
5651
export const deleteRewardActivity = async (id: number) => {
5752
return await request.delete({ url: '/promotion/reward-activity/delete?id=' + id })
5853
}
54+
55+
// 关闭满减送活动
56+
export const closeRewardActivity = async (id: number) => {
57+
return await request.put({ url: '/promotion/reward-activity/close?id=' + id })
58+
}

src/components/DiyEditor/components/mobile/ProductCard/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
class="text-16px"
6868
:style="{ color: property.fields.price.color }"
6969
>
70-
¥{{ fenToYuan(spu.price) }}
70+
¥{{ fenToYuan(spu.price as any) }}
7171
</span>
7272
<!-- 市场价 -->
7373
<span

src/views/mall/product/spu/form/InfoForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
:show-word-limit="true"
4646
class="w-80!"
4747
maxlength="128"
48-
placeholder="请输入商品名称"
48+
placeholder="请输入商品简介"
4949
type="textarea"
5050
/>
5151
</el-form-item>

src/views/mall/promotion/coupon/components/CouponSelect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const queryParams = reactive({
138138
pageSize: 10,
139139
name: null,
140140
discountType: null,
141-
canTakeTypes: null
141+
canTakeTypes:[1]//只获得直接领取的券
142142
})
143143
const queryFormRef = ref() // 搜索的表单
144144
const selectedCouponList = ref<CouponTemplateApi.CouponTemplateVO[]>([]) // 选择的数据

src/views/mall/promotion/coupon/formatter.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ export const discountFormat = (row: CouponTemplateVO) => {
1616

1717
// 格式化【领取上限】
1818
export const takeLimitCountFormat = (row: CouponTemplateVO) => {
19-
if (row.takeLimitCount === -1) {
20-
return '无领取限制'
19+
if(row.takeLimitCount){
20+
if (row.takeLimitCount === -1) {
21+
return '无领取限制'
22+
}
23+
return `${row.takeLimitCount} 张/人`
24+
}else{
25+
return ' '
2126
}
22-
return `${row.takeLimitCount} 张/人`
27+
2328
}
2429

2530
// 格式化【有效期限】

src/views/mall/promotion/discountActivity/DiscountActivityForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ const submitForm = async () => {
190190
const products = cloneDeep(spuAndSkuListRef.value.getSkuConfigs('productConfig'))
191191
products.forEach((item: DiscountActivityApi.DiscountProductVO) => {
192192
item.discountPercent = convertToInteger(item.discountPercent)
193-
item.discountPrice = convertToInteger(item.discountPrice)
193+
item.discountPrice = convertToInteger(yuanToFen(item.discountPrice))
194194
})
195195
const data = cloneDeep(formRef.value.formModel) as DiscountActivityApi.DiscountActivityVO
196196
data.products = products

src/views/mall/promotion/discountActivity/discountActivity.data.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ const crudSchemas = reactive<CrudSchema[]>([
7070
width: 120
7171
}
7272
},
73+
{
74+
label: '优惠类型',
75+
field: 'discountType',
76+
dictType: DICT_TYPE.PROMOTION_DISCOUNT_TYPE,
77+
dictClass: 'number',
78+
isSearch: true,
79+
form: {
80+
component: 'Radio',
81+
value: 1
82+
}
83+
},
7384
{
7485
label: '活动商品',
7586
field: 'spuId',

src/views/mall/promotion/rewardActivity/RewardForm.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ const open = async (type: string, id?: number) => {
118118
data.startAndEndTime = [data.startTime, data.endTime]
119119
// 规则分转元
120120
data.rules?.forEach((item: any) => {
121+
item.limit = fenToYuan(item.limit || 0)
121122
item.discountPrice = fenToYuan(item.discountPrice || 0)
122123
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
123124
item.limit = fenToYuan(item.limit || 0)
@@ -153,6 +154,7 @@ const submitForm = async () => {
153154
delete data.startAndEndTime
154155
// 规则元转分
155156
data.rules.forEach((item) => {
157+
item.limit = yuanToFen(item.limit || 0)
156158
item.discountPrice = yuanToFen(item.discountPrice || 0)
157159
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
158160
item.limit = yuanToFen(item.limit || 0)

src/views/mall/promotion/rewardActivity/index.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
placeholder="请选择活动状态"
2828
>
2929
<el-option
30-
v-for="dict in getIntDictOptions(DICT_TYPE.PROMOTION_ACTIVITY_STATUS)"
30+
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
3131
:key="dict.value"
3232
:label="dict.label"
3333
:value="dict.value"
@@ -71,6 +71,11 @@
7171
<ContentWrap>
7272
<el-table v-loading="loading" :data="list" default-expand-all row-key="id">
7373
<el-table-column label="活动名称" prop="name" />
74+
<el-table-column label="活动范围" prop="productScope" >
75+
<template #default="scope">
76+
<dict-tag :type="DICT_TYPE.PROMOTION_PRODUCT_SCOPE" :value="scope.row.productScope" />
77+
</template>
78+
</el-table-column>
7479
<el-table-column
7580
:formatter="dateFormatter"
7681
align="center"

0 commit comments

Comments
 (0)