|
|
@@ -7,6 +7,8 @@ import { dayjsFormat } from '@/utils/utils'
|
|
|
import OptionSelect from '../../components/OptionSelect'
|
|
|
import { queryCustomerAdditionList } from '@/services/statistic'
|
|
|
|
|
|
+const { Option } = Select
|
|
|
+const { RangePicker } = DatePicker
|
|
|
const CustomerAdditions = () => {
|
|
|
const [state, setState] = useState({
|
|
|
params: {
|
|
|
@@ -17,11 +19,10 @@ const CustomerAdditions = () => {
|
|
|
},
|
|
|
list: []
|
|
|
})
|
|
|
- const { Option } = Select
|
|
|
- const { RangePicker } = DatePicker
|
|
|
+
|
|
|
const [type, setType] = useState('month')
|
|
|
const tRef = useRef(null)
|
|
|
- const optionChange = (type, ids) =>
|
|
|
+ const handleOptionChange = (type, ids) =>
|
|
|
setState({ ...state, params: { ...state.params, optionType: type, dataIds: ids } })
|
|
|
const columns = [
|
|
|
{
|
|
|
@@ -60,7 +61,7 @@ const CustomerAdditions = () => {
|
|
|
pagination={false}
|
|
|
bordered
|
|
|
toolbar={{
|
|
|
- title: [<OptionSelect onChange={optionChange} type="CustomerAdditions" key="op" multiple={false} />],
|
|
|
+ title: [<OptionSelect onChange={handleOptionChange} type="CustomerAdditions" key="op" multiple={false} />],
|
|
|
actions: [
|
|
|
<Space key="id">
|
|
|
<Select value={type} onChange={setType}>
|