Commit 1a0e794e7f86e12d75e33b62a1b6c6aecf3e5bb9
Merge branch 'master' into warning
Showing
18 changed files
with
79 additions
and
46 deletions
.umirc.ts
... | ... | @@ -92,14 +92,14 @@ export default defineConfig({ |
92 | 92 | name: '发票核销', |
93 | 93 | path: 'invoice', |
94 | 94 | icon: 'BookOutlined', |
95 | - access: 'canReadAdminAndFinance', | |
95 | + access: 'canReadAdminAndFinanceAndSales', | |
96 | 96 | component: './Invoice/Invoice', |
97 | 97 | }, |
98 | 98 | { |
99 | 99 | name: '银行流水', |
100 | 100 | path: 'invoiceVerification', |
101 | 101 | icon: 'BookOutlined', |
102 | - access: 'canReadAdminAndFinance', | |
102 | + access: 'canReadAdminAndFinanceAndSales', | |
103 | 103 | component: './Invoice/InvoiceVerification', |
104 | 104 | }, |
105 | 105 | { | ... | ... |
src/pages/Invoice/Invoice/components/InvoiceVerificationModal.tsx
... | ... | @@ -14,7 +14,6 @@ import { |
14 | 14 | import { useEffect, useRef, useState } from 'react'; |
15 | 15 | import '../index.less'; |
16 | 16 | import BankChooseModal from './BankChooseModal'; |
17 | - | |
18 | 17 | export default ({ invoiceId, setVisible, onClose }) => { |
19 | 18 | const [form] = Form.useForm<{ id: string }>(); |
20 | 19 | const [bankChooseModalVisible, setBankChooseModalVisible] = useState(false); |
... | ... | @@ -41,7 +40,7 @@ export default ({ invoiceId, setVisible, onClose }) => { |
41 | 40 | className="pl-1 pr-0" |
42 | 41 | type="link" |
43 | 42 | target="_blank" |
44 | - href={'/order?id=' + item} | |
43 | + href={'/order/order?id=' + item} | |
45 | 44 | > |
46 | 45 | {item} |
47 | 46 | </Button> | ... | ... |
src/pages/Invoice/Invoice/components/invoiceWriteOffModal.tsx
src/pages/Invoice/Invoice/index.tsx
... | ... | @@ -24,6 +24,7 @@ const InvoiceRecord = () => { |
24 | 24 | const [invoiceVerificationVisible, setInvoiceVerificationVisible] = |
25 | 25 | useState(false); |
26 | 26 | const [invoiceId, setInvoiceId] = useState(undefined); |
27 | + const [perms, setPerms] = useState([]); | |
27 | 28 | const [messageApi, contextHolder] = message.useMessage(); |
28 | 29 | const reloadInvoiceTable = () => { |
29 | 30 | invoiceActionRef.current?.reload(); |
... | ... | @@ -101,7 +102,7 @@ const InvoiceRecord = () => { |
101 | 102 | width: 160, |
102 | 103 | render: (text, record) => { |
103 | 104 | let btns = []; |
104 | - if (!record.writeOffId) { | |
105 | + if (record.paths?.includes('writeOff') && !record.writeOffId) { | |
105 | 106 | btns.push( |
106 | 107 | <InvoiceWriteOffModal |
107 | 108 | getData={() => { |
... | ... | @@ -120,7 +121,7 @@ const InvoiceRecord = () => { |
120 | 121 | ); |
121 | 122 | } |
122 | 123 | |
123 | - if (record.writeOffId) { | |
124 | + if (record.paths?.includes('writeOff') && record.writeOffId) { | |
124 | 125 | btns.push( |
125 | 126 | <InvoiceWriteOffModal |
126 | 127 | getData={async () => { |
... | ... | @@ -192,13 +193,14 @@ const InvoiceRecord = () => { |
192 | 193 | actionRef={invoiceActionRef} |
193 | 194 | cardBordered |
194 | 195 | pagination={{ |
195 | - pageSize: 10, | |
196 | + pageSizeOptions: ['10', '20', '50', '100'], | |
196 | 197 | }} |
197 | 198 | request={async (params) => { |
198 | 199 | const res = await postServiceInvoiceQueryInvoice({ |
199 | 200 | data: { ...params }, |
200 | 201 | }); |
201 | 202 | if (res) { |
203 | + setPerms(res?.data?.specialPath); | |
202 | 204 | return { |
203 | 205 | data: res?.data?.data || [], |
204 | 206 | total: res?.data?.total || 0, |
... | ... | @@ -254,18 +256,26 @@ const InvoiceRecord = () => { |
254 | 256 | headerTitle="发票列表" |
255 | 257 | scroll={{ x: 1400, y: 360 }} |
256 | 258 | toolBarRender={() => [ |
257 | - <AddInvoiceDrawerForm | |
258 | - onClose={() => { | |
259 | - invoiceActionRef.current?.reload(); | |
260 | - }} | |
261 | - key="add" | |
262 | - ></AddInvoiceDrawerForm>, | |
263 | - <InvoiceWriteOffModal | |
264 | - readOnly={false} | |
265 | - getData={() => ({})} | |
266 | - key="writeOff" | |
267 | - triggerButton={<Button type="primary">核销</Button>} | |
268 | - />, | |
259 | + <> | |
260 | + {perms?.includes('add') && ( | |
261 | + <AddInvoiceDrawerForm | |
262 | + onClose={() => { | |
263 | + invoiceActionRef.current?.reload(); | |
264 | + }} | |
265 | + key="add" | |
266 | + ></AddInvoiceDrawerForm> | |
267 | + )} | |
268 | + </>, | |
269 | + <> | |
270 | + {perms?.includes('writeOff') && ( | |
271 | + <InvoiceWriteOffModal | |
272 | + readOnly={false} | |
273 | + getData={() => ({})} | |
274 | + key="writeOff" | |
275 | + triggerButton={<Button type="primary">核销</Button>} | |
276 | + /> | |
277 | + )} | |
278 | + </>, | |
269 | 279 | ]} |
270 | 280 | /> |
271 | 281 | ... | ... |
src/pages/Invoice/InvoiceRecord/components/InvoiceRecordDetailModal.tsx
... | ... | @@ -254,13 +254,13 @@ export default ({ id, setVisible, reloadTable }) => { |
254 | 254 | itemRender={({}, { record }) => { |
255 | 255 | console.log('record' + JSON.stringify(record)); |
256 | 256 | return ( |
257 | - <Space> | |
257 | + <Space size={[8, 16]} wrap> | |
258 | 258 | <Button |
259 | 259 | key={record.mainId} |
260 | 260 | className="pl-1 pr-0" |
261 | 261 | type="link" |
262 | 262 | target="_blank" |
263 | - href={'/order?id=' + record.mainId} | |
263 | + href={'/order/order?id=' + record.mainId} | |
264 | 264 | > |
265 | 265 | {record.mainId} |
266 | 266 | </Button> |
... | ... | @@ -272,7 +272,7 @@ export default ({ id, setVisible, reloadTable }) => { |
272 | 272 | className="pl-1 pr-0" |
273 | 273 | type="link" |
274 | 274 | target="_blank" |
275 | - href={'/order?subOrderId=' + item} | |
275 | + href={'/order/order?subOrderId=' + item} | |
276 | 276 | > |
277 | 277 | {item} |
278 | 278 | </Button> | ... | ... |
src/pages/Invoice/InvoiceRecord/components/InvoiceVerificationModal.tsx
src/pages/Invoice/InvoiceVerification/components/InvoiceRecordDetailModal.tsx
... | ... | @@ -259,7 +259,7 @@ export default ({ id, setVisible }) => { |
259 | 259 | className="pl-1 pr-0" |
260 | 260 | type="link" |
261 | 261 | target="_blank" |
262 | - href={'/order?id=' + record.mainId} | |
262 | + href={'/order/order?id=' + record.mainId} | |
263 | 263 | > |
264 | 264 | {record.mainId} |
265 | 265 | </Button> |
... | ... | @@ -271,7 +271,7 @@ export default ({ id, setVisible }) => { |
271 | 271 | className="pl-1 pr-0" |
272 | 272 | type="link" |
273 | 273 | target="_blank" |
274 | - href={'/order?subOrderId=' + item} | |
274 | + href={'/order/order?subOrderId=' + item} | |
275 | 275 | > |
276 | 276 | {item} |
277 | 277 | </Button> | ... | ... |
src/pages/Invoice/InvoiceVerification/components/InvoiceVerificationModal.tsx
src/pages/Invoice/InvoiceVerification/index.tsx
... | ... | @@ -30,6 +30,7 @@ const InvoiceRecord = () => { |
30 | 30 | const [bankImportModalVisible, setBankImportModalVisible] = useState(false); |
31 | 31 | const [invoiceVerificationVisible, setInvoiceVerificationVisible] = |
32 | 32 | useState(false); |
33 | + const [perms, setPerms] = useState([]); | |
33 | 34 | const [messageApi, contextHolder] = message.useMessage(); |
34 | 35 | const [invoiceId] = useState(undefined); |
35 | 36 | const [invoiceRecordDetailVisible, setInvoiceRecordDetailVisible] = |
... | ... | @@ -137,7 +138,7 @@ const InvoiceRecord = () => { |
137 | 138 | ); |
138 | 139 | } |
139 | 140 | |
140 | - if (record.writeOffId !== null) { | |
141 | + if (record.paths?.includes('writeOff') && record.writeOffId !== null) { | |
141 | 142 | btns.push( |
142 | 143 | <InvoiceWriteOffModal |
143 | 144 | getData={async () => { |
... | ... | @@ -192,7 +193,7 @@ const InvoiceRecord = () => { |
192 | 193 | actionRef={bankActionRef} |
193 | 194 | cardBordered |
194 | 195 | pagination={{ |
195 | - pageSize: 10, | |
196 | + pageSizeOptions: ['10', '20', '50', '100'], | |
196 | 197 | }} |
197 | 198 | editable={{ |
198 | 199 | type: 'multiple', |
... | ... | @@ -209,6 +210,7 @@ const InvoiceRecord = () => { |
209 | 210 | data: { ...params }, |
210 | 211 | }); |
211 | 212 | if (res) { |
213 | + setPerms(res?.data?.specialPath); | |
212 | 214 | return { |
213 | 215 | data: res?.data?.data || [], |
214 | 216 | total: res?.data?.total || 0, |
... | ... | @@ -264,16 +266,20 @@ const InvoiceRecord = () => { |
264 | 266 | headerTitle="银行流水列表" |
265 | 267 | scroll={{ x: 1400, y: 360 }} |
266 | 268 | toolBarRender={() => [ |
267 | - <Button | |
268 | - key="button" | |
269 | - icon={<PlusOutlined />} | |
270 | - onClick={() => { | |
271 | - setBankImportModalVisible(true); | |
272 | - }} | |
273 | - type="primary" | |
274 | - > | |
275 | - 导入 | |
276 | - </Button>, | |
269 | + <> | |
270 | + {perms?.includes('import') && ( | |
271 | + <Button | |
272 | + key="button" | |
273 | + icon={<PlusOutlined />} | |
274 | + onClick={() => { | |
275 | + setBankImportModalVisible(true); | |
276 | + }} | |
277 | + type="primary" | |
278 | + > | |
279 | + 导入 | |
280 | + </Button> | |
281 | + )} | |
282 | + </>, | |
277 | 283 | ]} |
278 | 284 | /> |
279 | 285 | ... | ... |
src/pages/Invoice/constant.tsx
... | ... | @@ -86,11 +86,18 @@ export const INVOICE_COLUMNS = [ |
86 | 86 | { |
87 | 87 | title: '绑定流水号', |
88 | 88 | dataIndex: 'serialNumbersTextByOrder', |
89 | - | |
89 | + hideInSearch: true, | |
90 | 90 | valueType: 'text', |
91 | 91 | width: 180, |
92 | 92 | }, |
93 | 93 | { |
94 | + title: '金额', | |
95 | + dataIndex: 'money', | |
96 | + hideInTable: true, | |
97 | + valueType: 'money', | |
98 | + width: 180, | |
99 | + }, | |
100 | + { | |
94 | 101 | title: '是否预付款', |
95 | 102 | dataIndex: 'orderIsPrePay', |
96 | 103 | valueType: 'select', |
... | ... | @@ -294,6 +301,13 @@ export const BANK_STATEMENT_COLUMNS = [ |
294 | 301 | hideInSearch: true, |
295 | 302 | }, |
296 | 303 | { |
304 | + dataIndex: 'amount', | |
305 | + title: '金额', | |
306 | + valueType: 'money', | |
307 | + width: 100, | |
308 | + hideInTable: true, | |
309 | + }, | |
310 | + { | |
297 | 311 | dataIndex: 'remark', |
298 | 312 | title: '备注', |
299 | 313 | valueType: 'text', | ... | ... |
src/pages/Invoice/waitProcessRecord/components/InvoiceVerificationModal.tsx
src/pages/Order/Order/components/InvoiceSubOrderInfoTable.tsx
src/pages/Order/Order/components/InvoicingDrawerForm.tsx
... | ... | @@ -60,7 +60,7 @@ export default ({ dataList, setVisible, mainOrder, onClose }) => { |
60 | 60 | unit: item.unit, |
61 | 61 | quantity: item.quantity, |
62 | 62 | price: item.productPrice, |
63 | - totalPrice: item.subOrderPayment, | |
63 | + totalPrice: item.quantity * item.productPrice, | |
64 | 64 | }; |
65 | 65 | }); |
66 | 66 | form.setFieldValue('invoiceDetails', initialValue); | ... | ... |
src/pages/Order/Order/components/MessageListDrawer.tsx
... | ... | @@ -58,7 +58,7 @@ export default ({ setVisible }) => { |
58 | 58 | * 跳转到订单列表 |
59 | 59 | */ |
60 | 60 | function toOrderList(mainOrderIds: any) { |
61 | - window.open('/order?id=' + mainOrderIds.join(","), '_blank'); | |
61 | + window.open('/order/order?id=' + mainOrderIds.join(','), '_blank'); | |
62 | 62 | } |
63 | 63 | |
64 | 64 | /** | ... | ... |
src/pages/Order/Order/index.tsx
... | ... | @@ -4541,10 +4541,12 @@ const OrderPage = () => { |
4541 | 4541 | |
4542 | 4542 | return toolBtns; |
4543 | 4543 | } |
4544 | + | |
4544 | 4545 | const [invoiceWarningNum, setInvoiceWarningNum] = useState(0); |
4545 | 4546 | const [invoiceRefundWarningNum, setInvoiceRefundWarningNum] = useState(0); |
4546 | 4547 | const [open, setOpen] = useState(false); |
4547 | 4548 | const { openCount, setOpenCount } = useModel('count'); |
4549 | + | |
4548 | 4550 | async function getInvoiceWarningNum() { |
4549 | 4551 | const res = await postServiceOrderWarningOrderStatistics(); |
4550 | 4552 | if ( |
... | ... | @@ -4559,6 +4561,7 @@ const OrderPage = () => { |
4559 | 4561 | setInvoiceWarningNum(res.data.waitConfirmInvoice); |
4560 | 4562 | setInvoiceRefundWarningNum(res.data.waitConfirmReceipt); |
4561 | 4563 | } |
4564 | + | |
4562 | 4565 | useEffect(() => { |
4563 | 4566 | //预警订单数 |
4564 | 4567 | getInvoiceWarningNum(); | ... | ... |
src/pages/Order/OrderWarning/components/InvoiceSubOrderInfoTable.tsx
src/pages/Order/OrderWarning/components/MessageListDrawer.tsx
... | ... | @@ -58,7 +58,7 @@ export default ({ setVisible }) => { |
58 | 58 | * 跳转到订单列表 |
59 | 59 | */ |
60 | 60 | function toOrderList(mainOrderIds: any) { |
61 | - window.open('/order?id=' + mainOrderIds.join(","), '_blank'); | |
61 | + window.open('/order/order?id=' + mainOrderIds.join(','), '_blank'); | |
62 | 62 | } |
63 | 63 | |
64 | 64 | /** | ... | ... |
src/pages/Order/OrderWarning/index.tsx
... | ... | @@ -4160,6 +4160,7 @@ const OrderPage = () => { |
4160 | 4160 | } |
4161 | 4161 | params.salesCode = userInfo.username; |
4162 | 4162 | params.condition = filterCondifion; |
4163 | + params.paymentMethod = 'UNPAID'; | |
4163 | 4164 | params.sorted = sorted; |
4164 | 4165 | // params.isDeleteQueryOrder = filterCondifion === 70; |
4165 | 4166 | params.isDeleteQueryOrder = false; | ... | ... |