zhoulisen пре 5 година
родитељ
комит
ef3012d59f
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5
    1
      src/pages/customer/customerlist/index.jsx

+ 5
- 1
src/pages/customer/customerlist/index.jsx Прегледај датотеку

@@ -69,6 +69,8 @@ function body(props) {
69 69
 
70 70
   const [currentSelectedRows, setSelectedRows] = useState([])
71 71
 
72
+ const [ radio, setRadio] = useState(true)
73
+
72 74
   // const [page, setPage] = useState(1)
73 75
 
74 76
   // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -95,6 +97,7 @@ function body(props) {
95 97
     // 网路请求
96 98
     request({ ...apis.customer.customerRecommend, params: { ...params } }).then(res => {
97 99
       setDataSource(res)
100
+      setRadio(false)
98 101
     }).catch(err => {
99 102
       // eslint-disable-next-line no-unused-expressions
100 103
       <Alert
@@ -173,6 +176,7 @@ function body(props) {
173 176
     
174 177
     displayNone()
175 178
     setDataSource([])
179
+    setRadio(true)
176 180
     props.form.resetFields();
177 181
     const { value } = e.target
178 182
     setCustomerType(value)
@@ -630,7 +634,7 @@ function body(props) {
630 634
 
631 635
 
632 636
       <div style={{ margin: '20px 0' }}>
633
-        <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
637
+        <Radio.Group value={customerType} disabled={radio} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
634 638
           <Radio.Button value="private">私客</Radio.Button>
635 639
           <Radio.Button value="public">公客</Radio.Button>
636 640
         </Radio.Group>