This commit is contained in:
2025-06-19 17:33:18 +08:00
commit f8f31dc4d9
437 changed files with 103080 additions and 0 deletions
@@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "加油充电详情"
}
@@ -0,0 +1,199 @@
/* packageA/pages/refuelingCharging/RefuelingChargingDetail/RefuelingChargingDetail.wxss */
.container {
height: 100vh;
padding-top: 2px;
box-sizing: border-box;
background: #EFF1F4;
overflow: hidden;
position: relative;
>.bg {
width: 100%;
height: 250px;
position: absolute;
top: 0;
image {
width: 100%;
height: 100%;
display: block;
}
}
.top {
margin: 8px 8px 10px;
padding: 12px 10px;
margin-bottom: 8px;
background: #fff;
border-radius: 8px;
position: relative;
padding: 12px 10px;
.row:first-child {
margin-bottom: 8px;
}
.row {
margin-bottom: 4px;
color: #2E3A4F;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: space-between;
.title {
font-size: 30rpx;
font-weight: bold;
}
.time {
color: #858CA0;
}
.val {
display: flex;
align-items: center;
.type {
width: 104rpx;
height: 32rpx;
padding: 4rpx;
margin-left: 16rpx;
line-height: 32rpx;
background: linear-gradient(270deg, #4CDBAD 0%, #2FCBAB 100%);
border-radius: 2px;
color: #fff;
text-align: center;
}
.type-g {
background: linear-gradient(270deg, #A1A8BB 0%, #838EAA 100%);
}
.type-b {
background: #4381FC;
}
.type-bb {
background: #FFFFFF;
border-radius: 2px;
border: 1px solid #4F88FC;
color: #4381FC;
}
}
.status {
width: 104rpx;
color: #2E3A4F;
font-weight: bold;
text-align: center;
}
.status1 {
width: 104rpx;
color: #4381FC;
font-weight: bold;
text-align: center;
}
.prices {
color: #4381FC;
font-size: 14px;
// display: flex;
// align-items: flex-end;
.num {
font-size: 28px;
font-weight: bold;
display: inline-block;
}
}
}
}
.detail-container {
max-height: calc(100vh - 130px);
padding: 0px 8px 0px;
box-sizing: border-box;
overflow: hidden;
position: relative;
.content {
max-height: calc(100vh - 150px);
padding: 12px 10px;
// box-sizing: border-box;
border-radius: 8px;
background: #fff;
overflow-y: auto;
.title {
margin-bottom: 17px;
display: flex;
align-items: center;
.line {
width: 4px;
height: 22px;
background: linear-gradient(180deg, #4E87FC 0%, #38B1FE 100%);
border-radius: 2px;
}
.val {
margin-left: 8px;
font-size: 14px;
font-weight: bold;
color: #333F53;
}
}
.row {
margin-bottom: 8px;
display: flex;
justify-content: space-between;
// align-items: center;
.label {
margin-right: 4px;
color: #858CA0;
font-size: 14px;
white-space: nowrap;
}
.val {
color: #2E3A4F;
font-size: 14px;
}
.pic-box {
max-width: 70%;
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
.item {
width: 84px;
height: 84px;
padding-left: 8px;
margin-bottom: 8px;
display: flex;
align-items: center;
image {
width: 100%;
height: 100%;
display: block;
}
}
}
}
}
}
.bottom {
width: 100%;
padding: 10px 8px 30px;
background: #fff;
box-sizing: border-box;
border-radius: 8px 8px 0 0;
box-shadow: 0px -2px 12px 0px rgba(0,0,0,0.2);
position: absolute;
bottom: 0;
left: 0;
.btn-box {
width: 100%;
display: flex;
justify-content: space-between;
.btn {
width: 100%;
height: 40px;
line-height: 40px;
border-radius: 8px;
background: linear-gradient(90deg, #3B7CFC 0%, #548BFC 100%);
color: #fff;
font-weight: bold;
text-align: center;
}
}
}
}
.file{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #409EFF;
word-wrap: break-word;
word-break: break-all;
white-space: pre-line;
}
@@ -0,0 +1,105 @@
// packageA/pages/refuelingCharging/RefuelingChargingDetail/RefuelingChargingDetail.ts
Page({
/**
* 页面的初始数据
*/
data: {
item: {} as any,
attachmentUrlList: []
},
// 查看文件
checkFile(event: any) {
let url = event.currentTarget.dataset.url;
let type = url.split('.')[url.split('.').length - 1];
if (type == 'jpg' || type == 'jpeg' || type == 'png') {
wx.previewImage({
current: url, // 当前显示图片的http链接
urls: [url] // 需要预览的图片http链接列表
});
} else {
wx.showLoading({
title: '数据加载中'
});
wx.downloadFile({
// 示例 url,并非真实存在
url: url,
success: function (res) {
const filePath = res.tempFilePath;
wx.openDocument({
filePath: filePath,
showMenu: true,
success: function (res) {
wx.hideLoading();
},
fail: function () {
wx.hideLoading();
}
});
},
fail: function () {
wx.hideLoading();
}
});
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad() {
// 接收传参
const eventChannel = this.getOpenerEventChannel();
eventChannel &&
eventChannel.on &&
eventChannel.on('eventName', (data: any) => {
let attachmentUrlList = [] as any;
if (data.attachmentUrl) {
attachmentUrlList = data.attachmentUrl.split(',').map((item: any) => {
return {
url: item,
name: item.split('/')[item.split('/').length - 1]
};
});
}
this.setData({
item: data,
attachmentUrlList: attachmentUrlList
});
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
});
@@ -0,0 +1,85 @@
<!--packageA/pages/refuelingCharging/RefuelingChargingDetail/RefuelingChargingDetail.wxml-->
<view class="container">
<view class="bg">
<image src="../../../../images/bg_page_blue.png" mode="" />
</view>
<view class="top">
<view class="row">
<view class="title">{{item.plateNumber ? item.plateNumber : '/'}}</view>
<view class="time">{{item.recordDate ? item.recordDate : '/'}}</view>
</view>
<view class="row">
<view class="val">
{{item.vehicleType_dictText ? item.vehicleType_dictText : '/'}}
</view>
<view class="prices">
¥<view class="num">{{item.totalPrice ? item.totalPrice : '0'}}</view>
</view>
</view>
</view>
<view class="detail-container">
<view class="content">
<view class="title">
<view class="line"></view>
<view class="val">记录详情</view>
</view>
<view class="row">
<view class="label">部门</view>
<view class="val">{{item.sysOrgCode_dictText ? item.sysOrgCode_dictText : '/'}}</view>
</view>
<view class="row">
<view class="label">驾驶员</view>
<view class="val">{{item.driver ? item.driver : '/'}}</view>
</view>
<view class="row">
<view class="label">卡号</view>
<view class="val">{{item.oilCard ? item.oilCard : '/'}}</view>
</view>
<view class="row">
<view class="label">卡余额(元)</view>
<view class="val">{{item.oilCardBalance ? item.oilCardBalance : '/'}}</view>
</view>
<view class="row">
<view class="label">加油站</view>
<view class="val">{{item.oilStation ? item.oilStation : '/'}}</view>
</view>
<view class="row">
<view class="label">油品规格/充电类型</view>
<view class="val">{{item.oilType_dictText ? item.oilType_dictText : '/'}}</view>
</view>
<view class="row">
<view class="label">加油时里程</view>
<view class="val">{{item.mileage ? item.mileage : '/'}}</view>
</view>
<view class="row">
<view class="label">数量(升/度)</view>
<view class="val">{{item.amount ? item.amount : '/'}}</view>
</view>
<view class="row">
<view class="label">金额(元)</view>
<view class="val">{{item.totalPrice ? item.totalPrice : '/'}}</view>
</view>
<view class="row">
<view class="label">单价(元)</view>
<view class="val">{{item.price ? item.price : '/'}}</view>
</view>
<view class="row">
<view class="label">日期</view>
<view class="val">{{item.recordDate ? item.recordDate : '/'}}</view>
</view>
<view class="row">
<view class="label">备注</view>
<view class="val" style="max-width: 80%;">{{item.remark ? item.remark : '/'}}</view>
</view>
<view class="row">
<view class="label">附件</view>
<view class="val" wx:if="{{item.attachmentUrl}}" style="max-width: 80%;">
<view wx:for="{{attachmentUrlList}}" wx:key="index" wx:for-item="file" data-index="{{index}}" bindtap="previewImg">
<view catch:tap="checkFile" data-url="{{file.url}}" class="file">{{file.name}}</view>
</view>
</view>
<view wx:else class="val">/</view>
</view>
</view>
</view>
</view>