|
|
|
@ -12,7 +12,8 @@ |
|
|
|
|
<!-- 顶部填充区域 --> |
|
|
|
|
<view class="fill"></view> |
|
|
|
|
<!-- 油站位置卡片 --> |
|
|
|
|
<view style="margin-top: 10rpx;" class=" serviceStation my-cell margin-left margin-right padding-top padding-bottom radius shadow "> |
|
|
|
|
<view style="margin-top: 10rpx;" |
|
|
|
|
class=" serviceStation my-cell margin-left margin-right padding-top padding-bottom radius shadow "> |
|
|
|
|
<view style="padding-bottom: 25rpx;" class="strong padding-bottom-xs">{{siteData.siteName}}</view> |
|
|
|
|
<view class=" textEllipsis font-12 color-999"> |
|
|
|
|
<uni-icons color="#666666" type="location-filled" size="15"></uni-icons> |
|
|
|
@ -53,12 +54,16 @@ |
|
|
|
|
<view class="newdirvercard"> |
|
|
|
|
<view class="newdirvercard_left"> |
|
|
|
|
<view style="flex-shrink: 1;"> |
|
|
|
|
<view style="height: 119rpx; width: 119rpx;overflow: hidden;" v-if="siteData.headUrl" class="cu-avatar round lg" :style="'background-image:url('+siteData.headUrl+');'"></view> |
|
|
|
|
<view style="height: 119rpx; width: 119rpx;overflow: hidden;" v-else class="cu-avatar round lg">星</view> |
|
|
|
|
<view style="height: 119rpx; width: 119rpx;overflow: hidden;" v-if="siteData.headUrl" |
|
|
|
|
class="cu-avatar round lg" :style="'background-image:url('+siteData.headUrl+');'"></view> |
|
|
|
|
<view style="height: 119rpx; width: 119rpx;overflow: hidden;" v-else class="cu-avatar round lg"> |
|
|
|
|
星</view> |
|
|
|
|
</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_text "> |
|
|
|
|
{{ type=='RIRISHUN'? '日日顺司机': type=='shunfeng'?'顺丰司机': siteData.customerName}}</view> |
|
|
|
|
<view class="newdirvercard_name_phone "> |
|
|
|
|
{{ type=='RIRISHUN'? '保密': type=='shunfeng'?'保密': siteData.customerPhone}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="newdirvercard_right"> |
|
|
|
@ -119,16 +124,13 @@ |
|
|
|
|
<!-- 油品卡片 --> |
|
|
|
|
<view class="padding-top-xs margin margin-top-xs margin-bottom-0 padding-bottom radius"> |
|
|
|
|
|
|
|
|
|
<view style="border-radius: 6px; overflow: hidden; " > |
|
|
|
|
<view style="border-radius: 6px; overflow: hidden; "> |
|
|
|
|
<!-- 油品类型 油品价格区域 --> |
|
|
|
|
<view class="bg-white padding padding-bottom-sm"> |
|
|
|
|
<!-- 油品类型 v-for siteData.oilSitePriceDetailsVos --> |
|
|
|
|
<view style="width: 100%;display: flex;flex-wrap: wrap; margin-bottom: 28rpx;"> |
|
|
|
|
<view |
|
|
|
|
style="margin-right: 15rpx;" |
|
|
|
|
v-for="(item,index) in siteData.oilSitePriceDetailsVos" |
|
|
|
|
:key="item.priceId" |
|
|
|
|
@tap="oilNameSel(item)" |
|
|
|
|
<view style="margin-right: 15rpx;" v-for="(item,index) in siteData.oilSitePriceDetailsVos" |
|
|
|
|
:key="item.priceId" @tap="oilNameSel(item)" |
|
|
|
|
:class="insertResult.oilProductCode===item.oilProductCode?'selecardoil':'cardoil'" |
|
|
|
|
class="strong padding-right-xs font-16 cardoil"> |
|
|
|
|
{{item.oilProductCode}} |
|
|
|
@ -147,7 +149,8 @@ |
|
|
|
|
v-if="(insertResult.sitePrice -1+1)>0">¥{{(insertResult.sitePrice -1+1)|numberFilter}}/{{siteData.siteType|company}}</text> |
|
|
|
|
<text class="text-blod oil-main-color" v-else>无价格</text> |
|
|
|
|
</text> |
|
|
|
|
<text class="s-rich">市场价¥{{insertResult.oilSitePrice|numberFilter}}/{{siteData.siteType|company}}</text> |
|
|
|
|
<text |
|
|
|
|
class="s-rich">市场价¥{{insertResult.oilSitePrice|numberFilter}}/{{siteData.siteType|company}}</text> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="padding-top-xs" v-else> |
|
|
|
@ -168,8 +171,9 @@ |
|
|
|
|
v-if="(insertResult.sitePrice -1+1)>0">¥{{ insertResult.sitePrice|numberFilter}}/{{siteData.siteType|company}}</text> |
|
|
|
|
<text class="text-blod oil-main-color" v-else>无价格</text> |
|
|
|
|
</text> |
|
|
|
|
<text style="margin-left: 75rpx; color: #222222;font-weight: bold;" >油站价格:¥ |
|
|
|
|
<text v-if="insertResult.oilSitePrice">{{insertResult.oilSitePrice}}/{{siteData.siteType|company }}</text> |
|
|
|
|
<text style="margin-left: 75rpx; color: #222222;font-weight: bold;">油站价格:¥ |
|
|
|
|
<text |
|
|
|
|
v-if="insertResult.oilSitePrice">{{insertResult.oilSitePrice}}/{{siteData.siteType|company }}</text> |
|
|
|
|
<text class="text-blod oil-main-color" v-else>无价格</text> |
|
|
|
|
</text> |
|
|
|
|
</view> |
|
|
|
@ -190,8 +194,11 @@ |
|
|
|
|
<view class="padding padding-bottom-0 padding-top-xs bg-white"> |
|
|
|
|
<view style="color: #333333;font-size: 30rpx;" class="padding-bottom-sm text-lg">枪号选择:</view> |
|
|
|
|
<view class="grid col-5 justify-start"> |
|
|
|
|
<view style="width: calc(100% / 4);" class="padding-xs" v-for="(item,index) in ColorList" :key="index"> |
|
|
|
|
<button @tap="gunIdSel(index)" :style="{width: '100%',color:insertResult.bar===index+1?'':'#333333'}" class="cu-btn" |
|
|
|
|
<view style="width: calc(100% / 4);" class="padding-xs" v-for="(item,index) in ColorList" |
|
|
|
|
:key="index"> |
|
|
|
|
<button @tap="gunIdSel(index)" |
|
|
|
|
:style="{width: '100%',color:insertResult.bar===index+1?'':'#333333'}" |
|
|
|
|
class="cu-btn" |
|
|
|
|
:class="[insertResult.bar===index+1?'bg-main-oil':'line-gray']">{{index+1}}</button> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -207,13 +214,16 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="cu-form-group" v-else> |
|
|
|
|
<view class="title newtitle"> {{siteData.siteType=='2'?'加气升数':'加油金额'}}</view> |
|
|
|
|
<input class="newtitle" :placeholder="`请输入${siteData.siteType=='2'?'加气升数':'加油金额'}`" @input="checkNumber" type="digit" @blur="getMoney" |
|
|
|
|
v-model="insertResult.vol" name="input" /> |
|
|
|
|
<input class="newtitle" :placeholder="`请输入${siteData.siteType=='2'?'加气升数':'加油金额'}`" |
|
|
|
|
@input="checkNumber" type="digit" @blur="getMoney" v-model="insertResult.vol" |
|
|
|
|
name="input" /> |
|
|
|
|
<view style="width: 170rpx;text-align: end;" class="textEllipsis"> |
|
|
|
|
<text class=""> |
|
|
|
|
<!-- 约 {{ vlom? vlom:'xxx.x' }} L clc 注销 --> |
|
|
|
|
<text v-if="siteData.siteType!='2'">{{vlom?'约' + ( (Math.round(vlom*100)/100).toFixed(2) ) + (siteData.siteType=='2'?'元':'L'):''}}</text> |
|
|
|
|
<text v-if="siteData.siteType=='2'">{{vlom?'约' + ( insertResult.vDoMoney ? insertResult.vDoMoney+insertResult.discountMoney:'') + (siteData.siteType=='2'?'元':'L'):''}}</text> |
|
|
|
|
<text |
|
|
|
|
v-if="siteData.siteType!='2'">{{vlom?'约' + ( (Math.round(vlom*100)/100).toFixed(2) ) + (siteData.siteType=='2'?'元':'L'):''}}</text> |
|
|
|
|
<text |
|
|
|
|
v-if="siteData.siteType=='2'">{{vlom?'约' + ( insertResult.vDoMoney ? insertResult.vDoMoney+insertResult.discountMoney:'') + (siteData.siteType=='2'?'元':'L'):''}}</text> |
|
|
|
|
<!-- {{vlom?'约' + ( (Math.round(vlom*100)/100).toFixed(2) ) + 'L':''}} --> |
|
|
|
|
</text> |
|
|
|
|
</view> |
|
|
|
@ -231,7 +241,8 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<button :disabled="shake!==null" class="margin round bg-main-oil" @tap="charge"> {{shake==null?'立即下单':'下单中'}}</button> |
|
|
|
|
<button :disabled="shake!==null" class="margin round bg-main-oil" @tap="charge"> |
|
|
|
|
{{shake==null?'立即下单':'下单中'}}</button> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class v-show="!beforePay&&isG7"> |
|
|
|
@ -315,7 +326,7 @@ |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
shake:null, |
|
|
|
|
shake: null, |
|
|
|
|
vlom: '', |
|
|
|
|
companyId: '', |
|
|
|
|
activeSitePrice: '', |
|
|
|
@ -378,34 +389,34 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
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) |
|
|
|
|
this.qrCode = orderId |
|
|
|
|
this.isOtherUser = true |
|
|
|
|
console.log('这里是onload', 'CODE', code, '++++', orderId, '------', 'END') |
|
|
|
|
console.log(this.qrCode) |
|
|
|
|
// // console.log('这里是onload', 'CODE', code, '++++', orderId, '------', 'END') |
|
|
|
|
// // console.log(this.qrCode) |
|
|
|
|
} |
|
|
|
|
// if(option.type =='RIRISHUN'){ |
|
|
|
|
// console.log('这里是日日顺') |
|
|
|
|
// // console.log('这里是日日顺') |
|
|
|
|
this.type = option.type //根据option.type 进行本地赋值 |
|
|
|
|
// }if(option.type =='zeyi'){ |
|
|
|
|
// console.log('这里是日日顺') |
|
|
|
|
// // console.log('这里是日日顺') |
|
|
|
|
// this.type = 'zeyi' //根据option.type 进行本地赋值 |
|
|
|
|
// } |
|
|
|
|
// if(option.type =='shunfeng'){ |
|
|
|
|
// console.log('这里是顺丰') |
|
|
|
|
// // console.log('这里是顺丰') |
|
|
|
|
// this.type = 'shunfeng' //根据option.type 进行本地赋值 |
|
|
|
|
// } |
|
|
|
|
// if(option.type =='fykc'){ |
|
|
|
|
// console.log('这里是福佑') |
|
|
|
|
// // console.log('这里是福佑') |
|
|
|
|
// this.type = 'fykc' //根据option.type 进行本地赋值 |
|
|
|
|
// } |
|
|
|
|
if (this.qrCode) { |
|
|
|
|
if (this.qrCode.substr(0, 2) == 'HT' || this.qrCode.substr(0, 2) == 'G7'|| this.type === 'G7') { |
|
|
|
|
if (this.qrCode.substr(0, 2) == 'HT' || this.qrCode.substr(0, 2) == 'G7' || this.type === 'G7') { |
|
|
|
|
this.isG7 = true |
|
|
|
|
console.log('G7加油站') |
|
|
|
|
// // console.log('G7加油站') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.verifyQrCode() |
|
|
|
@ -419,7 +430,7 @@ |
|
|
|
|
watch: { |
|
|
|
|
oilTypeList: { |
|
|
|
|
handler(newVal, oldVal) { |
|
|
|
|
console.log('深度监听', newVal, oldVal) |
|
|
|
|
// // console.log('深度监听', newVal, oldVal) |
|
|
|
|
this.oilTypeList = newVal |
|
|
|
|
if (!this.insertResult.oilCode) { |
|
|
|
|
this.initForm() |
|
|
|
@ -431,11 +442,11 @@ |
|
|
|
|
deep: true, |
|
|
|
|
immediate: true, |
|
|
|
|
handler(newVal, oldVal) { |
|
|
|
|
console.log(newVal) |
|
|
|
|
console.log(oldVal) |
|
|
|
|
// // console.log(newVal) |
|
|
|
|
// // console.log(oldVal) |
|
|
|
|
this.selected = newVal |
|
|
|
|
if (newVal) { |
|
|
|
|
console.log('selected发生变化') |
|
|
|
|
// // console.log('selected发生变化') |
|
|
|
|
// oilSitePrice 市场价格 sitePrice 实际加油价格 |
|
|
|
|
if (this.selected.oilSitePrice) { |
|
|
|
|
this.insertResult.oilSitePrice = this.selected.oilSitePrice |
|
|
|
@ -446,8 +457,8 @@ |
|
|
|
|
this.insertResult.sitePrice = this.selected.sitePrice |
|
|
|
|
this.insertResult.oilProductCode = this.selected.oilProductCode |
|
|
|
|
if (this.type != undefined) { |
|
|
|
|
console.log(this.type) |
|
|
|
|
console.log('changeMoney') |
|
|
|
|
// // console.log(this.type) |
|
|
|
|
// // console.log('changeMoney') |
|
|
|
|
this.changeMoney() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -466,9 +477,9 @@ |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
hz(e){ |
|
|
|
|
hz(e) { |
|
|
|
|
// carNumber.length>0 |
|
|
|
|
// console.log(new RegExp("[\u4E00-\u9FA5]+").test(e),'*-*-*-*-*-*') |
|
|
|
|
// // console.log(new RegExp("[\u4E00-\u9FA5]+").test(e),'*-*-*-*-*-*') |
|
|
|
|
return new RegExp("[\u4E00-\u9FA5]+").test(e) |
|
|
|
|
}, |
|
|
|
|
checkNumber(e) { |
|
|
|
@ -478,18 +489,18 @@ |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
changeBar(item, i) { |
|
|
|
|
console.log(item) |
|
|
|
|
// // console.log(item) |
|
|
|
|
this.activeSitePrice = item.priceId |
|
|
|
|
this.curIndex = i |
|
|
|
|
this.selected = { |
|
|
|
|
...item |
|
|
|
|
} |
|
|
|
|
// this.insertResult.sitePrice = this.statOil.sitePrice |
|
|
|
|
// console.log(this.statOil) |
|
|
|
|
// // console.log(this.statOil) |
|
|
|
|
if (this.insertResult.vol) { |
|
|
|
|
this.getMoney(this.InputNumber) |
|
|
|
|
} |
|
|
|
|
// console.log('选择你/n', this.selected, '/n') |
|
|
|
|
// // console.log('选择你/n', this.selected, '/n') |
|
|
|
|
}, |
|
|
|
|
isNumber(value) { // 判断是否为正常数字 |
|
|
|
|
const regPos = /^\d+(\.\d+)?$/; //非负浮点数 |
|
|
|
@ -504,7 +515,7 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getMoney(e) { |
|
|
|
|
console.log(e) |
|
|
|
|
// // console.log(e) |
|
|
|
|
if (e.detail.value == '') { |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// title: '请输入金额', |
|
|
|
@ -524,7 +535,7 @@ |
|
|
|
|
if (this.siteData.oilCardNature == 1) { |
|
|
|
|
var uerTyps = '0' // 0是个人 1是企业 |
|
|
|
|
} else { |
|
|
|
|
console.log('当前为企业') |
|
|
|
|
// // console.log('当前为企业') |
|
|
|
|
var uerTyps = '1' // 0是个人 1是企业 |
|
|
|
|
} |
|
|
|
|
if (this.type == 'ZEYI' || this.type == 'RIRISHUN') { |
|
|
|
@ -543,7 +554,7 @@ |
|
|
|
|
xoilAmountGun: e.detail.value, |
|
|
|
|
priceId: this.activeSitePrice, |
|
|
|
|
companyId: this.siteData.companyId, |
|
|
|
|
createSource:this.siteData.siteType=='2'?'XOIL':'' |
|
|
|
|
createSource: this.siteData.siteType == '2' ? 'XOIL' : '' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.xoilAmountGun = e.detail.value |
|
|
|
@ -576,8 +587,8 @@ |
|
|
|
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 |
|
|
|
|
// sourceType: ['album'], //从相册选择 |
|
|
|
|
success: function(res) { |
|
|
|
|
console.log(res) |
|
|
|
|
console.log('进入1') |
|
|
|
|
// // console.log(res) |
|
|
|
|
// // console.log('进入1') |
|
|
|
|
const JSESSIONID = utils.uuid() |
|
|
|
|
uni.uploadFile({ |
|
|
|
|
url: 'https://www.xingoil.com/adminapi/oil-oss/obejct/uploadFile', |
|
|
|
@ -598,8 +609,8 @@ |
|
|
|
|
'token': utils.md5Salt(JSESSIONID) |
|
|
|
|
}, |
|
|
|
|
success(e) { |
|
|
|
|
console.log('进入2') |
|
|
|
|
console.log(e) |
|
|
|
|
// // console.log('进入2') |
|
|
|
|
// // console.log(e) |
|
|
|
|
let obj = JSON.parse(e.data), |
|
|
|
|
url = obj.data.publicUrl |
|
|
|
|
if (type == 'car') { |
|
|
|
@ -608,17 +619,17 @@ |
|
|
|
|
plateNumberImage: obj.data.publicUrl |
|
|
|
|
} |
|
|
|
|
_that.PlateNumberImages = url |
|
|
|
|
console.log('这里是司机车牌', url) |
|
|
|
|
// // console.log('这里是司机车牌', url) |
|
|
|
|
_that.isPlateNumber = false |
|
|
|
|
oliSiteApi.plateNumberRecognition(data).then((res) => { |
|
|
|
|
let obj = JSON.parse(res.data) |
|
|
|
|
console.log(obj.NUMBER) |
|
|
|
|
// // console.log(obj.NUMBER) |
|
|
|
|
_that.carNumber = obj.NUMBER |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
_that.refuellerImages = url |
|
|
|
|
_that.isUefueller = false |
|
|
|
|
console.log('这里是油站图片', _that.refuellerImages, url) |
|
|
|
|
// // console.log('这里是油站图片', _that.refuellerImages, url) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -635,12 +646,12 @@ |
|
|
|
|
charge() { |
|
|
|
|
//防抖 |
|
|
|
|
clearTimeout(this.shake) |
|
|
|
|
this.shake = setTimeout(()=>{ |
|
|
|
|
this.shake = setTimeout(() => { |
|
|
|
|
this.tsetPlate() |
|
|
|
|
console.log(this.plateText) |
|
|
|
|
console.log(this.plateNo) |
|
|
|
|
console.log(this.carNumber) |
|
|
|
|
console.log(this.testResult) |
|
|
|
|
// // console.log(this.plateText) |
|
|
|
|
// // console.log(this.plateNo) |
|
|
|
|
// // console.log(this.carNumber) |
|
|
|
|
// // console.log(this.testResult) |
|
|
|
|
if ((this.insertResult.sitePrice - 1 + 1) > 0) { |
|
|
|
|
if (this.type == 'RIRISHUN') { //根据type值判断是否为日日顺 |
|
|
|
|
this.RrsOrder() |
|
|
|
@ -669,16 +680,16 @@ |
|
|
|
|
title: '车牌号校验不通过', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '您选择的油品没有油价,不能加油', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
} |
|
|
|
|
},500) |
|
|
|
|
}, 500) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//福佑 |
|
|
|
@ -694,13 +705,13 @@ |
|
|
|
|
version: 1, //类型:Number 必有字段 备注:版本号 |
|
|
|
|
xoilAmountGun: this.insertResult.vol, //类型:String 必有字段 备注:加油升数 |
|
|
|
|
} |
|
|
|
|
console.log(data6) |
|
|
|
|
// console.log(data6) |
|
|
|
|
if (!data6.qrCode) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: 'qrCode为空', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!data6.siteId) { |
|
|
|
@ -708,7 +719,7 @@ |
|
|
|
|
title: '请选择油站id', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!data6.companyId) { |
|
|
|
@ -716,7 +727,7 @@ |
|
|
|
|
title: '请选择企业id', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!data6.customerId) { |
|
|
|
@ -724,7 +735,7 @@ |
|
|
|
|
title: '请选择司机id', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!data6.volume) { |
|
|
|
@ -732,7 +743,7 @@ |
|
|
|
|
title: '请输入加油体积', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
oliSiteApi.FYPay(data6).then(res => { |
|
|
|
@ -741,7 +752,7 @@ |
|
|
|
|
title: '下单成功!' |
|
|
|
|
}); |
|
|
|
|
// uni.setStorageSync('orderInfo',data6) |
|
|
|
|
// console.log(res.data.orderId) |
|
|
|
|
// // console.log(res.data.orderId) |
|
|
|
|
// let orderId = res.data.orderId |
|
|
|
|
// this.checkSf(res.data.orderId) |
|
|
|
|
// this.gotoOrderStatus(res.data) |
|
|
|
@ -778,13 +789,13 @@ |
|
|
|
|
version: 1, //类型:Number 必有字段 备注:版本号 |
|
|
|
|
xoilAmountGun: this.insertResult.vol, //类型:String 必有字段 备注:加油升数 |
|
|
|
|
} |
|
|
|
|
console.log(data6) |
|
|
|
|
// console.log(data6) |
|
|
|
|
if (!data6.qrCode) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: 'qrCode为空', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!data6.siteId) { |
|
|
|
@ -792,7 +803,7 @@ |
|
|
|
|
title: '请选择油站id', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!data6.companyId) { |
|
|
|
@ -800,7 +811,7 @@ |
|
|
|
|
title: '请选择企业id', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!data6.customerId) { |
|
|
|
@ -808,7 +819,7 @@ |
|
|
|
|
title: '请选择司机id', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!data6.volume) { |
|
|
|
@ -816,7 +827,7 @@ |
|
|
|
|
title: '请输入加油体积', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
oliSiteApi.sfPay(data6).then(res => { |
|
|
|
@ -825,7 +836,7 @@ |
|
|
|
|
title: '下单成功!' |
|
|
|
|
}); |
|
|
|
|
uni.setStorageSync('orderInfo', data6) |
|
|
|
|
console.log(res.data.orderId) |
|
|
|
|
// // console.log(res.data.orderId) |
|
|
|
|
let orderId = res.data.orderId |
|
|
|
|
// this.checkSf(res.data.orderId) |
|
|
|
|
this.gotoOrderStatus(res.data) |
|
|
|
@ -869,14 +880,14 @@ |
|
|
|
|
gun_number: this.insertResult.bar, //类型:String 必有字段 备注:加油升数 |
|
|
|
|
deduction_mode: 1, |
|
|
|
|
} |
|
|
|
|
console.log("加油信息===================",this.insertResult) |
|
|
|
|
console.log(g7OrderInfo) |
|
|
|
|
// console.log("加油信息===================",this.insertResult) |
|
|
|
|
// console.log(g7OrderInfo) |
|
|
|
|
if (!g7OrderInfo.qr_code) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: 'qr_code为空', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!g7OrderInfo.station_id) { |
|
|
|
@ -884,7 +895,7 @@ |
|
|
|
|
title: '请选择油站id', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!g7OrderInfo.companyId) { |
|
|
|
@ -892,7 +903,7 @@ |
|
|
|
|
title: '请选择企业id', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!g7OrderInfo.customerId) { |
|
|
|
@ -900,7 +911,7 @@ |
|
|
|
|
title: '请选择司机id', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!g7OrderInfo.gun_money) { |
|
|
|
@ -908,7 +919,7 @@ |
|
|
|
|
title: '请输入加油金额', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
oliSiteApi.G7Pay(g7OrderInfo).then(res => { |
|
|
|
@ -917,7 +928,7 @@ |
|
|
|
|
title: '下单成功!' |
|
|
|
|
}); |
|
|
|
|
uni.setStorageSync('orderSource', 'mpxoil') |
|
|
|
|
console.log("是否是g7================",this.isG7) |
|
|
|
|
// console.log("是否是g7================",this.isG7) |
|
|
|
|
if (!this.isG7) { |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.toDetails(res.data.orderId) |
|
|
|
@ -926,13 +937,13 @@ |
|
|
|
|
this.beforePay = false |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.orderId = res.data.orderId |
|
|
|
|
console.log("queryTimer",this.orderId) |
|
|
|
|
// console.log("queryTimer",this.orderId) |
|
|
|
|
this.queryTimer() |
|
|
|
|
console.log("getPayStatus",this.orderId) |
|
|
|
|
// console.log("getPayStatus",this.orderId) |
|
|
|
|
this.getPayStatus(this.orderId) |
|
|
|
|
}, 400) |
|
|
|
|
} |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
@ -965,7 +976,7 @@ |
|
|
|
|
title: '请选择油品', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!data6.volume) { |
|
|
|
@ -973,7 +984,7 @@ |
|
|
|
|
title: '请输入加油体积', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
oliSiteApi.RrsPay(data6).then(res => { |
|
|
|
@ -1025,7 +1036,7 @@ |
|
|
|
|
let PlateNumberImages = this.PlateNumberImages, |
|
|
|
|
refuellerImages = this.refuellerImages |
|
|
|
|
if (PlateNumberImages == '') { |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
uni.showToast({ |
|
|
|
|
icon: 'none', |
|
|
|
|
title: '请上传车辆照片' |
|
|
|
@ -1037,7 +1048,7 @@ |
|
|
|
|
icon: 'none', |
|
|
|
|
title: '请上传油机照片' |
|
|
|
|
}) |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
var data6 = { |
|
|
|
@ -1062,7 +1073,7 @@ |
|
|
|
|
oilCardType: this.siteData.oilCardNature, //类型:String 必有字段 备注:油卡性质 1:个人 2:企业 3:外请 |
|
|
|
|
accountCardCode: this.siteData.accountCardCode, //类型:String 必有字段 备注:油卡卡号 |
|
|
|
|
siteUserName: "1", //类型:String 必有字段 备注:加油员名称 |
|
|
|
|
version: this.siteData.siteType=='2'?null:'1', //类型:Number 必有字段 备注:版本号 |
|
|
|
|
version: this.siteData.siteType == '2' ? null : '1', //类型:Number 必有字段 备注:版本号 |
|
|
|
|
xoilAmountGun: this.insertResult.vol, //类型:String 必有字段 备注:加油升数 |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
@ -1087,7 +1098,7 @@ |
|
|
|
|
oilCardType: this.siteData.oilCardNature, //类型:String 必有字段 备注:油卡性质 1:个人 2:企业 3:外请 |
|
|
|
|
accountCardCode: this.siteData.accountCardCode, //类型:String 必有字段 备注:油卡卡号 |
|
|
|
|
siteUserName: "1", //类型:String 必有字段 备注:加油员名称 |
|
|
|
|
version: this.siteData.siteType=='2'?null:"1", //类型:Number 必有字段 备注:版本号 |
|
|
|
|
version: this.siteData.siteType == '2' ? null : "1", //类型:Number 必有字段 备注:版本号 |
|
|
|
|
xoilAmountGun: this.insertResult.vol, //类型:String 必有字段 备注:加油升数 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1097,25 +1108,28 @@ |
|
|
|
|
title: '请选择油品', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!Number(data6.volume)) { |
|
|
|
|
if(this.siteData.siteType=='2'){ |
|
|
|
|
if (this.siteData.siteType == '2') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '请输入加油升数', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '请输入加油金额', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
let location = uni.getStorageSync('location')||{longitude:'',latitude:''}; |
|
|
|
|
let location = uni.getStorageSync('location') || { |
|
|
|
|
longitude: '', |
|
|
|
|
latitude: '' |
|
|
|
|
}; |
|
|
|
|
// if(!location){ |
|
|
|
|
// let locationChenk = true |
|
|
|
|
// let that = this |
|
|
|
@ -1137,7 +1151,7 @@ |
|
|
|
|
// icon:'error' |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
// console.log(location,'**************************************************') |
|
|
|
|
// // console.log(location,'**************************************************') |
|
|
|
|
// return |
|
|
|
|
// } |
|
|
|
|
// uni.getLocation({ |
|
|
|
@ -1156,11 +1170,11 @@ |
|
|
|
|
// wx.openSetting({ |
|
|
|
|
// success:function(e){ |
|
|
|
|
// if (res.authSetting['scope.userLocation']){ |
|
|
|
|
// console.log('******') |
|
|
|
|
// // console.log('******') |
|
|
|
|
// } |
|
|
|
|
// }, |
|
|
|
|
// fail:function(e){ |
|
|
|
|
// console.log(e,'//////') |
|
|
|
|
// // console.log(e,'//////') |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
@ -1169,9 +1183,12 @@ |
|
|
|
|
// }); |
|
|
|
|
// return |
|
|
|
|
// |
|
|
|
|
console.log(data6, 'data6+++++') |
|
|
|
|
oliSiteApi.xoilPay(Object.assign(data6,{longitude:location.longitude,latitude:location.latitude})).then(res => { |
|
|
|
|
console.log(res) |
|
|
|
|
// console.log(data6, 'data6+++++') |
|
|
|
|
oliSiteApi.xoilPay(Object.assign(data6, { |
|
|
|
|
longitude: location.longitude, |
|
|
|
|
latitude: location.latitude |
|
|
|
|
})).then(res => { |
|
|
|
|
// console.log(res) |
|
|
|
|
if (res.code === 20000) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '下单成功!' |
|
|
|
@ -1208,9 +1225,9 @@ |
|
|
|
|
}, 400) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
this.shake=null |
|
|
|
|
},1000) |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.shake = null |
|
|
|
|
}, 1000) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 收费则yi |
|
|
|
@ -1237,7 +1254,7 @@ |
|
|
|
|
title: '请选择油品', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (!data6.volume) { |
|
|
|
@ -1245,7 +1262,7 @@ |
|
|
|
|
title: '请输入加油体积', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
this.shake=null |
|
|
|
|
this.shake = null |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
oliSiteApi.zeyiPay(data6).then(res => { |
|
|
|
@ -1286,15 +1303,15 @@ |
|
|
|
|
this.getPayStatus(this.orderId) |
|
|
|
|
}, 400) |
|
|
|
|
} |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
this.shake=null |
|
|
|
|
},1000) |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.shake = null |
|
|
|
|
}, 1000) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getPayStatus(id) { |
|
|
|
|
// 获取订单支付状态 |
|
|
|
|
console.log('获取支付状态', id) |
|
|
|
|
// console.log('获取支付状态', id) |
|
|
|
|
g7Api.getPayStatus(id).then(res => { |
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
this.payState = res.data.payState |
|
|
|
@ -1316,7 +1333,7 @@ |
|
|
|
|
|
|
|
|
|
toDetails(id) { |
|
|
|
|
uni.setStorageSync('orderId', id) |
|
|
|
|
console.log('id', id) |
|
|
|
|
// console.log('id', id) |
|
|
|
|
uni.redirectTo({ |
|
|
|
|
url: '/packageOrders/pages/orderList/OrderDetail/OrderDetail' |
|
|
|
|
}) |
|
|
|
@ -1326,22 +1343,22 @@ |
|
|
|
|
this.insertResult.bar = index + 1 |
|
|
|
|
}, |
|
|
|
|
oilNameSel(item) { |
|
|
|
|
console.log(item, 'item') |
|
|
|
|
// console.log(item, 'item') |
|
|
|
|
this.selected = { |
|
|
|
|
...item |
|
|
|
|
} |
|
|
|
|
this.activeSitePrice = item.priceId |
|
|
|
|
console.log('选择你/n', this.selected, '/n') |
|
|
|
|
// console.log('选择你/n', this.selected, '/n') |
|
|
|
|
}, |
|
|
|
|
initForm() { |
|
|
|
|
if (!this.insertResult.realPrice) { |
|
|
|
|
this.selected = this.siteData.oilSitePriceDetailsVos[0] |
|
|
|
|
} |
|
|
|
|
this.insertResult.bar = 1 |
|
|
|
|
console.log(this.selected) |
|
|
|
|
// console.log(this.selected) |
|
|
|
|
}, |
|
|
|
|
verifyQrCode() { |
|
|
|
|
console.log(this.zyInfo) |
|
|
|
|
// console.log(this.zyInfo) |
|
|
|
|
// if(this.zyInfo.oilsStationId !=undefined){ |
|
|
|
|
// let obj={ |
|
|
|
|
// qrCode: this.zyInfo.qrCode, //类型:String 必有字段 备注:二维码字符串 |
|
|
|
@ -1353,7 +1370,7 @@ |
|
|
|
|
oilsStationId: uni.getStorageSync('oilSiteId') //类型:String 必有字段 备注:加油站id |
|
|
|
|
} |
|
|
|
|
// } |
|
|
|
|
console.log(obj,'**************'); |
|
|
|
|
// console.log(obj,'**************'); |
|
|
|
|
oliSiteApi.verifyQrCode(obj).then(res => { |
|
|
|
|
if (res.code === 20000) { |
|
|
|
|
this.siteData = res.data |
|
|
|
@ -1379,7 +1396,7 @@ |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
setTimeout(() => { |
|
|
|
|
uni.navigateBack() |
|
|
|
|
// uni.navigateBack() |
|
|
|
|
}, 800) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -1392,18 +1409,18 @@ |
|
|
|
|
// this.insertResult.discountMoney = this.insertResult.vol * (this.selected.oilSitePrice - this.insertResult |
|
|
|
|
// .sitePrice) |
|
|
|
|
// this.insertResult.vDoMoney = this.insertResult.vol * this.selected.sitePrice |
|
|
|
|
console.log('%c look me ↓','font-size:50px;color:green') |
|
|
|
|
console.log(this.insertResult.vMoney,this.insertResult,this.selected) |
|
|
|
|
if(this.insertResult.vol!==''){ |
|
|
|
|
// console.log('%c look me ↓','font-size:50px;color:green') |
|
|
|
|
// console.log(this.insertResult.vMoney,this.insertResult,this.selected) |
|
|
|
|
if (this.insertResult.vol !== '') { |
|
|
|
|
this.getMoney({ |
|
|
|
|
detail:{ |
|
|
|
|
value:this.insertResult.vol |
|
|
|
|
detail: { |
|
|
|
|
value: this.insertResult.vol |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
calcMoney(e) { |
|
|
|
|
// console.log(e) |
|
|
|
|
// // console.log(e) |
|
|
|
|
if (this.changTypes = 1) { |
|
|
|
|
let rrs = e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]; // 处理输入油升数 只保留小数点后两位 |
|
|
|
|
this.$nextTick(() => { //重新赋值给input |
|
|
|
@ -1419,7 +1436,7 @@ |
|
|
|
|
queryTimer() { |
|
|
|
|
var count = 5 |
|
|
|
|
this.timer = setInterval(() => { |
|
|
|
|
console.log('查询次', count) |
|
|
|
|
// console.log('查询次', count) |
|
|
|
|
count-- |
|
|
|
|
this.getPayStatus(this.orderId) |
|
|
|
|
}, 5000); |
|
|
|
@ -1493,15 +1510,15 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
filters: { |
|
|
|
|
company(e){ |
|
|
|
|
if(e){ |
|
|
|
|
return e=='2' ?'KG':'L'; |
|
|
|
|
company(e) { |
|
|
|
|
if (e) { |
|
|
|
|
return e == '2' ? 'KG' : 'L'; |
|
|
|
|
} else { |
|
|
|
|
return '' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
moneyVolm(value) { |
|
|
|
|
console.log(value, '++awdad+++++++-') |
|
|
|
|
// console.log(value, '++awdad+++++++-') |
|
|
|
|
if (value != 'xxx.x') { |
|
|
|
|
return Math.round(value * 100) / 100; |
|
|
|
|
} else { |
|
|
|
|