Commit 32033702ee4919647063c23bcbbe48aeb47fc74c
Merge remote-tracking branch 'origin/bug_fix'
Showing
2 changed files
with
20 additions
and
8 deletions
src/pages/performance/DataImport/components/DetailList.tsx
... | ... | @@ -46,7 +46,7 @@ export default function TableList({ indicator }: Props) { |
46 | 46 | { |
47 | 47 | title: '月度', |
48 | 48 | dataIndex: 'dataDate', |
49 | - align:'center', | |
49 | + align: 'center', | |
50 | 50 | width: 200, |
51 | 51 | key: 'dataDate', |
52 | 52 | render: (time: number) => (time ? moment(time).format('YYYY-MM') : '--'), |
... | ... | @@ -55,7 +55,7 @@ export default function TableList({ indicator }: Props) { |
55 | 55 | title: '门店', |
56 | 56 | dataIndex: 'shopName', |
57 | 57 | width: 300, |
58 | - align:'center', | |
58 | + align: 'center', | |
59 | 59 | key: 'shopName', |
60 | 60 | render: (name) => <span>{name || '--'}</span>, |
61 | 61 | }, |
... | ... | @@ -63,7 +63,7 @@ export default function TableList({ indicator }: Props) { |
63 | 63 | title: '打分', |
64 | 64 | dataIndex: 'score', |
65 | 65 | width: 100, |
66 | - align:'center', | |
66 | + align: 'center', | |
67 | 67 | key: 'score', |
68 | 68 | render: (name) => <span>{name || '--'}</span>, |
69 | 69 | }, |
... | ... | @@ -71,7 +71,7 @@ export default function TableList({ indicator }: Props) { |
71 | 71 | title: '总分', |
72 | 72 | key: 'totalScore', |
73 | 73 | width: 100, |
74 | - align:'center', | |
74 | + align: 'center', | |
75 | 75 | dataIndex: 'totalScore', |
76 | 76 | render: (name) => <span>{name || '--'}</span>, |
77 | 77 | }, |
... | ... | @@ -79,13 +79,13 @@ export default function TableList({ indicator }: Props) { |
79 | 79 | title: '打分人员', |
80 | 80 | key: 'graderStaffName', |
81 | 81 | width: 200, |
82 | - align:'center', | |
82 | + align: 'center', | |
83 | 83 | dataIndex: 'graderStaffName', |
84 | 84 | render: (name) => <span>{name || '--'}</span>, |
85 | 85 | }, |
86 | 86 | ]; |
87 | 87 | useEffect(() => { |
88 | - if(indicator?.code){ | |
88 | + if (indicator?.code) { | |
89 | 89 | run({ |
90 | 90 | pageSize: 10, |
91 | 91 | current: 1, |
... | ... | @@ -98,7 +98,13 @@ export default function TableList({ indicator }: Props) { |
98 | 98 | return ( |
99 | 99 | <> |
100 | 100 | <div style={{ display: 'flex' }}> |
101 | - <DatePicker value={monthly?moment(monthly):undefined} onChange={pickMonth} picker="month" style={{ marginRight: 20 }} /> | |
101 | + <DatePicker | |
102 | + value={monthly ? moment(monthly) : undefined} | |
103 | + disabledDate={(currentDate) => moment().startOf('month').valueOf() < currentDate.startOf('month').valueOf()} | |
104 | + onChange={pickMonth} | |
105 | + picker="month" | |
106 | + style={{ marginRight: 20 }} | |
107 | + /> | |
102 | 108 | <Select allowClear style={{ width: 200, marginRight: 20 }} placeholder="请选择门店" onChange={shopChange}> |
103 | 109 | {(data || []).map((shop) => ( |
104 | 110 | <Select.Option value={shop.id} key={shop.id}> | ... | ... |
src/pages/performance/DataImport/components/ImportList.tsx
... | ... | @@ -283,7 +283,13 @@ export default function TableList({ indicator }: Props) { |
283 | 283 | return ( |
284 | 284 | <> |
285 | 285 | <div style={{ display: 'flex' }}> |
286 | - <DatePicker value={monthly ? moment(monthly) : undefined} onChange={pickMonth} picker="month" style={{ marginRight: 20 }} /> | |
286 | + <DatePicker | |
287 | + value={monthly ? moment(monthly) : undefined} | |
288 | + disabledDate={(currentDate) => moment().startOf('month').valueOf() < currentDate.startOf('month').valueOf()} | |
289 | + onChange={pickMonth} | |
290 | + picker="month" | |
291 | + style={{ marginRight: 20 }} | |
292 | + /> | |
287 | 293 | <Select allowClear style={{ width: 245, marginRight: 20 }} placeholder="请选择门店" onChange={shopChange}> |
288 | 294 | {(data || []).map((shop) => ( |
289 | 295 | <Select.Option value={shop.id} key={shop.id}> | ... | ... |