|
@@ -18,10 +18,24 @@
|
|
:on-success="handleSuccess">
|
|
:on-success="handleSuccess">
|
|
<el-button class="btn-primary">商品导入</el-button>
|
|
<el-button class="btn-primary">商品导入</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
|
|
+ <!-- <el-upload v-permission="'export/goods'"
|
|
|
|
+ style="display: inline-block; margin: 0 10px;"
|
|
|
|
+ action="/api-web/export/goods"
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ :before-upload="beforeUpload"
|
|
|
|
+ accept=".xlsx,.xls"
|
|
|
|
+ :headers="headers"
|
|
|
|
+ :on-error="handleError"
|
|
|
|
+ :on-success="handleSuccess">
|
|
|
|
+ <el-button class="btn-primary">商品导出</el-button>
|
|
|
|
+ </el-upload> -->
|
|
|
|
+ <el-button v-permission="'export/goods'" class="btn-primary" @click="exportShopList">商品导出</el-button>
|
|
<el-button class="btn-primary"
|
|
<el-button class="btn-primary"
|
|
|
|
+
|
|
@click="onDownload"
|
|
@click="onDownload"
|
|
v-permission="'import/downloadTemplate'">下载模板</el-button>
|
|
v-permission="'import/downloadTemplate'">下载模板</el-button>
|
|
<el-button class="btn-primary"
|
|
<el-button class="btn-primary"
|
|
|
|
+
|
|
permission="'goods/update'"
|
|
permission="'goods/update'"
|
|
@click="onShopComAdd">添加组合商品</el-button>
|
|
@click="onShopComAdd">添加组合商品</el-button>
|
|
<!-- 搜索类型 -->
|
|
<!-- 搜索类型 -->
|
|
@@ -515,6 +529,7 @@ import {
|
|
goodsDelete,
|
|
goodsDelete,
|
|
updateGoodsStatus
|
|
updateGoodsStatus
|
|
} from '@/api/businessManager'
|
|
} from '@/api/businessManager'
|
|
|
|
+import qs from 'qs'
|
|
import cleanDeep from 'clean-deep'
|
|
import cleanDeep from 'clean-deep'
|
|
import store from '@/store'
|
|
import store from '@/store'
|
|
import Tooltip from '@/components/Tooltip/index'
|
|
import Tooltip from '@/components/Tooltip/index'
|
|
@@ -978,6 +993,14 @@ export default {
|
|
fileName: '商品导入模板.xlsx'
|
|
fileName: '商品导入模板.xlsx'
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ exportShopList(){
|
|
|
|
+ Export(this, {
|
|
|
|
+ url: "/api-web/export/goods",
|
|
|
|
+ params: qs.stringify(cleanDeep(this.searchForm)),
|
|
|
|
+ fileName: '商品导出.xlsx',
|
|
|
|
+ method:'post'
|
|
|
|
+ }, '确定导出商品')
|
|
|
|
+ },
|
|
onFormClose (formName) {
|
|
onFormClose (formName) {
|
|
// 关闭弹窗重置验证
|
|
// 关闭弹窗重置验证
|
|
this.$refs[formName].resetFields();
|
|
this.$refs[formName].resetFields();
|