Commit d6e3f08ec367039a40c68f56b45c1fb0e2a52c96
1 parent
1a33ea02
feat: 新增隐私钱包页面
Showing
15 changed files
with
1590 additions
and
472 deletions
.umirc.ts
@@ -131,10 +131,30 @@ export default defineConfig({ | @@ -131,10 +131,30 @@ export default defineConfig({ | ||
131 | }, | 131 | }, |
132 | { | 132 | { |
133 | name: '预存管理', | 133 | name: '预存管理', |
134 | - path: '/prepaidManage', | ||
135 | - component: './Prepaid', | 134 | + path: '/prepaid', |
136 | icon: 'AccountBookOutlined', | 135 | icon: 'AccountBookOutlined', |
137 | access: 'canReadAdminAndFinanceAndSales', | 136 | access: 'canReadAdminAndFinanceAndSales', |
137 | + routes: [ | ||
138 | + { | ||
139 | + path: '', | ||
140 | + component: './Prepaid', | ||
141 | + }, | ||
142 | + { | ||
143 | + name: '预存充值', | ||
144 | + path: 'recharge', | ||
145 | + component: './Prepaid/PrepaidRecharge', | ||
146 | + }, | ||
147 | + { | ||
148 | + name: '账号列表', | ||
149 | + path: 'account', | ||
150 | + component: './Prepaid/PrepaidAccount', | ||
151 | + }, | ||
152 | + { | ||
153 | + name: '隐私钱包', | ||
154 | + path: 'privatePocket', | ||
155 | + component: './Prepaid/PrivatePocket', | ||
156 | + }, | ||
157 | + ], | ||
138 | }, | 158 | }, |
139 | { | 159 | { |
140 | name: '课题组管理', | 160 | name: '课题组管理', |
src/pages/Client/Client/index.tsx
@@ -195,15 +195,15 @@ const columns = [ | @@ -195,15 +195,15 @@ const columns = [ | ||
195 | valueType: 'dateTime', | 195 | valueType: 'dateTime', |
196 | hideInSearch: true, | 196 | hideInSearch: true, |
197 | }, | 197 | }, |
198 | - { | ||
199 | - title: '最新更进时间', | ||
200 | - key: 'since', | ||
201 | - width: 150, | ||
202 | - ellipsis: true, | ||
203 | - dataIndex: 'updateTime', | ||
204 | - valueType: 'dateTime', | ||
205 | - hideInSearch: true, | ||
206 | - }, | 198 | + // { |
199 | + // title: '最新更进时间', | ||
200 | + // key: 'since', | ||
201 | + // width: 150, | ||
202 | + // ellipsis: true, | ||
203 | + // dataIndex: 'updateTime', | ||
204 | + // valueType: 'dateTime', | ||
205 | + // hideInSearch: true, | ||
206 | + // }, | ||
207 | // { | 207 | // { |
208 | // title: '最新跟进时间', | 208 | // title: '最新跟进时间', |
209 | // key: 'since', | 209 | // key: 'since', |
src/pages/Order/OrderList/OrderDrawer.tsx
@@ -2253,6 +2253,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -2253,6 +2253,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
2253 | name="discount" | 2253 | name="discount" |
2254 | label="是否竞标/打折" | 2254 | label="是否竞标/打折" |
2255 | //hidden={true} | 2255 | //hidden={true} |
2256 | + initialValue={true} | ||
2256 | options={[ | 2257 | options={[ |
2257 | { | 2258 | { |
2258 | label: '是', | 2259 | label: '是', |
src/pages/Prepaid/PrepaidAccount/index.less
0 → 100644
src/pages/Prepaid/PrepaidAccount/index.tsx
0 → 100644
1 | +import EllipsisDiv from '@/components/Div/EllipsisDiv'; | ||
2 | +import { postCanrdApiUserList } from '@/services'; | ||
3 | +import { getUserInfo } from '@/utils/user'; | ||
4 | +import { ActionType, ProTable } from '@ant-design/pro-components'; | ||
5 | +import { Button } from 'antd'; | ||
6 | +import { useRef, useState } from 'react'; | ||
7 | +import BalanceChangeRecordsModal from '../components/BalanceChangeRecordsModal'; | ||
8 | +import PointsExchangeModal from '../components/PointsExchangeModal'; | ||
9 | +import PointsExchangeRecordsModal from '../components/PointsExchangeRecordsModal'; | ||
10 | +import { ACCOUNT_COLUMNS } from '../constant'; | ||
11 | +import './index.less'; | ||
12 | + | ||
13 | +const PrepaidAccountPage = () => { | ||
14 | + const user = getUserInfo(); | ||
15 | + const accountActionRef = useRef<ActionType>(); | ||
16 | + const [currentOptUserObj, setCurrentOptUserObj] = useState(null); | ||
17 | + const [ | ||
18 | + balanceChangeRecordsModalVisible, | ||
19 | + setBalanceChangeRecordsModalVisible, | ||
20 | + ] = useState<boolean>(false); | ||
21 | + const [pointsExchangeModalVisible, setPointsExchangeModalVisible] = | ||
22 | + useState<boolean>(false); | ||
23 | + const [ | ||
24 | + pointsExchangeRecordsModalVisible, | ||
25 | + setPointsExchangeRecordsModalVisible, | ||
26 | + ] = useState<boolean>(false); | ||
27 | + | ||
28 | + const reloadAccountTable = () => { | ||
29 | + accountActionRef.current?.reload(); | ||
30 | + }; | ||
31 | + | ||
32 | + const getTableCellText = (target: any) => { | ||
33 | + if (!target) { | ||
34 | + return ''; | ||
35 | + } | ||
36 | + | ||
37 | + if (target.props) { | ||
38 | + return target.props.text; | ||
39 | + } | ||
40 | + | ||
41 | + return target; | ||
42 | + }; | ||
43 | + | ||
44 | + const accountColumnsInit = () => { | ||
45 | + let columns = ACCOUNT_COLUMNS.map((item) => { | ||
46 | + let newItem = { ...item }; | ||
47 | + let dataIndex = item.dataIndex; | ||
48 | + | ||
49 | + newItem.render = (text, record) => { | ||
50 | + let textValue = record[dataIndex]; | ||
51 | + return <EllipsisDiv text={getTableCellText(textValue)} />; | ||
52 | + }; | ||
53 | + | ||
54 | + return newItem; | ||
55 | + }); | ||
56 | + | ||
57 | + columns.push({ | ||
58 | + title: '操作', | ||
59 | + valueType: 'option', | ||
60 | + key: 'option', | ||
61 | + fixed: 'right', | ||
62 | + width: 240, | ||
63 | + render: (text, record) => { | ||
64 | + let btns = []; | ||
65 | + btns.push( | ||
66 | + <Button | ||
67 | + className="p-0 ml-2" | ||
68 | + key="points" | ||
69 | + type="link" | ||
70 | + onClick={() => { | ||
71 | + setCurrentOptUserObj(record); | ||
72 | + setPointsExchangeModalVisible(true); | ||
73 | + }} | ||
74 | + > | ||
75 | + 积分兑换 | ||
76 | + </Button>, | ||
77 | + ); | ||
78 | + btns.push( | ||
79 | + <Button | ||
80 | + className="p-0" | ||
81 | + key="view" | ||
82 | + type="link" | ||
83 | + onClick={() => { | ||
84 | + setCurrentOptUserObj(record); | ||
85 | + setBalanceChangeRecordsModalVisible(true); | ||
86 | + }} | ||
87 | + > | ||
88 | + 消费记录 | ||
89 | + </Button>, | ||
90 | + ); | ||
91 | + btns.push( | ||
92 | + <Button | ||
93 | + className="p-0 ml-2" | ||
94 | + key="pointsRecords" | ||
95 | + type="link" | ||
96 | + onClick={() => { | ||
97 | + setCurrentOptUserObj(record); | ||
98 | + setPointsExchangeRecordsModalVisible(true); | ||
99 | + }} | ||
100 | + > | ||
101 | + 积分兑换记录 | ||
102 | + </Button>, | ||
103 | + ); | ||
104 | + return btns; | ||
105 | + }, | ||
106 | + }); | ||
107 | + | ||
108 | + return columns; | ||
109 | + }; | ||
110 | + | ||
111 | + return ( | ||
112 | + <div className="prepaid-account"> | ||
113 | + <ProTable | ||
114 | + columns={accountColumnsInit()} | ||
115 | + actionRef={accountActionRef} | ||
116 | + cardBordered | ||
117 | + pagination={{ | ||
118 | + pageSize: 10, | ||
119 | + }} | ||
120 | + request={async (params) => { | ||
121 | + const res = await postCanrdApiUserList({ | ||
122 | + data: { ...params }, | ||
123 | + }); | ||
124 | + const data = res?.data?.data || []; | ||
125 | + const targetPhones = [ | ||
126 | + '18550286106', | ||
127 | + '15286038815', | ||
128 | + '15202597163', | ||
129 | + '13267086260', | ||
130 | + '15900392469', | ||
131 | + '13529047645', | ||
132 | + ]; | ||
133 | + | ||
134 | + const processedData = data.map((item) => { | ||
135 | + const isAdmin = user.roles.includes('ADMIN'); | ||
136 | + const isSalesManager = user.roles.includes('SALES_MANAGER'); | ||
137 | + if ( | ||
138 | + targetPhones.includes(item.phone) && | ||
139 | + !(isAdmin || isSalesManager) | ||
140 | + ) { | ||
141 | + return { | ||
142 | + ...item, | ||
143 | + nowMoney: '****', | ||
144 | + }; | ||
145 | + } | ||
146 | + return item; | ||
147 | + }); | ||
148 | + return { | ||
149 | + data: processedData, | ||
150 | + total: res?.data?.total || 0, | ||
151 | + }; | ||
152 | + }} | ||
153 | + columnsState={{ | ||
154 | + persistenceKey: 'pro-table-singe-account', | ||
155 | + persistenceType: 'localStorage', | ||
156 | + defaultValue: { | ||
157 | + option: { fixed: 'right', disable: true }, | ||
158 | + }, | ||
159 | + onChange(value) { | ||
160 | + console.log('value: ', value); | ||
161 | + }, | ||
162 | + }} | ||
163 | + rowKey="id" | ||
164 | + search={{ | ||
165 | + labelWidth: 'auto', | ||
166 | + }} | ||
167 | + options={{ | ||
168 | + setting: { | ||
169 | + listsHeight: 400, | ||
170 | + }, | ||
171 | + }} | ||
172 | + form={{}} | ||
173 | + dateFormatter="string" | ||
174 | + headerTitle="账号列表" | ||
175 | + scroll={{ x: 1400 }} | ||
176 | + toolBarRender={() => []} | ||
177 | + /> | ||
178 | + | ||
179 | + {balanceChangeRecordsModalVisible && ( | ||
180 | + <BalanceChangeRecordsModal | ||
181 | + visible={balanceChangeRecordsModalVisible} | ||
182 | + onCancel={() => { | ||
183 | + setBalanceChangeRecordsModalVisible(false); | ||
184 | + }} | ||
185 | + record={currentOptUserObj} | ||
186 | + /> | ||
187 | + )} | ||
188 | + | ||
189 | + {pointsExchangeModalVisible && ( | ||
190 | + <PointsExchangeModal | ||
191 | + visible={pointsExchangeModalVisible} | ||
192 | + onCancel={() => { | ||
193 | + setPointsExchangeModalVisible(false); | ||
194 | + }} | ||
195 | + onOk={() => { | ||
196 | + setPointsExchangeModalVisible(false); | ||
197 | + reloadAccountTable(); | ||
198 | + }} | ||
199 | + record={currentOptUserObj} | ||
200 | + relationEntityType="USER" | ||
201 | + /> | ||
202 | + )} | ||
203 | + | ||
204 | + {pointsExchangeRecordsModalVisible && ( | ||
205 | + <PointsExchangeRecordsModal | ||
206 | + visible={pointsExchangeRecordsModalVisible} | ||
207 | + onCancel={() => { | ||
208 | + setPointsExchangeRecordsModalVisible(false); | ||
209 | + }} | ||
210 | + record={currentOptUserObj} | ||
211 | + relationEntityType="USER" | ||
212 | + /> | ||
213 | + )} | ||
214 | + </div> | ||
215 | + ); | ||
216 | +}; | ||
217 | + | ||
218 | +export default PrepaidAccountPage; |
src/pages/Prepaid/PrepaidRecharge/index.less
0 → 100644
src/pages/Prepaid/PrepaidRecharge/index.tsx
0 → 100644
1 | +import ButtonConfirm from '@/components/ButtomConfirm'; | ||
2 | +import EllipsisDiv from '@/components/Div/EllipsisDiv'; | ||
3 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
4 | +import { postPrepaidDelete, postPrepaidList } from '@/services'; | ||
5 | +import { enumValueToLabel, formatDateTime } from '@/utils'; | ||
6 | +import { PlusOutlined } from '@ant-design/icons'; | ||
7 | +import { ActionType, ProTable } from '@ant-design/pro-components'; | ||
8 | +import { Button, Divider, Image, message } from 'antd'; | ||
9 | +import { cloneDeep } from 'lodash'; | ||
10 | +import React, { useRef, useState } from 'react'; | ||
11 | +import CheckModal from '../../Order/Order/components/CheckModal'; | ||
12 | +import { CHECK_TYPE } from '../../Order/constant'; | ||
13 | +import RechargePrepaymentModal from '../components/RechargePrepaymentModal'; | ||
14 | +import { | ||
15 | + PREPAID_STATUS_OPTIONS, | ||
16 | + SALES_RECHARGE_PREPAYMENT_COLUMNS, | ||
17 | +} from '../constant'; | ||
18 | +import './index.less'; | ||
19 | + | ||
20 | +const PrepaidRechargePage = () => { | ||
21 | + const prepaidActionRef = useRef<ActionType>(); | ||
22 | + const [rechargePrepaymentModalVisible, setRechargePrepaymentModalVisible] = | ||
23 | + useState<boolean>(false); | ||
24 | + const [currentOptPrepaymentObj, setCurrentOptPrepaymentObj] = useState(null); | ||
25 | + const [checkVisible, setCheckVisible] = useState<boolean>(false); | ||
26 | + | ||
27 | + const reloadPrepaidTable = () => { | ||
28 | + prepaidActionRef.current?.reload(); | ||
29 | + }; | ||
30 | + | ||
31 | + /** | ||
32 | + * 加载预存充值表格的各个列格式 | ||
33 | + */ | ||
34 | + const prepaidColumnsInit = () => { | ||
35 | + let columns = SALES_RECHARGE_PREPAYMENT_COLUMNS.map((item) => { | ||
36 | + let newItem = { ...item }; | ||
37 | + let dataIndex = item.dataIndex; | ||
38 | + | ||
39 | + newItem.render = (text, record) => { | ||
40 | + let textValue = record[dataIndex]; | ||
41 | + | ||
42 | + if (dataIndex === 'status') { | ||
43 | + textValue = enumValueToLabel(textValue, PREPAID_STATUS_OPTIONS); | ||
44 | + } | ||
45 | + | ||
46 | + if (dataIndex.endsWith('Time')) { | ||
47 | + textValue = formatDateTime(textValue); | ||
48 | + } | ||
49 | + | ||
50 | + if ( | ||
51 | + dataIndex === 'proofImages' && | ||
52 | + textValue !== null && | ||
53 | + textValue !== undefined | ||
54 | + ) { | ||
55 | + return ( | ||
56 | + <Image.PreviewGroup | ||
57 | + className="mr-10" | ||
58 | + preview={{ | ||
59 | + onChange: (current, prev) => | ||
60 | + console.log(`current index: ${current}, prev index: ${prev}`), | ||
61 | + }} | ||
62 | + > | ||
63 | + {textValue.map((item, index) => ( | ||
64 | + <React.Fragment key={index}> | ||
65 | + {index > 0 ? <Divider type="vertical" /> : ''} | ||
66 | + <Image | ||
67 | + className="max-h-[35px] max-w-[45px]" | ||
68 | + src={item} | ||
69 | + title={item} | ||
70 | + />{' '} | ||
71 | + </React.Fragment> | ||
72 | + ))} | ||
73 | + </Image.PreviewGroup> | ||
74 | + ); | ||
75 | + } | ||
76 | + | ||
77 | + return <EllipsisDiv text={textValue} />; | ||
78 | + }; | ||
79 | + | ||
80 | + return newItem; | ||
81 | + }); | ||
82 | + | ||
83 | + columns.push({ | ||
84 | + title: '操作', | ||
85 | + valueType: 'option', | ||
86 | + key: 'option', | ||
87 | + fixed: 'right', | ||
88 | + width: 120, | ||
89 | + render: (text, record) => { | ||
90 | + let btns = []; | ||
91 | + let opts = record.operations; | ||
92 | + if (opts?.includes('modify')) { | ||
93 | + btns.push( | ||
94 | + <Button | ||
95 | + className="p-0" | ||
96 | + key="modify" | ||
97 | + type="link" | ||
98 | + onClick={() => { | ||
99 | + setRechargePrepaymentModalVisible(true); | ||
100 | + setCurrentOptPrepaymentObj(cloneDeep(record)); | ||
101 | + }} | ||
102 | + > | ||
103 | + 编辑 | ||
104 | + </Button>, | ||
105 | + ); | ||
106 | + } | ||
107 | + | ||
108 | + if (opts?.includes('audit')) { | ||
109 | + btns.push( | ||
110 | + <Button | ||
111 | + className="p-0" | ||
112 | + key="view" | ||
113 | + type="link" | ||
114 | + onClick={() => { | ||
115 | + setCurrentOptPrepaymentObj(record); | ||
116 | + setCheckVisible(true); | ||
117 | + }} | ||
118 | + > | ||
119 | + 审核 | ||
120 | + </Button>, | ||
121 | + ); | ||
122 | + } | ||
123 | + | ||
124 | + if (opts?.includes('delete')) { | ||
125 | + btns.push( | ||
126 | + <ButtonConfirm | ||
127 | + key="delete" | ||
128 | + className="p-0" | ||
129 | + title={'确认删除这条预存记录吗?'} | ||
130 | + text="删除" | ||
131 | + onConfirm={async () => { | ||
132 | + let res = await postPrepaidDelete({ | ||
133 | + data: { ids: [record.id] }, | ||
134 | + }); | ||
135 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
136 | + message.success(res.message); | ||
137 | + reloadPrepaidTable(); | ||
138 | + } | ||
139 | + }} | ||
140 | + />, | ||
141 | + ); | ||
142 | + } | ||
143 | + return btns; | ||
144 | + }, | ||
145 | + }); | ||
146 | + | ||
147 | + return columns; | ||
148 | + }; | ||
149 | + | ||
150 | + return ( | ||
151 | + <div className="prepaid-recharge"> | ||
152 | + <ProTable | ||
153 | + columns={prepaidColumnsInit()} | ||
154 | + actionRef={prepaidActionRef} | ||
155 | + cardBordered | ||
156 | + pagination={{ | ||
157 | + pageSize: 10, | ||
158 | + }} | ||
159 | + request={async (params) => { | ||
160 | + const res = await postPrepaidList({ | ||
161 | + data: { ...params }, | ||
162 | + }); | ||
163 | + return { | ||
164 | + data: res?.data?.data || [], | ||
165 | + total: res?.data?.total || 0, | ||
166 | + }; | ||
167 | + }} | ||
168 | + columnsState={{ | ||
169 | + persistenceKey: 'pro-table-singe-prepaid', | ||
170 | + persistenceType: 'localStorage', | ||
171 | + defaultValue: { | ||
172 | + option: { fixed: 'right', disable: true }, | ||
173 | + }, | ||
174 | + onChange(value) { | ||
175 | + console.log('value: ', value); | ||
176 | + }, | ||
177 | + }} | ||
178 | + rowKey="id" | ||
179 | + search={{ | ||
180 | + labelWidth: 'auto', | ||
181 | + }} | ||
182 | + options={{ | ||
183 | + setting: { | ||
184 | + listsHeight: 400, | ||
185 | + }, | ||
186 | + }} | ||
187 | + form={{}} | ||
188 | + dateFormatter="string" | ||
189 | + headerTitle="预存充值" | ||
190 | + scroll={{ x: 1400 }} | ||
191 | + toolBarRender={() => [ | ||
192 | + <Button | ||
193 | + key="button" | ||
194 | + icon={<PlusOutlined />} | ||
195 | + onClick={() => { | ||
196 | + setCurrentOptPrepaymentObj(null); | ||
197 | + setRechargePrepaymentModalVisible(true); | ||
198 | + }} | ||
199 | + type="primary" | ||
200 | + > | ||
201 | + 新增充值 | ||
202 | + </Button>, | ||
203 | + ]} | ||
204 | + /> | ||
205 | + | ||
206 | + {rechargePrepaymentModalVisible && ( | ||
207 | + <RechargePrepaymentModal | ||
208 | + visible={rechargePrepaymentModalVisible} | ||
209 | + onCancel={() => { | ||
210 | + setRechargePrepaymentModalVisible(false); | ||
211 | + }} | ||
212 | + onOk={() => { | ||
213 | + setRechargePrepaymentModalVisible(false); | ||
214 | + reloadPrepaidTable(); | ||
215 | + }} | ||
216 | + record={currentOptPrepaymentObj} | ||
217 | + /> | ||
218 | + )} | ||
219 | + | ||
220 | + {checkVisible && ( | ||
221 | + <CheckModal | ||
222 | + visible={checkVisible} | ||
223 | + onCancel={() => { | ||
224 | + setCheckVisible(false); | ||
225 | + }} | ||
226 | + onOk={() => { | ||
227 | + setCheckVisible(false); | ||
228 | + reloadPrepaidTable(); | ||
229 | + }} | ||
230 | + record={currentOptPrepaymentObj} | ||
231 | + type={CHECK_TYPE.PREPAID} | ||
232 | + /> | ||
233 | + )} | ||
234 | + </div> | ||
235 | + ); | ||
236 | +}; | ||
237 | + | ||
238 | +export default PrepaidRechargePage; |
src/pages/Prepaid/PrivatePocket/components/AddPrivatePocketModal.tsx
0 → 100644
1 | +import { | ||
2 | + postCanrdPrivatePocketSave, | ||
3 | + postServiceOrderQuerySalesCode, | ||
4 | +} from '@/services'; | ||
5 | +import { getUserInfo } from '@/utils/user'; | ||
6 | +import { Form, Input, Modal, Select, message } from 'antd'; | ||
7 | +import React, { useEffect, useState } from 'react'; | ||
8 | + | ||
9 | +interface AddPrivatePocketModalProps { | ||
10 | + visible: boolean; | ||
11 | + onCancel: () => void; | ||
12 | + onSuccess: () => void; | ||
13 | +} | ||
14 | + | ||
15 | +interface SalesCodeItem { | ||
16 | + number: string | null; | ||
17 | + userName: string; | ||
18 | +} | ||
19 | + | ||
20 | +const AddPrivatePocketModal: React.FC<AddPrivatePocketModalProps> = ({ | ||
21 | + visible, | ||
22 | + onCancel, | ||
23 | + onSuccess, | ||
24 | +}) => { | ||
25 | + const [form] = Form.useForm(); | ||
26 | + const [salesCodeList, setSalesCodeList] = useState<SalesCodeItem[]>([]); | ||
27 | + const [loading, setLoading] = useState<boolean>(false); | ||
28 | + const userInfo = getUserInfo(); | ||
29 | + const userName = userInfo?.username || ''; | ||
30 | + | ||
31 | + const fetchSalesCodeList = async () => { | ||
32 | + try { | ||
33 | + const res = await postServiceOrderQuerySalesCode(); | ||
34 | + if (res?.data) { | ||
35 | + setSalesCodeList(res.data); | ||
36 | + } | ||
37 | + } catch (error) { | ||
38 | + console.error('获取销售编码列表失败:', error); | ||
39 | + message.error('获取销售编码列表失败'); | ||
40 | + } | ||
41 | + }; | ||
42 | + | ||
43 | + useEffect(() => { | ||
44 | + if (visible) { | ||
45 | + fetchSalesCodeList(); | ||
46 | + form.resetFields(); | ||
47 | + } | ||
48 | + }, [visible, form]); | ||
49 | + | ||
50 | + const handleSubmit = async () => { | ||
51 | + try { | ||
52 | + const values = await form.validateFields(); | ||
53 | + setLoading(true); | ||
54 | + | ||
55 | + const res = await postCanrdPrivatePocketSave({ | ||
56 | + data: { | ||
57 | + account: values.account, | ||
58 | + salesCode: values.salesCode, | ||
59 | + createByName: userName, | ||
60 | + }, | ||
61 | + }); | ||
62 | + | ||
63 | + if (res?.code === 200 || res?.success) { | ||
64 | + message.success('添加隐私钱包成功'); | ||
65 | + onSuccess(); | ||
66 | + } else { | ||
67 | + message.error(res?.message || '添加失败'); | ||
68 | + } | ||
69 | + } catch (error) { | ||
70 | + console.error('添加隐私钱包失败:', error); | ||
71 | + } finally { | ||
72 | + setLoading(false); | ||
73 | + } | ||
74 | + }; | ||
75 | + | ||
76 | + return ( | ||
77 | + <Modal | ||
78 | + title="添加隐私钱包" | ||
79 | + open={visible} | ||
80 | + onCancel={onCancel} | ||
81 | + onOk={handleSubmit} | ||
82 | + confirmLoading={loading} | ||
83 | + destroyOnClose | ||
84 | + > | ||
85 | + <Form form={form} layout="vertical"> | ||
86 | + <Form.Item | ||
87 | + name="account" | ||
88 | + label="绑定普通账户" | ||
89 | + rules={[{ required: true, message: '请输入手机号' }]} | ||
90 | + > | ||
91 | + <Input placeholder="请输入手机号" /> | ||
92 | + </Form.Item> | ||
93 | + <Form.Item | ||
94 | + name="salesCode" | ||
95 | + label="负责销售" | ||
96 | + rules={[{ required: true, message: '请选择负责销售' }]} | ||
97 | + > | ||
98 | + <Select | ||
99 | + placeholder="请选择负责销售" | ||
100 | + showSearch | ||
101 | + optionFilterProp="children" | ||
102 | + filterOption={(input, option) => | ||
103 | + (option?.label?.toString() || '') | ||
104 | + .toLowerCase() | ||
105 | + .includes(input.toLowerCase()) | ||
106 | + } | ||
107 | + options={salesCodeList.map((item) => ({ | ||
108 | + value: item.userName, | ||
109 | + label: item.userName, | ||
110 | + }))} | ||
111 | + /> | ||
112 | + </Form.Item> | ||
113 | + </Form> | ||
114 | + </Modal> | ||
115 | + ); | ||
116 | +}; | ||
117 | + | ||
118 | +export default AddPrivatePocketModal; |
src/pages/Prepaid/PrivatePocket/constant.tsx
0 → 100644
1 | +export const PRIVATE_POCKET_COLUMNS = [ | ||
2 | + { | ||
3 | + title: '用户ID', | ||
4 | + dataIndex: 'uid', | ||
5 | + key: 'uid', | ||
6 | + valueType: 'text', | ||
7 | + hideInTable: true, | ||
8 | + hideInSearch: true, | ||
9 | + }, | ||
10 | + { | ||
11 | + title: '用户账号', | ||
12 | + dataIndex: 'account', | ||
13 | + key: 'account', | ||
14 | + valueType: 'text', | ||
15 | + fieldProps: { | ||
16 | + placeholder: '请输入用户账号', | ||
17 | + }, | ||
18 | + }, | ||
19 | + { | ||
20 | + title: '真实姓名', | ||
21 | + dataIndex: 'realName', | ||
22 | + key: 'realName', | ||
23 | + valueType: 'text', | ||
24 | + hideInSearch: true, | ||
25 | + }, | ||
26 | + { | ||
27 | + title: '用户余额', | ||
28 | + dataIndex: 'nowMoney', | ||
29 | + key: 'nowMoney', | ||
30 | + valueType: 'money', | ||
31 | + hideInSearch: true, | ||
32 | + }, | ||
33 | + { | ||
34 | + title: '隐私余额', | ||
35 | + dataIndex: 'privateMoney', | ||
36 | + key: 'privateMoney', | ||
37 | + valueType: 'money', | ||
38 | + hideInSearch: true, | ||
39 | + }, | ||
40 | + { | ||
41 | + title: '负责销售', | ||
42 | + dataIndex: 'salesCode', | ||
43 | + key: 'salesCode', | ||
44 | + valueType: 'text', | ||
45 | + fieldProps: { | ||
46 | + placeholder: '请输入负责销售', | ||
47 | + }, | ||
48 | + }, | ||
49 | + { | ||
50 | + title: '创建人', | ||
51 | + dataIndex: 'createByName', | ||
52 | + key: 'createByName', | ||
53 | + valueType: 'text', | ||
54 | + hideInSearch: true, | ||
55 | + }, | ||
56 | + { | ||
57 | + title: '创建时间', | ||
58 | + dataIndex: 'createTime', | ||
59 | + key: 'createTime', | ||
60 | + valueType: 'dateTime', | ||
61 | + hideInSearch: true, | ||
62 | + }, | ||
63 | + { | ||
64 | + title: '更新时间', | ||
65 | + dataIndex: 'updateTime', | ||
66 | + key: 'updateTime', | ||
67 | + valueType: 'dateTime', | ||
68 | + hideInSearch: true, | ||
69 | + }, | ||
70 | +]; |
src/pages/Prepaid/PrivatePocket/index.less
0 → 100644
src/pages/Prepaid/PrivatePocket/index.tsx
0 → 100644
1 | +import ButtonConfirm from '@/components/ButtomConfirm'; | ||
2 | +import EllipsisDiv from '@/components/Div/EllipsisDiv'; | ||
3 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
4 | +import { | ||
5 | + postCanrdPrivatePocketDelete, | ||
6 | + postCanrdPrivatePocketList, | ||
7 | +} from '@/services'; | ||
8 | +import { formatDateTime } from '@/utils'; | ||
9 | +import { ActionType, ProTable } from '@ant-design/pro-components'; | ||
10 | +import { Button, message } from 'antd'; | ||
11 | +import { useRef, useState } from 'react'; | ||
12 | +import AddPrivatePocketModal from './components/AddPrivatePocketModal'; | ||
13 | +import { PRIVATE_POCKET_COLUMNS } from './constant'; | ||
14 | +import './index.less'; | ||
15 | + | ||
16 | +const PrivatePocketPage = () => { | ||
17 | + const actionRef = useRef<ActionType>(); | ||
18 | + const [addModalVisible, setAddModalVisible] = useState<boolean>(false); | ||
19 | + | ||
20 | + const reloadTable = () => { | ||
21 | + actionRef.current?.reload(); | ||
22 | + }; | ||
23 | + | ||
24 | + const getTableCellText = (target: any) => { | ||
25 | + if (!target) { | ||
26 | + return ''; | ||
27 | + } | ||
28 | + | ||
29 | + if (target.props) { | ||
30 | + return target.props.text; | ||
31 | + } | ||
32 | + | ||
33 | + return target; | ||
34 | + }; | ||
35 | + | ||
36 | + const columnsInit = () => { | ||
37 | + let columns = PRIVATE_POCKET_COLUMNS.map((item) => { | ||
38 | + let newItem = { ...item }; | ||
39 | + let dataIndex = item.dataIndex; | ||
40 | + | ||
41 | + newItem.render = (text: any, record: any) => { | ||
42 | + let textValue = record[dataIndex]; | ||
43 | + | ||
44 | + if (dataIndex.endsWith('Time')) { | ||
45 | + textValue = formatDateTime(textValue); | ||
46 | + } | ||
47 | + | ||
48 | + return <EllipsisDiv text={getTableCellText(textValue)} />; | ||
49 | + }; | ||
50 | + | ||
51 | + return newItem; | ||
52 | + }); | ||
53 | + | ||
54 | + columns.push({ | ||
55 | + title: '操作', | ||
56 | + valueType: 'option', | ||
57 | + key: 'option', | ||
58 | + width: 120, | ||
59 | + render: (text: any, record: any) => { | ||
60 | + let btns = []; | ||
61 | + | ||
62 | + btns.push( | ||
63 | + <ButtonConfirm | ||
64 | + key="delete" | ||
65 | + className="p-0" | ||
66 | + title={'确认删除这条隐私钱包记录吗?'} | ||
67 | + text="删除" | ||
68 | + onConfirm={async () => { | ||
69 | + let res = await postCanrdPrivatePocketDelete({ | ||
70 | + data: { uid: record.uid }, | ||
71 | + }); | ||
72 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
73 | + message.success('删除成功'); | ||
74 | + reloadTable(); | ||
75 | + } | ||
76 | + }} | ||
77 | + />, | ||
78 | + ); | ||
79 | + | ||
80 | + return btns; | ||
81 | + }, | ||
82 | + }); | ||
83 | + | ||
84 | + return columns; | ||
85 | + }; | ||
86 | + | ||
87 | + return ( | ||
88 | + <div className="private-pocket-index"> | ||
89 | + <ProTable | ||
90 | + columns={columnsInit()} | ||
91 | + actionRef={actionRef} | ||
92 | + cardBordered | ||
93 | + pagination={{ | ||
94 | + pageSize: 10, | ||
95 | + }} | ||
96 | + request={async (params) => { | ||
97 | + const res = await postCanrdPrivatePocketList({ | ||
98 | + data: { ...params }, | ||
99 | + }); | ||
100 | + const list = res?.data?.data || []; | ||
101 | + return { | ||
102 | + data: list, | ||
103 | + success: true, | ||
104 | + total: res?.data?.total || 0, | ||
105 | + }; | ||
106 | + }} | ||
107 | + columnsState={{ | ||
108 | + persistenceKey: 'pro-table-private-pocket', | ||
109 | + persistenceType: 'localStorage', | ||
110 | + defaultValue: { | ||
111 | + option: { fixed: 'right', disable: true }, | ||
112 | + }, | ||
113 | + onChange(value) { | ||
114 | + console.log('value: ', value); | ||
115 | + }, | ||
116 | + }} | ||
117 | + rowKey="uid" | ||
118 | + search={{ | ||
119 | + labelWidth: 'auto', | ||
120 | + }} | ||
121 | + options={{ | ||
122 | + setting: { | ||
123 | + listsHeight: 400, | ||
124 | + }, | ||
125 | + }} | ||
126 | + form={{}} | ||
127 | + dateFormatter="string" | ||
128 | + headerTitle="隐私钱包" | ||
129 | + scroll={{ x: 1400 }} | ||
130 | + toolBarRender={() => [ | ||
131 | + <Button | ||
132 | + key="add" | ||
133 | + type="primary" | ||
134 | + onClick={() => setAddModalVisible(true)} | ||
135 | + > | ||
136 | + 添加 | ||
137 | + </Button>, | ||
138 | + ]} | ||
139 | + /> | ||
140 | + | ||
141 | + {addModalVisible && ( | ||
142 | + <AddPrivatePocketModal | ||
143 | + visible={addModalVisible} | ||
144 | + onCancel={() => setAddModalVisible(false)} | ||
145 | + onSuccess={() => { | ||
146 | + setAddModalVisible(false); | ||
147 | + reloadTable(); | ||
148 | + }} | ||
149 | + /> | ||
150 | + )} | ||
151 | + </div> | ||
152 | + ); | ||
153 | +}; | ||
154 | + | ||
155 | +export default PrivatePocketPage; |
src/pages/Prepaid/index.less
1 | -.prepaid-index td { | ||
2 | - font-family: 'San Francisco', 'Helvetica Neue', Helvetica, Arial, | ||
3 | - 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', | ||
4 | - 'WenQuanYi Micro Hei', sans-serif; | ||
5 | - font-size: 13px; | 1 | +.prepaid-index { |
2 | + width: 100%; | ||
3 | + padding: 24px; | ||
4 | + | ||
5 | + .prepaid-card { | ||
6 | + height: 180px; | ||
7 | + transition: all 0.3s; | ||
8 | + | ||
9 | + &:hover { | ||
10 | + transform: translateY(-5px); | ||
11 | + box-shadow: 0 5px 15px rgba(0, 0, 0, 10%); | ||
12 | + } | ||
13 | + | ||
14 | + .card-content { | ||
15 | + display: flex; | ||
16 | + flex-direction: column; | ||
17 | + align-items: center; | ||
18 | + justify-content: center; | ||
19 | + height: 100%; | ||
20 | + | ||
21 | + .card-icon { | ||
22 | + font-size: 36px; | ||
23 | + margin-bottom: 16px; | ||
24 | + color: #1890ff; | ||
25 | + } | ||
26 | + | ||
27 | + .card-title { | ||
28 | + font-size: 18px; | ||
29 | + font-weight: 500; | ||
30 | + margin-bottom: 12px; | ||
31 | + } | ||
32 | + | ||
33 | + .card-desc { | ||
34 | + color: rgba(0, 0, 0, 45%); | ||
35 | + text-align: center; | ||
36 | + padding: 0 12px; | ||
37 | + } | ||
38 | + } | ||
39 | + } | ||
40 | + | ||
41 | + td { | ||
42 | + font-family: 'San Francisco', 'Helvetica Neue', Helvetica, Arial, | ||
43 | + 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', | ||
44 | + 'WenQuanYi Micro Hei', sans-serif; | ||
45 | + font-size: 13px; | ||
46 | + } | ||
6 | } | 47 | } |
src/pages/Prepaid/index.tsx
1 | -import ButtonConfirm from '@/components/ButtomConfirm'; | ||
2 | -import EllipsisDiv from '@/components/Div/EllipsisDiv'; | ||
3 | -import { RESPONSE_CODE } from '@/constants/enum'; | ||
4 | -import {} from '@/pages/Invoice/constant'; | ||
5 | import { | 1 | import { |
6 | - postCanrdApiUserList, | ||
7 | - postPrepaidDelete, | ||
8 | - postPrepaidList, | ||
9 | -} from '@/services'; | ||
10 | -import { enumValueToLabel, formatDateTime } from '@/utils'; | ||
11 | -import { getUserInfo } from '@/utils/user'; | ||
12 | -import { PlusOutlined } from '@ant-design/icons'; | ||
13 | -import { ActionType, ProTable } from '@ant-design/pro-components'; | ||
14 | -import { Button, Divider, Image, Tabs, message } from 'antd'; | ||
15 | -import { cloneDeep } from 'lodash'; | ||
16 | -import React, { useRef, useState } from 'react'; | ||
17 | -import CheckModal from '../Order/Order/components/CheckModal'; | ||
18 | -import { CHECK_TYPE } from '../Order/constant'; | ||
19 | -import BalanceChangeRecordsModal from './components/BalanceChangeRecordsModal'; | ||
20 | -import PointsExchangeModal from './components/PointsExchangeModal'; | ||
21 | -import PointsExchangeRecordsModal from './components/PointsExchangeRecordsModal'; | ||
22 | -import RechargePrepaymentModal from './components/RechargePrepaymentModal'; | ||
23 | -import { | ||
24 | - ACCOUNT_COLUMNS, | ||
25 | - PREPAID_STATUS_OPTIONS, | ||
26 | - SALES_RECHARGE_PREPAYMENT_COLUMNS, | ||
27 | -} from './constant'; | 2 | + CreditCardOutlined, |
3 | + MoneyCollectOutlined, | ||
4 | + UserOutlined, | ||
5 | +} from '@ant-design/icons'; | ||
6 | +import { Card, Col, Row } from 'antd'; | ||
7 | +import { history } from 'umi'; | ||
28 | import './index.less'; | 8 | import './index.less'; |
29 | 9 | ||
30 | const PrepaidPage = () => { | 10 | const PrepaidPage = () => { |
31 | - const user = getUserInfo(); | ||
32 | - const prepaidActionRef = useRef<ActionType>(); | ||
33 | - const accountActionRef = useRef<ActionType>(); | ||
34 | - const [rechargePrepaymentModalVisible, setRechargePrepaymentModalVisible] = | ||
35 | - useState<boolean>(false); | ||
36 | - const [currentOptPrepaymentObj, setCurrentOptPrepaymentObj] = useState(null); | ||
37 | - const [currentOptUserObj, setCurrentOptUserObj] = useState(null); | ||
38 | - const [checkVisible, setCheckVisible] = useState<boolean>(false); | ||
39 | - const [ | ||
40 | - balanceChangeRecordsModalVisible, | ||
41 | - setBalanceChangeRecordsModalVisible, | ||
42 | - ] = useState<boolean>(false); | ||
43 | - const [pointsExchangeModalVisible, setPointsExchangeModalVisible] = | ||
44 | - useState<boolean>(false); | ||
45 | - const [ | ||
46 | - pointsExchangeRecordsModalVisible, | ||
47 | - setPointsExchangeRecordsModalVisible, | ||
48 | - ] = useState<boolean>(false); | ||
49 | - | ||
50 | - const reloadPrepaidTable = () => { | ||
51 | - prepaidActionRef.current?.reload(); | ||
52 | - }; | ||
53 | - | ||
54 | - const reloadAccountTable = () => { | ||
55 | - accountActionRef.current?.reload(); | ||
56 | - }; | ||
57 | - | ||
58 | - const getTableCellText = (target: any) => { | ||
59 | - if (!target) { | ||
60 | - return ''; | ||
61 | - } | ||
62 | - | ||
63 | - if (target.props) { | ||
64 | - return target.props.text; | ||
65 | - } | ||
66 | - | ||
67 | - return target; | ||
68 | - }; | ||
69 | - | ||
70 | - /** | ||
71 | - * 加载发票列表表格的各个列格式 | ||
72 | - */ | ||
73 | - const prepaidColumnsInit = () => { | ||
74 | - let columns = SALES_RECHARGE_PREPAYMENT_COLUMNS.map((item) => { | ||
75 | - let newItem = { ...item }; | ||
76 | - let dataIndex = item.dataIndex; | ||
77 | - | ||
78 | - newItem.render = (text, record) => { | ||
79 | - let textValue = record[dataIndex]; | ||
80 | - | ||
81 | - if (dataIndex === 'status') { | ||
82 | - textValue = enumValueToLabel(textValue, PREPAID_STATUS_OPTIONS); | ||
83 | - } | ||
84 | - | ||
85 | - if (dataIndex.endsWith('Time')) { | ||
86 | - textValue = formatDateTime(textValue); | ||
87 | - } | ||
88 | - | ||
89 | - if ( | ||
90 | - dataIndex === 'proofImages' && | ||
91 | - textValue !== null && | ||
92 | - textValue !== undefined | ||
93 | - ) { | ||
94 | - console.log(textValue); | ||
95 | - return ( | ||
96 | - <Image.PreviewGroup | ||
97 | - className="mr-10" | ||
98 | - preview={{ | ||
99 | - onChange: (current, prev) => | ||
100 | - console.log(`current index: ${current}, prev index: ${prev}`), | ||
101 | - }} | ||
102 | - > | ||
103 | - {textValue.map((item, index) => ( | ||
104 | - <React.Fragment key={index}> | ||
105 | - {index > 0 ? <Divider type="vertical" /> : ''} | ||
106 | - <Image | ||
107 | - className="max-h-[35px] max-w-[45px]" | ||
108 | - src={item} | ||
109 | - title={item} | ||
110 | - />{' '} | ||
111 | - </React.Fragment> | ||
112 | - ))} | ||
113 | - </Image.PreviewGroup> | ||
114 | - ); | ||
115 | - } | ||
116 | - | ||
117 | - return <EllipsisDiv text={textValue} />; | ||
118 | - }; | ||
119 | - | ||
120 | - return newItem; | ||
121 | - }); | ||
122 | - | ||
123 | - columns.push({ | ||
124 | - title: '操作', | ||
125 | - valueType: 'option', | ||
126 | - key: 'option', | ||
127 | - fixed: 'right', | ||
128 | - width: 120, | ||
129 | - render: (text, record) => { | ||
130 | - let btns = []; | ||
131 | - let opts = record.operations; | ||
132 | - if (opts?.includes('modify')) { | ||
133 | - btns.push( | ||
134 | - <Button | ||
135 | - className="p-0" | ||
136 | - key="modify" | ||
137 | - type="link" | ||
138 | - onClick={() => { | ||
139 | - setRechargePrepaymentModalVisible(true); | ||
140 | - setCurrentOptPrepaymentObj(cloneDeep(record)); | ||
141 | - }} | ||
142 | - > | ||
143 | - 编辑 | ||
144 | - </Button>, | ||
145 | - ); | ||
146 | - } | ||
147 | - | ||
148 | - if (opts?.includes('audit')) { | ||
149 | - btns.push( | ||
150 | - <Button | ||
151 | - className="p-0" | ||
152 | - key="view" | ||
153 | - type="link" | ||
154 | - onClick={() => { | ||
155 | - setCurrentOptPrepaymentObj(record); | ||
156 | - setCheckVisible(true); | ||
157 | - }} | ||
158 | - > | ||
159 | - 审核 | ||
160 | - </Button>, | ||
161 | - ); | ||
162 | - } | ||
163 | - | ||
164 | - if (opts?.includes('delete')) { | ||
165 | - btns.push( | ||
166 | - <ButtonConfirm | ||
167 | - key="delete" | ||
168 | - className="p-0" | ||
169 | - title={'确认删除这条预存记录吗?'} | ||
170 | - text="删除" | ||
171 | - onConfirm={async () => { | ||
172 | - let res = await postPrepaidDelete({ | ||
173 | - data: { ids: [record.id] }, | ||
174 | - }); | ||
175 | - if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
176 | - message.success(res.message); | ||
177 | - reloadPrepaidTable(); | ||
178 | - } | ||
179 | - }} | ||
180 | - />, | ||
181 | - ); | ||
182 | - } | ||
183 | - return btns; | ||
184 | - }, | ||
185 | - }); | ||
186 | - | ||
187 | - return columns; | 11 | + const handleCardClick = (path: string) => { |
12 | + history.push(path); | ||
188 | }; | 13 | }; |
189 | 14 | ||
190 | - const accountColumnsInit = () => { | ||
191 | - let columns = ACCOUNT_COLUMNS.map((item) => { | ||
192 | - let newItem = { ...item }; | ||
193 | - let dataIndex = item.dataIndex; | ||
194 | - | ||
195 | - newItem.render = (text, record) => { | ||
196 | - let textValue = record[dataIndex]; | ||
197 | - return <EllipsisDiv text={getTableCellText(textValue)} />; | ||
198 | - }; | ||
199 | - | ||
200 | - return newItem; | ||
201 | - }); | ||
202 | - | ||
203 | - columns.push({ | ||
204 | - title: '操作', | ||
205 | - valueType: 'option', | ||
206 | - key: 'option', | ||
207 | - fixed: 'right', | ||
208 | - width: 240, | ||
209 | - render: (text, record) => { | ||
210 | - let btns = []; | ||
211 | - btns.push( | ||
212 | - <Button | ||
213 | - className="p-0 ml-2" | ||
214 | - key="points" | ||
215 | - type="link" | ||
216 | - onClick={() => { | ||
217 | - setCurrentOptUserObj(record); | ||
218 | - setPointsExchangeModalVisible(true); | ||
219 | - }} | 15 | + return ( |
16 | + <div className="prepaid-index"> | ||
17 | + <Row gutter={16}> | ||
18 | + <Col span={8}> | ||
19 | + <Card | ||
20 | + hoverable | ||
21 | + className="prepaid-card" | ||
22 | + onClick={() => handleCardClick('/prepaid/recharge')} | ||
220 | > | 23 | > |
221 | - 积分兑换 | ||
222 | - </Button>, | ||
223 | - ); | ||
224 | - btns.push( | ||
225 | - <Button | ||
226 | - className="p-0" | ||
227 | - key="view" | ||
228 | - type="link" | ||
229 | - onClick={() => { | ||
230 | - setCurrentOptUserObj(record); | ||
231 | - setBalanceChangeRecordsModalVisible(true); | ||
232 | - }} | 24 | + <div className="card-content"> |
25 | + <CreditCardOutlined className="card-icon" /> | ||
26 | + <div className="card-title">预存充值</div> | ||
27 | + <div className="card-desc">管理预存充值记录、审核及编辑操作</div> | ||
28 | + </div> | ||
29 | + </Card> | ||
30 | + </Col> | ||
31 | + <Col span={8}> | ||
32 | + <Card | ||
33 | + hoverable | ||
34 | + className="prepaid-card" | ||
35 | + onClick={() => handleCardClick('/prepaid/account')} | ||
233 | > | 36 | > |
234 | - 消费记录 | ||
235 | - </Button>, | ||
236 | - ); | ||
237 | - btns.push( | ||
238 | - <Button | ||
239 | - className="p-0 ml-2" | ||
240 | - key="pointsRecords" | ||
241 | - type="link" | ||
242 | - onClick={() => { | ||
243 | - setCurrentOptUserObj(record); | ||
244 | - setPointsExchangeRecordsModalVisible(true); | ||
245 | - }} | 37 | + <div className="card-content"> |
38 | + <UserOutlined className="card-icon" /> | ||
39 | + <div className="card-title">账号列表</div> | ||
40 | + <div className="card-desc">查看账户信息、积分兑换及消费记录</div> | ||
41 | + </div> | ||
42 | + </Card> | ||
43 | + </Col> | ||
44 | + <Col span={8}> | ||
45 | + <Card | ||
46 | + hoverable | ||
47 | + className="prepaid-card" | ||
48 | + onClick={() => handleCardClick('/prepaid/privatePocket')} | ||
246 | > | 49 | > |
247 | - 积分兑换记录 | ||
248 | - </Button>, | ||
249 | - ); | ||
250 | - return btns; | ||
251 | - }, | ||
252 | - }); | ||
253 | - | ||
254 | - return columns; | ||
255 | - }; | ||
256 | - | ||
257 | - const tabsItems = [ | ||
258 | - { | ||
259 | - key: 1, | ||
260 | - label: '预存充值', | ||
261 | - children: ( | ||
262 | - <ProTable | ||
263 | - columns={prepaidColumnsInit()} | ||
264 | - actionRef={prepaidActionRef} | ||
265 | - cardBordered | ||
266 | - pagination={{ | ||
267 | - pageSize: 10, | ||
268 | - }} | ||
269 | - request={async (params) => { | ||
270 | - const res = await postPrepaidList({ | ||
271 | - data: { ...params }, | ||
272 | - }); | ||
273 | - return { | ||
274 | - data: res?.data?.data || [], | ||
275 | - total: res?.data?.total || 0, | ||
276 | - }; | ||
277 | - }} | ||
278 | - columnsState={{ | ||
279 | - persistenceKey: 'pro-table-singe-prepaid', | ||
280 | - persistenceType: 'localStorage', | ||
281 | - defaultValue: { | ||
282 | - option: { fixed: 'right', disable: true }, | ||
283 | - }, | ||
284 | - onChange(value) { | ||
285 | - console.log('value: ', value); | ||
286 | - }, | ||
287 | - }} | ||
288 | - rowKey="id" | ||
289 | - search={{ | ||
290 | - labelWidth: 'auto', | ||
291 | - }} | ||
292 | - options={{ | ||
293 | - setting: { | ||
294 | - listsHeight: 400, | ||
295 | - }, | ||
296 | - }} | ||
297 | - form={{}} | ||
298 | - dateFormatter="string" | ||
299 | - headerTitle="预存充值" | ||
300 | - scroll={{ x: 1400 }} | ||
301 | - toolBarRender={() => [ | ||
302 | - <Button | ||
303 | - key="button" | ||
304 | - icon={<PlusOutlined />} | ||
305 | - onClick={() => { | ||
306 | - setCurrentOptPrepaymentObj(null); | ||
307 | - setRechargePrepaymentModalVisible(true); | ||
308 | - }} | ||
309 | - type="primary" | ||
310 | - > | ||
311 | - 新增充值 | ||
312 | - </Button>, | ||
313 | - ]} | ||
314 | - /> | ||
315 | - ), | ||
316 | - }, | ||
317 | - { | ||
318 | - key: 2, | ||
319 | - label: '账号列表', | ||
320 | - children: ( | ||
321 | - <ProTable | ||
322 | - columns={accountColumnsInit()} | ||
323 | - actionRef={accountActionRef} | ||
324 | - cardBordered | ||
325 | - pagination={{ | ||
326 | - pageSize: 10, | ||
327 | - }} | ||
328 | - request={async (params) => { | ||
329 | - const res = await postCanrdApiUserList({ | ||
330 | - data: { ...params }, | ||
331 | - }); | ||
332 | - const data = res?.data?.data || []; | ||
333 | - const targetPhones = [ | ||
334 | - '18550286106', | ||
335 | - '15286038815', | ||
336 | - '15202597163', | ||
337 | - '13267086260', | ||
338 | - '15900392469', | ||
339 | - '13529047645', | ||
340 | - ]; | ||
341 | - | ||
342 | - const processedData = data.map((item) => { | ||
343 | - const isAdmin = user.roles.includes('ADMIN'); | ||
344 | - const isSalesManager = user.roles.includes('SALES_MANAGER'); | ||
345 | - if ( | ||
346 | - targetPhones.includes(item.phone) && | ||
347 | - !(isAdmin || isSalesManager) | ||
348 | - ) { | ||
349 | - return { | ||
350 | - ...item, | ||
351 | - nowMoney: '****', | ||
352 | - }; | ||
353 | - } | ||
354 | - return item; | ||
355 | - }); | ||
356 | - return { | ||
357 | - data: processedData, | ||
358 | - total: res?.data?.total || 0, | ||
359 | - }; | ||
360 | - }} | ||
361 | - columnsState={{ | ||
362 | - persistenceKey: 'pro-table-singe-account', | ||
363 | - persistenceType: 'localStorage', | ||
364 | - defaultValue: { | ||
365 | - option: { fixed: 'right', disable: true }, | ||
366 | - }, | ||
367 | - onChange(value) { | ||
368 | - console.log('value: ', value); | ||
369 | - }, | ||
370 | - }} | ||
371 | - rowKey="id" | ||
372 | - search={{ | ||
373 | - labelWidth: 'auto', | ||
374 | - }} | ||
375 | - options={{ | ||
376 | - setting: { | ||
377 | - listsHeight: 400, | ||
378 | - }, | ||
379 | - }} | ||
380 | - form={{}} | ||
381 | - dateFormatter="string" | ||
382 | - headerTitle="账号列表" | ||
383 | - scroll={{ x: 1400 }} | ||
384 | - toolBarRender={() => []} | ||
385 | - /> | ||
386 | - ), | ||
387 | - }, | ||
388 | - ]; | ||
389 | - return ( | ||
390 | - <div className="prepaid-index"> | ||
391 | - <Tabs | ||
392 | - defaultActiveKey="1" | ||
393 | - items={tabsItems} | ||
394 | - onChange={(value) => { | ||
395 | - if (value === '1') { | ||
396 | - reloadPrepaidTable(); | ||
397 | - } else { | ||
398 | - reloadAccountTable(); | ||
399 | - } | ||
400 | - }} | ||
401 | - /> | ||
402 | - | ||
403 | - {rechargePrepaymentModalVisible && ( | ||
404 | - <RechargePrepaymentModal | ||
405 | - setVisible={setRechargePrepaymentModalVisible} | ||
406 | - onClose={() => { | ||
407 | - setRechargePrepaymentModalVisible(false); | ||
408 | - reloadPrepaidTable(); | ||
409 | - }} | ||
410 | - prepaymentObject={currentOptPrepaymentObj} | ||
411 | - /> | ||
412 | - )} | ||
413 | - | ||
414 | - {checkVisible && ( | ||
415 | - <CheckModal | ||
416 | - setCheckVisible={(val: boolean) => { | ||
417 | - setCheckVisible(val); | ||
418 | - }} | ||
419 | - data={[currentOptPrepaymentObj]} | ||
420 | - subOrders={[currentOptPrepaymentObj]} | ||
421 | - orderCheckType={CHECK_TYPE.PREPAID_AUDIT} | ||
422 | - openOrderDrawer={false} | ||
423 | - onClose={() => { | ||
424 | - setCheckVisible(false); | ||
425 | - reloadPrepaidTable(); | ||
426 | - }} | ||
427 | - /> | ||
428 | - )} | ||
429 | - | ||
430 | - {balanceChangeRecordsModalVisible && ( | ||
431 | - <BalanceChangeRecordsModal | ||
432 | - setVisible={(val: boolean) => { | ||
433 | - setBalanceChangeRecordsModalVisible(val); | ||
434 | - }} | ||
435 | - userInfoObj={currentOptUserObj} | ||
436 | - onClose={() => { | ||
437 | - setBalanceChangeRecordsModalVisible(false); | ||
438 | - }} | ||
439 | - /> | ||
440 | - )} | ||
441 | - | ||
442 | - {pointsExchangeModalVisible && currentOptUserObj && ( | ||
443 | - <PointsExchangeModal | ||
444 | - setVisible={(val: boolean) => { | ||
445 | - setPointsExchangeModalVisible(val); | ||
446 | - }} | ||
447 | - userInfoObj={currentOptUserObj} | ||
448 | - onClose={() => { | ||
449 | - setPointsExchangeModalVisible(false); | ||
450 | - reloadAccountTable(); | ||
451 | - }} | ||
452 | - /> | ||
453 | - )} | ||
454 | - | ||
455 | - {pointsExchangeRecordsModalVisible && currentOptUserObj && ( | ||
456 | - <PointsExchangeRecordsModal | ||
457 | - setVisible={(val: boolean) => { | ||
458 | - setPointsExchangeRecordsModalVisible(val); | ||
459 | - }} | ||
460 | - userInfoObj={currentOptUserObj} | ||
461 | - onClose={() => { | ||
462 | - setPointsExchangeRecordsModalVisible(false); | ||
463 | - }} | ||
464 | - /> | ||
465 | - )} | 50 | + <div className="card-content"> |
51 | + <MoneyCollectOutlined className="card-icon" /> | ||
52 | + <div className="card-title">隐私钱包</div> | ||
53 | + <div className="card-desc">管理用户隐私钱包信息</div> | ||
54 | + </div> | ||
55 | + </Card> | ||
56 | + </Col> | ||
57 | + </Row> | ||
466 | </div> | 58 | </div> |
467 | ); | 59 | ); |
468 | }; | 60 | }; |
src/services/definition.ts
@@ -4823,6 +4823,97 @@ export interface UserNowMoneyCheckRequest { | @@ -4823,6 +4823,97 @@ export interface UserNowMoneyCheckRequest { | ||
4823 | uid?: number; | 4823 | uid?: number; |
4824 | } | 4824 | } |
4825 | 4825 | ||
4826 | +export interface UserPrivatePocketDeleteRequest { | ||
4827 | + /** | ||
4828 | + * @description | ||
4829 | + * 用户id | ||
4830 | + * @format int32 | ||
4831 | + */ | ||
4832 | + uid: number; | ||
4833 | +} | ||
4834 | + | ||
4835 | +export interface UserPrivatePocketDetailRequest { | ||
4836 | + /** | ||
4837 | + * @description | ||
4838 | + * 用户id | ||
4839 | + * @format int32 | ||
4840 | + */ | ||
4841 | + uid: number; | ||
4842 | +} | ||
4843 | + | ||
4844 | +export interface UserPrivatePocketListRequest { | ||
4845 | + /** | ||
4846 | + * @description | ||
4847 | + * 用户账号 | ||
4848 | + */ | ||
4849 | + account?: string; | ||
4850 | + /** | ||
4851 | + * @description | ||
4852 | + * 当前页 | ||
4853 | + * @format int32 | ||
4854 | + * @example | ||
4855 | + * 1 | ||
4856 | + */ | ||
4857 | + current?: number; | ||
4858 | + /** | ||
4859 | + * @description | ||
4860 | + * 每页大小 | ||
4861 | + * @format int32 | ||
4862 | + * @example | ||
4863 | + * 10 | ||
4864 | + */ | ||
4865 | + pageSize?: number; | ||
4866 | + /** | ||
4867 | + * @description | ||
4868 | + * 真实姓名 | ||
4869 | + */ | ||
4870 | + realName?: string; | ||
4871 | + /** | ||
4872 | + * @description | ||
4873 | + * 负责销售 | ||
4874 | + */ | ||
4875 | + salesCode?: string; | ||
4876 | +} | ||
4877 | + | ||
4878 | +export interface UserPrivatePocketUpdateRequest { | ||
4879 | + /** | ||
4880 | + * @description | ||
4881 | + * 用户账号 | ||
4882 | + */ | ||
4883 | + account: string; | ||
4884 | + /** | ||
4885 | + * @description | ||
4886 | + * 创建人 | ||
4887 | + */ | ||
4888 | + createByName?: string; | ||
4889 | + /** | ||
4890 | + * @description | ||
4891 | + * 用户余额 | ||
4892 | + */ | ||
4893 | + nowMoney?: number; | ||
4894 | + /** | ||
4895 | + * @description | ||
4896 | + * 隐私余额 | ||
4897 | + */ | ||
4898 | + privateMoney?: number; | ||
4899 | + /** | ||
4900 | + * @description | ||
4901 | + * 真实姓名 | ||
4902 | + */ | ||
4903 | + realName?: string; | ||
4904 | + /** | ||
4905 | + * @description | ||
4906 | + * 负责销售 | ||
4907 | + */ | ||
4908 | + salesCode: string; | ||
4909 | + /** | ||
4910 | + * @description | ||
4911 | + * 用户id | ||
4912 | + * @format int32 | ||
4913 | + */ | ||
4914 | + uid?: number; | ||
4915 | +} | ||
4916 | + | ||
4826 | export interface View { | 4917 | export interface View { |
4827 | contentType?: string; | 4918 | contentType?: string; |
4828 | } | 4919 | } |
src/services/request.ts
@@ -167,6 +167,10 @@ import type { | @@ -167,6 +167,10 @@ import type { | ||
167 | UserDetailRequest, | 167 | UserDetailRequest, |
168 | UserListRequest, | 168 | UserListRequest, |
169 | UserNowMoneyCheckRequest, | 169 | UserNowMoneyCheckRequest, |
170 | + UserPrivatePocketDeleteRequest, | ||
171 | + UserPrivatePocketDetailRequest, | ||
172 | + UserPrivatePocketListRequest, | ||
173 | + UserPrivatePocketUpdateRequest, | ||
170 | WarningOrderWhiteListDto, | 174 | WarningOrderWhiteListDto, |
171 | WarningUserWhiteListDto, | 175 | WarningUserWhiteListDto, |
172 | } from './definition'; | 176 | } from './definition'; |
@@ -3141,6 +3145,290 @@ export const postCanrdApiUserNowMoneyCheck = /* #__PURE__ */ (() => { | @@ -3141,6 +3145,290 @@ export const postCanrdApiUserNowMoneyCheck = /* #__PURE__ */ (() => { | ||
3141 | return request; | 3145 | return request; |
3142 | })(); | 3146 | })(); |
3143 | 3147 | ||
3148 | +/** @description request parameter type for postCanrdPrivatePocketDelete */ | ||
3149 | +export interface PostCanrdPrivatePocketDeleteOption { | ||
3150 | + /** | ||
3151 | + * @description | ||
3152 | + * request | ||
3153 | + */ | ||
3154 | + body: { | ||
3155 | + /** | ||
3156 | + @description | ||
3157 | + request */ | ||
3158 | + request: UserPrivatePocketDeleteRequest; | ||
3159 | + }; | ||
3160 | +} | ||
3161 | + | ||
3162 | +/** @description response type for postCanrdPrivatePocketDelete */ | ||
3163 | +export interface PostCanrdPrivatePocketDeleteResponse { | ||
3164 | + /** | ||
3165 | + * @description | ||
3166 | + * OK | ||
3167 | + */ | ||
3168 | + 200: ServerResult; | ||
3169 | + /** | ||
3170 | + * @description | ||
3171 | + * Created | ||
3172 | + */ | ||
3173 | + 201: any; | ||
3174 | + /** | ||
3175 | + * @description | ||
3176 | + * Unauthorized | ||
3177 | + */ | ||
3178 | + 401: any; | ||
3179 | + /** | ||
3180 | + * @description | ||
3181 | + * Forbidden | ||
3182 | + */ | ||
3183 | + 403: any; | ||
3184 | + /** | ||
3185 | + * @description | ||
3186 | + * Not Found | ||
3187 | + */ | ||
3188 | + 404: any; | ||
3189 | +} | ||
3190 | + | ||
3191 | +export type PostCanrdPrivatePocketDeleteResponseSuccess = | ||
3192 | + PostCanrdPrivatePocketDeleteResponse[200]; | ||
3193 | +/** | ||
3194 | + * @description | ||
3195 | + * 删除用户隐私钱包 | ||
3196 | + * @tags user-private-pocket-controller | ||
3197 | + * @produces * | ||
3198 | + * @consumes application/json | ||
3199 | + */ | ||
3200 | +export const postCanrdPrivatePocketDelete = /* #__PURE__ */ (() => { | ||
3201 | + const method = 'post'; | ||
3202 | + const url = '/canrd/privatePocket/delete'; | ||
3203 | + function request( | ||
3204 | + option: PostCanrdPrivatePocketDeleteOption, | ||
3205 | + ): Promise<PostCanrdPrivatePocketDeleteResponseSuccess> { | ||
3206 | + return requester(request.url, { | ||
3207 | + method: request.method, | ||
3208 | + ...option, | ||
3209 | + }) as unknown as Promise<PostCanrdPrivatePocketDeleteResponseSuccess>; | ||
3210 | + } | ||
3211 | + | ||
3212 | + /** http method */ | ||
3213 | + request.method = method; | ||
3214 | + /** request url */ | ||
3215 | + request.url = url; | ||
3216 | + return request; | ||
3217 | +})(); | ||
3218 | + | ||
3219 | +/** @description request parameter type for postCanrdPrivatePocketDetail */ | ||
3220 | +export interface PostCanrdPrivatePocketDetailOption { | ||
3221 | + /** | ||
3222 | + * @description | ||
3223 | + * request | ||
3224 | + */ | ||
3225 | + body: { | ||
3226 | + /** | ||
3227 | + @description | ||
3228 | + request */ | ||
3229 | + request: UserPrivatePocketDetailRequest; | ||
3230 | + }; | ||
3231 | +} | ||
3232 | + | ||
3233 | +/** @description response type for postCanrdPrivatePocketDetail */ | ||
3234 | +export interface PostCanrdPrivatePocketDetailResponse { | ||
3235 | + /** | ||
3236 | + * @description | ||
3237 | + * OK | ||
3238 | + */ | ||
3239 | + 200: ServerResult; | ||
3240 | + /** | ||
3241 | + * @description | ||
3242 | + * Created | ||
3243 | + */ | ||
3244 | + 201: any; | ||
3245 | + /** | ||
3246 | + * @description | ||
3247 | + * Unauthorized | ||
3248 | + */ | ||
3249 | + 401: any; | ||
3250 | + /** | ||
3251 | + * @description | ||
3252 | + * Forbidden | ||
3253 | + */ | ||
3254 | + 403: any; | ||
3255 | + /** | ||
3256 | + * @description | ||
3257 | + * Not Found | ||
3258 | + */ | ||
3259 | + 404: any; | ||
3260 | +} | ||
3261 | + | ||
3262 | +export type PostCanrdPrivatePocketDetailResponseSuccess = | ||
3263 | + PostCanrdPrivatePocketDetailResponse[200]; | ||
3264 | +/** | ||
3265 | + * @description | ||
3266 | + * 获取用户隐私钱包详情 | ||
3267 | + * @tags user-private-pocket-controller | ||
3268 | + * @produces * | ||
3269 | + * @consumes application/json | ||
3270 | + */ | ||
3271 | +export const postCanrdPrivatePocketDetail = /* #__PURE__ */ (() => { | ||
3272 | + const method = 'post'; | ||
3273 | + const url = '/canrd/privatePocket/detail'; | ||
3274 | + function request( | ||
3275 | + option: PostCanrdPrivatePocketDetailOption, | ||
3276 | + ): Promise<PostCanrdPrivatePocketDetailResponseSuccess> { | ||
3277 | + return requester(request.url, { | ||
3278 | + method: request.method, | ||
3279 | + ...option, | ||
3280 | + }) as unknown as Promise<PostCanrdPrivatePocketDetailResponseSuccess>; | ||
3281 | + } | ||
3282 | + | ||
3283 | + /** http method */ | ||
3284 | + request.method = method; | ||
3285 | + /** request url */ | ||
3286 | + request.url = url; | ||
3287 | + return request; | ||
3288 | +})(); | ||
3289 | + | ||
3290 | +/** @description request parameter type for postCanrdPrivatePocketList */ | ||
3291 | +export interface PostCanrdPrivatePocketListOption { | ||
3292 | + /** | ||
3293 | + * @description | ||
3294 | + * request | ||
3295 | + */ | ||
3296 | + body: { | ||
3297 | + /** | ||
3298 | + @description | ||
3299 | + request */ | ||
3300 | + request: UserPrivatePocketListRequest; | ||
3301 | + }; | ||
3302 | +} | ||
3303 | + | ||
3304 | +/** @description response type for postCanrdPrivatePocketList */ | ||
3305 | +export interface PostCanrdPrivatePocketListResponse { | ||
3306 | + /** | ||
3307 | + * @description | ||
3308 | + * OK | ||
3309 | + */ | ||
3310 | + 200: ServerResult; | ||
3311 | + /** | ||
3312 | + * @description | ||
3313 | + * Created | ||
3314 | + */ | ||
3315 | + 201: any; | ||
3316 | + /** | ||
3317 | + * @description | ||
3318 | + * Unauthorized | ||
3319 | + */ | ||
3320 | + 401: any; | ||
3321 | + /** | ||
3322 | + * @description | ||
3323 | + * Forbidden | ||
3324 | + */ | ||
3325 | + 403: any; | ||
3326 | + /** | ||
3327 | + * @description | ||
3328 | + * Not Found | ||
3329 | + */ | ||
3330 | + 404: any; | ||
3331 | +} | ||
3332 | + | ||
3333 | +export type PostCanrdPrivatePocketListResponseSuccess = | ||
3334 | + PostCanrdPrivatePocketListResponse[200]; | ||
3335 | +/** | ||
3336 | + * @description | ||
3337 | + * 获取用户隐私钱包列表 | ||
3338 | + * @tags user-private-pocket-controller | ||
3339 | + * @produces * | ||
3340 | + * @consumes application/json | ||
3341 | + */ | ||
3342 | +export const postCanrdPrivatePocketList = /* #__PURE__ */ (() => { | ||
3343 | + const method = 'post'; | ||
3344 | + const url = '/canrd/privatePocket/list'; | ||
3345 | + function request( | ||
3346 | + option: PostCanrdPrivatePocketListOption, | ||
3347 | + ): Promise<PostCanrdPrivatePocketListResponseSuccess> { | ||
3348 | + return requester(request.url, { | ||
3349 | + method: request.method, | ||
3350 | + ...option, | ||
3351 | + }) as unknown as Promise<PostCanrdPrivatePocketListResponseSuccess>; | ||
3352 | + } | ||
3353 | + | ||
3354 | + /** http method */ | ||
3355 | + request.method = method; | ||
3356 | + /** request url */ | ||
3357 | + request.url = url; | ||
3358 | + return request; | ||
3359 | +})(); | ||
3360 | + | ||
3361 | +/** @description request parameter type for postCanrdPrivatePocketSave */ | ||
3362 | +export interface PostCanrdPrivatePocketSaveOption { | ||
3363 | + /** | ||
3364 | + * @description | ||
3365 | + * request | ||
3366 | + */ | ||
3367 | + body: { | ||
3368 | + /** | ||
3369 | + @description | ||
3370 | + request */ | ||
3371 | + request: UserPrivatePocketUpdateRequest; | ||
3372 | + }; | ||
3373 | +} | ||
3374 | + | ||
3375 | +/** @description response type for postCanrdPrivatePocketSave */ | ||
3376 | +export interface PostCanrdPrivatePocketSaveResponse { | ||
3377 | + /** | ||
3378 | + * @description | ||
3379 | + * OK | ||
3380 | + */ | ||
3381 | + 200: ServerResult; | ||
3382 | + /** | ||
3383 | + * @description | ||
3384 | + * Created | ||
3385 | + */ | ||
3386 | + 201: any; | ||
3387 | + /** | ||
3388 | + * @description | ||
3389 | + * Unauthorized | ||
3390 | + */ | ||
3391 | + 401: any; | ||
3392 | + /** | ||
3393 | + * @description | ||
3394 | + * Forbidden | ||
3395 | + */ | ||
3396 | + 403: any; | ||
3397 | + /** | ||
3398 | + * @description | ||
3399 | + * Not Found | ||
3400 | + */ | ||
3401 | + 404: any; | ||
3402 | +} | ||
3403 | + | ||
3404 | +export type PostCanrdPrivatePocketSaveResponseSuccess = | ||
3405 | + PostCanrdPrivatePocketSaveResponse[200]; | ||
3406 | +/** | ||
3407 | + * @description | ||
3408 | + * 保存或更新用户隐私钱包 | ||
3409 | + * @tags user-private-pocket-controller | ||
3410 | + * @produces * | ||
3411 | + * @consumes application/json | ||
3412 | + */ | ||
3413 | +export const postCanrdPrivatePocketSave = /* #__PURE__ */ (() => { | ||
3414 | + const method = 'post'; | ||
3415 | + const url = '/canrd/privatePocket/save'; | ||
3416 | + function request( | ||
3417 | + option: PostCanrdPrivatePocketSaveOption, | ||
3418 | + ): Promise<PostCanrdPrivatePocketSaveResponseSuccess> { | ||
3419 | + return requester(request.url, { | ||
3420 | + method: request.method, | ||
3421 | + ...option, | ||
3422 | + }) as unknown as Promise<PostCanrdPrivatePocketSaveResponseSuccess>; | ||
3423 | + } | ||
3424 | + | ||
3425 | + /** http method */ | ||
3426 | + request.method = method; | ||
3427 | + /** request url */ | ||
3428 | + request.url = url; | ||
3429 | + return request; | ||
3430 | +})(); | ||
3431 | + | ||
3144 | /** @description request parameter type for postCommonAudit */ | 3432 | /** @description request parameter type for postCommonAudit */ |
3145 | export interface PostCommonAuditOption { | 3433 | export interface PostCommonAuditOption { |
3146 | /** | 3434 | /** |
@@ -21220,6 +21508,259 @@ export const postServiceOrderBatchCaculateAndSetIntegral = | @@ -21220,6 +21508,259 @@ export const postServiceOrderBatchCaculateAndSetIntegral = | ||
21220 | return request; | 21508 | return request; |
21221 | })(); | 21509 | })(); |
21222 | 21510 | ||
21511 | +/** @description request parameter type for postServiceOrderBatchCaculateAndSetIntegralByMainIds */ | ||
21512 | +export interface PostServiceOrderBatchCaculateAndSetIntegralByMainIdsOption { | ||
21513 | + /** | ||
21514 | + * @description | ||
21515 | + * ids | ||
21516 | + */ | ||
21517 | + query: { | ||
21518 | + /** | ||
21519 | + @description | ||
21520 | + ids */ | ||
21521 | + ids: Array<number>; | ||
21522 | + }; | ||
21523 | +} | ||
21524 | + | ||
21525 | +/** @description response type for postServiceOrderBatchCaculateAndSetIntegralByMainIds */ | ||
21526 | +export interface PostServiceOrderBatchCaculateAndSetIntegralByMainIdsResponse { | ||
21527 | + /** | ||
21528 | + * @description | ||
21529 | + * OK | ||
21530 | + */ | ||
21531 | + 200: ServerResult; | ||
21532 | + /** | ||
21533 | + * @description | ||
21534 | + * Created | ||
21535 | + */ | ||
21536 | + 201: any; | ||
21537 | + /** | ||
21538 | + * @description | ||
21539 | + * Unauthorized | ||
21540 | + */ | ||
21541 | + 401: any; | ||
21542 | + /** | ||
21543 | + * @description | ||
21544 | + * Forbidden | ||
21545 | + */ | ||
21546 | + 403: any; | ||
21547 | + /** | ||
21548 | + * @description | ||
21549 | + * Not Found | ||
21550 | + */ | ||
21551 | + 404: any; | ||
21552 | +} | ||
21553 | + | ||
21554 | +export type PostServiceOrderBatchCaculateAndSetIntegralByMainIdsResponseSuccess = | ||
21555 | + PostServiceOrderBatchCaculateAndSetIntegralByMainIdsResponse[200]; | ||
21556 | +/** | ||
21557 | + * @description | ||
21558 | + * 计算积分 | ||
21559 | + * @tags 内部订单 | ||
21560 | + * @produces * | ||
21561 | + * @consumes application/json | ||
21562 | + */ | ||
21563 | +export const postServiceOrderBatchCaculateAndSetIntegralByMainIds = | ||
21564 | + /* #__PURE__ */ (() => { | ||
21565 | + const method = 'post'; | ||
21566 | + const url = '/service/order/batchCaculateAndSetIntegralByMainIds'; | ||
21567 | + function request( | ||
21568 | + option: PostServiceOrderBatchCaculateAndSetIntegralByMainIdsOption, | ||
21569 | + ): Promise<PostServiceOrderBatchCaculateAndSetIntegralByMainIdsResponseSuccess> { | ||
21570 | + return requester(request.url, { | ||
21571 | + method: request.method, | ||
21572 | + ...option, | ||
21573 | + }) as unknown as Promise<PostServiceOrderBatchCaculateAndSetIntegralByMainIdsResponseSuccess>; | ||
21574 | + } | ||
21575 | + | ||
21576 | + /** http method */ | ||
21577 | + request.method = method; | ||
21578 | + /** request url */ | ||
21579 | + request.url = url; | ||
21580 | + return request; | ||
21581 | + })(); | ||
21582 | + | ||
21583 | +/** @description response type for postServiceOrderBatchCaculateAndSetPrePaidIntegral */ | ||
21584 | +export interface PostServiceOrderBatchCaculateAndSetPrePaidIntegralResponse { | ||
21585 | + /** | ||
21586 | + * @description | ||
21587 | + * OK | ||
21588 | + */ | ||
21589 | + 200: ServerResult; | ||
21590 | + /** | ||
21591 | + * @description | ||
21592 | + * Created | ||
21593 | + */ | ||
21594 | + 201: any; | ||
21595 | + /** | ||
21596 | + * @description | ||
21597 | + * Unauthorized | ||
21598 | + */ | ||
21599 | + 401: any; | ||
21600 | + /** | ||
21601 | + * @description | ||
21602 | + * Forbidden | ||
21603 | + */ | ||
21604 | + 403: any; | ||
21605 | + /** | ||
21606 | + * @description | ||
21607 | + * Not Found | ||
21608 | + */ | ||
21609 | + 404: any; | ||
21610 | +} | ||
21611 | + | ||
21612 | +export type PostServiceOrderBatchCaculateAndSetPrePaidIntegralResponseSuccess = | ||
21613 | + PostServiceOrderBatchCaculateAndSetPrePaidIntegralResponse[200]; | ||
21614 | +/** | ||
21615 | + * @description | ||
21616 | + * 计算积分 | ||
21617 | + * @tags 内部订单 | ||
21618 | + * @produces * | ||
21619 | + * @consumes application/json | ||
21620 | + */ | ||
21621 | +export const postServiceOrderBatchCaculateAndSetPrePaidIntegral = | ||
21622 | + /* #__PURE__ */ (() => { | ||
21623 | + const method = 'post'; | ||
21624 | + const url = '/service/order/batchCaculateAndSetPrePaidIntegral'; | ||
21625 | + function request(): Promise<PostServiceOrderBatchCaculateAndSetPrePaidIntegralResponseSuccess> { | ||
21626 | + return requester(request.url, { | ||
21627 | + method: request.method, | ||
21628 | + }) as unknown as Promise<PostServiceOrderBatchCaculateAndSetPrePaidIntegralResponseSuccess>; | ||
21629 | + } | ||
21630 | + | ||
21631 | + /** http method */ | ||
21632 | + request.method = method; | ||
21633 | + /** request url */ | ||
21634 | + request.url = url; | ||
21635 | + return request; | ||
21636 | + })(); | ||
21637 | + | ||
21638 | +/** @description response type for postServiceOrderBatchCaculateAndSetStoreIntegral */ | ||
21639 | +export interface PostServiceOrderBatchCaculateAndSetStoreIntegralResponse { | ||
21640 | + /** | ||
21641 | + * @description | ||
21642 | + * OK | ||
21643 | + */ | ||
21644 | + 200: ServerResult; | ||
21645 | + /** | ||
21646 | + * @description | ||
21647 | + * Created | ||
21648 | + */ | ||
21649 | + 201: any; | ||
21650 | + /** | ||
21651 | + * @description | ||
21652 | + * Unauthorized | ||
21653 | + */ | ||
21654 | + 401: any; | ||
21655 | + /** | ||
21656 | + * @description | ||
21657 | + * Forbidden | ||
21658 | + */ | ||
21659 | + 403: any; | ||
21660 | + /** | ||
21661 | + * @description | ||
21662 | + * Not Found | ||
21663 | + */ | ||
21664 | + 404: any; | ||
21665 | +} | ||
21666 | + | ||
21667 | +export type PostServiceOrderBatchCaculateAndSetStoreIntegralResponseSuccess = | ||
21668 | + PostServiceOrderBatchCaculateAndSetStoreIntegralResponse[200]; | ||
21669 | +/** | ||
21670 | + * @description | ||
21671 | + * 计算积分 | ||
21672 | + * @tags 内部订单 | ||
21673 | + * @produces * | ||
21674 | + * @consumes application/json | ||
21675 | + */ | ||
21676 | +export const postServiceOrderBatchCaculateAndSetStoreIntegral = | ||
21677 | + /* #__PURE__ */ (() => { | ||
21678 | + const method = 'post'; | ||
21679 | + const url = '/service/order/batchCaculateAndSetStoreIntegral'; | ||
21680 | + function request(): Promise<PostServiceOrderBatchCaculateAndSetStoreIntegralResponseSuccess> { | ||
21681 | + return requester(request.url, { | ||
21682 | + method: request.method, | ||
21683 | + }) as unknown as Promise<PostServiceOrderBatchCaculateAndSetStoreIntegralResponseSuccess>; | ||
21684 | + } | ||
21685 | + | ||
21686 | + /** http method */ | ||
21687 | + request.method = method; | ||
21688 | + /** request url */ | ||
21689 | + request.url = url; | ||
21690 | + return request; | ||
21691 | + })(); | ||
21692 | + | ||
21693 | +/** @description request parameter type for postServiceOrderBatchReceiveIntegral */ | ||
21694 | +export interface PostServiceOrderBatchReceiveIntegralOption { | ||
21695 | + /** | ||
21696 | + * @description | ||
21697 | + * ids | ||
21698 | + */ | ||
21699 | + query: { | ||
21700 | + /** | ||
21701 | + @description | ||
21702 | + ids */ | ||
21703 | + ids: Array<number>; | ||
21704 | + }; | ||
21705 | +} | ||
21706 | + | ||
21707 | +/** @description response type for postServiceOrderBatchReceiveIntegral */ | ||
21708 | +export interface PostServiceOrderBatchReceiveIntegralResponse { | ||
21709 | + /** | ||
21710 | + * @description | ||
21711 | + * OK | ||
21712 | + */ | ||
21713 | + 200: ServerResult; | ||
21714 | + /** | ||
21715 | + * @description | ||
21716 | + * Created | ||
21717 | + */ | ||
21718 | + 201: any; | ||
21719 | + /** | ||
21720 | + * @description | ||
21721 | + * Unauthorized | ||
21722 | + */ | ||
21723 | + 401: any; | ||
21724 | + /** | ||
21725 | + * @description | ||
21726 | + * Forbidden | ||
21727 | + */ | ||
21728 | + 403: any; | ||
21729 | + /** | ||
21730 | + * @description | ||
21731 | + * Not Found | ||
21732 | + */ | ||
21733 | + 404: any; | ||
21734 | +} | ||
21735 | + | ||
21736 | +export type PostServiceOrderBatchReceiveIntegralResponseSuccess = | ||
21737 | + PostServiceOrderBatchReceiveIntegralResponse[200]; | ||
21738 | +/** | ||
21739 | + * @description | ||
21740 | + * 计算积分 | ||
21741 | + * @tags 内部订单 | ||
21742 | + * @produces * | ||
21743 | + * @consumes application/json | ||
21744 | + */ | ||
21745 | +export const postServiceOrderBatchReceiveIntegral = /* #__PURE__ */ (() => { | ||
21746 | + const method = 'post'; | ||
21747 | + const url = '/service/order/batchReceiveIntegral'; | ||
21748 | + function request( | ||
21749 | + option: PostServiceOrderBatchReceiveIntegralOption, | ||
21750 | + ): Promise<PostServiceOrderBatchReceiveIntegralResponseSuccess> { | ||
21751 | + return requester(request.url, { | ||
21752 | + method: request.method, | ||
21753 | + ...option, | ||
21754 | + }) as unknown as Promise<PostServiceOrderBatchReceiveIntegralResponseSuccess>; | ||
21755 | + } | ||
21756 | + | ||
21757 | + /** http method */ | ||
21758 | + request.method = method; | ||
21759 | + /** request url */ | ||
21760 | + request.url = url; | ||
21761 | + return request; | ||
21762 | +})(); | ||
21763 | + | ||
21223 | /** @description request parameter type for postServiceOrderCancelSend */ | 21764 | /** @description request parameter type for postServiceOrderCancelSend */ |
21224 | export interface PostServiceOrderCancelSendOption { | 21765 | export interface PostServiceOrderCancelSendOption { |
21225 | /** | 21766 | /** |