This commit is contained in:
aihe 2024-08-31 18:41:45 +08:00
parent 447de87a4d
commit d904711c02
6 changed files with 341 additions and 323 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, {})
}

View File

@ -2,6 +2,7 @@ import apiUrls, { host } from "./url"
export * from "./user"
export * from "./common"
export * from "./order"
export * from "./bill"
export {
apiUrls,

View File

@ -51,13 +51,14 @@ export default {
articleGiveLike: `/oms2c/emisArticle/giveLike`, // 文章点赞 -- DONE
getIdVerification: `/oms2c/emisCustomerUser/getIdVerification`, // 获取实名认证信息 -- DONE
idVerification: `/oms2c/emisCustomerUser/idVerification`, // 提交实名认证 -- DONE
getComplaintsList: `/oms2c/emisWaybillComplaints/listSimple`, // 投诉列表 -- DONE
addComplaints: `/oms2c/emisWaybillComplaints/addComplaints`, // 新增投诉 -- DONE
getComplainInfo: `/oms2c/emisWaybillComplaints/getInfoById`, // 投诉详情 -- DONE
scanCheckBillCode: `/oms2c/emisWaybill/scanCheckBillCode`, // 扫码下单寄件-checke -- DONE
queryBSettleillList: `/oms2c/emisSettleBill/listSimple`, // 账单列表 -- DONE
getInfoBySettleBillNo: `/oms2c/emisSettleBill/getInfoBySettleBillNo`, // 获取账单详情 -- DONE
getWxPayQrCode: `/oms2c/emisSettleBill/getWxPayQrCode`, // 获取微信支付二维码 -- DONE
sumbitWxPay: `/oms2c/emisSettleBill/sumbitWxPay`, // 账单-唤起微信立即支付 -- DONE
}

View File

@ -1,42 +1,49 @@
<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">{{'T7080123982301'}}</view>
<view class="lb2">{{info.settleBillNo}}</view>
</view>
<view class="dt-item">
<view class="lb1">出账日期</view>
<view class="lb2">{{'2023-11-20 13:28:56'}}</view>
<view class="lb2">{{info.settleStartDate}}</view>
</view>
<view class="dt-item">
<view class="lb1">总票数</view>
<view class="lb2">{{'1'}}</view>
<view class="lb2">{{'1TODO'}}</view>
</view>
<view class="dt-item">
<view class="lb1">总件数</view>
<view class="lb2">{{'20'}}</view>
<view class="lb2">{{'1TODO'}}</view>
</view>
<view class="dt-item">
<view class="lb1">总重量</view>
<view class="lb2">{{'120.00 kg'}}</view>
<view class="lb2">{{info.feeWeight}}</view>
</view>
<view class="dt-item">
<view class="lb1">应付金额</view>
<view class="lb2">{{'1225.00 CNY'}}</view>
<view class="lb2">{{info.recMoney}}</view>
</view>
<view class="dt-item">
<view class="lb1">已付金额</view>
<view class="lb2">{{'0.00 CNY'}}</view>
<view class="lb2">{{info.recedMoney}}</view>
</view>
<view class="dt-item">
<view class="lb1">开票状态</view>
<view class="lb2">{{'未开票'}}</view>
<view class="lb2">
<tetx v-if="info.openBillStatus == 0">未开票</tetx>
<tetx v-if="info.openBillStatus == 1">已开票</tetx>
<tetx v-if="info.openBillStatus == 2">部分开票</tetx>
</view>
</view>
<view class="dt-item mt-30">
<!-- <view class="dt-item mt-30">
<view class="lb1">收款账户</view>
<view class="lb2">
<u-row >
@ -47,8 +54,9 @@
</view>
</u-row>
</view>
</view>
<view class="dt-item mt-30">
</view> -->
<view v-if="info.paymentStatus!=1" class="dt-item mt-30">
<view class="lb1">支付金额</view>
<view class="zhfxin">
<view style="text-align: center;width: 300rpx;">
@ -86,11 +94,24 @@
</view>
</view>
</view>
</template>
<template #footer>
<view v-if="info.paymentStatus!=1" 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 getCdnUrl from "@/common/getCdnUrl"
import { goto, goBack, setClipboardData, confirmModal, showLoading } from "@/common/untool"
import * as apiService from "@/common/api"
import { checkParams } from "@/common/validate"
export default {
props: {
@ -99,33 +120,48 @@
// }
},
computed: {
dicData() {
return this.$store.getters.dicData
},
siteSearchParam() {
return {}
}
},
data() {
return {
ydList: [
{},{},{}
]
}
queryOption: {
blNo: ''
},
onShareAppMessage() {
return {
// title: '',
// path: 'TODO'
info: {},
pageLoading: true,
}
},
onLoad(queryOption) {
this.queryOption = queryOption
this.searchParam.tabType = queryOption.tab || tabList[0].val
this.initData();
},
onUnload() {
},
methods: {
getCdnUrl,
initData(){
// showLoading()
getSendSiteList: apiService.getSendSiteList,
async initData() {
await this.getDetailData()
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 })
},
async handleCallPay(){
let res = await apiService.sumbitWxPay({settleBillNo: this.queryOption.blNo, _loading: true })
console.log(res)
debugger
},
}
}
</script>

View File

@ -1,32 +1,33 @@
<template>
<tpx-page>
<tpx-layout>
<template v-slot:header>
<view class="customer_nav_bar">
<view class="com-jianju" >
<!-- 关键字搜索框 -->
<tpx-search placeholder="请输入运单号/订单号" v-model:value="searchParam.keyword" @change="handleSearchParamChange()" bgColor="#FFF" :timelyTrigger="false"></tpx-search>
<view class="pgb-header">
<view class="com-jianju" style="">
<tpx-search placeholder="请输入运单号/订单号" v-model:value="searchParam.searchValue" @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="9">
<!-- 订单状态 -->
<tpx-tabs :list="payStatusList" v-model:value="searchParam.payStatus"
@tabchange="(val)=> { handleSearchParamChange() }" v-slot="curOrdTab"
<tpx-tabs :list="dicData.emis_settlebill_status_tab" v-model:value="searchParam.params.queryType"
v-slot="curOrdTab"
>
<text slot>
(<text>{{curOrdTab.item.val}}</text>)
<!-- (<text>{{curOrdTab.item.val}}</text>) -->
</text>
</tpx-tabs>
</u-col>
<u-col span="2">
<u-col v-if="false" span="2">
<!-- 更多查询条件 -->
<u-button @click="handleSearchMoreBtn()" :hairline="false" shape="circle" size="mini" custom-style="border-radius: 23rpx;font-size: 26rpx;height: 50rpx;">
<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="showSearchMore?'arrow-up-fill':'arrow-down-fill'"
<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>
@ -36,25 +37,14 @@
</view>
<!-- 状态搜索 -->
<view v-if="showSearchMore" class="search-more-panel">
<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="0 0 20rpx 0"></u-text>
<tpx-tags :list="dlvTypeList" v-model:value="tmpSearchParam.postStatus" ></tpx-tags>
</view>
<view>
<u-text text="付款方式" size="28" :bold="true" margin="20rpx 0 20rpx 0"></u-text>
<tpx-tags :list="payTypeList" v-model:value="tmpSearchParam.payType" ></tpx-tags>
</view>
<view>
<u-text text="时间范围" size="28" :bold="true" margin="20rpx 0 20rpx 0"></u-text>
<tpx-tags type="single" :list="dateTypeList" v-model:value="tmpSearchParam.dateType" @onItemClick="handleCheckDate"></tpx-tags>
<tpx-tags v-if="tmpSearchParam.date" type='' :list="[{title: tmpSearchParam.date}]" @onItemClick="handleSwitchCladar()" mode="primary"></tpx-tags>
<tpx-date-input v-model:value="moreSearchModel.data._date" placeholder="请选择时间"></tpx-date-input>
</view>
</view>
</view>
@ -72,199 +62,162 @@
</template>
<template v-slot:body>
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom()" class="pos-abt-all"
<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="(orItem) in dataList" class="ord-list-item" >
<view v-for="(item) in resData.list" class="ord-list-item" >
<u-row justify="between">
<text>T7080123982307</text>
<text>{{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>
</view>
</u-row>
<view class="mt-10" @click="handleGoDetail(orItem)">
<view class="mt-10" @click="handleDealItem(item, { type: 1 })">
<u-row justify="between" align="top">
<u-col span="6">
<u-text :text="`总票数:${'1'}`" size="26"
<u-text :text="`总票数:${'1TODO'}`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`总重量:${'120'}`" size="26"
<u-text :text="`总重量:${item.feeWeight}`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`总件数:${'20'}`" size="26"
<u-text :text="`总件数:${'201TODO'}`" size="26"
margin="14rpx 0 0 0"></u-text>
</u-col>
<u-col span="6">
<u-text :text="`应付金额:${'80'}CNY`" size="26"
<u-text :text="`应付金额:${item.recMoney}CNY`" size="26"
margin="14rpx 0 0 0"></u-text>
<u-text :text="`已付金额:${'0'}CNY`" size="26"
<u-text :text="`已付金额:${item.recedMoney}CNY`" size="26"
margin="14rpx 0 0 0"></u-text>
</u-col>
</u-row>
</view>
<u-text :text="`账单时间:${'2023-11-20 13:28:56'}`" color="#999" size="26"
<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 shape="circle" type="primary" :plain="true"
@click="handleGoDetail(orItem)" custom-style="height: 54rpx;margin-left: 12rpx;">去付款</u-button>
<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>
<!-- 加载更多 -->
<u-loadmore icon-size="28" font-size="28" margin-top="30" v-if="showLoadMore || loadedAll"
:status="loadedAll ? 'nomore' : 'loading'" />
<!-- 空数据页 -->
<view v-if="dataList.length == 0" style="padding-top: 100rpx;">
<u-empty text="无数据" :icon="getCdnUrl('kong.png')" textSize="28" width="86" height="97">
</u-empty>
</view>
</tpx-scroll-view>
</view>
</scroll-view>
</template>
</tpx-layout>
<!-- 日历 -->
<!-- @close="handleSwitchCladar()" -->
<u-calendar title="请选择日期范围" color="#B12D29" mode="range" rowHeight="90" closeOnClickOverlay :show="showCladar" :defaultDate="tmpSearchParam.date.split('~')" @confirm="handleClaOk" @close="handleSwitchCladar"
></u-calendar>
</tpx-page>
</template>
<script>
import getCdnUrl from "@/common/getCdnUrl"
import { goto, setClipboardData, confirmModal, showLoading } from "@/common/untool"
import * as apiService from "@/common/api"
import { deepAssign } from "@/common/util"
export default {
props: {
// hasLeftWin: {
// type: Boolean
// }
},
computed: {
dicData() {
return this.$store.getters.dicData
},
hasExtSchParam() {
let hasExt = false
const searchParam = this.searchParam
if(
(searchParam.postStatus && searchParam.postStatus.length > 0)
|| (searchParam.payType && searchParam.payType.length > 0)
|| (searchParam.date || (searchParam.dateType && searchParam.dateType != dateTypeEnum.custom) )
this.searchParam._date.length > 0
) {
hasExt = true
}
return hasExt
},
},
components: { },
data() {
let { dicData } = this.$store.getters
return {
searchParam: {
keyword: '',
payStatus: payStatusList[0].val // 订单状态, 1:寄件; 2:收件; 3:待付款;
},
showSearchMore: false,
showCladar: false,
tmpSearchParam: {
moreSearchModel: {
data: {},
show: false
},
searchParam: {
searchValue: '',
_date: [],
params: {
queryType: dicData.emis_settlebill_status_tab?.[0]?.val,
}
},
queryOption: {
},
dataList: [
{}
,{},{},{},{},{},{},{}
],
showLoadMore: false,
loadedAll: false
resData: { list: [] }
}
},
onShareAppMessage() {
return {
// title: '',
// path: 'TODO'
}
},
onLoad() {
this.initTmpSrchParam()
this.initData();
onShow(){
this.triggerListReload()
this.initData()
},
onLoad(option) {
this.queryOption = option
},
onUnload() {
},
methods: {
getCdnUrl,
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(){
// showLoading()
setTimeout(() => {
uni.stopPullDownRefresh();
}, 300);
},
initTmpSrchParam(){
this.tmpSearchParam = {
postStatus: [], // 快递状态
payType: [], // 支付类型
dateType: '', // 日期类型
date: '' // 日期
}
},
loadListData() {
// 请求列表数据 TODO
console.log('====this.searchParam===', this.searchParam)
},
onScrollBottom() {
console.log("onScrollBottom");
if (this.loadedAll) {
return;
}
this.showLoadMore = true;
this.handleSearchParamChange();
},
handleSearchMoreBtn(){
if(!this.showLoadMore) {
// 回显更多条件
Object.keys(this.tmpSearchParam).map(t=> {
const val = this.searchParam[t]
typeof val != 'undefined' && (this.tmpSearchParam[t] = val)
})
async handleDealItem(item, deal = { type: '1' }) {
let itemQuery = `?blNo=${item.settleBillNo}`
switch (deal.type){
case 1: // 账单详情
this.goto(`bill/detail${itemQuery}`)
break;
default:
break;
}
this.showSearchMore = !this.showSearchMore
},
handleSearchParamChange(key, val) {
if(key) {
this.searchParam[key] = val
}
this.loadListData()
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(){
this.initTmpSrchParam()
let data = this.moreSearchModel.data
data._date = []
data.params.orderStatType = ''
data.params.paymentType = ''
},
handleConfirmTempSearch(){
Object.assign(this.searchParam, this.tmpSearchParam)
this.showSearchMore = false
this.handleSearchParamChange();
},
handleCheckDate(item) {
let newVal = item.val
if(newVal == dateTypeEnum.custom) {
this.handleSwitchCladar()
} else {
this.tmpSearchParam.date = ''
}
},
handleClaOk(res){
const ary = Object.values(res)
const val = [ary[0], ary[ary.length-1]].join("~")
this.handleSwitchCladar()
this.tmpSearchParam.date = val
},
handleSwitchCladar() {
this.showCladar = !this.showCladar
if(!this.showCladar) {
!this.tmpSearchParam.date && (this.tmpSearchParam.dateType = '')
}
},
handleGoDetail(item = {}) {
goto(`bill/detail?id=${item.id}`)
deepAssign(this.searchParam, this.moreSearchModel.data)
this.moreSearchModel.show = false
}
}
}
@ -286,7 +239,12 @@
.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;

View File

@ -72,7 +72,7 @@
},
// 基础表单数据
submitParam: {
idType: this.$store.getters.dicData?.emis_complaints_type?.[0]?.value,
idType: this.$store.getters.dicData?.emis_complaints_type?.[0]?.val,
},
submitValidConfig: {
billCode: { required: true, requiredMsg: '运单号不能为空' },