@@ -4,6 +4,7 @@
< block slot = "backText" > 返回 < / block >
< block slot = "backText" > 返回 < / block >
< block slot = "content" > 加油记录 < / block >
< block slot = "content" > 加油记录 < / block >
< / cu-custom >
< / cu-custom >
< view class = "fixed-t" >
< view class = "fixed-t" >
< view class = "flex bg-main-oil padding solid-bottom" >
< view class = "flex bg-main-oil padding solid-bottom" >
<!-- < view class = "flex-sub" >
<!-- < view class = "flex-sub" >
@@ -24,7 +25,11 @@
v-for = "(item,index) in tabList" :key="index" @tap="tabSelect" :data-id="index" > {{ item }} < / view >
v-for = "(item,index) in tabList" :key="index" @tap="tabSelect" :data-id="index" > {{ item }} < / view >
< / view >
< / view >
< / scroll -view >
< / scroll -view >
< view v-if = "exportShow" style="margin-top: 16rpx;text-align: right;padding-right: 30rpx;" >
< button class = "cu-btn bg-white" style = "border: 1px solid #ddd;" @click ="orderExport" > 订单导出 < / button >
< / view >
< / view >
< / view >
< view v-if = "exportShow" style="padding: 24rpx;" > < / view >
< ! - - < view class = "placeholder-hidden" >
< ! - - < view class = "placeholder-hidden" >
< view class = "flex bg-main-oil padding solid-bottom" >
< view class = "flex bg-main-oil padding solid-bottom" >
< view class = "flex-sub" >
< view class = "flex-sub" >
@@ -46,12 +51,12 @@
< / view >
< / view >
< / scroll -view >
< / scroll -view >
< / view > -- >
< / view > -- >
< view v-if = "exportShow" >
<!-- < view v-if = "exportShow" >
< view style = "padding: 30u px;" > < / view >
< view style = "padding: 30r px;" > < / view >
< view style = "position: fixed;width: 750u px;z-index: 5;text-align: right;top:315u px;right: 30u px;" >
< view style = "position: fixed;width: 750r px;z-index: 5;text-align: right;top:315r px;right: 30r px;" >
< button class = "cu-btn bg-white" @click ="orderExport" > 订单导出 < / button >
< button class = "cu-btn bg-white" style = "border: 1px solid #ddd;" @click ="orderExport" > 订单导出 < / button >
< / view >
< / view >
< / view >
< / view > - - >
< view class = "padding padding-bottom-0" style = "padding-top: 200upx;" >
< view class = "padding padding-bottom-0" style = "padding-top: 200upx;" >
<!-- 0 全部 1 待支付 2 已支付 3 退款 -- >
<!-- 0 全部 1 待支付 2 已支付 3 退款 -- >
@@ -120,7 +125,8 @@
< view class = "popup_card_from_item" >
< view class = "popup_card_from_item" >
< view class = "popup_card_from_item_left_text" style = "margin-top: 32rpx;" > 结束时间 : < / view >
< view class = "popup_card_from_item_left_text" style = "margin-top: 32rpx;" > 结束时间 : < / view >
< view class = "uni-list-cell-db" >
< view class = "uni-list-cell-db" >
< uni-datetime-picker type = "datetime" :value = "endDate" @change ="endDateChange" :start = "endStartDate" :end = "endEndDate" / >
< uni-datetime-picker type = "datetime" :value = "endDate" @change ="endDateChange"
:start = "endStartDate" :end = "endEndDate" / >
<!-- < picker mode = "date" :value = "endDate" @change ="endDateChange" :start = "endStartDate" :end = "endEndDate" class = "uni-picker" >
<!-- < picker mode = "date" :value = "endDate" @change ="endDateChange" :start = "endStartDate" :end = "endEndDate" class = "uni-picker" >
< view class = "uni-input" > { { endDate } } < / view >
< view class = "uni-input" > { { endDate } } < / view >
< / picker > -- >
< / picker > -- >
@@ -152,13 +158,13 @@
data ( ) {
data ( ) {
return {
return {
startTime : '' ,
startTime : '' ,
endTime : "" ,
endTime : "" ,
activeSource : '小程序' ,
activeSource : '小程序' ,
indexSource : 1 ,
indexSource : 1 ,
sources : [ '网页版' , '小程序' ] ,
sources : [ '网页版' , '小程序' ] ,
tabList : [
tabList : [
'全部' , '待支付' , '已支付 ' , '退款'
'全部' , '待支付' , '已支付 ' , '退款'
] ,
] ,
TabCur : 0 ,
TabCur : 0 ,
pageNumber : 1 ,
pageNumber : 1 ,
@@ -199,15 +205,15 @@
params : {
params : {
siteId : uni . getStorageSync ( 'oilSitePriceId' ) ,
siteId : uni . getStorageSync ( 'oilSitePriceId' ) ,
siteName : uni . getStorageSync ( 'oilSitePriceName' ) ,
siteName : uni . getStorageSync ( 'oilSitePriceName' ) ,
email : '' ,
email : '' ,
startTime : '' ,
startTime : '' ,
endTime : ''
endTime : ''
} ,
} ,
startDate : '' ,
startDate : '' ,
endDate : '' ,
endDate : '' ,
endStartDate : '' ,
endStartDate : '' ,
endEndDate : '' ,
endEndDate : '' ,
exportShow : false
exportShow : false
}
}
} ,
} ,
@@ -225,14 +231,15 @@
'1689183774927818752' ,
'1689183774927818752' ,
'1689184331812888576' ,
'1689184331812888576' ,
'1689185023261741056' ,
'1689185023261741056' ,
'1782596400854310912'
'1782596400854310912' ,
'1661994395596533760'
]
]
var exportFields = exportList . filter ( ( item ) => {
var exportFields = exportList . filter ( ( item ) => {
return item == uni . getStorageSync ( 'oilSitePriceId' ) ;
return item == uni . getStorageSync ( 'oilSitePriceId' ) ;
} )
} )
if ( exportFields . length > 0 ) {
if ( exportFields . length > 0 ) {
this . exportShow = true
this . exportShow = true
} else {
} else {
this . exportShow = false
this . exportShow = false
}
}
@@ -245,16 +252,16 @@
this . loadMoreOrder ( 'onReachBottom' )
this . loadMoreOrder ( 'onReachBottom' )
} ,
} ,
methods : {
methods : {
getTime ( ) {
getTime ( ) {
let nowDate = new Date ( ) ;
let nowDate = new Date ( ) ;
let year = nowDate . getFullYear ( ) ;
let year = nowDate . getFullYear ( ) ;
let month = nowDate . getMonth ( ) + 1 < 10 ? "0" + ( nowDate . getMonth ( ) + 1 ) : nowDate . getMonth ( ) + 1 ;
let month = nowDate . getMonth ( ) + 1 < 10 ? "0" + ( nowDate . getMonth ( ) + 1 ) : nowDate . getMonth ( ) + 1 ;
let day = nowDate . getDate ( ) < 10 ? "0" + nowDate . getDate ( ) : nowDate . getDate ( ) ;
let day = nowDate . getDate ( ) < 10 ? "0" + nowDate . getDate ( ) : nowDate . getDate ( ) ;
let hr = nowDate . getHours ( )
let hr = nowDate . getHours ( )
let mf = nowDate . getMinutes ( ) < 10 ? '0' + nowDate . getMinutes ( ) : nowDate . getMinutes ( )
let mf = nowDate . getMinutes ( ) < 10 ? '0' + nowDate . getMinutes ( ) : nowDate . getMinutes ( )
let ss = nowDate . getSeconds ( ) < 10 ? '0' + nowDate . getSeconds ( ) : nowDate . getSeconds ( )
let ss = nowDate . getSeconds ( ) < 10 ? '0' + nowDate . getSeconds ( ) : nowDate . getSeconds ( )
this . startTime = year + "-" + month + "-" + day + " " + '00:00:00' ;
this . startTime = year + "-" + month + "-" + day + " " + '00:00:00' ;
this . endTime = year + "-" + month + "-" + day + " " + hr + ':' + mf + ':' + ss
this . endTime = year + "-" + month + "-" + day + " " + hr + ':' + mf + ':' + ss
} ,
} ,
loadMoreOrder ( from ) {
loadMoreOrder ( from ) {
// console.log(from,'loadMoreOrder时间')
// console.log(from,'loadMoreOrder时间')
@@ -287,7 +294,7 @@
this . loadMoreOrder ( 'tabSelect' )
this . loadMoreOrder ( 'tabSelect' )
} ,
} ,
pickSource ( e ) {
pickSource ( e ) {
this . indexSource = parseInt ( e . detail . value )
this . indexSource = parseInt ( e . detail . value )
this . activeSource = this . sources [ this . indexSource ]
this . activeSource = this . sources [ this . indexSource ]
uni . setStorageSync ( 'orderType' , this . indexSource )
uni . setStorageSync ( 'orderType' , this . indexSource )
this . pageNumber1 = 0
this . pageNumber1 = 0
@@ -332,7 +339,7 @@
let that = this
let that = this
const data2 = {
const data2 = {
istate : istate , //类型: Number 必有字段 备注:订单状态 0待支付 1支付成功 查所有传 ''
istate : istate , //类型: Number 必有字段 备注:订单状态 0待支付 1支付成功 查所有传 ''
pageIndex : pageNumber , //类型: Number 必有字段 备注:查询第几页,默认一页10条
pageIndex : pageNumber , //类型: Number 必有字段 备注:查询第几页,默认一页10条
// startTime: that.startTime,
// startTime: that.startTime,
// endTime: that.endTime
// endTime: that.endTime
}
}
@@ -453,33 +460,33 @@
} )
} )
}
}
} ,
} ,
startDateChange : function ( e ) {
startDateChange : function ( e ) {
this . startDate = e
this . startDate = e
let data = this . startDate
let data = this . startDate
this . endStartDate = data
this . endStartDate = data
this . endEndDate = this . getEndDate ( Date . parse ( data ) + 3600 * 1000 * 24 * 31 )
this . endEndDate = this . getEndDate ( Date . parse ( data ) + 3600 * 1000 * 24 * 31 )
this . params . startTime = this . startDate
this . params . startTime = this . startDate
} ,
} ,
endDateChange : function ( e ) {
endDateChange : function ( e ) {
if ( this . startDate == '' ) {
if ( this . startDate == '' ) {
uni . showToast ( {
uni . showToast ( {
title : '请先选择开始时间' ,
title : '请先选择开始时间' ,
icon : 'none'
icon : 'none'
} ) ;
} ) ;
} else {
} else {
this . endDate = e
this . endDate = e
this . params . endTime = this . endDate
this . params . endTime = this . endDate
}
}
} ,
} ,
getEndDate ( val ) {
getEndDate ( val ) {
let nowDate = new Date ( val )
let nowDate = new Date ( val )
let year = nowDate . getFullYear ( ) ;
let year = nowDate . getFullYear ( ) ;
let month = nowDate . getMonth ( ) + 1 < 10 ? "0" + ( nowDate . getMonth ( ) + 1 ) : nowDate . getMonth ( ) + 1 ;
let month = nowDate . getMonth ( ) + 1 < 10 ? "0" + ( nowDate . getMonth ( ) + 1 ) : nowDate . getMonth ( ) + 1 ;
let day = nowDate . getDate ( ) < 10 ? "0" + nowDate . getDate ( ) : nowDate . getDate ( ) ;
let day = nowDate . getDate ( ) < 10 ? "0" + nowDate . getDate ( ) : nowDate . getDate ( ) ;
return year + "-" + month + "-" + day
return year + "-" + month + "-" + day
} ,
} ,
orderExport ( ) {
orderExport ( ) {
this . startDate = ''
this . startDate = ''
this . endDate = ''
this . endDate = ''
this . params . email = ''
this . params . email = ''
@@ -505,14 +512,14 @@
return false
return false
}
}
}
}
if ( this . params . startTime == '' ) {
if ( this . params . startTime == '' ) {
uni . showToast ( {
uni . showToast ( {
title : '请选择开始时间' ,
title : '请选择开始时间' ,
icon : 'none'
icon : 'none'
} ) ;
} ) ;
return false
return false
}
}
if ( this . params . endTime == '' ) {
if ( this . params . endTime == '' ) {
uni . showToast ( {
uni . showToast ( {
title : '请选择结束时间' ,
title : '请选择结束时间' ,
icon : 'none'
icon : 'none'
@@ -520,8 +527,8 @@
return false
return false
}
}
uni . showModal ( {
uni . showModal ( {
content : '请确认邮箱 \n' + this . params . email ,
content : '请确认邮箱 \n' + this . params . email ,
success : ( res ) => {
success : ( res ) => {
if ( res . confirm ) {
if ( res . confirm ) {
oliFinanceApi . getOrderInfoExport ( this . params ) . then ( res => {
oliFinanceApi . getOrderInfoExport ( this . params ) . then ( res => {
if ( res . code == 20000 ) {
if ( res . code == 20000 ) {
@@ -559,13 +566,16 @@
width : 750 upx ;
width : 750 upx ;
z - index : 3 ;
z - index : 3 ;
}
}
. uni - input {
. uni - input {
height : 25 rpx ;
height : 25 rpx ;
}
}
. uni - picker {
. uni - picker {
height : 25 rpx ;
height : 25 rpx ;
}
}
. uni - list - cell - db {
. uni - list - cell - db {
width : 100 % ;
width : 100 % ;
height : 30 rpx ;
height : 30 rpx ;
}
}