326发版测试

This commit is contained in:
有果 2026-03-26 09:48:28 +08:00
parent 5fba673484
commit 2a180c72db
6 changed files with 185 additions and 45 deletions

View File

@ -167,6 +167,13 @@ export function useOrderApi() {
method: 'get',
data
});
},
GetCancelOrder: (data) => {
return request.request({
url: '/ClientOrder/GetCancelOrder',
method: 'get',
data
})
}
}
}

View File

@ -85,7 +85,7 @@ export default {
this.globalData.navbarHeight = (barHeight || 40) + statusBarHeight;
this.globalData.statusBarHeight = statusBarHeight || 20;
// #endif
// authCode
// authCode url
const authCode = getQueryParam('authCode');
if(authCode){
let source = window.sf.isSfApp() ? 2 : 1;

View File

@ -8,7 +8,7 @@
>
<view class="uv-picker">
<view class="title">
{{ title }} <image class="close-icon" style="width: 20rpx;height: 20rpx;" src="/static/home/close.svg" @click="cancel"></image>
{{ title }} <image class="close-icon" style="width: 30rpx;height: 30rpx;" src="/static/home/close2.svg" @click="cancel"></image>
</view>
<!-- <uv-toolbar
v-if="showToolbar"
@ -314,7 +314,7 @@ export default {
}
.btn{
:deep(.uv-button){
width: 470rpx;
width: 480rpx;
}
}

View File

@ -173,7 +173,7 @@
仓号: {{ item.name }}
</view>
<view class="site textGary font28 fontb mgb10">
尺寸: {{ item.length }}m*{{ item.width }}m*{{ item.height }}m
尺寸: {{ item.length }}m*{{ item.width }}m*{{ item.height }}m
</view>
</view>
<view class="right">
@ -558,26 +558,33 @@ const goOrder = async () => {
}
} else {
if(res.code === 206){
uni.showModal({
title: t('common.title'),
content: "仓位已出租,请重新选择",
showCancel: false,
success: function () {
reset();
},
})
reset();
uni.showToast({
title: '仓位已出租,请重新选择其他仓位!',
icon: 'none',
duration: 5000
})
// uni.showModal({
// title: t('common.title'),
// content: "",
// showCancel: false,
// success: function () {
// reset();
// },
// })
}
if (res.code === 1001) {
uni.showModal({
title: t('common.title'),
content: t('common.unpaidOrderTips'),
showCancel: false,
success: function () {
uni.switchTab({
url: '/pages/unlock/index',
uni.showToast({
title: t('common.unpaidOrderTips'),
icon: 'none',
duration: 5000
})
},
})
setTimeout(() => {
uni.switchTab({
url: '/pages/unlock/index?type=unpaid',
})
},3000)
return
}
}
@ -1145,7 +1152,7 @@ function changeMove(event) {
// padding-bottom: calc(32rpx + env(safe-area-inset-bottom));
.title {
margin-bottom: 34rpx;
margin-bottom: 20rpx;
}
@ -1191,7 +1198,7 @@ function changeMove(event) {
line-height: 1;
}
.input {
padding: 8rpx 20rpx;
padding: 10rpx;
background-color: #EBEBEB;
border-radius: 8rpx;
margin: 0 10rpx;
@ -1516,7 +1523,7 @@ function changeMove(event) {
margin-bottom: 20rpx;
image {
margin-top: 6rpx;
// margin-top: 6rpx;
}
.left {

View File

@ -57,36 +57,45 @@
item.orderStatus == 5 ? `(${$t("unlock.overdue")})` : '' }}</template>
<template v-else-if="item.refundLockerStatus === 4">{{ $t("unlock.overdue")
}}</template>
<template v-else-if="item.orderStatus === 8">已取消</template>
</view>
</view>
</view>
</view>
<view class="btn" v-show="[0, 3, 4].includes(item.refundLockerStatus)" v-if="item.orderStatus !== 2">
<uv-button
:disabled="!(item.orderStartStatus == 2 && item.refundLockerStatus !== 4 && item.orderStatus !== 5 && item.isOpenDoor)"
shape="circle" @click="openDevicePopup(item)">开门</uv-button>
:disabled="!(item.orderStartStatus == 2 && item.orderStatus !== 5 && item.isOpenDoor)"
shape="circle" @click="openDevicePopup(item)">开门</uv-button>
<uv-button
:disabled="!(item.orderStartStatus == 2 && item.refundLockerStatus !== 4 && item.orderStatus !== 5 && item.isOpenLock)"
:disabled="!(item.orderStartStatus == 2 && item.orderStatus !== 5 && item.isOpenLock)"
shape="circle" @click="openPwdPopup(item)">开锁</uv-button>
<uv-button v-show="item.orderStartStatus == 2 || item.orderStartStatus == 1"
:style="{ opacity: item.renewal ? '1' : '0.5' }" @click="showPayPopup(item)"
shape="circle">续仓</uv-button>
<uv-button shape="circle" @click="openDetailPopup(item)">详情</uv-button>
</view>
<!-- 取消订单 -->
<view class="btn" v-if="item.orderStatus === 8" style="justify-content: end;">
<uv-button shape="circle" @click="openDetailPopup(item)">详情</uv-button>
</view>
<!-- 退仓申请中 -->
<view class="btn" v-show="item.refundLockerStatus === 1">
<uv-button :customStyle="{
color: '#fff',
}" color="#FB322E" shape="circle" @click="cancelMoveOutRqt(item)">取消退仓申请</uv-button>
}" color="#FB322E" plain shape="circle" @click="cancelMoveOutRqt(item)">取消退仓申请</uv-button>
<uv-button shape="circle" @click="openDetailPopup(item)">{{ $t("unlock.details") }}</uv-button>
</view>
<view class="btn" v-show="item.refundLockerStatus === 2" style="justify-content: end;">
<uv-button shape="circle" @click="openDetailPopup(item)">{{ $t("unlock.details") }}</uv-button>
</view>
<view class="btn" v-if="item.orderStatus == 2" style="justify-content: start;">
<view class="btn" v-if="item.orderStatus == 2">
<uv-button shape="circle" plain :customStyle="{
}" color="#FB322E" @click="openCancelOrder(item)">取消订单</uv-button>
<uv-button shape="circle" :customStyle="{
color: '#fff',
}" color="#FB322E" @click="openCancelOrder(item)">取消订单</uv-button>
}" color="#FB322E" @click="handlePay(item)">去支付</uv-button>
<uv-button shape="circle" @click="openDetailPopup(item)">详情</uv-button>
</view>
</view>
</view>
@ -153,6 +162,7 @@
? `(${$t("unlock.overdue")})` : '' }}</template>
<template v-else-if="state.orderData.refundLockerStatus === 4">{{
$t("unlock.overdue") }}</template>
<template v-else-if="state.orderData.orderStatus === 8">已取消</template>
</view>
</view>
</view>
@ -171,20 +181,30 @@
</view>
</view>
<view class="item">
<view class="label font26 fontb textGary">{{ $t("detail.deposit") }}: </view>
<view class="label font26 fontb textGary">租金月费: </view>
<view class="value font26 fontb">{{ currency }} {{ state.orderData.discountData?.[0]?.unitPrice }}
</view>
</view>
<view class="item">
<view class="label font26 fontb textGary">租期优惠: </view>
<view class="value font26 fontb"> {{ state.orderData.discountData?.[0]?.month }}个月长租-{{ currency }} {{ state.orderData.discountData?.[0]?.leaseDiscount }}
</view>
</view>
<view class="item">
<view class="label font26 fontb textGary">订单押金: </view>
<view class="value font26 fontb">{{ currency }} {{ state.orderData.deposit }}</view>
</view>
<view class="item">
<!-- <view class="item">
<view class="label font26 fontb textGary">{{ $t("detail.discount") }}: </view>
<view class="value font26 fontb">-{{ currency }} {{ state.orderData.favorable }} </view>
</view>
</view> -->
<view class="item">
<view class="label font26 fontb textGary">{{ $t("detail.total") }}: </view>
<view class="label font26 fontb textGary">租金总价: </view>
<view class="value font26 fontb">{{ currency }} {{ state.orderData.actualPay }} </view>
</view>
</view>
</view>
<view class="btn" v-if="state.orderData.orderStatus !== 2"
<view class="btn" v-if="state.orderData.orderStatus !== 2 && state.orderData.orderStatus !== 8"
v-show="state.orderData.refundLockerStatus != 1 && state.orderData.refundLockerStatus !== 2">
<uv-button class="uv-btn" shape="circle" @click="openMoveOutModal">
{{ $t("unlock.moveout") }}
@ -229,7 +249,7 @@
</view>
<view class="content">
<text class="font26 textRed fontb" style="font-size: 60rpx;">{{ lockPwd }}#</text>
<text class="textGray font26">输入密码即可开锁或一键开锁</text>
<text class="textGray font26">输入密码即可开锁{{ [3, 7].includes(Number(state.selectItem?.lockTypeId)) ? "或一键开锁" : "" }}</text>
</view>
<view class="btnBox">
<uv-button @click="closePwdPopup" :customStyle="{
@ -505,7 +525,7 @@
color: '#fff',
fontSize: '32rpx',
}" color="#FB322E" shape="circle" @click="cancelOrder">
{{ $t("unlock.confirmOut") }}
取消订单
</uv-button>
</view>
</view>
@ -567,6 +587,7 @@ const state = ref({
selfMonth: 1,
refundLoading: false,
current:0,
cancelOrderList:[],
});
const list = [{
name: '在租',
@ -580,7 +601,7 @@ const currentOrderList = computed(() => {
const isType1 = (item) =>
!(item.orderStartStatus == 2 && item.refundLockerStatus === 0)
&& item.refundLockerStatus === 4
&& (item.refundLockerStatus === 2)
const isType2 = (item) =>
item.orderStatus == 2
@ -593,7 +614,7 @@ const currentOrderList = computed(() => {
}
if (state.value.current == 1) {
return state.value.orderList.filter(isType1)
return state.value.orderList.filter(isType1).concat(state.value.cancelOrderList)
}
if (state.value.current == 2) {
@ -612,6 +633,9 @@ const showImage = (url) => {
const handleChange = (e) => {
state.value.current = e.index
GetOrderList()
if(state.value.current == 1){
GetCancelOrder()
}
}
const copyOrderOn = (item) => {
@ -627,6 +651,74 @@ const copyOrderOn = (item) => {
});
}
const handlePay = (item) => {
uni.showLoading({
mask: true,
});
let source = window.sf.isSfApp() ? 2 : 1;
getApi
.ContinueOrderPay({
orderId:item.orderId,
source
})
.then((res) => {
uni.hideLoading();
if (res.code === 200) {
let path = window.location.pathname;
if (!path.endsWith('/')) {
path = path + '/';
}
const returnUrl = `${window.location.origin}${path}#/pages/unlock/index`;
if (window.sf.isSfApp()) {
window.sf.goPay({
partnerId: res.data.partnerId, //id
prepayId: res.data.package, // id
nonceStr: res.data.nonceStr, //
timeStamp: res.data.timeStamp, //
sign: res.data.paySign, //
package: `prepay_id=${res.data.package}`,
payChannel: 'payByWeChat' // app
}).then(res => {
const { channelType, status, message, channelResult } = res && res.result || {}
if (status === 0) {
uni.showToast({
title: '支付成功',
icon: 'none',
duration: 3000
})
hidePayPopup();
state.value.current = 0;
GetOrderList();
} else {
uni.showToast({
title: '支付失败',
icon: 'none',
duration: 3000
})
}
}).catch(err => console.log(err))
} else {
uni.showLoading({
title: '支付中',
mask: true
})
window.sf.goPay({
timeStamp: res.data.timeStamp, //
nonceStr: res.data.nonceStr, //
package: `prepay_id=${res.data.package}`, //
signType: res.data.signType, //
paySign: res.data.paySign, //
successUrl: returnUrl,
failUrl: returnUrl
}).then(res => { }).catch(err => console.log(err))
}
} else {
}
});
}
const goOrder = async () => {
if (!state.value.selectItem?.orderId) {
@ -741,7 +833,9 @@ const cancelOrder = () => {
uni.hideLoading()
if (res.code === 200) {
closeCancelOrder();
state.value.current = 1
GetOrderList();
GetCancelOrder()
} else {
uni.showToast({
title: res.msg,
@ -1009,7 +1103,6 @@ const QRCode = ref('')
const ifShow = ref(false)
//
function GetQRCode() {
ifShow.value = false
uni.showLoading({ mask: true })
getLockApi.GetAccesscontrolQRCodeBySite({ siteId: state.value.selectItem.siteId, orderId: state.value.selectItem.orderId }).then(res => {
if (res.code === 200) {
@ -1031,6 +1124,16 @@ const GetOrderById = () => {
}
})
}
const GetCancelOrder = () => {
uni.showLoading()
getApi.GetCancelOrder().then(res => {
state.value.cancelOrderList = []
if (res.code === 200) {
state.value.cancelOrderList = res.data
}
uni.hideLoading();
})
}
const GetOrderList = () => {
uni.showLoading()
@ -1052,10 +1155,12 @@ onShareAppMessage((res) => {
}
return shareParam;
});
onLoad(() => {
// GetOrderList()
onLoad((params) => {
// GetOrderList()unpaid
if (params?.type == "unpaid") {
state.value.current = 2
}
})
onHide(() => {
@ -1078,6 +1183,9 @@ onShow(() => {
token.value = uni.getStorageSync('token')
onShowRerequestByIsLogin(() => {
GetOrderList();
if(state.value.current === 2){
GetCancelOrder()
}
}, (err) => {
state.value.orderList = []
})
@ -1531,8 +1639,12 @@ onShow(() => {
line-height: 60rpx;
color: #6f6f6f;
font-weight: bold;
border-width: 1px !important;
// border-color: #A8AAAC !important;
border-width: 1.5px !important;
}
:deep(.uv-button--info){
border-color: #A8AAAC !important;
}
}
}
@ -1686,7 +1798,10 @@ onShow(() => {
line-height: 60rpx;
color: #6f6f6f;
font-weight: bold;
border-width: 1px !important;
border-width: 1.5px !important;
}
:deep(.uv-button--info){
border-color: #A8AAAC !important;
}
}
}

11
static/home/close2.svg Normal file
View File

@ -0,0 +1,11 @@
<svg width="21" height="21" viewBox="0 0 21 21" xmlns="http://www.w3.org/2000/svg">
<line x1="3" y1="3" x2="18" y2="18"
stroke="black"
stroke-width="3"
stroke-linecap="round"/>
<line x1="18" y1="3" x2="3" y2="18"
stroke="black"
stroke-width="3"
stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 329 B