Commit c158e9dec1a7151f7d6ad0fdcfdb7d1bbd010885
1 parent
ac326715
feat: update固定列调整
Showing
4 changed files
with
48 additions
and
36 deletions
.umirc.ts
... | ... | @@ -45,13 +45,13 @@ export default defineConfig({ |
45 | 45 | icon: 'LineChartOutlined', |
46 | 46 | access: 'canReadAdmin', |
47 | 47 | }, |
48 | - // { | |
49 | - // name: '发票管理', | |
50 | - // path: '/invoiceManage', | |
51 | - // component: './Invoice', | |
52 | - // icon: 'BookOutlined', | |
53 | - // access: 'canReadAdmin', | |
54 | - // }, | |
48 | + { | |
49 | + name: '发票管理', | |
50 | + path: '/invoiceManage', | |
51 | + component: './Invoice', | |
52 | + icon: 'BookOutlined', | |
53 | + access: 'canReadAdmin', | |
54 | + }, | |
55 | 55 | { |
56 | 56 | name: '打印', |
57 | 57 | path: '/print', | ... | ... |
src/pages/Invoice/constant.tsx
... | ... | @@ -20,62 +20,74 @@ export const INVOICE_COLUMNS = [ |
20 | 20 | dataIndex: 'invoiceNumber', |
21 | 21 | title: '发票号码', |
22 | 22 | valueType: 'text', |
23 | + width: 100, | |
23 | 24 | }, |
24 | 25 | { |
25 | 26 | dataIndex: 'invoiceStatus', |
26 | 27 | title: '发票类型', |
27 | 28 | valueType: 'select', |
29 | + width: 100, | |
28 | 30 | }, |
29 | 31 | { |
30 | 32 | title: '状态', |
31 | 33 | dataIndex: 'status', |
32 | 34 | valueType: 'text', |
35 | + width: 100, | |
33 | 36 | }, |
34 | 37 | { |
35 | 38 | title: '购买方', |
36 | 39 | dataIndex: 'purchaser', |
37 | 40 | valueType: 'text', |
41 | + width: 180, | |
38 | 42 | }, |
39 | 43 | { |
40 | 44 | title: '收款单位', |
41 | 45 | dataIndex: 'payee', |
42 | 46 | valueType: 'text', |
47 | + width: 180, | |
43 | 48 | }, |
44 | 49 | { |
45 | 50 | title: '联系人', |
46 | 51 | dataIndex: 'contacts', |
47 | 52 | valueType: 'text', |
53 | + width: 100, | |
48 | 54 | }, |
49 | 55 | { |
50 | 56 | title: '销售', |
51 | 57 | dataIndex: 'sale', |
52 | 58 | valueType: 'text', |
59 | + width: 100, | |
53 | 60 | }, |
54 | 61 | { |
55 | 62 | title: '金额', |
56 | 63 | dataIndex: 'money', |
57 | 64 | valueType: 'money', |
65 | + width: 100, | |
58 | 66 | }, |
59 | 67 | { |
60 | 68 | title: '开票日期', |
61 | 69 | dataIndex: 'invoicingTime', |
62 | 70 | valueType: 'date', |
71 | + width: 150, | |
63 | 72 | }, |
64 | 73 | { |
65 | 74 | title: '收款时间', |
66 | 75 | dataIndex: 'collectionTime', |
67 | 76 | valueType: 'dateTime', |
77 | + width: 200, | |
68 | 78 | }, |
69 | 79 | { |
70 | 80 | title: '备注', |
71 | 81 | dataIndex: 'notes', |
72 | 82 | valueType: 'text', |
83 | + width: 250, | |
73 | 84 | }, |
74 | 85 | { |
75 | 86 | title: '操作', |
76 | 87 | valueType: 'option', |
77 | 88 | key: 'option', |
78 | 89 | fixed: 'right', |
90 | + width: 120, | |
79 | 91 | render: (text, record, _, action) => [ |
80 | 92 | <a |
81 | 93 | key="editable" | ... | ... |
src/pages/Invoice/index.tsx
... | ... | @@ -15,10 +15,9 @@ import { INVOCING_STATUS, PAYEE_OPTIONS } from '../Order/constant'; |
15 | 15 | import './index.less'; |
16 | 16 | |
17 | 17 | const userInfo = getUserInfo(); |
18 | +// const | |
18 | 19 | const InvoicePage = () => { |
19 | 20 | const actionRef = useRef<ActionType>(); |
20 | - // const [pageSize, setPageSize] = useState(10); | |
21 | - // const [currentPage, setCurrentPage] = useState(1); | |
22 | 21 | return ( |
23 | 22 | <> |
24 | 23 | <PageContainer |
... | ... | @@ -128,7 +127,7 @@ const InvoicePage = () => { |
128 | 127 | }} |
129 | 128 | dateFormatter="string" |
130 | 129 | headerTitle="发票列表" |
131 | - scroll={{ x: true }} | |
130 | + scroll={{ x: 1400, y: 420 }} | |
132 | 131 | /> |
133 | 132 | </PageContainer> |
134 | 133 | </> | ... | ... |
src/pages/Order/components/FinancialDrawer.tsx
... | ... | @@ -8,13 +8,14 @@ import { enumToSelect } from '@/utils'; |
8 | 8 | import { |
9 | 9 | DrawerForm, |
10 | 10 | ProFormDatePicker, |
11 | + ProFormDigit, | |
11 | 12 | ProFormSelect, |
12 | 13 | ProFormText, |
13 | 14 | ProFormTextArea, |
14 | 15 | } from '@ant-design/pro-components'; |
15 | 16 | import { Form, message } from 'antd'; |
16 | 17 | import { useEffect, useState } from 'react'; |
17 | -import { INVOCING_STATUS_OPTIONS_OLD } from '../constant'; | |
18 | +import { INVOCING_STATUS_OPTIONS_OLD, PAYEE_OPTIONS } from '../constant'; | |
18 | 19 | |
19 | 20 | export default ({ |
20 | 21 | mainOrder, |
... | ... | @@ -141,32 +142,32 @@ export default ({ |
141 | 142 | label="收款时间" |
142 | 143 | initialValue={subOrders[0]?.collectMoneyTime} |
143 | 144 | />, |
144 | - // <ProFormText | |
145 | - // width="lg" | |
146 | - // key="invoiceNumber" | |
147 | - // name="invoiceNumber" | |
148 | - // label="发票号码" | |
149 | - // initialValue={subOrders[0]?.invoiceNumber} | |
150 | - // rules={[{ required: true, message: '发票号码必填' }]} | |
151 | - // />, | |
152 | - // <ProFormSelect | |
153 | - // key="payee" | |
154 | - // placeholder="选择收款单位" | |
155 | - // name="payee" | |
156 | - // width="lg" | |
157 | - // label="收款单位" | |
158 | - // options={enumToSelect(PAYEE_OPTIONS)} | |
159 | - // initialValue={subOrders[0]?.payee} | |
160 | - // rules={[{ required: true, message: '收款单位必填' }]} | |
161 | - // />, | |
145 | + <ProFormText | |
146 | + width="lg" | |
147 | + key="invoiceNumber" | |
148 | + name="invoiceNumber" | |
149 | + label="发票号码" | |
150 | + initialValue={subOrders[0]?.invoiceNumber} | |
151 | + rules={[{ required: true, message: '发票号码必填' }]} | |
152 | + />, | |
153 | + <ProFormSelect | |
154 | + key="payee" | |
155 | + placeholder="选择收款单位" | |
156 | + name="payee" | |
157 | + width="lg" | |
158 | + label="收款单位" | |
159 | + options={enumToSelect(PAYEE_OPTIONS)} | |
160 | + initialValue={subOrders[0]?.payee} | |
161 | + rules={[{ required: true, message: '收款单位必填' }]} | |
162 | + />, | |
162 | 163 | |
163 | - // <ProFormDigit | |
164 | - // key="money" | |
165 | - // name="money" | |
166 | - // width="lg" | |
167 | - // label="金额" | |
168 | - // rules={[{ required: true, message: '金额必填' }]} | |
169 | - // />, | |
164 | + <ProFormDigit | |
165 | + key="money" | |
166 | + name="money" | |
167 | + width="lg" | |
168 | + label="金额" | |
169 | + rules={[{ required: true, message: '金额必填' }]} | |
170 | + />, | |
170 | 171 | ] |
171 | 172 | : ''} |
172 | 173 | ... | ... |