浏览代码

欠费补缴

修改样式逻辑
yangteng 3 个月前
父节点
当前提交
3f13a0ae68
共有 2 个文件被更改,包括 44 次插入38 次删除
  1. 20
    11
      subpackage/after-sale/arrears/arrears-details.vue
  2. 24
    27
      subpackage/after-sale/arrears/arrears.vue

+ 20
- 11
subpackage/after-sale/arrears/arrears-details.vue 查看文件

<view class="cell"> <view class="cell">
<view class="cell-left"> <view class="cell-left">
<image :src="`${$imgUrl}arrears.png`" mode=""></image> <image :src="`${$imgUrl}arrears.png`" mode=""></image>
<text class="plate">{{state.details['vehicleId']}}</text>
<text class="plate">{{state.details['vehiclePlate']}}</text>
</view> </view>
<view class="cell-right money">¥{{state.details['reimburseFee']/100}}</view>
<view class="cell-right money">¥{{state.details['fee']/100}}</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="cell-left">用户姓名:</view> <view class="cell-left">用户姓名:</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="cell-left">补缴状态:</view> <view class="cell-left">补缴状态:</view>
<view class="cell-right">已完成</view>
<view class="cell-right">{{state.details['reimburseStatusStr']}}</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="cell-left">支付单号:</view> <view class="cell-left">支付单号:</view>
<view class="cell-right">{{state.details['orderId']}}</view>
<view class="cell-right">{{state.details['payOrderId']}}</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="cell-left">流水编号:</view> <view class="cell-left">流水编号:</view>
<view class="cell-right">{{state.details['userName']}}</view>
<view class="cell-right">{{state.details['listNo']}}</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="cell-left">入站名称</view> <view class="cell-left">入站名称</view>
<view class="cell-right">{{state.details['userName']}}</view>
<view class="cell-right">{{state.details['enStationName']}}</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="cell-left">入站时间</view> <view class="cell-left">入站时间</view>
<view class="cell-right">2023-03-29 14:38:09</view>
<view class="cell-right">{{state.details['enTime']}}</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="cell-left">出站名称</view> <view class="cell-left">出站名称</view>
<view class="cell-right">贵阳西站</view>
<view class="cell-right">{{state.details['exStationName']}}</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="cell-left">出站时间</view> <view class="cell-left">出站时间</view>
<view class="cell-right">2023-03-29 17:56:16</view>
<view class="cell-right">{{state.details['exTime']}}</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="cell-left">通行金额</view> <view class="cell-left">通行金额</view>
<view class="cell-right">¥130.00</view>
<view class="cell-right">¥{{state.details['fee']/100}}</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="cell-left">补缴金额</view> <view class="cell-left">补缴金额</view>
<view class="cell-right">¥130.00</view>
<view class="cell-right">¥{{state.details['reimburseFee']/100}}</view>
</view> </view>
</view> </view>
</view> </view>
requestNew(reimburseView, options).then((res) => { requestNew(reimburseView, options).then((res) => {
console.log("res",res.order); console.log("res",res.order);
state.details=res.order state.details=res.order
state.details['vehiclePlate']=state.details['vehicleId'].split("_")[0]
if(state.details['reimburseStatus']==0){
state.details['reimburseStatusStr']='未补缴'
}else if(state.details['reimburseStatus']==1){
state.details['reimburseStatusStr']='已补缴'
}else if(state.details['reimburseStatus']==2){
state.details['reimburseStatusStr']='已关闭'
}
}); });
} }
</script> </script>

+ 24
- 27
subpackage/after-sale/arrears/arrears.vue 查看文件

