Commit a74fc25b authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

feat: 新需求修改

parent 912c013f
......@@ -59,8 +59,8 @@ const router = [
// component: '@/pages/home',
// // icon: 'BarChartOutlined'
// },
...asyncRoutes,
// ...refactorRoutes,
// ...asyncRoutes,
...refactorRoutes,
{
path: '/noAuth',
hidePageHeader: true,
......
......@@ -48,6 +48,21 @@ const router = {
component: '@/pages/systemManage/ruleSettingManage/paySetting',
hidePageHeader: true,
},
// 商户支付参数配置
{
path: '/system/ruleSettingManager/merchantPayType',
name: '商户支付参数配置',
component: '@/pages/systemManage/ruleSettingManage/merchantPayType',
// hidePageHeader: true,
},
// 参数配置
{
path: '/system/ruleSettingManager/merchantPayType/add',
name: '参数配置',
component: '@/pages/systemManage/ruleSettingManage/merchantPayType/add',
hideInMenu: true
// hidePageHeader: true,
},
{
path: '/system/ruleSettingManager/transactionRules',
name: '平台交易规则',
......@@ -183,7 +198,7 @@ const router = {
component: '@/pages/systemManage/ruleSettingManage/mallRules/detail',
hidePageHeader: true,
hideInMenu: true
}
},
]
},
{
......
......@@ -10,7 +10,7 @@ export interface ShopInfo {
describe: string;
state: number;
url: string;
isDefault?: any;
isDefault: number;
createTime?: any;
}
......
import React from 'react';
import { Card, Table, Typography, Button, Popconfirm, Space } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { PlusOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
const MerchantPayTypeAdded = () => {
const columns: ColumnType<any>[] = [
{
title: '参数代码',
key: 'key',
dataIndex: 'key'
},
{
title: '参数值',
key: 'value',
dataIndex: 'value',
width: '50%',
ellipsis: true,
render: (text, record) => <>
{record.code === 14 && <Typography.Link href={text} target="_blank">{text}</Typography.Link>}
{record.code !== 14 && <>{text}</>}
</>
},
{
title: '参数描述',
key: 'remark',
dataIndex: 'remark',
ellipsis: true,
},
{
title: '操作',
key: 'options',
dataIndex: 'options',
render: (_: any, record: any, index: number) => <>
<Button type='link'>编辑</Button>
<Popconfirm
title="确定要执行这个操作?"
okText="是"
cancelText="否"
>
<Button type='link'>删除</Button>
</Popconfirm>
</>
}
]
return (
<PageHeaderWrapper
extra={
<Button icon={<PlusOutlined />} type='primary'>保存</Button>
}
>
<Card>
<Space direction='vertical' style={{ width: '100%' }}>
<Table
rowKey={(_record: any, index: any) => `table${index + 1}`}
columns={columns}
pagination={false}
/>
<Button
type='dashed'
block
icon={<PlusOutlined />}
style={{ marginBottom: '24px' }}
// onClick={() => toggle(_item.payChannel)}
>
新增参数配置
</Button>
</Space>
</Card>
</PageHeaderWrapper>
)
}
export default MerchantPayTypeAdded;
import React from 'react';
import { history } from 'umi';
import { Button, Row, Col, Space } from 'antd';
import TableLayout from '@/components/TableLayout';
import StatusSwitch from '@/components/StatusSwitch';
import { PlusOutlined } from '@ant-design/icons';
const MerchantPayTypeLayout = () => {
const columns = [
{
title: 'ID',
key: '',
dataIndex: '',
},
{
title: '会员名称',
key: '',
dataIndex: '',
},
{
title: '会员类型',
key: '',
dataIndex: '',
},
{
title: '会员角色',
key: '',
dataIndex: '',
},
{
title: '会员等级',
key: '',
dataIndex: '',
},
{
title: '支付方式',
key: '',
dataIndex: '',
},
{
title: '支付渠道',
key: '',
dataIndex: '',
},
{
title: '状态',
key: '',
dataIndex: '',
render: (text: any, record: any) => (
<StatusSwitch
fieldNames="status"
handleConfirm={() => console.log(record)}
record={record}
/>
)
},
{
title: '操作',
key: '',
dataIndex: '',
},
]
return (
<TableLayout
columns={columns}
schema={{
type: "object",
properties: {
megalayout: {
type: "object",
"x-component": "mega-layout",
"x-component-props": {
grid: true
},
properties: {
ctl: {
type: "object",
"x-component": "controllerBtns",
},
search: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
advanced: false,
},
},
}
}
}
}}
controllerBtns={
<Row>
<Col span={24}>
<Space direction="horizontal" size={16}>
<Button
type="primary"
icon={<PlusOutlined />}
onClick={() => history.push(`/system/ruleSettingManager/merchantPayType/add`)}
>
新增
</Button>
</Space>
</Col>
</Row>
}
/>
)
}
export default MerchantPayTypeLayout;
......@@ -51,6 +51,14 @@
transition: transform .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1);
}
}
.tag {
margin-left: 14px;
padding: 4px;
font-size: 12px;
color: #5C626A;
background-color: #F4F5F7;
border-radius: 2px;
}
}
.upload_fileList {
......
import React, { useEffect, useState, Fragment } from 'react';
import PeripheralLayout from '@/components/DetailLayout';
import { ColumnType } from 'antd/lib/table/interface';
import { Tabs, Form, Button, Radio, Table, Space, Image, Popconfirm, Typography } from 'antd';
import { Tabs, Form, Button, Radio, Table, Space, Image, Popconfirm, Typography, Tag } from 'antd';
import Card from '@/components/Card';
import style from './index.less';
import { PlusOutlined, SaveOutlined } from '@ant-design/icons';
......@@ -309,7 +309,41 @@ const PaySettingLayout = () => {
getFieldValue(`payChannel_${_item.payChannel}`) === 2
) && (
<Fragment>
<div className={style.anchor}>{`${_item.payChannelName}支付参数配置`}</div>
<div className={style.anchor}>{`${_item.payChannelName}支付参数配置`}{getFieldValue(`payChannel_${_item.payChannel}`) === 1 ? <span className={style.tag}>平台代收模式</span> : null}</div>
<Form.Item
wrapperCol={{ span: 24 }}
name={`payChannel_${_item.payChannel}`}
>
<Table
rowKey={(_record: any, index: any) => `table${index + 1}`}
columns={columns}
dataSource={dataSource(item.payType, _item.payChannel)}
pagination={false}
/>
<Button
type='dashed'
block
icon={<PlusOutlined />}
style={{ marginBottom: '24px' }}
onClick={() => toggle(_item.payChannel)}
>
新增参数配置
</Button>
</Form.Item>
</Fragment>
)}
</Form.Item>
<Form.Item
noStyle
shouldUpdate={(prevValues, currentValues) => prevValues[`payChannel_${_item.payChannel}`] !== currentValues[`payChannel_${_item.payChannel}`]}
>
{({ getFieldValue }) => (
getFieldValue(`payChannel_${_item.payChannel}`) === 1
) && (
<Fragment>
<div className={style.anchor}>{`${_item.payChannelName}支付参数配置`}{getFieldValue(`payChannel_${_item.payChannel}`) === 1 ? <span className={style.tag}>会员直接到账模式</span> : null}</div>
<Button style={{ marginBottom: '24px'}}>商户参数配置</Button>
<Form.Item
wrapperCol={{ span: 24 }}
name={`payChannel_${_item.payChannel}`}
......
......@@ -70,12 +70,13 @@ const BasicInfo = () => {
{!isEmpty(item) && (
<>
<div className={style.anchor}>{item.payTypeName}</div>
<Form.Item className={style.spaceBox} label='资金集模式' required>
<Form.Item className={style.spaceBox} label='资金集模式' required>
<Space direction='vertical'>
<Form.Item
{...restField}
name={[name, 'fundMode']}
rules={[{ required: true, message: '请选择' }]}
initialValue={item.fundModes[0].fundMode}
>
<Select style={{ width: '100%' }}>
{item.fundModes.map((v: any) => (
......
......@@ -285,7 +285,11 @@ const MemberSettleAdd: React.FC = () => {
// 获取单据类型
useAsyncSelect(
"settlementOrderType",
fetchOptions(getSettleAccountsCommonGetPlatformStrategySettlementOrderType )
fetchOptions(getSettleAccountsCommonGetPlatformStrategySettlementOrderType ),
)
useAsyncSelect(
"_",
fetchOptions(getSettleAccountsCommonGetPlatformStrategySettlementOrderType ),
)
}}
/>
......
......@@ -68,6 +68,14 @@ export const addSchema: ISchema = {
'x-rules': [
{required: true, message: '请填写策略名称'},
]
},
_: {
type: 'string',
enum: [],
title: '结算支付方式',
'x-rules': [
{required: true, message: '请填写策略名称'},
]
}
},
}
......
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