|
|
|
@ -15,8 +15,7 @@ import { useShallow } from 'zustand/react/shallow'
|
|
|
|
|
|
|
|
|
|
const { RangePicker } = DatePicker
|
|
|
|
|
|
|
|
|
|
// eslint-disable-next-line react/display-name
|
|
|
|
|
const AdvanceSearchForm = memo(function ({ initialValues, onSubmit }) {
|
|
|
|
|
const AdvanceSearchForm = memo(function noName({ initialValues, onSubmit }) {
|
|
|
|
|
|
|
|
|
|
const DATE_RANGE_PRESETS = [
|
|
|
|
|
{
|
|
|
|
@ -43,11 +42,14 @@ const AdvanceSearchForm = memo(function ({ initialValues, onSubmit }) {
|
|
|
|
|
label: '本年',
|
|
|
|
|
value: [dayjs().startOf('y'), dayjs().endOf('y')],
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
const [form] = Form.useForm()
|
|
|
|
|
|
|
|
|
|
function handleSubmit(values) {
|
|
|
|
|
onSubmit?.(values)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Form
|
|
|
|
|
layout={'vertical'}
|
|
|
|
@ -217,6 +219,7 @@ function OrderGroupTable({ formValues }) {
|
|
|
|
|
dataIndex: 'COLI_Introduction',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
const { notification } = App.useApp()
|
|
|
|
|
const [loading, setLoading] = useState(false)
|
|
|
|
|
const { orderList, fetchOrderList } = useOrderStore()
|
|
|
|
@ -306,11 +309,11 @@ function OrderGroupTable({ formValues }) {
|
|
|
|
|
|
|
|
|
|
const groupOrderData = groupByParam(orderList, 'OPI_DEI_SN')
|
|
|
|
|
const deptKeys = Object.keys(groupOrderData)
|
|
|
|
|
const collapseItems = []
|
|
|
|
|
const deptItems = []
|
|
|
|
|
|
|
|
|
|
deptKeys.forEach((deptNo, index) => {
|
|
|
|
|
const deptOrderList = groupOrderData[deptNo]
|
|
|
|
|
collapseItems.push(
|
|
|
|
|
deptItems.push(
|
|
|
|
|
{
|
|
|
|
|
key: index,
|
|
|
|
|
label: deptMap.get(deptNo),
|
|
|
|
@ -321,11 +324,13 @@ function OrderGroupTable({ formValues }) {
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return (<Conditional
|
|
|
|
|
condition={orderList.length > 0}
|
|
|
|
|
whenTrue={<Tabs defaultActiveKey={0} items={collapseItems} />}
|
|
|
|
|
whenFalse={<Empty />}
|
|
|
|
|
/>)
|
|
|
|
|
return (
|
|
|
|
|
<Conditional
|
|
|
|
|
condition={orderList.length > 0}
|
|
|
|
|
whenTrue={<Tabs defaultActiveKey={0} items={deptItems} />}
|
|
|
|
|
whenFalse={<Empty />}
|
|
|
|
|
/>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function OrderFollow() {
|
|
|
|
|