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

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", // 获取用户全部民宿订单列表 getHomestayOrderList: PWPATH + "/admin-api/homestay/HotelOrder/selectPageUser", // 获取用户全部民宿订单列表
getHomestayOrderRefund: PWPATH + "/admin-api/homestay/HotelOrder/getHotelRefundLog", // 获取用户民宿退款信息 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", // 获取商品列表 selectAppGoodsPage: PWPATH + "/admin-api/homestay/merchantOrder/selectAppGoodsPage", // 获取商品列表
selectAppGoodsDetails: PWPATH + "/admin-api/homestay/merchantOrder/selectAppGoodsDetails", // 获取商品详情 selectAppGoodsDetails: PWPATH + "/admin-api/homestay/merchantOrder/selectAppGoodsDetails", // 获取商品详情

@ -38,7 +38,7 @@
let data = { let data = {
'orderId': orderId '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) console.log(res)
if (res.code == 0) { if (res.code == 0) {
this.homestayOrderRefund = res.data this.homestayOrderRefund = res.data

@ -37,7 +37,7 @@
methods: { methods: {
getInitPage(id) { 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 this.cancelList = res.data
}).catch(() => { }).catch(() => {
@ -54,12 +54,12 @@
submit() { submit() {
const userInfo = uni.getStorageSync("userInfo"); const userInfo = uni.getStorageSync("userInfo");
let parame = { let parame = {
id: this.orderId, orderId: this.orderId,
openid: userInfo.openid, openid: userInfo.openid,
cancelType: this.current, 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") { if (res.code == "0") {
uni.showToast({ uni.showToast({
title: '订单取消成功', title: '订单取消成功',

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

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

Loading…
Cancel
Save