1
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -71,7 +71,6 @@ export default ({ values, modalOpenState, onModalOpenState, onSubmit }) => {
|
||||
<ProFormRadio.Group
|
||||
label="时间"
|
||||
name="freezeDate"
|
||||
initialValue="6月"
|
||||
rules={[{ required: true, message: '请选择' }]}
|
||||
options={[
|
||||
{ label: '6月', value: '6' },
|
||||
|
||||
@@ -60,7 +60,7 @@ const RoleForm: React.FC = (props: any) => {
|
||||
label="设备类型"
|
||||
name={'deviceType'}
|
||||
>
|
||||
<InputNumber addonAfter="W" style={{ width: 150 }} />
|
||||
<InputNumber addonAfter="KW" style={{ width: 150 }} />
|
||||
</ProForm.Item>
|
||||
<ProForm.Item
|
||||
label="补贴金额"
|
||||
|
||||
@@ -28,7 +28,7 @@ const LogTableList: React.FC = () => {
|
||||
dataIndex: 'deviceType',
|
||||
valueType: 'text',
|
||||
render: (_, record) => {
|
||||
return record?.deviceType + 'W'
|
||||
return record?.deviceType + 'KW'
|
||||
},
|
||||
// renderFormItem: (
|
||||
// _,
|
||||
|
||||
183
src/pages/finance/freeze/index.tsx
Normal file
183
src/pages/finance/freeze/index.tsx
Normal file
@@ -0,0 +1,183 @@
|
||||
import { findPage, recordExtract } from '@/services/finance/index';
|
||||
import { exportData } from '@/utils/func';
|
||||
|
||||
import React, { useRef, useEffect, useState } from 'react';
|
||||
import { useIntl, useAccess } from '@umijs/max';
|
||||
import { message, Tag, Select, Button } from 'antd';
|
||||
import { ActionType, PageContainer, ProTable, ProFormSelect } from '@ant-design/pro-components';
|
||||
import moneyType from '@/assets/json/moneyType.json'
|
||||
import { usersPage } from '@/services/user/user';
|
||||
|
||||
|
||||
|
||||
|
||||
const LogTableList: React.FC = () => {
|
||||
const actionRef = useRef<ActionType>();
|
||||
const [shopOption, setShopOption] = useState([]);
|
||||
const [searchParams, setSearchParams] = useState(null);
|
||||
|
||||
|
||||
|
||||
|
||||
const searchShop = async (value) => {
|
||||
const { success, data } = await usersPage({
|
||||
userId: value
|
||||
});
|
||||
data.records.map((i) => {
|
||||
i.userName = i.userName + ' ' + i.phone
|
||||
})
|
||||
setShopOption(data.records)
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: 'ID',
|
||||
dataIndex: 'id',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '用户信息',
|
||||
dataIndex: 'userId',
|
||||
valueType: 'text',
|
||||
render: (_: any, record: any) => {
|
||||
return <div>
|
||||
<div>用户ID:{record?.userId}</div>
|
||||
<div>用户名:{record?.userName}</div>
|
||||
<div>手机号:{record?.phone}</div>
|
||||
</div>
|
||||
},
|
||||
renderFormItem: (
|
||||
_,
|
||||
{ type, defaultRender, formItemProps, fieldProps, ...rest },
|
||||
form,
|
||||
) => {
|
||||
return <Select
|
||||
{...fieldProps}
|
||||
allowClear
|
||||
showSearch
|
||||
placeholder="请输入用户名或手机号"
|
||||
style={{ width: "100%" }}
|
||||
filterOption={false}
|
||||
onSearch={
|
||||
(e) => {
|
||||
if (!e) {
|
||||
return;
|
||||
}
|
||||
searchShop(e);
|
||||
}
|
||||
}
|
||||
fieldNames={{
|
||||
label: "userName",
|
||||
value: "id"
|
||||
}}
|
||||
options={shopOption}
|
||||
/>
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '记录名称',
|
||||
dataIndex: 'recordName',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '冻结余额',
|
||||
dataIndex: 'freezePoints',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'pointType',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (_: any, record: any) => {
|
||||
return _ == 1 ? '收益' : '余额'
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '记录类型',
|
||||
dataIndex: 'type',
|
||||
valueType: 'text',
|
||||
search: true,
|
||||
render: (_: any, record: any) => {
|
||||
let list = moneyType
|
||||
return list.find((val) => val.id == record.type)?.name
|
||||
},
|
||||
renderFormItem: (
|
||||
_,
|
||||
{ type, defaultRender, formItemProps, fieldProps, ...rest },
|
||||
form,
|
||||
) => {
|
||||
return <Select
|
||||
{...fieldProps}
|
||||
allowClear
|
||||
style={{ width: "100%" }}
|
||||
filterOption={false}
|
||||
fieldNames={{
|
||||
label: "name",
|
||||
value: "id"
|
||||
}}
|
||||
options={moneyType}
|
||||
/>
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'remarks',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
valueType: 'dateRange',
|
||||
search: {
|
||||
transform: (value) => {
|
||||
return {
|
||||
createTimeBegin: value[0],
|
||||
createTimeEnd: value[1],
|
||||
};
|
||||
},
|
||||
},
|
||||
render: (_, record) => {
|
||||
return record?.createTime
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<PageContainer>
|
||||
<div style={{ width: '100%', float: 'right' }}>
|
||||
<ProTable
|
||||
actionRef={actionRef}
|
||||
rowKey="id"
|
||||
key="logList"
|
||||
search={{
|
||||
labelWidth: 120,
|
||||
defaultCollapsed: false,
|
||||
}}
|
||||
toolBarRender={() => [
|
||||
// <Button type="primary" onClick={async () => {
|
||||
// let _res = await recordExtract(searchParams)
|
||||
// exportData(_res, '积分记录')
|
||||
// }}>导出</Button>,
|
||||
]}
|
||||
request={async (params, sorter, filter) => {
|
||||
// params.pointType = 2
|
||||
setSearchParams(params)
|
||||
let { data } = await findPage(params)
|
||||
return {
|
||||
data: data?.records || [],
|
||||
total: data?.total,
|
||||
};
|
||||
}}
|
||||
columns={columns}
|
||||
/>
|
||||
</div>
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
|
||||
export default LogTableList;
|
||||
@@ -32,13 +32,13 @@ const LogTableList: React.FC = () => {
|
||||
|
||||
|
||||
const handleTemp = async (fields) => {
|
||||
console.log(fields);
|
||||
|
||||
const { success } = await importUsersPointsExtract(fields);
|
||||
if (success) {
|
||||
try {
|
||||
const _res = await importUsersPointsExtract(fields);
|
||||
message.success('导入成功');
|
||||
actionRef.current?.reload();
|
||||
setTempFormModal(false);
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -171,10 +171,7 @@ const LogTableList: React.FC = () => {
|
||||
银行卡号:{record.bankCard}
|
||||
</div>
|
||||
<div>
|
||||
开户行:{record.idCard}
|
||||
</div>
|
||||
<div>
|
||||
开户支行:{record.idCard}
|
||||
开户支行:{record.subbranchName}
|
||||
</div>
|
||||
<div hidden={record.type == 1}>
|
||||
纳税人识别号:{record.taxNo}
|
||||
|
||||
@@ -32,6 +32,9 @@ const GoodsTableList: React.FC = () => {
|
||||
dataIndex: 'itemType',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (_: any, record: any) => {
|
||||
return record?.itemType ? record?.itemType + 'KW' :'-'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '销售价格',
|
||||
|
||||
@@ -32,6 +32,9 @@ const GoodsSetMealTableList: React.FC = () => {
|
||||
dataIndex: 'itemType',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (_: any, record: any) => {
|
||||
return record?.itemType ? record?.itemType + 'KW' :'-'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '销售价格',
|
||||
|
||||
@@ -30,22 +30,19 @@ const LogTableList: React.FC = () => {
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
|
||||
|
||||
getWeiXinCollect().then((res) => {
|
||||
getWeiXinCollect(searchParams).then((res) => {
|
||||
setCount1(res.data);
|
||||
})
|
||||
getBalance().then((res) => {
|
||||
getBalance(searchParams).then((res) => {
|
||||
setCount2(res.data);
|
||||
})
|
||||
getCollect().then((res) => {
|
||||
getCollect(searchParams).then((res) => {
|
||||
setCount3(res.data);
|
||||
})
|
||||
getZhiFuBaoCollect().then((res) => {
|
||||
getZhiFuBaoCollect(searchParams).then((res) => {
|
||||
setCount4(res.data);
|
||||
})
|
||||
}, []);
|
||||
}, [searchParams]);
|
||||
|
||||
|
||||
const [shopOption, setShopOption] = useState([]);
|
||||
|
||||
@@ -111,7 +111,7 @@ const LogTableList: React.FC = () => {
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (_: any, record: any) => {
|
||||
return record?.deviceType + 'W'
|
||||
return record?.deviceType + 'KW'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -72,3 +72,14 @@ export async function importUsersPointsExtract(body) {
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
export async function findPage(body) {
|
||||
return request('/api/freeze/findPage', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: body || {},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -42,38 +42,42 @@ export async function orderRefund(bodys) {
|
||||
}
|
||||
|
||||
|
||||
export async function getWeiXinCollect() {
|
||||
export async function getWeiXinCollect(bodys) {
|
||||
return request('/api/orders/getWeiXinCollect', {
|
||||
method: 'GET',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: bodys || {},
|
||||
});
|
||||
}
|
||||
|
||||
export async function getCollect() {
|
||||
export async function getCollect(bodys) {
|
||||
return request('/api/orders/getCollect', {
|
||||
method: 'GET',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: bodys || {},
|
||||
});
|
||||
}
|
||||
|
||||
export async function getBalance() {
|
||||
export async function getBalance(bodys) {
|
||||
return request('/api/orders/getBalance', {
|
||||
method: 'GET',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: bodys || {},
|
||||
});
|
||||
}
|
||||
|
||||
export async function getZhiFuBaoCollect() {
|
||||
export async function getZhiFuBaoCollect(bodys) {
|
||||
return request('/api/orders/getZhiFuBaoCollect', {
|
||||
method: 'GET',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: bodys || {},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user