* 更新系统 Logo

* 显示版本号和构建时间在系统底部
* 订单根据状态分组展示
dev/timezone
Jimmy Liow 1 year ago
parent 84b17cc982
commit 49e738e16d

Binary file not shown.

@ -4,6 +4,7 @@ SELECT
opi_sn,COUNT(*)
FROM whatsapp_session
where opi_sn is not null and opi_sn not in (29,383,404,227)
AND (last_send_time >= '2024-4-15' AND last_send_time <= '2024-4-21')
GROUP by opi_sn
) session_count

@ -1,6 +1,6 @@
.logo {
float: left;
height: 36px;
margin: 16px 24px 16px 0;
height: 68px;
margin: 0 6px 0 0;
background: rgba(255, 255, 255, 0.3);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -40,9 +40,7 @@ const MaintenancePage = () => {
打开系统
</button>
<p>Version: {__BUILD_VERSION__}</p>
<p>
Build Date: {__BUILD_DATE__}&nbsp;&nbsp;<span>GMT+00:00</span>
</p>
<p>Build Date: {__BUILD_DATE__}</p>
</div>
</>
);

@ -8,7 +8,7 @@ import { useEffect, useState } from 'react'
import { Link, NavLink, Outlet, useHref } from 'react-router-dom'
import '@/assets/App.css'
import AppLogo from '@/assets/logo-gh.png'
import AppLogo from '@/assets/highlights_travel_300_300.png'
import 'react-chat-elements/dist/main.css'
import ReloadPrompt from './ReloadPrompt';
import ClearCache from './ClearCache';
@ -61,6 +61,9 @@ function DesktopApp() {
return () => clearInterval(interval);
}, [totalNotify, isTitleVisible]);
const __BUILD_DATE__ = `__BUILD_DATE__`;
const __BUILD_VERSION__ = `__BUILD_VERSION__`;
return (
<Layout>
<Header className='header' style={{ position: 'sticky', top: 0, zIndex: 2, width: '100%', background: 'white' }}>
@ -138,7 +141,7 @@ function DesktopApp() {
<Outlet />
</Content>
</Layout>
<Footer>桂林海纳国际旅行社有限公司</Footer>
<Footer>桂林海纳国际旅行社有限公司 Version: {__BUILD_VERSION__}({__BUILD_DATE__})</Footer>
</Layout>
);
}

@ -1,6 +1,6 @@
import { useEffect } from 'react';
import '@/assets/App.css';
import AppLogo from '@/assets/logo-gh.png';
import AppLogo from '@/assets/highlights_travel_300_300.png';
import { useThemeContext } from '@/stores/ThemeContext';
import useAuthStore from '@/stores/AuthStore';
import { Col, Layout, Row, Typography, theme, Space, Avatar, Dropdown, Flex } from 'antd';

