feat: 财务>文旅局服务人数
parent
1c2c7c28c6
commit
7af50f0e9e
@ -0,0 +1,27 @@
|
||||
{
|
||||
"get|/inbound_person_num/test": {
|
||||
"errcode": 0,
|
||||
"errmsg": "",
|
||||
"data": null,
|
||||
"loading": null,
|
||||
"resultTotal": {
|
||||
"orgz": "@integer(10,99)",
|
||||
"orgzPDays": "@integer(10,99)",
|
||||
"hosts": "@integer(10,99)",
|
||||
"hostsPDays": "@integer(10,99)",
|
||||
"IndividualService": "@integer(10,99)",
|
||||
"groupsKey": "0",
|
||||
"groupsLabel": "总"
|
||||
},
|
||||
"result|10": [
|
||||
{
|
||||
"orgz": "@integer(10,99)",
|
||||
"orgzPDays": "@integer(10,99)",
|
||||
"hosts": "@integer(10,99)",
|
||||
"hostsPDays": "@integer(10,99)",
|
||||
"groupsKey": "@id",
|
||||
"groupsLabel": "@region"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
import { useContext } from 'react';
|
||||
import { observer } from 'mobx-react';
|
||||
import { stores_Context } from '../config';
|
||||
import { Spin, Table, Row, Col, Tabs } from 'antd';
|
||||
import SearchForm from './../components/search/SearchForm';
|
||||
import './kpi.css';
|
||||
|
||||
const apartOptions = [
|
||||
{ key: 'inbound', value: 'inbound', label: '入境' },
|
||||
{ key: 'outbound', value: 'outbound', label: '出境' },
|
||||
{ key: 'domestic', value: 'domestic', label: '国内' },
|
||||
];
|
||||
|
||||
export default observer((props) => {
|
||||
const { financial_store: financialStore, date_picker_store: searchFormStore } = useContext(stores_Context);
|
||||
const { formValues, formValuesToSub } = searchFormStore;
|
||||
const { servicePersonNum } = financialStore;
|
||||
const { curTab } = servicePersonNum;
|
||||
|
||||
const pageRefresh = (queryData = formValuesToSub) => {
|
||||
// console.log(queryData, 'qqqq');
|
||||
financialStore.getPersonNum(queryData);
|
||||
};
|
||||
|
||||
const columns = [
|
||||
{ title: '名称', dataIndex: 'groupsLabel' },
|
||||
{
|
||||
title: '人次数',
|
||||
children: [
|
||||
{ title: '外联', dataIndex: 'orgz' },
|
||||
{ title: '接待', dataIndex: 'hosts' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '人天',
|
||||
children: [
|
||||
{ title: '外联', dataIndex: 'orgzPDays' },
|
||||
{ title: '接待', dataIndex: 'hostsPDays' },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
<Row gutter={16} style={{ margin: '-16px -8px', position: 'sticky', top: 0, zIndex: 10 }}>
|
||||
<Col className="gutter-row" span={24}>
|
||||
<SearchForm
|
||||
defaultValue={{
|
||||
initialValue: {
|
||||
...formValues,
|
||||
DateType: { key: 'startDate', value: 'startDate', label: '走团日期' },
|
||||
},
|
||||
shows: ['DateType', 'dates'],
|
||||
fieldProps: {
|
||||
dates: { hide_vs: true },
|
||||
},
|
||||
}}
|
||||
onSubmit={(_err, obj, form, str) => {
|
||||
pageRefresh(obj);
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<section>
|
||||
<Tabs
|
||||
activeKey={curTab}
|
||||
onChange={(v) => {
|
||||
financialStore.setCurTab(v);
|
||||
pageRefresh();
|
||||
}}
|
||||
type="card"
|
||||
items={apartOptions.map((ele) => {
|
||||
return {
|
||||
...ele,
|
||||
children: (
|
||||
<Spin spinning={servicePersonNum[curTab].loading}>
|
||||
<Table
|
||||
id="table_to_xlsx_sale"
|
||||
dataSource={servicePersonNum[curTab].dataSource}
|
||||
rowKey='groupsKey'
|
||||
columns={columns}
|
||||
size="small"
|
||||
loading={servicePersonNum[curTab].loading}
|
||||
pagination={false}
|
||||
scroll={{ x: '100%' }}
|
||||
/>
|
||||
</Spin>
|
||||
),
|
||||
};
|
||||
})}
|
||||
/>
|
||||
</section>
|
||||
</>
|
||||
);
|
||||
});
|
Loading…
Reference in New Issue