|
|
|
|
@ -15,13 +15,12 @@ import { stores_Context } from '../../config';
|
|
|
|
|
import { useShallow } from 'zustand/shallow';
|
|
|
|
|
import useToBOrderStore, { orderCountDataMapper, orderCountDataFieldMapper } from '../../zustand/ToBOrder';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const ToBOrder = observer(() => {
|
|
|
|
|
const { date_picker_store: searchFormStore } = useContext(stores_Context);
|
|
|
|
|
|
|
|
|
|
const [searchValues, setSearchValues] = useToBOrderStore(useShallow((state) => [state.searchValues, state.setSearchValues]));
|
|
|
|
|
const [activeTab, setActiveTab] = useToBOrderStore(useShallow((state) => [state.activeTab, state.setActiveTab]));
|
|
|
|
|
const [loading, typeLoading, onTabChange] = useToBOrderStore(useShallow((state) => [state.loading, state.typeLoading,state.onTabChange]));
|
|
|
|
|
const [loading, typeLoading, onTabChange] = useToBOrderStore(useShallow((state) => [state.loading, state.typeLoading, state.onTabChange]));
|
|
|
|
|
|
|
|
|
|
const orderCountDataRaw = useToBOrderStore((state) => state.orderCountDataRaw);
|
|
|
|
|
const [orderCountDataLines, avgLineValue] = useToBOrderStore(useShallow((state) => [state.orderCountDataLines, state.avgLineValue]));
|
|
|
|
|
@ -274,7 +273,7 @@ const ToBOrder = observer(() => {
|
|
|
|
|
...searchValues,
|
|
|
|
|
},
|
|
|
|
|
//
|
|
|
|
|
shows: ['DateType', 'WebCode','IncludeTickets', 'DepartmentList', 'dates'],
|
|
|
|
|
shows: ['DateType', 'WebCode', 'IncludeTickets', 'DepartmentList', 'dates'],
|
|
|
|
|
fieldProps: {
|
|
|
|
|
DepartmentList: { show_all: false, mode: 'multiple' },
|
|
|
|
|
WebCode: { show_all: false, mode: 'multiple' },
|
|
|
|
|
@ -349,14 +348,16 @@ const ToBOrder = observer(() => {
|
|
|
|
|
<Spin spinning={typeLoading}>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col sm={24} lg={12}>
|
|
|
|
|
<Pie {...pieConfig} data={result?.ordercount1 || []} innerRadius={0.6} statistic={{title: false,content:{content:'数量'}}} />
|
|
|
|
|
<Pie {...pieConfig} data={result?.ordercount1 || []} angleField='YJLYx' innerRadius={0.6} statistic={{title: false,content:{content:'预计毛利'}}} />
|
|
|
|
|
<Pie {...pieConfig} data={result?.ordercount1 || []} innerRadius={0.6} statistic={{ title: false, content: { content: '数量' } }} />
|
|
|
|
|
<Pie {...pieConfig} data={result?.ordercount1 || []} angleField="YJLYx" innerRadius={0.6} statistic={{ title: false, content: { content: '预计毛利' } }} />
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
|
|
{showDiff && <Col sm={24} lg={12}>
|
|
|
|
|
<Pie {...pieConfig} data={result?.ordercount2 || []} innerRadius={0.6} statistic={{title: false,content:{content:'数量'}}} />
|
|
|
|
|
<Pie {...pieConfig} data={result?.ordercount2 || []} angleField='YJLYx' innerRadius={0.6} statistic={{title: false,content:{content:'预计毛利'}}} />
|
|
|
|
|
</Col>}
|
|
|
|
|
{showDiff && (
|
|
|
|
|
<Col sm={24} lg={12}>
|
|
|
|
|
<Pie {...pieConfig} data={result?.ordercount2 || []} innerRadius={0.6} statistic={{ title: false, content: { content: '数量' } }} />
|
|
|
|
|
<Pie {...pieConfig} data={result?.ordercount2 || []} angleField="YJLYx" innerRadius={0.6} statistic={{ title: false, content: { content: '预计毛利' } }} />
|
|
|
|
|
</Col>
|
|
|
|
|
)}
|
|
|
|
|
</Row>
|
|
|
|
|
</Spin>
|
|
|
|
|
</div>
|
|
|
|
|
|