174 lines
8.5 KiB
JavaScript
174 lines
8.5 KiB
JavaScript
"use strict";
|
|
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_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_sticky + _easycom_nut_tag + _easycom_z_paging)();
|
|
}
|
|
const _sfc_main = {
|
|
__name: "list",
|
|
setup(__props) {
|
|
const day = common_vendor.ref("");
|
|
common_vendor.onLoad((options) => {
|
|
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:172", day.value);
|
|
const params = {
|
|
page: pageNo,
|
|
pageSize: 10,
|
|
date: day.value
|
|
};
|
|
api_index.fetchDayOrderList(params).then((res) => {
|
|
common_vendor.index.__f__("log", "at pages/data/list.vue:179", res);
|
|
paging.value.complete(res.list);
|
|
}).catch((res) => {
|
|
paging.value.complete(false);
|
|
});
|
|
};
|
|
common_vendor.onShow(() => {
|
|
if (paging.value) {
|
|
paging.value.refresh();
|
|
}
|
|
});
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
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-2-" + i0 + ",2c2d73a5-1",
|
|
c: common_vendor.p({
|
|
plain: true,
|
|
type: "primary"
|
|
})
|
|
} : {
|
|
e: "2c2d73a5-3-" + i0 + ",2c2d73a5-1",
|
|
f: common_vendor.p({
|
|
plain: true,
|
|
type: "warning"
|
|
})
|
|
}, {
|
|
d: order.order_type == 2,
|
|
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-4-" + i0 + ",2c2d73a5-1",
|
|
j: common_vendor.p({
|
|
["custom-color"]: "#ffc209"
|
|
})
|
|
} : {}, {
|
|
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-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-6-" + i0 + ",2c2d73a5-1",
|
|
r: common_vendor.p({
|
|
plain: true,
|
|
type: "success"
|
|
})
|
|
} : {}, {
|
|
o: ((_g = order == null ? void 0 : order.status) == null ? void 0 : _g.value) == 2,
|
|
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-7-" + i0 + ",2c2d73a5-1",
|
|
w: common_vendor.p({
|
|
plain: true,
|
|
["custom-color"]: "#fa2400"
|
|
}),
|
|
x: ((_k = order == null ? void 0 : order.fee_type) == null ? void 0 : _k.value) == 0 || ((_l = order == null ? void 0 : order.fee_type) == null ? void 0 : _l.value) == 3
|
|
}, ((_m = order == null ? void 0 : order.fee_type) == null ? void 0 : _m.value) == 0 || ((_n = order == null ? void 0 : order.fee_type) == null ? void 0 : _n.value) == 3 ? {} : ((_o = order == null ? void 0 : order.fee_type) == null ? void 0 : _o.value) == 1 || ((_p = order == null ? void 0 : order.fee_type) == null ? void 0 : _p.value) == 2 ? {
|
|
z: common_vendor.t(order == null ? void 0 : order.fee_combo_name)
|
|
} : {}, {
|
|
y: ((_q = order == null ? void 0 : order.fee_type) == null ? void 0 : _q.value) == 1 || ((_r = order == null ? void 0 : order.fee_type) == null ? void 0 : _r.value) == 2,
|
|
A: ((_s = order == null ? void 0 : order.fee_type) == null ? void 0 : _s.value) == 0 || ((_t = order == null ? void 0 : order.fee_type) == null ? void 0 : _t.value) == 3
|
|
}, ((_u = order == null ? void 0 : order.fee_type) == null ? void 0 : _u.value) == 0 || ((_v = order == null ? void 0 : order.fee_type) == null ? void 0 : _v.value) == 3 ? {
|
|
B: common_vendor.t(order == null ? void 0 : order.fee_amount)
|
|
} : ((_w = order == null ? void 0 : order.fee_type) == null ? void 0 : _w.value) == 1 || ((_x = order == null ? void 0 : order.fee_type) == null ? void 0 : _x.value) == 2 ? {
|
|
D: common_vendor.t(order == null ? void 0 : order.fee_combo_price)
|
|
} : {}, {
|
|
C: ((_y = order == null ? void 0 : order.fee_type) == null ? void 0 : _y.value) == 1 || ((_z = order == null ? void 0 : order.fee_type) == null ? void 0 : _z.value) == 2,
|
|
E: common_vendor.t((_A = order == null ? void 0 : order.fee_pay_status) == null ? void 0 : _A.text)
|
|
}) : {}, {
|
|
F: order.over_often > 0
|
|
}, order.over_often > 0 ? {
|
|
G: "2c2d73a5-8-" + i0 + ",2c2d73a5-1",
|
|
H: common_vendor.p({
|
|
plain: true,
|
|
["custom-color"]: "#fa2400"
|
|
}),
|
|
I: common_vendor.t(order == null ? void 0 : order.over_often),
|
|
J: common_vendor.t(order == null ? void 0 : order.over_amount),
|
|
K: common_vendor.t((_B = order == null ? void 0 : order.over_pay_status) == null ? void 0 : _B.text)
|
|
} : {}, {
|
|
L: common_vendor.f(order.goods, (goods, iidx, i1) => {
|
|
return {
|
|
a: common_vendor.t(goods.goods_type_name),
|
|
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),
|
|
f: iidx
|
|
};
|
|
}),
|
|
M: common_vendor.t(order == null ? void 0 : order.discount_amount),
|
|
N: common_vendor.t(order == null ? void 0 : order.discount_amount),
|
|
O: order.remarks
|
|
}, order.remarks ? {} : {}, {
|
|
P: order.remarks
|
|
}, order.remarks ? {
|
|
Q: common_vendor.t(order.remarks)
|
|
} : {}, {
|
|
R: common_vendor.t(order.create_time),
|
|
S: common_vendor.t((_C = order == null ? void 0 : order.user) == null ? void 0 : _C.staff_name),
|
|
T: index
|
|
});
|
|
}),
|
|
d: common_vendor.p({
|
|
plain: true,
|
|
["custom-color"]: "#fa2400"
|
|
}),
|
|
e: common_vendor.sr(paging, "2c2d73a5-1", {
|
|
"k": "paging"
|
|
}),
|
|
f: common_vendor.o(queryList),
|
|
g: common_vendor.o(($event) => dataList.value = $event),
|
|
h: common_vendor.p({
|
|
fixed: false,
|
|
modelValue: dataList.value
|
|
})
|
|
};
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2c2d73a5"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/data/list.js.map
|