9 Commits

Author SHA1 Message Date
xiaozhiyong
ff2e39e15b 更新 2024-05-07 13:33:30 +08:00
bcc717cd39 Merge pull request '江投页面' (#16) from zyj into master
Reviewed-on: #16
2024-05-07 03:22:43 +00:00
cecacfc7c7 江投页面 2024-04-26 17:07:39 +08:00
xiaozhiyong
9aebbade3c 更新 2024-04-24 13:23:33 +08:00
xiaozhiyong
26d9e26c2f 更新 2024-04-18 16:49:56 +08:00
2552af652f Merge pull request '更新' (#15) from zyj into master
Reviewed-on: #15
2024-02-23 02:53:45 +00:00
e9f59282a3 更新 2024-02-23 10:53:21 +08:00
xiaozhiyong
289ba29759 Merge branch 'master' of http://121.196.213.68:3000/caoliancun/MP_XOIL_company_new 2024-02-21 15:12:09 +08:00
xiaozhiyong
7536516a37 更新 2024-02-21 15:12:03 +08:00
12 changed files with 516 additions and 187 deletions

View File

@@ -208,6 +208,7 @@
},
refuseLogin(){
uni.clearStorageSync()
uni.setStorageSync('refuseLogin','true')
uni.switchTab({
url: '/pages/tabbar/home/home'
})

View File

@@ -55,7 +55,7 @@
共享企业余额
</view>
<text
class="text-grey">加油额度{{cardList[cardCur].orderAmountToplimit}}加油升数额度{{cardList[cardCur].orderVolumeToplimit}}L</text>
class="text-grey">加油额度{{cardList[cardCur].orderAmountToplimit || ''}}{{cardList[cardCur].orderAmountToplimit?'元': '无限制'}}加油升数额度{{cardList[cardCur].orderVolumeToplimit || ''}}{{cardList[cardCur].orderVolumeToplimit ? 'L' : '无限制'}}</text>
</view>
<view class="text-center padding">
<!-- <view class="text-red text-bold text-lg">
@@ -90,7 +90,7 @@
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
<transBlcok ref="transBlcok" @reloadCard="getCards"/>
<transBlcok ref="transBlcok" @reloadCard="getCards" />
</view>
</template>
@@ -411,4 +411,4 @@
.opacity-half {
opacity: 0.2;
}
</style>
</style>

View File

@@ -52,7 +52,7 @@
</view> -->
<view class="padding-tb-xs text-left">
<!-- <view class="cu-item arrow" @tap="toDetail(order)">
</view> -->
油站
<text class="fr nowrap">{{order.siteName?order.siteName:''}}</text>
@@ -202,10 +202,10 @@
methods: {
arousePhone() {
uni.makePhoneCall({
phoneNumber: '4008-56-5355'
phoneNumber: '4008-56-5355'
})
},
newQrString() {
this.getOrderQrCode()
},
@@ -304,7 +304,7 @@
},
onLoad(option) {
console.log('++++++++++++++++++', option)
// console.log('++++++++++++++++++', option)
this.test = option.id
this.id = option.id
this.tsets = option.name
@@ -312,23 +312,23 @@
uni.showShareMenu()
let _that = this
this.timeinterval = setInterval(() => {
console.log('1')
// console.log('1')
_that.newQrString()
}, 1000 * 60 * 3);
},
filters: {
moneyIntercept(value) {
if (value) {
console.log(value)
// console.log(value)
let valus = (parseInt(value * 100) / 100).toFixed(2) + '¥/'
console.log(valus)
// console.log(valus)
return valus
} else {
return '暂无'
}
},
moneyFormath(value) {
console.log(value)
// console.log(value)
if (value != 'xxx.x') {
let number = value.toFixed(2)
return number

View File

@@ -569,21 +569,16 @@
otherUser = uni.getStorageSync('otherUserInfo'),
companyId = JSON.parse(uni.getStorageSync('companyCard')).companyId
if (otherUser) {
// console.log('这里是卡里')
this.isOtherUser = true
} else {
// console.log('这里是非卡力')
}
console.log('oilItem', oilItem)
this.showtitles = oilItem.listTag;
this.init()
console.log(companyId)
this.getCompanyConfig(companyId)
},
watch: {
activeChannelCode: {
handler(newval) {
// console.log('activeChannelCode')
this.oilBar = ''
setTimeout(async () => {
this.checkBar = (this.typeChenk()) ? await this.dynamic() : this.calcBar()
@@ -592,7 +587,6 @@
},
priceId: {
handler(newval) {
// console.log('priceId')
this.oilBar = ''
setTimeout(async () => {
this.checkBar = (this.typeChenk()) ? await this.dynamic() : this.calcBar()
@@ -628,14 +622,8 @@
}
},
totalMoney() {
// // console.log('this.oilSitePriceDetailsVo[this.radio]', this.oilSitePriceDetailsVo[this.radio])
if (this.vol > 0 && this.oilSitePriceDetailsVo[this.radio]) {
// console.log('+++++++++++')
// console.log(this.vol)
// console.log(this.oilSitePriceDetailsVo[this.radio])
// console.log('+++++++++++')
let numb = this.vol * this.oilSitePriceDetailsVo[this.radio].oilSitePrice
// console.log('++++++',numb)
return this.vol * this.oilSitePriceDetailsVo[this.radio].oilSitePrice
}
},
@@ -767,7 +755,6 @@
})
},
checkMoneyVol(e) {
console.log(e)
if (e == '') {
uni.showToast({
title: '请输入金额',
@@ -791,14 +778,12 @@
}
this.xoilAmountGun = e
oilSiteApi.getOrderDiscountInfo(number).then(res => {
console.log(res)
this.realMoney = res.data.payRealAmount
this.discount = res.data.oilDiscountAmount
this.vlom = res.data.volume
})
},
ChooseCheckMoney(e) {
console.log(e)
this.vol = e + ''
this.checkMoneyVol(this.vol)
},
@@ -840,7 +825,6 @@
}
this.xoilAmountGun = e.detail.value
oilSiteApi.getOrderDiscountInfo(number).then(res => {
console.log(res)
this.realMoney = res.data.payRealAmount
this.discount = res.data.oilDiscountAmount
this.vlom = res.data.volume
@@ -868,8 +852,6 @@
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
// sourceType: ['album'], //从相册选择
success: function(res) {
console.log(res)
console.log('进入1')
const JSESSIONID = utils.uuid()
uni.uploadFile({
// https://www.xingoil.com/adminapi
@@ -892,8 +874,6 @@
'token': utils.md5Salt(JSESSIONID)
},
success(e) {
console.log('进入2')
console.log(e)
let obj = JSON.parse(e.data),
url = obj.data.publicUrl
if (type == 'car') {
@@ -901,17 +881,14 @@
plateNumberImage: obj.data.publicUrl
}
_that.PlateNumberImages = url
console.log('这里是司机车牌', url)
_that.isPlateNumber = false
oilSiteApi.plateNumberRecognition(data).then((res) => {
let obj = JSON.parse(res.data)
console.log(obj)
_that.plateNumber = obj.NUMBER
})
} else {
_that.refuellerImages = url
_that.isUefueller = false
console.log('这里是油站图片', _that.refuellerImages, url)
}
}
@@ -1079,7 +1056,6 @@
},
checkInfo() {
this.tsetPlate(this.plateNumber ? this.plateNumber : this.plateNumberSel)
console.log(this.plateNumber)
if (!this.testPlateResult) {
this.plateNumber = ''
uni.showToast({
@@ -1224,14 +1200,11 @@
this.showtitle = true
return
}
// console.log('这里是beforeMake end')
this.makerOrder()
},
// 下单
makerOrder() {
// console.log('这里是beforeMake')
let otherUser = uni.getStorageSync('otherUserInfo')
// console.log(otherUser, '+++++++++++++++')
if (otherUser) {
// console.log('这里是卡力+++++++++++')
let PlateNumberImages = this.PlateNumberImages,
@@ -1274,14 +1247,14 @@
'xoilAmountGun': this.vol
}
} else {
if(!this.plateNumberOcr){
uni.showToast({
icon: 'none',
title: '请上传车牌照片'
})
return
}
if(this.plateNumberOcrShow == true){
if(!this.plateNumberOcr){
uni.showToast({
icon: 'none',
title: '请上传车牌照片'
})
return
}
var orderData = {
amountGun: this.activeChannelCode == 'TY' ? this.ty.realMoney : '',
shareCompanyQuota: 0, // 共享标识
@@ -1327,7 +1300,6 @@
}
}
// console.log(orderData)
let location = uni.getStorageSync('location') || {
longitude: '',
latitude: ''
@@ -1343,7 +1315,6 @@
}))) || res.data
if (otherUser) {
// console.log('这里是卡力订单创建')
// console.log(data)
uni.setStorageSync('orderMade', data)
uni.redirectTo({
url: '/BagStation/pages/SeparateProcess/orderPaying?payMethod=' + res.data
@@ -1369,7 +1340,6 @@
getNewSitePrice(channelId) {
this.oilSitePriceDetailsVo = []
oilSiteApi.getNewSitePrice(channelId).then(res => {
console.log('getNewSitePrice ++++= ', res)
if (res.code == 20000) {
this.radio = 0
this.plateNumbers = res.data.plateNumbers
@@ -1385,7 +1355,6 @@
pickPlate(e) {
this.plateIndex = e.detail.value
this.plateNumber = this.plateNumberSel
console.log(this.plateIndex, this.plateNumber)
},
showOrderMsg() {
this.showOrder = 'show'
@@ -1403,7 +1372,6 @@
}
},
ChooseBar(e) {
console.log(e)
let items = this.checkBar;
let values = e.value;
this.oilBar = values
@@ -1416,7 +1384,6 @@
}
},
changePrice(e) {
console.log(e)
this.radio = e.detail.value
this.ty.realMoney = null
this.tyRes.liter = 0
@@ -1424,12 +1391,9 @@
this.activeSitePrice = this.oilSitePriceDetailsVo[this.radio].priceId
this.realMoney = '--'
this.xoilAmountGun = ''
// // console.log(this.radio)
// // console.log(this.oilSitePriceDetailsVo[this.radio])
},
tabSelect(e) {
this.activeChannelCode = e.currentTarget.dataset.channelCode;
// console.log('ty activeChannelCode', this.activeChannelCode)
this.activeCur = e.currentTarget.dataset.id;
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
}
@@ -1437,9 +1401,7 @@
filters: {
moneyIntercept(value) {
if (value != 'xxx.x') {
console.log(value)
let valus = (parseInt(value * 100) / 100).toFixed(2)
console.log(valus)
return valus
} else {
return value
@@ -1479,18 +1441,6 @@
}
},
moneyFormat(value) {
console.log(value)
// if (value != 'xxx.x') {
// console.log('old:',value)
// let realAmount = Math.floor(value * 100) / 100
// console.log('new:',realAmount)
// return realAmount
// } else {
// // console.log('old:',value)
// let realAmount = Math.floor(value * 100) / 100
// // console.log('new:',realAmount)
// return realAmount
// }
if (value != 'xxx.x') {
let realAmount = (parseInt(value * 100) / 100).toFixed(2)
return realAmount

View File

@@ -0,0 +1,138 @@
<template>
<view>
<cu-custom class="main-totextbar bg-main-oil" :isBack="true" bgColor="bg-main-oil">
<block slot="backText">返回</block>
<block slot="content">支付结果</block>
</cu-custom>
<view style="background-color: #F9F9F9;height: calc(100vh - 140rpx);">
<view style="text-align: center;font-size: 28rpx;color: #000000;opacity: 0.49;margin-top: 20rpx;">
请告知加油员使用江投能源支付
</view>
<view style="text-align: center;margin: 60rpx 0;">
<image src="https://xoil-public.oss-cn-beijing.aliyuncs.com/miniProgram/xingyou/jt-logo.png"
style="width: 220rpx;height: 160rpx;"></image>
</view>
<view style="text-align: center;color: #000000;font-weight: bold;">
<view style="font-size: 64rpx;">-{{order.xoilAmountGun |moneyFormat}}</view>
<view style="font-size: 40rpx;" v-if="status=='success'">交易成功</view>
<view style="font-size: 40rpx;color: #FF0000;" v-if="status!='success'">交易失败</view>
</view>
<view style="margin-top: 100rpx;padding: 0 30rpx;font-size: 28rpx; font-weight: bold;">
<view style="background-color: #fff;border-radius: 20rpx;">
<view class="padding-tb-xs text-left paddingLR">
订单号
<text class="fr">{{order.orderSerialNumber?order.orderSerialNumber:''}}</text>
</view>
<view class="padding-tb-xs text-left paddingLR">
油品类型
<text class="fr">
{{order.oilsCode?order.oilsCode+' ':''}}
<!-- <text>{{order.oilProductType=="DIESEL"?'柴油':order.oilProductType=="PETROL"?'汽油':order.oilProductType=="GAS"?'天然汽':''}}</text> -->
<text v-if="order.oilsBar">({{order.oilsBar?order.oilsBar+'号枪':'未选择油枪'}})</text>
</text>
</view>
<view class="padding-tb-xs text-left paddingLR">
加油升数
<text class="fr">{{order.volume?order.volume :'未输入' | moneyFormath}} L</text>
</view>
<view class="padding-tb-xs text-left paddingLR">
单价
<text class="fr">{{order.sitePrice?order.sitePrice :'' | moneyFormath}} /L</text>
</view>
<view class="padding-tb-xs text-left paddingLR">
加油金额
<text class="fr" style="color: #FF0000;">{{order.xoilAmountGun |moneyFormat}}</text>
</view>
</view>
</view>
<view style="display: flex;margin-top: 60rpx;">
<button class="btnJX" @tap="backToOrderList">查看订单</button>
<button class="btnJX" @tap="backToIndex">返回首页</button>
</view>
</view>
</view>
</template>
<script>
import toilApi from '@/api/toil.js'
import oilSiteApi from '@/api/oil-site.js'
export default {
data() {
const now = new Date()
return {
status: "",
textstatus: '正在支付中',
status: 'fail',
order: uni.getStorageSync('orderMade')
}
},
onLoad(option) {
let _that = this
if (option.status == 'success') {
if (option.status == 'success') {
this.textstatus = '支付成功'
this.status = option.status
} else {
this.textstatus = '支付失败'
this.status = option.status
}
return
}
if (option.status == 'fail') {
this.textstatus = '支付失败'
this.status = option.status
return
}
},
methods: {
backToOrderList() {
uni.redirectTo({
url: `/BagStation/orderDetail/orderDetail?id=${this.order.orderSerialNumber}`
})
},
backToIndex() {
uni.switchTab({
url: '/pages/tabbar/home/home'
})
}
},
filters: {
moneyFormath(value) {
if (value != 'xxx.x') {
let number = value.toFixed(2)
return number
} else {
return value
}
},
moneyFormat(value) {
if (value != 'xxx.x') {
let realAmount = (parseInt(value * 100) / 100).toFixed(2)
return realAmount
} else {
return value
}
},
},
}
</script>
<style>
.btnJX {
width: 180rpx;
height: 60rpx;
border-radius: 20rpx;
background-color: #2E53B2;
color: #fff;
font-size: 32rpx;
line-height: 60rpx;
padding: 2rpx;
}
.paddingLR{
padding: 20rpx 40rpx;
}
</style>

View File

@@ -286,10 +286,12 @@
type: '',
ureaCompanyOtherList: [],
companyNature: '',
shareCompanyQuota: ''
shareCompanyQuota: '',
secondChannelCode: ''
}
},
onLoad(option) {
if (option.type == 'urea') {
this.order = uni.getStorageSync('ureaOrderMade')
this.order.companyStatus = true
@@ -297,13 +299,12 @@
this.findUreaAccount()
} else {
let oilItem = uni.getStorageSync('oilItem')
// console.log
this.order = uni.getStorageSync('orderMade')
this.type = 'oil'
this.showtitles = oilItem.listTag
this.secondChannelCode = oilItem.secondChannelCode
if (option.payMethod == null) {
this.payMethod = oilItem.payMethod
// console.log(this.payMethod )
} else {
this.payMethod = option.payMethod
}
@@ -312,7 +313,7 @@
computed: {
companyList() {
if (this.isCompany) {
let companyAccounts = this.order.companyAccounts || []
let companyAccounts = this.order.companyAccounts || []
let filterData = companyAccounts.filter(item => item.companyType != 5)
return filterData
}
@@ -320,9 +321,9 @@
companyOtherList() {
if (this.isCompany) {
// return this.order.otherAccounts
let otherAccounts = this.order.otherAccounts || []
let otherAccounts = this.order.otherAccounts || []
let filterData = otherAccounts.filter(item => item.companyType != 5)
let target = this.sortParticulars(filterData,'balance')
let target = this.sortParticulars(filterData, 'balance')
return target
}
}
@@ -356,7 +357,9 @@
for (let value of map.values()) {
values.push(value)
}
values.sort((a,b)=>{return a - b})
values.sort((a, b) => {
return a - b
})
values.reverse()
values.forEach(value => {
keys.forEach(key => {
@@ -376,12 +379,10 @@
})
},
hidenPopup(e) {
console.log(e)
this.PopupShow = e
},
findUreaAccount() {
ureaFinanceApi.findUreaAccount(this.order.driverId).then(res => {
console.log(res)
this.ureaCompanyOtherList = res.data
})
},
@@ -392,9 +393,7 @@
return timestampDeadline
},
ureaCancelOrder(id) {
console.log(id)
ureaFinanceApi.cancelTheOrder(id).then(res => {
console.log(res)
if (res.code == 20000) {
uni.showToast({
title: res.msg,
@@ -442,7 +441,6 @@
this.shareCompanyQuota = card.shareCompanyQuota
},
selectCompanyCard(card) {
console.log(card)
this.card = card
this.checked = card.accountCardCode
this.accountCardCode = card.accountCardCode
@@ -461,7 +459,7 @@
}
} else {
uni.showToast({
title: '操作频繁',
title: '操作频繁请5s后再试',
icon: 'none'
})
this.isdisabled = false
@@ -487,7 +485,6 @@
// this.getPayStatus(this.outTradeNo)
// this.getLastMoney()
// this.getCards()
// console.log('success:' + JSON.stringify(res));
uni.showToast({
title: res.msg
})
@@ -531,7 +528,6 @@
return false
}
if (this.card.balance < this.order.realAmount && this.card.shareCompanyQuota != 1) {
console.log(this.type)
if (this.type == 'urea') {
this.PopupShow = true
this.PopupType = 2
@@ -564,13 +560,23 @@
title: res.msg
})
setTimeout(() => {
uni.redirectTo({
url: '/BagStation/pages/makeOrder/payResult?status=success&&payMethod=' +
this.payMethod,
fail: (err) => {
// console.log(err)
}
})
if (this.secondChannelCode == 'JX_INVEST') {
uni.redirectTo({
url: '/BagStation/pages/makeOrder/JXPayResult?status=success&&payMethod=' +
this.payMethod,
fail: (err) => {
// console.log(err)
}
})
} else {
uni.redirectTo({
url: '/BagStation/pages/makeOrder/payResult?status=success&&payMethod=' +
this.payMethod,
fail: (err) => {
// console.log(err)
}
}) }
}, 1000)
} else {
@@ -585,6 +591,7 @@
url: `/BagStation/pages/makeOrder/payResult?status=fail&&errMsg=${msg}payMethod=` +
this.payMethod
})
}, 1000)
}
@@ -605,7 +612,6 @@
companyShared: this.shareCompanyQuota
}
ureaFinanceApi.orderPay(payData).then(res => {
console.log(res)
if (res.code == 20000) {
uni.setStorageSync('ureaOrderMade', res.data)
if (res.data.formats == '2') {
@@ -623,7 +629,6 @@
_that.PopupType = 2
this.isdisabled = false
}
console.log(res)
})
}
},
@@ -648,7 +653,6 @@
}
},
moneyFormath(value) {
console.log(value)
if (value != 'xxx.x') {
let number = value.toFixed(2)
return number
@@ -715,4 +719,4 @@
position: fixed;
bottom: 0;
}
</style>
</style>

18
api/integral.js Normal file
View File

@@ -0,0 +1,18 @@
import request from '@/utils/request'
export default {
getByPage(data) {
return request({
url: '/oil-finance/oilCustomerIntegralRecord/getByPage',
method: 'post',
data: data
})
},
getByCustomerId(customerId) {
return request({
url: `/oil-finance/oilCustomerIntegralAccount/getByCustomerId/${customerId}`,
method: 'get'
})
},
}

View File

@@ -1,27 +1,36 @@
<template>
<view class="cu-item cur padding no-mr-border site-item" :style="{'min-height': siteItem.activitySwitch?mHeight+'rpx !important':''}">
<view class="cu-avatar radius lg "
<view class="cu-item cur padding no-mr-border site-item"
:style="{'min-height': siteItem.activitySwitch?mHeight+'rpx !important':''}">
<view class="cu-avatar radius lg "
:style="'background-image:url('+(siteItem.siteImages?siteItem.siteImages:defaultLogo)+');'">
</view>
<view class="content">
<view style="display: flex;">
<view style="flex-shrink:1" class="text-cut text-black text-lg padding-right-sm "> {{siteItem.siteName}}</view>
<view v-if="siteItem.siteLevel" class="siteName_tag">{{siteItem.siteLevel}}</view>
</view>
<view class="content">
<view style="display: flex;">
<view style="flex-shrink:1" class="text-cut text-black text-lg padding-right-sm ">
{{siteItem.siteName}}</view>
<!-- <view v-if="siteItem.siteLevel" class="siteName_tag">{{siteItem.siteLevel}}</view> -->
</view>
<view style="display: flex;" class="listTages">
<view :style="{background:siteItem.siteType==1?'#FF6700':'#00c15e'}" class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteType==1?'加油站':'加气站'}}</view>
<view :style="{background:siteItem.siteType==1?'#FF6700':'#00c15e'}"
class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteType==1?'加油站':'加气站'}}
</view>
<view class="cu-tag round bg-self--dark-blue yu-tag text-xs" v-show="siteItem.ureaNumber>0">尿素</view>
<!-- <view v-if="siteItem.siteLevel" class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteLevel}}</view> -->
<view class="cu-tag round bg-self-yellow yu-tag text-xs" :class="siteItem.channelCode=='XOIL'?'tag-red':''">{{siteItem.listTag|channelCodeFamt}}</view>
<view class="cu-tag round bg-self-yellow yu-tag text-xs"
:class="siteItem.channelCode=='XOIL'?'tag-red':''">{{siteItem.listTag|channelCodeFamt}}</view>
<view class="cu-tag round bg-self--dark-yellow yu-tag text-xs" v-show="first">距离最近</view>
<view v-if="siteItem.highSpeedMark||siteItem.roadTpye" class="cu-tag round bg-self--dark-blue yu-tag text-xs" :style="{background:speedMarkColor(siteItem.highSpeedMark,siteItem.roadTpye)}">{{speedMark(siteItem.highSpeedMark,siteItem.roadTpye)}}{{siteItem.roadName?':'+siteItem.roadName:''}}</view>
<view v-if="siteItem.highSpeedMark||siteItem.roadTpye"
class="cu-tag round bg-self--dark-blue yu-tag text-xs"
:style="{background:speedMarkColor(siteItem.highSpeedMark,siteItem.roadTpye)}">
{{speedMark(siteItem.highSpeedMark,siteItem.roadTpye)}}{{siteItem.roadName?':'+siteItem.roadName:''}}
</view>
<!-- <view v-if="siteItem.highSpeedMark!=null" class="cu-tag round bg-self--dark-blue yu-tag text-xs" :style="{background:speedMarkColor(siteItem.highSpeedMark)}">{{siteItem.highSpeedMark?siteItem.highSpeedMark:siteItem.roadTpye|speedMark(siteItem.highSpeedMark,siteItem.roadTpye)}}{{siteItem.roadName?':'+siteItem.roadName:''}}</view> -->
</view>
<view class="">
<view class="text-cut color-666 text-sm ">
{{siteItem.address}}
</view>
<view class="">
<view class="text-cut color-666 text-sm ">
{{siteItem.address}}
</view>
</view>
<view class="text-gray flex">
<view class="text-bold yellow-oil text-xl padding-right-xs">
@@ -29,20 +38,21 @@
</view>
<view class="oil-main-color text-xl text-bold padding-right-xs">
{{siteItem.sitePrice|moneyFormat}}
</view>
</view>
<view class="">
<text class="cu-tag oil-tag radius text-xs" v-if="siteItem.oilSitePrice - siteItem.sitePrice>0">{{(siteItem.oilSitePrice - siteItem.sitePrice)|moneyFormat}}</text>
</view>
<view class="text-cut padding-left-sm text-lg">
<text class="text-delete color-333 text-sm padding-right-xs">
{{siteItem.oilSitePrice|moneyFormat}}/L
</text>
<text class="cu-tag oil-tag radius text-xs"
v-if="siteItem.oilSitePrice - siteItem.sitePrice>0">{{(siteItem.oilSitePrice - siteItem.sitePrice)|moneyFormat}}</text>
</view>
<view class="text-cut padding-left-sm text-lg">
<text class="text-delete color-333 text-sm padding-right-xs">
{{siteItem.oilSitePrice|moneyFormat}}/L
</text>
<!-- <my-icon iconName="¥.png" class="padding-right-xs icon-rectangle"></my-icon>
<my-icon iconName="f.png" class="padding-right-xs "></my-icon> -->
</view>
</view>
</view>
</view>
<view class="text-gray" v-if="siteItem.activitySwitch">
<view class="activity-cu">
<text>活动</text>
@@ -51,12 +61,12 @@
</view>
</view>
<view class="action" style=" width: 88px;">
<view class="text-grey text-sm " style="padding-top: 6rpx;">
<view class="action" style=" width: 88px;">
<view class="text-grey text-sm " style="padding-top: 6rpx;">
<!-- <my-icon iconName="sy-der-icon.png" class="padding-right-xs text-sm"></my-icon> -->
{{siteItem.juli|distanceFilter}}
</view>
</view>
{{siteItem.juli|distanceFilter}}
</view>
</view>
</view>
</template>
@@ -76,51 +86,52 @@
return {
mHeight: 156,
starUrl: this.global.starUrl,
defaultLogo:'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/logo_default.png'
defaultLogo: 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/logo_default.png'
}
},
mounted() {
const query = uni.createSelectorQuery().in(this);
query.select('.activity-cu').boundingClientRect(data => {undefined
// console.log(data,'1111111111111111111')
if(data){
this.mHeight = this.mHeight + data.height*2
}
query.select('.activity-cu').boundingClientRect(data => {
undefined
// console.log(data,'1111111111111111111')
if (data) {
this.mHeight = this.mHeight + data.height * 2
}
}).exec();
},
methods: {
speedMarkColor(val,data){
if(val == 0){
if(data == '0'){
speedMarkColor(val, data) {
if (val == 0) {
if (data == '0') {
return '#666666'
}
if(data == '1'){
if (data == '1') {
return '#F9AA64'
}
if(data == '2'){
if (data == '2') {
return '#D61750'
}
}
if(val == 1){
if (val == 1) {
return '#11A265'
}
},
speedMark(val,data){
speedMark(val, data) {
// console.log(val,data,'qqqqqqqqqqqqqqqqqqqqqq')
if(val == 0){
if(data == '0'){
if (val == 0) {
if (data == '0') {
return '普通'
}
if(data == '1'){
if (data == '1') {
return '省道'
}
if(data == '2'){
if (data == '2') {
return '国道'
}
}
if(val == 1){
if (val == 1) {
return '高速'
}
},
@@ -128,7 +139,7 @@
filters: {
channelCodeFamt(value) {
// console.log(value)
if (value == null || value == '' ) {
if (value == null || value == '') {
return '未知'
// 渠道编码 ( XOIL星油 WJY万金油 LV老吕找油网 TY团油 YDJY一点加油壳牌)
// switch (value) {
@@ -159,7 +170,9 @@
// console.log('old:',value)
// console.log('new:',realAmount)
// return realAmount
return String(value).split('.')[1]&&String(value).split('.')[1].length>2?Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`).toFixed(2) :Number(value).toFixed(2);
return String(value).split('.')[1] && String(value).split('.')[1].length > 2 ? Number(
`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`
).toFixed(2) : Number(value).toFixed(2);
} else {
return '0.00'
}
@@ -169,10 +182,10 @@
</script>
<style scoped>
.siteName_tag{
.siteName_tag {
background-color: #FF6700;
border-radius: 50rpx;
width: 20px ;
width: 20px;
height: 20px;
color: #FFFFFF;
display: flex;
@@ -182,49 +195,58 @@
box-sizing: border-box;
flex-shrink: 0;
}
.site-item {
margin-bottom: 1.8rem;
align-items: flex-start !important;
height: 147rpx!important;
.site-item {
margin-bottom: 1.8rem;
align-items: flex-start !important;
height: 147rpx !important;
}
.yellow-oil{
.yellow-oil {
color: #e8775a;
}
.cu-avatar{
.cu-avatar {
background-color: transparent !important;
}
.tag-red{
.tag-red {
background-color: red;
}
.levelBox{
font-size: 24rpx;
color: red;
font-weight:bold;
margin-left: 16rpx;
.levelBox {
font-size: 24rpx;
color: red;
font-weight: bold;
margin-left: 16rpx;
}
.bg-self--dark-blue{
.bg-self--dark-blue {
background: #2098ff;
color: #FFFFFF;
}
.activity-cu{
.activity-cu {
border: 1px solid #FF9000;
border-radius: 5px;
width: fit-content;
display: flex;
}
.activity-cu text{
.activity-cu text {
font-size: 12px;
padding: 0 18rpx;
line-height: 20px;
}
.activity-cu text:last-child{
color:#ff9818;
.activity-cu text:last-child {
color: #ff9818;
}
.activity-cu text:first-child{
color:#ff6f0e;
.activity-cu text:first-child {
color: #ff6f0e;
background: #FFEBDE;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
</style>
</style>

View File

@@ -34,10 +34,14 @@
"style": {
"navigationBarTitleText": "星油云" // "enablePullDownRefresh": true
}
}
, {
},
{
"path": "pages/tabbar/user/integralRecord",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/tabbar/qrCenter/qrCenter",
"style": {
"navigationBarTitleText": "",
@@ -250,6 +254,13 @@
"enablePullDownRefresh": false
}
}, {
"path": "pages/makeOrder/JXPayResult",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "orderDetail/orderDetail",
"style": {

View File

@@ -139,7 +139,6 @@
this.getOrder('')
},
onPullDownRefresh() {
// console.log('这里是onPullDownRefresh')
this.currentPage = 1
this.list= []
if(this.TabHead == 1){
@@ -152,7 +151,6 @@
// }, 1000);
},
onReachBottom() {
// console.log('这里是onReachBottom')
if(this.TabHead == 1){
// this.nextPageUrea()
if(this.status.loadOrderStatus !='nomore' ){
@@ -182,7 +180,6 @@
})
},
onChangeSearch() {
console.log('%c 我闪','color:red;font-size:20px')
setTimeout(() => {
if(this.TabHead == 1){
this.onSearch()
@@ -201,7 +198,6 @@
}
},
tabSelect(value,i) {
console.log(value,'1564155555',i)
this.list = []
this.currentPage = 1
this.TabCur = i
@@ -221,7 +217,6 @@
},
}
orderApi.getOrderInfoByPage(postData).then(res => {
console.log(res)
if (res.code == 20000) {
// 0待支付 1已支付 -1支付失败 2已取消3已退款
this.list = this.list.concat(res.data.list)
@@ -246,9 +241,7 @@
tabSelectUrea(value,i) {
// console.log(value,'1564155555666666666666666666')
this.list = []
// console.log(this.list)
this.currentPage = 1
this.UreaTabCur = i
this.ativeUrea = value
@@ -267,7 +260,6 @@
}
orderApi.findXoiUreaPage(postData).then(res => {
if (res.code == 20000) {
// console.log('订单列表厂房发', page, res.data.list.length)
// 0待支付 1已支付 -1支付失败 2已取消3已退款
this.list = this.list.concat(res.data.list)
if (res.data.list.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页

View File

@@ -0,0 +1,167 @@
<template>
<view class="container">
<cu-custom class="main-totextbar bg-main-oil" :isBack="true" bgColor="bg-main-oil">
<block slot="backText">返回</block>
<block slot="content">积分记录</block>
</cu-custom>
<view class="banner">
<view>{{balance}}</view>
<view>当前积分</view>
</view>
<!-- <view class="list"> -->
<scroll-view class="list" :scroll-y="true" @scrolltolower="lower">
<view class="item" v-for="item,index in recodeList" :key="index">
<view>{{typeEnum[item.type]}}</view>
<view>{{item.createTime}}</view>
<view>{{(item.type == 1 ||item.type == 3) ? '+' : '-'}}{{item.occurAmount}}</view>
</view>
</scroll-view>
<view class="occupy"></view>
</view>
</template>
<script>
import serve from '@/api/integral.js'
export default {
data() {
return {
parameter: {
currentPage: 1,
pageSize: 20,
params: {
customerId: uni.getStorageSync('user').id
},
},
balance: 0,
recodeList: [],
typeEnum: {
1: '加油收入',
2: '加油退款',
3: '商品兑换',
4: '商品兑换退款'
},
}
},
created() {
this.getByCustomerId()
this.getByPage()
},
methods: {
getByPage() {
serve.getByPage(this.parameter).then(res => {
if (res.code === 20000) {
if (!res.data.list.length) {
uni.showToast({
title: '没有更多数据了~',
icon: 'none'
})
return
}
this.recodeList = this.recodeList.concat(res.data.list)
}
})
},
getByCustomerId() {
serve.getByCustomerId(this.parameter.params.customerId).then(res => {
if (res.code === 20000) {
this.balance = res.data.balance
}
})
},
lower() {
this.parameter.currentPage += 1
this.getByPage()
console.log('到底了')
}
}
}
</script>
<style lang="scss" scoped>
.container {
background: #F2F2F2;
height: 100vh;
display: flex;
flex-direction: column;
.banner {
margin: 37rpx auto 0;
padding-top: 105rpx;
width: 684rpx;
height: 337rpx;
background: url('https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/integral-background.png') 100%/100% no-repeat;
border-radius: 10rpx;
>view {
text-align: center;
color: #fff;
&:nth-of-type(1) {
font-size: 64rpx;
}
&:nth-of-type(2) {
margin-top: 10rpx;
font-size: 26rpx
}
}
}
.list {
flex: 1;
overflow-y: hidden;
margin: 37rpx auto 0;
padding-bottom: 10rpx;
width: 684rpx;
background: #FFF;
border-radius: 10rpx;
.item {
position: relative;
padding: 25rpx 30rpx 0 30rpx;
width: 100%;
height: 125rpx;
>view {
&:nth-of-type(1) {
font-size: 28rpx;
color: #333;
}
&:nth-of-type(2) {
margin-top: 15rpx;
font-size: 22rpx;
color: #999;
}
&:nth-of-type(3) {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 30rpx;
font-size: 28rpx;
color: #666;
}
}
&::after {
content: '';
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0;
width: 632rpx;
height: 1rpx;
background: #f6f6f6;
}
}
}
.occupy {
height: 50rpx;
}
}
</style>

View File

@@ -109,24 +109,35 @@
<view class="cu-list menu">
<view class="cu-item hidden-cu-item">
</view>
<view class="cu-item arrow">
<view class="cu-item arrow" @click="goIntegral">
<view class="content">
<image :src="starUrl+'zskf.png'" class="png" mode="aspectFit"></image>
<!-- <image :src="imgURL+'yunsite-kefu.png'" class="png" mode="aspectFit"></image> -->
<text class="text-grey padding-left-sm">我的积分</text>
</view>
<view class="action">
<!-- <button class="cu-btn oil-main-btn-color" open-type="contact" @contact="onContact"> -->
<!-- <text class="text-grey text-sm">打开会话</text> -->
<!-- </button> -->
<view>{{balance}}</view>
</view>
</view>
<view class="cu-item arrow" @click="makeCall">
<view class="content">
<!-- <image :src="imgURL+'yunsite-kefu.png'" class="png" mode="aspectFit"></image> -->
<text class="text-grey padding-left-sm">专属客服</text>
</view>
<view class="action">
<!-- <button class="cu-btn oil-main-btn-color" open-type="contact" @contact="onContact"> -->
<!-- <text class="text-grey text-sm">打开会话</text> -->
<!-- </button> -->
<view class="cu-btn oil-main-btn-color" @click="makeCall">
<!-- <view class="cu-btn oil-main-btn-color" @click="makeCall">
<text class="text-grey text-sm">联系客服</text>
</view>
</view> -->
</view>
</view>
<view class="cu-item arrow">
<view class="content">
<image :src="starUrl+'gywm.png'" class="png" mode="aspectFit"></image>
<!-- <image :src="imgURL+'yunsite-about.png'" class="png" mode="aspectFit"></image> -->
<text class="text-grey padding-left-sm">关于我们</text>
</view>
</view>
@@ -143,6 +154,7 @@
import oilSiteApi from '@/api/oil-site.js'
import SwitchEnterprises from '@/components/SwitchEnterprises.vue'
import accountApi from '@/api/account.js'
import integralServe from '@/api/integral.js'
export default {
components: {
SwitchEnterprises
@@ -163,7 +175,8 @@
isCompany: uni.getStorageSync('accountStatus'),
user: uni.getStorageSync('user'),
wxInfo: uni.getStorageSync('wxInfo'),
userTotal: {}
userTotal: {},
balance: ''
};
},
onShow() {
@@ -171,8 +184,21 @@
this.getAuthInfo()
this.getAmount();
this.upadteCompanyCard()
this.getByCustomerId()
},
methods: {
goIntegral() {
uni.navigateTo({
url: './integralRecord'
})
},
getByCustomerId() {
integralServe.getByCustomerId(this.user.id).then(res => {
if (res.code === 20000) {
this.balance = res.data.balance
}
})
},
logout() {
this.isSwitchEnterprises = false
},