|
|
@@ -3,10 +3,10 @@
|
|
|
<view class="top-view">
|
|
|
<view class="top-row">
|
|
|
<view class="info-item">
|
|
|
- <text class="name">客户:</text>
|
|
|
<image class="logo" :src="customInfo.smallAvatar"/>
|
|
|
<text class="name">{{ customInfo.name || "" }}</text>
|
|
|
</view>
|
|
|
+ <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view scroll-y class="shop-list">
|
|
|
@@ -27,22 +27,15 @@
|
|
|
<view class="bar-view">
|
|
|
<template>
|
|
|
<view class="info-view">
|
|
|
- <view
|
|
|
- class="details-select"
|
|
|
- @click="allCheck"
|
|
|
- >
|
|
|
- <text
|
|
|
- class="iconfont iconxuanzhong"
|
|
|
- v-if="isAllCheck"
|
|
|
- > </text>
|
|
|
- <text
|
|
|
- class="iconfont iconweixuanzhong"
|
|
|
- v-else
|
|
|
- > </text>
|
|
|
- </view>
|
|
|
- 已选 <text class="price">{{ selectList.length }}</text> 笔,
|
|
|
+ <view class="details-select" @click="checkFn()" >
|
|
|
+
|
|
|
+ <button class="admin-button-com blue mini-btn" v-if="isAllCheck">全不选</button>
|
|
|
+ <button class="admin-button-com blue mini-btn" v-else>全选</button>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ 已选 <text class="price">{{ selectList.length }}</text> 笔
|
|
|
<text class="unit">¥</text>
|
|
|
- <text class="price">{{ selectTotalAmount }}</text>
|
|
|
+ <text class="price">{{ parseFloat(selectTotalAmount) }}</text>
|
|
|
</view>
|
|
|
</template>
|
|
|
<view class="btn-view">
|
|
|
@@ -70,11 +63,11 @@
|
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import DetailsItem from "./detailsItem";
|
|
|
-import { getOrderDebtListApi,clearOrderApi } from "@/api/arrears/index";
|
|
|
+import { getDebtOrderList,clearOrderApi } from "@/api/arrears/index";
|
|
|
+import DateSelect from "@/components/module/dateSelect";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
-
|
|
|
export default {
|
|
|
- components: { AppWrapperEmpty, ModalModule,DetailsItem },
|
|
|
+ components: { AppWrapperEmpty, ModalModule,DetailsItem,DateSelect },
|
|
|
data() {
|
|
|
return {
|
|
|
modifyPrice:null,
|
|
|
@@ -86,7 +79,10 @@ export default {
|
|
|
isModel: false,
|
|
|
payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
|
|
|
payWayindex:0,
|
|
|
- payWay:0
|
|
|
+ payWay:0,
|
|
|
+ searchTime:'',
|
|
|
+ startTime:'',
|
|
|
+ endTime:''
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -109,7 +105,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- console.log(list)
|
|
|
return list;
|
|
|
},
|
|
|
selectTotalAmount() {
|
|
|
@@ -125,15 +120,15 @@ export default {
|
|
|
return amount.toFixed(2);
|
|
|
}
|
|
|
},
|
|
|
- watch: {
|
|
|
- selectList () {
|
|
|
- if (this.selectList.length === this.detailsList.length) {
|
|
|
- this.isAllCheck = true
|
|
|
- } else {
|
|
|
- this.isAllCheck = false
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ watch: {
|
|
|
+ selectList () {
|
|
|
+ if (this.selectList.length === this.detailsList.length) {
|
|
|
+ this.isAllCheck = true
|
|
|
+ } else {
|
|
|
+ this.isAllCheck = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
payWayChange(e){
|
|
|
let index = e.detail.value
|
|
|
@@ -150,9 +145,7 @@ export default {
|
|
|
affirm(val) {
|
|
|
if (val.index === 0) {
|
|
|
this.isModel = false;
|
|
|
- console.log('取消')
|
|
|
} else {
|
|
|
-
|
|
|
let ids = this.selectList.map(ele => {
|
|
|
return {id:ele.id};
|
|
|
});
|
|
|
@@ -162,17 +155,22 @@ export default {
|
|
|
payWay:this.payWay
|
|
|
}
|
|
|
this.paySuccess(parameter)
|
|
|
- console.log('确认')
|
|
|
}
|
|
|
},
|
|
|
+ selectDateFn(val){
|
|
|
+ this.searchTime = val.searchTime
|
|
|
+ this.startTime = val.startTime
|
|
|
+ this.endTime = val.endTime
|
|
|
+ this.initData().then(res => {
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ })
|
|
|
+ },
|
|
|
async initData() {
|
|
|
try {
|
|
|
- this.listLoading = true;
|
|
|
- const {
|
|
|
- data: { customInfo, num, list }
|
|
|
- } = await getOrderDebtListApi(this.option.id);
|
|
|
- this.customInfo = customInfo;
|
|
|
- this.num = num;
|
|
|
+ this.listLoading = true
|
|
|
+ const {data: { customInfo, num, list }} = await getDebtOrderList({id:this.option.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})
|
|
|
+ this.customInfo = customInfo
|
|
|
+ this.num = num
|
|
|
this.detailsList = list.map(ele => {
|
|
|
return {
|
|
|
...ele,
|
|
|
@@ -180,23 +178,20 @@ export default {
|
|
|
};
|
|
|
});
|
|
|
} catch (error) {
|
|
|
+
|
|
|
} finally {
|
|
|
this.listLoading = false;
|
|
|
}
|
|
|
},
|
|
|
- // 全选
|
|
|
- allCheck () {
|
|
|
- this.isAllCheck = !this.isAllCheck
|
|
|
- if (this.isAllCheck) {
|
|
|
- this.detailsList.map(ele => {
|
|
|
- ele.checked = true
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.detailsList.map(ele => {
|
|
|
- ele.checked = false
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
+ //全选与全不选
|
|
|
+ checkFn() {
|
|
|
+ this.isAllCheck = !this.isAllCheck
|
|
|
+ if (this.isAllCheck) {
|
|
|
+ this.detailsList.map(ele => { ele.checked = true })
|
|
|
+ } else {
|
|
|
+ this.detailsList.map(ele => { ele.checked = false })
|
|
|
+ }
|
|
|
+ },
|
|
|
checkItemEvent(item) {
|
|
|
for (let index = 0; index < this.detailsList.length; index++) {
|
|
|
const element = this.detailsList[index].id;
|
|
|
@@ -312,14 +307,14 @@ export default {
|
|
|
color: #dddddd;
|
|
|
}
|
|
|
.price {
|
|
|
- margin: 0 5upx;
|
|
|
+ margin: 0 3upx;
|
|
|
color: $redColor;
|
|
|
font-size: 32upx;
|
|
|
}
|
|
|
.unit {
|
|
|
- margin: 0 10upx;
|
|
|
+ margin: 0 3upx;
|
|
|
color: $redColor;
|
|
|
- font-size: 16upx;
|
|
|
+ font-size: 25upx;
|
|
|
}
|
|
|
}
|
|
|
.btn-view {
|