Commit 2d1194fe authored by XieZhiXiong's avatar XieZhiXiong

feat: 跟进商品优惠券相关

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