@ -10,9 +10,9 @@ import {
DatePicker,
Empty,
Flex, Form, Input,
Radio, Row,
Radio, Row, Typography,
Select, Space, Switch, Table,
Tabs,
Tabs, Divider,
Tag, Tooltip
} from 'antd'
import dayjs from 'dayjs'
@ -21,6 +21,7 @@ import { Link } from 'react-router-dom'
import { useShallow } from 'zustand/react/shallow'
const { RangePicker } = DatePicker
const { Title } = Typography
const AdvanceSearchForm = memo(function noName({ initialValues, onSubmit }) {
@ -195,19 +196,16 @@ function OrderGroupTable({ formValues }) {
{
title: '订单状态',
dataIndex: 'COLI_State',
width: 120,
width: 140,
render: (text, record) => {
// 1<InfoCircleTwoTone />2<MessageTwoTone />345<PhoneTwoTone />6<MailTwoTone />
const needTo = '要催信' + (record.coli_ordertype - 2)
let statusIcon = ''
if (record.coli_ordertype === 1) statusIcon = <Tooltip title='新订单'><InfoCircleTwoTone /></Tooltip>
else if (record.coli_ordertype === 2) statusIcon = <Tooltip title='新消息'><MessageTwoTone /></Tooltip>
else if (record.coli_ordertype === 3 || record.coli_ordertype === 4 || record.coli_ordertype === 5) statusIcon = <Tooltip title={needTo}><PhoneTwoTone /></Tooltip>
else if (record.coli_ordertype === 6) statusIcon = <Tooltip title='老邮件'><MailTwoTone /></Tooltip>
let extra = ''
if (record.coli_ordertype === 3 || record.coli_ordertype === 4 || record.coli_ordertype === 5) {
extra = '(' + (record.coli_ordertype - 2) + '催)'
}
return (
<Space>
{statusIcon}
{extra}
{text}
</Space>
)
@ -347,13 +345,73 @@ function OrderGroupTable({ formValues }) {
deptKeys.forEach((deptNo, index) => {
const deptOrderList = groupOrderData[deptNo]
// 123456
const newOrderList = deptOrderList.filter((o) => {
return o.coli_ordertype === 1
})
const newMsgList = deptOrderList.filter((o) => {
return o.coli_ordertype === 2
})
const followUpList = deptOrderList.filter((o) => {
return o.coli_ordertype === 3 || o.coli_ordertype === 4 || o.coli_ordertype === 5
})
const paymentList = deptOrderList.filter((o) => {
return o.coli_ordertype === 1000
})
const entryList = deptOrderList.filter((o) => {
return o.coli_ordertype === 20000
})
deptItems.push(
{
key: index,
label: deptMap.get(deptNo),
children: <Table key={'Order Table' + deptNo} loading={loading} dataSource={deptOrderList}
columns={orderColumns}
pagination={deptOrderList.length <= 10 ? false : paginationProps} />
children: <>
<Divider orientation='left'>新订单</Divider>
<Conditional
condition={newOrderList.length > 0}
whenTrue={<Table key={'newOrderTable' + deptNo} loading={loading} dataSource={newOrderList}
columns={orderColumns}
pagination={deptOrderList.length <= 10 ? false : paginationProps} />}
whenFalse={<Empty />}
/>
<Divider orientation='left'>新消息/老邮件</Divider>
<Conditional
condition={newMsgList.length > 0}
whenTrue={<Table key={'newMsgTable' + deptNo} loading={loading} dataSource={newMsgList}
columns={orderColumns}
pagination={deptOrderList.length <= 10 ? false : paginationProps} />}
whenFalse={<Empty />}
/>
<Divider orientation='left'>催信</Divider>
<Conditional
condition={followUpList.length > 0}
whenTrue={<Table key={'followUpTable' + deptNo} loading={loading} dataSource={followUpList}
columns={orderColumns}
pagination={deptOrderList.length <= 10 ? false : paginationProps} />}
whenFalse={<Empty />}
/>
<Divider orientation='left'>余款收付</Divider>
<Conditional
condition={paymentList.length > 0}
whenTrue={<Table key={'paymentTable' + deptNo} loading={loading} dataSource={paymentList}
columns={orderColumns}
pagination={deptOrderList.length <= 10 ? false : paginationProps} />}
whenFalse={<Empty />}
/>
<Divider orientation='left'>入境提醒</Divider>
<Conditional
condition={entryList.length > 0}
whenTrue={<Table key={'entryTable' + deptNo} loading={loading} dataSource={entryList}
columns={orderColumns}
pagination={deptOrderList.length <= 10 ? false : paginationProps} /> }
whenFalse={<Empty />}
/>
</>
}
)
})

@ -3,12 +3,15 @@ import react from '@vitejs/plugin-react';
import WindiCSS from 'vite-plugin-windicss';
import { VitePWA } from 'vite-plugin-pwa';
import packageJson from './package.json';
import dayjs from 'dayjs'
const today = new dayjs().format('YYYY-MM-DD HH:mm:ss')
const buildDatePlugin = () => {
return {
transformIndexHtml(html) {
const dataString = new Date().toISOString();
return html.replace(/%BUILD_VERSION%/, `${packageJson.version}(${dataString})`);
return html.replace(/%BUILD_VERSION%/, `${packageJson.version}(${today})`);
},
};
};
@ -106,10 +109,11 @@ const manifestForPlugIn = {
orientation: 'portrait',
},
};
// https://vitejs.dev/config/
export default defineConfig({
define: {
__BUILD_DATE__: JSON.stringify(`${new Date().toISOString()}`),
__BUILD_DATE__: JSON.stringify(`${today}`),
__BUILD_VERSION__: JSON.stringify(`${packageJson.version}`),
},
plugins: [react(), WindiCSS(), buildDatePlugin(), VitePWA(manifestForPlugIn)],

Loading…
Cancel
Save