文创商城订单列表相关代码

lu_quan_dev
chenfeng 10 months ago
parent 20460279a9
commit 3ce0271116
  1. 7
      common/config.js
  2. 2
      subPageC/orderShop/cancelStep.vue
  3. 6
      subPageC/orderShop/orderCancel.vue
  4. 193
      subPageC/orderShop/orderDetail.vue
  5. 41
      subPageC/orderShop/orderList.vue

@ -213,6 +213,13 @@ module.exports = {
getHomestayOrderList: PWPATH + "/admin-api/homestay/HotelOrder/selectPageUser", // 获取用户全部民宿订单列表
getHomestayOrderRefund: PWPATH + "/admin-api/homestay/HotelOrder/getHotelRefundLog", // 获取用户民宿退款信息
//文创商城
getMerchantOrderList: PWPATH +"/admin-api/homestay/merchantOrder/selectPageUserMerchantOrder",//获取文创商城订单列表
getMerchantOrderDetails: PWPATH +"/admin-api/homestay/merchantOrder/selectDetailsUserMerchantOrder",//获取文创商城订单详情
getMerchantOrderCancelOrder: PWPATH +"/admin-api/homestay/merchantOrder/cancelOrder",//文创商城-取消订单
getMerchantDictDataList: PWPATH + "/admin-api/homestay/merchantOrder/getDictDataList",//文创商城订单取消原因字典值
getMerchantRefundLog: PWPATH + "/admin-api/homestay/merchantOrder/getMerchantRefundLog",//文创商城订单查询退款进度
//商品相关
selectAppGoodsPage: PWPATH + "/admin-api/homestay/merchantOrder/selectAppGoodsPage", // 获取商品列表
selectAppGoodsDetails: PWPATH + "/admin-api/homestay/merchantOrder/selectAppGoodsDetails", // 获取商品详情

@ -38,7 +38,7 @@
let data = {
'orderId': orderId
}
this.$Request.get(this.$config.getHomestayOrderRefund, data, null, null, false, true).then((res) => {
this.$Request.get(this.$config.getMerchantRefundLog, data, null, null, false, true).then((res) => {
console.log(res)
if (res.code == 0) {
this.homestayOrderRefund = res.data

@ -37,7 +37,7 @@
methods: {
getInitPage(id) {
this.$Request.get(this.$config.getDictDataList, null, null, null, false, true).then((res) => {
this.$Request.get(this.$config.getMerchantDictDataList, null, null, null, false, true).then((res) => {
this.cancelList = res.data
}).catch(() => {
@ -54,12 +54,12 @@
submit() {
const userInfo = uni.getStorageSync("userInfo");
let parame = {
id: this.orderId,
orderId: this.orderId,
openid: userInfo.openid,
cancelType: this.current,
}
this.$Request.get(this.$config.userCancelUpdateOrder, parame, null, null, false, null).then((res) => {
this.$Request.get(this.$config.getMerchantOrderCancelOrder, parame, null, null, false, true).then((res) => {
if (res.code == "0") {
uni.showToast({
title: '订单取消成功',

@ -5,20 +5,20 @@
<view class="order-top">
<view class="state row">
<image mode="widthFix"
:src="'https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/'+stateImg(homestayOrderData.orderStatus)">
:src="'https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/'+stateImg(merchantOrderData.orderStatus)">
</image>
{{homestayOrderData.status}}
{{merchantOrderData.status}}
</view>
<view class="tip">
<view v-if="homestayOrderData.orderStatus == '2'||homestayOrderData.orderStatus == '3'">
{{homestayOrderData.cancelReason}}
<view v-if="merchantOrderData.orderStatus == '2'||merchantOrderData.orderStatus == '3'||merchantOrderData.orderStatus == '4'">
{{merchantOrderData.cancelReason}}
</view>
<view v-else>{{promptText(homestayOrderData.orderStatus)}}</view>
<view v-else>{{promptText(merchantOrderData.orderStatus)}}</view>
</view>
<!-- <view class="time" v-if="homestayOrderData.orderStatus == '0'">25:25</view> -->
</view>
<view class="order-top-btn m-t-40 row" v-if="homestayOrderData.orderStatus == '0'">
<view class="order-top-btn m-t-40 row" v-if="merchantOrderData.orderStatus == '0'">
<view class=" col-12">
<view class="pay-btn" @click="payOrder">去支付</view>
</view>
@ -26,9 +26,9 @@
<view class="cancel-btn" @click="cacelOrder">取消订单</view>
</view>
</view><view class="order-top-btn m-t-40"
v-else-if="homestayOrderData.orderStatus != '1'">
v-else-if="merchantOrderData.orderStatus != '1'">
<view class="col-24">
<view class="pay-btn" @click="toHomeStayBookingPage(homestayOrderData.hotelId)">再次预订</view>
<view class="pay-btn" @click="toHomeStayBookingPage(merchantOrderData.goodsId)">再次预订</view>
</view>
</view>
@ -36,12 +36,12 @@
<view class="pay-btn">再次预订</view>
</view> -->
<view class="row describe"
v-if="homestayOrderData.orderStatus == '3' ||homestayOrderData.orderStatus == '7' || homestayOrderData.orderStatus == '8' ">
v-if="merchantOrderData.orderStatus == '3' ||merchantOrderData.orderStatus == '4' ">
<view class="dec col">退款进度
<text v-if="homestayOrderData.orderStatus == '7'">发起退款申请</text>
<text v-if="merchantOrderData.orderStatus == '3'">发起退款申请</text>
<text v-else>退款成功</text>
</view>
<view class="btn" @click="toRefundPage(homestayOrderData.id)">查看详情</view>
<view class="btn" @click="toRefundPage(merchantOrderData.id)">查看详情</view>
</view>
</view>
@ -58,30 +58,31 @@
<view class="col row">
<view class="label">在线支付</view>
<view class="content">
<text class="price">{{homestayOrderData.orderAmount}}</text>
<text class="price">{{merchantOrderData.orderAmount}}</text>
</view>
</view>
<!-- <view class="detail-btn">详情</view> -->
</view>
<view class="v-form-line"></view>
<view class="v-form-item row">
<view class="label">发票报销</view>
<view class="content">如需发票请向酒店前台索取 </view>
</view>
<!-- <view class="v-form-line"></view>-->
<!-- <view class="v-form-item row">-->
<!-- <view class="label">发票报销</view>-->
<!-- <view class="content">如需发票请向酒店前台索取 </view>-->
<!-- </view>-->
</view>
</view>
<view class="v-card order container-fluid m-t-24">
<view class="v-order-info row">
<view class="info-image">
<image :src="rootPath+homestayOrderData.hotelLogo" mode="widthFix"></image>
<image :src="merchantOrderData.picUrls" mode="widthFix"></image>
</view>
<view class="info-content">
<view class="title">{{homestayOrderData.hotelName}}</view>
<view class="address">{{homestayOrderData.addressInfo}}</view>
<view class="title">{{merchantOrderData.merchantName}}</view>
<view class="title">{{merchantOrderData.goodsName}}</view>
<view class="title">¥{{merchantOrderData.goodsPrice}}*{{merchantOrderData.goodsNum}}</view>
</view>
</view>
<view class="row v-order-info-btn flex-align-center">
<!-- <view class="row v-order-info-btn flex-align-center">
<view class="btn col-12 row flex-align-center flex-justify-center" @click="navigation">
<image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon_map.png"></image>地图导航
</view>
@ -89,54 +90,63 @@
@click="callPhone(homestayOrderData.serviceNumber)">
<image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon_phone.png"></image>咨询电话
</view>
</view>
</view> -->
</view>
<view class="v-card order container-fluid m-t-24">
<view class="v-form-date row flex-align-center" v-for="item in homestayOrderData.dateList">
<!-- <view class="v-card order container-fluid m-t-24"> -->
<!-- <view class="v-form-date row flex-align-center" v-for="item in homestayOrderData.dateList">
<view class="start"><text class="date">{{getData(item.checkTime)}}</text></view>
<text class="mid">{{item.day}}</text>
<view class="end"><text class="date">{{getData(item.checkOutTime)}}</text></view>
</view>
<view class="v-form-name m-t-12">{{homestayOrderData.houseName}}</view>
<view class="v-form-tip">
</view> -->
<!-- <view class="v-form-name m-t-12">{{merchantOrderData.houseName}}</view> -->
<!-- <view class="v-form-tip"> -->
<!-- <text>无早餐</text> -->
<!-- <text>{{homestayOrderData.bedWide +'米宽'+homestayOrderData.hotelTypeName}}</text> -->
<text>最多入住{{homestayOrderData.guest}}</text>
<text>{{homestayOrderData.houseArea}}</text>
</view>
<view class="v-form bg m-t-24">
<view class="v-form-item row">
<view class="label">入住人</view>
<view class="content">{{homestayOrderData.bookerusername}}</view>
</view>
<view class="v-form-item row">
<view class="label">联系手机</view>
<view class="content">{{homestayOrderData.bookerphone}}</view>
</view>
<view class="v-form-item row">
<!-- <text>最多入住{{homestayOrderData.guest}}</text>
<text>{{homestayOrderData.houseArea}}</text> -->
<!-- </view> -->
<!-- <view class="v-form bg m-t-24"> -->
<!-- <view class="v-form-item row">
<view class="label">身份证号</view>
<view class="content">{{homestayOrderData.idcard}}</view>
</view>
</view>
</view>
</view> -->
<!-- </view> -->
<!-- </view> -->
<view class="v-card order container-fluid m-t-24 m-b-24">
<view class="v-form-title">订单信息</view>
<view class="v-form">
<view class="v-form-item row">
<view class="label">下单人</view>
<view class="content">{{merchantOrderData.customerName}}</view>
</view>
<view class="v-form-item row">
<view class="label">联系电话</view>
<view class="content">{{merchantOrderData.customerPhone}}</view>
</view>
<view class="v-form-item row">
<view class="label">订单号</view>
<view class="content">{{homestayOrderData.orderNumber}}</view>
<view class="content">{{merchantOrderData.orderNumber}}</view>
</view>
<view class="v-form-item row">
<view class="label">订单金额</view>
<view class="content">{{merchantOrderData.orderAmount}}</view>
</view>
<view class="v-form-item row" v-if="merchantOrderData.orderStatus == '1'">
<view class="label">实付金额</view>
<view class="content">{{merchantOrderData.actualAmount}}</view>
</view>
<view class="v-form-item row">
<view class="label">下单时间</view>
<view class="content">{{homestayOrderData.orderTime}}</view>
<view class="content">{{merchantOrderData.orderTime}}</view>
</view>
</view>
</view>
<u-popup :show="isPayPopup" mode="bottom" @close="closePay" round="10">
<f-pay :show-title="false" :show="isPayPopup" :order="homestayOrderData"
:payMoney="homestayOrderData.orderAmount" :tradeNo="homestayOrderData.orderNumber"
<f-pay :show-title="false" :show="isPayPopup" :order="merchantOrderData"
:payMoney="merchantOrderData.orderAmount" :tradeNo="merchantOrderData.orderNumber"
@payResult="payResult"></f-pay>
</u-popup>
</view>
@ -157,12 +167,12 @@
isPayPopup: false,
rootPath: this.$config.ROOTPATH,
title: '订单详情',
homestayOrderData: {
'id': 1734877929,
merchantOrderData: {
'id': '',
'orderNumber': '',
'hotelId': 0,
'hotelName': '',
'addressInfo': '',
'merchantId': 0,
'customerPhone': '',
'actualAmount': '',
'orderAmount': 0,
'orderTime': '',
'payTime': null,
@ -170,42 +180,33 @@
'status': '',
'orderStatus': '0',
'belongingPayOrderId': '',
'bedNum': 0,
'hotelLogo': '',
'houseName': '',
'serviceNumber': '',
'bedWide': 0,
'houseArea': 0,
'guest': 0,
'bedNumTwo': 0,
'hotelTypeName': '',
'bookerusername': '',
'bookerphone': '',
'goodsNum': 0,
'picUrls': '',
'merchantName': '',
'goodsName': '',
'goodsPrice': 0,
'customerName': '',
'customerphone': '',
'cancelReason': null,
'dateList': [{
'checkTime': '',
'checkOutTime': '',
'day': 0
}],
'no': null
}
}
},
onLoad(options) {
this.getHomestayOrderDetail(options.id)
this.getMerchantOrderDetails(options.id)
},
methods: {
//
getHomestayOrderDetail(orderId) {
getMerchantOrderDetails(orderId) {
let data = {
'id': orderId
'orderId': orderId
}
this.$Request.get(this.$config.getHomestayOrderDetail, data, null, null, false, true).then((res) => {
this.$Request.get(this.$config.getMerchantOrderDetails, data, null, null, false, true).then((res) => {
if (res.code == 0) {
this.homestayOrderData = res.data
let checkTime = this.homestayOrderData.checkTime
let checkOutTime = this.homestayOrderData.checkOutTime
this.merchantOrderData = res.data
// let checkTime = this.homestayOrderData.checkTime
// let checkOutTime = this.homestayOrderData.checkOutTime
} else {
uni.showToast({
@ -228,12 +229,12 @@
},
//
navigation() {
console.log("this.homestayOrderData", this.homestayOrderData)
console.log("this.merchantOrderData", this.merchantOrderData)
uni.openLocation({
latitude: Number(this.homestayOrderData.lat),
longitude: Number(this.homestayOrderData.lng),
name: this.homestayOrderData.hotelName,
address: this.homestayOrderData.addressInfo,
latitude: Number(this.merchantOrderData.lat),
longitude: Number(this.merchantOrderData.lng),
name: this.merchantOrderData.hotelName,
address: this.merchantOrderData.addressInfo,
complete: function(result) {
console.log(result);
},
@ -241,11 +242,11 @@
// #ifdef H5
if (this.$wechat.isWechat()) {
var mapParam = {
latitude: this.homestayOrderData.lat,
longitude: this.homestayOrderData.lng,
latitude: this.merchantOrderData.lat,
longitude: this.merchantOrderData.lng,
scale: 18,
name: this.homestayOrderData.hotelName,
address: this.homestayOrderData.addressInfo,
name: this.merchantOrderData.hotelName,
address: this.merchantOrderData.addressInfo,
};
this.$util.openLocation(mapParam);
return;
@ -256,11 +257,11 @@
"," +
this.$param.clat +
",我的位置&to=" +
this.homestayOrderData.lng +
this.merchantOrderData.lng +
"," +
this.homestayOrderData.lat +
this.merchantOrderData.lat +
"," +
this.homestayOrderData.addressInfo +
this.merchantOrderData.addressInfo +
"&mode=walk&src=sjz_uniapp&callnative=1";
// #endif
},
@ -307,7 +308,7 @@
//退
toRefundPage(orderId) {
uni.navigateTo({
url: "/subPageC/orderHomestay/cancelStep?orderId=" + orderId
url: "/subPageC/orderShop/cancelStep?orderId=" + orderId
});
},
@ -393,7 +394,7 @@
//
cacelOrder() {
uni.navigateTo({
url: "/subPageC/orderHomestay/orderCancel?id=" + this.homestayOrderData.id
url: "/subPageC/orderShop/orderCancel?id=" + this.merchantOrderData.id
});
},
stateMessage: function(val) {
@ -409,22 +410,16 @@
return "已取消"
break;
case "3":
return "预订失败"
return "退款中"
break;
case "4":
return "预订成功"
return "已退款"
break;
case "5":
return "已入住"
return "商家接单"
break;
case "6":
return "已离店"
break;
case "7":
return "退款中"
break;
case "8":
return "已退款"
return "交易完成"
break;
}
},

@ -3,18 +3,19 @@
<mescroll-uni :up="upOption" @down="downCallback" @up="upCallback" :fixed="false">
<view class="list_item container-fluid m-b-24" v-for="(item,index) in orderList"
>
<view class="item_title">{{item.hotelName}}</view>
<view class="item_title">{{item.merchantName}}</view>
<view class="row" @click="toHomeStayDetailPage(item.id)">
<view class="item_image">
<image class="img" :src="item.hotelLogo" mode="widthFix"></image>
<image class="img" :src="item.picUrls" mode="widthFix"></image>
</view>
<view class="item_content col">
<view class="content-title">{{item.houseName}}</view>
<view class="content-date">{{item.checkTime}}
<image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-data-line.png"
<!-- <view class="content-title">{{item.merchantName}}</view>-->
<view class="content-date">{{item.goodsName}}¥{{item.goodsPrice}}
*
<!-- <image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-data-line.png"
mode="widthFix">
</image>
{{item.checkOutTime}}
</image> -->
{{item.goodsNum}}
</view>
<view class="content-price">总价¥{{item.orderAmount}}</view>
</view>
@ -23,12 +24,12 @@
<view class="content-bottom">
<view class="btn" v-if="item.orderStatus=='0'" @click="payOrder(item)">去支付</view>
<view class="btn" v-if="item.orderStatus !='0' && item.orderStatus !='1'"
@click="toHomeStayBookingPage(item.hotelId)">再次预定</view>
@click="toHomeStayBookingPage(item.hotelId)">再次购买</view>
<view class="btn" v-if="item.refundDisplay =='1'" @click="toRefundPage(item.id)">退款进度</view>
</view>
</view>
<view class="tip-bage"></view>
<view class="tip-state m-t-12" v-if="item.orderStatus=='1'">等待商家确认请及时关注订单状态</view>
<view class="tip-state m-t-12" v-if="item.orderStatus=='1'">等待商家接单请及时关注订单状态</view>
<view class="state" :class="'type'+item.orderStatus">{{stateMessage(item.orderStatus)}}</view>
</view>
</mescroll-uni>
@ -100,22 +101,16 @@
return "已取消"
break;
case "3":
return "预订失败"
return "退款中"
break;
case "4":
return "预订成功"
return "已退款"
break;
case "5":
return "已入住"
return "商家接单"
break;
case "6":
return "已离店"
break;
case "7":
return "退款中"
break;
case "8":
return "已退款"
return "交易完成"
break;
}
},
@ -168,11 +163,11 @@
const userInfo = uni.getStorageSync("userInfo");
const extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {};
let appId = extConfig.app_id
this.param.openid = userInfo.openid
this.param.appid = appId
this.$Request.get(this.$config.getHomestayOrderList, this.param, null, null, false, true).then((res) => {
// this.param.openid = "oohzD5b7g4hNA1qJyAwlSA5H4NCY"
// this.param.appid = 23
this.$Request.get(this.$config.getMerchantOrderList, this.param, null, null, false, true).then((res) => {
const curPageData = res.data.list || [] //
if (this.mescroll.num == 1) this.orderList = []; //
curPageData.forEach((item, index) => {
@ -212,7 +207,7 @@
// 宿
toHomeStayDetailPage(id) {
uni.navigateTo({
url: "/subPageC/orderHomestay/orderDetail?id=" + id
url: "/subPageC/orderShop/orderDetail?id=" + id
});
},
//

Loading…
Cancel
Save