ソースを参照

钱包管理去掉产品大类

chen 3 年 前
コミット
874bcc3c2a
3 ファイル変更90 行追加90 行削除
  1. 47 46
      src/App.vue
  2. 18 18
      src/api/basic_data/wallet_list.js
  3. 25 26
      src/views/basic_data/wallet/wallet_list.vue

+ 47 - 46
src/App.vue

@@ -5,58 +5,59 @@
 </template>
 
 <script>
+// import {
+
+// }
 import { getRebateOrderMsg } from "@/api/App";
 export default {
   name: "App",
   data() {
     return {};
   },
-  // watch: {
-  //   $route(route) {
-  //     let that = this.$notify;
-
-  //     let aa = function () {
-  //       let intivalId2 = setInterval(() => {
-  //         that.info({
-  //           title: "自定义位置",
-  //           message: "右下角弹出的消息",
-  //           position: "bottom-right",
-  //           duration: 0,
-  //           onClose() {
-  //             console.log("关闭回调");
-  //             clearInterval(intivalId2);
-  //             aa();
-  //           },
-  //         });
-  //         clearInterval(intivalId2);
-  //       }, 3000);
-  //     };
-  //     if (route.path == "/dashboard") {
-  //       console.log(32312312312);
-  //       // let res = await getRebateOrderMsg();
-  //       // console.log(res);
-  //       // let intivalId = setInterval(() => {
-  //       //   this.$notify.info({
-  //       //     title: "自定义位置",
-  //       //     message: "右下角弹出的消息",
-  //       //     position: "bottom-right",
-  //       //     duration: 0,
-  //       //     onClose() {
-  //       //       console.log("关闭回调");
-  //       //       console.log(that);
-  //       //       clearInterval(intivalId);
-  //       //       aa();
-  //       //     },
-  //       //   });
-  //       //   clearInterval(intivalId);
-  //       // }, 3000);
-
-  //     } else {
-  //       // clearInterval(id);
-  //     }
-  //   },
-  //   // immediate: true,
-  // },
+  watch: {
+    // $route(route) {
+    //   let that = this.$notify;
+    //   let aa = function () {
+    //     let intivalId2 = setInterval(() => {
+    //       that.info({
+    //         title: "自定义位置",
+    //         message: "右下角弹出的消息",
+    //         position: "bottom-right",
+    //         duration: 0,
+    //         onClose() {
+    //           console.log("关闭回调");
+    //           clearInterval(intivalId2);
+    //           aa();
+    //         },
+    //       });
+    //       clearInterval(intivalId2);
+    //     }, 3000);
+    //   };
+    //   if (route.path == "/dashboard") {
+    //     console.log(32312312312);
+    //     // let res = await getRebateOrderMsg();
+    //     // console.log(res);
+    //     // let intivalId = setInterval(() => {
+    //     //   this.$notify.info({
+    //     //     title: "自定义位置",
+    //     //     message: "右下角弹出的消息",
+    //     //     position: "bottom-right",
+    //     //     duration: 0,
+    //     //     onClose() {
+    //     //       console.log("关闭回调");
+    //     //       console.log(that);
+    //     //       clearInterval(intivalId);
+    //     //       aa();
+    //     //     },
+    //     //   });
+    //     //   clearInterval(intivalId);
+    //     // }, 3000);
+    //   } else {
+    //     // clearInterval(id);
+    //   }
+    // },
+    // immediate: true,
+  },
 
   updated() {},
   methods: {},

+ 18 - 18
src/api/basic_data/wallet_list.js

@@ -1,34 +1,34 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 //钱包列表(非返利钱包)
 export function getWalletList(params) {
   return request({
-    url: '/wallet/list',
-    method: 'get',
-    params
-  })
+    url: "/wallet/list",
+    method: "get",
+    params,
+  });
 }
 //产品品类列表
 export function getProductCategory(params) {
   return request({
-    url: '/product-category/list',
-    method: 'get',
-    params
-  })
+    url: "/product-category/list",
+    method: "get",
+    params,
+  });
 }
 //绑定品类
 export function getWalletBiandMain(params) {
   return request({
-    url: '/wallet/bindMain',
-    method: 'post',
-    params
-  })
+    url: "/wallet/bindMain",
+    method: "post",
+    params,
+  });
 }
 //现金钱包详情
 export function getWalletDetail(params) {
   return request({
-    url: '/wallet/detail',
-    method: 'get',
-    params
-  })
-}
+    url: "/wallet/detail",
+    method: "get",
+    params,
+  });
+}

