|
|
@@ -74,7 +74,8 @@ export default {
|
|
|
totalAmount: "",
|
|
|
num: "",
|
|
|
detailsList: [],
|
|
|
- listLoading: false
|
|
|
+ listLoading: false,
|
|
|
+ isAllCheck: false
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -112,6 +113,15 @@ export default {
|
|
|
return amount;
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ selectList () {
|
|
|
+ if (this.selectList.length === this.detailsList.length) {
|
|
|
+ this.isAllCheck = true
|
|
|
+ } else {
|
|
|
+ this.isAllCheck = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
async initData() {
|
|
|
try {
|
|
|
@@ -133,6 +143,19 @@ export default {
|
|
|
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
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
checkItemEvent(item) {
|
|
|
for (let index = 0; index < this.detailsList.length; index++) {
|
|
|
const element = this.detailsList[index].id;
|
|
|
@@ -279,5 +302,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .details-select {
|
|
|
+ margin-right: 20upx;
|
|
|
+ display: inline-block;
|
|
|
+ .iconweixuanzhong,
|
|
|
+ .iconxuanzhong {
|
|
|
+ font-size: 40upx !important;
|
|
|
+ }
|
|
|
+ .iconxuanzhong {
|
|
|
+ color: $mainColor !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|