Commit e1e52df2 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents c10b0e93 c4f535f0
......@@ -70,6 +70,13 @@ const router = {
component: '@/pages/systemManage/ruleSettingManage/merchantPayType/add',
hideInMenu: true
},
// 编辑参数配置
{
path: '/system/ruleSettingManager/merchantPayType/edit',
name: '编辑参数配置',
component: '@/pages/systemManage/ruleSettingManage/merchantPayType/add',
hideInMenu: true
},
{
path: '/system/ruleSettingManager/transactionRules',
name: '平台交易规则',
......
......@@ -26,10 +26,10 @@ export interface LevelBrandProps {
};
const PIC_MAP = {
1: IMG_LEVEL1,
2: IMG_LEVEL2,
3: IMG_LEVEL3,
4: IMG_LEVEL4,
1: IMG_LEVEL1,
2: IMG_LEVEL2,
3: IMG_LEVEL3,
4: IMG_LEVEL4,
};
const LevelBrand: React.FC<LevelBrandProps> = ({ level }) => {
......@@ -42,4 +42,4 @@ const LevelBrand: React.FC<LevelBrandProps> = ({ level }) => {
);
};
export default LevelBrand;
\ No newline at end of file
export default LevelBrand;
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-29 09:36:25
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-15 18:12:20
* @LastEditTime: 2021-12-01 09:57:24
* @Description: 发券明细
*/
import React, { useState, useMemo } from 'react';
......@@ -205,7 +205,7 @@ const DeliverCoupon: React.FC<IProps> = (props) => {
},
{
title: '适用用户',
dataIndex: 'memberAgeTypeName',
dataIndex: 'suitableMemberTypeName',
},
{
title: '会员类型',
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-28 18:06:53
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-12 14:25:22
* @LastEditTime: 2021-11-30 19:46:56
* @Description: 执行明细
*/
import React, { useRef, } from 'react';
......@@ -178,19 +178,22 @@ const RunningInfo: React.FC<IProps> = (props) => {
},
{
title: '适用用户',
dataIndex: 'bransuitableMemberTypeNamed',
dataIndex: 'suitableMemberTypeName',
},
{
title: '领(发)放劵时间',
dataIndex: 'createTimeStart',
dataIndex: 'createTime',
render: (text) => text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '',
},
{
title: '劵有效期起始时间',
dataIndex: 'effectiveTimeStart',
dataIndex: 'validTimeStart',
render: (text) => text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '',
},
{
title: '券有效期截止时间',
dataIndex: 'effectiveTimeEnd',
dataIndex: 'validTimeEnd',
render: (text) => text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '',
},
{
title: '关联订单',
......@@ -207,7 +210,7 @@ const RunningInfo: React.FC<IProps> = (props) => {
{
title: '订单金额',
dataIndex: 'amount',
render: (text) => ${text || ''}`,
render: (text) => ${text || '0'}`,
},
{
title: '订单状态',
......
......@@ -40,7 +40,7 @@ const schema: ISchema = {
},
disabledDate: (current) => current && current < moment().startOf('day'),
disabledTime: (current, type) => {
if (type === 'start' && moment().isSame(current, 'day')) {
if ((type === 'start' || type || 'end') && moment().isSame(current, 'day')) {
return {
disabledHours: () => range(0, 24).splice(0, moment().get('hour')),
disabledMinutes: () => range(0, 60).splice(0, moment().get('minute')),
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-12 15:22:51
* @LastEditTime: 2021-11-30 20:08:50
* @Description:
*/
import { FormEffectHooks, FormPath, IFormActions } from '@formily/antd';
......@@ -260,17 +260,17 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
// 领(发)券起始时间
onFieldValueChange$('[releaseTimeStart, releaseTimeEnd]').subscribe(state => {
const { value } = state;
const releaseTimeStartValue = value?.[0];
const releaseTimeEndValue = value?.[1];
const effectiveTime = getFieldValue('[effectiveTimeStart, effectiveTimeEnd]'); // 券有效期
const effectiveTimeStartValue = effectiveTime?.[0];
if (
releaseTimeStartValue
releaseTimeEndValue
&& effectiveTimeStartValue
&& moment(releaseTimeStartValue) > moment(effectiveTimeStartValue)
&& moment(releaseTimeEndValue) > moment(effectiveTimeStartValue)
) {
setFieldState('[releaseTimeStart, releaseTimeEnd]', fieldState => {
FormPath.setIn(fieldState, 'errors', '领(发)券起始时间应该小于券有效期起始时间');
FormPath.setIn(fieldState, 'errors', '领(发)券截止时间应该小于券有效期起始时间');
});
} else {
actions.clearErrors('[releaseTimeStart, releaseTimeEnd]');
......@@ -282,15 +282,15 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
const { value } = state;
const effectiveTimeStartValue = value?.[0];
const releaseTime = getFieldValue('[releaseTimeStart, releaseTimeEnd]'); // 券有效期
const releaseTimeStartValue = releaseTime?.[0];
const releaseTimeEndValue = releaseTime?.[1];
if (
effectiveTimeStartValue
&& releaseTimeStartValue
&& moment(effectiveTimeStartValue) < moment(releaseTimeStartValue)
&& releaseTimeEndValue
&& moment(effectiveTimeStartValue) < moment(releaseTimeEndValue)
) {
setFieldState('[effectiveTimeStart, effectiveTimeEnd]', fieldState => {
FormPath.setIn(fieldState, 'errors', '券有效期起始时间应该大于等于领(发)券起始时间');
FormPath.setIn(fieldState, 'errors', '券有效期起始时间应该大于等于领(发)券截止时间');
});
} else {
actions.clearErrors('[effectiveTimeStart, effectiveTimeEnd]');
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:05:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-15 14:22:39
* @LastEditTime: 2021-11-30 20:14:44
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -106,7 +106,7 @@ const schema: ISchema = {
showTime: true,
disabledDate: (current) => current && current < moment().startOf('day'),
disabledTime: (current, type) => {
if (type === 'start' && moment().isSame(current, 'day')) {
if ((type === 'start' || type || 'end') && moment().isSame(current, 'day')) {
return {
disabledHours: () => range(0, 24).splice(0, moment().get('hour')),
disabledMinutes: () => range(0, 60).splice(0, moment().get('minute')),
......@@ -303,7 +303,7 @@ const schema: ISchema = {
showTime: true,
disabledDate: (current) => current && current < moment().startOf('day'),
disabledTime: (current, type) => {
if (type === 'start' && moment().isSame(current, 'day')) {
if ((type === 'start' || type || 'end') && moment().isSame(current, 'day')) {
return {
disabledHours: () => range(0, 24).splice(0, moment().get('hour')),
disabledMinutes: () => range(0, 60).splice(0, moment().get('minute')),
......
......@@ -9,7 +9,7 @@ import styles from './index.less';
import { priceFormat } from '@/utils/numberFomat';
import { getManageShopListAdorn, getManageContentInformationListAdorn } from '@/services/ManageV2Api';
import { getProductCommodityGetPlatformCommodityList } from '@/services/ProductV2Api';
import { postSearchCommodityTemplateGetCommodityList, getSearchCommodityTemplateGetBrandList } from '@/services/SearchV2Api';
import { postSearchCommodityTemplateSearchCommodityList, getSearchCommodityTemplateGetBrandList } from '@/services/SearchV2Api';
import { getTemplateWebMemberShopWebMemberShopListAdorn } from '@/services/TemplateV2Api';
......@@ -103,7 +103,7 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
_params.priceTypeList = [3];
_params.idNotInList = selectId;
_params.shopId = getPointMallId()
_fetch = postSearchCommodityTemplateGetCommodityList;
_fetch = postSearchCommodityTemplateSearchCommodityList;
}
break;
......
......@@ -4,7 +4,7 @@ import { updatePageConfig } from '@lingxi-design/core';
import { resolveMappingPageConfig } from '@lingxi-design/react'
import { message } from 'antd';
import { getTemplateAdornAppEnterpriseFind, postTemplateMobileMemberShopMobileMemberShopInGoodsList, getTemplateWebActivityPageGet } from '@/services/TemplateV2Api';
import { getSearchCommodityTemplateGetFirstCategoryListByMemberId, getSearchCommodityTemplateGetBrandList, postSearchCommodityTemplateGetCommodityList } from '@/services/SearchV2Api';
import { getSearchCommodityTemplateGetFirstCategoryListByMemberId, getSearchCommodityTemplateGetBrandList, postSearchCommodityTemplateSearchCommodityList } from '@/services/SearchV2Api';
import { getMarketingAdornGoodsListAdorn, } from '@/services/MarketingV2Api';
import { getManageContentInformationListAdorn, getManageContentInformationPage } from '@/services/ManageV2Api';
import { isEmpty, cloneDeep } from 'lodash';
......@@ -313,7 +313,7 @@ const appMallEdit: React.FC<ShopPreviewPropsType> = (props) => {
idInList: showCaseItem.id,
priceTypeList: [3],
}
res = await postSearchCommodityTemplateGetCommodityList(params)
res = await postSearchCommodityTemplateSearchCommodityList(params)
message.destroy()
if (res.code === 1000) {
dataList = res.data.data
......
......@@ -4,7 +4,7 @@ import { updatePageConfig } from '@lingxi-design/core';
import { resolveMappingPageConfig } from '@lingxi-design/react'
import { message } from 'antd';
import { getTemplateAdornAppEnterpriseFind, postTemplateMobileMemberShopMobileMemberShopInGoodsList, getTemplateWebActivityPageGet, getTemplateWebMemberShopWebFindByIdIn, getTemplateWebMemberShopWebRecommendList } from '@/services/TemplateV2Api';
import { getSearchCommodityTemplateGetFirstCategoryListByMemberId, getSearchCommodityTemplateGetBrandList, postSearchCommodityTemplateGetCommodityList, postSearchMobileShopEnterpriseGetCommodityList, postSearchMobileShopEnterpriseGetCategoryBrand } from '@/services/SearchV2Api';
import { getSearchCommodityTemplateGetFirstCategoryListByMemberId, getSearchCommodityTemplateGetBrandList, postSearchCommodityTemplateSearchCommodityList, postSearchMobileShopEnterpriseGetCommodityList, postSearchMobileShopEnterpriseGetCategoryBrand } from '@/services/SearchV2Api';
import { getMarketingAdornGoodsListAdorn, } from '@/services/MarketingV2Api';
import { getManageContentInformationListAdorn, getManageContentInformationPageByIdIn } from '@/services/ManageV2Api';
import { isEmpty } from 'lodash';
......@@ -349,7 +349,7 @@ const appMallEdit: React.FC<ShopPreviewPropsType> = (props) => {
idInList: showCaseItem.id,
priceTypeList: [3],
}
res = await postSearchCommodityTemplateGetCommodityList(params)
res = await postSearchCommodityTemplateSearchCommodityList(params)
message.destroy()
if (res.code === 1000) {
dataList = res.data.data
......
......@@ -36,11 +36,12 @@ interface BannerClientProps {
productIds: number[],
productList?: any[],
// 1.B端 2.C端 3.SRM
property?: 1 | 2 | 3
property?: 1 | 2 | 3,
environment: number,
}
const RecomendShops: React.FC<BannerClientProps> = (props: BannerClientProps) => {
const { id, type, property = 1, memberName, memberId, roleId, logo, productIds = [], productList = [], selectedKey } = props;
const { id, type, property = 1, environment, memberName, memberId, roleId, logo, productIds = [], productList = [], selectedKey } = props;
const [mixVisible, setMixVisible] = useState<boolean>(false);
const [actVisible, setActVisible] = useState<boolean>(false);
const [commodityVisible, setCommodityVisible] = useState<boolean>(false);
......@@ -196,6 +197,7 @@ const RecomendShops: React.FC<BannerClientProps> = (props: BannerClientProps) =>
onConfirm={_onChooseConfirm}
disabledKeys={sameLevelPropsList ? sameLevelPropsList.map((item) => item.id) : []}
visible={mixVisible}
environment={environment}
/>
<CommodityDrawer
selectId={productIds}
......
......@@ -224,7 +224,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
onPressEnter={_handleInputConfirm}
/>
)}
{!inputVisible && (
{!inputVisible && (!tags || tags.length <= 2 ) && (
<Tag className={styles['site-tag-plus']} onClick={_showInput}>
<PlusOutlined /> 新增标签
</Tag>
......
......@@ -211,6 +211,7 @@ const MemberDetail: React.FC<{}> = () => {
actions={treeActions}
treeData={treeData}
handleSelect={handleSelect}
checkStrictly
customKey='id'
disabled={pageStatus === PageStatus.PREVIEW}
/>
......
......@@ -96,6 +96,7 @@ const Organ: React.FC<{}> = () => {
toolsRender={toolsRender}
actions={treeActions}
customKey='id'
checkStrictly
handleSelect={(key, node) => handleSelect(key, node)}
/>
:
......
......@@ -229,6 +229,7 @@ const AddUser: React.FC<{}> = () => {
handleSelect={(key, node) => handlePlateformSelect(key, node)}
actions={originTreeActions}
customKey="id"
checkStrictly
/>
</Modal>
</div>
......
......@@ -34,6 +34,21 @@ const TAB_LINK = [
{ id: 'typeLayout', title: '参数配置' },
]
const Level = (type) => {
switch (type) {
case '青铜会员':
return 1
case '白银会员':
return 2
case '黄金会员':
return 3
case '钻石会员':
return 4
default:
return 10086
}
}
const MerchantPayTypeAdded = (props) => {
const { state, pathname } = history.location;
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
......@@ -124,7 +139,13 @@ const MerchantPayTypeAdded = (props) => {
const handleSubmit = (_: string[] | number[], selectRowRecord: any) => {
form.setFieldsValue({ 'name': selectRowRecord[0].name })
setMenberInfo(selectRowRecord[0])
const param = {
...selectRowRecord[0],
fundModeName: '会员直接到账',
payTypeName: '线上支付',
payChannelName: '支付宝',
}
setMenberInfo(param)
toggle(false)
}
......@@ -178,6 +199,7 @@ const MerchantPayTypeAdded = (props) => {
useEffect(() => {
if (!isEmpty(state?.record) && !isEmpty(channel)) {
form.setFieldsValue({ ...state?.record })
setMenberInfo(state?.record)
setDataSource([
{
......@@ -222,8 +244,8 @@ const MerchantPayTypeAdded = (props) => {
</Col>
<Col span={12}>
<Form.Item label='会员等级'>
{path !== 'detail' && <LevelBrand level={menberInfo.level} />}
{path === 'detail' && <Typography.Text>{menberInfo.levelTag}</Typography.Text>}
{path !== 'detail' && <LevelBrand level={menberInfo.levelTag ? Level(menberInfo.levelTag) : menberInfo.level} />}
{path === 'detail' && <LevelBrand level={Level(menberInfo.levelTag)} />}
</Form.Item>
<Form.Item label='资金归集模式'>
<Typography.Text>{menberInfo.fundModeName}</Typography.Text>
......@@ -249,7 +271,7 @@ const MerchantPayTypeAdded = (props) => {
pagination={false}
/>
{path !== 'detail' && <Button
disabled={dataSource.length > 1}
disabled={dataSource.length >= 1}
type='dashed'
block
icon={<PlusOutlined />}
......
......@@ -72,6 +72,11 @@ const MerchantPayTypeLayout = () => {
// render: (_text, record: any) => <LevelBrand level={record.level} />
},
{
title: '资金归集模式',
key: 'fundModeName',
dataIndex: 'fundModeName',
},
{
title: '支付方式',
key: 'payTypeName',
dataIndex: 'payTypeName',
......@@ -106,6 +111,14 @@ const MerchantPayTypeLayout = () => {
删除
</Button>
</Popconfirm>
<Link
to={{
pathname: '/system/ruleSettingManager/merchantPayType/edit',
state: { record },
}}
>
编辑
</Link>
</>
)
}
......@@ -134,7 +147,7 @@ const MerchantPayTypeLayout = () => {
type: "object",
"x-component": "controllerBtns",
},
search: {
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
......
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