已支付订单列表:where.payStatus = 1;

This commit is contained in:
2024-07-10 22:44:18 +08:00
parent 9dd834adb5
commit 1311eb03b8
611 changed files with 92828 additions and 400 deletions
+521
View File
@@ -0,0 +1,521 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_layout_index = require("../../api/layout/index.js");
const api_shop_merchant_index = require("../../api/shop/merchant/index.js");
require("../../utils/request.js");
const api_booking_period_index = require("../../api/booking/period/index.js");
const store_modules_car = require("../../store/modules/car.js");
const utils_common = require("../../utils/common.js");
const carStore = store_modules_car.useCarStore();
const { orderInfo, totalPrice, carNum, merchant, type, dateTime, childrenPrice } = common_vendor.storeToRefs(carStore);
const _sfc_main = {
data() {
return {
// 场馆ID
merchantId: 0,
// 场馆信息
merchant,
// 未来7天
next7day: [],
// 预定信息
orderInfo,
// 订单总金额
totalPrice,
// 儿童票价
childrenPrice,
// 预定日期
dateTime: null,
merchantList: [],
currentId: 0,
// 0全场 1半场
type: 0,
// 星期几
week: 0,
// 是否可以预定半场
isHalf: 0,
// 服务器时间
serverTime: {},
items: ["全场", "半场"],
// 搜索条件
where: {},
// 时段
periodList: [],
// 场地
fieldList: [],
// 选中的场地
selection: [],
// 是否已登录
isLogin: false,
// 是否同意协议
disabled: false,
// 购物车信息
showCarInfo: false
};
},
onLoad() {
this.reload();
},
onShow() {
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
this.isLogin = true;
}
},
computed: {
totalPrice() {
const app = this;
let totalPrice2 = 0;
app.selection.map((d) => {
totalPrice2 = totalPrice2 + d.price;
});
carStore.totalPrice = totalPrice2;
console.log("totalPrice: ", totalPrice2);
return totalPrice2;
},
carNum() {
return this.selection.length;
}
},
methods: {
async reload() {
const app = this;
await app.getMerchantList();
common_vendor.index.showLoading({
title: "数据读取中."
});
Promise.all([app.getServerTime(), app.getNext7day(), app.getMerchant()]).then((res) => {
const serverTime = res[0];
const next7day = res[1];
const merchant2 = res[2];
app.serverTime = serverTime;
app.next7day = next7day;
app.merchant = merchant2;
common_vendor.index.setNavigationBarTitle({
title: merchant2.merchantName
});
carStore.setMerchant(merchant2);
app.next7day = next7day.map((d, i) => {
if (!app.dateTime && i == 0) {
app.dateTime = d.dateTime;
app.week = d.week;
carStore.dateTime = d.dateTime;
}
d.name = utils_common.getWeek(d.week);
d.value = d.date;
return d;
});
app.getBookingPeriod();
}).catch(() => {
common_vendor.index.showToast({
title: "请检查您的网络.",
icon: "none"
});
common_vendor.index.hideLoading();
});
},
back() {
common_vendor.index.navigateBack();
},
goBack() {
return common_vendor.index.navigateTo({
url: "/package/admin/index"
});
},
getMerchantList() {
this.merchantList = common_vendor.index.getStorageSync("merchantList");
if (this.merchantList.length > 0) {
this.merchantId = this.merchantList[0].value;
}
if (common_vendor.index.getStorageSync("currentId")) {
this.merchantId = common_vendor.index.getStorageSync("currentId");
}
},
onDisabled() {
this.disabled = !this.disabled;
},
onDateTime(e) {
console.log("e: ", e);
this.week = e.week;
this.dateTime = e.dateTime;
carStore.dateTime = e.dateTime;
carStore.orderInfo = [];
this.selection = [];
this.reload();
},
onType(e) {
const index = e.currentIndex;
if (index == 0) {
this.type = 0;
this.isHalf = 0;
}
if (index == 1) {
this.type = 1;
this.isHalf = 1;
}
this.reload();
},
getMerchant() {
return new Promise((resolve, reject) => {
api_shop_merchant_index.getMerchant(this.merchantId).then((result) => {
resolve(result);
}).catch(reject);
});
},
getServerTime() {
return new Promise((resolve, reject) => {
api_layout_index.getServerTime().then((result) => {
resolve(result);
}).catch(reject);
});
},
getNext7day() {
return new Promise((resolve, reject) => {
api_layout_index.getNext7day().then((result) => {
resolve(result);
}).catch(reject);
});
},
// getBookingField() {
// FieldApi.listField({
// merchantId: this.merchantId,
// isStatus: 1,
// isHalf: this.isHalf,
// dateTime: `${this.dateTime}`
// }).then(list => {
// this.fieldList = list;
// })
// },
getBookingPeriod() {
const now = /* @__PURE__ */ new Date();
now.getHours();
now.getMinutes();
const week = this.week === 0 ? 7 : this.week;
api_booking_period_index.listPeriod({
merchantId: this.merchantId,
isStatus: 0,
week,
dateTime: `${this.dateTime}`,
half: this.isHalf
}).then((list) => {
this.periodList = list;
common_vendor.index.hideLoading();
}).catch((err) => {
this.periodList = [];
common_vendor.index.showToast({
title: err.message,
icon: "none"
});
common_vendor.index.hideLoading();
if (err.message === "您还有未支付订单,请先支付") {
setTimeout(() => {
return common_vendor.index.switchTab({
url: "/pages/order/order"
});
}, 1e3);
}
});
},
callPhone(phone) {
common_vendor.index.makePhoneCall({
phoneNumber: phone
});
},
openCarInfo() {
this.$refs.popup.open("bottom");
},
closeCarInfo() {
this.$refs.popup.close();
},
onMap() {
common_vendor.index.getLocation({
type: "gcj02",
//返回可以用于uni.openLocation的经纬度
success: function(res) {
console.log("返回可以用于uni.openLocation的经纬度: ", res);
const latitude = this.merchant.latitude;
const longitude = this.merchant.longitude;
common_vendor.index.openLocation({
latitude,
longitude,
success: function() {
console.log("success");
}
});
}
});
},
onField(item, period) {
if (item.sold) {
return;
}
const app = this;
const { merchant: merchant2 } = this;
const key = utils_common.getKey(`${this.dateTime}${item.timePeriod}${this.merchantId}${item.fieldId}`);
const index = app.selection.findIndex((d) => d.key === key);
if (index >= 0) {
app.selection.splice(index, 1);
} else {
if (app.selection.length > 1) {
common_vendor.index.showToast({
title: "最多预定两个场地!",
icon: "none"
});
return false;
}
const split = item.timePeriod.split("-");
app.selection.push({
key,
merchantId: this.merchantId,
merchantCode: merchant2.merchantCode,
fieldId: item.fieldId,
fieldName: item.fieldName,
price: item.price,
childrenPrice: period.childrenPrice,
adultNum: 1,
childrenNum: 0,
merchantName: merchant2.merchantName,
isChildren: item.isChildren,
isHalf: this.type,
timePeriod: item.timePeriod,
periodId: item.periodId,
startTime: `${split[0].trim()}:00`,
endTime: `${split[1].trim()}:00`,
orderCode: key,
dateTime: `${this.dateTime}`,
comments: `${this.dateTime} (${utils_common.getWeek(this.week)}) ${item.timePeriod}`
});
console.log(app.selection);
console.log("period: ", period);
console.log("item.isChildren: ", item.isChildren);
if (item.isChildren === 1) {
console.log("item.isChildren2: ", item.isChildren);
carStore.childrenPrice = period.childrenPrice;
} else {
carStore.childrenPrice = 0;
}
carStore.orderInfo = app.selection;
carStore.carNum = app.selection.length;
carStore.totalPrice = totalPrice;
carStore.payPrice = totalPrice;
carStore.setPeriod(period);
}
},
getStratTime(value) {
const split = value.split("-");
const timeText = split[0].replace(" ", "");
const startTime = (/* @__PURE__ */ new Date(`${this.dateTime} ${timeText}:00`)).getTime();
return startTime / 1e3 || 0;
},
isActive(item) {
const index = this.selection.find((d) => d.key === utils_common.getKey(`${this.dateTime}${item.timePeriod}${this.merchantId}${item.fieldId}`));
if (item.sold) {
if (item.isHalf === 1) {
return "web-bg-warning";
}
return "web-bg-info";
}
if (index) {
return "active web-bg-success";
}
},
// isActive(text,item) {
// const index = this.selection.find(d => d.key == getKey(text))
// if(item.sold){
// if(item.isHalf == 1){
// return 'web-bg-warning'
// }
// return 'web-bg-info'
// }
// if (index) {
// return 'active web-bg-success'
// }
// },
remove(item) {
const index = this.selection.findIndex((d) => d.key === item.key);
this.selection.splice(index, 1);
carStore.orderInfo = this.selection;
},
save() {
common_vendor.index.$uv.route({
url: "/package/booking/confirm"
});
}
}
};
if (!Array) {
const _easycom_ws_select_merchant2 = common_vendor.resolveComponent("ws-select-merchant");
const _easycom_uv_tabs2 = common_vendor.resolveComponent("uv-tabs");
const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
const _easycom_uv_badge2 = common_vendor.resolveComponent("uv-badge");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
const _easycom_uv_count_to2 = common_vendor.resolveComponent("uv-count-to");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_ws_select_merchant2 + _easycom_uv_tabs2 + _easycom_uni_segmented_control2 + _easycom_uv_badge2 + _easycom_uv_gap2 + _easycom_uv_icon2 + _easycom_uv_count_to2 + _easycom_uv_button2 + _easycom_uni_icons2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uni_popup2 + _easycom_ws_login2)();
}
const _easycom_ws_select_merchant = () => "../../uni_modules/ws-select-merchant/components/ws-select-merchant/ws-select-merchant.js";
const _easycom_uv_tabs = () => "../../uni_modules/uv-tabs/components/uv-tabs/uv-tabs.js";
const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
const _easycom_uv_badge = () => "../../uni_modules/uv-badge/components/uv-badge/uv-badge.js";
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
const _easycom_uv_icon = () => "../../uni_modules/uv-icon/components/uv-icon/uv-icon.js";
const _easycom_uv_count_to = () => "../../uni_modules/uv-count-to/components/uv-count-to/uv-count-to.js";
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
const _easycom_uv_cell_group = () => "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_ws_select_merchant + _easycom_uv_tabs + _easycom_uni_segmented_control + _easycom_uv_badge + _easycom_uv_gap + _easycom_uv_icon + _easycom_uv_count_to + _easycom_uv_button + _easycom_uni_icons + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uni_popup + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.o($options.reload),
b: common_vendor.p({
merchantList: $data.merchantList,
merchantId: $data.merchantId
}),
c: common_vendor.o($options.onDateTime),
d: common_vendor.p({
list: $data.next7day,
itemStyle: {
height: "58px"
},
activeStyle: {
color: "#2ba91c"
},
lineColor: "#2ba91c",
inactiveStyle: {
color: "#808080"
}
}),
e: common_vendor.o($options.onType),
f: common_vendor.p({
current: _ctx.current,
values: $data.items,
activeColor: "#2ba91c",
inActiveColor: "#ff0000"
}),
g: common_vendor.p({
isDot: true,
type: "blank"
}),
h: common_vendor.p({
isDot: true,
type: "info"
}),
i: common_vendor.p({
isDot: true,
type: "success"
}),
j: common_vendor.p({
isDot: true,
type: "warning"
}),
k: $data.periodList.length > 0
}, $data.periodList.length > 0 ? {
l: common_vendor.f($data.periodList, (item, index, i0) => {
return {
a: common_vendor.t(item.timePeriod),
b: common_vendor.f(item.fieldList, (field, index2, i1) => {
return {
a: common_vendor.t(field.fieldName),
b: common_vendor.n($options.isActive(field)),
c: common_vendor.o(($event) => $options.onField(field, item), index2),
d: index2
};
}),
c: common_vendor.t(item.price),
d: index
};
})
} : {}, {
m: common_vendor.p({
height: "50"
}),
n: common_vendor.p({
name: "shopping-cart",
size: "36",
color: "#ffffff"
}),
o: common_vendor.p({
type: "error",
max: "99",
value: $options.carNum
}),
p: common_vendor.o((...args) => $options.openCarInfo && $options.openCarInfo(...args)),
q: common_vendor.p({
startVal: 0,
decimals: "2",
duration: "100",
color: "#ebcf00",
bold: true,
endVal: $options.totalPrice
}),
r: common_vendor.o($options.save),
s: common_vendor.p({
disabled: $data.orderInfo.length == 0,
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "0 30px 30px 0",
color: "#ffffff",
border: "none",
padding: "22px 30px"
},
text: "下一步"
}),
t: common_vendor.f($data.orderInfo, (item, index, i0) => {
return {
a: common_vendor.o(($event) => $options.remove(item), index),
b: "788dd7a0-16-" + i0 + "," + ("788dd7a0-15-" + i0),
c: common_vendor.o(($event) => $options.remove(item), index),
d: "788dd7a0-15-" + i0 + ",788dd7a0-14",
e: common_vendor.p({
title: `${item.fieldName} ¥${item.price}`,
label: `${item.dateTime}`,
cellStyle: {
padding: "10px 5px"
}
}),
f: index
};
}),
v: common_vendor.p({
type: "trash",
size: "20",
color: "#f76b4e"
}),
w: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
x: common_vendor.o($options.closeCarInfo),
y: common_vendor.p({
title: `购物车`,
extra: "关闭",
border: false,
["is-shadow"]: false,
padding: 0
}),
z: common_vendor.p({
height: "70"
}),
A: common_vendor.sr("popup", "788dd7a0-12"),
B: common_vendor.sr("login", "788dd7a0-18"),
C: common_vendor.o($options.reload),
D: common_vendor.p({
logo: _ctx.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-788dd7a0"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/admin/field.vue"]]);
wx.createPage(MiniProgramPage);
+21
View File
@@ -0,0 +1,21 @@
{
"navigationBarTitleText": "场地管理",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"usingComponents": {
"ws-select-merchant": "../../uni_modules/ws-select-merchant/components/ws-select-merchant/ws-select-merchant",
"uv-tabs": "../../uni_modules/uv-tabs/components/uv-tabs/uv-tabs",
"uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control",
"uv-badge": "../../uni_modules/uv-badge/components/uv-badge/uv-badge",
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uv-icon": "../../uni_modules/uv-icon/components/uv-icon/uv-icon",
"uv-count-to": "../../uni_modules/uv-count-to/components/uv-count-to/uv-count-to",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"uv-cell-group": "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="container data-v-788dd7a0"><ws-select-merchant wx:if="{{b}}" class="data-v-788dd7a0" binddone="{{a}}" u-i="788dd7a0-0" bind:__l="__l" u-p="{{b}}"/><uv-tabs wx:if="{{d}}" class="data-v-788dd7a0" bindchange="{{c}}" u-i="788dd7a0-1" bind:__l="__l" u-p="{{d}}"></uv-tabs><view class="uni-padding-wrap uni-common-mt data-v-788dd7a0"><uni-segmented-control wx:if="{{f}}" class="data-v-788dd7a0" bindclickItem="{{e}}" u-i="788dd7a0-2" bind:__l="__l" u-p="{{f}}"/></view><view class="uni-badge-wrap data-v-788dd7a0"><view class="badge-item data-v-788dd7a0"><uv-badge wx:if="{{g}}" class="data-v-788dd7a0" u-i="788dd7a0-3" bind:__l="__l" u-p="{{g}}"></uv-badge><text class="web-text-secondary data-v-788dd7a0">可预约</text></view><view class="badge-item data-v-788dd7a0"><uv-badge wx:if="{{h}}" class="data-v-788dd7a0" u-i="788dd7a0-4" bind:__l="__l" u-p="{{h}}"></uv-badge><text class="web-text-secondary data-v-788dd7a0">已出售</text></view><view class="badge-item data-v-788dd7a0"><uv-badge wx:if="{{i}}" class="data-v-788dd7a0" u-i="788dd7a0-5" bind:__l="__l" u-p="{{i}}"></uv-badge><text class="web-text-secondary data-v-788dd7a0">我的选择</text></view><view class="badge-item data-v-788dd7a0"><uv-badge wx:if="{{j}}" class="data-v-788dd7a0" u-i="788dd7a0-6" bind:__l="__l" u-p="{{j}}"></uv-badge><text class="web-text-secondary data-v-788dd7a0">已预定半场</text></view></view><view wx:if="{{k}}" class="checkout-body web-text-primary data-v-788dd7a0"><block wx:for="{{l}}" wx:for-item="item" wx:key="d"><view class="period-item data-v-788dd7a0"><view class="period data-v-788dd7a0">{{item.a}}</view><view class="field-list data-v-788dd7a0"><block wx:for="{{item.b}}" wx:for-item="field" wx:key="d"><view class="{{['field', 'data-v-788dd7a0', field.b]}}" bindtap="{{field.c}}"><text class="field-name data-v-788dd7a0">{{field.a}}</text><text class="price data-v-788dd7a0">{{item.c}}元</text></view></block></view></view></block><view class="period-item data-v-788dd7a0" style="display:none"><view class="period data-v-788dd7a0">18:00 - 20:00</view><view class="field-list data-v-788dd7a0"><view class="field web-bg-info data-v-788dd7a0"><text class="field-name data-v-788dd7a0">1号场地</text><text class="price data-v-788dd7a0">580元</text></view><view class="field web-bg-success active data-v-788dd7a0"><text class="field-name data-v-788dd7a0">2号场地</text><text class="price data-v-788dd7a0">580元</text></view><view class="field web-bg-warning data-v-788dd7a0"><text class="field-name data-v-788dd7a0">3号场地</text><text class="price data-v-788dd7a0">580元</text></view></view></view></view></view><uv-gap wx:if="{{m}}" class="data-v-788dd7a0" u-i="788dd7a0-7" bind:__l="__l" u-p="{{m}}"></uv-gap><view class="checkout-car data-v-788dd7a0" style="display:none"><view class="car-selected data-v-788dd7a0" bindtap="{{p}}"><uv-icon wx:if="{{n}}" class="data-v-788dd7a0" u-i="788dd7a0-8" bind:__l="__l" u-p="{{n}}"></uv-icon><uv-badge wx:if="{{o}}" class="data-v-788dd7a0" u-i="788dd7a0-9" bind:__l="__l" u-p="{{o}}"></uv-badge></view><view class="car-total data-v-788dd7a0"><text class="data-v-788dd7a0" style="color:#ebcf00">¥</text><uv-count-to wx:if="{{q}}" class="data-v-788dd7a0" u-i="788dd7a0-10" bind:__l="__l" u-p="{{q}}"></uv-count-to></view><uv-button wx:if="{{s}}" class="save-btn data-v-788dd7a0" bindclick="{{r}}" u-i="788dd7a0-11" bind:__l="__l" u-p="{{s}}"></uv-button></view><uni-popup class="r data-v-788dd7a0" u-s="{{['d']}}" u-r="popup" style="margin-bottom:200px" u-i="788dd7a0-12" bind:__l="__l"><uni-card wx:if="{{y}}" class="data-v-788dd7a0" u-s="{{['d']}}" bindclick="{{x}}" u-i="788dd7a0-13,788dd7a0-12" bind:__l="__l" u-p="{{y}}"><uv-cell-group wx:if="{{w}}" class="data-v-788dd7a0" u-s="{{['d']}}" u-i="788dd7a0-14,788dd7a0-13" bind:__l="__l" u-p="{{w}}"><block wx:for="{{t}}" wx:for-item="item" wx:key="f"><uv-cell wx:if="{{item.e}}" class="data-v-788dd7a0" u-s="{{['right-icon']}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"><view slot="right-icon"><uni-icons wx:if="{{v}}" class="data-v-788dd7a0" bindclick="{{item.a}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{v}}"></uni-icons><text class="web-text-secondary data-v-788dd7a0" style="font-size:24rpx" bindtap="{{item.c}}">移除</text></view></uv-cell></block></uv-cell-group></uni-card><uv-gap wx:if="{{z}}" class="data-v-788dd7a0" u-i="788dd7a0-17,788dd7a0-12" bind:__l="__l" u-p="{{z}}"></uv-gap></uni-popup><ws-login wx:if="{{D}}" class="r data-v-788dd7a0" u-r="login" binddone="{{C}}" u-i="788dd7a0-18" bind:__l="__l" u-p="{{D}}"/>
+194
View File
@@ -0,0 +1,194 @@
page {
background-size: 100%;
background-repeat: no-repeat;
background-color: #f0f2f5;
width: 750rpx;
overflow-x: hidden;
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.checkout-car.data-v-788dd7a0 {
width: 700rpx;
left: 25rpx;
position: fixed;
bottom: 30rpx;
display: flex;
justify-content: space-between;
background-color: #000000;
border-radius: 100px;
align-items: center;
}
.checkout-car .car-selected.data-v-788dd7a0 {
color: #ccc;
display: flex;
align-items: center;
padding: 0 20rpx;
position: relative;
}
.checkout-car .car-total.data-v-788dd7a0 {
display: flex;
color: #ebcf00;
align-items: center;
}
.popup-car-info.data-v-788dd7a0 {
margin-bottom: 100px;
padding: 20rpx;
background-color: #ffffff;
width: 660rpx;
margin: 150rpx auto;
}
.uni-padding-wrap.data-v-788dd7a0 {
width: 180rpx;
margin: 20rpx auto;
}
.uni-badge-wrap.data-v-788dd7a0 {
display: flex;
justify-content: space-around;
}
.uni-badge-wrap .badge-item.data-v-788dd7a0 {
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
}
.uni-badge-wrap .badge-item text.data-v-788dd7a0 {
padding: 2rpx;
}
.uni-badge-wrap .badge-item .web-text-secondary.data-v-788dd7a0 {
padding-left: 8rpx;
}
.checkout-body.data-v-788dd7a0 {
padding: 24rpx;
}
.checkout-body .period-item.data-v-788dd7a0 {
margin: 12rpx 0;
}
.checkout-body .period-item .period.data-v-788dd7a0 {
line-height: 2rem;
padding-left: 12rpx;
font-size: 28rpx;
}
.checkout-body .period-item .field-list.data-v-788dd7a0 {
display: flex;
flex-wrap: wrap;
}
.checkout-body .period-item .field-list .web-bg-info.data-v-788dd7a0 {
background-color: #909399 !important;
color: #ffffff !important;
}
.checkout-body .period-item .field-list .web-bg-success.data-v-788dd7a0 {
color: #2ba91c !important;
border: 1px solid #2ba91c !important;
}
.checkout-body .period-item .field-list .active.data-v-788dd7a0:before {
border-radius: 0 0 12rpx 0;
content: "";
position: absolute;
right: 0;
bottom: 0;
border: 24rpx solid #2ba91c;
border-top-color: transparent;
border-left-color: transparent;
}
.checkout-body .period-item .field-list .active.data-v-788dd7a0:after {
content: "";
width: 5px;
height: 10px;
position: absolute;
right: 3px;
bottom: 4px;
border: 1px solid #fff;
border-top-color: transparent;
border-left-color: transparent;
transform: rotate(45deg);
border-radius: 4rpx;
}
.checkout-body .period-item .field-list .field.data-v-788dd7a0 {
width: 118rpx;
height: 118rpx;
margin: 9rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 16rpx;
line-height: 1.3rem;
position: relative;
color: #333333;
background-color: #ffffff;
border: 1px solid #808080;
}
.checkout-body .period-item .field-list .field .field-name.data-v-788dd7a0 {
font-size: 23rpx;
}
.checkout-body .period-item .field-list .field .price.data-v-788dd7a0 {
font-size: 25rpx;
}
.xieyi.data-v-788dd7a0 {
margin: 30rpx auto;
padding: 20rpx 30rpx;
}
.xieyi .text.data-v-788dd7a0 {
margin-left: 5rpx;
}
.xieyi .text .link.data-v-788dd7a0 {
color: #0f80ff;
}
.box-bg.data-v-788dd7a0 {
background-color: #f5f5f5;
padding: 5px 0;
}
.city.data-v-788dd7a0 {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
margin-left: 4px;
}
.input-view.data-v-788dd7a0 {
display: flex;
flex-direction: row;
flex: 1;
background-color: #f8f8f8;
height: 30px;
border-radius: 15px;
padding: 0 15px;
flex-wrap: nowrap;
margin: 7px 0;
line-height: 30px;
}
.input-uni-icon.data-v-788dd7a0 {
line-height: 30px;
}
.nav-bar-input.data-v-788dd7a0 {
height: 30px;
line-height: 30px;
padding: 0 5px;
font-size: 12px;
background-color: #f8f8f8;
}
+247
View File
@@ -0,0 +1,247 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const store_modules_user = require("../../store/modules/user.js");
const api_booking_users_index = require("../../api/booking/users/index.js");
const api_cms_mpMenu_index = require("../../api/cms/mp-menu/index.js");
const api_shop_merchant_index = require("../../api/shop/merchant/index.js");
const api_shop_users_index = require("../../api/shop/users/index.js");
const utils_common = require("../../utils/common.js");
const api_passport_login_index = require("../../api/passport/login/index.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
const tenantStore = store_modules_tenant.useTenantStore();
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
orderNo: void 0,
statusBarHeight: 104,
isLogin: false,
userInfo: {},
currMerchant: {},
merchantId: null,
fields: {},
logo: "",
bookingUser: {},
server: [],
order: [],
hideUser: true,
hideTools: true,
// 是否拥有场馆管理员权限
hasMerchantRole: false,
// 是否拥有场馆职员权限
hasMerchantClerkRole: false,
// 是否拥有超级管理员权限
hasSuperAdminRole: false,
scanType: "",
scanResult: ""
};
},
onLoad(option) {
if (option.orderNo) {
this.orderNo = option.orderNo;
}
this.reload();
},
methods: {
async reload(e) {
const app = this;
common_vendor.index.getSystemInfo({
success(data) {
if (data) {
app.statusBarHeight = data.statusBarHeight;
}
}
});
const tenantInfo = await tenantStore.fetchTenantInfo();
app.logo = tenantInfo.websiteLogo;
if (tenantInfo.fields) {
tenantInfo.fields.map((d) => {
const key = d.name;
app.fields[key] = d.value;
});
}
const userInfo = await userStore.fetchUserInfo();
if (Object.keys(userInfo).length > 0) {
app.isLogin = true;
if (app.orderNo) {
return common_vendor.index.redirectTo({
url: "/package/admin/order-scan?orderNo=" + app.orderNo
});
}
app.userInfo = userInfo;
common_vendor.index.setStorageSync("user_id", app.userInfo.userId);
app.hasMerchantRole = userInfo.roles.find((d) => d.roleCode === "merchant");
app.hasMerchantClerkRole = userInfo.roles.find((d) => d.roleCode === "merchantClerk");
app.hasSuperAdminRole = userInfo.roles.find((d) => d.roleCode === "superAdmin");
api_shop_merchant_index.pageMerchant({ merchantIds: userInfo.merchants, limit: 50 }).then((res) => {
app.merchantList = res.list.map((d, i) => {
if (i === 0) {
app.currMerchant = d;
app.merchantId = d.merchantId;
}
return {
text: d.merchantName,
value: d.merchantId
};
});
common_vendor.index.setStorageSync("merchantList", app.merchantList);
});
api_booking_users_index.getByPhone({
phone: userInfo.phone
}).then((data) => {
if (data) {
app.hideUser = false;
app.userInfo.ouid = data.userId;
app.userInfo = Object.assign({}, app.userInfo, data);
}
});
} else {
app.isLogin = false;
app.userInfo = {};
}
api_cms_mpMenu_index.pageMpMenu({ type: 4, limit: 100 }).then((res) => {
app.order = res.list.filter((d) => d.rows === 0);
app.server = res.list.filter((d) => d.rows === 0);
app.hideTools = false;
}).catch(() => {
common_vendor.index.showToast({
title: "请检查您的网络.",
icon: "none"
});
app.hideTools = false;
});
common_vendor.index.login({
success: (res) => {
api_passport_login_index.getWxOpenId({
code: res.code
}).then((response) => {
if (!app.userInfo.openid) {
api_shop_users_index.updateUsers({
userId: app.userInfo.ouid,
openid: response.openid,
sessionKey: response.session_key,
unionid: response.unionid
});
}
});
}
});
},
navTo(item) {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
} else {
if (item.path === "/package/admin/order-scan") {
common_vendor.index.showModal({
title: "直接使用微信扫一扫功能完成核销"
});
return false;
} else {
utils_common.openUrl(item);
}
}
},
// 弹出登录提示框
openLogin() {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
}
},
back() {
common_vendor.index.navigateBack();
},
goBack() {
return common_vendor.index.switchTab({
url: "/pages/user/user"
});
}
}
};
if (!Array) {
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_ws_admin_card2 = common_vendor.resolveComponent("ws-admin-card");
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uni_list_item2 = common_vendor.resolveComponent("uni-list-item");
const _easycom_uni_list2 = common_vendor.resolveComponent("uni-list");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_gap2 + _easycom_ws_admin_card2 + _easycom_uv_skeleton2 + _easycom_uni_card2 + _easycom_uni_list_item2 + _easycom_uni_list2 + _easycom_ws_login2)();
}
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
const _easycom_ws_admin_card = () => "../../uni_modules/ws-admin-card/components/ws-admin-card/ws-admin-card.js";
const _easycom_uv_skeleton = () => "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uni_list_item = () => "../../uni_modules/uni-list/components/uni-list-item/uni-list-item.js";
const _easycom_uni_list = () => "../../uni_modules/uni-list/components/uni-list/uni-list.js";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_gap + _easycom_ws_admin_card + _easycom_uv_skeleton + _easycom_uni_card + _easycom_uni_list_item + _easycom_uni_list + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
height: "20"
}),
b: common_vendor.o($options.openLogin),
c: common_vendor.p({
merchantList: _ctx.merchantList,
merchantId: $data.merchantId,
data: $data.userInfo,
["is-login"]: $data.isLogin
}),
d: $data.hideTools
}, $data.hideTools ? {
e: common_vendor.p({
rows: "2",
loading: $data.hideTools,
title: false
}),
f: common_vendor.p({
border: false,
padding: "18px 8px"
}),
g: common_vendor.p({
rows: "9",
loading: $data.hideTools,
title: false
}),
h: common_vendor.p({
border: false,
padding: "18px 8px"
})
} : common_vendor.e({
i: $data.hasMerchantRole || $data.hasMerchantClerkRole
}, $data.hasMerchantRole || $data.hasMerchantClerkRole ? {
j: common_vendor.f($data.server, (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: item.color ? item.color : "#333333",
c: common_vendor.o(($event) => $options.navTo(item), index),
d: "2fabd118-8-" + i0 + ",2fabd118-7",
e: common_vendor.p({
thumb: item.icon,
link: true
}),
f: index
};
}),
k: common_vendor.p({
border: false
})
} : {}, {
l: common_vendor.p({
border: false,
padding: 0
}),
m: common_vendor.sr("login", "2fabd118-9"),
n: common_vendor.o($options.reload),
o: common_vendor.p({
logo: $data.logo
}),
p: common_vendor.o((...args) => $options.goBack && $options.goBack(...args))
}));
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/admin/index.vue"]]);
wx.createPage(MiniProgramPage);
+12
View File
@@ -0,0 +1,12 @@
{
"navigationBarTitleText": "管理中心",
"usingComponents": {
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"ws-admin-card": "../../uni_modules/ws-admin-card/components/ws-admin-card/ws-admin-card",
"uv-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uni-list-item": "../../uni_modules/uni-list/components/uni-list-item/uni-list-item",
"uni-list": "../../uni_modules/uni-list/components/uni-list/uni-list",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="page"><uv-gap wx:if="{{a}}" u-i="2fabd118-0" bind:__l="__l" u-p="{{a}}"></uv-gap><ws-admin-card wx:if="{{c}}" bindopenLogin="{{b}}" u-i="2fabd118-1" bind:__l="__l" u-p="{{c}}"/><block wx:if="{{d}}"><uni-card wx:if="{{f}}" u-s="{{['d']}}" u-i="2fabd118-2" bind:__l="__l" u-p="{{f}}"><uv-skeleton wx:if="{{e}}" u-i="2fabd118-3,2fabd118-2" bind:__l="__l" u-p="{{e}}"></uv-skeleton></uni-card><uni-card wx:if="{{h}}" u-s="{{['d']}}" u-i="2fabd118-4" bind:__l="__l" u-p="{{h}}"><uv-skeleton wx:if="{{g}}" u-i="2fabd118-5,2fabd118-4" bind:__l="__l" u-p="{{g}}"></uv-skeleton></uni-card></block><block wx:else><uni-card wx:if="{{l}}" u-s="{{['d']}}" u-i="2fabd118-6" bind:__l="__l" u-p="{{l}}"><block wx:if="{{i}}"><view class="server" style="min-height:200px"><uni-list wx:if="{{k}}" u-s="{{['d']}}" u-i="2fabd118-7,2fabd118-6" bind:__l="__l" u-p="{{k}}"><block wx:for="{{j}}" wx:for-item="item" wx:key="f"><uni-list-item wx:if="{{item.e}}" u-s="{{['body']}}" bindclick="{{item.c}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"><view class="slot-box" slot="body"><text class="slot-text" style="{{'color:' + item.b}}">{{item.a}}</text></view></uni-list-item></block></uni-list></view></block></uni-card><ws-login wx:if="{{o}}" class="r" u-r="login" binddone="{{n}}" u-i="2fabd118-9" bind:__l="__l" u-p="{{o}}"/><view class="logout" bindtap="{{p}}"><view size="20" class="btn">返回</view></view></block></view>
+51
View File
@@ -0,0 +1,51 @@
page {
/* background: url('https://oss.wsdns.cn/20240502/75fc744657544a38a32f83a825688286.png') no-repeat; */
background-size: 100%;
background-repeat: no-repeat;
background-color: #f0f2f5;
width: 750rpx;
overflow-x: hidden;
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.uni-section .uni-section-header {
padding: 5px 5px !important;
}
.logout {
width: 300rpx;
margin: 0 auto;
padding: 10rpx 0 20rpx 0;
}
.logout .btn {
display: flex;
justify-content: center;
background-color: #fff;
border-radius: 30rpx;
padding: 12rpx 0;
color: #808080;
}
+352
View File
@@ -0,0 +1,352 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_shop_order_index = require("../../api/shop/order/index.js");
const api_booking_field_index = require("../../api/booking/field/index.js");
const api_shop_wechatDeposit_index = require("../../api/shop/wechatDeposit/index.js");
const store_modules_user = require("../../store/modules/user.js");
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
components: {},
data() {
return {
isLogin: false,
orderNo: "",
userId: 0,
form: {},
where: {
page: 1
},
canReset: false,
loadMore: "more",
logo: "",
items: ["全部订单", "未支付", "已支付", "已完成", "押金"],
orderStatus: ["未使用", "已完成", "已取消", "取消中", "退款申请中", "退款被拒绝", "退款成功", "客户端申请退款"],
payType: [
"余额支付",
"微信支付",
"会员卡支付",
"支付宝",
"现金",
"POS机",
"VIP月卡",
"VIP年卡",
"VIP次卡",
"IC月卡",
"IC年卡",
"IC次卡",
"免费",
"VIP充值卡",
"IC充值卡",
"积分支付",
"VIP季卡",
"IC季卡"
],
orderList: [],
styles: [
{
value: "button",
text: "按钮",
checked: true
},
{
value: "text",
text: "文字"
}
],
colors: ["#333333", "#4cd964", "#dd524d"],
current: 0,
colorIndex: 0,
activeColor: "#108001",
styleType: "text"
};
},
onLoad(option) {
this.orderNo = option.orderNo;
this.logo = common_vendor.index.getStorageSync("app_logo") ? common_vendor.index.getStorageSync("app_logo") : "https://oss.wsdns.cn/20240423/7f6878104a6d4427884721f412ab5441.png?x-oss-process=image/resize,m_fixed,w_100,h_100/quality,Q_90";
this.reload();
},
onShow() {
},
// 触底函数
onReachBottom() {
const app = this;
const { where } = this;
if (app.canReset) {
app.where.page = ++where.page;
app.reload();
}
},
methods: {
async reload() {
const app = this;
const userInfo = await userStore.fetchUserInfo();
if (Object.keys(userInfo).length > 0) {
app.isLogin = true;
}
const { where, userId, orderNo } = this;
console.log("userId: ", userId);
where.userId = userId;
api_shop_order_index.getByOrderNo(orderNo).then((data) => {
app.form = data;
if (data.orderStatus == 1) {
common_vendor.index.setNavigationBarTitle({
title: "订单核销"
});
}
common_vendor.index.hideLoading();
}).catch((err) => {
console.log("err: ", err);
app.form = {};
common_vendor.index.hideLoading();
});
},
onClickItem(e) {
const app = this;
const { where, userId } = this;
const index = e.currentIndex;
if (this.current !== e.currentIndex) {
this.current = e.currentIndex;
}
if (userId == 0) {
app.openLogin();
return;
}
if (index == 0) {
where.payStatus = void 0;
where.orderStatus = void 0;
}
if (index == 1) {
where.payStatus = 2;
}
if (index == 2) {
where.payStatus = 1;
}
if (index == 3) {
where.orderStatus = 1;
}
if (index == 4) {
api_shop_wechatDeposit_index.pageWechatDeposit({
uid: common_vendor.index.getStorageSync("user_id")
}).then((res) => {
console.log("res: ", res);
app.orderList = res.list;
});
return false;
}
this.reload();
},
// 弹出登录提示框
// openLogin() {
// if (!this.isLogin) {
// this.$refs.login.open('bottom');
// return false;
// }
// },
// 弹出登录提示框
async openLogin() {
if (!this.isLogin) {
this.$refs.login.open("bottom");
}
},
save() {
const app = this;
const { orderNo } = this;
common_vendor.index.showLoading({
title: "请求中."
});
api_booking_field_index.verification(orderNo).then((res) => {
common_vendor.index.showToast({
title: "核销成功",
icon: "success"
});
common_vendor.index.hideLoading();
app.reload();
}).catch((res) => {
common_vendor.index.showToast({
title: res.message || "请检查您的网络.",
icon: "none"
});
common_vendor.index.hideLoading();
app.reload();
});
}
}
};
if (!Array) {
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uv_parse2 = common_vendor.resolveComponent("uv-parse");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_parse2 + _easycom_uv_gap2 + _easycom_uv_button2 + _easycom_ws_login2)();
}
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
const _easycom_uv_cell_group = () => "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uv_parse = () => "../../uni_modules/uv-parse/components/uv-parse/uv-parse.js";
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_parse + _easycom_uv_gap + _easycom_uv_button + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.isLogin
}, $data.isLogin ? common_vendor.e({
b: common_vendor.p({
title: `${$data.form.merchantName}`,
label: ` `,
cellStyle: {
padding: "0",
paddingBottom: "5px"
},
border: false
}),
c: common_vendor.f($data.form.orderInfo, (item, index, i0) => {
return {
a: "6e3de76a-3-" + i0 + ",6e3de76a-1",
b: common_vendor.p({
title: `${item.fieldName}`,
label: `${item.comments}`,
cellStyle: {
padding: "0",
paddingBottom: "5px"
},
value: `¥${item.price}`,
border: false
}),
c: index
};
}),
d: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
e: common_vendor.t($data.form.totalPrice),
f: common_vendor.t($data.form.payPrice),
g: common_vendor.p({
title: "预定信息",
border: false,
["is-shadow"]: false,
padding: 0
}),
h: $data.form.orderNo
}, $data.form.orderNo ? common_vendor.e({
i: common_vendor.p({
title: `姓名`,
value: `${$data.form.realName}`,
cellStyle: {
padding: "8px"
}
}),
j: common_vendor.p({
title: `手机号码`,
value: `${$data.form.phone}`,
cellStyle: {
padding: "8px"
}
}),
k: common_vendor.p({
title: `订单号`,
value: `${$data.form.orderId}`,
cellStyle: {
padding: "8px"
}
}),
l: common_vendor.p({
content: $data.form.orderNo,
selectable: true
}),
m: common_vendor.p({
title: `订单编号`,
cellStyle: {
padding: "8px"
}
}),
n: $data.form.orderStatus == 0
}, $data.form.orderStatus == 0 ? {
o: common_vendor.t(`${$data.orderStatus[$data.form.orderStatus]}`)
} : {}, {
p: $data.form.orderStatus == 1
}, $data.form.orderStatus == 1 ? {
q: common_vendor.t(`${$data.orderStatus[$data.form.orderStatus]}`)
} : {}, {
r: common_vendor.p({
title: `订单状态`,
cellStyle: {
padding: "8px"
}
}),
s: common_vendor.p({
title: `下单时间`,
value: `${$data.form.createTime}`,
cellStyle: {
padding: "8px"
}
}),
t: common_vendor.p({
title: `支付方式`,
value: `${$data.payType[$data.form.payType]}`,
cellStyle: {
padding: "8px"
}
}),
v: common_vendor.p({
title: `优惠说明`,
value: `${$data.form.couponDesc ? $data.form.couponDesc : "无"}`,
cellStyle: {
padding: "8px"
},
border: false
}),
w: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff",
padding: "8px 0"
},
border: false
}),
x: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
})
}) : {}, {
y: common_vendor.p({
height: "20"
}),
z: $data.form.orderStatus == 0
}, $data.form.orderStatus == 0 ? {
A: common_vendor.o($options.save),
B: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #ccff66, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "确认核销"
})
} : {}) : {
C: common_vendor.o($options.openLogin),
D: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #ccff66, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "请先登录"
}),
E: common_vendor.sr("login", "6e3de76a-18"),
F: common_vendor.o($options.reload),
G: common_vendor.p({
logo: $data.logo
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/admin/order-scan.vue"]]);
wx.createPage(MiniProgramPage);
+14
View File
@@ -0,0 +1,14 @@
{
"navigationBarTitleText": "订单核销",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"usingComponents": {
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
"uv-cell-group": "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group",
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
"uv-parse": "../../uni_modules/uv-parse/components/uv-parse/uv-parse",
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
"uv-button": "../../uni_modules/uv-button/components/uv-button/uv-button",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view wx:if="{{a}}" class="order"><uni-card wx:if="{{g}}" u-s="{{['d']}}" u-i="6e3de76a-0" bind:__l="__l" u-p="{{g}}"><view class="order-body web-cell web-cell-align-top"><view class="web-cell-content"><uv-cell-group wx:if="{{d}}" u-s="{{['d']}}" u-i="6e3de76a-1,6e3de76a-0" bind:__l="__l" u-p="{{d}}"><uv-cell wx:if="{{b}}" u-i="6e3de76a-2,6e3de76a-1" bind:__l="__l" u-p="{{b}}"/><block wx:for="{{c}}" wx:for-item="item" wx:key="c"><uv-cell wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"/></block></uv-cell-group></view></view><view slot="actions" class="card-actions"><view class="web-text-heading">合计:¥{{e}}</view><view class="web-text-danger">实付:¥{{f}}</view></view></uni-card><block wx:if="{{h}}"><uni-card wx:if="{{x}}" u-s="{{['d']}}" u-i="6e3de76a-4" bind:__l="__l" u-p="{{x}}"><view class="web-cell web-cell-align-top"><uv-cell-group wx:if="{{w}}" u-s="{{['d']}}" u-i="6e3de76a-5,6e3de76a-4" bind:__l="__l" u-p="{{w}}"><uv-cell wx:if="{{i}}" u-i="6e3de76a-6,6e3de76a-5" bind:__l="__l" u-p="{{i}}"/><uv-cell wx:if="{{j}}" u-i="6e3de76a-7,6e3de76a-5" bind:__l="__l" u-p="{{j}}"/><uv-cell wx:if="{{k}}" u-i="6e3de76a-8,6e3de76a-5" bind:__l="__l" u-p="{{k}}"/><uv-cell wx:if="{{m}}" u-s="{{['value']}}" u-i="6e3de76a-9,6e3de76a-5" bind:__l="__l" u-p="{{m}}"><uv-parse u-i="6e3de76a-10,6e3de76a-9" bind:__l="__l" u-p="{{l}}" slot="value"></uv-parse></uv-cell><uv-cell wx:if="{{r}}" u-s="{{['value']}}" u-i="6e3de76a-11,6e3de76a-5" bind:__l="__l" u-p="{{r}}"><view slot="value"><text wx:if="{{n}}" class="web-text-primary">{{o}}</text><text wx:if="{{p}}" class="web-text-success">{{q}}</text></view></uv-cell><uv-cell wx:if="{{s}}" u-i="6e3de76a-12,6e3de76a-5" bind:__l="__l" u-p="{{s}}"/><uv-cell wx:if="{{t}}" u-i="6e3de76a-13,6e3de76a-5" bind:__l="__l" u-p="{{t}}"/><uv-cell wx:if="{{v}}" u-i="6e3de76a-14,6e3de76a-5" bind:__l="__l" u-p="{{v}}"/></uv-cell-group></view></uni-card></block><uv-gap wx:if="{{y}}" u-i="6e3de76a-15" bind:__l="__l" u-p="{{y}}"></uv-gap><view wx:if="{{z}}" class="save-btn"><uv-button wx:if="{{B}}" bindclick="{{A}}" u-i="6e3de76a-16" bind:__l="__l" u-p="{{B}}"></uv-button></view></view><view wx:else><view class="login-bar"><view class="login-btn"><uv-button wx:if="{{D}}" bindclick="{{C}}" u-i="6e3de76a-17" bind:__l="__l" u-p="{{D}}"></uv-button></view></view><ws-login wx:if="{{G}}" class="r" u-r="login" binddone="{{F}}" u-i="6e3de76a-18" bind:__l="__l" u-p="{{G}}"/></view>
+120
View File
@@ -0,0 +1,120 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.content {
display: flex;
justify-content: center;
align-items: center;
height: 150px;
text-align: center;
}
.content-text {
font-size: 14px;
color: #666;
}
.color-tag {
width: 25px;
height: 25px;
}
.uni-list {
flex: 1;
}
.order .order-title {
padding: 20rpx 0;
border-bottom: 1px #eee solid;
}
.order .order-title .merchant-avatar {
margin-right: 12rpx;
}
.order .order-title .btn-status {
font-size: 30rpx;
display: flex;
}
.order .order-body {
padding: 16px 0;
}
.ele-flex {
display: flex;
justify-content: space-between;
}
.card-actions {
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 0 10px;
align-items: center;
height: 45px;
border-top: 1px #eee solid;
}
.card-actions .web-text-heading {
font-size: 30rpx;
font-weight: 500;
}
.card-actions .web-text-danger {
font-size: 30rpx;
font-weight: 500;
}
.card-actions-item {
display: flex;
flex-direction: row;
align-items: center;
}
.card-actions-item-text {
font-size: 12px;
color: #666;
margin-left: 5px;
}
.btn-status {
font-size: 30rpx;
display: flex;
}
.close {
top: 60rpx !important;
}
.save-btn {
width: 700rpx;
left: 25rpx;
height: 80rpx;
position: fixed;
bottom: 30rpx;
}
.qrcode {
margin-top: 30rpx;
text-align: center;
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
}
.login-bar {
width: 600rpx;
height: 40vh;
margin: auto;
display: flex;
}
.login-bar .login-btn {
width: 500rpx;
margin: auto;
}