处理个人中心 以及数据看板
This commit is contained in:
41
unpackage/dist/dev/mp-weixin/pages/data/list.js
vendored
41
unpackage/dist/dev/mp-weixin/pages/data/list.js
vendored
@@ -16,10 +16,15 @@ if (!Math) {
|
||||
const _sfc_main = {
|
||||
__name: "list",
|
||||
setup(__props) {
|
||||
const dayTotalPrice = common_vendor.ref(0);
|
||||
const monthTotalPrice = common_vendor.ref(0);
|
||||
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);
|
||||
common_vendor.index.__f__("log", "at pages/data/list.vue:159", day.value);
|
||||
if (day.value) {
|
||||
getDashboard();
|
||||
}
|
||||
});
|
||||
const formatDate = (date) => {
|
||||
const d = new Date(date);
|
||||
@@ -29,21 +34,33 @@ const _sfc_main = {
|
||||
};
|
||||
const dataList = common_vendor.ref([]);
|
||||
const paging = common_vendor.ref(null);
|
||||
const getDashboard = () => {
|
||||
api_index.fetchDashboard({
|
||||
date: day.value
|
||||
}).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/data/list.vue:182", res);
|
||||
dayTotalPrice.value = res.dayTotalPrice;
|
||||
monthTotalPrice.value = res.monthTotalPrice;
|
||||
});
|
||||
};
|
||||
const queryList = (pageNo = 1, pageSize = 10) => {
|
||||
common_vendor.index.__f__("log", "at pages/data/list.vue:172", day.value);
|
||||
common_vendor.index.__f__("log", "at pages/data/list.vue:192", 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);
|
||||
common_vendor.index.__f__("log", "at pages/data/list.vue:199", res);
|
||||
paging.value.complete(res.list);
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
});
|
||||
};
|
||||
common_vendor.onShow(() => {
|
||||
if (day.value) {
|
||||
getDashboard();
|
||||
}
|
||||
if (paging.value) {
|
||||
paging.value.refresh();
|
||||
}
|
||||
@@ -51,8 +68,10 @@ const _sfc_main = {
|
||||
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) => {
|
||||
b: common_vendor.t(dayTotalPrice.value),
|
||||
c: common_vendor.t(formatDate(day.value)),
|
||||
d: common_vendor.t(monthTotalPrice.value),
|
||||
e: 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
|
||||
@@ -139,7 +158,7 @@ const _sfc_main = {
|
||||
};
|
||||
}),
|
||||
M: common_vendor.t(order == null ? void 0 : order.discount_amount),
|
||||
N: common_vendor.t(order == null ? void 0 : order.discount_amount),
|
||||
N: common_vendor.t(order == null ? void 0 : order.totalPrice),
|
||||
O: order.remarks
|
||||
}, order.remarks ? {} : {}, {
|
||||
P: order.remarks
|
||||
@@ -151,16 +170,16 @@ const _sfc_main = {
|
||||
T: index
|
||||
});
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
f: common_vendor.p({
|
||||
plain: true,
|
||||
["custom-color"]: "#fa2400"
|
||||
}),
|
||||
e: common_vendor.sr(paging, "2c2d73a5-1", {
|
||||
g: 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({
|
||||
h: common_vendor.o(queryList),
|
||||
i: common_vendor.o(($event) => dataList.value = $event),
|
||||
j: common_vendor.p({
|
||||
fixed: false,
|
||||
modelValue: dataList.value
|
||||
})
|
||||
|
||||
@@ -1 +1 @@
|
||||
<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>
|
||||
<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"> ¥{{b}}元 </view></view><view class="data-v-2c2d73a5" style="display:flex">{{c}}月营业额: <view class="data-v-2c2d73a5" style="color:#fa2c19;font-size:26rpx"> ¥{{d}}</view> 元 </view></view></view></nut-sticky><z-paging wx:if="{{j}}" u-s="{{['d']}}" u-r="paging" style="height:80vh" class="order-list r data-v-2c2d73a5" bindquery="{{h}}" u-i="2c2d73a5-1" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"><view wx:for="{{e}}" 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="{{f}}" class="data-v-2c2d73a5" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{f}}">{{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>
|
||||
21
unpackage/dist/dev/mp-weixin/pages/mine/index.js
vendored
21
unpackage/dist/dev/mp-weixin/pages/mine/index.js
vendored
@@ -22,20 +22,22 @@ const _sfc_main = {
|
||||
setup(__props) {
|
||||
const uid = common_vendor.ref(0);
|
||||
const staffName = common_vendor.ref("");
|
||||
const staffRole = common_vendor.ref(0);
|
||||
common_vendor.onLoad((options) => {
|
||||
init();
|
||||
});
|
||||
const init = () => {
|
||||
common_vendor.index.getStorageSync("user_name");
|
||||
let staff_name = common_vendor.index.getStorageSync("staff_name");
|
||||
common_vendor.index.getStorageSync("role");
|
||||
let role = common_vendor.index.getStorageSync("role");
|
||||
let user_id = common_vendor.index.getStorageSync("uid");
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:69", "staff_name", staff_name);
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:70", "staff_name", staff_name);
|
||||
uid.value = user_id;
|
||||
staffName.value = staff_name;
|
||||
staffRole.value = role;
|
||||
};
|
||||
common_vendor.onShow(() => {
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:79", "init");
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:81", "init");
|
||||
init();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
@@ -55,14 +57,17 @@ const _sfc_main = {
|
||||
g: common_vendor.p({
|
||||
text: "订单管理"
|
||||
}),
|
||||
h: common_vendor.p({
|
||||
h: staffRole.value == 1
|
||||
}, staffRole.value == 1 ? {
|
||||
i: common_vendor.p({
|
||||
name: "eye"
|
||||
}),
|
||||
i: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/data/index")),
|
||||
j: common_vendor.p({
|
||||
text: "运营数据"
|
||||
}),
|
||||
j: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/data/index")),
|
||||
k: common_vendor.p({
|
||||
text: "运营数据"
|
||||
})
|
||||
} : {}, {
|
||||
l: common_vendor.p({
|
||||
title: ""
|
||||
})
|
||||
});
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="page-content data-v-569e925a"><view wx:if="{{a}}" class="user-inner data-v-569e925a"><view class="data-v-569e925a"><nut-avatar wx:if="{{b}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-0" bind:__l="__l" u-p="{{b}}">用户</nut-avatar></view><view class="user-info-style data-v-569e925a"><text class="nickname data-v-569e925a">{{c}}</text><text class="user-id data-v-569e925a">UID:{{d}}</text></view></view><view class="content data-v-569e925a"><nut-cell-group wx:if="{{k}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-1" bind:__l="__l" u-p="{{k}}"><nut-grid class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-2,569e925a-1" bind:__l="__l"><nut-grid-item wx:if="{{g}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{f}}" u-i="569e925a-3,569e925a-2" bind:__l="__l" u-p="{{g}}"><nut-icon wx:if="{{e}}" class="data-v-569e925a" u-i="569e925a-4,569e925a-3" bind:__l="__l" u-p="{{e}}"></nut-icon></nut-grid-item><nut-grid-item wx:if="{{j}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{i}}" u-i="569e925a-5,569e925a-2" bind:__l="__l" u-p="{{j}}"><nut-icon wx:if="{{h}}" class="data-v-569e925a" u-i="569e925a-6,569e925a-5" bind:__l="__l" u-p="{{h}}"></nut-icon></nut-grid-item></nut-grid></nut-cell-group></view></view>
|
||||
<view class="page-content data-v-569e925a"><view wx:if="{{a}}" class="user-inner data-v-569e925a"><view class="data-v-569e925a"><nut-avatar wx:if="{{b}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-0" bind:__l="__l" u-p="{{b}}">用户</nut-avatar></view><view class="user-info-style data-v-569e925a"><text class="nickname data-v-569e925a">{{c}}</text><text class="user-id data-v-569e925a">UID:{{d}}</text></view></view><view class="content data-v-569e925a"><nut-cell-group wx:if="{{l}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-1" bind:__l="__l" u-p="{{l}}"><nut-grid class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-2,569e925a-1" bind:__l="__l"><nut-grid-item wx:if="{{g}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{f}}" u-i="569e925a-3,569e925a-2" bind:__l="__l" u-p="{{g}}"><nut-icon wx:if="{{e}}" class="data-v-569e925a" u-i="569e925a-4,569e925a-3" bind:__l="__l" u-p="{{e}}"></nut-icon></nut-grid-item><nut-grid-item wx:if="{{h}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{j}}" u-i="569e925a-5,569e925a-2" bind:__l="__l" u-p="{{k}}"><nut-icon wx:if="{{i}}" class="data-v-569e925a" u-i="569e925a-6,569e925a-5" bind:__l="__l" u-p="{{i}}"></nut-icon></nut-grid-item></nut-grid></nut-cell-group></view></view>
|
||||
@@ -167,7 +167,7 @@ const _sfc_main = {
|
||||
};
|
||||
}),
|
||||
M: common_vendor.t(order == null ? void 0 : order.discount_amount),
|
||||
N: common_vendor.t(order == null ? void 0 : order.discount_amount),
|
||||
N: common_vendor.t(order == null ? void 0 : order.totalPrice),
|
||||
O: order.remarks
|
||||
}, order.remarks ? {} : {}, {
|
||||
P: order.remarks
|
||||
|
||||
Reference in New Issue
Block a user