处理订单

This commit is contained in:
2026-01-16 03:47:05 +08:00
parent ff07af055f
commit 3fb9b37708
14 changed files with 376 additions and 907 deletions

View File

@@ -5,15 +5,17 @@ if (!Array) {
const _easycom_nut_tabs2 = common_vendor.resolveComponent("nut-tabs");
const _easycom_nut_sticky2 = common_vendor.resolveComponent("nut-sticky");
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
(_easycom_nut_tabs2 + _easycom_nut_sticky2 + _easycom_nut_tag2 + _easycom_z_paging2)();
(_easycom_nut_tabs2 + _easycom_nut_sticky2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_z_paging2)();
}
const _easycom_nut_tabs = () => "../../uni_modules/nutui-uni/components/tabs/tabs.js";
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_nut_price = () => "../../uni_modules/nutui-uni/components/price/price.js";
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
if (!Math) {
(_easycom_nut_tabs + _easycom_nut_sticky + _easycom_nut_tag + _easycom_z_paging)();
(_easycom_nut_tabs + _easycom_nut_sticky + _easycom_nut_tag + _easycom_nut_price + _easycom_z_paging)();
}
const _sfc_main = {
__name: "index",
@@ -39,34 +41,19 @@ const _sfc_main = {
];
const dataList = common_vendor.ref([]);
const paging = common_vendor.ref(null);
common_vendor.ref(false);
common_vendor.ref(0);
common_vendor.ref(false);
common_vendor.ref(0);
common_vendor.ref("");
const onChangeTab = (item, idx) => {
current_tab_idx.value = idx;
paging.value.reload();
};
const navigateToDetail = (id) => {
common_vendor.index.__f__("log", "at pages/order/index.vue:277", id);
if (!id) {
common_vendor.index.__f__("warn", "at pages/order/index.vue:279", "导航ID不能为空");
return;
}
common_vendor.index.navigateTo({
url: `/pages/config/shopOrder/detail?id=${encodeURIComponent(id)}`
});
};
const queryList = (pageNo = 1, pageSize = 10) => {
common_vendor.index.__f__("log", "at pages/order/index.vue:317", tabs_config[current_tab_idx.value]["status"]);
common_vendor.index.__f__("log", "at pages/order/index.vue:164", tabs_config[current_tab_idx.value]["status"]);
const params = {
page: pageNo,
pageSize: 10,
status: tabs_config[current_tab_idx.value]["status"]
};
api_index.fetchOrderList(params).then((res) => {
common_vendor.index.__f__("log", "at pages/order/index.vue:324", res);
common_vendor.index.__f__("log", "at pages/order/index.vue:171", res);
paging.value.complete(res.list);
}).catch((res) => {
paging.value.complete(false);
@@ -96,38 +83,124 @@ const _sfc_main = {
modelValue: current_tab_idx.value
}),
d: common_vendor.f(dataList.value, (order, index, i0) => {
var _a;
return {
a: common_vendor.t(order.create_time),
b: common_vendor.t((_a = order == null ? void 0 : order.status) == null ? void 0 : _a.text),
c: "17a44f9d-3-" + i0 + ",17a44f9d-2",
d: common_vendor.f(order.goods, (goods, iidx, i1) => {
var _a2;
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: "17a44f9d-3-" + i0 + ",17a44f9d-2",
c: common_vendor.p({
plain: true,
type: "primary"
})
} : {
e: "17a44f9d-4-" + i0 + ",17a44f9d-2",
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: "17a44f9d-5-" + i0 + ",17a44f9d-2",
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: "17a44f9d-6-" + i0 + ",17a44f9d-2",
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: "17a44f9d-7-" + i0 + ",17a44f9d-2",
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: "17a44f9d-8-" + i0 + ",17a44f9d-2",
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: "17a44f9d-9-" + i0 + ",17a44f9d-2",
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: "17a44f9d-4-" + i0 + "-" + i1 + ",17a44f9d-2",
b: "17a44f9d-10-" + i0 + "-" + i1 + ",17a44f9d-2",
c: common_vendor.t(goods.goods_name),
d: common_vendor.t(goods == null ? void 0 : goods.goods_price),
e: common_vendor.t((_a2 = goods == null ? void 0 : goods.goods_pay_status) == null ? void 0 : _a2.text),
f: iidx,
g: common_vendor.o(($event) => navigateToDetail(order.order_id), iidx)
e: common_vendor.t(goods == null ? void 0 : goods.goods_pay_status_txt),
f: iidx
};
}),
e: index
};
M: "17a44f9d-11-" + i0 + ",17a44f9d-2",
N: common_vendor.p({
price: order.discount_amount,
size: "normal",
["need-symbol"]: true
}),
O: "17a44f9d-12-" + i0 + ",17a44f9d-2",
P: common_vendor.p({
price: order.total_price,
size: "normal",
["need-symbol"]: true
}),
Q: order.remarks
}, order.remarks ? {} : {}, {
R: order.remarks
}, order.remarks ? {
S: common_vendor.t(order.remarks)
} : {}, {
T: common_vendor.t(order.create_time),
U: common_vendor.t((_C = order == null ? void 0 : order.user) == null ? void 0 : _C.staff_name),
V: index
});
}),
e: common_vendor.p({
["custom-color"]: "#1a1a1a"
plain: true,
["custom-color"]: "#fa2400"
}),
f: common_vendor.p({
["custom-color"]: "#1a1a1a"
}),
g: common_vendor.sr(paging, "17a44f9d-2", {
f: common_vendor.sr(paging, "17a44f9d-2", {
"k": "paging"
}),
h: common_vendor.o(queryList),
i: common_vendor.o(($event) => dataList.value = $event),
j: common_vendor.p({
g: common_vendor.o(queryList),
h: common_vendor.o(($event) => dataList.value = $event),
i: common_vendor.p({
fixed: false,
modelValue: dataList.value
})

View File

@@ -5,6 +5,7 @@
"nut-tabs": "../../uni_modules/nutui-uni/components/tabs/tabs",
"nut-sticky": "../../uni_modules/nutui-uni/components/sticky/sticky",
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
"nut-price": "../../uni_modules/nutui-uni/components/price/price",
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
}
}

View File

@@ -1 +1 @@
<view class="page-content data-v-17a44f9d"><nut-sticky class="data-v-17a44f9d" u-s="{{['d']}}" u-i="17a44f9d-0" bind:__l="__l"><nut-tabs wx:if="{{c}}" class="data-v-17a44f9d" u-s="{{['titles']}}" u-i="17a44f9d-1,17a44f9d-0" bind:__l="__l" bindupdateModelValue="{{b}}" u-p="{{c}}"><view class="title-list data-v-17a44f9d" slot="titles"><view wx:for="{{a}}" wx:for-item="item" wx:key="b" class="{{['title-item', 'data-v-17a44f9d', item.c && 'tabs-active']}}" bindtap="{{item.d}}"><view class="nut-tabs__titles-item__text data-v-17a44f9d">{{item.a}}</view><view class="item__line data-v-17a44f9d"/></view></view></nut-tabs></nut-sticky><z-paging wx:if="{{j}}" u-s="{{['d']}}" u-r="paging" style="height:88vh" class="order-list r data-v-17a44f9d" bindquery="{{h}}" u-i="17a44f9d-2" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"><view wx:for="{{d}}" wx:for-item="order" wx:key="e" class="order-inner data-v-17a44f9d"><view class="order-inner-header data-v-17a44f9d"><text class="data-v-17a44f9d">{{order.a}}</text><nut-tag wx:if="{{e}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{order.c}}" bind:__l="__l" u-p="{{e}}">{{order.b}}</nut-tag></view><view wx:for="{{order.d}}" wx:for-item="goods" wx:key="f" class="goods-info-row data-v-17a44f9d" bindtap="{{goods.g}}"><view class="left-text data-v-17a44f9d"><view class="goods-name data-v-17a44f9d"><nut-tag wx:if="{{f}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{f}}">{{goods.a}}</nut-tag><text class="data-v-17a44f9d" style="margin-left:10rpx">{{goods.c}}</text></view></view><view class="price data-v-17a44f9d">{{goods.d}}</view><view class="goods-pay-status data-v-17a44f9d">{{goods.e}}</view></view><view class="footer data-v-17a44f9d"><view class="order-inner-action data-v-17a44f9d"><view class="data-v-17a44f9d" style="margin-left:10rpx"></view><view class="data-v-17a44f9d" style="margin-left:10rpx"></view><view class="data-v-17a44f9d" style="margin-left:10rpx"></view></view></view></view></z-paging></view>
<view class="page-content data-v-17a44f9d"><nut-sticky class="data-v-17a44f9d" u-s="{{['d']}}" u-i="17a44f9d-0" bind:__l="__l"><nut-tabs wx:if="{{c}}" class="data-v-17a44f9d" u-s="{{['titles']}}" u-i="17a44f9d-1,17a44f9d-0" bind:__l="__l" bindupdateModelValue="{{b}}" u-p="{{c}}"><view class="title-list data-v-17a44f9d" slot="titles"><view wx:for="{{a}}" wx:for-item="item" wx:key="b" class="{{['title-item', 'data-v-17a44f9d', item.c && 'tabs-active']}}" bindtap="{{item.d}}"><view class="nut-tabs__titles-item__text data-v-17a44f9d">{{item.a}}</view><view class="item__line data-v-17a44f9d"/></view></view></nut-tabs></nut-sticky><z-paging wx:if="{{i}}" u-s="{{['d']}}" u-r="paging" style="height:88vh" class="order-list r data-v-17a44f9d" bindquery="{{g}}" u-i="17a44f9d-2" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"><view wx:for="{{d}}" wx:for-item="order" wx:key="V" class="order-inner data-v-17a44f9d"><view class="order-inner-header data-v-17a44f9d"><nut-tag wx:if="{{order.a}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{order.b}}" bind:__l="__l" u-p="{{order.c}}">房间订单</nut-tag><nut-tag wx:else class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{order.e}}" bind:__l="__l" u-p="{{order.f||''}}">商品订单</nut-tag><nut-tag wx:if="{{order.g}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{order.i}}" bind:__l="__l" u-p="{{order.j}}">{{order.h}}</nut-tag><nut-tag wx:if="{{order.k}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{order.m}}" bind:__l="__l" u-p="{{order.n}}">{{order.l}}</nut-tag><nut-tag wx:elif="{{order.o}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{order.q}}" bind:__l="__l" u-p="{{order.r}}">{{order.p}}</nut-tag></view><view wx:if="{{order.s}}" class="goods-info-row data-v-17a44f9d"><view class="left-text data-v-17a44f9d"><view class="goods-name data-v-17a44f9d"><nut-tag wx:if="{{order.w}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{order.v}}" bind:__l="__l" u-p="{{order.w}}">{{order.t}}</nut-tag><text wx:if="{{order.x}}" class="data-v-17a44f9d" style="margin-left:10rpx"></text><text wx:elif="{{order.y}}" class="data-v-17a44f9d" style="margin-left:10rpx">{{order.z}}</text></view></view><view wx:if="{{order.A}}" class="price data-v-17a44f9d">{{order.B}}</view><view wx:elif="{{order.C}}" class="price data-v-17a44f9d">{{order.D}}</view><view class="goods-pay-status data-v-17a44f9d">{{order.E}}</view></view><view wx:if="{{order.F}}" class="goods-info-row data-v-17a44f9d"><view class="left-text data-v-17a44f9d"><view class="goods-name data-v-17a44f9d"><nut-tag wx:if="{{order.H}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{order.G}}" bind:__l="__l" u-p="{{order.H}}">超时</nut-tag><text class="data-v-17a44f9d" style="margin-left:10rpx">{{order.I}}小时</text></view></view><view class="price data-v-17a44f9d">{{order.J}}</view><view class="goods-pay-status data-v-17a44f9d">{{order.K}}</view></view><view wx:for="{{order.L}}" wx:for-item="goods" wx:key="f" class="goods-info-row data-v-17a44f9d"><view class="left-text data-v-17a44f9d"><view class="goods-name data-v-17a44f9d"><nut-tag wx:if="{{e}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{e}}">{{goods.a}}</nut-tag><text class="data-v-17a44f9d" style="margin-left:10rpx">{{goods.c}}</text></view></view><view class="price data-v-17a44f9d">{{goods.d}}</view><view class="goods-pay-status data-v-17a44f9d">{{goods.e}}</view></view><view class="footer data-v-17a44f9d"><view class="order-inner-price data-v-17a44f9d"><view class="data-v-17a44f9d">优惠:<nut-price wx:if="{{order.N}}" class="data-v-17a44f9d" u-i="{{order.M}}" bind:__l="__l" u-p="{{order.N}}"/></view><view class="data-v-17a44f9d">总计:<nut-price wx:if="{{order.P}}" class="data-v-17a44f9d" u-i="{{order.O}}" bind:__l="__l" u-p="{{order.P}}"/></view></view><view wx:if="{{order.Q}}" class="data-v-17a44f9d" style="padding-left:20rpx;font-size:26rpx">备注</view><view wx:if="{{order.R}}" class="remarks data-v-17a44f9d">{{order.S}}</view><view class="order-inner-price data-v-17a44f9d"><view class="data-v-17a44f9d" style="color:rgba(0, 0, 0, .5);font-size:24rpx">订单时间:{{order.T}}</view><view class="data-v-17a44f9d" style="color:rgba(0, 0, 0, .5);font-size:24rpx">员工:{{order.U}}</view></view></view></view></z-paging></view>

View File

@@ -52,101 +52,6 @@
min-height: 100vh;
background-color: #f2f3f5;
}
.order-popup .address-inner.data-v-17a44f9d {
display: flex;
flex-direction: column;
justify-content: center;
}
.order-popup .total-price-inner.data-v-17a44f9d {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.order-popup .total-price-inner view.data-v-17a44f9d:nth-child(2) {
color: #fa2c19;
}
.wechat-img-inner.data-v-17a44f9d {
margin-top: 60rpx;
padding: 0rpx 80rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.order-list.data-v-17a44f9d {
display: flex;
flex-direction: column;
width: 100%;
}
.order-inner.data-v-17a44f9d {
display: flex;
flex-direction: column;
background: #fff;
border-radius: 15rpx;
overflow: hidden;
margin: 20rpx;
/* 信息行布局 */
}
.order-inner .order-inner-header.data-v-17a44f9d {
display: flex;
align-items: center;
background-color: #dcdcdc;
color: rgba(0, 0, 0, 0.5);
font-size: 24rpx;
justify-content: space-between;
line-height: 45rpx;
padding: 15rpx 20rpx;
}
.order-inner .goods-info-row.data-v-17a44f9d {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx;
border-bottom: 2rpx solid #f2f3f5;
/* 左侧文字样式 */
/* 右侧价格样式 */
}
.order-inner .goods-info-row .left-text.data-v-17a44f9d {
flex: 1;
}
.order-inner .goods-info-row .goods-name.data-v-17a44f9d {
font-size: 28rpx;
color: #000000;
display: block;
}
.order-inner .goods-info-row .price.data-v-17a44f9d {
font-size: 26rpx;
margin-left: 20rpx;
align-self: center;
color: #fa2c19;
/* 垂直居中在两行文字之间 */
}
.order-inner .goods-info-row .goods-pay-status.data-v-17a44f9d {
font-size: 26rpx;
margin-left: 20rpx;
align-self: center;
}
.order-inner .footer.data-v-17a44f9d {
display: flex;
flex-direction: column;
}
.order-inner .footer .order-inner-price.data-v-17a44f9d {
display: flex;
justify-content: flex-end;
padding-top: 10rpx;
padding-right: 20rpx;
padding-bottom: 20rpx;
font-size: 24rpx;
align-items: center;
}
.order-inner .footer .order-inner-action.data-v-17a44f9d {
display: flex;
padding-top: 10rpx;
padding-bottom: 30rpx;
align-items: center;
justify-content: flex-end;
}
.title-list.data-v-17a44f9d {
display: flex;
justify-content: space-around;
@@ -179,4 +84,72 @@
height: 3px;
content: " ";
background: var(--nut-tabs-horizontal-tab-line-color, linear-gradient(90deg, var(--nut-primary-color, #fa2c19) 0%, rgba(250, 44, 25, 0.15) 100%));
}
.order-list.data-v-17a44f9d {
display: flex;
flex-direction: column;
width: 100%;
}
.order-inner.data-v-17a44f9d {
display: flex;
flex-direction: column;
background: #fff;
border-radius: 15rpx;
overflow: hidden;
margin: 20rpx;
/* 信息行布局 */
}
.order-inner .order-inner-header.data-v-17a44f9d {
display: flex;
align-items: center;
font-size: 24rpx;
justify-content: space-between;
line-height: 45rpx;
padding: 15rpx 20rpx;
border-bottom: 2rpx solid #f2f3f5;
}
.order-inner .goods-info-row.data-v-17a44f9d {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx;
border-bottom: 2rpx solid #f2f3f5;
/* 左侧文字样式 */
/* 右侧价格样式 */
}
.order-inner .goods-info-row .left-text.data-v-17a44f9d {
flex: 1;
}
.order-inner .goods-info-row .goods-name.data-v-17a44f9d {
font-size: 26rpx;
color: #000000;
display: block;
}
.order-inner .goods-info-row .price.data-v-17a44f9d {
font-size: 26rpx;
margin-left: 20rpx;
align-self: center;
color: #fa2c19;
/* 垂直居中在两行文字之间 */
}
.order-inner .goods-info-row .goods-pay-status.data-v-17a44f9d {
font-size: 26rpx;
margin-left: 20rpx;
align-self: center;
}
.order-inner .footer.data-v-17a44f9d {
display: flex;
flex-direction: column;
}
.order-inner .footer .order-inner-price.data-v-17a44f9d {
display: flex;
justify-content: space-evenly;
padding: 20rpx;
font-size: 24rpx;
align-items: center;
}
.order-inner .footer .remarks.data-v-17a44f9d {
padding: 20rpx;
color: rgba(0, 0, 0, 0.5);
font-size: 24rpx;
}