zhoulisen 5 years ago
parent
commit
ef3012d59f
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/pages/customer/customerlist/index.jsx

+ 5
- 1
src/pages/customer/customerlist/index.jsx View File

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