Commit f2c9057fd58eaafc736b002b768801d2ff9fb1ec
1 parent
e0a6e25d
feat: update 发票对账
Showing
5 changed files
with
61 additions
and
30 deletions
src/pages/Invoice/constant.tsx
... | ... | @@ -20,51 +20,61 @@ export const INVOICE_COLUMNS = [ |
20 | 20 | dataIndex: 'invoiceNumber', |
21 | 21 | title: '发票号码', |
22 | 22 | valueType: 'text', |
23 | + width: 80, | |
23 | 24 | }, |
24 | 25 | { |
25 | 26 | dataIndex: 'invoiceStatus', |
26 | 27 | title: '发票类型', |
27 | 28 | valueType: 'select', |
29 | + width: 80, | |
28 | 30 | }, |
29 | 31 | { |
30 | 32 | title: '状态', |
31 | 33 | dataIndex: 'status', |
32 | 34 | valueType: 'text', |
35 | + width: 80, | |
33 | 36 | }, |
34 | 37 | { |
35 | 38 | title: '购买方', |
36 | 39 | dataIndex: 'purchaser', |
37 | 40 | valueType: 'text', |
41 | + width: 80, | |
38 | 42 | }, |
39 | 43 | { |
40 | 44 | title: '收款单位', |
41 | 45 | dataIndex: 'payee', |
42 | 46 | valueType: 'text', |
47 | + width: 80, | |
43 | 48 | }, |
44 | 49 | { |
45 | 50 | title: '联系人', |
46 | 51 | dataIndex: 'contacts', |
47 | 52 | valueType: 'text', |
53 | + width: 80, | |
48 | 54 | }, |
49 | 55 | { |
50 | 56 | title: '销售', |
51 | 57 | dataIndex: 'sale', |
52 | 58 | valueType: 'text', |
59 | + width: 80, | |
53 | 60 | }, |
54 | 61 | { |
55 | 62 | title: '金额', |
56 | 63 | dataIndex: 'money', |
57 | 64 | valueType: 'money', |
65 | + width: 80, | |
58 | 66 | }, |
59 | 67 | { |
60 | 68 | title: '开票日期', |
61 | 69 | dataIndex: 'invoicingTime', |
62 | 70 | valueType: 'date', |
71 | + width: 80, | |
63 | 72 | }, |
64 | 73 | { |
65 | 74 | title: '收款时间', |
66 | 75 | dataIndex: 'collectionTime', |
67 | 76 | valueType: 'dateTime', |
77 | + width: 80, | |
68 | 78 | }, |
69 | 79 | { |
70 | 80 | title: '操作', | ... | ... |
src/pages/Invoice/index.tsx
src/pages/Order/components/FinancialDrawer.tsx
... | ... | @@ -12,10 +12,9 @@ import { |
12 | 12 | ProFormText, |
13 | 13 | ProFormTextArea, |
14 | 14 | } from '@ant-design/pro-components'; |
15 | -import { ProFormDigit } from '@ant-design/pro-form'; | |
16 | 15 | import { Form, message } from 'antd'; |
17 | 16 | import { useEffect, useState } from 'react'; |
18 | -import { INVOCING_STATUS_OPTIONS_OLD, PAYEE_OPTIONS } from '../constant'; | |
17 | +import { INVOCING_STATUS_OPTIONS_OLD } from '../constant'; | |
19 | 18 | |
20 | 19 | export default ({ |
21 | 20 | mainOrder, |
... | ... | @@ -142,31 +141,31 @@ export default ({ |
142 | 141 | label="收款时间" |
143 | 142 | initialValue={subOrders[0]?.collectMoneyTime} |
144 | 143 | />, |
145 | - <ProFormText | |
146 | - width="lg" | |
147 | - key="invoiceNumber" | |
148 | - name="invoiceNumber" | |
149 | - label="发票号码" | |
150 | - initialValue={subOrders[0]?.invoiceNumber} | |
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 | - />, | |
144 | + // <ProFormText | |
145 | + // width="lg" | |
146 | + // key="invoiceNumber" | |
147 | + // name="invoiceNumber" | |
148 | + // label="发票号码" | |
149 | + // initialValue={subOrders[0]?.invoiceNumber} | |
150 | + // />, | |
151 | + // <ProFormSelect | |
152 | + // key="payee" | |
153 | + // placeholder="选择收款单位" | |
154 | + // name="payee" | |
155 | + // width="lg" | |
156 | + // label="收款单位" | |
157 | + // options={enumToSelect(PAYEE_OPTIONS)} | |
158 | + // initialValue={subOrders[0]?.payee} | |
159 | + // rules={[{ required: true, message: '收款单位必填' }]} | |
160 | + // />, | |
162 | 161 | |
163 | - <ProFormDigit | |
164 | - key="money" | |
165 | - name="money" | |
166 | - width="lg" | |
167 | - label="金额" | |
168 | - rules={[{ required: true, message: '金额必填' }]} | |
169 | - />, | |
162 | + // <ProFormDigit | |
163 | + // key="money" | |
164 | + // name="money" | |
165 | + // width="lg" | |
166 | + // label="金额" | |
167 | + // rules={[{ required: true, message: '金额必填' }]} | |
168 | + // />, | |
170 | 169 | ] |
171 | 170 | : ''} |
172 | 171 | ... | ... |
src/pages/Order/index.tsx
... | ... | @@ -201,9 +201,12 @@ const OrderPage = () => { |
201 | 201 | function copyOrderToClipboard(record: any) { |
202 | 202 | let text = ''; |
203 | 203 | text += record?.id; |
204 | + text += ',' + record?.salesCode; | |
204 | 205 | text += ',' + record?.customerName; |
205 | 206 | text += ',' + record?.customerContactNumber; |
206 | 207 | text += ',' + record?.customerShippingAddress; |
208 | + text += ',' + record?.institutionContactName; | |
209 | + text += ',' + record?.institution; | |
207 | 210 | record?.subOrderInformationLists?.forEach((item) => { |
208 | 211 | text += '\n'; |
209 | 212 | text += item?.productName; |
... | ... | @@ -1055,7 +1058,8 @@ const OrderPage = () => { |
1055 | 1058 | type="link" |
1056 | 1059 | onClick={() => { |
1057 | 1060 | setSelectedRows([optRecord]); |
1058 | - setOrderDrawerVisible(true); | |
1061 | + // setOrderDrawerVisible(true); | |
1062 | + setAfterSalesDrawerVisible(true); | |
1059 | 1063 | setOrderRow(record); |
1060 | 1064 | setOrderOptType('after-sales'); |
1061 | 1065 | }} |
... | ... | @@ -1927,7 +1931,8 @@ const OrderPage = () => { |
1927 | 1931 | return; |
1928 | 1932 | } |
1929 | 1933 | } |
1930 | - setOrderDrawerVisible(true); | |
1934 | + // setOrderDrawerVisible(true); | |
1935 | + setAfterSalesDrawerVisible(true); | |
1931 | 1936 | setOrderRow(record); |
1932 | 1937 | setOrderOptType('after-sales'); |
1933 | 1938 | }} | ... | ... |
src/pages/OrderReport/components/OrderStatisticCard.tsx
... | ... | @@ -7,10 +7,26 @@ import { |
7 | 7 | ProFormDatePicker, |
8 | 8 | ProFormDigit, |
9 | 9 | } from '@ant-design/pro-components'; |
10 | +import { useLocation } from '@umijs/max'; | |
10 | 11 | import { Flex, Form, message } from 'antd'; |
11 | -import { useState } from 'react'; | |
12 | +import { useEffect, useState } from 'react'; | |
12 | 13 | |
13 | 14 | export default ({ data, statisticsMethod, reFreshData }) => { |
15 | + const location = useLocation(); | |
16 | + const [targetEditable, setTargetEditable] = useState(false); | |
17 | + | |
18 | + // 使用URLSearchParams来解析查询参数 | |
19 | + const params = new URLSearchParams(location.search); | |
20 | + | |
21 | + // 获取名为"param"的查询参数 | |
22 | + useEffect(() => { | |
23 | + setTargetEditable(true); | |
24 | + const urlEditable = params.get('editable'); | |
25 | + if (urlEditable === null) { | |
26 | + setTargetEditable(false); | |
27 | + } | |
28 | + }, []); | |
29 | + | |
14 | 30 | const [edit, setEdit] = useState(false); |
15 | 31 | const [form] = Form.useForm<{ |
16 | 32 | statisticsMethod: string; |
... | ... | @@ -121,7 +137,7 @@ export default ({ data, statisticsMethod, reFreshData }) => { |
121 | 137 | '' |
122 | 138 | )} |
123 | 139 | </span> |
124 | - {editable ? ( | |
140 | + {editable && targetEditable ? ( | |
125 | 141 | <EditTwoTone |
126 | 142 | style={{ fontSize: '20px' }} |
127 | 143 | onClick={() => { | ... | ... |