소스 검색

通行流水修改

yxb
不甘寂寞 2 년 전
부모
커밋
035fbf534a
3개의 변경된 파일63개의 추가작업 그리고 66개의 파일을 삭제
  1. 1
    0
      datas/fileURL.js
  2. 53
    57
      service/search/etcFlowingWater.vue
  3. 9
    9
      service/search/select-card.vue

+ 1
- 0
datas/fileURL.js 파일 보기

// export const fileURL = 'http://47.94.96.52/' // export const fileURL = 'http://47.94.96.52/'
export const fileURL = 'http://222.85.144.89:19002/default-bucket/' export const fileURL = 'http://222.85.144.89:19002/default-bucket/'
export const downloadFileURL = 'http://192.168.100.63:8087/user-export-excel/'
// export const fileURL = 'http://192.168.100.63:8087/default-bucket/' // export const fileURL = 'http://192.168.100.63:8087/default-bucket/'

+ 53
- 57
service/search/etcFlowingWater.vue 파일 보기

</view> </view>
<view class="time-btn" @click="search">查询</view> <view class="time-btn" @click="search">查询</view>
</view> </view>
<view class="total-num" v-if="state.list.length > 0"><text>金额合计:{{state.aggregatAmout/100}}</text> <text class="total-space">通行次数:{{state.passTotal}}</text></view>
<view class="total-num" v-if="state.list.length > 0">
<text>金额合计:{{state.aggregateAmount/100}}</text>
<text class="total-space">通行次数: {{state.passTotal}}</text>
<view class="btn btn-download" @click="doDownload">下载报表</view>
</view>
<view class="list-wrap" v-if="state.list.length >0"> <view class="list-wrap" v-if="state.list.length >0">
<view v-for="item in state.list" :key="item.listNo" <view v-for="item in state.list" :key="item.listNo"
:class="item.status === 3 ? ' card-info finished' : 'card-info'"> :class="item.status === 3 ? ' card-info finished' : 'card-info'">
import { import {
onLoad onLoad
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import {downloadFileURL} from '@/datas/fileURL.js'
const dataTime = reactive({ const dataTime = reactive({
startDate: "开始时间", startDate: "开始时间",
endDate: "结束时间" endDate: "结束时间"
const state = reactive({ const state = reactive({
list: [], list: [],
cardId: null, cardId: null,
passTotal:0,
parkTotal:0,
aggregatAmout:0,
passTotal: 0,
parkTotal: 0,
aggregateAmount: 0,
}) })
onLoad((option) => { onLoad((option) => {
state.cardId =option.cardId;
// queryOrderDetail(option.cardId);
state.cardId = option.cardId;
}) })




const search = () => { const search = () => {
gePpassBillCount()
getPpassBillCount()


const options = { const options = {
type: 2, type: 2,
data: { data: {
cardId: state.cardId,//52011640230202987050
cardId: state.cardId,
beforeDate: dataTime.startDate, beforeDate: dataTime.startDate,
afterDate: dataTime.endDate, afterDate: dataTime.endDate,
}, },
console.log(result); console.log(result);
state.list = result.data ?? [] state.list = result.data ?? []
console.log(result.data); console.log(result.data);
// let orderInfo = JSON.parse(res.bizContent); // let orderInfo = JSON.parse(res.bizContent);
}) })


} }
const gePpassBillCount = ()=>{
const getPpassBillCount = () => {
const options = { const options = {
type: 2, type: 2,
data: { data: {
// cardId: state.cardId,//52011640230202987050
cardId: "52011328220201990321",//52011640230202987050
cardId: state.cardId,
starDate: dataTime.startDate, starDate: dataTime.startDate,
endDate: dataTime.endDate, endDate: dataTime.endDate,
}, },
}; };
request(passBillCount, options).then((res) => { request(passBillCount, options).then((res) => {
let result = stringToJson(res.bizContent) let result = stringToJson(res.bizContent)
state.aggregatAmout = result.aggregatAmout??0
state.passTotal = result.passTotal??0
state.parkTotal = result.parkTotal??0
state.aggregateAmount = result.aggregateAmount ?? 0
state.passTotal = result.passTotal ?? 0
state.parkTotal = result.parkTotal ?? 0
console.log(result); console.log(result);
}) })
} }
const queryOrderDetail = (id) => {
const options = {
type: 2,
data: {
id: id,
},
method: "POST",
showLoading: true,
};
request(orderDetail, options).then((res) => {
// console.log(res);
let result = stringToJson(res.bizContent)
state.vehiclePlate = result.vehiclePlate ?? null
state.cardId = result.cardId ?? null
console.log(state);
search()
// let orderInfo = JSON.parse(res.bizContent);
})
}


// 展示日历 // 展示日历
const bindDateStart = (e) => { const bindDateStart = (e) => {
url: "" url: ""
}); });
} }
//下载按钮事件 //下载按钮事件
const doDownload= ()=>{
const doDownload = () => {
const options = { const options = {
type: 2, type: 2,
data: { data: {
cardId: state.cardId,//52011640230202987050
cardId: state.cardId,
starDate: dataTime.startDate, starDate: dataTime.startDate,
endDate: dataTime.endDate, endDate: dataTime.endDate,
}, },
}; };
request(downloadBills, options).then((res) => { request(downloadBills, options).then((res) => {
let result = stringToJson(res.bizContent) let result = stringToJson(res.bizContent)
// state.aggregatAmout = result.DetailDownLoadURL??0
download(result.DetailDownLoadURL)
console.log(downloadFileURL+result.ossFilePath);
download(downloadFileURL+result.ossFilePath)
}) })
} }
//下载文件 //下载文件
const download = (attachLink) => {
const download = (attachLink) => {
let that = this let that = this
uni.downloadFile({ uni.downloadFile({
url: attachLink , //下载地址,后端接口获取的链接
url: attachLink, //下载地址,后端接口获取的链接
success: (data) => { success: (data) => {
console.log(data.tempFilePath) console.log(data.tempFilePath)
console.log(JSON.stringify(data)) console.log(JSON.stringify(data))
uni.saveFile({ //文件保存到本地 uni.saveFile({ //文件保存到本地
tempFilePath: data.tempFilePath, //临时路径 tempFilePath: data.tempFilePath, //临时路径
success: function(res) { success: function(res) {
console.log("下载成功"+res.savedFilePath)
console.log("下载成功" + res.savedFilePath)
console.log(JSON.stringify(res)) console.log(JSON.stringify(res))
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
mask: true, mask: true,
title: '文件已保存!',
title: '文件已保存!',
duration: 3000, duration: 3000,
}); });
uni.openDocument({ uni.openDocument({
//fileType: 'docx', //fileType: 'docx',
showMenu:true, //关键点,可以转发到微信
showMenu: true, //关键点,可以转发到微信
filePath: res.savedFilePath, filePath: res.savedFilePath,
success: function(res) { success: function(res) {
console.log('打开文档成功'); console.log('打开文档成功');
}, },
}); });
} }

</script> </script>


<style lang="scss" scoped> <style lang="scss" scoped>
.u-btn--primary { .u-btn--primary {
background: #00B38B; background: #00B38B;
} }
.blank{
.blank {
font-size: 30rpx; font-size: 30rpx;
text-align: center; text-align: center;
} }
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
} }

.picker{
flex: 1;
}
.search-time-box { .search-time-box {
flex: 1; flex: 1;
} }
.show-text { .show-text {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
width: 100%;
text-align: center;
} }


.date-text { .date-text {
} }


.total-num { .total-num {
font-size: 28rpx;
font-size: 30rpx;
color: #999999; color: #999999;
margin-left: 30rpx;
display: flex;
justify-content: space-evenly;
align-items: center;


.total-space {
margin-left: 41rpx;
}
// .total-space {
// margin-left: 41rpx;
// }
}
.btn-download{
padding: 0 20rpx;
border: 1px solid #00B38B;
height: 60rpx;
line-height: 60rpx;
border-radius: 30rpx;
font-size: 28rpx;
color: #00B38B;
} }


.list-wrap { .list-wrap {

+ 9
- 9
service/search/select-card.vue 파일 보기

<template> <template>
<view class="selectCar-box"> <view class="selectCar-box">
<view v-if="state.list.length>0" @click="choose(i,item)" class="item" v-for="(item,i) in state.cards" :key="i">
<view v-if="state.cards.length>0" @click="choose(i,item)" class="item" v-for="(item,i) in state.cards" :key="i">
<view class="iten-left"> <view class="iten-left">
<image :src="`${$imgUrl}card2.png`" mode=""></image> <image :src="`${$imgUrl}card2.png`" mode=""></image>
<text>{{item.cardId}}</text> <text>{{item.cardId}}</text>
} from "@/utils/network/encryption"; } from "@/utils/network/encryption";


const state = reactive({ const state = reactive({
cards:[],
cards: [],
}); });
onLoad((option) => { onLoad((option) => {
getCardList(option.vehicleId) getCardList(option.vehicleId)
const flag = ref('0') const flag = ref('0')


const choose = (i, item) => { const choose = (i, item) => {
console.log(item,i)
console.log(item, i)
console.log(item.vehicleId); console.log(item.vehicleId);
getCardList(item.vehicleId) getCardList(item.vehicleId)
navTo(`/service/search/etcFlowingWater?cardId=${item.cardId}`) navTo(`/service/search/etcFlowingWater?cardId=${item.cardId}`)
} }
const getCardList = (vehicleId) => { const getCardList = (vehicleId) => {
var data = { var data = {
vehicleId:vehicleId
vehicleId: vehicleId
}; };
const options = { const options = {
type: 2, type: 2,
method: "POST", method: "POST",
showLoading: true, showLoading: true,
}; };
request(cardList, options).then((res)=>{
let result =stringToJson(res.bizContent);
state.cards = result.cards??null;
request(cardList, options).then((res) => {
let result = stringToJson(res.bizContent);
state.cards = result.cards ?? null;
console.log(result.cards); console.log(result.cards);
}) })
} }




} }
</style>
</style>

Loading…
취소
저장