+ 25 - 26
src/views/basic_data/wallet/wallet_list.vue

@@ -18,7 +18,7 @@
               ></el-input>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
+          <!-- <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="产品大类" prop="mainId">
               <el-select
                 class="selectStyle"
@@ -35,9 +35,9 @@
                 </el-option>
               </el-select>
             </el-form-item>
-          </el-col>
+          </el-col> -->
 
-          <el-col :xs="24" :sm="24" :lg="12" class="tr">
+          <el-col :xs="24" :sm="24" :lg="18" class="tr">
             <el-form-item label="">
               <el-button size="small" @click="clearFn">清空</el-button>
               <el-button size="small" type="primary" @click="searchFn"
@@ -83,13 +83,13 @@
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
-          <el-table-column
+          <!-- <el-table-column
             align="center"
             label="对应产品大类"
             prop="mainName"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          ></el-table-column> -->
 
           <el-table-column
             align="center"
@@ -126,7 +126,7 @@
         <el-form-item label="编码" prop="customerId">
           <el-input disabled v-model="addForm.number"></el-input>
         </el-form-item>
-        <el-form-item label="对应产品大类" prop="customerId">
+        <!-- <el-form-item label="对应产品大类" prop="customerId">
           <el-select
             class="selectStyle"
             v-model="addForm.mainId"
@@ -140,7 +140,7 @@
             >
             </el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="折让钱包" prop="customerId">
           <el-radio-group v-model="addForm.isZr">
             <el-radio :label="true">是</el-radio>
@@ -180,13 +180,13 @@ export default {
       listTotal: 0, // 列表总数
       dataList: [],
       dialogForm: false,
-      categoryList: [],
+      // categoryList: [],
       addForm: {
         id: "",
         isRebate: null,
         isZr: null,
-        mainId: "",
-        mainName: "",
+        // mainId: "",
+        // mainName: "",
         name: "",
         number: "",
       },
@@ -195,28 +195,28 @@ export default {
   },
   created() {
     this.getDataList();
-    this.getCategoryList();
+    // this.getCategoryList();
   },
   methods: {
     //确定
     async btnOK() {
       console.log(this.addForm);
-      console.log(this.categoryList);
-      const res = this.categoryList.filter(
-        (v) => v.productCategoryNumber == this.addForm.mainId
-      );
+      // console.log(this.categoryList);
+      // const res = this.categoryList.filter(
+      //   (v) => v.productCategoryNumber == this.addForm.mainId
+      // );
 
       let data = {
         id: this.walletId,
         isRebate: this.addForm.isRebate,
         isZr: this.addForm.isZr,
-        mainId: this.addForm.mainId,
-        mainName: res[0].productCategoryName,
+        // mainId: this.addForm.mainId,
+        // mainName: res[0].productCategoryName,
       };
       await getWalletBiandMain(data);
       this.addForm.isRebate = null;
       this.addForm.isZr = null;
-      this.addForm.mainId = "";
+      // this.addForm.mainId = "";
       this.getDataList();
       this.$message.success("设置成功");
       this.dialogForm = false;
@@ -236,22 +236,21 @@ export default {
     searchFn() {
       this.getDataList({ ...this.searchForm });
     },
-    //获取产品品类列表
-    async getCategoryList() {
-      const res = await getProductCategory();
-      this.categoryList = res.data;
-    },
+    // //获取产品品类列表
+    // async getCategoryList() {
+    //   const res = await getProductCategory();
+    //   this.categoryList = res.data;
+    // },
     //设置产品大类
     async setFn(value) {
-      console.log(value);
       this.walletId = value.id;
       // this.addForm.name = value.name;
       // this.addForm.number = value.number;
       let res = await getWalletDetail({ walletId: value.id });
-      console.log(res);
+      // console.log(res);
       this.addForm.name = res.data.name;
       this.addForm.number = res.data.number;
-      this.addForm.mainId = res.data.mainId;
+      // this.addForm.mainId = res.data.mainId;
       this.addForm.isRebate = res.data.isRebate;
       this.addForm.isZr = res.data.isZr;