Commit 574d9d6c authored by hangjun83's avatar hangjun83

1、增加任务删除功能

parent b6ac6bd4
...@@ -144,6 +144,9 @@ export const addSorderRefundTask = (params) => { ...@@ -144,6 +144,9 @@ export const addSorderRefundTask = (params) => {
export const editSorderRefundTask = (params) => { export const editSorderRefundTask = (params) => {
return postRequest('/tools/bh/editSorderRefundTask', params) return postRequest('/tools/bh/editSorderRefundTask', params)
} }
export const delSorderRefundTask = (params) => {
return postRequest('/tools/bh/delSorderRefundTask', params)
}
export const getBhSordersDataDetail = (params) => { export const getBhSordersDataDetail = (params) => {
return postRequest('/tools/bh/getBhSordersDetail', params) return postRequest('/tools/bh/getBhSordersDetail', params)
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
.tree-list { .tree-list {
position: relative; position: relative;
min-height: 80px; min-height: 50px;
} }
.drawer-footer { .drawer-footer {
......
.search { .search {
.operation { .operation {
margin-bottom: 2vh; margin-bottom: 2vh;
height: 80vh;
overflow-y: auto; overflow-y: auto;
} }
.content { .content {
margin-bottom: 2vh; margin-bottom: 2vh;
height: 80vh; height: 56vh;
width: 50vw; width: 50vw;
} }
......
...@@ -363,7 +363,7 @@ ...@@ -363,7 +363,7 @@
position: relative; position: relative;
margin: 10px 0px 0px; margin: 10px 0px 0px;
background-color: #fff; background-color: #fff;
border: 1px; border: 0px;
.ivu-table-wrapper { .ivu-table-wrapper {
border: 0px; border: 0px;
...@@ -371,7 +371,7 @@ ...@@ -371,7 +371,7 @@
.ivu-table-border td { .ivu-table-border td {
border-color: #f9f9f9; border-color: #f9f9f9;
height: 120px; height: 70px;
} }
.ivu-table-tip td { .ivu-table-tip td {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<Row> <Row>
<Button @click="add" type="primary" size="large" icon="md-add">添加任务</Button> <Button @click="add" type="primary" size="large" icon="md-add">添加任务</Button>
</Row> </Row>
<Table :loading="loading" class="tableInfoBox" stripe :columns="columns" :data="data" sortable="custom" ref="table"></Table> <Table border :loading="loading" class="tableInfoBox" stripe :columns="columns" :data="data" sortable="custom" ref="table"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
...@@ -86,7 +86,8 @@ import { ...@@ -86,7 +86,8 @@ import {
execBhSordersRefundTask, execBhSordersRefundTask,
getSorderRefundTaskLogs, getSorderRefundTaskLogs,
getBhSordersDetail, getBhSordersDetail,
editSorderRefundTask editSorderRefundTask,
delSorderRefundTask
} from "@/api/index"; } from "@/api/index";
import util from "@/libs/util.js"; import util from "@/libs/util.js";
export default { export default {
...@@ -226,8 +227,9 @@ export default { ...@@ -226,8 +227,9 @@ export default {
render: (h, params) => { render: (h, params) => {
let execJob = ""; let execJob = "";
let edit = ""; let edit = "";
let del = "";
if (params.row.status != 'finish') { if (params.row.status != 'finish') {
execJob = h( execJob = h("span",[h(
"a", { "a", {
on: { on: {
click: () => { click: () => {
...@@ -236,32 +238,48 @@ export default { ...@@ -236,32 +238,48 @@ export default {
}, },
}, },
"手动执行" "手动执行"
); ),
h("divider", {
props: {
type: "vertical",
},
}),
]);
} }
if (params.row.status == 'notexec') { if (params.row.status == 'notexec') {
edit = h( edit = h("span", [h(
"a", {
on: {
click: () => {
this.edit(params.row);
},
},
}, "编辑"
),
h("divider", {
props: {
type: "vertical",
},
}),
h(
"a", { "a", {
on: { on: {
click: () => { click: () => {
this.edit(params.row); this.del(params.row);
}, },
}, },
}, "编辑" }, "删除"
) ),
h("divider", {
props: {
type: "vertical",
},
}),
]);
} }
return h("div", [ return h("div", [
execJob, execJob,
h("divider", {
props: {
type: "vertical",
},
}),
edit, edit,
h("divider", {
props: {
type: "vertical",
},
}),
h( h(
"a", { "a", {
on: { on: {
...@@ -553,6 +571,25 @@ export default { ...@@ -553,6 +571,25 @@ export default {
}, },
}); });
}, },
del(v) {
this.$Modal.confirm({
title: "确认删除该记录",
content: "您确认要删除该任务? 执行后数据不可恢复",
loading: true,
onOk: () => {
this.form.taskId = v.id
delSorderRefundTask(this.form).then((res) => {
this.submitLoading = false;
this.$Modal.remove();
if (res.status == 'success') {
this.$Message.success("操作成功");
this.$emit("on-submit", true);
}
this.getDataList()
});
},
});
},
edit(v) { edit(v) {
// 转换null为"" // 转换null为""
for (let attr in v) { for (let attr in v) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment