This commit is contained in:
2024-03-14 10:41:24 +08:00
parent 80196ea911
commit 129c65d5d6
15 changed files with 1757 additions and 247 deletions

View File

@@ -1,151 +1,159 @@
<template>
<view style="display: flex;flex-direction: column;height: 100vh; background: #F7F7F7;overflow-y: auto;">
<view style="display: flex;flex-direction: column;height: 100vh; background: #F7F7F7;">
<loading-state ref="pageView" @request="request">
<view style="height: 100vh;overflow: hidden;overflow-y: auto;">
<view v-if="data.payStatus=='2'"
style="display: flex;flex-direction: row;align-items: center;width: 100%;justify-content: center;margin-top: 10px;padding: 10px;">
<text style="font-size: 14px;">还剩</text>
<text
style="font-weight: 600;color: #FF5006;font-size: 18px;margin-left: 2px;margin-right: 2px;">{{page.countdown}}</text>
<text style="font-size: 14px;">订单自动取消</text>
<view v-if="data.payStatus=='2'"
style="display: flex;flex-direction: row;align-items: center;width: 100%;justify-content: center;margin-top: 10px;padding: 10px;">
<text style="font-size: 14px;">还剩</text>
<text
style="font-weight: 600;color: #FF5006;font-size: 18px;margin-left: 2px;margin-right: 2px;">{{page.countdown}}</text>
<text style="font-size: 14px;">订单自动取消</text>
</view>
</view>
<view
style="background: #fff;border-radius: 10px;display: flex;flex-direction: column;padding: 15px;margin-top: 15px; margin-left: 10px;margin-right: 10px;">
<view
style="background: #fff;border-radius: 10px;display: flex;flex-direction: column;padding: 15px;margin-top: 15px; margin-left: 10px;margin-right: 10px;">
<view v-for="(item,index) in data.ordOrderDetails"
style=" display: flex;flex-direction: row;align-items: center; margin-bottom: 15px;">
<view v-for="(item,index) in data.ordOrderDetails"
style=" display: flex;flex-direction: row;align-items: center; margin-bottom: 15px;">
<image :src="item.picUrl" @click="itemClick(item.goodsSid)"
style="width: 70px;height: 70px;border-radius: 15px;" mode="scaleToFill">
</image>
<image :src="item.picUrl" @click="itemClick(item.goodsSid)" style="width: 70px;height: 70px;border-radius: 15px;" mode="scaleToFill">
</image>
<view style="margin-left: 10px;display: flex;flex-direction: column;flex: 1;">
<view style="margin-left: 10px;display: flex;flex-direction: column;flex: 1;">
<view style="display: flex;flex-direction: row;width: 100%;">
<view style="display: flex;flex-direction: row;width: 100%;">
<text
style="flex: 1;font-weight: 600;font-family: sans-serif;font-size: 14px;" @click="itemClick(item.goodsSid)">{{item.goodsName}}</text>
<text
style="font-weight: 600;font-family: sans-serif;font-size: 14px;">{{item.pricePart}}</text>
</view>
<!-- <text style="margin-top: 10px;font-size: 12px;color: #999;">{{item.remarks}}</text> -->
<view style="margin-top: 8px;display: flex;flex-direction: column;">
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="border: 1px #EE752F solid; border-radius: 5px; padding: 0px 8px;
font-size: 10px;color: #EE752F;">{{item.priceUnit}}/{{item.specificationUnit}}</text>
<text style="flex: 1;font-weight: 600;font-family: sans-serif;font-size: 14px;"
@click="itemClick(item.goodsSid)">{{item.goodsName}}</text>
<text
style="border: 1px #EE752F solid; border-radius: 5px; padding: 0px 8px;
font-size: 10px;color: #EE752F; margin-left: 10px; margin-right: 10px; ">{{item.numofPart}}{{item.specificationUnit}}/{{item.unitName}}</text>
style="font-weight: 600;font-family: sans-serif;font-size: 14px;">{{item.pricePart}}</text>
</view>
<text
style="margin-top: 12px;font-size: 12px;color: #999;">份数{{item.partNumber}}{{item.unitName}}</text>
<!-- <text style="margin-top: 10px;font-size: 12px;color: #999;">{{item.remarks}}</text> -->
<view style="margin-top: 8px;display: flex;flex-direction: column;">
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="border: 1px #EE752F solid; border-radius: 5px; padding: 0px 8px;
font-size: 10px;color: #EE752F;">{{item.priceUnit}}/{{item.specificationUnit}}</text>
<text
style="border: 1px #EE752F solid; border-radius: 5px; padding: 0px 8px;
font-size: 10px;color: #EE752F; margin-left: 10px; margin-right: 10px; ">{{item.numofPart}}{{item.specificationUnit}}/{{item.unitName}}</text>
</view>
<text
style="margin-top: 12px;font-size: 12px;color: #999;">份数{{item.partNumber}}{{item.unitName}}</text>
</view>
</view>
</view>
<view style="display: flex;flex-direction: column;
border-top: 1px solid #EFEFEF;padding-top: 15px;">
<view
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text>商品总额</text>
<text>{{data.meet}}</text>
</view>
<view
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;margin-top: 15px;">
<text>附加费</text>
<text>{{data.surcharge}}</text>
</view>
</view>
<view style="display: flex;flex-direction: row;align-items: center;
border-top: 1px solid #EFEFEF;padding-top: 15px;margin-top: 15px;">
<view style="flex: 1;">
</view>
<view v-if="data.payStatus=='4'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text>实付</text>
<text style="font-size: 16px;font-weight: 600;color: #FF5006;">{{data.totalTee}}</text>
</view>
<view v-if="data.payStatus=='2'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text style="color: #FF5006;margin-right: 3px;font-size: 14px;">需付款</text>
<text style="color: #FF5006;font-size: 16px;font-weight: 600;">{{data.totalTee}}</text>
</view>
<view v-if="data.payStatus=='3'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text style="color: #666;margin-right: 3px;font-size: 14px;">需付款</text>
<text style="color: #666;font-size: 16px;font-weight: 600;">{{data.totalTee}}</text>
</view>
</view>
</view>
<view style="background: #fff;border-radius: 10px;margin-top: 12px;margin-left: 10px;margin-right: 10px;
display: flex;flex-direction: column;padding: 12px 16px;margin-bottom: 100px;">
<text style="font-size: 16px;">订单信息</text>
<view style="display: flex;flex-direction: column;margin-top: 15px; ">
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="font-size: 14px;color: #999;">订单编号</text>
<text
style="margin-left: 15px;font-size: 14px;color: #333;word-break: break-all;">{{data.outTradeNo}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="font-size: 14px;color: #999;">下单时间</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.createTime}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="font-size: 14px;color: #999;">支付方式</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.payType}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;"
v-if="data.payStatus=='4'">
<text style="font-size: 14px;color: #999;">付款时间</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.payTime}}</text>
</view>
</view>
</view>
<view style="display: flex;flex-direction: column;
border-top: 1px solid #EFEFEF;padding-top: 15px;">
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text>商品总额</text>
<text>{{data.meet}}</text>
</view>
<view
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;margin-top: 15px;">
<text>附加费</text>
<text>{{data.surcharge}}</text>
</view>
</view>
<view style="display: flex;flex-direction: row;align-items: center;
border-top: 1px solid #EFEFEF;padding-top: 15px;margin-top: 15px;">
<view style="flex: 1;">
</view>
<view v-if="data.payStatus=='4'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text>实付</text>
<text style="font-size: 16px;font-weight: 600;">{{data.totalTee}}</text>
</view>
<view v-if="data.payStatus=='2'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text style="color: #FF5006;margin-right: 3px;font-size: 14px;">需付款</text>
<text style="color: #FF5006;font-size: 16px;font-weight: 600;">{{data.totalTee}}</text>
</view>
<view v-if="data.payStatus=='3'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text style="color: #666;margin-right: 3px;font-size: 14px;">需付款</text>
<text style="color: #666;font-size: 16px;font-weight: 600;">{{data.totalTee}}</text>
</view>
</view>
</view>
<view style="background: #fff;border-radius: 10px;margin-top: 12px;margin-left: 10px;margin-right: 10px;
display: flex;flex-direction: column;padding: 12px 16px;margin-bottom: 150px;">
<text style="font-size: 16px;">订单信息</text>
<view style="display: flex;flex-direction: column;margin-top: 15px; ">
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="font-size: 14px;color: #999;">订单编号</text>
<text
style="margin-left: 15px;font-size: 14px;color: #333;word-break: break-all;">{{data.outTradeNo}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="font-size: 14px;color: #999;">下单时间</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.createTime}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="font-size: 14px;color: #999;">支付方式</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.payType}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;"
v-if="data.payStatus=='4'">
<text style="font-size: 14px;color: #999;">付款时间</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.payTime}}</text>
</view>
</view>
</view>
<view v-if="data.payStatus=='2'" style="width: 100%; background-color: #fff;height: 15vw;position: fixed;bottom: 0;overflow:hidden;
display: flex;flex-direction: row;align-items: center;box-sizing: border-box;">
<view style="flex: 1;"></view>
<text style="font-size: 16px;color: #fff; height: 5vw; background-color: #FF9900;margin-right: 25px;
padding: 5px 20px;border-radius: 20px;" @click="continuePy">继续付款</text>
</view>
</loading-state>
<view v-if="data.payStatus!='3'"
style="position: absolute; bottom: 0px; display: flex;flex-direction: row;width: 100%;align-items: center;
box-sizing: border-box; padding-left: 16px;padding-right: 16px;background: #fff; height: 8vh;border-top: 1px solid #EFEFEF;">
<view style="flex: 1;"></view>
<text style="font-size: 16px;color: #fff; background-color: #FF9900; height: 5vh;line-height: 5vh;
padding: 0px 20px;border-radius: 20px;" @click="continuePy" v-if="data.payStatus=='2'">继续付款</text>
<view style="display: flex;flex-direction: row;align-items: center;" v-if="data.payStatus=='4'">
<text style="font-size: 16px;color: #666; border: 1px #D3D3D3 solid; height: 5vh;line-height: 5vh;
padding: 0px 20px;border-radius: 20px;" @click="makeInvoice(data.sid)" v-if="data.invoiceStatus=='0'">开具发票</text>
<text style="font-size: 16px;color: #666; border: 1px #D3D3D3 solid; height: 5vh;line-height: 5vh;
padding: 0px 20px;border-radius: 20px;" v-if="data.invoiceStatus=='1'">发票审核中</text>
</view>
</view>
</view>
</template>
@@ -165,7 +173,10 @@
onLoad(options) {
this.page.sid = options.sid
this.request()
},
onShow() {
this.request()
},
methods: {
itemClick(goodsSid) {
@@ -175,12 +186,16 @@
},
// 获取数据
request() {
let _this = this
_this.$api.orderDetails(_this.page.sid).then((resp) => {
_this.data = resp
_this.page.nowDate = resp.nowDate
_this.countTime() // 倒计时
if (_this.data.payStatus == 2)
_this.countTime() // 倒计时
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
@@ -243,8 +258,16 @@
}).catch(e => {
})
},
makeInvoice(sid) {
uni.navigateTo({
url: "/pages/me/makeInvoice?sid=" + sid
})
}
}

