|
@@ -14,6 +14,7 @@ const _sfc_main = {
|
|
|
currentTab: 0,
|
|
currentTab: 0,
|
|
|
loading: false,
|
|
loading: false,
|
|
|
noMore: false,
|
|
noMore: false,
|
|
|
|
|
+ pageNum: 1,
|
|
|
tabs: ["全部", "已撤销", "待审核", "已驳回", "待签批", "生产中", "已完成"],
|
|
tabs: ["全部", "已撤销", "待审核", "已驳回", "待签批", "生产中", "已完成"],
|
|
|
allOrders: [],
|
|
allOrders: [],
|
|
|
displayList: [],
|
|
displayList: [],
|
|
@@ -45,6 +46,7 @@ const _sfc_main = {
|
|
|
refresh() {
|
|
refresh() {
|
|
|
this.displayList = [];
|
|
this.displayList = [];
|
|
|
this.noMore = false;
|
|
this.noMore = false;
|
|
|
|
|
+ this.pageNum = 1;
|
|
|
this.loadData();
|
|
this.loadData();
|
|
|
},
|
|
},
|
|
|
onReachEnd() {
|
|
onReachEnd() {
|
|
@@ -57,15 +59,14 @@ const _sfc_main = {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
try {
|
|
try {
|
|
|
const params = {
|
|
const params = {
|
|
|
- pageNum: 1,
|
|
|
|
|
- // 简易处理,先加载第一页
|
|
|
|
|
- pageSize: 50
|
|
|
|
|
|
|
+ pageNum: this.pageNum,
|
|
|
|
|
+ pageSize: 5
|
|
|
};
|
|
};
|
|
|
if (this.currentTab > 0) {
|
|
if (this.currentTab > 0) {
|
|
|
const tabToStatus = [void 0, -1, 0, 1, 2, 3, 4];
|
|
const tabToStatus = [void 0, -1, 0, 1, 2, 3, 4];
|
|
|
params.status = tabToStatus[this.currentTab];
|
|
params.status = tabToStatus[this.currentTab];
|
|
|
}
|
|
}
|
|
|
- const res = await api_erp_order.listOrder(params);
|
|
|
|
|
|
|
+ const res = await api_erp_order.listMyOrder(params);
|
|
|
const rows = res.rows || [];
|
|
const rows = res.rows || [];
|
|
|
const formattedRows = rows.map((item) => {
|
|
const formattedRows = rows.map((item) => {
|
|
|
const statusMap = {
|
|
const statusMap = {
|
|
@@ -94,7 +95,8 @@ const _sfc_main = {
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
this.displayList = [...this.displayList, ...formattedRows];
|
|
this.displayList = [...this.displayList, ...formattedRows];
|
|
|
- this.noMore = this.displayList.length >= (res.total || 0);
|
|
|
|
|
|
|
+ this.pageNum++;
|
|
|
|
|
+ this.noMore = rows.length === 0 || this.displayList.length >= (res.total || 0);
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
common_vendor.index.__f__("error", "at pages/order/list/index.vue:203", "加载订单列表失败", e);
|
|
common_vendor.index.__f__("error", "at pages/order/list/index.vue:203", "加载订单列表失败", e);
|
|
|
common_vendor.index.showToast({ title: e || "加载订单列表失败", icon: "none" });
|
|
common_vendor.index.showToast({ title: e || "加载订单列表失败", icon: "none" });
|
|
@@ -145,8 +147,7 @@ const _sfc_main = {
|
|
|
};
|
|
};
|
|
|
if (!Array) {
|
|
if (!Array) {
|
|
|
const _component_erp_nav_bar = common_vendor.resolveComponent("erp-nav-bar");
|
|
const _component_erp_nav_bar = common_vendor.resolveComponent("erp-nav-bar");
|
|
|
- const _component_erp_tab_bar = common_vendor.resolveComponent("erp-tab-bar");
|
|
|
|
|
- (_component_erp_nav_bar + _component_erp_tab_bar)();
|
|
|
|
|
|
|
+ _component_erp_nav_bar();
|
|
|
}
|
|
}
|
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
return common_vendor.e({
|
|
return common_vendor.e({
|
|
@@ -206,13 +207,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
}, $data.displayList.length === 0 && !$data.loading ? {} : {}, {
|
|
}, $data.displayList.length === 0 && !$data.loading ? {} : {}, {
|
|
|
i: $options.scrollHeight,
|
|
i: $options.scrollHeight,
|
|
|
j: common_vendor.o((...args) => $options.onReachEnd && $options.onReachEnd(...args), "57"),
|
|
j: common_vendor.o((...args) => $options.onReachEnd && $options.onReachEnd(...args), "57"),
|
|
|
- k: common_vendor.p({
|
|
|
|
|
- active: "order"
|
|
|
|
|
- }),
|
|
|
|
|
- l: $data.auditHistoryVisible
|
|
|
|
|
|
|
+ k: $data.auditHistoryVisible
|
|
|
}, $data.auditHistoryVisible ? common_vendor.e({
|
|
}, $data.auditHistoryVisible ? common_vendor.e({
|
|
|
- m: common_vendor.o(($event) => $data.auditHistoryVisible = false, "51"),
|
|
|
|
|
- n: common_vendor.f($data.auditHistoryList, (item, idx, i0) => {
|
|
|
|
|
|
|
+ l: common_vendor.o(($event) => $data.auditHistoryVisible = false, "6e"),
|
|
|
|
|
+ m: common_vendor.f($data.auditHistoryList, (item, idx, i0) => {
|
|
|
return common_vendor.e({
|
|
return common_vendor.e({
|
|
|
a: common_vendor.n(item.auditResult === 1 ? "pass" : "reject"),
|
|
a: common_vendor.n(item.auditResult === 1 ? "pass" : "reject"),
|
|
|
b: common_vendor.t(item.auditResult === 1 ? "通过" : "驳回"),
|
|
b: common_vendor.t(item.auditResult === 1 ? "通过" : "驳回"),
|
|
@@ -226,11 +224,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
h: idx
|
|
h: idx
|
|
|
});
|
|
});
|
|
|
}),
|
|
}),
|
|
|
- o: $data.auditHistoryList.length === 0
|
|
|
|
|
|
|
+ n: $data.auditHistoryList.length === 0
|
|
|
}, $data.auditHistoryList.length === 0 ? {} : {}, {
|
|
}, $data.auditHistoryList.length === 0 ? {} : {}, {
|
|
|
- p: common_vendor.o(() => {
|
|
|
|
|
- }, "db"),
|
|
|
|
|
- q: common_vendor.o(($event) => $data.auditHistoryVisible = false, "0a")
|
|
|
|
|
|
|
+ o: common_vendor.o(() => {
|
|
|
|
|
+ }, "5a"),
|
|
|
|
|
+ p: common_vendor.o(($event) => $data.auditHistoryVisible = false, "e0")
|
|
|
}) : {});
|
|
}) : {});
|
|
|
}
|
|
}
|
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8504eca3"]]);
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8504eca3"]]);
|