diff --git a/pages/stationDetail/ZYSite.vue b/pages/stationDetail/ZYSite.vue
index 090785f..afcc596 100644
--- a/pages/stationDetail/ZYSite.vue
+++ b/pages/stationDetail/ZYSite.vue
@@ -12,14 +12,15 @@
-
+
{{siteData.siteName}}
{{siteData.siteAddress}}
-
+
-
+
-
+
-
- 星
+
+
+ 星
- {{ type=='RIRISHUN'? '日日顺司机': type=='shunfeng'?'顺丰司机': siteData.customerName}}
- {{ type=='RIRISHUN'? '保密': type=='shunfeng'?'保密': siteData.customerPhone}}
+
+ {{ type=='RIRISHUN'? '日日顺司机': type=='shunfeng'?'顺丰司机': siteData.customerName}}
+
+ {{ type=='RIRISHUN'? '保密': type=='shunfeng'?'保密': siteData.customerPhone}}
-
+
¥{{siteData.userBalance || 0}}
@@ -93,65 +98,63 @@
需包含加油升数和价格
-
+
-
+
车牌号
-
+
-
-
-
+
+
+
{{String(carNumber).charAt(0)||''}}
-
- {{String(carNumber).substr(1,6)||'请输入车牌号'}}
-
+ {{String(carNumber).substr(1,6)||'请输入车牌号'}}
+
+
-
+
-
-
+
+
-
- {{item.oilProductCode}}
+
+ {{item.oilProductCode}}
-
+
-
+
-
+
星油价格:
¥{{(insertResult.sitePrice -1+1)|numberFilter}}/{{siteData.siteType|company}}
无价格
- 市场价¥{{insertResult.oilSitePrice|numberFilter}}/{{siteData.siteType|company}}
-
-
+ 市场价¥{{insertResult.oilSitePrice|numberFilter}}/{{siteData.siteType|company}}
+
+
-
+
-
+
-
+
星油价格:
¥{{ insertResult.sitePrice|numberFilter}}/{{siteData.siteType|company}}
- 无价格
+ 无价格
- 油站价格:¥
- {{insertResult.oilSitePrice}}/{{siteData.siteType|company }}
- 无价格
+ 油站价格:¥
+ {{insertResult.oilSitePrice}}/{{siteData.siteType|company }}
+ 无价格
-
-
-
-
-
+
枪号选择:
-
-
-
+
加油升数
{{siteData.siteType=='2'?'加气升数':'加油金额'}}
-
+
- {{vlom?'约' + ( (Math.round(vlom*100)/100).toFixed(2) ) + (siteData.siteType=='2'?'元':'L'):''}}
- {{vlom?'约' + ( insertResult.vDoMoney ? insertResult.vDoMoney+insertResult.discountMoney:'') + (siteData.siteType=='2'?'元':'L'):''}}
+ {{vlom?'约' + ( (Math.round(vlom*100)/100).toFixed(2) ) + (siteData.siteType=='2'?'元':'L'):''}}
+ {{vlom?'约' + ( insertResult.vDoMoney ? insertResult.vDoMoney+insertResult.discountMoney:'') + (siteData.siteType=='2'?'元':'L'):''}}
-
+
星卡优惠金额
@@ -231,7 +241,8 @@
- {{shake==null?'立即下单':'下单中'}}
+
+ {{shake==null?'立即下单':'下单中'}}
@@ -315,7 +326,7 @@
},
data() {
return {
- shake:null,
+ shake: null,
vlom: '',
companyId: '',
activeSitePrice: '',
@@ -403,7 +414,7 @@
// 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加油站')
}
@@ -466,7 +477,7 @@
},
methods: {
- hz(e){
+ hz(e) {
// carNumber.length>0
// console.log(new RegExp("[\u4E00-\u9FA5]+").test(e),'*-*-*-*-*-*')
return new RegExp("[\u4E00-\u9FA5]+").test(e)
@@ -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
@@ -635,7 +646,7 @@
charge() {
//防抖
clearTimeout(this.shake)
- this.shake = setTimeout(()=>{
+ this.shake = setTimeout(() => {
this.tsetPlate()
console.log(this.plateText)
console.log(this.plateNo)
@@ -650,10 +661,10 @@
this.SfOrder()
return
}
- if (this.type === 'G7') {
- this.G7Order()
- return
- }
+ if (this.type === 'G7') {
+ this.G7Order()
+ return
+ }
if (this.type == 'fykc') {
this.FyOrder()
return
@@ -669,17 +680,17 @@
title: '车牌号校验不通过',
icon: 'none'
});
- this.shake=null
+ this.shake = null
}
} else {
uni.showToast({
title: '您选择的油品没有油价,不能加油',
icon: 'none'
});
- this.shake=null
+ this.shake = null
}
- },500)
-
+ }, 500)
+
},
//福佑
FyOrder() {
@@ -700,7 +711,7 @@
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 => {
@@ -784,7 +795,7 @@
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 => {
@@ -855,87 +866,87 @@
url: '/pages/stationDetail/OrderStatus?item=' + item
})
},
- // g7
- G7Order() {
- const g7OrderInfo = {
- qr_code: uni.getStorageSync('qrCode'), //类型:String 必有字段 二维码 qrcode
- station_id: this.siteData.siteId, //类型:String 必有字段 油站id siteId
- oilPriceId: this.insertResult.priceId, //类型:String 必有字段 油价id priceId
- driver_phone: this.siteData.customerPhone, //类型:String 必有字段 油价id priceId
- companyId: this.siteData.companyId, //类型:String 必有字段 企业id companyId
- customerId: this.siteData.customerId, //类型:String 必有字段 司机id customerId
- truck_no: this.carNumber,
- gun_money: this.insertResult.vol, //类型:String 必有字段 备注:加油升数
- gun_number: this.insertResult.bar, //类型:String 必有字段 备注:加油升数
- deduction_mode: 1,
- }
- console.log("加油信息===================",this.insertResult)
- console.log(g7OrderInfo)
- if (!g7OrderInfo.qr_code) {
- uni.showToast({
- title: 'qr_code为空',
- icon: 'none'
- });
- this.shake=null
- return false
- }
- if (!g7OrderInfo.station_id) {
- uni.showToast({
- title: '请选择油站id',
- icon: 'none'
- });
- this.shake=null
- return false
- }
- if (!g7OrderInfo.companyId) {
- uni.showToast({
- title: '请选择企业id',
- icon: 'none'
- });
- this.shake=null
- return false
- }
- if (!g7OrderInfo.customerId) {
- uni.showToast({
- title: '请选择司机id',
- icon: 'none'
- });
- this.shake=null
- return false
- }
- if (!g7OrderInfo.gun_money) {
- uni.showToast({
- title: '请输入加油金额',
- icon: 'none'
- });
- this.shake=null
- return false
- }
- oliSiteApi.G7Pay(g7OrderInfo).then(res => {
- if (res.code === 20000) {
- uni.showToast({
- title: '下单成功!'
- });
- uni.setStorageSync('orderSource', 'mpxoil')
- console.log("是否是g7================",this.isG7)
- if (!this.isG7) {
- setTimeout(() => {
- this.toDetails(res.data.orderId)
- }, 400)
- } else {
- this.beforePay = false
- setTimeout(() => {
- this.orderId = res.data.orderId
- console.log("queryTimer",this.orderId)
- this.queryTimer()
- console.log("getPayStatus",this.orderId)
- this.getPayStatus(this.orderId)
- }, 400)
- }
- this.shake=null
- }
- })
- },
+ // g7
+ G7Order() {
+ const g7OrderInfo = {
+ qr_code: uni.getStorageSync('qrCode'), //类型:String 必有字段 二维码 qrcode
+ station_id: this.siteData.siteId, //类型:String 必有字段 油站id siteId
+ oilPriceId: this.insertResult.priceId, //类型:String 必有字段 油价id priceId
+ driver_phone: this.siteData.customerPhone, //类型:String 必有字段 油价id priceId
+ companyId: this.siteData.companyId, //类型:String 必有字段 企业id companyId
+ customerId: this.siteData.customerId, //类型:String 必有字段 司机id customerId
+ truck_no: this.carNumber,
+ gun_money: this.insertResult.vol, //类型:String 必有字段 备注:加油升数
+ gun_number: this.insertResult.bar, //类型:String 必有字段 备注:加油升数
+ deduction_mode: 1,
+ }
+ console.log("加油信息===================", this.insertResult)
+ console.log(g7OrderInfo)
+ if (!g7OrderInfo.qr_code) {
+ uni.showToast({
+ title: 'qr_code为空',
+ icon: 'none'
+ });
+ this.shake = null
+ return false
+ }
+ if (!g7OrderInfo.station_id) {
+ uni.showToast({
+ title: '请选择油站id',
+ icon: 'none'
+ });
+ this.shake = null
+ return false
+ }
+ if (!g7OrderInfo.companyId) {
+ uni.showToast({
+ title: '请选择企业id',
+ icon: 'none'
+ });
+ this.shake = null
+ return false
+ }
+ if (!g7OrderInfo.customerId) {
+ uni.showToast({
+ title: '请选择司机id',
+ icon: 'none'
+ });
+ this.shake = null
+ return false
+ }
+ if (!g7OrderInfo.gun_money) {
+ uni.showToast({
+ title: '请输入加油金额',
+ icon: 'none'
+ });
+ this.shake = null
+ return false
+ }
+ oliSiteApi.G7Pay(g7OrderInfo).then(res => {
+ if (res.code === 20000) {
+ uni.showToast({
+ title: '下单成功!'
+ });
+ uni.setStorageSync('orderSource', 'mpxoil')
+ console.log("是否是g7================", this.isG7)
+ if (!this.isG7) {
+ setTimeout(() => {
+ this.toDetails(res.data.orderId)
+ }, 400)
+ } else {
+ this.beforePay = false
+ setTimeout(() => {
+ this.orderId = res.data.orderId
+ console.log("queryTimer", this.orderId)
+ this.queryTimer()
+ console.log("getPayStatus", this.orderId)
+ this.getPayStatus(this.orderId)
+ }, 400)
+ }
+ this.shake = null
+ }
+ })
+ },
//日日顺
RrsOrder() {
const data6 = {
@@ -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
@@ -1170,7 +1184,10 @@
// return
//
console.log(data6, 'data6+++++')
- oliSiteApi.xoilPay(Object.assign(data6,{longitude:location.longitude,latitude:location.latitude})).then(res => {
+ oliSiteApi.xoilPay(Object.assign(data6, {
+ longitude: location.longitude,
+ latitude: location.latitude
+ })).then(res => {
console.log(res)
if (res.code === 20000) {
uni.showToast({
@@ -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,9 +1303,9 @@
this.getPayStatus(this.orderId)
}, 400)
}
- setTimeout(()=>{
- this.shake=null
- },1000)
+ setTimeout(() => {
+ this.shake = null
+ }, 1000)
}
})
},
@@ -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
@@ -1392,12 +1409,12 @@
// 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
}
})
}
@@ -1493,9 +1510,9 @@
}
},
filters: {
- company(e){
- if(e){
- return e=='2' ?'KG':'L';
+ company(e) {
+ if (e) {
+ return e == '2' ? 'KG' : 'L';
} else {
return ''
}