diff --git a/src/api/crm/permission/index.ts b/src/api/crm/permission/index.ts index 1292f29a..79f69451 100644 --- a/src/api/crm/permission/index.ts +++ b/src/api/crm/permission/index.ts @@ -6,9 +6,9 @@ export interface PermissionVO { bizType: number | undefined // Crm 类型 bizId: number | undefined // Crm 类型数据编号 level: number | undefined // 权限级别 - deptName?: string // 部门名称 // 岗位名称数组 TODO @puhui999:数组? + deptName?: string // 部门名称 nickname?: string // 用户昵称 - postNames?: string // 岗位名称数组 TODO @puhui999:数组? + postNames?: string[] // 岗位名称数组 createTime?: Date } @@ -19,7 +19,7 @@ export const getPermissionList = async (params) => { // 新增团队成员 export const createPermission = async (data: PermissionVO) => { - return await request.post({ url: `/crm/permission/add`, data }) + return await request.post({ url: `/crm/permission/create`, data }) } // 修改团队成员权限级别 diff --git a/src/api/mall/promotion/coupon/couponTemplate.ts b/src/api/mall/promotion/coupon/couponTemplate.ts index 243e22ee..50ae226c 100755 --- a/src/api/mall/promotion/coupon/couponTemplate.ts +++ b/src/api/mall/promotion/coupon/couponTemplate.ts @@ -73,6 +73,13 @@ export function getCouponTemplatePage(params: PageParam) { }) } +// 获得优惠劵模板分页 +export function getCouponTemplateList(ids: number[]) { + return request.get({ + url: `/promotion/coupon-template/list?ids=${ids}` + }) +} + // 导出优惠劵模板 Excel export function exportCouponTemplateExcel(params: PageParam) { return request.get({ diff --git a/src/components/DiyEditor/components/mobile/CouponCard/component.tsx b/src/components/DiyEditor/components/mobile/CouponCard/component.tsx new file mode 100644 index 00000000..1542cad6 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/CouponCard/component.tsx @@ -0,0 +1,78 @@ +import * as CouponTemplateApi from '@/api/mall/promotion/coupon/couponTemplate' +import { CouponTemplateValidityTypeEnum, PromotionDiscountTypeEnum } from '@/utils/constants' +import { floatToFixed2 } from '@/utils' +import { formatDate } from '@/utils/formatTime' + +// 优惠值 +export const CouponDiscount = defineComponent({ + name: 'CouponDiscount', + props: { + coupon: { + type: CouponTemplateApi.CouponTemplateVO + } + }, + setup(props) { + const coupon = props.coupon as CouponTemplateApi.CouponTemplateVO + // 折扣 + let value = coupon.discountPercent + '' + let suffix = ' 折' + // 满减 + if (coupon.discountType === PromotionDiscountTypeEnum.PRICE.type) { + value = floatToFixed2(coupon.discountPrice) + suffix = ' 元' + } + return () => ( +