This commit is contained in:
linfso 2025-06-26 08:27:26 +08:00
parent 4620304d80
commit d0d778b28a
3 changed files with 626 additions and 0 deletions

22
common/api/bill.js Normal file
View File

@ -0,0 +1,22 @@
import { coreRequest } from '@/common/request'
import url, { host } from "./url"
// 账单列表
export const queryBSettleillList = (data = {})=> {
return coreRequest(url.queryBSettleillList, data, {}, 'get')
}
// 获取账单详情
export const getInfoBySettleBillNo = (data = {})=> {
return coreRequest(url.getInfoBySettleBillNo, data, {}, 'get')
}
// 获取微信支付二维码
export const getWxPayQrCode = (data = {})=> {
return coreRequest(url.getWxPayQrCode, data, {}, 'get')
}
// 账单-唤起微信立即支付
export const sumbitWxPay = (data = {})=> {
return coreRequest(url.sumbitWxPay, data, {})
}

310
pages/bill/detail.vue Normal file
View File

@ -0,0 +1,310 @@
<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>
<view class="dt-item mt-30">
<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>
<u-text :text="`结算重量:${item.waybillDetail.settlementWeight}`" size="26"
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>
<!-- <template #footer>
<view v-if="info.paymentStatus!=1&&info.blLockOnlinePay!='T'" class="blcok-white-noradius">
<u-button @click="handleCallPay()" type="primary" size="large" shape="circle"
custom-style="height:80rpx;font-size: 30rpx;"
>立即支付</u-button>
</view>
</template> -->
</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
},
async handleCallPay(){
let info = this.$store.getters.userInfo
// console.log('==>info.openId==>', info.openId);
let openId = info.openId;
let res = await apiService.sumbitWxPay({settleBillNo: this.queryOption.blNo,openId:openId,_loading: true })
// 调起微信支付
// console.log('==>res.data=>', res.data);
let weChatPayData = res.data;
// console.log('==>weChatPayData=>', weChatPayData);
uni.requestPayment({
provider: 'wxpay',
timeStamp: weChatPayData.timeStamp,
nonceStr: weChatPayData.nonceStr,
package: weChatPayData.package,
signType: weChatPayData.signType,
paySign: weChatPayData.paySign,
success: function(res) {
uni.showToast({
title: '支付成功',
icon: 'none'
});
// console.log('支付成功', res);
// 业务逻辑
},
fail: function(err) {
uni.showToast({
title: '支付失败:'+err,
icon: 'none'
});
// console.log('支付失败', err);
}
});
// console.log(res)
// debugger
},
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>

294
pages/bill/list.vue Normal file
View File

