Selaa lähdekoodia

订单查询

master
yangteng 3 kuukautta sitten
vanhempi
commit
3307392eb7
2 muutettua tiedostoa jossa 78 lisäystä ja 31 poistoa
  1. 52
    18
      subpackage/orders/order_payment.vue
  2. 26
    13
      subpackage/orders/transfer-page-sign.vue

+ 52
- 18
subpackage/orders/order_payment.vue Näytä tiedosto

state.orderQuery = option.orderQuery; state.orderQuery = option.orderQuery;
state.qdSignUrl = option.qdSignUrl; state.qdSignUrl = option.qdSignUrl;
state.qdSignAppId = option.qdSignAppId; state.qdSignAppId = option.qdSignAppId;
state.qtSign = option.qtSign;
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
uni.login({ uni.login({
console.log(data); console.log(data);
if (data.paymentStatus == 'ALLSUCCESS') { if (data.paymentStatus == 'ALLSUCCESS') {
// isValueCard 1 储值卡 2 记账卡 // 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){ if(state.qdSignAppId){
uni.navigateToMiniProgram({ uni.navigateToMiniProgram({
appId: state.qdSignAppId, appId: state.qdSignAppId,
path: state.qdSignUrl, path: state.qdSignUrl,
extraData: {}, extraData: {},
envVersion:'trial',
success(res) { success(res) {
console.log(res); console.log(res);
}, },
const params = encodeURIComponent(JSON.stringify(state.qdSignUrl)) const params = encodeURIComponent(JSON.stringify(state.qdSignUrl))
tools.toUrl(`/subpackage/personal-center/webview?url=` + params) tools.toUrl(`/subpackage/personal-center/webview?url=` + params)
} }
} else {
}else{
uni.navigateBack()
}
}else{
if (state.isValueCard == 1) {
// 不签约
uni.switchTab({ uni.switchTab({
url: "/pages/order/order" 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; state.dataArray = data.datas;


// isValueCard 1 储值卡 2 记账卡 // isValueCard 1 储值卡 2 记账卡
const gotoEditUserOrUnitInfo = () => { 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({ uni.switchTab({
url: "/pages/order/order" 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({ const state = reactive({
isValueCard: 1, //卡的类型 isValueCard: 1, //卡的类型
latitude: "", latitude: "",
openidData: {}, openidData: {},
qdSignUrl:"", qdSignUrl:"",
qdSignAppId:""
qdSignAppId:"",
qtSign:""


}); });
</script> </script>

+ 26
- 13
subpackage/orders/transfer-page-sign.vue Näytä tiedosto

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


text { text {
width: 30%; width: 30%;
}

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

Loading…
Peruuta
Tallenna