View File

@@ -25,34 +25,35 @@
<text
style="font-size: 16px;margin-right: 8px;flex: 1;margin-right: 15px;">{{item.storeName}}</text>
<view style="display: flex;flex-direction: row;align-items: center;"
<!-- <view style="display: flex;flex-direction: row;align-items: center;"
@click="makePhoneCall(item.linkPhone)">
<image src="../../static/phone-2.png" style="width: 20px;height: 20px;margin-right: 5px;">
</image>
<text>咨询电话</text>
</view>
</view> -->
</view>
<view
style="display: flex;flex-direction: row;align-items: center;margin-left: 16px;margin-right: 16px;margin-top: 6px;">
<image src="../../static/dingwei.png" style="width: 20px;height: 20px;margin-right: 5px;" mode="aspectFit">
<image src="../../static/dingwei.png" style="width: 20px;height: 20px;margin-right: 5px;"
mode="aspectFit">
</image>
<text style="font-size: 12px;color: #333;">{{item.address}}</text>
<text style="font-size: 12px;color: #666;">{{item.address}}</text>
</view>
<view class="item-bom" style="margin-left: 16px;margin-right: 16px;margin-top: 10px;">
<view class="item-bom-left">
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="font-size: 12px;color: #999; margin-right: 5px;">提菜日期</text>
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="font-size: 12px;color: #666; margin-right: 5px;">提菜日期</text>
<text style="font-size: 12px;color: #FD6D2B;">{{item.reserveDate}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 16px;">
<text style="font-size: 12px;color: #999; margin-right: 5px;">提菜人</text>
<text style="font-size: 12px;color: #666; margin-right: 5px;">提菜人</text>
<text style="font-size: 12px;color: #333; margin-right: 5px;">{{item.userName}}</text>
<text style="font-size: 12px;color: #333; ">{{item.userPhone}}</text>
</view>
@@ -62,13 +63,32 @@
<view class="item-bom_right">
<image src="https://supervise.yxtsoft.com/lpk/image/daiticai.png"
style="width: 104px; height: 104px;z-index: 100;border-radius: 20px;">
style="width: 80px; height: 80px;z-index: 100;border-radius: 20px;">
</image>
</view>
</view>
<view style="display: flex;flex-direction: row;align-items: center;width: 100%;margin-top: 15px;">
<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;flex: 1;"
@click="cancelReservation(item)">
<image src="../../static/close3.png" style="width: 32px;height: 32px;"></image>
<text style="font-size: 12px;color: #666;margin-top: 5px;">取消预约</text>
</view>
<view style="background: #E0DBD0; height: 30px;width: 1px;"></view>
<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;flex: 1;"
@click="makePhoneCall(item.linkPhone)">
<image src="../../static/phone-3.png" style="width: 32px;height: 32px;"></image>
<text style="font-size: 12px;color: #666;margin-top: 5px;">电话咨询</text>
</view>
</view>
<view style="
height: 30px;margin-top: 5px;">
<image src="https://supervise.yxtsoft.com/lpk/image/reservationRecords_icon1.png"
@@ -129,6 +149,45 @@
},
methods: {
cancelReservation(item){
var _this = this
console.log("item",item);
if(item.cancel){
// 可取消
uni.showModal({
title: '',
content: '确认要取消预约吗?',
cancelText:"取消",
confirmText:"确定",
confirmColor:"#FF9900",
success(res) {
if (res.confirm) {
// console.log('用户点击确定')
_this.$api.cancelReservation(item.reserveCode).then((resp) => {
const index = _this.data.findIndex((info) => info.sid === item.sid)
console.log("index》》》》", index)
_this.data.splice(index, 1)
}).catch(e => {
})
} else if (res.cancel) {
// console.log('用户点击取消')
}
}
})
}else{
// 超出时限 不可取消
this.shortToast('已超出可取消预约提货时间。')
return
}
},
makePhoneCall(phone) {
if (this.stringIsNotEmpty(phone))
wx.makePhoneCall({