shish 2 年 前
コミット
de260979f7
1 ファイル変更15 行追加12 行削除
  1. 15 12
      ghs/src/views/member/list.vue

+ 15 - 12
ghs/src/views/member/list.vue

@@ -67,17 +67,9 @@
 			</template>
 
 			<template #slot-multiple-add-custom>
-				<el-upload
-  class="upload-demo"
-  :action="fileUrl"
-  :headers="{ token: token }"
-  multiple
-  :show-file-list="false"
-  :on-success="fileUpSuccess"
-  accept=".txt,.xls,.xlsx"
-  :limit="3">
-  <el-button size="small" type="primary">批量导入客户</el-button>
-</el-upload>
+				<el-upload class="upload-demo" :action="fileUrl" :headers="{ token: token }" multiple :show-file-list="false" :on-success="fileUpSuccess" accept=".txt,.xls,.xlsx" :limit="3">
+  					<el-button size="small" type="primary">批量导入客户</el-button>
+				</el-upload>
 			</template>
 
 			<template #table-column-name="{scope}">
@@ -102,6 +94,10 @@
 				<span>{{ scope.row.visitTime ? scope.row.visitTime.substr(0,11) : 0 }}</span>
 			</template>
 
+			<template #slot-export-custom>
+				<el-button type="primary" size="mini" style="margin-left:60px;" @click="exportCustom()">导出客户</el-button>
+			</template>
+
 		</x-crud>
 
 		<detail-draw :show.sync="drapShow" :info="modalData" />
@@ -248,6 +244,13 @@ export default {
 	},
 	methods: {
 		...mapActions(['getLevel']),
+		exportCustom(){
+			this.$service.custom.shopListAll({ type: this.tabIndex,export:1}).then(res => {
+				if(res.file){
+					window.location.href = res.file
+				}
+			})
+		},
 		goBalanceChange(data){
 			let query = {};
 			query.customId = data.id
@@ -476,7 +479,7 @@ export default {
 				})
 				.set('layout', [
 					['slot-tabs'],
-					['search-key','slot-add-custom','flex1','slot-multiple-add-custom'],
+					['search-key','slot-add-custom','flex1','slot-export-custom'],
 					['data-table'],
 					['flex1', 'pagination']
 				])