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

fix: 修改支付参数配置

parent ff26caf2
...@@ -171,6 +171,48 @@ const PaySettingLayout = () => { ...@@ -171,6 +171,48 @@ const PaySettingLayout = () => {
} }
] ]
const columnsBankPay: ColumnType<any>[] = [
{
title: '参数代码',
key: 'key',
dataIndex: 'key'
},
{
title: '参数值',
key: 'value',
dataIndex: 'value',
width: '50%',
ellipsis: true,
render: (text, record) => <>
{(record.code === 41 || record.code === 42) && <Typography.Link href={text} target="_blank">{text}</Typography.Link>}
{(record.code !== 41 && record.code !== 42) && <>{text}</>}
</>
},
{
title: '参数描述',
key: 'remark',
dataIndex: 'remark',
ellipsis: true,
},
{
title: '操作',
key: 'options',
dataIndex: 'options',
render: (_: any, record: any, index: number) => <>
<Button type='link' onClick={() => handleEdit(record, index, 7)}>编辑</Button>
<Popconfirm
title="确定要执行这个操作?"
onConfirm={() => handleDelete(index, 7)}
okText="是"
cancelText="否"
>
<Button type='link'>删除</Button>
</Popconfirm>
</>
}
]
const columns1: ColumnType<any>[] = [ const columns1: ColumnType<any>[] = [
{ {
title: '参数代码', title: '参数代码',
...@@ -329,23 +371,6 @@ const PaySettingLayout = () => { ...@@ -329,23 +371,6 @@ const PaySettingLayout = () => {
_parameters.forEach((item: any) => { _parameters.forEach((item: any) => {
const _channels = [...item.channels] const _channels = [...item.channels]
_channels.forEach(_item => { _channels.forEach(_item => {
// if (payType === 1) {
// if (_item.payChannel === Number(payChannel)) {
// if (isEdit) {
// _item.parameters[editIndex] = format;
// } else {
// _item.parameters.push(format)
// }
// }
// } else {
// if (_item.payChannel === Number(payChannelUnicom)) {
// if (isEdit) {
// _item.parameters[editIndex] = format;
// } else {
// _item.parameters.push(format)
// }
// }
// }
switch(payType) { switch(payType) {
case 1: case 1:
if (_item.payChannel === Number(payChannel)) { if (_item.payChannel === Number(payChannel)) {
...@@ -384,7 +409,7 @@ const PaySettingLayout = () => { ...@@ -384,7 +409,7 @@ const PaySettingLayout = () => {
} else if (payType === 6) { } else if (payType === 6) {
setVisibleUnicom(false) setVisibleUnicom(false)
} else { } else {
setVisibleBankPay(false)
} }
} }
...@@ -736,7 +761,7 @@ const PaySettingLayout = () => { ...@@ -736,7 +761,7 @@ const PaySettingLayout = () => {
> >
<Table <Table
rowKey={(_record: any, index: any) => `table${index + 1}`} rowKey={(_record: any, index: any) => `table${index + 1}`}
columns={columnsUnicom} columns={columnsBankPay}
dataSource={dataSource(item.payType, _item.payChannel)} dataSource={dataSource(item.payType, _item.payChannel)}
pagination={false} pagination={false}
/> />
......
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