Commit 5ea9a62a authored by hangjun83's avatar hangjun83

1、修复分页功能 2、增加查看日志

parent 4f74f3b2
......@@ -146,6 +146,7 @@ export const getBhSordersDataDetail = (params) => {
}
export const getBhSordersRefundTask = (params) => {
params.type = 'sorder_refund'
return getRequest('/tools/bh/getBhSorderRefundTask', params)
}
......@@ -153,7 +154,10 @@ export const execBhSordersRefundTask = (params) => {
return postRequest('/tools/bh/execBhSorderRefundTask', params)
}
/*=================== 工具类相关接口 结束================================ */
export const getSorderRefundTaskLogs = (params) => {
return postRequest('/tools/bh/getSorderRefundTaskLogs', params)
}
// 加载数据
......
......@@ -308,6 +308,7 @@ export default {
},
changePage(v) {
this.searchForm.pageNumber = v;
this.searchForm.page = v;
this.getDataList();
this.clearSelectAll();
},
......
......@@ -298,6 +298,7 @@ export default {
},
changePage(v) {
this.searchForm.pageNumber = v;
this.searchForm.page = v;
this.getDataList();
this.clearSelectAll();
},
......@@ -328,6 +329,7 @@ export default {
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.page = 1;
this.searchForm.pageSize = 10;
this.searchForm.buttonAction = 'search'
this.getDataList();
......
......@@ -92,10 +92,12 @@ export default {
searchForm: {
pageNumber: 1,
pageSize: 10,
page:1,
},
searchSorderForm: {
pageNumber: 1,
pageSize: 10,
page:1,
},
formValidate: {
// 表单验证规则
......@@ -199,7 +201,7 @@ export default {
},
{
title: "更新日期",
key: "updatedat",
key: "updatedAt",
minWidth: 125,
},
{
......@@ -223,7 +225,7 @@ export default {
"手动执行"
);
}
/*if (params.row.status == 'notexec') {
if (params.row.status == 'notexec') {
edit = h(
"a", {
on: {
......@@ -234,14 +236,25 @@ export default {
},
"编辑"
);
}*/
}
return h("div", [
execJob,
/*h("Divider", {
h("Divider", {
props: {
type: "vertical",
},
}),*/
}),
edit,
h(
"a", {
on: {
click: () => {
this.showLog(params.row);
},
},
},
"查看日志"
)
]);
},
}
......@@ -414,6 +427,7 @@ export default {
this.searchData = res.data;
if (this.searchData.length == 0 && this.searchSorderForm.pageNumber > 1) {
this.searchSorderForm.pageNumber -= 1;
this.searchSorderForm.page = res.data.page
this.getSorderDetail();
}
}
......@@ -441,8 +455,8 @@ export default {
},
changePage(v) {
this.searchForm.pageNumber = v;
this.searchForm.page = v;
this.getDataList();
this.clearSelectAll();
},
changePageSize(v) {
this.searchForm.pageSize = v;
......@@ -468,6 +482,7 @@ export default {
this.$Message.success("操作成功");
this.$emit("on-submit", true);
this.showAddSorderTask = false;
this.getDataList()
}
});
}
......@@ -482,12 +497,13 @@ export default {
this.form.taskId = v.id
execBhSordersRefundTask(this.form).then((res) => {
this.submitLoading = false;
this.$Modal.remove();
if (res.status == 'success') {
this.$Message.success("操作成功");
this.$emit("on-submit", true);
this.showAddSorderTask = false;
this.getDataList()
}
this.getDataList()
});
},
});
......@@ -501,7 +517,6 @@ export default {
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
console.info(data)
let content = JSON.parse(data.execContent)
this.form.itemId = content.item_id
this.form.name = data.name
......@@ -511,6 +526,21 @@ export default {
this.showAddSorderTask = true;
},
showLog(v) {
this.searchLoading = true;
getSorderRefundTaskLogs({
'taskId': this.v.id
}).then((res) => {
this.searchLoading = false;
if (res.status == 'success') {
this.searchData = res.data;
if (this.searchData.length == 0 && this.searchSorderForm.pageNumber > 1) {
this.searchSorderForm.pageNumber -= 1;
this.getSorderDetail();
}
}
});
},
},
mounted() {
// 计算高度
......
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