Skip to content

Commit a45c8e6

Browse files
author
puhui999
committed
Merge remote-tracking branch 'yudao/dev' into dev-crm
2 parents 360cce1 + fe33517 commit a45c8e6

File tree

12 files changed

+54
-17
lines changed

12 files changed

+54
-17
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"source.fixAll.stylelint": "explicit"
8888
},
8989
"[vue]": {
90-
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
90+
"editor.defaultFormatter": "esbenp.prettier-vscode"
9191
},
9292
"i18n-ally.localesPaths": ["src/locales"],
9393
"i18n-ally.keystyle": "nested",

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/utils/dict.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ export enum DICT_TYPE {
194194
PROMOTION_COUPON_TEMPLATE_VALIDITY_TYPE = 'promotion_coupon_template_validity_type', // 优惠劵模板的有限期类型
195195
PROMOTION_COUPON_STATUS = 'promotion_coupon_status', // 优惠劵的状态
196196
PROMOTION_COUPON_TAKE_TYPE = 'promotion_coupon_take_type', // 优惠劵的领取方式
197-
PROMOTION_ACTIVITY_STATUS = 'promotion_activity_status', // 优惠活动的状态
198197
PROMOTION_CONDITION_TYPE = 'promotion_condition_type', // 营销的条件类型枚举
199198
PROMOTION_BARGAIN_RECORD_STATUS = 'promotion_bargain_record_status', // 砍价记录的状态
200199
PROMOTION_COMBINATION_RECORD_STATUS = 'promotion_combination_record_status', // 拼团记录的状态

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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ import {
116116
validityTypeFormat
117117
} from '@/views/mall/promotion/coupon/formatter'
118118
import * as CouponTemplateApi from '@/api/mall/promotion/coupon/couponTemplate'
119+
import { CouponTemplateTakeTypeEnum } from '@/utils/constants'
119120
120121
defineOptions({ name: 'CouponSelect' })
121122
@@ -138,7 +139,7 @@ const queryParams = reactive({
138139
pageSize: 10,
139140
name: null,
140141
discountType: null,
141-
canTakeTypes: null
142+
canTakeTypes: [CouponTemplateTakeTypeEnum.USER.type] // 只获得直接领取的券
142143
})
143144
const queryFormRef = ref() // 搜索的表单
144145
const selectedCouponList = ref<CouponTemplateApi.CouponTemplateVO[]>([]) // 选择的数据

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ 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} 张/人`
2327
}
2428

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

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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ const open = async (type: string, id?: number) => {
119119
// 规则分转元
120120
data.rules?.forEach((item: any) => {
121121
item.discountPrice = fenToYuan(item.discountPrice || 0)
122+
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
123+
item.limit = fenToYuan(item.limit || 0)
124+
}
122125
})
123126
formData.value = data
124127
// 获得商品范围
@@ -151,6 +154,9 @@ const submitForm = async () => {
151154
// 规则元转分
152155
data.rules.forEach((item) => {
153156
item.discountPrice = yuanToFen(item.discountPrice || 0)
157+
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
158+
item.limit = yuanToFen(item.limit || 0)
159+
}
154160
})
155161
// 设置商品范围
156162
setProductScopeValues(data)

0 commit comments

Comments
 (0)