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 "./user"
export * from "./common" export * from "./common"
export * from "./order" export * from "./order"
export * from "./bill"
export { export {
apiUrls, apiUrls,

View File

@ -51,13 +51,14 @@ export default {
articleGiveLike: `/oms2c/emisArticle/giveLike`, // 文章点赞 -- DONE articleGiveLike: `/oms2c/emisArticle/giveLike`, // 文章点赞 -- DONE
getIdVerification: `/oms2c/emisCustomerUser/getIdVerification`, // 获取实名认证信息 -- DONE getIdVerification: `/oms2c/emisCustomerUser/getIdVerification`, // 获取实名认证信息 -- DONE
idVerification: `/oms2c/emisCustomerUser/idVerification`, // 提交实名认证 -- DONE idVerification: `/oms2c/emisCustomerUser/idVerification`, // 提交实名认证 -- DONE
getComplaintsList: `/oms2c/emisWaybillComplaints/listSimple`, // 投诉列表 -- DONE getComplaintsList: `/oms2c/emisWaybillComplaints/listSimple`, // 投诉列表 -- DONE
addComplaints: `/oms2c/emisWaybillComplaints/addComplaints`, // 新增投诉 -- DONE addComplaints: `/oms2c/emisWaybillComplaints/addComplaints`, // 新增投诉 -- DONE
getComplainInfo: `/oms2c/emisWaybillComplaints/getInfoById`, // 投诉详情 -- DONE getComplainInfo: `/oms2c/emisWaybillComplaints/getInfoById`, // 投诉详情 -- DONE
scanCheckBillCode: `/oms2c/emisWaybill/scanCheckBillCode`, // 扫码下单寄件-checke -- 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> <template>
<tpx-page>
<tpx-layout>
<template #body>
<view> <view>
<view class="dt-head"> <view class="dt-head">
<u-text :text="'账单信息'" size="30" :bold="true"></u-text> <u-text :text="'账单信息'" size="30" :bold="true"></u-text>
<u-line margin="20rpx 0 20rpx"></u-line> <u-line margin="20rpx 0 20rpx"></u-line>
<view class="dt-item"> <view class="dt-item">
<view class="lb1">账单编号</view> <view class="lb1">账单编号</view>
<view class="lb2">{{'T7080123982301'}}</view> <view class="lb2">{{info.settleBillNo}}</view>
</view> </view>
<view class="dt-item"> <view class="dt-item">
<view class="lb1">出账日期</view> <view class="lb1">出账日期</view>
<view class="lb2">{{'2023-11-20 13:28:56'}}</view> <view class="lb2">{{info.settleStartDate}}</view>
</view> </view>
<view class="dt-item"> <view class="dt-item">
<view class="lb1">总票数</view> <view class="lb1">总票数</view>
<view class="lb2">{{'1'}}</view> <view class="lb2">{{'1TODO'}}</view>
</view> </view>
<view class="dt-item"> <view class="dt-item">
<view class="lb1">总件数</view> <view class="lb1">总件数</view>
<view class="lb2">{{'20'}}</view> <view class="lb2">{{'1TODO'}}</view>
</view> </view>
<view class="dt-item"> <view class="dt-item">
<view class="lb1">总重量</view> <view class="lb1">总重量</view>
<view class="lb2">{{'120.00 kg'}}</view> <view class="lb2">{{info.feeWeight}}</view>
</view> </view>
<view class="dt-item"> <view class="dt-item">
<view class="lb1">应付金额</view> <view class="lb1">应付金额</view>
<view class="lb2">{{'1225.00 CNY'}}</view> <view class="lb2">{{info.recMoney}}</view>
</view> </view>
<view class="dt-item"> <view class="dt-item">
<view class="lb1">已付金额</view> <view class="lb1">已付金额</view>
<view class="lb2">{{'0.00 CNY'}}</view> <view class="lb2">{{info.recedMoney}}</view>
</view> </view>
<view class="dt-item"> <view class="dt-item">
<view class="lb1">开票状态</view> <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>
<view class="dt-item mt-30"> <!-- <view class="dt-item mt-30">
<view class="lb1">收款账户</view> <view class="lb1">收款账户</view>
<view class="lb2"> <view class="lb2">
<u-row > <u-row >
@ -47,8 +54,9 @@
</view> </view>
</u-row> </u-row>
</view> </view>
</view> </view> -->
<view class="dt-item mt-30">
<view v-if="info.paymentStatus!=1" class="dt-item mt-30">
<view class="lb1">支付金额</view> <view class="lb1">支付金额</view>
<view class="zhfxin"> <view class="zhfxin">
<view style="text-align: center;width: 300rpx;"> <view style="text-align: center;width: 300rpx;">
@ -88,9 +96,22 @@
</view> </view>
</template> </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> <script>
import getCdnUrl from "@/common/getCdnUrl" import * as apiService from "@/common/api"
import { goto, goBack, setClipboardData, confirmModal, showLoading } from "@/common/untool" import { checkParams } from "@/common/validate"
export default { export default {
props: { props: {
@ -99,33 +120,48 @@
// } // }
}, },
computed: { computed: {
dicData() {
return this.$store.getters.dicData
},
siteSearchParam() {
return {}
}
}, },
data() { data() {
return { return {
ydList: [ queryOption: {
{},{},{} blNo: ''
]
}
}, },
onShareAppMessage() { info: {},
return { pageLoading: true,
// title: '',
// path: 'TODO'
} }
}, },
onLoad(queryOption) { onLoad(queryOption) {
this.queryOption = queryOption this.queryOption = queryOption
this.searchParam.tabType = queryOption.tab || tabList[0].val
this.initData(); this.initData();
}, },
onUnload() { onUnload() {
}, },
methods: { methods: {
getCdnUrl, getSendSiteList: apiService.getSendSiteList,
initData(){ async initData() {
// showLoading() 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> </script>

View File

@ -1,32 +1,33 @@
<template> <template>
<tpx-page>
<tpx-layout> <tpx-layout>
<template v-slot:header> <template v-slot:header>
<view class="customer_nav_bar"> <view class="pgb-header">
<view class="com-jianju" >
<!-- 关键字搜索框 --> <view class="com-jianju" style="">
<tpx-search placeholder="请输入运单号/订单号" v-model:value="searchParam.keyword" @change="handleSearchParamChange()" bgColor="#FFF" :timelyTrigger="false"></tpx-search> <tpx-search placeholder="请输入运单号/订单号" v-model:value="searchParam.searchValue" @change="handleSearch" bgColor="#FFF" :timelyTrigger="false"></tpx-search>
</view> </view>
<view class="com-jianju" style="padding-top: 30rpx;"> <view class="com-jianju" style="padding-top: 30rpx;">
<u-row justify="between" align="top"> <u-row justify="between" align="top">
<u-col span="9"> <u-col span="9">
<!-- 订单状态 --> <!-- 订单状态 -->
<tpx-tabs :list="payStatusList" v-model:value="searchParam.payStatus" <tpx-tabs :list="dicData.emis_settlebill_status_tab" v-model:value="searchParam.params.queryType"
@tabchange="(val)=> { handleSearchParamChange() }" v-slot="curOrdTab" v-slot="curOrdTab"
> >
<text slot> <text slot>
(<text>{{curOrdTab.item.val}}</text>) <!-- (<text>{{curOrdTab.item.val}}</text>) -->
</text> </text>
</tpx-tabs> </tpx-tabs>
</u-col> </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"> <u-row justify="center">
<view :style="'padding-right: 4rpx;white-space: nowrap;' + (hasExtSchParam?'color: #B12D29;':'color: #666;')"> <view :style="'padding-right: 4rpx;white-space: nowrap;' + (hasExtSchParam?'color: #B12D29;':'color: #666;')">
{{hasExtSchParam?'已':''}}筛选 {{hasExtSchParam?'已':''}}筛选
</view> </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;" :color="(hasExtSchParam?'#B12D29':'#666')" size="18" custom-style="margin-top: 2rpx;"
></u-icon> ></u-icon>
</u-row> </u-row>
@ -36,25 +37,14 @@
</view> </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-body slideInDown animated fast">
<view class="smp-content"> <view class="smp-content">
<view class="pos-abt-all" style="overflow-y: auto;"> <view class="pos-abt-all" style="overflow-y: auto;">
<view style="padding: 0 0 30rpx 0"> <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> <view>
<u-text text="时间范围" size="28" :bold="true" margin="20rpx 0 20rpx 0"></u-text> <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-date-input v-model:value="moreSearchModel.data._date" placeholder="请选择时间"></tpx-date-input>
<tpx-tags v-if="tmpSearchParam.date" type='' :list="[{title: tmpSearchParam.date}]" @onItemClick="handleSwitchCladar()" mode="primary"></tpx-tags>
</view> </view>
</view> </view>
</view> </view>
@ -72,199 +62,162 @@
</template> </template>
<template v-slot:body> <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 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"> <u-row justify="between">
<text>T7080123982307</text> <text>{{item.settleBillNo}}</text>
<view class="com-tag-grey font-26"> <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> </view>
</u-row> </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-row justify="between" align="top">
<u-col span="6"> <u-col span="6">
<u-text :text="`总票数:${'1'}`" size="26" <u-text :text="`总票数:${'1TODO'}`" size="26"
margin="14rpx 0 0 0"></u-text> 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> 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> margin="14rpx 0 0 0"></u-text>
</u-col> </u-col>
<u-col span="6"> <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> 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> margin="14rpx 0 0 0"></u-text>
</u-col> </u-col>
</u-row> </u-row>
</view> </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> margin="30rpx 0 0 0"></u-text>
<u-line color="#DEDEDE" margin="30rpx 0 0 0"></u-line> <u-line color="#DEDEDE" margin="30rpx 0 0 0"></u-line>
<u-row justify="end" custom-style="margin-top:20rpx;"> <u-row justify="end" custom-style="margin-top:20rpx;">
<view style="display: inline-block;"> <view style="display: inline-block;">
<u-row> <u-row>
<u-button shape="circle" type="primary" :plain="true" <u-button v-if="item.paymentStatus!=1" shape="circle" type="primary" :plain="true"
@click="handleGoDetail(orItem)" custom-style="height: 54rpx;margin-left: 12rpx;">去付款</u-button> @click="handleDealItem(item, { type: 1 })" custom-style="height: 54rpx;margin-left: 12rpx;">去付款</u-button>
</u-row> </u-row>
</view> </view>
</u-row> </u-row>
</view> </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> </view>
</tpx-scroll-view>
</view> </view>
</scroll-view>
</template> </template>
</tpx-layout> </tpx-layout>
<!-- 日历 --> </tpx-page>
<!-- @close="handleSwitchCladar()" -->
<u-calendar title="请选择日期范围" color="#B12D29" mode="range" rowHeight="90" closeOnClickOverlay :show="showCladar" :defaultDate="tmpSearchParam.date.split('~')" @confirm="handleClaOk" @close="handleSwitchCladar"
></u-calendar>
</template> </template>
<script> <script>
import getCdnUrl from "@/common/getCdnUrl" import * as apiService from "@/common/api"
import { goto, setClipboardData, confirmModal, showLoading } from "@/common/untool" import { deepAssign } from "@/common/util"
export default { export default {
props: { props: {
// hasLeftWin: {
// type: Boolean
// }
}, },
computed: { computed: {
dicData() {
return this.$store.getters.dicData
},
hasExtSchParam() { hasExtSchParam() {
let hasExt = false let hasExt = false
const searchParam = this.searchParam
if( if(
(searchParam.postStatus && searchParam.postStatus.length > 0) this.searchParam._date.length > 0
|| (searchParam.payType && searchParam.payType.length > 0)
|| (searchParam.date || (searchParam.dateType && searchParam.dateType != dateTypeEnum.custom) )
) { ) {
hasExt = true hasExt = true
} }
return hasExt return hasExt
}, },
}, },
components: { },
data() { data() {
let { dicData } = this.$store.getters
return { return {
searchParam: {
keyword: '',
payStatus: payStatusList[0].val // 订单状态, 1:寄件; 2:收件; 3:待付款;
},
showSearchMore: false,
showCladar: false, showCladar: false,
tmpSearchParam: { moreSearchModel: {
data: {},
show: false
},
searchParam: {
searchValue: '',
_date: [],
params: {
queryType: dicData.emis_settlebill_status_tab?.[0]?.val,
}
},
queryOption: {
}, },
dataList: [ resData: { list: [] }
{}
,{},{},{},{},{},{},{}
],
showLoadMore: false,
loadedAll: false
} }
}, },
onShareAppMessage() { onShareAppMessage() {
return {
// title: '',
// path: 'TODO'
}
}, },
onLoad() { onShow(){
this.initTmpSrchParam() this.triggerListReload()
this.initData(); this.initData()
},
onLoad(option) {
this.queryOption = option
}, },
onUnload() { onUnload() {
}, },
methods: { 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(){ initData(){
// showLoading()
},
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(()=> { setTimeout(()=> {
uni.stopPullDownRefresh(); this.triggerListReload()
}, 300); }, 300)
}, },
initTmpSrchParam(){ triggerListReload(){
this.tmpSearchParam = { this?.$refs?.listRef?.getDataList?.(true) // 重置到第一页数据
postStatus: [], // 快递状态
payType: [], // 支付类型
dateType: '', // 日期类型
date: '' // 日期
}
}, },
loadListData() { handleDialogClick(curModal){
// 请求列表数据 TODO this.moreSearchModel.data = JSON.parse(JSON.stringify(this.searchParam))
console.log('====this.searchParam===', this.searchParam) this.moreSearchModel.show = !this.moreSearchModel.show
}, },
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)
})
}
this.showSearchMore = !this.showSearchMore
},
handleSearchParamChange(key, val) {
if(key) {
this.searchParam[key] = val
}
this.loadListData()
},
handleResetTempSearch(){ handleResetTempSearch(){
this.initTmpSrchParam() let data = this.moreSearchModel.data
data._date = []
data.params.orderStatType = ''
data.params.paymentType = ''
}, },
handleConfirmTempSearch(){ handleConfirmTempSearch(){
Object.assign(this.searchParam, this.tmpSearchParam) deepAssign(this.searchParam, this.moreSearchModel.data)
this.showSearchMore = false this.moreSearchModel.show = 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}`)
} }
} }
} }
@ -286,7 +239,12 @@
.pgb-cont{ .pgb-cont{
padding: 30rpx; padding: 30rpx;
} }
.pgb-header {
// padding-top: --status-bar-height;
padding-top: 30rpx;
background-color: #FFF;
position: relative;
}
.ord-list-item{ .ord-list-item{
box-shadow: 0rpx 3rpx 12rpx 0rpx rgba(139,139,139,0.06); box-shadow: 0rpx 3rpx 12rpx 0rpx rgba(139,139,139,0.06);
border-radius: 20rpx; border-radius: 20rpx;

View File

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