Переглянути джерело

添加商场、商户、用户、会员、代理列表导出功能

silent 4 роки тому
батько
коміт
b31a9ccca3

+ 14 - 0
src/views/ldt_agent/agentrecord.vue

@@ -61,6 +61,9 @@
 <!--          </div>-->
 <!--        </div>-->
       </template>
+      <template slot="menuLeft">
+        <el-button type="primary" size="small" @click="generateListAndDownload">导出数据</el-button>
+      </template>
       <template slot-scope="scope" slot="menu">
         <el-button type="text" size="small" icon="el-icon-view" plain class="none-border"
                    @click.stop="openDialog(scope.row.accountId,'代理商户')">代理商户
@@ -75,6 +78,7 @@ import {add, getDetail, getList, remove, update} from "@/api/ldt_agent/agentreco
 // import {getList as platformList} from "@/api/ldt_platform/platformsetting";
 import {mapGetters} from "vuex";
 import agentShop from "./comps/agent-shop"
+import moment from "_moment@2.29.1@moment";
 
 export default {
     components:{agentShop},
@@ -362,6 +366,16 @@ export default {
           this.selectionClear();
         });
       },
+      generateListAndDownload() {
+        const filterArray = ["数据统计"];
+        this.$Export.excel({
+          title: `用户数据导出-${moment().format("yyyy-MM-DD HH:mm:ss")}`,
+          columns: this.option.column.filter(ele=>{
+            return filterArray.indexOf(ele.label)===-1;
+          }),
+          data: this.selectionList.length!==0?this.selectionList:this.data
+        });
+      }
     }
   };
 </script>

+ 12 - 0
src/views/ldt_mall/mall.vue

@@ -106,6 +106,7 @@
       </template>
 
       <template slot="menuLeft">
+        <el-button type="primary" size="small" @click="generateListAndDownload">导出数据</el-button>
         <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.mall_delete"
                    @click="handleDelete">删 除
         </el-button>
@@ -123,6 +124,7 @@ import mallAudit from "./comps/mall_audit.vue"
 import mallProductFee from "./comps/mall-product-fee"
 import MallAccountInfo from "./comps/mall-account-info";
 import {saveChannel} from "../../api/ldt_channel/pointchannel";
+import moment from "moment";
 
 const auditKV = [{
   label: "待商场审核",
@@ -629,6 +631,16 @@ export default {
         this.selectionClear();
       });
     },
+    generateListAndDownload() {
+      const filterArray = ["基本信息","代理人信息"];
+      this.$Export.excel({
+        title: `商城数据导出-${moment().format("yyyy-MM-DD HH:mm:ss")}`,
+        columns: this.option.column.filter(ele=>{
+          return filterArray.indexOf(ele.label)===-1;
+        }),
+        data: this.selectionList.length!==0?this.selectionList:this.data
+      });
+    }
   }
 };
 

+ 12 - 0
src/views/ldt_shop/shop.vue

@@ -149,6 +149,7 @@
         <el-image :src="scope.row.shopPic" :style="{maxHeight:'50px',maxWidth:'50px'}"></el-image>
       </template>
       <template slot="menuLeft">
+        <el-button type="primary" size="small" @click="generateListAndDownload">导出数据</el-button>
         <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.shop_delete"
                    @click="handleDelete">删 除
         </el-button>
@@ -192,6 +193,7 @@ import shopJoinrecord from "./comps/shop-joinrecord.vue"
 import shopWithdrawrec from "./comps/shop-withdrawrec.vue"
 import shopProductFee from "./comps/shop-product-fee"
 import ShopInfo from "./shop-info";
+import moment from "_moment@2.29.1@moment";
 
 export default {
   components: {
@@ -926,6 +928,16 @@ export default {
         this.selectionClear();
       });
     },
+    generateListAndDownload() {
+      const filterArray = ["店铺信息","代理人信息","数据统计","积分统计"];
+      this.$Export.excel({
+        title: `商户数据导出-${moment().format("yyyy-MM-DD HH:mm:ss")}`,
+        columns: this.option.column.filter(ele=>{
+          return filterArray.indexOf(ele.label)===-1;
+        }),
+        data: this.selectionList.length!==0?this.selectionList:this.data
+      });
+    }
   }
 };
 </script>

+ 21 - 9
src/views/ldt_user/loginuser.vue

@@ -18,15 +18,16 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
-      <!--      <template slot="menuLeft">
-              <el-button type="danger"
-                         size="small"
-                         icon="el-icon-delete"
-                         plain
-                         v-if="permission.loginuser_delete"
-                         @click="handleDelete">删 除
-              </el-button>
-            </template>-->
+            <template slot="menuLeft">
+              <el-button type="primary" size="small" @click="generateListAndDownload">导出数据</el-button>
+<!--              <el-button type="danger"-->
+<!--                         size="small"-->
+<!--                         icon="el-icon-delete"-->
+<!--                         plain-->
+<!--                         v-if="permission.loginuser_delete"-->
+<!--                         @click="handleDelete">删 除-->
+<!--              </el-button>-->
+            </template>
       <avue-form :option="option" v-model="form" :upload-preview="uploadPreview"
                  :upload-error="uploadError" :upload-exceed="uploadExceed" :upload-delete="uploadDelete"
                  :upload-before="uploadBefore" :upload-after="uploadAfter"></avue-form>
@@ -37,6 +38,7 @@
 <script>
 import {add, getDetail, getList, remove, update} from "@/api/ldt_user/loginuser";
 import {mapGetters} from "vuex";
+import moment from "_moment@2.29.1@moment";
 
 export default {
   data() {
@@ -343,6 +345,16 @@ export default {
         this.loading = false;
         this.selectionClear();
       });
+    },
+    generateListAndDownload() {
+      const filterArray = ["总价值额度"];
+      this.$Export.excel({
+        title: `用户数据导出-${moment().format("yyyy-MM-DD HH:mm:ss")}`,
+        columns: this.option.column.filter(ele=>{
+          return filterArray.indexOf(ele.label)===-1;
+        }),
+        data: this.selectionList.length!==0?this.selectionList:this.data
+      });
     }
   }
 };

+ 15 - 1
src/views/ldt_user/member.vue

@@ -18,6 +18,9 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="primary" size="small" @click="generateListAndDownload">导出数据</el-button>
+      </template>
     </avue-crud>
   </basic-container>
 </template>
@@ -25,6 +28,7 @@
 <script>
   import {getList, getDetail, add, update, remove} from "@/api/ldt_user/member";
   import {mapGetters} from "vuex";
+  import moment from "_moment@2.29.1@moment";
 
   export default {
     data() {
@@ -52,7 +56,7 @@
           editBtn:false,
           delBtn:false,
           addBtn:false,
-          selection: false,
+          selection: true,
           dialogClickModal: false,
           column: [
             {
@@ -305,6 +309,16 @@
           this.loading = false;
           this.selectionClear();
         });
+      },
+      generateListAndDownload() {
+        const filterArray = [];
+        this.$Export.excel({
+          title: `用户数据导出-${moment().format("yyyy-MM-DD HH:mm:ss")}`,
+          columns: this.option.column.filter(ele=>{
+            return filterArray.indexOf(ele.label)===-1;
+          }),
+          data: this.selectionList.length!==0?this.selectionList:this.data
+        });
       }
     }
   };