Commit 5ea9a62a authored by hangjun83's avatar hangjun83

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

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