|
@@ -2,6 +2,7 @@
|
|
|
<div class="app-container">
|
|
|
<div class="sty" v-if="isShow">
|
|
|
<el-page-header @back="goBack"> </el-page-header>
|
|
|
+ <br><br>
|
|
|
</div>
|
|
|
|
|
|
<!-- <span v-else>台账</span>
|
|
@@ -34,7 +35,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="钱包" prop="customerWalletId">
|
|
|
+ <el-form-item label="返利类型" prop="customerWalletId">
|
|
|
<el-select class="selectStyle" v-model="searchForm.customerWalletId" placeholder="请选择" filterable>
|
|
|
<el-option v-for="(v, i) in walletList" :key="i" :label="v.customerWalletName" :value="v.customerWalletId">
|
|
|
</el-option>
|
|
@@ -434,9 +435,9 @@ export default {
|
|
|
},
|
|
|
beforeRouteEnter(to, from, next) {
|
|
|
// console.log(to, from, next, 898);
|
|
|
- next((vm) => {
|
|
|
+ next(async (vm) => {
|
|
|
// 这个时候组件还没有创建,所以要通过vm来访问
|
|
|
- console.log(vm);
|
|
|
+ // console.log(vm);
|
|
|
vm.getCustomerDataList();
|
|
|
if (
|
|
|
from.path == "/finance/details/balance_sum" &&
|
|
@@ -448,14 +449,16 @@ export default {
|
|
|
vm.isShow = true;
|
|
|
vm.isDisabled = true;
|
|
|
vm.searchForm.customerId = vm.$route.query.customerId;
|
|
|
+ vm.searchForm.customerNumber = vm.$route.query.customerNumber;
|
|
|
vm.changeFn(vm.$route.query.customerId);
|
|
|
vm.getDataList({
|
|
|
pageSize: vm.pageSize,
|
|
|
pageNum: vm.currentPage,
|
|
|
type: vm.bill,
|
|
|
- customerName: vm.$route.query.customerName,
|
|
|
+ // customerName: vm.$route.query.customerName,
|
|
|
customerNumber: vm.$route.query.customerNumber,
|
|
|
});
|
|
|
+
|
|
|
vm.getAmountList({
|
|
|
type: vm.bill,
|
|
|
customerName: vm.$route.query.customerName,
|
|
@@ -466,25 +469,44 @@ export default {
|
|
|
vm.isDisabled = true;
|
|
|
vm.searchForm.customerId = vm.$store.state.user.customerId;
|
|
|
vm.changeFn(vm.$store.state.user.customerId);
|
|
|
+ vm.searchForm.customerId = vm.isCustomerList.customerId;
|
|
|
+ vm.searchForm.customerNumber = vm.isCustomerList.customerNumber;
|
|
|
vm.getDataList({
|
|
|
pageSize: vm.pageSize,
|
|
|
pageNum: vm.currentPage,
|
|
|
type: vm.bill,
|
|
|
- ...vm.isCustomerList,
|
|
|
+ customerId: vm.searchForm.customerId,
|
|
|
+ customerNumber: vm.searchForm.customerNumber,
|
|
|
});
|
|
|
+
|
|
|
vm.getAmountList({
|
|
|
type: vm.bill,
|
|
|
...vm.isCustomerList,
|
|
|
});
|
|
|
- } else {
|
|
|
- vm.isShow = false;
|
|
|
- vm.searchForm.customerId = "";
|
|
|
- vm.isDisabled = false;
|
|
|
+ } else if (vm.$route.query && vm.$route.query.status) {
|
|
|
+ vm.bill = vm.$route.query.status;
|
|
|
+ vm.isShow = true;
|
|
|
+ vm.isDisabled = true;
|
|
|
+ vm.searchForm.customerId = vm.$route.query.customerId;
|
|
|
+ vm.searchForm.customerNumber = vm.$route.query.customerNumber;
|
|
|
+ vm.changeFn(vm.$route.query.customerId);
|
|
|
vm.getDataList({
|
|
|
pageSize: vm.pageSize,
|
|
|
pageNum: vm.currentPage,
|
|
|
type: vm.bill,
|
|
|
+ // customerName: this.$route.query.customerName,
|
|
|
+ customerNumber: vm.$route.query.customerNumber,
|
|
|
});
|
|
|
+ vm.getAmountList({
|
|
|
+ type: vm.bill,
|
|
|
+ customerName: vm.$route.query.customerName,
|
|
|
+ customerNumber: vm.$route.query.customerNumber,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ vm.isShow = false;
|
|
|
+ vm.searchForm.customerId = "";
|
|
|
+ vm.isDisabled = false;
|
|
|
+ vm.getDataList();
|
|
|
vm.getCustomerDataList();
|
|
|
vm.getAmountList({
|
|
|
type: vm.bill,
|
|
@@ -521,31 +543,30 @@ export default {
|
|
|
|
|
|
// },
|
|
|
created() {
|
|
|
- if (this.$route.query && this.$route.query.status) {
|
|
|
- this.bill = this.$route.query.status;
|
|
|
- this.changeFn(this.bill);
|
|
|
- //只有是从A进到B页面才执行
|
|
|
- // 将要执行的逻辑
|
|
|
- this.isShow = true;
|
|
|
- this.isDisabled = true;
|
|
|
- this.searchForm.customerId = this.$route.query.customerId;
|
|
|
- this.changeFn(this.$route.query.customerId);
|
|
|
- this.getDataList({
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: this.bill,
|
|
|
- customerName: this.$route.query.customerName,
|
|
|
- customerNumber: this.$route.query.customerNumber,
|
|
|
- });
|
|
|
- this.getAmountList({
|
|
|
- type: this.bill,
|
|
|
- customerName: this.$route.query.customerName,
|
|
|
- customerNumber: this.$route.query.customerNumber,
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
+ // if (this.$route.query && this.$route.query.status) {
|
|
|
+ // this.bill = this.$route.query.status;
|
|
|
+ // this.changeFn(this.bill);
|
|
|
+ // //只有是从A进到B页面才执行
|
|
|
+ // // 将要执行的逻辑
|
|
|
+ // this.isShow = true;
|
|
|
+ // this.isDisabled = true;
|
|
|
+ // this.searchForm.customerId = this.$route.query.customerId;
|
|
|
+ // this.searchForm.customerNumber = this.$route.query.customerNumber;
|
|
|
+ // this.changeFn(this.$route.query.customerId);
|
|
|
+ // this.getDataList({
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: this.bill,
|
|
|
+ // // customerName: this.$route.query.customerName,
|
|
|
+ // customerNumber: this.$route.query.customerNumber,
|
|
|
+ // });
|
|
|
+ // this.getAmountList({
|
|
|
+ // type: this.bill,
|
|
|
+ // customerName: this.$route.query.customerName,
|
|
|
+ // customerNumber: this.$route.query.customerNumber,
|
|
|
+ // });
|
|
|
+ // }
|
|
|
// console.log(
|
|
|
-
|
|
|
// this.customerId,
|
|
|
// this.$store.state.user.customerName,
|
|
|
// this.$store.state.user.customerNumber,
|
|
@@ -791,31 +812,34 @@ export default {
|
|
|
// pageSize: this.pageSize,
|
|
|
// });
|
|
|
if (this.$route.query.customerName && this.$route.query.customerNumber) {
|
|
|
- this.getDataList({
|
|
|
- ...this.searchForm,
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: this.bill,
|
|
|
- customerName: this.$route.query.customerName,
|
|
|
- customerNumber: this.$route.query.customerNumber,
|
|
|
- });
|
|
|
+ // this.getDataList({
|
|
|
+ // ...this.searchForm,
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: this.bill,
|
|
|
+ // customerName: this.$route.query.customerName,
|
|
|
+ // customerNumber: this.$route.query.customerNumber,
|
|
|
+ // });
|
|
|
+ this.getDataList();
|
|
|
} else if (this.isCustomer) {
|
|
|
- this.getDataList({
|
|
|
- ...this.searchForm,
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: this.bill,
|
|
|
- ...this.isCustomerList,
|
|
|
- });
|
|
|
+ // this.getDataList({
|
|
|
+ // ...this.searchForm,
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: this.bill,
|
|
|
+ // ...this.isCustomerList,
|
|
|
+ // });
|
|
|
+ this.getDataList();
|
|
|
} else {
|
|
|
- this.getDataList({
|
|
|
- ...this.searchForm,
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: this.bill,
|
|
|
- customerName: this.customerName,
|
|
|
- customerNumber: this.customerNumber,
|
|
|
- });
|
|
|
+ // this.getDataList({
|
|
|
+ // ...this.searchForm,
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: this.bill,
|
|
|
+ // customerName: this.customerName,
|
|
|
+ // customerNumber: this.customerNumber,
|
|
|
+ // });
|
|
|
+ this.getDataList();
|
|
|
}
|
|
|
},
|
|
|
// 更改当前页
|
|
@@ -827,31 +851,34 @@ export default {
|
|
|
// pageSize: this.pageSize,
|
|
|
// });
|
|
|
if (this.$route.query.customerName && this.$route.query.customerNumber) {
|
|
|
- this.getDataList({
|
|
|
- ...this.searchForm,
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: this.bill,
|
|
|
- customerName: this.$route.query.customerName,
|
|
|
- customerNumber: this.$route.query.customerNumber,
|
|
|
- });
|
|
|
+ // this.getDataList({
|
|
|
+ // ...this.searchForm,
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: this.bill,
|
|
|
+ // customerName: this.$route.query.customerName,
|
|
|
+ // customerNumber: this.$route.query.customerNumber,
|
|
|
+ // });
|
|
|
+ this.getDataList();
|
|
|
} else if (this.isCustomer) {
|
|
|
- this.getDataList({
|
|
|
- ...this.searchForm,
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: this.bill,
|
|
|
- ...this.isCustomerList,
|
|
|
- });
|
|
|
+ // this.getDataList({
|
|
|
+ // ...this.searchForm,
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: this.bill,
|
|
|
+ // ...this.isCustomerList,
|
|
|
+ // });
|
|
|
+ this.getDataList();
|
|
|
} else {
|
|
|
- this.getDataList({
|
|
|
- ...this.searchForm,
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: this.bill,
|
|
|
- customerName: this.customerName,
|
|
|
- customerNumber: this.customerNumber,
|
|
|
- });
|
|
|
+ // this.getDataList({
|
|
|
+ // ...this.searchForm,
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: this.bill,
|
|
|
+ // customerName: this.customerName,
|
|
|
+ // customerNumber: this.customerNumber,
|
|
|
+ // });
|
|
|
+ this.getDataList();
|
|
|
}
|
|
|
},
|
|
|
// //获取品类
|
|
@@ -887,56 +914,60 @@ export default {
|
|
|
let res = this.customerList.filter((v) => {
|
|
|
return v.id == this.searchForm.customerId;
|
|
|
});
|
|
|
- console.log(res);
|
|
|
+
|
|
|
// return;
|
|
|
if (res.length > 0) {
|
|
|
this.customerName = res[0].name;
|
|
|
this.customerNumber = res[0].number;
|
|
|
+ this.searchForm.customerNumber = res[0].number;
|
|
|
}
|
|
|
|
|
|
if (this.$route.query.customerName && this.$route.query.customerNumber) {
|
|
|
- this.getDataList({
|
|
|
- ...this.searchForm,
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: this.bill,
|
|
|
- customerName: this.$route.query.customerName,
|
|
|
- customerNumber:
|
|
|
- this.$route.query.customerNumber || this.searchForm.customerNumber,
|
|
|
- });
|
|
|
+ // this.getDataList({
|
|
|
+ // ...this.searchForm,
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: this.bill,
|
|
|
+ // // customerName: this.$route.query.customerName,
|
|
|
+ // customerNumber:
|
|
|
+ // this.$route.query.customerNumber || this.searchForm.customerNumber,
|
|
|
+ // });
|
|
|
+ this.getDataList();
|
|
|
this.getAmountList({
|
|
|
...this.searchForm,
|
|
|
type: this.bill,
|
|
|
- customerName: this.$route.query.customerName,
|
|
|
+ // customerName: this.$route.query.customerName,
|
|
|
customerNumber: this.$route.query.customerNumber,
|
|
|
});
|
|
|
} else if (this.isCustomer) {
|
|
|
- this.getDataList({
|
|
|
- ...this.searchForm,
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: this.bill,
|
|
|
- ...this.isCustomerList,
|
|
|
- });
|
|
|
+ // this.getDataList({
|
|
|
+ // ...this.searchForm,
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: this.bill,
|
|
|
+ // ...this.isCustomerList,
|
|
|
+ // });
|
|
|
+ this.getDataList();
|
|
|
this.getAmountList({
|
|
|
...this.searchForm,
|
|
|
type: this.bill,
|
|
|
...this.isCustomerList,
|
|
|
});
|
|
|
} else {
|
|
|
- this.getDataList({
|
|
|
- ...this.searchForm,
|
|
|
- customerName: this.customerName,
|
|
|
- customerNumber: this.customerNumber || this.searchForm.customerNumber,
|
|
|
+ // this.getDataList({
|
|
|
+ // ...this.searchForm,
|
|
|
+ // // customerName: this.customerName,
|
|
|
+ // customerNumber: this.customerNumber || this.searchForm.customerNumber,
|
|
|
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: this.bill,
|
|
|
- });
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: this.bill,
|
|
|
+ // });
|
|
|
+ this.getDataList();
|
|
|
this.getAmountList({
|
|
|
...this.searchForm,
|
|
|
type: this.bill,
|
|
|
- customerName: this.customerName,
|
|
|
+ // customerName: this.customerName,
|
|
|
customerNumber: this.customerNumber,
|
|
|
});
|
|
|
}
|
|
@@ -961,18 +992,20 @@ export default {
|
|
|
this.resetFn();
|
|
|
this.pageSize = 10;
|
|
|
this.currentPage = 1;
|
|
|
+ this.bill = v;
|
|
|
if (this.$route.query.customerName && this.$route.query.customerNumber) {
|
|
|
this.changeFn(this.$route.query.customerId);
|
|
|
- this.getDataList({
|
|
|
- ...this.searchForm,
|
|
|
+ // this.getDataList({
|
|
|
+ // ...this.searchForm,
|
|
|
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: v,
|
|
|
- customerId: this.$route.query.customerId,
|
|
|
- customerName: this.$route.query.customerName,
|
|
|
- customerNumber: this.$route.query.customerNumber,
|
|
|
- });
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: v,
|
|
|
+ // customerId: this.$route.query.customerId,
|
|
|
+ // customerName: this.$route.query.customerName,
|
|
|
+ // customerNumber: this.$route.query.customerNumber,
|
|
|
+ // });
|
|
|
+ this.getDataList();
|
|
|
this.getAmountList({
|
|
|
...this.searchForm,
|
|
|
type: v,
|
|
@@ -982,28 +1015,33 @@ export default {
|
|
|
});
|
|
|
} else if (this.isCustomer) {
|
|
|
this.changeFn(this.$store.state.user.customerId);
|
|
|
- this.getDataList({
|
|
|
- ...this.searchForm,
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: v,
|
|
|
- ...this.isCustomerList,
|
|
|
- });
|
|
|
+ // this.getDataList({
|
|
|
+ // ...this.searchForm,
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: v,
|
|
|
+ // ...this.isCustomerList,
|
|
|
+ // });
|
|
|
+ this.searchForm.customerId = this.isCustomerList.customerId;
|
|
|
+ this.searchForm.customerNumber = this.isCustomerList.customerNumber;
|
|
|
+
|
|
|
+ this.getDataList();
|
|
|
this.getAmountList({
|
|
|
...this.searchForm,
|
|
|
type: v,
|
|
|
...this.isCustomerList,
|
|
|
});
|
|
|
} else {
|
|
|
- this.getDataList({
|
|
|
- // ...this.searchForm,
|
|
|
+ // this.getDataList({
|
|
|
+ // // ...this.searchForm,
|
|
|
|
|
|
- // customerName: this.customerName,
|
|
|
- // customerNumber: this.customerNumber,
|
|
|
- pageSize: this.pageSize,
|
|
|
- pageNum: this.currentPage,
|
|
|
- type: v,
|
|
|
- });
|
|
|
+ // // customerName: this.customerName,
|
|
|
+ // // customerNumber: this.customerNumber,
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // type: v,
|
|
|
+ // });
|
|
|
+ this.getDataList();
|
|
|
this.getAmountList({
|
|
|
type: v,
|
|
|
});
|
|
@@ -1011,16 +1049,37 @@ export default {
|
|
|
// this.getWalletList();
|
|
|
},
|
|
|
//
|
|
|
- async getDataList(data) {
|
|
|
- let res;
|
|
|
- if (this.bill == "COMMONLY") {
|
|
|
- res = await getStandbookList(data);
|
|
|
+ async getDataList(value) {
|
|
|
+ // let res;
|
|
|
+ // if (this.bill == "COMMONLY") {
|
|
|
+ // res = await getStandbookList(data);
|
|
|
+ // } else {
|
|
|
+ // res = await getStandbookList(data);
|
|
|
+ // }
|
|
|
+
|
|
|
+ if (value) {
|
|
|
+ let res = await getStandbookList(value);
|
|
|
+ this.dataList = res.data.records;
|
|
|
+ this.listTotal = res.data.total;
|
|
|
} else {
|
|
|
- res = await getStandbookList(data);
|
|
|
+ let params = {
|
|
|
+ billNo: this.searchForm.billNo,
|
|
|
+ billType: this.searchForm.billType,
|
|
|
+ customerId: this.searchForm.customerId,
|
|
|
+ customerName: "",
|
|
|
+ customerNumber: this.searchForm.customerNumber,
|
|
|
+ customerWalletId: this.searchForm.customerWalletId,
|
|
|
+ endTime: this.searchForm.endTime,
|
|
|
+ pageNum: this.currentPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ startTime: this.searchForm.startTime,
|
|
|
+ type: this.bill,
|
|
|
+ walletRebateId: "",
|
|
|
+ };
|
|
|
+ let res = await getStandbookList(params);
|
|
|
+ this.dataList = res.data.records;
|
|
|
+ this.listTotal = res.data.total;
|
|
|
}
|
|
|
-
|
|
|
- this.dataList = res.data.records;
|
|
|
- this.listTotal = res.data.total;
|
|
|
},
|
|
|
},
|
|
|
};
|