已支付订单列表: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
+378
View File
@@ -0,0 +1,378 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_shop_order_index = require("../../api/shop/order/index.js");
const api_shop_wechatDeposit_index = require("../../api/shop/wechatDeposit/index.js");
const _sfc_main = {
components: {},
data() {
return {
isLogin: false,
orderId: 0,
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: "文字"
}
],
h5_url: "",
colors: ["#333333", "#4cd964", "#dd524d"],
current: 0,
colorIndex: 0,
activeColor: "#108001",
styleType: "text"
};
},
onLoad(option) {
this.orderId = option.id;
this.openLogin();
this.reload();
},
onShow() {
this.openLogin();
},
// 触底函数
onReachBottom() {
const app = this;
const { where } = this;
if (app.canReset) {
app.where.page = ++where.page;
app.reload();
}
},
methods: {
reload() {
const app = this;
const { where, userId, orderId } = this;
if (userId == 0) {
app.openLogin();
return;
}
where.userId = userId;
common_vendor.index.showLoading({
title: "数据读取中."
});
api_shop_order_index.getOrder(orderId).then((data) => {
console.log("data: ", data);
app.form = data;
if (data.orderStatus == 1) {
common_vendor.index.setNavigationBarTitle({
title: "订单详情(已完成)"
});
}
common_vendor.index.hideLoading();
});
const h5_url = common_vendor.index.getStorageSync("h5_url");
const tid = common_vendor.index.getStorageSync("TenantId");
if (h5_url) {
app.h5_url = h5_url;
} else {
app.h5_url = `http://${tid}.h5.wsdns.cn`;
}
},
navTo(url) {
common_vendor.index.navigateTo({
url
});
},
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();
},
// 弹出登录提示框
async openLogin() {
this.userId = common_vendor.index.getStorageSync("user_id");
if (!this.userId) {
this.$refs.login.open("bottom");
return false;
}
}
}
};
if (!Array) {
const _easycom_uv_qrcode2 = common_vendor.resolveComponent("uv-qrcode");
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_count_to2 = common_vendor.resolveComponent("uv-count-to");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
(_easycom_uv_qrcode2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_parse2 + _easycom_uv_gap2 + _easycom_uv_count_to2 + _easycom_uv_button2 + _easycom_ws_login2)();
}
const _easycom_uv_qrcode = () => "../../uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode.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_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_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_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
if (!Math) {
(_easycom_uv_qrcode + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_parse + _easycom_uv_gap + _easycom_uv_count_to + _easycom_uv_button + _easycom_ws_login)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.form.orderId
}, $data.form.orderId ? common_vendor.e({
b: $data.form.payStatus == 1 && $data.form.orderStatus == 0
}, $data.form.payStatus == 1 && $data.form.orderStatus == 0 ? {
c: common_vendor.sr("qrcode", "69543d40-0"),
d: common_vendor.p({
size: "280rpx",
options: {
data: $data.form.orderNo,
foregroundImageSrc: $data.form.merchantAvatar,
margin: 10,
foregroundImagePadding: 4,
foregroundImageHeight: 30,
foregroundImageWidth: 30,
foregroundImageBorderRadius: 4
},
value: `${$data.h5_url}#/package/admin/order-scan?orderNo=${$data.form.orderNo}`
})
} : {}, {
e: common_vendor.p({
title: `${$data.form.merchantName}`,
label: ` `,
cellStyle: {
padding: "0",
paddingBottom: "5px"
},
border: false
}),
f: common_vendor.f($data.form.orderInfo, (item, index, i0) => {
return common_vendor.e({
a: "69543d40-4-" + i0 + ",69543d40-2",
b: common_vendor.p({
title: `${item.fieldName}`,
label: `${item.comments}`,
cellStyle: {
padding: "0",
paddingBottom: "5px"
},
value: `¥${item.price}`,
border: item.isChildren
}),
c: item.isChildren
}, item.isChildren ? {
d: "69543d40-5-" + i0 + ",69543d40-2",
e: common_vendor.p({
label: `成人票 ¥50`,
value: `x ${item.adultNum}`,
cellStyle: {
padding: "0",
paddingBottom: "5px"
},
border: false
})
} : {}, {
f: item.isChildren
}, item.isChildren ? {
g: "69543d40-6-" + i0 + ",69543d40-2",
h: common_vendor.p({
label: `儿童票 ¥35`,
value: `x ${item.childrenNum}`,
cellStyle: {
padding: "0",
paddingBottom: "5px"
},
border: false
})
} : {}, {
i: index
});
}),
g: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
h: common_vendor.t($data.form.totalPrice),
i: common_vendor.t($data.form.payPrice),
j: common_vendor.p({
title: "预定信息",
border: false,
["is-shadow"]: false,
padding: 0
}),
k: $data.form.orderNo
}, $data.form.orderNo ? common_vendor.e({
l: common_vendor.p({
title: `姓名`,
value: `${$data.form.realName}`,
cellStyle: {
padding: "8px"
}
}),
m: common_vendor.p({
title: `手机号码`,
value: `${$data.form.phone}`,
cellStyle: {
padding: "8px"
}
}),
n: common_vendor.p({
title: `订单号`,
value: `${$data.form.orderId}`,
cellStyle: {
padding: "8px"
}
}),
o: common_vendor.p({
content: $data.form.orderNo,
selectable: true
}),
p: common_vendor.p({
title: `订单编号`,
cellStyle: {
padding: "8px"
}
}),
q: $data.form.payStatus == 0
}, $data.form.payStatus == 0 ? {} : {
r: common_vendor.t($data.orderStatus[$data.form.orderStatus])
}, {
s: common_vendor.p({
title: `订单状态`,
cellStyle: {
padding: "8px"
}
}),
t: common_vendor.p({
title: `下单时间`,
value: `${$data.form.createTime}`,
cellStyle: {
padding: "8px"
}
}),
v: common_vendor.p({
title: `支付方式`,
value: `${$data.payType[$data.form.payType]}`,
cellStyle: {
padding: "8px"
}
}),
w: common_vendor.p({
title: `优惠说明`,
value: `${$data.form.couponDesc ? $data.form.couponDesc : "无"}`,
cellStyle: {
padding: "8px"
},
border: false
}),
x: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff",
padding: "8px 0"
},
border: false
}),
y: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
})
}) : {}, {
z: common_vendor.p({
height: "20"
}),
A: $data.form.payStatus == 0
}, $data.form.payStatus == 0 ? {
B: common_vendor.p({
decimals: "2",
duration: "30",
color: "#ebcf00",
bold: true,
endVal: $data.form.payPrice
}),
C: common_vendor.o(($event) => $options.navTo(`/package/booking/confirm?id=${$data.form.orderId}`)),
D: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "0 30px 30px 0",
color: "#ffffff",
border: "none",
padding: "22px 30px"
},
text: "去支付"
})
} : {}, {
E: common_vendor.sr("login", "69543d40-21"),
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/order/detail.vue"]]);
wx.createPage(MiniProgramPage);
+14
View File
@@ -0,0 +1,14 @@
{
"navigationBarTitleText": "订单详情",
"usingComponents": {
"uv-qrcode": "../../uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode",
"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-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",
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
}
}
+1
View File
@@ -0,0 +1 @@
<view wx:if="{{a}}" class="order"><view wx:if="{{b}}" class="qrcode"><uv-qrcode wx:if="{{d}}" class="r" u-r="qrcode" u-i="69543d40-0" bind:__l="__l" u-p="{{d}}"></uv-qrcode><text class="web-text-secondary">核销码</text></view><uni-card wx:if="{{j}}" u-s="{{['d']}}" u-i="69543d40-1" bind:__l="__l" u-p="{{j}}"><view class="order-body web-cell web-cell-align-top"><view class="web-cell-content"><uv-cell-group wx:if="{{g}}" u-s="{{['d']}}" u-i="69543d40-2,69543d40-1" bind:__l="__l" u-p="{{g}}"><uv-cell wx:if="{{e}}" u-i="69543d40-3,69543d40-2" bind:__l="__l" u-p="{{e}}"/><block wx:for="{{f}}" wx:for-item="item" wx:key="i"><uv-cell wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"/><uv-cell wx:if="{{item.c}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"/><uv-cell wx:if="{{item.f}}" u-i="{{item.g}}" bind:__l="__l" u-p="{{item.h}}"/></block></uv-cell-group></view></view><view slot="actions" class="card-actions"><view class="web-text-heading">合计:¥{{h}}</view><view class="web-text-danger">实付:¥{{i}}</view></view></uni-card><block wx:if="{{k}}"><uni-card wx:if="{{y}}" u-s="{{['d']}}" u-i="69543d40-7" bind:__l="__l" u-p="{{y}}"><view class="web-cell web-cell-align-top"><uv-cell-group wx:if="{{x}}" u-s="{{['d']}}" u-i="69543d40-8,69543d40-7" bind:__l="__l" u-p="{{x}}"><uv-cell wx:if="{{l}}" u-i="69543d40-9,69543d40-8" bind:__l="__l" u-p="{{l}}"/><uv-cell wx:if="{{m}}" u-i="69543d40-10,69543d40-8" bind:__l="__l" u-p="{{m}}"/><uv-cell wx:if="{{n}}" u-i="69543d40-11,69543d40-8" bind:__l="__l" u-p="{{n}}"/><uv-cell wx:if="{{p}}" u-s="{{['value']}}" u-i="69543d40-12,69543d40-8" bind:__l="__l" u-p="{{p}}"><uv-parse u-i="69543d40-13,69543d40-12" bind:__l="__l" u-p="{{o}}" slot="value"></uv-parse></uv-cell><uv-cell wx:if="{{s}}" u-s="{{['value']}}" u-i="69543d40-14,69543d40-8" bind:__l="__l" u-p="{{s}}"><view slot="value"><view wx:if="{{q}}"><label style="color:#ff0000">未支付</label></view><view wx:else>{{r}}</view></view></uv-cell><uv-cell wx:if="{{t}}" u-i="69543d40-15,69543d40-8" bind:__l="__l" u-p="{{t}}"/><uv-cell wx:if="{{v}}" u-i="69543d40-16,69543d40-8" bind:__l="__l" u-p="{{v}}"/><uv-cell wx:if="{{w}}" u-i="69543d40-17,69543d40-8" bind:__l="__l" u-p="{{w}}"/></uv-cell-group></view></uni-card></block><uv-gap wx:if="{{z}}" u-i="69543d40-18" bind:__l="__l" u-p="{{z}}"></uv-gap><view wx:if="{{A}}" class="checkout-car"><view class="car-total"><text style="color:#ebcf00">¥</text><uv-count-to wx:if="{{B}}" u-i="69543d40-19" bind:__l="__l" u-p="{{B}}"></uv-count-to></view><uv-button wx:if="{{D}}" class="save-btn" bindclick="{{C}}" u-i="69543d40-20" bind:__l="__l" u-p="{{D}}"></uv-button></view><ws-login wx:if="{{G}}" class="r" u-r="login" binddone="{{F}}" u-i="69543d40-21" bind:__l="__l" u-p="{{G}}"/></view>
+126
View File
@@ -0,0 +1,126 @@
/**
* 这里是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;
}
.qrcode {
margin-top: 30rpx;
text-align: center;
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
}
.checkout-car {
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 {
color: #ccc;
display: flex;
align-items: center;
padding: 0 20rpx;
}
.checkout-car .car-total {
display: flex;
color: #ebcf00;
align-items: center;
padding-left: 40rpx;
}
+32
View File
@@ -0,0 +1,32 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {};
},
methods: {}
};
if (!Array) {
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
_easycom_uni_card2();
}
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
if (!Math) {
_easycom_uni_card();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.p({
title: "店铺名称",
thumbnail: "https://oss.wsdns.cn/20230722/5e7d3ea18c7f43acae8b7ea82bab7cbc.png",
extra: "待支付"
}),
b: common_vendor.p({
title: "店铺名称",
thumbnail: "https://oss.wsdns.cn/20230722/5e7d3ea18c7f43acae8b7ea82bab7cbc.png",
extra: "待支付"
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-fed9da68"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/order/index.vue"]]);
wx.createPage(MiniProgramPage);
+7
View File
@@ -0,0 +1,7 @@
{
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": false,
"usingComponents": {
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card"
}
}
+1
View File
@@ -0,0 +1 @@
<view class="data-v-fed9da68"><uni-card wx:if="{{a}}" class="data-v-fed9da68" u-s="{{['d']}}" u-i="fed9da68-0" bind:__l="__l" u-p="{{a}}"><view class="order-info data-v-fed9da68"><view class="goods-image data-v-fed9da68"><image class="data-v-fed9da68" src="https://static.yoshop.xany6.com/20190610131953961df5569.PNG" mode="aspectFill"></image></view><view class="info data-v-fed9da68"><text class="data-v-fed9da68">订单编号:11479</text><text class="data-v-fed9da68">商品名称:脱单邮局二维码</text><text class="data-v-fed9da68">商品金额:¥10</text><text class="data-v-fed9da68">备注信息:获取微信</text><text class="data-v-fed9da68">下单时间:2023-10-20 13:20:05</text></view></view></uni-card><uni-card wx:if="{{b}}" class="data-v-fed9da68" u-s="{{['d']}}" u-i="fed9da68-1" bind:__l="__l" u-p="{{b}}"><view class="order-info data-v-fed9da68"><view class="goods-image data-v-fed9da68"><image class="data-v-fed9da68" src="https://static.yoshop.xany6.com/20190610131953961df5569.PNG" mode="aspectFill"></image></view><view class="info data-v-fed9da68"><text class="data-v-fed9da68">订单编号:11479</text><text class="data-v-fed9da68">商品名称:脱单邮局二维码</text><text class="data-v-fed9da68">商品金额:¥10</text><text class="data-v-fed9da68">备注信息:获取微信</text><text class="data-v-fed9da68">下单时间:2023-10-20 13:20:05</text></view></view></uni-card></view>
+42
View File
@@ -0,0 +1,42 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.order-info.data-v-fed9da68 {
display: flex;
}
.order-info .goods-image image.data-v-fed9da68 {
width: 180rpx;
height: 180rpx;
}
.order-info .info.data-v-fed9da68 {
display: flex;
flex-direction: column;
flex: 1;
margin-left: 12rpx;
padding: 12rpx 20rpx;
line-height: 1.6rem;
border-radius: 10rpx;
background-color: #f8f8f8;
}