Commit b6f8b35cde89c32434f5c563d14457af37905012

Authored by boyang
1 parent 96f570dd

fix: 修改订单预警param

src/pages/Order/Order/index.tsx
@@ -20,6 +20,7 @@ import { @@ -20,6 +20,7 @@ import {
20 postServiceOrderQueryServiceOrder, 20 postServiceOrderQueryServiceOrder,
21 postServiceOrderSaleCancelInvoicing, 21 postServiceOrderSaleCancelInvoicing,
22 postServiceOrderSalesConfirm, 22 postServiceOrderSalesConfirm,
  23 + postServiceOrderWarningOrderStatistics,
23 } from '@/services'; 24 } from '@/services';
24 import { orderExport } from '@/services/order'; 25 import { orderExport } from '@/services/order';
25 import { 26 import {
@@ -60,7 +61,9 @@ import { @@ -60,7 +61,9 @@ import {
60 } from '@ant-design/pro-components'; 61 } from '@ant-design/pro-components';
61 import { 62 import {
62 Button, 63 Button,
  64 + Card,
63 Checkbox, 65 Checkbox,
  66 + Col,
64 Divider, 67 Divider,
65 Dropdown, 68 Dropdown,
66 Flex, 69 Flex,
@@ -70,6 +73,7 @@ import { @@ -70,6 +73,7 @@ import {
70 Modal, 73 Modal,
71 Popconfirm, 74 Popconfirm,
72 Radio, 75 Radio,
  76 + Row,
73 Space, 77 Space,
74 Spin, 78 Spin,
75 Tag, 79 Tag,
@@ -4508,10 +4512,147 @@ const OrderPage = () => { @@ -4508,10 +4512,147 @@ const OrderPage = () => {
4508 4512
4509 return toolBtns; 4513 return toolBtns;
4510 } 4514 }
4511 - 4515 + const [invoiceWarningNum, setInvoiceWarningNum] = useState(0);
  4516 + const [invoiceRefundWarningNum, setInvoiceRefundWarningNum] = useState(0);
  4517 + const [open, setOpen] = useState(false);
  4518 + async function getInvoiceWarningNum() {
  4519 + const res = await postServiceOrderWarningOrderStatistics();
  4520 + if (
  4521 + res.data.waitConfirmInvoice !== 0 ||
  4522 + res.data.waitConfirmReceipt !== 0
  4523 + ) {
  4524 + setOpen(true);
  4525 + }
  4526 + setInvoiceWarningNum(res.data.waitConfirmInvoice);
  4527 + setInvoiceRefundWarningNum(res.data.waitConfirmReceipt);
  4528 + }
  4529 + useEffect(() => {
  4530 + //预警订单数
  4531 + getInvoiceWarningNum();
  4532 + }, []);
  4533 + //隐藏弹窗
  4534 + const hideModal = () => {
  4535 + setOpen(false);
  4536 + };
4512 return ( 4537 return (
4513 <div className="order-page-container"> 4538 <div className="order-page-container">
4514 <div id="resizeDiv"></div> 4539 <div id="resizeDiv"></div>
  4540 + <div id="resizeDiv"></div>
  4541 + <Modal
  4542 + title="订单预警提醒"
  4543 + open={open}
  4544 + width={800}
  4545 + closable={false}
  4546 + footer={[
  4547 + <Button key="confirm" size="large" type="primary" onClick={hideModal}>
  4548 + 去处理
  4549 + </Button>,
  4550 + ]}
  4551 + >
  4552 + <Row
  4553 + gutter={16}
  4554 + justify="space-between" // Aligns Cols to the start and end
  4555 + align="middle" // Vertically center contents
  4556 + >
  4557 + <Col span={12}>
  4558 + <div
  4559 + style={{
  4560 + display: 'flex',
  4561 + justifyContent: 'center',
  4562 + marginTop: '20px',
  4563 + }}
  4564 + >
  4565 + <Card
  4566 + bordered={true}
  4567 + style={{
  4568 + backgroundColor: '#f0f0f0', // 背景颜色
  4569 + width: '200px', // 卡片宽度
  4570 + height: '200px', // 卡片高度
  4571 + display: 'flex',
  4572 + alignItems: 'center',
  4573 + justifyContent: 'center',
  4574 + }}
  4575 + >
  4576 + <div
  4577 + style={{
  4578 + fontWeight: 'bold', // 字体加粗
  4579 + color: 'black', // 字体颜色
  4580 + fontSize: '20px', // 字体大小
  4581 + }}
  4582 + >
  4583 + <div
  4584 + style={{
  4585 + fontWeight: 'bold', // 字体加粗
  4586 + color: 'black', // 字体颜色
  4587 + fontSize: '40px', // 字体大小
  4588 + justifyContent: 'center',
  4589 + display: 'flex',
  4590 + alignItems: 'center',
  4591 + marginBottom: '20px',
  4592 + }}
  4593 + >
  4594 + {invoiceWarningNum}
  4595 + </div>
  4596 + 发票待确认订单
  4597 + </div>
  4598 + </Card>
  4599 + </div>
  4600 + </Col>
  4601 + <Col span={12}>
  4602 + <div
  4603 + style={{
  4604 + display: 'flex',
  4605 + justifyContent: 'center',
  4606 + marginTop: '20px',
  4607 + }}
  4608 + >
  4609 + <Card
  4610 + bordered={true}
  4611 + style={{
  4612 + backgroundColor: '#f0f0f0', // 背景颜色
  4613 + width: '200px', // 卡片宽度
  4614 + height: '200px', // 卡片高度
  4615 + display: 'flex',
  4616 + alignItems: 'center',
  4617 + justifyContent: 'center',
  4618 + }}
  4619 + >
  4620 + <div
  4621 + style={{
  4622 + fontWeight: 'bold', // 字体加粗
  4623 + color: 'black', // 字体颜色
  4624 + fontSize: '20px', // 字体大小
  4625 + }}
  4626 + >
  4627 + <div
  4628 + style={{
  4629 + fontWeight: 'bold', // 字体加粗
  4630 + color: 'black', // 字体颜色
  4631 + fontSize: '40px', // 字体大小
  4632 + justifyContent: 'center',
  4633 + display: 'flex',
  4634 + alignItems: 'center',
  4635 + marginBottom: '20px',
  4636 + }}
  4637 + >
  4638 + {invoiceRefundWarningNum}
  4639 + </div>
  4640 + 回款待确认订单
  4641 + </div>
  4642 + </Card>
  4643 + </div>
  4644 + </Col>
  4645 + </Row>
  4646 + <div style={{ color: 'red', padding: '40px' }}>
  4647 + <p>预警说明:</p>
  4648 + <p>
  4649 + 1、从订单确认收货之日起,超过5天未和客户确认发票(不开票的订单除外)的订单将会进行第一次提醒;超过15天未和客户确认发票(不开票的订单除外)的订单将会每天进行一次提醒,并限制下单功能
  4650 + </p>
  4651 + <p>
  4652 + 2、从发票确认之日起,超过15天未确认回款的订单将会进行第一次提醒,超过25天未确认回款的订单将会每天进行一次提醒,并限制下单功能
  4653 + </p>
  4654 + </div>
  4655 + </Modal>
4515 <ProTable 4656 <ProTable
4516 id="main-table" 4657 id="main-table"
4517 // tableStyle={{backgroundColor:'red'}} 4658 // tableStyle={{backgroundColor:'red'}}
src/pages/Order/OrderWarning/index.tsx
@@ -58,17 +58,13 @@ import { @@ -58,17 +58,13 @@ import {
58 import { 58 import {
59 Badge, 59 Badge,
60 Button, 60 Button,
61 - Card,  
62 Checkbox, 61 Checkbox,
63 - Col,  
64 Divider, 62 Divider,
65 Flex, 63 Flex,
66 FloatButton, 64 FloatButton,
67 Image, 65 Image,
68 - Modal,  
69 Popconfirm, 66 Popconfirm,
70 Radio, 67 Radio,
71 - Row,  
72 Space, 68 Space,
73 Spin, 69 Spin,
74 Tabs, 70 Tabs,
@@ -4136,8 +4132,8 @@ const OrderPage = () =&gt; { @@ -4136,8 +4132,8 @@ const OrderPage = () =&gt; {
4136 const res = await postServiceOrderWarningOrderStatistics(); 4132 const res = await postServiceOrderWarningOrderStatistics();
4137 setInvoiceWarningNum(res.data.waitConfirmInvoice); 4133 setInvoiceWarningNum(res.data.waitConfirmInvoice);
4138 setInvoiceRefundWarningNum(res.data.waitConfirmReceipt); 4134 setInvoiceRefundWarningNum(res.data.waitConfirmReceipt);
  4135 + console.log('56561');
4139 } 4136 }
4140 -  
4141 useEffect(() => { 4137 useEffect(() => {
4142 //预警订单数 4138 //预警订单数
4143 getInvoiceWarningNum(); 4139 getInvoiceWarningNum();
@@ -4167,13 +4163,14 @@ const OrderPage = () =&gt; { @@ -4167,13 +4163,14 @@ const OrderPage = () =&gt; {
4167 params.sorted = sorted; 4163 params.sorted = sorted;
4168 // params.isDeleteQueryOrder = filterCondifion === 70; 4164 // params.isDeleteQueryOrder = filterCondifion === 70;
4169 params.isDeleteQueryOrder = false; 4165 params.isDeleteQueryOrder = false;
4170 - params.orderStatus = 'CONFIRM_RECEIPT'; 4166 + params.invoiceConfirmStatusNe = 'CONFIRMED';
4171 params.invoicingStatusNe = 'UN_INVOICE'; 4167 params.invoicingStatusNe = 'UN_INVOICE';
4172 if (calDate === 'null') { 4168 if (calDate === 'null') {
4173 - params.statusDatetimeLe = null; 4169 + params.applyTimeLe = null;
4174 } else { 4170 } else {
4175 - params.statusDatetimeLe = calDate; 4171 + params.applyTimeLe = calDate;
4176 } 4172 }
  4173 + params.applyTimeIsNotNull = true;
4177 console.log(params, '5656paramsFlush'); 4174 console.log(params, '5656paramsFlush');
4178 setSearchParam(params); 4175 setSearchParam(params);
4179 4176
@@ -4224,13 +4221,13 @@ const OrderPage = () =&gt; { @@ -4224,13 +4221,13 @@ const OrderPage = () =&gt; {
4224 sorter, 4221 sorter,
4225 filter, 4222 filter,
4226 ) => { 4223 ) => {
4227 - params.orderStatus = 'CONFIRM_INVOICE'; 4224 + params.invoiceConfirmStatus = 'CONFIRMED';
4228 params.paymentMethod = 'UNPAID'; 4225 params.paymentMethod = 'UNPAID';
4229 params.salesCode = userInfo.username; 4226 params.salesCode = userInfo.username;
4230 if (calDate2 === 'null') { 4227 if (calDate2 === 'null') {
4231 - params.statusDatetimeLe = null; 4228 + params.invoiceConfirmStatusDatetimeLe = null;
4232 } else { 4229 } else {
4233 - params.statusDatetimeLe = calDate2; 4230 + params.invoiceConfirmStatusDatetimeLe = calDate2;
4234 } 4231 }
4235 //订单id处理 4232 //订单id处理
4236 /** 4233 /**
@@ -5457,129 +5454,10 @@ const OrderPage = () =&gt; { @@ -5457,129 +5454,10 @@ const OrderPage = () =&gt; {
5457 ), 5454 ),
5458 }, 5455 },
5459 ]; 5456 ];
5460 - const [open, setOpen] = useState(true);  
5461 - //隐藏弹窗  
5462 - const hideModal = () => {  
5463 - setOpen(false);  
5464 - }; 5457 +
5465 return ( 5458 return (
5466 <div className="order-page-container"> 5459 <div className="order-page-container">
5467 <div id="resizeDiv"></div> 5460 <div id="resizeDiv"></div>
5468 - <Modal  
5469 - title="订单预警提醒"  
5470 - open={open}  
5471 - width={800}  
5472 - closable={false}  
5473 - footer={[  
5474 - <Button key="confirm" size="large" type="primary" onClick={hideModal}>  
5475 - 去处理  
5476 - </Button>,  
5477 - ]}  
5478 - >  
5479 - <Row  
5480 - gutter={16}  
5481 - justify="space-between" // Aligns Cols to the start and end  
5482 - align="middle" // Vertically center contents  
5483 - >  
5484 - <Col span={12}>  
5485 - <div  
5486 - style={{  
5487 - display: 'flex',  
5488 - justifyContent: 'center',  
5489 - marginTop: '20px',  
5490 - }}  
5491 - >  
5492 - <Card  
5493 - bordered={true}  
5494 - style={{  
5495 - backgroundColor: '#f0f0f0', // 背景颜色  
5496 - width: '200px', // 卡片宽度  
5497 - height: '200px', // 卡片高度  
5498 - display: 'flex',  
5499 - alignItems: 'center',  
5500 - justifyContent: 'center',  
5501 - }}  
5502 - >  
5503 - <div  
5504 - style={{  
5505 - fontWeight: 'bold', // 字体加粗  
5506 - color: 'black', // 字体颜色  
5507 - fontSize: '20px', // 字体大小  
5508 - }}  
5509 - >  
5510 - <div  
5511 - style={{  
5512 - fontWeight: 'bold', // 字体加粗  
5513 - color: 'black', // 字体颜色  
5514 - fontSize: '40px', // 字体大小  
5515 - justifyContent: 'center',  
5516 - display: 'flex',  
5517 - alignItems: 'center',  
5518 - marginBottom: '20px',  
5519 - }}  
5520 - >  
5521 - {invoiceWarningNum}  
5522 - </div>  
5523 - 发票待确认订单  
5524 - </div>  
5525 - </Card>  
5526 - </div>  
5527 - </Col>  
5528 - <Col span={12}>  
5529 - <div  
5530 - style={{  
5531 - display: 'flex',  
5532 - justifyContent: 'center',  
5533 - marginTop: '20px',  
5534 - }}  
5535 - >  
5536 - <Card  
5537 - bordered={true}  
5538 - style={{  
5539 - backgroundColor: '#f0f0f0', // 背景颜色  
5540 - width: '200px', // 卡片宽度  
5541 - height: '200px', // 卡片高度  
5542 - display: 'flex',  
5543 - alignItems: 'center',  
5544 - justifyContent: 'center',  
5545 - }}  
5546 - >  
5547 - <div  
5548 - style={{  
5549 - fontWeight: 'bold', // 字体加粗  
5550 - color: 'black', // 字体颜色  
5551 - fontSize: '20px', // 字体大小  
5552 - }}  
5553 - >  
5554 - <div  
5555 - style={{  
5556 - fontWeight: 'bold', // 字体加粗  
5557 - color: 'black', // 字体颜色  
5558 - fontSize: '40px', // 字体大小  
5559 - justifyContent: 'center',  
5560 - display: 'flex',  
5561 - alignItems: 'center',  
5562 - marginBottom: '20px',  
5563 - }}  
5564 - >  
5565 - {invoiceRefundWarningNum}  
5566 - </div>  
5567 - 回款待确认订单  
5568 - </div>  
5569 - </Card>  
5570 - </div>  
5571 - </Col>  
5572 - </Row>  
5573 - <div style={{ color: 'red', padding: '40px' }}>  
5574 - <p>预警说明:</p>  
5575 - <p>  
5576 - 1、从订单确认收货之日起,超过5天未和客户确认发票(不开票的订单除外)的订单将会进行第一次提醒;超过15天未和客户确认发票(不开票的订单除外)的订单将会每天进行一次提醒,并限制下单功能  
5577 - </p>  
5578 - <p>  
5579 - 2、从发票确认之日起,超过15天未确认回款的订单将会进行第一次提醒,超过25天未确认回款的订单将会每天进行一次提醒,并限制下单功能  
5580 - </p>  
5581 - </div>  
5582 - </Modal>  
5583 <Tabs defaultActiveKey="1" items={tabsItems} onChange={() => {}} /> 5461 <Tabs defaultActiveKey="1" items={tabsItems} onChange={() => {}} />
5584 </div> 5462 </div>
5585 ); 5463 );