Commit 574d9d6c authored by hangjun83's avatar hangjun83

1、增加任务删除功能

parent b6ac6bd4
......@@ -144,6 +144,9 @@ export const addSorderRefundTask = (params) => {
export const editSorderRefundTask = (params) => {
return postRequest('/tools/bh/editSorderRefundTask', params)
}
export const delSorderRefundTask = (params) => {
return postRequest('/tools/bh/delSorderRefundTask', params)
}
export const getBhSordersDataDetail = (params) => {
return postRequest('/tools/bh/getBhSordersDetail', params)
......
......@@ -28,7 +28,7 @@
.tree-list {
position: relative;
min-height: 80px;
min-height: 50px;
}
.drawer-footer {
......
.search {
.operation {
margin-bottom: 2vh;
height: 80vh;
overflow-y: auto;
}
.content {
margin-bottom: 2vh;
height: 80vh;
height: 56vh;
width: 50vw;
}
......
......@@ -363,7 +363,7 @@
position: relative;
margin: 10px 0px 0px;
background-color: #fff;
border: 1px;
border: 0px;
.ivu-table-wrapper {
border: 0px;
......@@ -371,7 +371,7 @@
.ivu-table-border td {
border-color: #f9f9f9;
height: 120px;
height: 70px;
}
.ivu-table-tip td {
......
......@@ -8,7 +8,7 @@
<Row>
<Button @click="add" type="primary" size="large" icon="md-add">添加任务</Button>
</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">
<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>
......@@ -86,7 +86,8 @@ import {
execBhSordersRefundTask,
getSorderRefundTaskLogs,
getBhSordersDetail,
editSorderRefundTask
editSorderRefundTask,
delSorderRefundTask
} from "@/api/index";
import util from "@/libs/util.js";
export default {
......@@ -226,8 +227,9 @@ export default {
render: (h, params) => {
let execJob = "";
let edit = "";
let del = "";
if (params.row.status != 'finish') {
execJob = h(
execJob = h("span",[h(
"a", {
on: {
click: () => {
......@@ -236,32 +238,48 @@ export default {
},
},
"手动执行"
);
),
h("divider", {
props: {
type: "vertical",
},
}),
]);
}
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", {
on: {
click: () => {
this.edit(params.row);
this.del(params.row);
},
},
}, "编辑"
)
}, "删除"
),
h("divider", {
props: {
type: "vertical",
},
}),
]);
}
return h("div", [
execJob,
h("divider", {
props: {
type: "vertical",
},
}),
edit,
h("divider", {
props: {
type: "vertical",
},
}),
h(
"a", {
on: {
......@@ -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) {
// 转换null为""
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