Commit d861ff664faffe9b7f4eedd5dd6d020f9070a745

Authored by boyang
1 parent a21b1886

修改预警回款params,修改弹窗显示

src/pages/Order/Order/index.tsx
@@ -18,6 +18,7 @@ import { @@ -18,6 +18,7 @@ import {
18 postServiceOrderProcurePrint, 18 postServiceOrderProcurePrint,
19 postServiceOrderProvideProcurementRoles, 19 postServiceOrderProvideProcurementRoles,
20 postServiceOrderQueryServiceOrder, 20 postServiceOrderQueryServiceOrder,
  21 + postServiceOrderWarningOrderStatistics,
21 postServiceOrderSaleCancelInvoicing, 22 postServiceOrderSaleCancelInvoicing,
22 postServiceOrderSalesConfirm, 23 postServiceOrderSalesConfirm,
23 } from '@/services'; 24 } from '@/services';
@@ -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,
@@ -4501,10 +4505,116 @@ const OrderPage = () => { @@ -4501,10 +4505,116 @@ const OrderPage = () => {
4501 4505
4502 return toolBtns; 4506 return toolBtns;
4503 } 4507 }
  4508 + const [invoiceWarningNum, setInvoiceWarningNum] = useState(0);
  4509 + const [invoiceRefundWarningNum, setInvoiceRefundWarningNum] = useState(0);
  4510 + async function getInvoiceWarningNum() {
  4511 + const res = await postServiceOrderWarningOrderStatistics();
  4512 + setInvoiceWarningNum(res.data.waitConfirmInvoice);
  4513 + setInvoiceRefundWarningNum(res.data.waitConfirmReceipt);
  4514 + }
  4515 +
  4516 + useEffect(() => {
  4517 + //预警订单数
  4518 + getInvoiceWarningNum();
  4519 + }, []);
  4520 + const [open, setOpen] = useState(true);
  4521 + //隐藏弹窗
  4522 + const hideModal = () => {
  4523 + setOpen(false);
  4524 + };
4504 4525
4505 return ( 4526 return (
4506 <div className="order-page-container"> 4527 <div className="order-page-container">
4507 <div id="resizeDiv"></div> 4528 <div id="resizeDiv"></div>
  4529 + <Modal
  4530 + title="订单预警提醒"
  4531 + open={open}
  4532 + width={800}
  4533 + closable={false}
  4534 + footer={[
  4535 + <Button key="confirm" size='large' type="primary" onClick={hideModal}>
  4536 + 去处理
  4537 + </Button>
  4538 + ]}
  4539 + >
  4540 + <Row
  4541 + gutter={16}
  4542 + justify="space-between" // Aligns Cols to the start and end
  4543 + align="middle" // Vertically center contents
  4544 + >
  4545 + <Col span={12}>
  4546 + <div style={{ display: 'flex', justifyContent: 'center', marginTop: '20px' }}>
  4547 + <Card
  4548 + bordered={true}
  4549 + style={{
  4550 + backgroundColor: '#f0f0f0', // 背景颜色
  4551 + width: '200px', // 卡片宽度
  4552 + height: '200px', // 卡片高度
  4553 + display: 'flex',
  4554 + alignItems: 'center',
  4555 + justifyContent: 'center'
  4556 + }}
  4557 + >
  4558 + <div style={{
  4559 + fontWeight: 'bold', // 字体加粗
  4560 + color: 'black', // 字体颜色
  4561 + fontSize: '20px', // 字体大小
  4562 + }}>
  4563 + <div style={{
  4564 + fontWeight: 'bold', // 字体加粗
  4565 + color: 'black', // 字体颜色
  4566 + fontSize: '40px', // 字体大小
  4567 + justifyContent: 'center',
  4568 + display: 'flex',
  4569 + alignItems: 'center',
  4570 + marginBottom: '20px',
  4571 + }}>
  4572 + {invoiceWarningNum}
  4573 + </div>
  4574 + 发票待确认订单
  4575 + </div>
  4576 + </Card>
  4577 + </div></Col>
  4578 + <Col span={12}>
  4579 + <div style={{ display: 'flex', justifyContent: 'center', marginTop: '20px' }}>
  4580 + <Card
  4581 + bordered={true}
  4582 + style={{
  4583 + backgroundColor: '#f0f0f0', // 背景颜色
  4584 + width: '200px', // 卡片宽度
  4585 + height: '200px', // 卡片高度
  4586 + display: 'flex',
  4587 + alignItems: 'center',
  4588 + justifyContent: 'center'
  4589 + }}
  4590 + >
  4591 + <div style={{
  4592 + fontWeight: 'bold', // 字体加粗
  4593 + color: 'black', // 字体颜色
  4594 + fontSize: '20px', // 字体大小
  4595 + }}>
  4596 + <div style={{
  4597 + fontWeight: 'bold', // 字体加粗
  4598 + color: 'black', // 字体颜色
  4599 + fontSize: '40px', // 字体大小
  4600 + justifyContent: 'center',
  4601 + display: 'flex',
  4602 + alignItems: 'center',
  4603 + marginBottom: '20px',
  4604 + }}>
  4605 + {invoiceRefundWarningNum}
  4606 + </div>
  4607 + 回款待确认订单
  4608 + </div>
  4609 + </Card>
  4610 + </div></Col>
  4611 + </Row>
  4612 + <div style={{ color: 'red', padding: '40px' }}>
  4613 + <p>预警说明:</p>
  4614 + <p>1、从订单确认收货之日起,超过5天未和客户确认发票(不开票的订单除外)的订单将会进行第一次提醒;超过15天未和客户确认发票(不开票的订单除外)的订单将会每天进行一次提醒,并限制下单功能</p>
  4615 + <p>2、从发票确认之日起,超过15天未确认回款的订单将会进行第一次提醒,超过25天未确认回款的订单将会每天进行一次提醒,并限制下单功能</p>
  4616 + </div>
  4617 + </Modal>
4508 <ProTable 4618 <ProTable
4509 id="main-table" 4619 id="main-table"
4510 // tableStyle={{backgroundColor:'red'}} 4620 // tableStyle={{backgroundColor:'red'}}
src/pages/Order/OrderWarning/index.tsx
@@ -205,6 +205,7 @@ const OrderPage = () =&gt; { @@ -205,6 +205,7 @@ const OrderPage = () =&gt; {
205 const [subOrderCount, setSubOrderCount] = useState(0); 205 const [subOrderCount, setSubOrderCount] = useState(0);
206 const [sorted, setSorted] = useState(false); 206 const [sorted, setSorted] = useState(false);
207 const mainTableRef = useRef<ActionType>(); 207 const mainTableRef = useRef<ActionType>();
  208 + const mainTableRef2 = useRef<ActionType>();
208 const mainTableFormRef = useRef<ProFormInstance>(); 209 const mainTableFormRef = useRef<ProFormInstance>();
209 let [searchParams, setSearchParam] = useState(Object); //表格的查询条件存储 210 let [searchParams, setSearchParam] = useState(Object); //表格的查询条件存储
210 const [messageApi, contextHolder] = message.useMessage(); 211 const [messageApi, contextHolder] = message.useMessage();
@@ -253,6 +254,7 @@ const OrderPage = () =&gt; { @@ -253,6 +254,7 @@ const OrderPage = () =&gt; {
253 254
254 const refreshTable = () => { 255 const refreshTable = () => {
255 mainTableRef.current?.reload(); 256 mainTableRef.current?.reload();
  257 + mainTableRef2.current?.reload();
256 //刷新表格数据的时候,取消选中行 258 //刷新表格数据的时候,取消选中行
257 setSelectedRows([]); 259 setSelectedRows([]);
258 setSelectedSubOrderKeys([]); 260 setSelectedSubOrderKeys([]);
@@ -3870,6 +3872,8 @@ const OrderPage = () =&gt; { @@ -3870,6 +3872,8 @@ const OrderPage = () =&gt; {
3870 if (res && res.result === RESPONSE_CODE.SUCCESS) { 3872 if (res && res.result === RESPONSE_CODE.SUCCESS) {
3871 message.success('推送成功'); 3873 message.success('推送成功');
3872 mainTableRef.current.reload(); 3874 mainTableRef.current.reload();
  3875 + mainTableRef2.current.reload();
  3876 +
3873 } 3877 }
3874 }} 3878 }}
3875 /> 3879 />
@@ -3892,6 +3896,7 @@ const OrderPage = () =&gt; { @@ -3892,6 +3896,7 @@ const OrderPage = () =&gt; {
3892 if (res && res.result === RESPONSE_CODE.SUCCESS) { 3896 if (res && res.result === RESPONSE_CODE.SUCCESS) {
3893 message.success('下推成功'); 3897 message.success('下推成功');
3894 mainTableRef.current.reload(); 3898 mainTableRef.current.reload();
  3899 + mainTableRef2.current.reload();
3895 } 3900 }
3896 }} 3901 }}
3897 /> 3902 />
@@ -4616,6 +4621,7 @@ const OrderPage = () =&gt; { @@ -4616,6 +4621,7 @@ const OrderPage = () =&gt; {
4616 params.statusDatetimeLe = null; 4621 params.statusDatetimeLe = null;
4617 } else { 4622 } else {
4618 params.statusDatetimeLe = calDate; 4623 params.statusDatetimeLe = calDate;
  4624 + console.log(params.statusDatetimeLe, '5656params.statusDatetimeLe1');
4619 } 4625 }
4620 console.log(params, '5656paramsFlush'); 4626 console.log(params, '5656paramsFlush');
4621 setSearchParam(params); 4627 setSearchParam(params);
@@ -4656,7 +4662,7 @@ const OrderPage = () =&gt; { @@ -4656,7 +4662,7 @@ const OrderPage = () =&gt; {
4656 // 监听 calDate 变化,触发请求 4662 // 监听 calDate 变化,触发请求
4657 useEffect(() => { 4663 useEffect(() => {
4658 if (calDate2) { 4664 if (calDate2) {
4659 - mainTableRef.current?.reload(); 4665 + mainTableRef2.current?.reload();
4660 } 4666 }
4661 }, [calDate2]); 4667 }, [calDate2]);
4662 4668
@@ -4667,13 +4673,14 @@ const OrderPage = () =&gt; { @@ -4667,13 +4673,14 @@ const OrderPage = () =&gt; {
4667 sorter, 4673 sorter,
4668 filter, 4674 filter,
4669 ) => { 4675 ) => {
4670 - params.orderStatus = 'CONFIRM_INVOICE'; 4676 + // params.orderStatus = 'CONFIRM_INVOICE';
4671 params.paymentMethod = 'UNPAID'; 4677 params.paymentMethod = 'UNPAID';
4672 params.salesCode = userInfo.username; 4678 params.salesCode = userInfo.username;
4673 if (calDate2 === 'null') { 4679 if (calDate2 === 'null') {
4674 params.statusDatetimeLe = null; 4680 params.statusDatetimeLe = null;
4675 } else { 4681 } else {
4676 params.statusDatetimeLe = calDate2; 4682 params.statusDatetimeLe = calDate2;
  4683 + console.log(params.statusDatetimeLe, '5656params.statusDatetimeLe2')
4677 } 4684 }
4678 //订单id处理 4685 //订单id处理
4679 /** 4686 /**
@@ -4702,6 +4709,8 @@ const OrderPage = () =&gt; { @@ -4702,6 +4709,8 @@ const OrderPage = () =&gt; {
4702 //是否只查看已作废 4709 //是否只查看已作废
4703 params.isDeleteQueryOrder = filterCondifion === 70; 4710 params.isDeleteQueryOrder = filterCondifion === 70;
4704 params.paymentNotReceipt = true; 4711 params.paymentNotReceipt = true;
  4712 + console.log(params, '5656paramsFlush2');
  4713 +
4705 //保存这个搜索条件 4714 //保存这个搜索条件
4706 setSearchParam(params); 4715 setSearchParam(params);
4707 4716
@@ -5364,7 +5373,7 @@ const OrderPage = () =&gt; { @@ -5364,7 +5373,7 @@ const OrderPage = () =&gt; {
5364 id="main-table" 5373 id="main-table"
5365 // tableStyle={{backgroundColor:'red'}} 5374 // tableStyle={{backgroundColor:'red'}}
5366 5375
5367 - actionRef={mainTableRef} 5376 + actionRef={mainTableRef2}
5368 formRef={mainTableFormRef} 5377 formRef={mainTableFormRef}
5369 expandIconColumnIndex={-1} 5378 expandIconColumnIndex={-1}
5370 columns={mainOrdersColumns} 5379 columns={mainOrdersColumns}
@@ -5959,7 +5968,7 @@ const OrderPage = () =&gt; { @@ -5959,7 +5968,7 @@ const OrderPage = () =&gt; {
5959 return ( 5968 return (
5960 <div className="order-page-container"> 5969 <div className="order-page-container">
5961 <div id="resizeDiv"></div> 5970 <div id="resizeDiv"></div>
5962 - <Modal 5971 + {/* <Modal
5963 title="订单预警提醒" 5972 title="订单预警提醒"
5964 open={open} 5973 open={open}
5965 width={800} 5974 width={800}
@@ -6047,7 +6056,7 @@ const OrderPage = () =&gt; { @@ -6047,7 +6056,7 @@ const OrderPage = () =&gt; {
6047 <p>1、从订单确认收货之日起,超过5天未和客户确认发票(不开票的订单除外)的订单将会进行第一次提醒;超过15天未和客户确认发票(不开票的订单除外)的订单将会每天进行一次提醒,并限制下单功能</p> 6056 <p>1、从订单确认收货之日起,超过5天未和客户确认发票(不开票的订单除外)的订单将会进行第一次提醒;超过15天未和客户确认发票(不开票的订单除外)的订单将会每天进行一次提醒,并限制下单功能</p>
6048 <p>2、从发票确认之日起,超过15天未确认回款的订单将会进行第一次提醒,超过25天未确认回款的订单将会每天进行一次提醒,并限制下单功能</p> 6057 <p>2、从发票确认之日起,超过15天未确认回款的订单将会进行第一次提醒,超过25天未确认回款的订单将会每天进行一次提醒,并限制下单功能</p>
6049 </div> 6058 </div>
6050 - </Modal> 6059 + </Modal> */}
6051 <Tabs 6060 <Tabs
6052 defaultActiveKey="1" 6061 defaultActiveKey="1"
6053 items={tabsItems} 6062 items={tabsItems}