推广人员批量添加

master
zhuhaoyu 6 years ago
parent 8d4025f99f
commit 4312a6f990

@ -24,7 +24,7 @@
</i-col>
<i-col span="12" style="text-align: right;padding-right: 20px;">
<Button type="primary" style="margin-right: 10px;">批量下载</Button>
<Button type="primary" style="margin-right: 10px;">批量添加</Button>
<Button type="primary" style="margin-right: 10px;" to="/shop/increase/manager/staff/batch/add">批量添加</Button>
<Button type="primary" @click="open(1)">广</Button>
</i-col>
</Row>

@ -0,0 +1,67 @@
<template>
<div>
<Row style="text-align: center;margin-bottom: 20px;">
<p>
导入说明请下载模板然后将资料填到模板中
<a href="../../../static/excel/推广人员批量添加.xlsx" download="推广人员批量添加.xlsx">下载模板</a>
</p>
</Row>
<Upload
multiple
type="drag"
:action="uploadUrl" :data="data" :on-success="upSuccess" :on-error="upError">
<div style="padding: 20px 0">
<Icon type="ios-cloud-upload" size="70" style="color: #3399ff"></Icon>
<p>将文件拖拽到此区域</p>
</div>
</Upload>
<Table style="margin-top: 30px" :columns="columns1" :data="data1"></Table>
</div>
</template>
<script>
export default {
name: "IncreaseStaffManagerBatchAdd",
data() {
return {
uploadUrl:"/store/staff/upload",
data:{
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId,
},
columns1: [
{
title: '序号',
type: 'index',
width: 100,
align: 'center',
}, {
title: '错误信息',
key: 'error',
align: 'center',
},],
data1: []
}
},
mounted() {
},
methods: {
upSuccess(response, res, file) {
console.log("1111");
if (!response.results) {
this.$message.info("上传成功")
} else {
let data = response.results;
this.data1 = data;
this.$message.info("上传失败,请查看错误信息")
}
},
upError(response) {
this.$message.info("上传失败,请稍后再试")
},
}
}
</script>
<style scoped>
</style>

@ -16,6 +16,7 @@ import IncreaseDataRegion from '@/pages/shop/IncreaseDataRegion';
import IncreaseDataStaff from '@/pages/shop/IncreaseDataStaff';
import IncreaseDataStore from '@/pages/shop/IncreaseDataStore';
import IncreaseStaffManager from '@/pages/shop/IncreaseStaffManager';
import IncreaseStaffManagerBatchAdd from '@/pages/shop/IncreaseStaffManagerBatchAdd';
import IncreaseStoreManager from '@/pages/shop/IncreaseStoreManager';
@ -87,6 +88,11 @@ const router = new Router({
path: '/shop/increase/manager/staff',
name: 'IncreaseStaffManager',
component: IncreaseStaffManager
},
{
path: '/shop/increase/manager/staff/batch/add',
name: 'IncreaseStaffManagerBatchAdd',
component: IncreaseStaffManagerBatchAdd
}
]
},

Loading…
Cancel
Save