Commit 3e90932f1731a0097f6fde975bcfe20ff0c76f62
1 parent
2568db05
货拉拉账户配置部分页面
Showing
5 changed files
with
176 additions
and
0 deletions
config/routers/pms.ts
... | ... | @@ -159,4 +159,8 @@ export default [ |
159 | 159 | path: '/pms/transfer/storageOverStock', // 可调出配件 |
160 | 160 | component: './pms/transfer/StorageOverStock' |
161 | 161 | }, |
162 | + { | |
163 | + path: '/pms/transfer/huolalaSetting', // 货拉拉账户配置 | |
164 | + component: './pms/transfer/HuolalaSetting' | |
165 | + }, | |
162 | 166 | ]; | ... | ... |
src/pages/pms/transfer/HuolalaSetting/api.ts
0 → 100644
src/pages/pms/transfer/HuolalaSetting/components/AddModal.tsx
0 → 100644
1 | +import React from 'react'; | |
2 | +import {Form, Button, InputNumber, Modal } from 'antd'; | |
3 | +import PmsSelect from '@/pages/pms/comonents/PmsSelect'; | |
4 | + | |
5 | +const Item = Form.Item; | |
6 | + | |
7 | +interface Props{ | |
8 | + visible?:boolean, | |
9 | + onCancel: Function, | |
10 | + item?:any | |
11 | +} | |
12 | +export default function Index(props:Props) { | |
13 | + const { visible, onCancel, item } = props; | |
14 | + const [form] = Form.useForm(); | |
15 | + | |
16 | + const onSave = () => { | |
17 | + | |
18 | + }; | |
19 | + | |
20 | + return ( | |
21 | + <Modal | |
22 | + title={item.id ? "编辑货拉拉账户配置" : "新增货拉拉账户配置"} | |
23 | + visible={visible} | |
24 | + maskClosable={false} | |
25 | + onCancel={() => onCancel()} | |
26 | + footer={[ | |
27 | + <Button onClick={() => onCancel()}>取消</Button>, | |
28 | + <Button type="primary" htmlType="submit" onClick={() => onSave()}>保存</Button> | |
29 | + ]} | |
30 | + > | |
31 | + <Form | |
32 | + form={form} | |
33 | + labelCol={{span: 5}} | |
34 | + wrapperCol={{span: 12}} | |
35 | + > | |
36 | + <Item label="往来单位" name="supplierName" rules={[{required: true, message: "请选择往来单位"}]}> | |
37 | + <PmsSelect /> | |
38 | + </Item> | |
39 | + <Item label="签约门店" name="shopName" rules={[{ required: true, message: "请选择签约门店" }]}> | |
40 | + <PmsSelect /> | |
41 | + </Item> | |
42 | + <Item label="推待办余额" name="amount" rules={[{ required: true, message: "请填写金额" }]}> | |
43 | + <InputNumber style={{width: '100%'}} addonAfter="元" /> | |
44 | + </Item> | |
45 | + <Item label="推待办角色" name="role" rules={[{ required: true, message: "请选择推办角色" }]}> | |
46 | + <PmsSelect /> | |
47 | + </Item> | |
48 | + <Item label="发单账号" name="admin" rules={[{ required: true, message: "请选择发单账号" }]}> | |
49 | + <PmsSelect /> | |
50 | + </Item> | |
51 | + </Form> | |
52 | + </Modal> | |
53 | + ); | |
54 | +} | ... | ... |
src/pages/pms/transfer/HuolalaSetting/components/ChargeModal.tsx
0 → 100644
1 | +import React from 'react'; | |
2 | +import { Form, Button, InputNumber, Modal } from 'antd'; | |
3 | +import PmsSelect from '@/pages/pms/comonents/PmsSelect'; | |
4 | + | |
5 | +const Item = Form.Item; | |
6 | + | |
7 | +interface Props { | |
8 | + visible?: boolean, | |
9 | + onCancel: Function, | |
10 | + item?: any | |
11 | +} | |
12 | +export default function Index(props: Props) { | |
13 | + const { visible, onCancel, item } = props; | |
14 | + const [form] = Form.useForm(); | |
15 | + | |
16 | + const onSave = () => { | |
17 | + const params = {id: item.id}; | |
18 | + console.log(params); | |
19 | + }; | |
20 | + | |
21 | + return ( | |
22 | + <Modal | |
23 | + title="预付款充值申请" | |
24 | + visible={visible} | |
25 | + maskClosable={false} | |
26 | + onCancel={() => onCancel()} | |
27 | + footer={[ | |
28 | + <Button onClick={() => onCancel()}>取消</Button>, | |
29 | + <Button type="primary" htmlType="submit" onClick={() => onSave()}>提交申请</Button> | |
30 | + ]} | |
31 | + > | |
32 | + <Form | |
33 | + form={form} | |
34 | + labelCol={{ span: 7 }} | |
35 | + wrapperCol={{ span: 12 }} | |
36 | + > | |
37 | + <Item label="往来单位" name="supplierName" rules={[{ required: true, message: "请选择往来单位" }]}> | |
38 | + <PmsSelect /> | |
39 | + </Item> | |
40 | + <Item label="往来单位类型" name="shopName" rules={[{ required: true, message: "请选择签约门店" }]}> | |
41 | + <PmsSelect /> | |
42 | + </Item> | |
43 | + <Item label="账户余额" name="amount" rules={[{ required: true, message: "请填写金额" }]}> | |
44 | + <InputNumber style={{ width: '100%' }} addonAfter="元" /> | |
45 | + </Item> | |
46 | + <Item label="充值金额" name="amount" rules={[{ required: true, message: "请填写金额" }]}> | |
47 | + <InputNumber style={{ width: '100%' }} addonAfter="元" /> | |
48 | + </Item> | |
49 | + <Item label="账户到账金额" name="amount" rules={[{ required: true, message: "请填写金额" }]}> | |
50 | + <InputNumber style={{ width: '100%' }} addonAfter="元" /> | |
51 | + </Item> | |
52 | + <Item label="结算门店" name="role" rules={[{ required: true, message: "请选择推办角色" }]}> | |
53 | + <PmsSelect /> | |
54 | + </Item> | |
55 | + <Item label="发票金额要求比例" name="role" rules={[{ required: true, message: "请选择推办角色" }]}> | |
56 | + <PmsSelect /> | |
57 | + </Item> | |
58 | + <Item label="结算方式" name="role" rules={[{ required: true, message: "请选择推办角色" }]}> | |
59 | + <PmsSelect /> | |
60 | + </Item> | |
61 | + <Item label="附件" name="files"> | |
62 | + <PmsSelect /> | |
63 | + </Item> | |
64 | + </Form> | |
65 | + </Modal> | |
66 | + ); | |
67 | +} | ... | ... |
src/pages/pms/transfer/HuolalaSetting/index.tsx
0 → 100644
1 | +import React, { useState } from 'react'; | |
2 | +import { Card, Button, Table, Divider, Popconfirm } from 'antd'; | |
3 | +import { PageHeaderWrapper } from '@ant-design/pro-layout'; | |
4 | +import AddModal from './components/AddModal'; | |
5 | +import ChargeModal from './components/ChargeModal'; | |
6 | + | |
7 | +const Column = Table.Column; | |
8 | +export default function Index() { | |
9 | + const data = [ | |
10 | + {id: 1, supplierName: "锦州货拉拉", shopName: "锦州4S店", amount: 5000, diAmount: 100, role: "计划员", admin: "168276829"} | |
11 | + ]; | |
12 | + const [current, setCurrent] = useState<{visible: boolean, item: object}>({visible: false, item: {}}); | |
13 | + const [chargeInfo, setChargeInfo] = useState<{visible: boolean, item: object}>({visible: false, item: {}}); | |
14 | + | |
15 | + return ( | |
16 | + <PageHeaderWrapper title="货拉拉账户配置"> | |
17 | + <Card | |
18 | + extra={<Button type="primary" onClick={() => setCurrent({visible: true, item: {}})}>新增</Button>} | |
19 | + > | |
20 | + <Table dataSource={data} rowKey="id"> | |
21 | + <Column title="往来单位" dataIndex="supplierName" /> | |
22 | + <Column title="签约门店" dataIndex="shopName" /> | |
23 | + <Column title="当前余额(元)" dataIndex="amount" /> | |
24 | + <Column title="低余额推待办(元)" dataIndex="diAmount" /> | |
25 | + <Column title="推待办角色" dataIndex="role" /> | |
26 | + <Column title="发单账号" dataIndex="admin" /> | |
27 | + <Column | |
28 | + title="操作" | |
29 | + render={r => ( | |
30 | + <> | |
31 | + <a onClick={() => setChargeInfo({visible: true, item: r})}>预付款充值申请</a> | |
32 | + <Divider type="vertical" /> | |
33 | + <a onClick={() => setCurrent({visible: true, item: r})}>编辑</a> | |
34 | + <Divider type="vertical" /> | |
35 | + <Popconfirm | |
36 | + title="确认删除" | |
37 | + onConfirm={() => {}} | |
38 | + > | |
39 | + <a>删除</a> | |
40 | + </Popconfirm> | |
41 | + | |
42 | + </> | |
43 | + )} | |
44 | + /> | |
45 | + </Table> | |
46 | + <AddModal visible={current.visible} item={current.item} onCancel={() => setCurrent({ visible: false, item: {} })} /> | |
47 | + <ChargeModal visible={chargeInfo.visible} item={chargeInfo.item} onCancel={() => setChargeInfo({ visible: false, item: {} })} /> | |
48 | + </Card> | |
49 | + </PageHeaderWrapper> | |
50 | + ); | |
51 | +} | ... | ... |