处理订单
This commit is contained in:
File diff suppressed because one or more lines are too long
54
unpackage/dist/dev/mp-weixin/pages/data/list.js
vendored
54
unpackage/dist/dev/mp-weixin/pages/data/list.js
vendored
@@ -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
|
||||
})
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"navigationBarTitleText": "运营数据-数据看板",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"nut-sticky": "../../uni_modules/nutui-uni/components/sticky/sticky",
|
||||
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
|
||||
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="page-content data-v-2c2d73a5"><z-paging wx:if="{{f}}" u-s="{{['d']}}" u-r="paging" style="height:88vh" class="order-list r data-v-2c2d73a5" bindquery="{{d}}" u-i="2c2d73a5-0" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"><view wx:for="{{a}}" wx:for-item="order" wx:key="T" class="order-inner data-v-2c2d73a5"><view class="order-inner-header data-v-2c2d73a5"><nut-tag wx:if="{{order.a}}" class="data-v-2c2d73a5" u-s="{{['d']}}" u-i="{{order.b}}" bind:__l="__l" u-p="{{order.c}}">房间订单</nut-tag><nut-tag wx:else class="data-v-2c2d73a5" 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-2c2d73a5" 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-2c2d73a5" 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-2c2d73a5" 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-2c2d73a5"><view class="left-text data-v-2c2d73a5"><view class="goods-name data-v-2c2d73a5"><nut-tag wx:if="{{order.w}}" class="data-v-2c2d73a5" 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-2c2d73a5" style="margin-left:10rpx"></text><text wx:elif="{{order.y}}" class="data-v-2c2d73a5" style="margin-left:10rpx">{{order.z}}</text></view></view><view wx:if="{{order.A}}" class="price data-v-2c2d73a5"> ¥{{order.B}}</view><view wx:elif="{{order.C}}" class="price data-v-2c2d73a5"> ¥{{order.D}}</view><view class="goods-pay-status data-v-2c2d73a5">{{order.E}}</view></view><view wx:if="{{order.F}}" class="goods-info-row data-v-2c2d73a5"><view class="left-text data-v-2c2d73a5"><view class="goods-name data-v-2c2d73a5"><nut-tag wx:if="{{order.H}}" class="data-v-2c2d73a5" u-s="{{['d']}}" u-i="{{order.G}}" bind:__l="__l" u-p="{{order.H}}">超时</nut-tag><text class="data-v-2c2d73a5" style="margin-left:10rpx">{{order.I}}小时</text></view></view><view class="price data-v-2c2d73a5"> ¥{{order.J}}</view><view class="goods-pay-status data-v-2c2d73a5">{{order.K}}</view></view><view wx:for="{{order.L}}" wx:for-item="goods" wx:key="f" class="goods-info-row data-v-2c2d73a5"><view class="left-text data-v-2c2d73a5"><view class="goods-name data-v-2c2d73a5"><nut-tag wx:if="{{b}}" class="data-v-2c2d73a5" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{b}}">{{goods.a}}</nut-tag><text class="data-v-2c2d73a5" style="margin-left:10rpx">{{goods.c}}</text></view></view><view class="price data-v-2c2d73a5"> ¥{{goods.d}}</view><view class="goods-pay-status data-v-2c2d73a5">{{goods.e}}</view></view><view class="footer data-v-2c2d73a5"><view class="order-inner-price data-v-2c2d73a5"><view class="data-v-2c2d73a5" style="display:flex">优惠: <view class="data-v-2c2d73a5" style="color:#fa2c19;font-size:26rpx"> ¥{{order.M}}</view></view><view class="data-v-2c2d73a5" style="display:flex">总计: <view class="data-v-2c2d73a5" style="color:#fa2c19;font-size:26rpx"> ¥{{order.N}}</view></view></view><view wx:if="{{order.O}}" class="data-v-2c2d73a5" style="padding-left:20rpx;font-size:26rpx">备注</view><view wx:if="{{order.P}}" class="remarks data-v-2c2d73a5">{{order.Q}}</view><view class="order-inner-price data-v-2c2d73a5"><view class="data-v-2c2d73a5" style="color:rgba(0, 0, 0, .5);font-size:24rpx">订单时间:{{order.R}}</view><view class="data-v-2c2d73a5" style="color:rgba(0, 0, 0, .5);font-size:24rpx">员工:{{order.S}}</view></view></view></view></z-paging></view>
|
||||
<view class="page-content data-v-2c2d73a5"><nut-sticky class="data-v-2c2d73a5" u-s="{{['d']}}" u-i="2c2d73a5-0" bind:__l="__l"><view class="top-bar data-v-2c2d73a5"><view class="top-inner-price data-v-2c2d73a5"><view class="data-v-2c2d73a5" style="display:flex">{{a}}日营业额: <view class="data-v-2c2d73a5" style="color:#fa2c19;font-size:26rpx"> ¥2000.00 </view></view><view class="data-v-2c2d73a5" style="display:flex">{{b}}月营业额: <view class="data-v-2c2d73a5" style="color:#fa2c19;font-size:26rpx"> ¥2000.00 </view></view></view><view class="top-inner-price data-v-2c2d73a5"><view class="data-v-2c2d73a5" style="display:flex">优惠: <view class="data-v-2c2d73a5" style="color:#fa2c19;font-size:26rpx"> ¥2000.00 </view></view><view class="data-v-2c2d73a5" style="display:flex">总计: <view class="data-v-2c2d73a5" style="color:#fa2c19;font-size:26rpx"> ¥2000.00 </view></view><view class="data-v-2c2d73a5" style="display:flex">总计: <view class="data-v-2c2d73a5" style="color:#fa2c19;font-size:26rpx"> ¥2000.00 </view></view></view></view></nut-sticky><z-paging wx:if="{{h}}" u-s="{{['d']}}" u-r="paging" style="height:80vh" class="order-list r data-v-2c2d73a5" bindquery="{{f}}" u-i="2c2d73a5-1" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"><view wx:for="{{c}}" wx:for-item="order" wx:key="T" class="order-inner data-v-2c2d73a5"><view class="order-inner-header data-v-2c2d73a5"><nut-tag wx:if="{{order.a}}" class="data-v-2c2d73a5" u-s="{{['d']}}" u-i="{{order.b}}" bind:__l="__l" u-p="{{order.c}}">房间订单</nut-tag><nut-tag wx:else class="data-v-2c2d73a5" 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-2c2d73a5" 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-2c2d73a5" 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-2c2d73a5" 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-2c2d73a5"><view class="left-text data-v-2c2d73a5"><view class="goods-name data-v-2c2d73a5"><nut-tag wx:if="{{order.w}}" class="data-v-2c2d73a5" 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-2c2d73a5" style="margin-left:10rpx"></text><text wx:elif="{{order.y}}" class="data-v-2c2d73a5" style="margin-left:10rpx">{{order.z}}</text></view></view><view wx:if="{{order.A}}" class="price data-v-2c2d73a5"> ¥{{order.B}}</view><view wx:elif="{{order.C}}" class="price data-v-2c2d73a5"> ¥{{order.D}}</view><view class="goods-pay-status data-v-2c2d73a5">{{order.E}}</view></view><view wx:if="{{order.F}}" class="goods-info-row data-v-2c2d73a5"><view class="left-text data-v-2c2d73a5"><view class="goods-name data-v-2c2d73a5"><nut-tag wx:if="{{order.H}}" class="data-v-2c2d73a5" u-s="{{['d']}}" u-i="{{order.G}}" bind:__l="__l" u-p="{{order.H}}">超时</nut-tag><text class="data-v-2c2d73a5" style="margin-left:10rpx">{{order.I}}小时</text></view></view><view class="price data-v-2c2d73a5"> ¥{{order.J}}</view><view class="goods-pay-status data-v-2c2d73a5">{{order.K}}</view></view><view wx:for="{{order.L}}" wx:for-item="goods" wx:key="f" class="goods-info-row data-v-2c2d73a5"><view class="left-text data-v-2c2d73a5"><view class="goods-name data-v-2c2d73a5"><nut-tag wx:if="{{d}}" class="data-v-2c2d73a5" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{d}}">{{goods.a}}</nut-tag><text class="data-v-2c2d73a5" style="margin-left:10rpx">{{goods.c}}</text></view></view><view class="price data-v-2c2d73a5"> ¥{{goods.d}}</view><view class="goods-pay-status data-v-2c2d73a5">{{goods.e}}</view></view><view class="footer data-v-2c2d73a5"><view class="order-inner-price data-v-2c2d73a5"><view class="data-v-2c2d73a5" style="display:flex">优惠: <view class="data-v-2c2d73a5" style="color:#fa2c19;font-size:26rpx"> ¥{{order.M}}</view></view><view class="data-v-2c2d73a5" style="display:flex">总计: <view class="data-v-2c2d73a5" style="color:#fa2c19;font-size:26rpx"> ¥{{order.N}}</view></view></view><view wx:if="{{order.O}}" class="data-v-2c2d73a5" style="padding-left:20rpx;font-size:26rpx">备注</view><view wx:if="{{order.P}}" class="remarks data-v-2c2d73a5">{{order.Q}}</view><view class="order-inner-price data-v-2c2d73a5"><view class="data-v-2c2d73a5" style="color:rgba(0, 0, 0, .5);font-size:24rpx">订单时间:{{order.R}}</view><view class="data-v-2c2d73a5" style="color:rgba(0, 0, 0, .5);font-size:24rpx">员工:{{order.S}}</view></view></view></view></z-paging></view>
|
||||
@@ -52,38 +52,18 @@
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
}
|
||||
.title-list.data-v-2c2d73a5 {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
.top-bar.data-v-2c2d73a5 {
|
||||
background: #fff;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 20rpx 60rpx;
|
||||
}
|
||||
.title-list .title-item.data-v-2c2d73a5 {
|
||||
.top-inner-price.data-v-2c2d73a5 {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
.title-list .tabs-active.data-v-2c2d73a5 {
|
||||
font-weight: bold;
|
||||
color: var(--nut-tabs-titles-item-active-color, var(--nut-title-color, #1a1a1a));
|
||||
opacity: var(--nut-tabs-titles-item-line-opacity, 1);
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
.title-list .tabs-active .item__line.data-v-2c2d73a5 {
|
||||
position: absolute;
|
||||
bottom: -10%;
|
||||
left: 50%;
|
||||
overflow: hidden;
|
||||
content: " ";
|
||||
border-radius: var(--nut-tabs-titles-item-line-border-radius, 0);
|
||||
opacity: var(--nut-tabs-titles-item-line-opacity, 1);
|
||||
transition: width 0.3s ease;
|
||||
transform: translate(-50%, 0);
|
||||
width: var(--nut-tabs-horizontal-titles-item-active-line-width, 40px);
|
||||
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%));
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
font-size: 26rpx;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.order-list.data-v-2c2d73a5 {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user