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,13 +45,13 @@ export default defineConfig({ | ||
45 | icon: 'LineChartOutlined', | 45 | icon: 'LineChartOutlined', |
46 | access: 'canReadAdmin', | 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 | name: '打印', | 56 | name: '打印', |
57 | path: '/print', | 57 | path: '/print', |
src/pages/Invoice/constant.tsx
@@ -20,62 +20,74 @@ export const INVOICE_COLUMNS = [ | @@ -20,62 +20,74 @@ export const INVOICE_COLUMNS = [ | ||
20 | dataIndex: 'invoiceNumber', | 20 | dataIndex: 'invoiceNumber', |
21 | title: '发票号码', | 21 | title: '发票号码', |
22 | valueType: 'text', | 22 | valueType: 'text', |
23 | + width: 100, | ||
23 | }, | 24 | }, |
24 | { | 25 | { |
25 | dataIndex: 'invoiceStatus', | 26 | dataIndex: 'invoiceStatus', |
26 | title: '发票类型', | 27 | title: '发票类型', |
27 | valueType: 'select', | 28 | valueType: 'select', |
29 | + width: 100, | ||
28 | }, | 30 | }, |
29 | { | 31 | { |
30 | title: '状态', | 32 | title: '状态', |
31 | dataIndex: 'status', | 33 | dataIndex: 'status', |
32 | valueType: 'text', | 34 | valueType: 'text', |
35 | + width: 100, | ||
33 | }, | 36 | }, |
34 | { | 37 | { |
35 | title: '购买方', | 38 | title: '购买方', |
36 | dataIndex: 'purchaser', | 39 | dataIndex: 'purchaser', |
37 | valueType: 'text', | 40 | valueType: 'text', |
41 | + width: 180, | ||
38 | }, | 42 | }, |
39 | { | 43 | { |
40 | title: '收款单位', | 44 | title: '收款单位', |
41 | dataIndex: 'payee', | 45 | dataIndex: 'payee', |
42 | valueType: 'text', | 46 | valueType: 'text', |
47 | + width: 180, | ||
43 | }, | 48 | }, |
44 | { | 49 | { |
45 | title: '联系人', | 50 | title: '联系人', |
46 | dataIndex: 'contacts', | 51 | dataIndex: 'contacts', |
47 | valueType: 'text', | 52 | valueType: 'text', |
53 | + width: 100, | ||
48 | }, | 54 | }, |
49 | { | 55 | { |
50 | title: '销售', | 56 | title: '销售', |
51 | dataIndex: 'sale', | 57 | dataIndex: 'sale', |
52 | valueType: 'text', | 58 | valueType: 'text', |
59 | + width: 100, | ||
53 | }, | 60 | }, |
54 | { | 61 | { |
55 | title: '金额', | 62 | title: '金额', |
56 | dataIndex: 'money', | 63 | dataIndex: 'money', |
57 | valueType: 'money', | 64 | valueType: 'money', |
65 | + width: 100, | ||
58 | }, | 66 | }, |
59 | { | 67 | { |
60 | title: '开票日期', | 68 | title: '开票日期', |
61 | dataIndex: 'invoicingTime', | 69 | dataIndex: 'invoicingTime', |
62 | valueType: 'date', | 70 | valueType: 'date', |
71 | + width: 150, | ||
63 | }, | 72 | }, |
64 | { | 73 | { |
65 | title: '收款时间', | 74 | title: '收款时间', |
66 | dataIndex: 'collectionTime', | 75 | dataIndex: 'collectionTime', |
67 | valueType: 'dateTime', | 76 | valueType: 'dateTime', |
77 | + width: 200, | ||
68 | }, | 78 | }, |
69 | { | 79 | { |
70 | title: '备注', | 80 | title: '备注', |
71 | dataIndex: 'notes', | 81 | dataIndex: 'notes', |
72 | valueType: 'text', | 82 | valueType: 'text', |
83 | + width: 250, | ||
73 | }, | 84 | }, |
74 | { | 85 | { |
75 | title: '操作', | 86 | title: '操作', |
76 | valueType: 'option', | 87 | valueType: 'option', |
77 | key: 'option', | 88 | key: 'option', |
78 | fixed: 'right', | 89 | fixed: 'right', |
90 | + width: 120, | ||
79 | render: (text, record, _, action) => [ | 91 | render: (text, record, _, action) => [ |
80 | <a | 92 | <a |
81 | key="editable" | 93 | key="editable" |
src/pages/Invoice/index.tsx
@@ -15,10 +15,9 @@ import { INVOCING_STATUS, PAYEE_OPTIONS } from '../Order/constant'; | @@ -15,10 +15,9 @@ import { INVOCING_STATUS, PAYEE_OPTIONS } from '../Order/constant'; | ||
15 | import './index.less'; | 15 | import './index.less'; |
16 | 16 | ||
17 | const userInfo = getUserInfo(); | 17 | const userInfo = getUserInfo(); |
18 | +// const | ||
18 | const InvoicePage = () => { | 19 | const InvoicePage = () => { |
19 | const actionRef = useRef<ActionType>(); | 20 | const actionRef = useRef<ActionType>(); |
20 | - // const [pageSize, setPageSize] = useState(10); | ||
21 | - // const [currentPage, setCurrentPage] = useState(1); | ||
22 | return ( | 21 | return ( |
23 | <> | 22 | <> |
24 | <PageContainer | 23 | <PageContainer |
@@ -128,7 +127,7 @@ const InvoicePage = () => { | @@ -128,7 +127,7 @@ const InvoicePage = () => { | ||
128 | }} | 127 | }} |
129 | dateFormatter="string" | 128 | dateFormatter="string" |
130 | headerTitle="发票列表" | 129 | headerTitle="发票列表" |
131 | - scroll={{ x: true }} | 130 | + scroll={{ x: 1400, y: 420 }} |
132 | /> | 131 | /> |
133 | </PageContainer> | 132 | </PageContainer> |
134 | </> | 133 | </> |
src/pages/Order/components/FinancialDrawer.tsx
@@ -8,13 +8,14 @@ import { enumToSelect } from '@/utils'; | @@ -8,13 +8,14 @@ import { enumToSelect } from '@/utils'; | ||
8 | import { | 8 | import { |
9 | DrawerForm, | 9 | DrawerForm, |
10 | ProFormDatePicker, | 10 | ProFormDatePicker, |
11 | + ProFormDigit, | ||
11 | ProFormSelect, | 12 | ProFormSelect, |
12 | ProFormText, | 13 | ProFormText, |
13 | ProFormTextArea, | 14 | ProFormTextArea, |
14 | } from '@ant-design/pro-components'; | 15 | } from '@ant-design/pro-components'; |
15 | import { Form, message } from 'antd'; | 16 | import { Form, message } from 'antd'; |
16 | import { useEffect, useState } from 'react'; | 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 | export default ({ | 20 | export default ({ |
20 | mainOrder, | 21 | mainOrder, |
@@ -141,32 +142,32 @@ export default ({ | @@ -141,32 +142,32 @@ export default ({ | ||
141 | label="收款时间" | 142 | label="收款时间" |
142 | initialValue={subOrders[0]?.collectMoneyTime} | 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 |