|
@@ -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" />
|