处理订单

This commit is contained in:
2026-01-16 05:06:34 +08:00
parent 578189d316
commit 7bff4f6191
6 changed files with 49 additions and 57 deletions

View File

@@ -2,34 +2,42 @@
const common_vendor = require("../../common/vendor.js");
const api_index = require("../../api/index.js");
if (!Array) {
const _easycom_nut_sticky2 = common_vendor.resolveComponent("nut-sticky");
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
(_easycom_nut_tag2 + _easycom_z_paging2)();
(_easycom_nut_sticky2 + _easycom_nut_tag2 + _easycom_z_paging2)();
}
const _easycom_nut_sticky = () => "../../uni_modules/nutui-uni/components/sticky/sticky.js";
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
if (!Math) {
(_easycom_nut_tag + _easycom_z_paging)();
(_easycom_nut_sticky + _easycom_nut_tag + _easycom_z_paging)();
}
const _sfc_main = {
__name: "list",
setup(__props) {
const date = common_vendor.ref("");
const day = common_vendor.ref("");
common_vendor.onLoad((options) => {
date.value = options.date;
common_vendor.index.__f__("log", "at pages/data/list.vue:113", date.value);
day.value = options.date;
common_vendor.index.__f__("log", "at pages/data/list.vue:153", day.value);
});
const formatDate = (date) => {
const d = new Date(date);
const year = d.getFullYear();
const month = (d.getMonth() + 1).toString().padStart(2, "0");
return `${year}-${month}`;
};
const dataList = common_vendor.ref([]);
const paging = common_vendor.ref(null);
const queryList = (pageNo = 1, pageSize = 10) => {
common_vendor.index.__f__("log", "at pages/data/list.vue:126", date.value);
common_vendor.index.__f__("log", "at pages/data/list.vue:172", day.value);
const params = {
page: pageNo,
pageSize: 10,
date: date.value
date: day.value
};
api_index.fetchDayOrderList(params).then((res) => {
common_vendor.index.__f__("log", "at pages/data/list.vue:133", res);
common_vendor.index.__f__("log", "at pages/data/list.vue:179", res);
paging.value.complete(res.list);
}).catch((res) => {
paging.value.complete(false);
@@ -42,18 +50,20 @@ const _sfc_main = {
});
return (_ctx, _cache) => {
return {
a: common_vendor.f(dataList.value, (order, index, i0) => {
a: common_vendor.t(day.value),
b: common_vendor.t(formatDate(day.value)),
c: common_vendor.f(dataList.value, (order, index, i0) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C;
return common_vendor.e({
a: order.order_type == 1
}, order.order_type == 1 ? {
b: "2c2d73a5-1-" + i0 + ",2c2d73a5-0",
b: "2c2d73a5-2-" + i0 + ",2c2d73a5-1",
c: common_vendor.p({
plain: true,
type: "primary"
})
} : {
e: "2c2d73a5-2-" + i0 + ",2c2d73a5-0",
e: "2c2d73a5-3-" + i0 + ",2c2d73a5-1",
f: common_vendor.p({
plain: true,
type: "warning"
@@ -63,7 +73,7 @@ const _sfc_main = {
g: order.order_type == 1
}, order.order_type == 1 ? {
h: common_vendor.t((_a = order == null ? void 0 : order.rooms) == null ? void 0 : _a.room_name),
i: "2c2d73a5-3-" + i0 + ",2c2d73a5-0",
i: "2c2d73a5-4-" + i0 + ",2c2d73a5-1",
j: common_vendor.p({
["custom-color"]: "#ffc209"
})
@@ -71,14 +81,14 @@ const _sfc_main = {
k: ((_b = order == null ? void 0 : order.status) == null ? void 0 : _b.value) == 1
}, ((_c = order == null ? void 0 : order.status) == null ? void 0 : _c.value) == 1 ? {
l: common_vendor.t((_d = order == null ? void 0 : order.status) == null ? void 0 : _d.text),
m: "2c2d73a5-4-" + i0 + ",2c2d73a5-0",
m: "2c2d73a5-5-" + i0 + ",2c2d73a5-1",
n: common_vendor.p({
plain: true,
type: "danger"
})
} : ((_e = order == null ? void 0 : order.status) == null ? void 0 : _e.value) == 2 ? {
p: common_vendor.t((_f = order == null ? void 0 : order.status) == null ? void 0 : _f.text),
q: "2c2d73a5-5-" + i0 + ",2c2d73a5-0",
q: "2c2d73a5-6-" + i0 + ",2c2d73a5-1",
r: common_vendor.p({
plain: true,
type: "success"
@@ -88,7 +98,7 @@ const _sfc_main = {
s: order.order_type == 1 && ((_h = order == null ? void 0 : order.fee_type) == null ? void 0 : _h.value) != 0
}, order.order_type == 1 && ((_i = order == null ? void 0 : order.fee_type) == null ? void 0 : _i.value) != 0 ? common_vendor.e({
t: common_vendor.t((_j = order == null ? void 0 : order.fee_type) == null ? void 0 : _j.text),
v: "2c2d73a5-6-" + i0 + ",2c2d73a5-0",
v: "2c2d73a5-7-" + i0 + ",2c2d73a5-1",
w: common_vendor.p({
plain: true,
["custom-color"]: "#fa2400"
@@ -109,7 +119,7 @@ const _sfc_main = {
}) : {}, {
F: order.over_often > 0
}, order.over_often > 0 ? {
G: "2c2d73a5-7-" + i0 + ",2c2d73a5-0",
G: "2c2d73a5-8-" + i0 + ",2c2d73a5-1",
H: common_vendor.p({
plain: true,
["custom-color"]: "#fa2400"
@@ -121,7 +131,7 @@ const _sfc_main = {
L: common_vendor.f(order.goods, (goods, iidx, i1) => {
return {
a: common_vendor.t(goods.goods_type_name),
b: "2c2d73a5-8-" + i0 + "-" + i1 + ",2c2d73a5-0",
b: "2c2d73a5-9-" + i0 + "-" + i1 + ",2c2d73a5-1",
c: common_vendor.t(goods.goods_name),
d: common_vendor.t(goods == null ? void 0 : goods.goods_price),
e: common_vendor.t(goods == null ? void 0 : goods.goods_pay_status_txt),
@@ -141,16 +151,16 @@ const _sfc_main = {
T: index
});
}),
b: common_vendor.p({
d: common_vendor.p({
plain: true,
["custom-color"]: "#fa2400"
}),
c: common_vendor.sr(paging, "2c2d73a5-0", {
e: common_vendor.sr(paging, "2c2d73a5-1", {
"k": "paging"
}),
d: common_vendor.o(queryList),
e: common_vendor.o(($event) => dataList.value = $event),
f: common_vendor.p({
f: common_vendor.o(queryList),
g: common_vendor.o(($event) => dataList.value = $event),
h: common_vendor.p({
fixed: false,
modelValue: dataList.value
})