|
@@ -55,7 +55,7 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
currentIds(val) {
|
|
|
- this.checkedAll = val.length === this.orderList.length;
|
|
|
+ this.checkedAll = val.length === this.orderList.length && val.length !== 0;
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
@@ -64,6 +64,14 @@ export default {
|
|
|
this.queryParams.invoType = orderType;
|
|
|
}
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ // this.orderList = [];
|
|
|
+ // this.currentIds = [];
|
|
|
+ // this.currentList = [];
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.$refs.paging.reload();
|
|
|
+ // });
|
|
|
+ },
|
|
|
methods: {
|
|
|
/**
|
|
|
* @description: 分页触发
|
|
@@ -136,6 +144,7 @@ export default {
|
|
|
success: () => {
|
|
|
this.$u.route({
|
|
|
url: '/pages/invoiceModule/addInvoice/addInvoice',
|
|
|
+ type: 'redirectTo',
|
|
|
params: {
|
|
|
invoType: this.queryParams.invoType
|
|
|
}
|
|
@@ -149,7 +158,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- /**
|
|
|
+ /**
|
|
|
* @description: 计算累加精度丢失问题
|
|
|
* @param {*} arr
|
|
|
* @return {*}
|
|
@@ -157,7 +166,7 @@ export default {
|
|
|
countSum(arr) {
|
|
|
if (!arr.length) return 0;
|
|
|
arr = arr.map((v) => {
|
|
|
- if (v.amount && !Number.isNaN(Number(v.amount))) return Math.round((v.amount).toFixed(2) * 100);
|
|
|
+ if (v.amount && !Number.isNaN(Number(v.amount))) return Math.round(v.amount.toFixed(2) * 100);
|
|
|
return 0;
|
|
|
});
|
|
|
const result = arr.reduce((prev, curr) => {
|