同步订单状态

This commit is contained in:
jianghanbo 2024-12-04 15:07:08 +08:00
parent f45ac13997
commit 4d61fda391
6 changed files with 25 additions and 20 deletions

View File

@ -856,14 +856,14 @@ export default {
}, },
async setMode() { async setMode() {
await this.getList(); await this.getList();
await this.setOneClickRepair(); // await this.setOneClickRepair();
await this.getList(); // await this.getList();
}, },
async setOneClickRepair() { async setOneClickRepair(notice = false) {
let arr = this.list.map((res) => { let arr = this.list.map((res) => {
return res.id; return res.id;
}); });
await this.onOneClickRepair({ id: arr.join() }); await this.onOneClickRepair({ id: arr.join() }, notice);
}, },
orderSort({ column, prop, order }) { orderSort({ column, prop, order }) {
if (column.order == 'ascending') { if (column.order == 'ascending') {
@ -881,7 +881,7 @@ export default {
console.log({ column, prop, order }); console.log({ column, prop, order });
this.getList(); this.getList();
}, },
async getList($is_excel) { async getList($is_excel, $refreash = 1) {
this.listQuery.excel = null; this.listQuery.excel = null;
if ($is_excel == 1) { if ($is_excel == 1) {
this.listQuery.excel = 1; this.listQuery.excel = 1;
@ -907,6 +907,9 @@ export default {
this.listLoading = false; this.listLoading = false;
this.isSynchronization = true; this.isSynchronization = true;
}); });
if ($refreash == 1) {
await this.setOneClickRepair();
}
}, },
objectToQuery(obj) { objectToQuery(obj) {
return Object.keys(obj) return Object.keys(obj)
@ -1107,22 +1110,24 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
onOneClickRepair(item) { onOneClickRepair(item, notice=false) {
this.$axios this.$axios
.post("/admin/order/oneClickRepair", { id: item.id }) .post("/admin/order/oneClickRepair", { id: item.id })
.then((res) => { .then((res) => {
if (notice) {
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "同步完成", message: "同步完成",
type: "success", type: "success",
}); });
// this.getList(); }
this.getList(0, 0);
}) })
.catch((err) => { .catch((err) => {
this.$notify.error({ // this.$notify.error({
title: "同步失败", // title: "",
message: err, // message: err,
}); // });
}); });
}, },
dyOrderConfirm(item, confirm_result) { dyOrderConfirm(item, confirm_result) {

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-f0395e36]{position:relative;padding-bottom:60px}.el-table[data-v-f0395e36],.filter-container[data-v-f0395e36]{padding-bottom:5px} .pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-a6440056]{position:relative;padding-bottom:60px}.el-table[data-v-a6440056],.filter-container[data-v-a6440056]{padding-bottom:5px}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long