Authored by shuaiguo

feat(退款申请): 增加删除提示

... ... @@ -39,7 +39,7 @@
@on-page-change="fetchData"
:onSelect="onSelect">
<template slot="footer" class="btns">
<i-button type="warning" @click="onBatchDelete()">批量删除</i-button>
<i-button type="warning" @click="onDelete()">批量删除</i-button>
</template>
</LayoutTable>
... ... @@ -128,7 +128,6 @@
</Form>
</Modal>
</LayoutContent>
</template>
... ... @@ -278,7 +277,7 @@ export default {
return (
<div>
{row.refundStatus == 1 ? <Button type="success" size="small" onClick={() => this.onEdit(row, true, true)}>编辑</Button> : null}
{row.refundStatus == 1 ? <Button type="error" size="small" style="margin-left: 8px" onClick={() => this.onDelete(row.id)}>删除</Button> : null }
{row.refundStatus == 1 ? <Button type="error" size="small" style="margin-left: 8px" onClick={() => this.onDelete([row.id])}>删除</Button> : null }
</div>
);
}
... ... @@ -365,6 +364,16 @@ export default {
onSelect(items) {
this.selectedIds = items.map(item=> item.id);
},
onDelete(ids) {
this.$Modal.confirm({
render: h => {
return h('div', {}, '确定删除?');
},
onOk: () => {
this.onBatchDelete(ids)
}
})
},
onBatchDelete(ids = []) {
if(this.selectedIds.length) {
ids = this.selectedIds;
... ... @@ -381,9 +390,6 @@ export default {
}
})
},
onDelete(id) {
this.onBatchDelete([id])
},
handleSubmit(name) {
this.$refs[name].validate((valid)=> {
if (valid) {
... ... @@ -412,10 +418,7 @@ export default {
onExport() {
this.$Loading.start();
api._get('/ufoPlatform/refundRecord/export', {
param: {
method: '',
param: api._2params(this.filterParam)
}
param: api._2params(this.filterParam)
}, {
responseType: 'blob'
}).then(result => {
... ...