|
@@ -615,12 +615,10 @@ export default {
|
|
|
this.searchForm.code = this.comCode;
|
|
|
},
|
|
|
created() {
|
|
|
- this.getCommonApi();
|
|
|
// console.log(this.$store.code);
|
|
|
-
|
|
|
- if (this.$parent.isFlag) {
|
|
|
- // this.handletwoList()
|
|
|
- }
|
|
|
+ // if (this.$parent.isFlag) {
|
|
|
+ // this.handletwoList()
|
|
|
+ // }
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations("sales", ["initData"]),
|
|
@@ -681,22 +679,20 @@ export default {
|
|
|
this.getK3List();
|
|
|
}
|
|
|
},
|
|
|
- getCommonApi() {
|
|
|
+ async getCommonApi() {
|
|
|
// this.getK3List();
|
|
|
// 非返利钱包
|
|
|
- getNoRebateWalletList({ walletName: "" }).then((res) => {
|
|
|
- this.NoRebateWalletList = res.data;
|
|
|
- console.log(this.NoRebateWalletList, "kkkk");
|
|
|
- });
|
|
|
- getWalletRebateList({
|
|
|
+ const noRebateWalletData = await getNoRebateWalletList({ walletName: "" })
|
|
|
+ this.NoRebateWalletList = noRebateWalletData.data;
|
|
|
+
|
|
|
+ const walletRebateData = await getWalletRebateList({
|
|
|
pageNum: 1,
|
|
|
pageSize: -2,
|
|
|
name: "",
|
|
|
status: true,
|
|
|
- }).then((res) => {
|
|
|
- this.rebateList = res.data.records;
|
|
|
- console.log(this.rebateList, "fanlie");
|
|
|
- });
|
|
|
+ })
|
|
|
+ this.rebateList = walletRebateData.data.records;
|
|
|
+
|
|
|
const params = {
|
|
|
pageNum: 1,
|
|
|
pageSize: -1,
|
|
@@ -704,34 +700,11 @@ export default {
|
|
|
saleName: "",
|
|
|
status: "",
|
|
|
};
|
|
|
+
|
|
|
// 获取销售类型列表
|
|
|
- getTypeList(params).then((res) => {
|
|
|
- this.typeList = res.data.records;
|
|
|
- console.log(this.typeList, "xioahsou");
|
|
|
- });
|
|
|
- // this.handletwoList()
|
|
|
- // const params = {
|
|
|
- // pageNum: 1,
|
|
|
- // pageSize: 10,
|
|
|
- // saleCode: "",
|
|
|
- // saleName: "",
|
|
|
- // status: "",
|
|
|
- // };
|
|
|
- // const walletParams = {
|
|
|
- // pageNum: 1,
|
|
|
- // pageSize: 10,
|
|
|
- // mainName: "",
|
|
|
- // saleTypeCode: "",
|
|
|
- // saleTypeName: "",
|
|
|
- // status: "",
|
|
|
- // };
|
|
|
- // // 获取钱包列表
|
|
|
- // getWalletList(walletParams).then((res) => {
|
|
|
- // this.walletList = res.data.records;
|
|
|
- // });
|
|
|
- // getDictList({ sysDictEnum: "PRODUCT_TYPE" }).then((res) => {
|
|
|
- // this.dictList = res.data;
|
|
|
- // });
|
|
|
+ const typeData = await getTypeList(params)
|
|
|
+ this.typeList = typeData.data.records;
|
|
|
+
|
|
|
},
|
|
|
handleSalesType(e, row) {
|
|
|
const item = this.typeList.filter((k) => {
|
|
@@ -815,9 +788,10 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- getList() {
|
|
|
+ async getList() {
|
|
|
+ await this.getCommonApi();
|
|
|
if (this.$parent.isFlag) {
|
|
|
- this.handletwoList();
|
|
|
+ await this.handletwoList();
|
|
|
}
|
|
|
},
|
|
|
// 更改每页数量
|