@ -0,0 +1,294 @@
<template>
<tpx-page>
<tpx-layout>
<template v-slot:header>
<view class="pgb-header">
<view class="com-jianju" style="">
<tpx-search placeholder="请输入运单号" v-model:value="searchParam.params.billCode" @change="handleSearch" bgColor="#FFF" :timelyTrigger="false"></tpx-search>
</view>
<view class="com-jianju" style="padding-top: 30rpx;">
<u-row justify="between" align="top">
<u-col span="12">
<!-- 订单状态 -->
<tpx-tabs :list="dicData.emis_settlebill_status_tab" v-model:value="searchParam.paymentStatus"
v-slot="curOrdTab"
>
<text slot>
<!-- (<text>{{curOrdTab.item.val}}</text>) -->
</text>
</tpx-tabs>
</u-col>
<u-col v-if="false" span="2">
<!-- 更多查询条件 -->
<u-button @click="handleDialogClick(moreSearchModel)" :hairline="false" shape="circle" size="mini" custom-style="border-radius: 23rpx;font-size: 26rpx;height: 50rpx;">
<u-row justify="center">
<view :style="'padding-right: 4rpx;white-space: nowrap;' + (hasExtSchParam?'color: #B12D29;':'color: #666;')">
{{hasExtSchParam?'已':''}}筛选
</view>
<u-icon :name="moreSearchModel.show?'arrow-up-fill':'arrow-down-fill'"
:color="(hasExtSchParam?'#B12D29':'#666')" size="18" custom-style="margin-top: 2rpx;"
></u-icon>
</u-row>
</u-button>
</u-col>
</u-row>
</view>
<!-- 状态搜索 -->
<view v-if="moreSearchModel.show" class="search-more-panel">
<view class="smp-body slideInDown animated fast">
<view class="smp-content">
<view class="pos-abt-all" style="overflow-y: auto;">
<view style="padding: 0 0 30rpx 0">
<view>
<u-text text="时间范围" size="28" :bold="true" margin="20rpx 0 20rpx 0"></u-text>
<tpx-date-input v-model:value="moreSearchModel.data._date" placeholder="请选择时间"></tpx-date-input>
</view>
</view>
</view>
</view>
<view class="smp-foot">
<u-row gutter="20" justify="between">
<u-button @click="handleResetTempSearch()" shape="circle">重置</u-button>
<view style="width: 40rpx;"></view>
<u-button @click="handleConfirmTempSearch()" shape="circle" type="primary">确认</u-button>
</u-row>
</view>
</view>
</view>
</view>
</template>
<template v-slot:body>
<view class="pos-abt-all">
<tpx-scroll-view v-model:resObject="resData" :searchParam="searchParam" :getListFun="getListFun"
ref="listRef"
>
<view class="pgb-cont">
<!-- 列表数据 -->
<view v-for="(item) in resData.list" class="ord-list-item" >
<u-row justify="between">
<text style="font-weight: bold;">账单号:{{item.settleBillNo}}</text>
<!-- <view class="com-tag-grey font-26">
<tetx v-if="item.openBillStatus == '0'">未开票</tetx>
<tetx v-if="item.openBillStatus == '1'">已开票</tetx>
<tetx v-if="item.openBillStatus == '2'">部分开票</tetx>
<tetx v-if="item.openBillStatus == '3'">不开票</tetx>
</view> -->
</u-row>
<view class="mt-10" @click="handleDealItem(item, { type: 1 })">
<u-row justify="between" align="top">
<u-col span="6">
<u-text :text="`账单月份:${item.billMonth}`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`总票数:${item.sendPieceSum}`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`总件数:${item.pieceNumber}`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`结算重量:${item.feeWeight} KG`" size="26"
margin="14rpx 0 0 0"></u-text>
<view >
<u-text v-if="item.openBillStatus == '0'" :text="`开票状态:未开票`" size="26"margin="14rpx 0 0 0"></u-text>
<u-text v-if="item.openBillStatus == '1'" :text="`开票状态:已开票`" size="26"margin="14rpx 0 0 0"></u-text>
<u-text v-if="item.openBillStatus == '2'" :text="`开票状态:部分开票`" size="26"margin="14rpx 0 0 0"></u-text>
<u-text v-if="item.openBillStatus == '3'" :text="`开票状态:不开票`" size="26"margin="14rpx 0 0 0"></u-text>
</view>
</u-col>
<u-col span="6">
<u-text :text="`总费用:${item.recMoney}CNY`" size="26"margin="14rpx 0 0 0"></u-text>
<u-text :text="`已付费用:${item.recedMoney}CNY`" size="26"margin="14rpx 0 0 0"></u-text>
<u-text :text="`待支付:${(item.recMoney-item.recedMoney).toFixed(2)}CNY`" size="26"margin="14rpx 0 0 0"></u-text>
<view >
<u-text v-if="item.paymentStatus == '0'" :text="`付款状态:未付款`" size="26"margin="14rpx 0 0 0"></u-text>
<u-text v-if="item.paymentStatus == '1'" :text="`付款状态:已付款`" size="26"margin="14rpx 0 0 0"></u-text>
<u-text v-if="item.paymentStatus == '2'" :text="`付款状态:部分付款`" size="26"margin="14rpx 0 0 0"></u-text>
</view>
</u-col>
</u-row>
</view>
<u-text :text="`账单时间:${item.settleStartDate}`" color="#999" size="26"
margin="30rpx 0 0 0"></u-text>
<u-line color="#DEDEDE" margin="30rpx 0 0 0"></u-line>
<u-row justify="end" custom-style="margin-top:20rpx;">
<view style="display: inline-block;">
<u-row>
<u-button v-if="item.paymentStatus!=1" shape="circle" type="primary" :plain="true"
@click="handleDealItem(item, { type: 1 })" custom-style="height: 54rpx;margin-left: 12rpx;">去付款</u-button>
</u-row>
</view>
</u-row>
</view>
</view>
</tpx-scroll-view>
</view>
</template>
</tpx-layout>
</tpx-page>
</template>
<script>
import * as apiService from "@/common/api"
import { deepAssign } from "@/common/util"
export default {
props: {
},
computed: {
dicData() {
return this.$store.getters.dicData
},
hasExtSchParam() {
let hasExt = false
if(
this.searchParam._date.length > 0
) {
hasExt = true
}
return hasExt
},
},
components: { },
data() {
let { dicData } = this.$store.getters
return {
showCladar: false,
moreSearchModel: {
data: {},
show: false
},
searchParam: {
searchValue: '',
_date: [],
paymentStatus: '',
params: {
billCode:null
}
},
queryOption: {
},
resData: { list: [] }
}
},
onShareAppMessage() {
},
onShow(){
this.triggerListReload()
this.initData()
},
onLoad(option) {
this.queryOption = option
},
onUnload() {
},
methods: {
transSearchPm(param){
let cpParam = JSON.parse(JSON.stringify(param))
cpParam.params.beginDate = cpParam?._date?.[0]
cpParam.params.endDate = cpParam?._date?.[1]
return cpParam
},
async getListFun(param){
let cpParam = this.transSearchPm(param)
let res = await apiService.queryBSettleillList(cpParam)
return res
},
initData(){
},
async handleDealItem(item, deal = { type: '1' }) {
let itemQuery = `?blNo=${item.settleBillNo}`
switch (deal.type){
case 1: // 账单详情
this.goto(`bill/detail${itemQuery}`)
break;
default:
break;
}
},
handleSearch(){
setTimeout(()=> {
this.triggerListReload()
}, 300)
},
triggerListReload(){
this?.$refs?.listRef?.getDataList?.(true) // 重置到第一页数据
},
handleDialogClick(curModal){
this.moreSearchModel.data = JSON.parse(JSON.stringify(this.searchParam))
this.moreSearchModel.show = !this.moreSearchModel.show
},
handleResetTempSearch(){
let data = this.moreSearchModel.data
data._date = []
data.params.orderStatType = ''
data.params.paymentType = ''
},
handleConfirmTempSearch(){
deepAssign(this.searchParam, this.moreSearchModel.data)
this.moreSearchModel.show = false
}
}
}
</script>
<style lang="scss">
@import '@/common/uni-nvue.scss';
page {
background-color: #F6F6F6;
height: 100% !important;
}
.customer_nav_bar {
padding-top: 30rpx;
background-color: #FFF;
position: relative;
}
</style>
<style scoped lang="scss">
.pgb-cont{
padding: 30rpx;
}
.pgb-header {
// padding-top: --status-bar-height;
padding-top: 30rpx;
background-color: #FFF;
position: relative;
}
.ord-list-item{
box-shadow: 0rpx 3rpx 12rpx 0rpx rgba(139,139,139,0.06);
border-radius: 20rpx;
padding: 22rpx 30rpx;
background-color: #fff;
margin-bottom: 30rpx;
}
.search-more-panel{
overflow: hidden;
position: absolute;
left: 0;
right: 0;
height: calc(70vh);
z-index: 200;
}
.smp-body{
padding: 30rpx;
display: flex;
flex-direction: column;
height: 100%;
background-color: #FFF;
border-radius: 0 0 30rpx 30rpx;
box-sizing: border-box;
}
.smp-content{
flex: 1;
position: relative;
}
</style>