diff --git a/packageOrders/pages/orderList/orderList.vue b/packageOrders/pages/orderList/orderList.vue index 86ca245..5581bc5 100644 --- a/packageOrders/pages/orderList/orderList.vue +++ b/packageOrders/pages/orderList/orderList.vue @@ -4,6 +4,7 @@ 返回 加油记录 + - - - - - - + @@ -120,8 +125,9 @@ 结束时间: - - @@ -152,13 +158,13 @@ data() { return { - startTime:'', - endTime:"", + startTime: '', + endTime: "", activeSource: '小程序', indexSource: 1, sources: ['网页版', '小程序'], tabList: [ - '全部','待支付', '已支付 ', '退款' + '全部', '待支付', '已支付 ', '退款' ], TabCur: 0, pageNumber: 1, @@ -199,15 +205,15 @@ params: { siteId: uni.getStorageSync('oilSitePriceId'), siteName: uni.getStorageSync('oilSitePriceName'), - email:'', - startTime:'', - endTime:'' + email: '', + startTime: '', + endTime: '' }, - startDate:'', - endDate:'', - endStartDate:'', - endEndDate:'', - exportShow:false + startDate: '', + endDate: '', + endStartDate: '', + endEndDate: '', + exportShow: false } }, @@ -225,36 +231,37 @@ '1689183774927818752', '1689184331812888576', '1689185023261741056', - '1782596400854310912' - ] - var exportFields = exportList.filter((item) => { - return item == uni.getStorageSync('oilSitePriceId'); - }) - if(exportFields.length>0){ - this.exportShow = true - }else{ - this.exportShow = false - } + '1782596400854310912', + '1661994395596533760' + ] + 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) + uni.setStorageSync('orderType', 1) }, onReachBottom() { //上拉触底函数 // console.log('触底函数') this.loadMoreOrder('onReachBottom') }, methods: { - getTime(){ + getTime() { let nowDate = new Date(); - 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(); - let hr = nowDate.getHours() - let mf = nowDate.getMinutes() < 10 ? '0' + nowDate.getMinutes() : nowDate.getMinutes() - let ss =nowDate.getSeconds() < 10 ? '0' + nowDate.getSeconds() :nowDate.getSeconds() - this.startTime = year + "-" + month + "-" + day+" " + '00:00:00'; - this.endTime = year + "-" + month + "-" + day+" " +hr+':'+mf+':'+ss + 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(); + let hr = nowDate.getHours() + let mf = nowDate.getMinutes() < 10 ? '0' + nowDate.getMinutes() : nowDate.getMinutes() + let ss = nowDate.getSeconds() < 10 ? '0' + nowDate.getSeconds() : nowDate.getSeconds() + this.startTime = year + "-" + month + "-" + day + " " + '00:00:00'; + this.endTime = year + "-" + month + "-" + day + " " + hr + ':' + mf + ':' + ss }, loadMoreOrder(from) { // console.log(from,'loadMoreOrder时间') @@ -287,7 +294,7 @@ this.loadMoreOrder('tabSelect') }, pickSource(e) { - this.indexSource = parseInt( e.detail.value) + this.indexSource = parseInt(e.detail.value) this.activeSource = this.sources[this.indexSource] uni.setStorageSync('orderType', this.indexSource) this.pageNumber1 = 0 @@ -332,7 +339,7 @@ let that = this const data2 = { istate: istate, //类型:Number 必有字段 备注:订单状态 0待支付 1支付成功 查所有传 '' - pageIndex: pageNumber ,//类型:Number 必有字段 备注:查询第几页,默认一页10条 + pageIndex: pageNumber, //类型:Number 必有字段 备注:查询第几页,默认一页10条 // startTime: that.startTime, // endTime: that.endTime } @@ -437,7 +444,7 @@ this.load.isLoadMore2 = false } break - case -3: + case -3: this.finishedOrder = this.finishedOrder.concat(res.data) if (res.data.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页 @@ -448,38 +455,38 @@ this.load.isLoadMore3 = false } break - } + } } }) } }, - startDateChange:function(e){ + startDateChange: function(e) { this.startDate = e - let data=this.startDate + let data = this.startDate 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 }, - endDateChange:function(e){ - if(this.startDate ==''){ + endDateChange: function(e) { + if (this.startDate == '') { uni.showToast({ title: '请先选择开始时间', icon: 'none' }); - }else{ + } else { this.endDate = e this.params.endTime = this.endDate } }, - getEndDate(val){ + 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 + 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(){ + orderExport() { this.startDate = '' this.endDate = '' this.params.email = '' @@ -491,28 +498,28 @@ report() { if (this.params.email == '') { uni.showToast({ - title: '电子邮箱不能为空', - icon: 'none' + title: '电子邮箱不能为空', + icon: 'none' }); - return false + 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)) { + 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==''){ + if (this.params.startTime == '') { uni.showToast({ title: '请选择开始时间', icon: 'none' }); return false } - if(this.params.endTime==''){ + if (this.params.endTime == '') { uni.showToast({ title: '请选择结束时间', icon: 'none' @@ -520,8 +527,8 @@ return false } uni.showModal({ - content: '请确认邮箱 \n'+this.params.email, - success: (res)=> { + content: '请确认邮箱 \n' + this.params.email, + success: (res) => { if (res.confirm) { oliFinanceApi.getOrderInfoExport(this.params).then(res => { if (res.code == 20000) { @@ -559,13 +566,16 @@ width: 750upx; z-index: 3; } - .uni-input{ + + .uni-input { height: 25rpx; } - .uni-picker{ + + .uni-picker { height: 25rpx; } - .uni-list-cell-db{ + + .uni-list-cell-db { width: 100%; height: 30rpx; } @@ -628,4 +638,4 @@ border-radius: 15px; padding: 64rpx; } - + \ No newline at end of file diff --git a/pages/login/posLogin/posLogin.vue b/pages/login/posLogin/posLogin.vue index 2f5b1d4..7c90388 100644 --- a/pages/login/posLogin/posLogin.vue +++ b/pages/login/posLogin/posLogin.vue @@ -10,7 +10,7 @@ 油站工作人员绑定油站 --> -