Commit 2d1194fe authored by XieZhiXiong's avatar XieZhiXiong

feat: 跟进商品优惠券相关

parent 543720aa
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-03 17:34:51
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-03 18:06:51
* @LastEditTime: 2021-08-13 15:43:29
* @Description:
*/
const platformCouponManageRoute = {
......@@ -78,6 +78,7 @@ const platformCouponManageRoute = {
component: '@/pages/platformCouponManage/platformCouponNotVerify1/verify',
hideInMenu: true,
noMargin: true,
hidePageHeader: true,
},
// 待审核商家优惠劵(二级)
{
......
......@@ -259,24 +259,24 @@ export default {
'menu.returnManage.orderDetail': '查看订单',
// 营销能力
'menu.platformCouponManage': '商家优惠劵管理',
'menu.platformCouponManage.query': '商家优惠劵查询',
'menu.platformCouponManage.queryDetail': '查看商家优惠劵',
'menu.platformCouponManage.unsubmitted': '待提交审核商家优惠劵',
'menu.platformCouponManage.addCoupon': '新增商家优惠券',
'menu.platformCouponManage.editCoupon': '编辑商家优惠券',
'menu.platformCouponManage.notVerify1': '待审核商家优惠劵(一级)',
'menu.platformCouponManage.notVerify1Detail': '查看待审核商家优惠劵(一级)',
'menu.platformCouponManage.verify1': '审核商家优惠劵(一级)',
'menu.platformCouponManage.notVerify2': '待审核商家优惠劵(二级)',
'menu.platformCouponManage.notVerify2Detai': '查看待审核商家优惠劵(二级)',
'menu.platformCouponManage.verify2': '审核商家优惠劵(二级)',
'menu.platformCouponManage.toConfirm': '待提交商家优惠劵',
'menu.platformCouponManage.toConfirmDetail': '查看待提交商家优惠劵',
'menu.platformCouponManage.confirmVerify': '提交商家优惠劵',
'menu.platformCouponManage.analysis': '商家优惠劵执行',
'menu.platformCouponManage.analysisDetail': '查看商家优惠劵执行',
'menu.platformCouponManage.analysisDeliver': '商家优惠劵发券',
'menu.platformCouponManage': '平台优惠劵管理',
'menu.platformCouponManage.query': '平台优惠劵查询',
'menu.platformCouponManage.queryDetail': '查看平台优惠劵',
'menu.platformCouponManage.unsubmitted': '待提交审核平台优惠劵',
'menu.platformCouponManage.addCoupon': '新增平台优惠券',
'menu.platformCouponManage.editCoupon': '编辑平台优惠券',
'menu.platformCouponManage.notVerify1': '待审核平台优惠劵(一级)',
'menu.platformCouponManage.notVerify1Detail': '查看待审核平台优惠劵(一级)',
'menu.platformCouponManage.verify1': '审核平台优惠劵(一级)',
'menu.platformCouponManage.notVerify2': '待审核平台优惠劵(二级)',
'menu.platformCouponManage.notVerify2Detai': '查看待审核平台优惠劵(二级)',
'menu.platformCouponManage.verify2': '审核平台优惠劵(二级)',
'menu.platformCouponManage.toConfirm': '待提交平台优惠劵',
'menu.platformCouponManage.toConfirmDetail': '查看待提交平台优惠劵',
'menu.platformCouponManage.confirmVerify': '提交平台优惠劵',
'menu.platformCouponManage.analysis': '平台优惠劵执行',
'menu.platformCouponManage.analysisDetail': '查看平台优惠劵执行',
'menu.platformCouponManage.analysisDeliver': '平台优惠劵发券',
}
// export default utils.transformDataPre(data, 'menu')
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-22 17:12:38
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-20 11:04:28
* @LastEditTime: 2021-08-13 15:44:43
* @Description: 适用商品
*/
import React from 'react';
......@@ -70,7 +70,7 @@ const ApplicableGoods: React.FC<IProps> = (props) => {
},
{
title: '商品图片',
dataIndex: 'productImg',
dataIndex: 'mainPic',
align: 'center',
render: (text) => <img src={text} className={styles['product-img']} />
},
......
......@@ -3,7 +3,7 @@
* @Date: 2021-06-24 14:09:49
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-24 14:09:50
* @Description: 新增商家优惠券
* @Description: 新增平台优惠券
*/
import React from 'react';
import CouponForm from './components/CouponForm';
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-07-19 14:19:31
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-03 16:37:37
* @LastEditTime: 2021-08-13 15:38:09
* @Description: 适用商品 Form Item
*/
import React, { useState } from 'react';
......@@ -19,7 +19,6 @@ const ApplicableGoodsFormItem = (props) => {
mutators,
editable,
} = props;
const XComponentProps = props.props['x-component-props'] || {};
const [visibleGoodsDrawer, setVisibleGoodsDrawer] = useState(false);
......@@ -99,10 +98,6 @@ const ApplicableGoodsFormItem = (props) => {
};
const handleSelectGoods = () => {
if (!XComponentProps.shopIds) {
message.warning('请先选择商城');
return;
}
handleVisibleGoodsDrawer(true);
};
......@@ -133,7 +128,6 @@ const ApplicableGoodsFormItem = (props) => {
<GoodsDrawer
visible={visibleGoodsDrawer}
shopIds={XComponentProps.shopIds}
onClose={handleVisibleGoodsDrawer}
checkeds={value}
onSubmit={handleGoodsDrawerSubmit}
......
......@@ -255,14 +255,4 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
linkage.show('invalidDay');
}
});
// 适用商城
onFieldValueChange$('suitableMallTypes').subscribe(state => {
const { value } = state;
setFieldState('goodsList', fieldState => {
FormPath.setIn(fieldState, 'props.x-component-props', Object.assign({}, fieldState.props['x-component-props'], {
shopIds: value,
}));
});
});
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 13:47:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-03 16:04:57
* @LastEditTime: 2021-08-13 15:14:24
* @Description: 新增/修改 优惠券表单
*/
import React, { useState, useMemo, useEffect } from 'react';
......@@ -304,7 +304,7 @@ const CouponForm: React.FC<IProps> = (props) => {
content: '正在添加,请稍候...',
duration: 0,
});
PublicApi.postMarketingCouponWaitAuditAdd(payload, {
PublicApi.postMarketingCouponPlatformWaitAuditAdd(payload, {
timeout: 0,
}).then((res) => {
if (res.code !== 1000) {
......@@ -324,7 +324,7 @@ const CouponForm: React.FC<IProps> = (props) => {
content: '正在修改,请稍候...',
duration: 0,
});
PublicApi.postMarketingCouponWaitAuditUpdate({
PublicApi.postMarketingCouponPlatformWaitAuditUpdate({
id,
...payload,
}, {
......@@ -355,7 +355,7 @@ const CouponForm: React.FC<IProps> = (props) => {
return (
<Spin spinning={infoLoading}>
<AnchorPage
title="新增商家优惠券"
title="新增平台优惠券"
anchors={anchorsArr}
extra={[
<Button
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 16:11:55
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-30 10:10:15
* @LastEditTime: 2021-08-13 15:39:44
* @Description: 商品选择抽屉
*/
import React, { useEffect } from 'react';
......@@ -77,10 +77,6 @@ interface IProps {
* 抽屉关闭事件
*/
onClose: () => void,
/**
* 商城id
*/
shopIds: number[],
}
type ExtraFetchType = FetchParamsType & {
......@@ -104,7 +100,6 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
checkeds,
onSubmit,
onClose,
shopIds,
} = props;
const [rowSelection, rowCtl] = useRowSelectionTable({ type: 'checkbox', customKey: 'id' });
......@@ -116,12 +111,8 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
}, [checkeds]);
const fetchData = async (params: ExtraFetchType) => {
if (!shopIds || !shopIds.length) {
return { data: [], totalCount: 0 };
}
const res = await PublicApi.postProductCommodityGetCommoditySkuListByShopId({
const res = await PublicApi.postProductCommodityCommonGetCommodityListByPlatform({
...params,
shopIdList: shopIds,
}, {
ctlType: 'none',
});
......@@ -194,7 +185,7 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
// 获取品牌
const fetchBrand = async (name = '') => {
const res = await PublicApi.getProductSelectGetSelectBrand({
const res = await PublicApi.getProductSelectGetSelectPlatformBrand({
name,
});
if (res.code === 1000) {
......@@ -205,7 +196,7 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
// 获取会员品类
const fetchCustomerCategory = async () => {
const res = await PublicApi.getProductCustomerGetCustomerCategoryTree();
const res = await PublicApi.getProductPlatformGetCategoryTree();
if (res.code === 1000) {
return res.data;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment