emis-app/pages/bill/detail.vue

339 lines
10 KiB
Vue
Raw Normal View History

2025-06-26 00:27:26 +00:00
<template>
<tpx-page>
<tpx-layout>
<template #body>
<view>
<view class="dt-head">
<!-- <u-text :text="'账单信息'" size="30" :bold="true"></u-text>
<u-line margin="20rpx 0 20rpx"></u-line> -->
<view class="dt-item">
<view class="lb1">账单编号:</view>
<view class="lb2" style="font-weight: bold;">{{info.settleBillNo}}</view>
</view>
<view class="dt-item">
<view class="lb1">账单日期:</view>
<view class="lb2">{{info.createTime}}</view>
</view>
<view class="dt-item">
<u-row justify="between" align="top">
<u-col span="12">
<!-- <u-text :text="`账单月份:${info.billMonth}`" size="26"
margin="14rpx 0 0 0"></u-text> -->
<u-text :text="`总票数:${info.sendPieceSum}`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`结算重量:${info.feeWeight}KG`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`总费用:${info.recMoney}CNY`" size="26"
margin="14rpx 0 0 0"></u-text>
</u-col>
<u-col span="12">
<u-text :text="`总件数:${info.pieceNumber}`" size="26"
margin="14rpx 0 0 0"></u-text>
<view >
<u-text v-if="info.openBillStatus == '0'" :text="`开票状态:未开票`" size="26"margin="14rpx 0 0 0"></u-text>
<u-text v-if="info.openBillStatus == '1'" :text="`开票状态:已开票`" size="26"margin="14rpx 0 0 0"></u-text>
<u-text v-if="info.openBillStatus == '2'" :text="`开票状态:部分开票`" size="26"margin="14rpx 0 0 0"></u-text>
<u-text v-if="info.openBillStatus == '3'" :text="`开票状态:不开票`" size="26"margin="14rpx 0 0 0"></u-text>
</view>
<u-text :text="`已付费用:${info.recedMoney}CNY`" size="26"
margin="14rpx 0 0 0"></u-text>
</u-col>
</u-row>
</view>
<view class="dt-item" >
<view class="">支付状态:</view>
<view class="lb2">
<tetx v-if="info.paymentStatus == '0'">未付款</tetx>
<tetx v-if="info.paymentStatus == '1'">已付款</tetx>
<tetx v-if="info.paymentStatus == '2'">部分付款</tetx>
</view>
<!-- <view class="lb2 clr-prm font-weight">已付款</view> -->
</view>
<!-- <view class="dt-item mt-30">
<view class="lb1">收款账户</view>
<view class="lb2">
<u-row >
<u-avatar size="80" shape="square"></u-avatar>
<view class="pl-10">
<u-text :text="'探路供应链(江苏)有限公司'" size="28" :bold="true" ></u-text>
<u-text :text="'介绍'" size="26" color="#666" margin="10rpx 0 0 0"></u-text>
</view>
</u-row>
</view>
</view> -->
<view v-if="info.paymentStatus!=1" class="dt-item mt-30">
<view class="">待支付:</view>
<view class="zhfxin">
<view style="display: inline-block;">
<u-text :text="`¥${info.thisPayMoney}`" size="42" :bold="true" color="red" align="center"></u-text>
</view>
</view>
</view>
2025-06-26 09:45:07 +00:00
<view v-if="info.paymentStatus!=1" class="dt-item mt-30">
2025-06-26 00:27:26 +00:00
<view class="lb1">备注:</view>
<view >
<view v-if="info.blLockOnlinePay=='T'" style="display: inline-block;">
<u-text :text="`${info.lockOnlinePayReason}`" size="26" color="red" align="left"></u-text>
</view>
<view v-if="info.blLockOnlinePay!='T'" style="display: inline-block;">
<u-text :text="`账单支持在线支付,收款和开票:探路供应链(江苏)有限公司`" size="26" color="black" align="left"></u-text>
</view>
</view>
</view>
</view>
<view class="dt-body">
<u-text :text="'运单列表'" size="30" :bold="true"></u-text>
<u-line margin="20rpx 0 20rpx"></u-line>
<view v-for="(item) in info.subBillList" >
<!-- <view class="dt-item"> -->
<u-row justify="between" align="top">
<u-col span="6">
<u-text :text="`运单号:${item.billCode}`" size="26" :bold="true"
margin="14rpx 0 0 0"></u-text>
<!-- <view style="display: inline-flex;">
<u-text :text="`运单号:`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`${item.billCode}`" :bold="true" size="26"
margin="0rpx 0 0 0"></u-text>
</view> -->
<u-text :text="`发件人:${item.waybillDetail.sendName}`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`总运费:${item.waybillDetail.freight}CNY`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`实际重量:${item.waybillDetail.billWeight}KG`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`体积:${item.waybillDetail.totalVolume}m³`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`产品类型:${item.waybillDetail.productTypeName}`" size="26"
margin="14rpx 0 0 0"></u-text>
</u-col>
<u-col span="6">
<u-text :text="`寄件日期:${this.formatSendDay(item.waybillDetail.sendDate)}`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`快件类型:${item.waybillDetail.sendSiteName}--${item.waybillDetail.dispatchUnderlingSiteName}`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`件数:${item.waybillDetail.parcelQty}`" size="26"
margin="14rpx 0 0 0"></u-text>
2025-06-26 09:45:07 +00:00
<u-text :text="`结算重量:${item.waybillDetail.settlementWeight}KG`" size="26"
2025-06-26 00:27:26 +00:00
margin="14rpx 0 0 0"></u-text>
<u-text :text="`寄件公司:${item.waybillDetail.sendCompany}`" size="26"
margin="14rpx 0 0 0"></u-text>
</u-col>
</u-row>
<u-row justify="between" align="top">
<u-col span="12">
<u-text :text="`费用备注:${item.waybillDetail.feeRemark}`" size="26"
margin="14rpx 0 0 0"></u-text>
</u-col>
</u-row>
<!-- </view> -->
</view>
<tpx-empty v-if="!(info.subBillList && info.subBillList.length > 0)" size="sm"></tpx-empty>
</view>
</view>
</template>
2025-06-26 09:45:07 +00:00
<template #footer>
2025-06-26 00:27:26 +00:00
<view v-if="info.paymentStatus!=1&&info.blLockOnlinePay!='T'" class="blcok-white-noradius">
2025-06-29 01:25:27 +00:00
<u-button @click="shareToWeixin()" type="primary" size="large" shape="circle" open-type="share"
2025-06-26 00:27:26 +00:00
custom-style="height:80rpx;font-size: 30rpx;"
2025-06-26 09:45:07 +00:00
>分享给客户支付</u-button>
2025-06-26 00:27:26 +00:00
</view>
2025-06-26 09:45:07 +00:00
</template>
2025-06-26 00:27:26 +00:00
</tpx-layout>
</tpx-page>
</template>
<script>
import dayjs from "dayjs"
import * as apiService from "@/common/api"
import { checkParams } from "@/common/validate"
export default {
props: {
// hasLeftWin: {
// type: Boolean
// }
},
computed: {
dicData() {
return this.$store.getters.dicData
},
siteSearchParam() {
return {}
}
},
data() {
return {
queryOption: {
blNo: ''
},
info: {},
payQrImageUrl: '',
pageLoading: true,
}
},
onLoad(queryOption) {
this.queryOption = queryOption
this.initData();
},
onUnload() {
},
methods: {
getSendSiteList: apiService.getSendSiteList,
async initData() {
await this.getDetailData()
if(this.info.paymentStatus != 1) {
await this.getPayQrcode()
}
this.pageLoading = false
},
async getDetailData(){
let res = await apiService.getInfoBySettleBillNo({settleBillNo: this.queryOption.blNo, _loading: true })
this.info = res.data || {}
},
async getPayQrcode(){
// let res = await apiService.getWxPayQrCode({settleBillNo: this.queryOption.blNo, _loading: true })
// this.payQrImageUrl = res.data
},
2025-06-26 09:45:07 +00:00
shareToWeixin(){
this.shareTo('weixin', 'WXSceneSession')
},
shareTo(platform, scene = '') {
2025-06-29 01:25:27 +00:00
uni.share({
provider: platform,
scene: scene,
type: 0,
title: "请使用微信支付探路速运账单费用:"+this.queryOption.blNo,
summary: "请使用微信付款",
href: 'https://oms.tanex56.com/onlinePay?bid='+this.queryOption.blNo,
imageUrl: 'https://oms.tanex56.com/shorticon.png',
success: (res) => {
uni.showToast({
title: '分享成功',
icon: 'none'
})
},
fail: (err) => {
console.error('分享失败:', JSON.stringify(err))
uni.showToast({
title: '分享失败:'+JSON.stringify(err),
icon: 'none'
})
}
})
// var weixinShare = null;
// plus.share.getServices(function(services) {
// for (var i in services) {
// var service = services[i];
// // 获取微信分享对象
// if (service.id == 'weixin') {
// weixinShare = service;
// break;
// }
// }
// if(weixinShare==null){
// uni.showToast({
// title: '分享失败:获取微信分享服务失败',
// icon: 'none'
// })
// return;
// }
// weixinShare.send( {
// content: '我正在使用HBuilderX开发App,赶紧跟我一起来体验!'
// }, function(){
// // 分享成功
// }, function(err) {
// // 分享操作失败
// uni.showToast({
// title: '分享失败1:'+JSON.stringify(err),
// icon: 'none'
// })
// })
// }, function(err) {
// // 获取 services 失败
// uni.showToast({
// title: '分享失败2:'+JSON.stringify(err),
// icon: 'none'
// })
// })
2025-06-26 09:45:07 +00:00
},
2025-06-26 00:27:26 +00:00
formatSendDay(sendDate){
return dayjs(sendDate).format('YYYY-MM-DD');
},
}
}
</script>
<style lang="scss">
@import '@/common/uni-nvue.scss';
page {
background-color: #F6F6F6;
height: 100% !important;
}
</style>
<style scoped lang="scss">
.dt-head {
margin-top: 30rpx;
padding: 30rpx;
background-color: #FFF;
position: relative;
}
.dt-body{
margin-top: 30rpx;
padding: 30rpx;
background-color: #FFF;
position: relative;
}
.dt-item {
display: flex;
flex-direction: row;
margin-bottom: 20rpx;
.lb1 {
width: 160rpx;
font-size: 26rpx;
color: #000;
}
.lb2{
font-size: 26rpx;
font-weight: bold;
}
}
.zhfxin{
}
.yditem{
padding: 20rpx 20rpx;
background-color: #F6F6F6;
border-radius: 6rpx;
margin-bottom: 20rpx;
}
.ydi-lab{
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>