This commit is contained in:
lixuan
2022-06-10 10:13:38 +08:00
parent 8534bd605e
commit 4ffb634e97
12 changed files with 284 additions and 7 deletions

View File

@@ -58,7 +58,7 @@
</view>
<view class="newdirvercard_name ">
<view class="newdirvercard_name_text ">{{ type=='RIRISHUN'? '日日顺司机': type=='shunfeng'?'顺丰司机': siteData.customerName}}</view>
<view class="newdirvercard_name_phone ">{{ type=='RIRISHUN'? '保密': type=='shunfeng'?'保密': siteData.customerPhone}}</view>
<view class="newdirvercard_name_phone " v-if="type!='ANNENG'">{{ type=='RIRISHUN'? '保密': type=='shunfeng'?'保密': siteData.customerPhone}}</view>
</view>
</view>
<view class="newdirvercard_right">
@@ -373,7 +373,7 @@
}
},
onLoad(option) {
console.log(option) //接收option.type
console.log(option) //接收option.type
if (option.user == 'kl') {
let code = uni.getStorageSync('qrCode'),
orderId = code.slice(0, -3)
@@ -647,6 +647,10 @@
this.FyOrder()
return
}
if (this.type == 'ANNENG') {
this.NnOrder()
return
}
if (this.testResult) {
if (this.qrCode.substring(0, 4) == 'XING') {
this.saveZeyiOrder()
@@ -742,6 +746,83 @@
}, 400)
}
}
})
},//安能
NnOrder() {
const data7 = {
qrCode: uni.getStorageSync('qrCode'), //类型String 必有字段 二维码 qrcode
orderSource: "WECHAT_MINIAPPS",
siteId: this.siteData.siteId, //类型String 必有字段 油站id siteId
priceId: this.insertResult.priceId, //类型String 必有字段 油价id priceId
companyId: this.siteData.companyId, //类型String 必有字段 企业id companyId
customerId: this.siteData.customerId, //类型String 必有字段 司机id customerId
volume: parseFloat(this.insertResult.vol), //类型number 必有字段 升数 volume,
vehicleLicenseNum: this.carNumber,
version: 1, //类型Number 必有字段 备注:版本号
xoilAmountGun: this.insertResult.vol, //类型String 必有字段 备注:加油升数
}
console.log(data7)
if (!data7.qrCode) {
uni.showToast({
title: 'qrCode为空',
icon: 'none'
});
return false
}
if (!data7.siteId) {
uni.showToast({
title: '请选择油站id',
icon: 'none'
});
return false
}
if (!data7.companyId) {
uni.showToast({
title: '请选择企业id',
icon: 'none'
});
return false
}
if (!data7.customerId) {
uni.showToast({
title: '请选择司机id',
icon: 'none'
});
return false
}
if (!data7.volume) {
uni.showToast({
title: '请输入加油体积',
icon: 'none'
});
return false
}
oliSiteApi.AnPay(data7).then(res => {
if (res.code === 20000) {
uni.showToast({
title: '下单成功!'
});
uni.setStorageSync('orderInfo', data7)
console.log(res.data.orderId)
let orderId = res.data.orderId
// this.checkSf(res.data.orderId)
this.gotoOrderStatus(res.data)
// uni.setStorageSync('formQr', true)
// uni.setStorageSync('orderSource', 'mpxoil')
// if (!this.isG7) {
// setTimeout(() => {
// this.toDetails(res.data.orderId)
// }, 400)
// } else {
// this.beforePay = false
// setTimeout(() => {
// this.orderId = res.data.orderId
// this.queryTimer()
// this.getPayStatus(this.orderId)
// }, 400)
// }
}
})
},