Compare commits
15 Commits
lx
...
075e37929e
| Author | SHA1 | Date | |
|---|---|---|---|
| 075e37929e | |||
| 3b5ede2a69 | |||
| 9b40ce3fbf | |||
| cd73ef5c28 | |||
| 4922e75985 | |||
| 597f47f689 | |||
|
|
6150eb2b67 | ||
|
|
1da4c2de7a | ||
|
|
7be8276544 | ||
| ea5b71c1ae | |||
|
|
c995d7d373 | ||
| fb2f8fcd64 | |||
|
|
4b1602af42 | ||
| c916caf705 | |||
|
|
1ac4d50569 |
@@ -1,11 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
const service_name = "cloud-site-service"
|
||||
const group_name = "tbOilOrder"
|
||||
const service_name = "oil-site"
|
||||
const group_name = "g7"
|
||||
export default {
|
||||
// G7订单支付状态
|
||||
getPayStatus(id) {
|
||||
return request({
|
||||
url: `/${service_name}/${group_name}/get/${id} `,
|
||||
url: `/${service_name}/${group_name}/getOrderStatus/${id} `,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -29,4 +29,12 @@ export default {
|
||||
data: data
|
||||
})
|
||||
},
|
||||
//订单导出
|
||||
getOrderInfoExport(data) {
|
||||
return request({
|
||||
url: `/${service_name}/oilOrderInfoExcel/getOrderInfoExport`,
|
||||
method: 'POST',
|
||||
data:data
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -52,6 +52,14 @@ export default{
|
||||
data: data
|
||||
})
|
||||
},
|
||||
// G7下单接口
|
||||
G7Pay(data) {
|
||||
return request({
|
||||
url: `/${service_name}/g7/qrCodePay`,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
// 则一下单接口
|
||||
zeyiPay(data) {
|
||||
return request({
|
||||
|
||||
@@ -46,6 +46,13 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view> -->
|
||||
<view v-if="exportShow==true">
|
||||
<view style="padding: 30upx;"></view>
|
||||
<view style="position: fixed;width: 750upx;z-index: 5;text-align: right;top:315upx;right: 30upx;">
|
||||
<button class="cu-btn bg-white" @click="orderExport">订单导出</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="padding padding-bottom-0" style="padding-top: 200upx;">
|
||||
<!-- 0 全部 1 待支付 2 已支付 3退款 -->
|
||||
<view v-show="TabCur==2" class="order-list">
|
||||
@@ -93,12 +100,44 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<uni-popup ref="popup">
|
||||
<view class="popup_card">
|
||||
<view class="popup_card_from">
|
||||
<view class="popup_card_from_item">
|
||||
<view class="popup_card_from_item_left_text">邮箱:</view>
|
||||
<input v-model="params.email" class="card_item_input" placeholder="请输入邮箱" />
|
||||
</view>
|
||||
<view class="popup_card_from_item">
|
||||
<view class="popup_card_from_item_left_text">开始时间:</view>
|
||||
<view class="uni-list-cell-db">
|
||||
<picker mode="date" :value="startDate" @change="startDateChange" class="uni-picker">
|
||||
<view class="uni-input">{{startDate}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup_card_from_item">
|
||||
<view class="popup_card_from_item_left_text">结束时间:</view>
|
||||
<view class="uni-list-cell-db">
|
||||
<picker mode="date" :value="endDate" @change="endDateChange" :start="endStartDate" :end="endEndDate" class="uni-picker">
|
||||
<view class="uni-input">{{endDate}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup_card_bottom">
|
||||
<button @click="$refs.popup.close()" class="popup_card_bottom_close">取消</button>
|
||||
<button @click="report" class="popup_card_bottom_submit">导出</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cloudSiteApi from '@/api/cloud-site.js'
|
||||
import oliSiteApi from '@/api/oli-site.js'
|
||||
import oliFinanceApi from '@/api/oil-finance.js'
|
||||
import OrderItem from '@/packageOrders/components/order-item.vue'
|
||||
import UniLoadMore from '@/components/uni-load-more/uni-load-more.vue'
|
||||
|
||||
@@ -154,7 +193,20 @@
|
||||
loadStatus3: 'loading',
|
||||
isLoadMore4: false,
|
||||
loadStatus4: 'loading',
|
||||
}
|
||||
},
|
||||
params: {
|
||||
siteId: uni.getStorageSync('oilSitePriceId'),
|
||||
siteName: uni.getStorageSync('oilSitePriceName'),
|
||||
email:'',
|
||||
startTime:'',
|
||||
endTime:''
|
||||
},
|
||||
startDate:'',
|
||||
endDate:'',
|
||||
endStartDate:'',
|
||||
endEndDate:'',
|
||||
exportShow:false
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
@@ -164,6 +216,23 @@
|
||||
this.loadList(0, this.pageNumber2, 'created')
|
||||
this.loadList(1, this.pageNumber3, 'created')
|
||||
this.loadList(-2, this.pageNumber4, 'created')
|
||||
let exportList = [
|
||||
'1689181519096909824',
|
||||
'1689182438357262336',
|
||||
'1689183144276463616',
|
||||
'1689183774927818752',
|
||||
'1689184331812888576',
|
||||
'1689185023261741056'
|
||||
]
|
||||
var exportFields = exportList.filter((item) => {
|
||||
return item == uni.getStorageSync('oilSitePriceId');
|
||||
})
|
||||
if(exportFields.length>0){
|
||||
this.exportShow = true
|
||||
}else{
|
||||
this.exportShow = false
|
||||
}
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
uni.setStorageSync('orderType', 1)
|
||||
@@ -188,25 +257,21 @@
|
||||
// console.log(from,'loadMoreOrder时间')
|
||||
// <!-- 0 全部 1 待支付 2 已支付 3退款 -->
|
||||
if (this.TabCur === 0) {
|
||||
console.log('这里是0')
|
||||
if (this.load.loadStatus3 != 'nomore') { //此处判断,上锁,防止重复请求
|
||||
this.load.isLoadMore3 = true
|
||||
this.calcIstate(this.TabCur)
|
||||
}
|
||||
} else if (this.TabCur === 1) {
|
||||
console.log('这里是1')
|
||||
if (this.load.loadStatus2 != 'nomore') { //此处判断,上锁,防止重复请求
|
||||
this.load.isLoadMore2 = true
|
||||
this.calcIstate(this.TabCur)
|
||||
}
|
||||
} else if (this.TabCur === 2) {
|
||||
console.log('这里是2')
|
||||
if (this.load.loadStatus1 != 'nomore') { //此处判断,上锁,防止重复请求
|
||||
this.load.isLoadMore1 = true
|
||||
this.calcIstate(this.TabCur)
|
||||
}
|
||||
} else if (this.TabCur === 3) {
|
||||
console.log('这里是3')
|
||||
if (this.load.loadStatus4 != 'nomore') { //此处判断,上锁,防止重复请求
|
||||
this.load.isLoadMore4 = true
|
||||
this.calcIstate(this.TabCur)
|
||||
@@ -216,15 +281,11 @@
|
||||
tabSelect(e) {
|
||||
this.TabCur = e.currentTarget.dataset.id;
|
||||
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
||||
// console.log('tabSelect时间')
|
||||
this.loadMoreOrder('tabSelect')
|
||||
},
|
||||
pickSource(e) {
|
||||
console.log(e)
|
||||
this.indexSource = parseInt( e.detail.value)
|
||||
console.log(this.indexSource)
|
||||
this.activeSource = this.sources[this.indexSource]
|
||||
console.log(this.activeSource )
|
||||
uni.setStorageSync('orderType', this.indexSource)
|
||||
this.pageNumber1 = 0
|
||||
this.pageNumber2 = 0
|
||||
@@ -265,11 +326,6 @@
|
||||
}
|
||||
},
|
||||
loadList(istate, pageNumber, from) {
|
||||
// console.log(istate)
|
||||
// console.log(pageNumber)
|
||||
// console.log(from)
|
||||
console.log( this.startTime)
|
||||
console.log( this.endTime)
|
||||
let that = this
|
||||
const data2 = {
|
||||
istate: istate, //类型:Number 必有字段 备注:订单状态 0待支付 1支付成功 查所有传 ''
|
||||
@@ -277,7 +333,6 @@
|
||||
// startTime: that.startTime,
|
||||
// endTime: that.endTime
|
||||
}
|
||||
console.log('这里是this.indexSource',this.indexSource)
|
||||
if (this.indexSource == 0) {
|
||||
// 网页版
|
||||
if (data2.istate == -3) {
|
||||
@@ -285,17 +340,11 @@
|
||||
} else if (data2.istate == -2) {
|
||||
data2.istate = 3
|
||||
}
|
||||
console.log(data2)
|
||||
oliSiteApi.getNewItemSiteOrder(data2).then(res => {
|
||||
console.log(res)
|
||||
console.log('-----------------------------------------')
|
||||
// console.log('参数', data2.istate, '页码', data2.pageIndex, '来源', from)
|
||||
if (res.code === 20000) {
|
||||
switch (istate) {
|
||||
case -3:
|
||||
console.log('获取全部')
|
||||
console.log(res.data)
|
||||
console.log(this.allOrder)
|
||||
this.allOrder = this.allOrder.concat(res.data)
|
||||
if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
||||
this.load.isLoadMore1 = true
|
||||
@@ -306,9 +355,6 @@
|
||||
}
|
||||
break
|
||||
case -2:
|
||||
console.log('退款')
|
||||
console.log(res.data)
|
||||
console.log(this.allOrder)
|
||||
this.refundOrder = this.refundOrder.concat(res.data)
|
||||
|
||||
if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
||||
@@ -320,9 +366,6 @@
|
||||
}
|
||||
break
|
||||
case 0:
|
||||
console.log('待支付')
|
||||
console.log(res.data)
|
||||
console.log(this.allOrder)
|
||||
this.payingOrder = this.payingOrder.concat(res.data)
|
||||
|
||||
if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
||||
@@ -334,9 +377,6 @@
|
||||
}
|
||||
break
|
||||
case 1:
|
||||
console.log('已支付')
|
||||
console.log(res.data)
|
||||
console.log(this.allOrder)
|
||||
this.finishedOrder = this.finishedOrder.concat(res.data)
|
||||
if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
||||
this.load.isLoadMore3 = true
|
||||
@@ -359,17 +399,10 @@
|
||||
} else if (data2.istate == -2) {
|
||||
data2.istate = 3
|
||||
}
|
||||
console.log(data2)
|
||||
oliSiteApi.getNewItemSiteOrder(data2).then(res => {
|
||||
console.log(res)
|
||||
console.log('+++++++++++++++++++++++++++++++++++++++++')
|
||||
// console.log(data2.istate, data2.pageIndex)
|
||||
if (res.code === 20000) {
|
||||
switch (istate) {
|
||||
case 1:
|
||||
console.log('获取全部')
|
||||
console.log(res.data)
|
||||
console.log(this.allOrder)
|
||||
|
||||
this.allOrder = this.allOrder.concat(res.data)
|
||||
if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
||||
@@ -382,9 +415,6 @@
|
||||
break
|
||||
|
||||
case -2:
|
||||
console.log('退款')
|
||||
console.log(res.data)
|
||||
console.log(this.allOrder)
|
||||
this.refundOrder = this.refundOrder.concat(res.data)
|
||||
if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
||||
this.load.isLoadMore4 = true
|
||||
@@ -395,9 +425,6 @@
|
||||
}
|
||||
break
|
||||
case 0:
|
||||
console.log('待支付')
|
||||
console.log(res.data)
|
||||
console.log(this.allOrder)
|
||||
this.payingOrder = this.payingOrder.concat(res.data)
|
||||
if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
||||
this.load.isLoadMore2 = true
|
||||
@@ -408,9 +435,6 @@
|
||||
}
|
||||
break
|
||||
case -3:
|
||||
console.log('全部')
|
||||
console.log(res.data)
|
||||
console.log(this.allOrder)
|
||||
|
||||
this.finishedOrder = this.finishedOrder.concat(res.data)
|
||||
if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
||||
@@ -425,6 +449,90 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
startDateChange:function(e){
|
||||
this.startDate = e.detail.value
|
||||
let data=this.startDate
|
||||
this.endStartDate = data
|
||||
this.endEndDate = this.getEndDate(Date.parse(data)+ 3600 * 1000 * 24 * 30)
|
||||
this.params.startTime = this.startDate
|
||||
},
|
||||
endDateChange:function(e){
|
||||
if(this.startDate ==''){
|
||||
uni.showToast({
|
||||
title: '请先选择开始时间',
|
||||
icon: 'none'
|
||||
});
|
||||
}else{
|
||||
this.endDate = e.detail.value
|
||||
this.params.endTime = this.endDate
|
||||
}
|
||||
|
||||
},
|
||||
getEndDate(val){
|
||||
let nowDate = new Date(val)
|
||||
let year = nowDate.getFullYear();
|
||||
let month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1;
|
||||
let day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate();
|
||||
return year + "-" + month + "-" + day
|
||||
},
|
||||
orderExport(){
|
||||
this.startDate = ''
|
||||
this.endDate = ''
|
||||
this.params.email = ''
|
||||
this.params.startTime = ''
|
||||
this.params.endTime = ''
|
||||
this.$refs.popup.open('center')
|
||||
},
|
||||
|
||||
report() {
|
||||
if (this.params.email == '') {
|
||||
uni.showToast({
|
||||
title: '电子邮箱不能为空',
|
||||
icon: 'none'
|
||||
});
|
||||
return false
|
||||
} else if (this.params.email != '') {
|
||||
const emailRegex = /^([0-9A-Za-z\-_\.]+)@([0-9a-z]+\.[a-z]{2,3}(\.[a-z]{2})?)$/g
|
||||
if (!emailRegex.test(this.params.email)) {
|
||||
uni.showToast({
|
||||
title: '电子邮箱格式不准确',
|
||||
icon: 'none'
|
||||
});
|
||||
return false
|
||||
}
|
||||
}
|
||||
if(this.params.startTime==''){
|
||||
uni.showToast({
|
||||
title: '请选择开始时间',
|
||||
icon: 'none'
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(this.params.endTime==''){
|
||||
uni.showToast({
|
||||
title: '请选择结束时间',
|
||||
icon: 'none'
|
||||
});
|
||||
return false
|
||||
}
|
||||
uni.showModal({
|
||||
content: '请确认邮箱 \n'+this.params.email,
|
||||
success: (res)=> {
|
||||
if (res.confirm) {
|
||||
oliFinanceApi.getOrderInfoExport(this.params).then(res => {
|
||||
if (res.code == 20000) {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
this.$refs.popup.close();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -448,4 +556,73 @@
|
||||
width: 750upx;
|
||||
z-index: 3;
|
||||
}
|
||||
.uni-input{
|
||||
height: 25rpx;
|
||||
}
|
||||
.uni-picker{
|
||||
height: 25rpx;
|
||||
}
|
||||
.uni-list-cell-db{
|
||||
width: 100%;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.popup_card_bottom {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 68rpx;
|
||||
}
|
||||
|
||||
.popup_card_bottom_submit {
|
||||
background: #FE0505;
|
||||
color: #ffffff;
|
||||
font-size: 25rpx;
|
||||
width: 240rpx;
|
||||
}
|
||||
|
||||
.popup_card_bottom_close {
|
||||
background: #FFFFFF;
|
||||
font-size: 25rpx;
|
||||
width: 240rpx;
|
||||
}
|
||||
|
||||
.popup_card_from_item_right_text {
|
||||
font-size: 24rpx;
|
||||
color: #000000;
|
||||
max-width: 50%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-right: 25rpx;
|
||||
|
||||
}
|
||||
|
||||
.popup_card_from_item_left_text {
|
||||
width: 150rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.popup_card_from_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.popup_card_title {
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
font-size: 36rpx;
|
||||
margin-bottom: 80rpx;
|
||||
}
|
||||
|
||||
.popup_card {
|
||||
|
||||
width: 681rpx;
|
||||
height: 528rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 15px;
|
||||
padding: 64rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -429,6 +429,7 @@
|
||||
this.showHeight = '340rpx'
|
||||
}
|
||||
uni.setStorageSync('oilSitePriceId',res.data.site.id)
|
||||
uni.setStorageSync('oilSitePriceName',res.data.site.siteName)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
<view class="margin text-center">
|
||||
<button class="cu-btn round bg-main-oil lg text-lg" open-type="getPhoneNumber"
|
||||
@getphonenumber="decryptPhoneNumber">
|
||||
<text class="cuIcon-weixin padding-right-xs"> </text>
|
||||
<!-- <text class="cuIcon-weixin padding-right-xs"> </text> -->
|
||||
<text>
|
||||
微信用户一键登录
|
||||
手机号快捷登录
|
||||
</text>
|
||||
</button>
|
||||
<!-- <button class="cu-btn round btnSize" open-type="getPhoneNumber"
|
||||
|
||||
@@ -120,6 +120,8 @@
|
||||
if (res.indexOf('fykc') != -1 ){
|
||||
url = '/pages/stationDetail/ZYSite?type=fykc'
|
||||
console.log('这里是测试福佑' ,res.substring(0,7))
|
||||
}else if (tag == "SP") {
|
||||
url = '/pages/stationDetail/ZYSite?type=G7'
|
||||
} else if (tag == "XM" || tag == "HT" || tag == "G7") {
|
||||
url = '/pages/stationDetail/stationDetail?type=G7'
|
||||
} else if (res.indexOf('ZEYI') != -1 ){
|
||||
|
||||
@@ -21,18 +21,21 @@
|
||||
<text>请勿离开当前页面,等待支付完成</text>
|
||||
</view>
|
||||
<view class="payStatue_p" v-if="payState == 2">
|
||||
<button style="width: 500upx;margin-bottom: 40upx;" v-if="payState == 2" class="round large cu-btn bg-main-oil" @tap="singleCheck(orderId)">手动刷新</button>
|
||||
<button style="width: 500upx;margin-bottom: 40upx;" v-if="payState == 2"
|
||||
class="round large cu-btn bg-main-oil" @tap="singleCheck(orderId)">手动刷新</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-bottom-sm" @tap="copyId(orderInfos.customerId,'司机编号')">
|
||||
司机编号
|
||||
<text class="fr">{{orderInfos.customerId}}<text :class="orderInfos.customerId?'cuIcon-copy':''" class="flex-sub padding-left-sm text-right text-lg text-red">
|
||||
<text class="fr">{{orderInfos.customerId}}<text :class="orderInfos.customerId?'cuIcon-copy':''"
|
||||
class="flex-sub padding-left-sm text-right text-lg text-red">
|
||||
</text></text>
|
||||
</view>
|
||||
<view class="margin-bottom-sm">
|
||||
加油司机
|
||||
<view class="fr">
|
||||
<text>{{ orderInfos.customerName ? orderInfos.customerName : '丰油用户' }}</text> <text class="padding-left-sm">{{orderInfos.plateNumber|plateFilter}}
|
||||
<text>{{ orderInfos.customerName ? orderInfos.customerName : '丰油用户' }}</text> <text
|
||||
class="padding-left-sm">{{orderInfos.plateNumber|plateFilter}}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
@@ -95,7 +98,8 @@
|
||||
<view class="radius bg-white margin margin-bottom-0 padding">
|
||||
<view class="margin-bottom-sm" @tap="copyId(orderInfos.orderSerialNumber,'订单号')">
|
||||
订单号
|
||||
<text class=" fr">{{orderInfos.orderSerialNumber}}<text class="flex-sub padding-left-sm text-right cuIcon-copy text-lg text-red">
|
||||
<text class=" fr">{{orderInfos.orderSerialNumber}}<text
|
||||
class="flex-sub padding-left-sm text-right cuIcon-copy text-lg text-red">
|
||||
</text></text>
|
||||
</view>
|
||||
<view class="margin-bottom-sm">
|
||||
@@ -134,9 +138,12 @@
|
||||
<!-- <button v-show="formQr" @tap="scanQr" class="bg-main-oil margin-bottom">
|
||||
<text class="cuIcon-scan padding-right-xs"></text>
|
||||
继续加油</button> -->
|
||||
<button v-if="payState == 1" class="round large cu-btn bg-main-oil btn-oils" @tap="toDetails(orderId)">前往订单</button>
|
||||
<button v-if="payState == 2" class="round large cu-btn bg-main-oil btn-oils" @tap="getScanning()">重新扫码下单</button>
|
||||
<button v-if="payState != 0" class="round large cu-btn bg-main-oil btn-oils" @tap="gotoHome()">返回首页</button>
|
||||
<button v-if="payState == 1" class="round large cu-btn bg-main-oil btn-oils"
|
||||
@tap="toDetails(orderId)">前往订单</button>
|
||||
<button v-if="payState == 2" class="round large cu-btn bg-main-oil btn-oils"
|
||||
@tap="getScanning()">重新扫码下单</button>
|
||||
<button v-if="payState != 0" class="round large cu-btn bg-main-oil btn-oils"
|
||||
@tap="gotoHome()">返回首页</button>
|
||||
<!-- <button class="bg-red light margin-bottom" @tap="backHome">
|
||||
<text class="cuIcon-home padding-right-xs"></text>
|
||||
返回首页</button> -->
|
||||
@@ -214,7 +221,8 @@
|
||||
orderInfos: {}
|
||||
}
|
||||
},
|
||||
filters:{numberFormat(value) {
|
||||
filters: {
|
||||
numberFormat(value) {
|
||||
if (value != 'xxx.x') {
|
||||
console.log('old:', value)
|
||||
let realAmount = value.toFixed(2)
|
||||
@@ -251,15 +259,13 @@
|
||||
getScanning() { //支付取消 或失败 前往重新下单
|
||||
uni.redirectTo({
|
||||
url: '/pages/stationDetail/stationDetail',
|
||||
fail: (err) => {
|
||||
}
|
||||
fail: (err) => {}
|
||||
})
|
||||
},
|
||||
gotoHome() { // 返回首页
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
fail: (err) => {
|
||||
}
|
||||
fail: (err) => {}
|
||||
})
|
||||
},
|
||||
singleCheck(ids) { //单独调用check 订单状态
|
||||
@@ -267,7 +273,7 @@
|
||||
oilFinanceApi.checkOrderState(ids).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 20000) {
|
||||
_that.displayMoney =res.data.payRealAmount
|
||||
_that.displayMoney = res.data.sitePriceAmount
|
||||
_that.orderInfos = res.data
|
||||
console.log(_that.orderInfos)
|
||||
_that.payState = res.data.orderStatus
|
||||
@@ -372,6 +378,7 @@
|
||||
page {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.page-content {
|
||||
background-color: #f1f2f7;
|
||||
min-height: 100%;
|
||||
@@ -429,6 +436,7 @@
|
||||
display: block;
|
||||
border-radius: 0 0 0 100upx;
|
||||
}
|
||||
|
||||
.payStatue_text {
|
||||
font-size: 36rpx;
|
||||
color: #737373;
|
||||
@@ -437,6 +445,7 @@
|
||||
text-align: center;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.payStatue_p {
|
||||
font-size: 26rpx;
|
||||
color: #888888;
|
||||
@@ -445,6 +454,7 @@
|
||||
margin-bottom: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.btn-oils {
|
||||
width: 100%;
|
||||
border-radius: 14rpx;
|
||||
@@ -453,14 +463,17 @@
|
||||
/* padding: 14rpx; */
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.showimgs {
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
}
|
||||
|
||||
.boxsings_main_top {
|
||||
position: relative;
|
||||
margin-top: 90rpx;
|
||||
}
|
||||
|
||||
.showIcons {
|
||||
background-color: #fff;
|
||||
background-size: cover;
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
// this.type = 'fykc' //根据option.type 进行本地赋值
|
||||
// }
|
||||
if (this.qrCode) {
|
||||
if (this.qrCode.substr(0, 2) == 'HT' || this.qrCode.substr(0, 2) == 'G7') {
|
||||
if (this.qrCode.substr(0, 2) == 'HT' || this.qrCode.substr(0, 2) == 'G7'|| this.type === 'G7') {
|
||||
this.isG7 = true
|
||||
console.log('G7加油站')
|
||||
}
|
||||
@@ -650,6 +650,10 @@
|
||||
this.SfOrder()
|
||||
return
|
||||
}
|
||||
if (this.type === 'G7') {
|
||||
this.G7Order()
|
||||
return
|
||||
}
|
||||
if (this.type == 'fykc') {
|
||||
this.FyOrder()
|
||||
return
|
||||
@@ -851,6 +855,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
|
||||
}
|
||||
})
|
||||
},
|
||||
//日日顺
|
||||
RrsOrder() {
|
||||
const data6 = {
|
||||
@@ -970,8 +1055,6 @@
|
||||
companyId: this.siteData.companyId, //类型:String 必有字段 备注:企业id
|
||||
oilsBar: this.insertResult.bar,
|
||||
oilsCode: this.insertResult.oilProductCode,
|
||||
version: 1,
|
||||
xoilAmountGun: this.insertResult.vol,
|
||||
orderMethod: "SITE_SCAN", //类型:String 必有字段 备注:订单产生方式
|
||||
suppleMark: 0,
|
||||
orderType: "REAL_ORDER", //类型:String 必有字段 备注:订单类型 ( REAL_ORDER:真实订单 VIRTUAL_ORDER:虚拟订单)
|
||||
@@ -1225,11 +1308,12 @@
|
||||
}
|
||||
if (res.data.payState == 1) {
|
||||
clearInterval(this.timer)
|
||||
this.toDetails(res.data.payOrderId)
|
||||
this.toDetails(id)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toDetails(id) {
|
||||
uni.setStorageSync('orderId', id)
|
||||
console.log('id', id)
|
||||
|
||||
@@ -7,7 +7,7 @@ import utils from '@/utils/encode'
|
||||
//42 洛超 /29 孙志华 /40 阿浩
|
||||
// 测试日日顺时需要连阿浩
|
||||
|
||||
const testUrl = 'http://192.168.54:38080'
|
||||
const testUrl = 'http://192.168.0.26:38080'
|
||||
// const productionUrl = 'https://www.51xingka.net/oilApp' // 生产,加密 old
|
||||
// const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
||||
// const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
||||
|
||||
Reference in New Issue
Block a user