|
|
@ -2,7 +2,7 @@ import { NavLink, useNavigate } from "react-router-dom";
|
|
|
|
import { useEffect, useState } from "react";
|
|
|
|
import { useEffect, useState } from "react";
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
import { toJS } from "mobx";
|
|
|
|
import { toJS } from "mobx";
|
|
|
|
import { Row, Col, Space, Button, Table, Input, DatePicker, Typography, App, Steps } from "antd";
|
|
|
|
import { Row, Col, Space, Button, Table, Input, DatePicker, Typography, App, Steps ,Select } from "antd";
|
|
|
|
import { useStore } from "@/stores/StoreContext.js";
|
|
|
|
import { useStore } from "@/stores/StoreContext.js";
|
|
|
|
import * as config from "@/config";
|
|
|
|
import * as config from "@/config";
|
|
|
|
import { formatDate, isNotEmpty } from "@/utils/commons";
|
|
|
|
import { formatDate, isNotEmpty } from "@/utils/commons";
|
|
|
@ -14,6 +14,7 @@ function Index() {
|
|
|
|
const { authStore, invoiceStore } = useStore();
|
|
|
|
const { authStore, invoiceStore } = useStore();
|
|
|
|
const { invoiceList, search_date_start, search_date_end } = invoiceStore;
|
|
|
|
const { invoiceList, search_date_start, search_date_end } = invoiceStore;
|
|
|
|
const [groupNo, onGroupNoChange] = useState("");
|
|
|
|
const [groupNo, onGroupNoChange] = useState("");
|
|
|
|
|
|
|
|
const [OrderType, onOrderTypeChange] = useState(0); //订单状态搜索
|
|
|
|
const navigate = useNavigate();
|
|
|
|
const navigate = useNavigate();
|
|
|
|
const { notification } = App.useApp();
|
|
|
|
const { notification } = App.useApp();
|
|
|
|
const showTotal = total => `Total ${invoiceList.length} items`;
|
|
|
|
const showTotal = total => `Total ${invoiceList.length} items`;
|
|
|
@ -76,7 +77,7 @@ function Index() {
|
|
|
|
<Space direction="vertical" style={{ width: "100%" }}>
|
|
|
|
<Space direction="vertical" style={{ width: "100%" }}>
|
|
|
|
<Title level={3}></Title>
|
|
|
|
<Title level={3}></Title>
|
|
|
|
<Row gutter={16}>
|
|
|
|
<Row gutter={16}>
|
|
|
|
<Col md={24} lg={6} xxl={4}>
|
|
|
|
<Col md={24} lg={4} xxl={4}>
|
|
|
|
<Input
|
|
|
|
<Input
|
|
|
|
placeholder="Reference Number"
|
|
|
|
placeholder="Reference Number"
|
|
|
|
onChange={e => {
|
|
|
|
onChange={e => {
|
|
|
@ -84,17 +85,53 @@ function Index() {
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
<Col md={24} lg={2} xxl={3}>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Select
|
|
|
|
|
|
|
|
defaultValue="Status"
|
|
|
|
|
|
|
|
style={{
|
|
|
|
|
|
|
|
width: 240,
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
onChange={ value => {onOrderTypeChange(value);}}
|
|
|
|
|
|
|
|
options={[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '0',
|
|
|
|
|
|
|
|
label: 'Status',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '1',
|
|
|
|
|
|
|
|
label: 'Not submitted',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '2',
|
|
|
|
|
|
|
|
label: 'Submitted',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '3',
|
|
|
|
|
|
|
|
label: 'Travel advisor approved',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '4',
|
|
|
|
|
|
|
|
label: 'Finance Dept arrproved',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '5',
|
|
|
|
|
|
|
|
label: 'Paid',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
]}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
<Col md={24} lg={8} xxl={6}>
|
|
|
|
<Col md={24} lg={8} xxl={6}>
|
|
|
|
<Space direction="horizontal">
|
|
|
|
<Space direction="horizontal">
|
|
|
|
Arrival Date
|
|
|
|
Arrival Date
|
|
|
|
<DatePicker.RangePicker format={config.DATE_FORMAT} allowClear={false} style={{ width: "100%" }} value={[search_date_start, search_date_end]} presets={config.DATE_PRESETS} onChange={invoiceStore.onDateRangeChange} />
|
|
|
|
<DatePicker.RangePicker format={config.DATE_FORMAT} allowClear={true} style={{ width: "100%" }} defaultValue={[search_date_start, search_date_end]} presets={config.DATE_PRESETS} onChange={invoiceStore.onDateRangeChange} allowEmpty={true} />
|
|
|
|
</Space>
|
|
|
|
</Space>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
<Col md={24} lg={4} xxl={4}>
|
|
|
|
<Col md={24} lg={4} xxl={4}>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
loading={invoiceStore.loading}
|
|
|
|
loading={invoiceStore.loading}
|
|
|
|
onClick={() => invoiceStore.fetchInvoiceList(authStore.login.travelAgencyId, groupNo, search_date_start.format(config.DATE_FORMAT), search_date_end.format(config.DATE_FORMAT))}>
|
|
|
|
onClick={() => invoiceStore.fetchInvoiceList(authStore.login.travelAgencyId, groupNo, search_date_start.format(config.DATE_FORMAT), search_date_end.format(config.DATE_FORMAT),OrderType)}>
|
|
|
|
Search
|
|
|
|
Search
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
@ -118,3 +155,4 @@ function Index() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default observer(Index);
|
|
|
|
export default observer(Index);
|
|
|
|
|
|
|
|
//value={[search_date_start, search_date_end]} 20230803 zp 去掉日期默认可以清空
|