Bladeren bron

新需求

魏超 5 jaren geleden
bovenliggende
commit
520e02982d
3 gewijzigde bestanden met toevoegingen van 24 en 4 verwijderingen
  1. 0
    1
      src/pages/eContract/businessConfig/add.jsx
  2. 19
    3
      src/pages/eContract/businessConfig/list.jsx
  3. 5
    0
      src/services/apis.js

+ 0
- 1
src/pages/eContract/businessConfig/add.jsx Bestand weergeven

@@ -66,7 +66,6 @@ const header = props => {
66 66
     setContractTemplateName(e.name)
67 67
     request({ ...apis.taEcontract.taContractTemplateById, urlData: {id: e.id} }).then((data) => {
68 68
       setContractTemplateLink(data.contractTemplateAddress)
69
-      console.log(contractTemplateLink,'dddddddddd')
70 69
     })
71 70
   }
72 71
 

+ 19
- 3
src/pages/eContract/businessConfig/list.jsx Bestand weergeven

@@ -18,7 +18,7 @@ const header = props => {
18 18
   const sampleName = props.location.query.sampleName;
19 19
   const [data, setData] = useState({})
20 20
   const [demend, setDemend] = useState({})
21
-  const [demandIds, setDemandIds] = useState([])
21
+  const [contractBusinessList, setContractBusinessList] = useState([])
22 22
   const [batchDel, setBatchDel] = useState({visable:false,demandIds:''})
23 23
   const [addDemand, setAddDemand] = useState({visable:false})
24 24
 
@@ -126,7 +126,7 @@ const header = props => {
126 126
   const rowSelection = {
127 127
     onChange: (selectedRowKeys, selectedRows) => {
128 128
       console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
129
-      setDemandIds(selectedRows)
129
+      setContractBusinessList(selectedRows)
130 130
     },
131 131
   };
132 132
 
@@ -162,6 +162,22 @@ const header = props => {
162 162
     }
163 163
   }
164 164
 
165
+  function batchDelTaContractBusiness(){
166
+    Modal.confirm({
167
+      title: '确认将所选的' + contractBusinessList.length + '条业务配置删除?',
168
+      okText: '确认',
169
+      cancelText: '取消',
170
+      onOk () {
171
+        request({ ...apis.taEcontract.batchDelTaContractBusiness, data: {contractBusinessList} }).then((data) => {
172
+          message.info('操作成功!')
173
+          getList({ pageNum: 1, pageSize: 10 })
174
+        }).catch((err) => {
175
+          console.log('111111', err)
176
+        })
177
+      }
178
+    });
179
+  }
180
+
165 181
   function addContractManage(){
166 182
     router.push({
167 183
       pathname: '/eContract/businessConfig/add',
@@ -232,7 +248,7 @@ const header = props => {
232 248
         <Button type="danger" onClick={() => addContractManage()} className={styles.addBtn}>新增</Button>
233 249
       </AuthButton>
234 250
       <AuthButton name="admin.h5Demand.del" noRight={null}>
235
-        <Button type="primary" onClick={() => showBatchDel({visable:true, demandIds: demandIds})} className={styles.addBtn} style={{marginLeft:'30px'}}>删除</Button>
251
+        <Button type="primary" onClick={() => batchDelTaContractBusiness()} className={styles.addBtn} style={{marginLeft:'30px'}}>删除</Button>
236 252
       </AuthButton>
237 253
       <Table rowSelection={rowSelection}
238 254
         style={{marginTop:'30px'}} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />

+ 5
- 0
src/services/apis.js Bestand weergeven

@@ -1482,6 +1482,11 @@ export default {
1482 1482
       url: `${prefix}/taContractBusiness/:id`,
1483 1483
       action: 'admin.taContractBusiness.put',
1484 1484
     },
1485
+    batchDelTaContractBusiness: {
1486
+      method: 'PUT',
1487
+      url: `${prefix}/batchDelBusinessConfig`,
1488
+      action: 'admin.taContractBusiness.del',
1489
+    },
1485 1490
     taContractBusinessById: {
1486 1491
       method: 'GET',
1487 1492
       url: `${prefix}/taContractBusiness/:id`,