瀏覽代碼

订单查询

master
yangteng 3 月之前
父節點
當前提交
3307392eb7
共有 2 個檔案被更改,包括 78 行新增31 行删除
  1. 52
    18
      subpackage/orders/order_payment.vue
  2. 26
    13
      subpackage/orders/transfer-page-sign.vue

+ 52
- 18
subpackage/orders/order_payment.vue 查看文件

@@ -267,6 +267,7 @@
state.orderQuery = option.orderQuery;
state.qdSignUrl = option.qdSignUrl;
state.qdSignAppId = option.qdSignAppId;
state.qtSign = option.qtSign;
// #ifdef MP-WEIXIN
uni.login({
@@ -324,13 +325,15 @@
console.log(data);
if (data.paymentStatus == 'ALLSUCCESS') {
// isValueCard 1 储值卡 2 记账卡
if (state.isValueCard == 1) {
if (state.orderQuery == '1') {
if (state.orderQuery == '1') {
console.log("state.qtSign",state.qtSign,state.qtSign=='0')
if(state.qtSign=='0'){
if(state.qdSignAppId){
uni.navigateToMiniProgram({
appId: state.qdSignAppId,
path: state.qdSignUrl,
extraData: {},
envVersion:'trial',
success(res) {
console.log(res);
},
@@ -346,15 +349,21 @@
const params = encodeURIComponent(JSON.stringify(state.qdSignUrl))
tools.toUrl(`/subpackage/personal-center/webview?url=` + params)
}
} else {
}else{
uni.navigateBack()
}
}else{
if (state.isValueCard == 1) {
// 不签约
uni.switchTab({
url: "/pages/order/order"
})
} else {
// 签约
navTo(
`/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}`,
);
}
} else {
navTo(
`/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}`,
);
}
}
state.dataArray = data.datas;
@@ -424,21 +433,45 @@

// isValueCard 1 储值卡 2 记账卡
const gotoEditUserOrUnitInfo = () => {
if (state.isValueCard == 1) {
if (state.orderQuery == '1') {
const params = encodeURIComponent(JSON.stringify(state.qdSignUrl))
tools.toUrl(`/subpackage/personal-center/webview?url=` + params)
} else {
if (state.orderQuery == '1') {
if(state.qtSign=='0'){
if(state.qdSignAppId){
uni.navigateToMiniProgram({
appId: state.qdSignAppId,
path: state.qdSignUrl,
extraData: {},
envVersion:'trial',
success(res) {
console.log(res);
},
complete(res) {
console.log(res);
},
fail(res) {
console.log(res);
// 未成功跳转到车主小程序
},
});
}else{
const params = encodeURIComponent(JSON.stringify(state.qdSignUrl))
tools.toUrl(`/subpackage/personal-center/webview?url=` + params)
}
}else{
uni.navigateBack()
}
}else{
if (state.isValueCard == 1) {
// 不签约
uni.switchTab({
url: "/pages/order/order"
})
} else {
// 签约
navTo(
`/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}`,
);
}
} else {
navTo(
`/subpackage/orders/release-products?orderId=${state.orderId}&orderQuery=${state.orderQuery}`,
);
}

}
const state = reactive({
isValueCard: 1, //卡的类型
@@ -471,7 +504,8 @@
latitude: "",
openidData: {},
qdSignUrl:"",
qdSignAppId:""
qdSignAppId:"",
qtSign:""

});
</script>

+ 26
- 13
subpackage/orders/transfer-page-sign.vue 查看文件

@@ -1,10 +1,14 @@
<template>
<view class="content">
<view><text>车牌号:</text>
<view style="width: 60%;">
<view>
<text>车牌号:</text>
<view style="width: 60%;flex: 3;margin: 0 15rpx;">
<uni-data-select style="width: 100%;" v-model="state.vehiclePlate" :localdata="state.vehicPlateRange"
@change="changeColor" :clear="false"></uni-data-select>
</view>
<button type="default" class="ui-btn" @click="refresh()" style="flex:0.5;height: 70rpx;line-height: 70rpx;">
查询
</button>
</view>
</view>
<view class="details" v-if="state.isDetails">
@@ -95,6 +99,22 @@
}
}
})
// 从其他签约回来点查询,虽然一进来刷新了,但是可能状态没更新回来,需要再次点击查询
const refresh=()=>{
if (state.orderId) {
// 签约完回来
orderDetail(state.orderId)
contractRequest()
}else{
// 没登录情况
if (!hasLogin()) {
quanKeyAction()
navTo(`/login/login?back=1`)
} else {
query()
}
}
}
const quanKeyAction = () => {
var data = {};
const options = {
@@ -183,7 +203,7 @@
isValueCard = 2
}
// orderQuery 1 订单查询 0正常订单
navTo(`/subpackage/orders/order_payment?orderId=${state.orderId}&&isValueCard=${isValueCard}&vehicleId=${vehicleId}&orderQuery=1&qdSignUrl=${state.details['qdSignUrl']}&qdSignAppId=${state.details['qdSignAppId']}`);
navTo(`/subpackage/orders/order_payment?orderId=${state.orderId}&&qtSign=${state.details['qtSign']}&vehicleId=${vehicleId}&orderQuery=1&qdSignUrl=${state.details['qdSignUrl']}&qdSignAppId=${state.details['qdSignAppId']}`);
})
} else if (state.details['orderStep'] == OrderStatus['已支付/待签约']) {
// 去签约
@@ -193,6 +213,7 @@
appId: state.details['qdSignAppId'],
path: state.details['qdSignUrl'],
extraData: {},
envVersion:'trial',
success(res) {
console.log(res);
},
@@ -365,7 +386,7 @@
state.vehiclePlateColor = e
for(var i=0;i<state.carAll.length;i++){
if(e==state.carAll[i]['vehicPlate']){
orderDetail(state.carAll[i]['orderNo'])
state.orderId=state.carAll[i]['orderNo']
return
}
}
@@ -388,15 +409,7 @@

text {
width: 30%;
}

input {
border: 1rpx solid #ccc;
padding: 6rpx 10rpx;
width: 60%;
border-radius: 5rpx;
box-sizing: border-box;
height: 60rpx;
flex: 1;
}
}
}

Loading…
取消
儲存