</view> </view>
</view> </view>
<view class="content"> <view class="content">
<view class="list" v-for="(item,index) in state.list" @click="details(item.id)">
<view class="list" v-for="(item,index) in state.list" @click="state.reimburseStatus=='1'?details(item.id):''">
<checkbox-group @change="checkboxGroupChange(item)"> <checkbox-group @change="checkboxGroupChange(item)">
<label class="uni-list-cell uni-list-cell-pd" style="display: flex;"> <label class="uni-list-cell uni-list-cell-pd" style="display: flex;">
<checkbox :checked="item.checked" style="transform:scale(0.8);top: -12rpx;position: relative;" v-if="state.reimburseStatus=='0'"/> <checkbox :checked="item.checked" style="transform:scale(0.8);top: -12rpx;position: relative;" v-if="state.reimburseStatus=='0'"/>
onPullDownRefresh onPullDownRefresh
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
import {requestNew} from "@/utils/network/request.js"; import {requestNew} from "@/utils/network/request.js";
import {
reimbursePage,reimburseUserPay
} from "@/utils/network/api.js";
import {reimbursePage,reimburseUserPay} from "@/utils/network/api.js";
import {navTo} from '@/utils/utils'; import {navTo} from '@/utils/utils';
const allPrice = ref(0) const allPrice = ref(0)
const state = reactive({ const state = reactive({
getlist(state.reimburseStatus) getlist(state.reimburseStatus)
}) })
const checkboxGroupChange = (e) => { const checkboxGroupChange = (e) => {
console.log(e);
if(state.suppleNoList.length==0){
state.suppleNoList.push(e)
}else{
for(var k=0;k<state.suppleNoList.length;k++){
if(e.orderId==state.suppleNoList[k]['orderId']){
state.suppleNoList.splice(k,1)
}
console.log(e,state.list);
for(var k=0;k<state.list.length;k++){
if (state.list[k]['orderId']==e.orderId) {
state.list[k]['checked'] = !state.list[k]['checked']
} }
} }
// 过滤数据 // 过滤数据
let arr = [] let arr = []
allPrice.value = 0 allPrice.value = 0
state.suppleNoList.forEach((item, i) => {
state.list.forEach((val, index) => {
console.log("state.suppleNoList",state.suppleNoList,state.list,item.orderId,val.orderId)
if (item.orderId == val.orderId) {
arr.push(val.reimburseFee)
}
})
state.list.forEach((val, index) => {
if (val.checked) {
arr.push(val.reimburseFee)
}
}) })
console.log("arr",arr) console.log("arr",arr)
// 计算价格 // 计算价格
allPrice.value += item allPrice.value += item
}) })
// 全选 // 全选
if(state.suppleNoList.length==state.list.length){
if(arr.length==state.list.length){
state.checkedAll=true state.checkedAll=true
}else{ }else{
state.checkedAll=false state.checkedAll=false
} }
console.log(state.suppleNoList, "支付集合",allPrice.value);
console.log(arr, "支付集合",allPrice.value);
} }
const checkboxChangeAll = (e) => { const checkboxChangeAll = (e) => {
console.log(e); console.log(e);
if (e.detail.value.toString() == 'ALL') { if (e.detail.value.toString() == 'ALL') {
for (var i = 0; i < state.list.length; i++) { for (var i = 0; i < state.list.length; i++) {
state.suppleNoList.push(state.list[i])
state.checkedAll = true state.checkedAll = true
state.list[i].checked = true state.list[i].checked = true
allPrice.value+=state.list[i].reimburseFee
} }
} else { } else {
state.suppleNoList = []
for (var i = 0; i < state.list.length; i++) { for (var i = 0; i < state.list.length; i++) {
state.list[i].checked = false state.list[i].checked = false
} }
showLoading: true, showLoading: true,
}; };
requestNew(reimbursePage, options).then((res) => { requestNew(reimbursePage, options).then((res) => {
console.log("state.list",state.list);
let data=res.result let data=res.result
for(var i=0;i<data.length;i++){ for(var i=0;i<data.length;i++){
data[i]['vehiclePlate']=data[i]['vehicleId'].split("_")[0] data[i]['vehiclePlate']=data[i]['vehicleId'].split("_")[0]
data[i]['checked']=false data[i]['checked']=false
} }
state.list =data state.list =data
console.log("state.list",state.list);
}); });
} }
const pay=()=>{ const pay=()=>{
console.log(allPrice.value, "支付金额"); console.log(allPrice.value, "支付金额");
// 选中得orderid
let orderIds=[]
for (var i = 0; i < state.list.length; i++) {
if(state.list[i].checked){
orderIds.push(state.list[i].orderId)
}
}
const options = { const options = {
type: 2, type: 2,
data: { data: {
orderIds:state.reimburseStatus,//补缴单状态
reimburseFee:state.pageNo,
spbillCreateIp:state.pageSize
orderIds:orderIds,//补缴申请单id
reimburseFee:allPrice.value,//交易金额
}, },
method: "POST", method: "POST",
showLoading: true, showLoading: true,

正在加载...
取消
保存