|
|
|
@ -26,7 +26,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" @click="isShowImport = true" style="margin-right: 10px;">批量开通</Button>
|
|
|
|
|
<Button type="primary" @click="showImport" style="margin-right: 10px;">批量开通</Button>
|
|
|
|
|
</i-col>
|
|
|
|
|
</Row>
|
|
|
|
|
</i-col>
|
|
|
|
@ -135,10 +135,10 @@
|
|
|
|
|
|
|
|
|
|
<div v-show="isShowError" style="width: 100%;height: 200px;background-color: #FEE6EE;overflow-y: auto;">
|
|
|
|
|
<p>导入失败:</p>
|
|
|
|
|
<p v-for="item in errorList" :key="item.row">item.reason</p>
|
|
|
|
|
<p style="margin-left: 40px" v-for="item in errorList" :value="item.row" :key="item.row">{{item.reason}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style="text-align: center;background-color:#FAFAFC;height: 80px;line-height: 80px;width:50%;margin-left: 25%">
|
|
|
|
|
<div style="text-align: center;background-color:#FAFAFC;height: 80px;line-height: 80px;width:50%;margin-left: 25%;margin-top: 10px">
|
|
|
|
|
导入说明:请下载模板,然后将资料填到模板中
|
|
|
|
|
<Button
|
|
|
|
|
style="color: #2074E2;border: 1px solid #2074E2;width: 97px;height: 28px"
|
|
|
|
@ -149,8 +149,9 @@
|
|
|
|
|
<Upload
|
|
|
|
|
multiple
|
|
|
|
|
type="drag"
|
|
|
|
|
:before-upload="handleUpload"
|
|
|
|
|
action="/store/emp/import" style="margin-top:30px;width:50%;margin-left: 25%">
|
|
|
|
|
:action="updateUrl"
|
|
|
|
|
:on-success="updateSuccess"
|
|
|
|
|
style="margin-top:30px;width:50%;margin-left: 25%">
|
|
|
|
|
<div style="padding: 20px 0;background-color:#FAFAFC">
|
|
|
|
|
<Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
|
|
|
|
|
<p>点击或拖拽文件</p>
|
|
|
|
@ -174,6 +175,7 @@
|
|
|
|
|
isShowError: false,
|
|
|
|
|
isShowAdd: false,
|
|
|
|
|
showStoreName: '',
|
|
|
|
|
updateUrl: http.getBaseUrl() + "/store/emp/import",
|
|
|
|
|
qrCodeImage: '',
|
|
|
|
|
selectedRegion: null,
|
|
|
|
|
regionList: [],
|
|
|
|
@ -304,7 +306,10 @@
|
|
|
|
|
remove: function () {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
showImport(){
|
|
|
|
|
this.isShowImport = true;
|
|
|
|
|
this.isShowError = false
|
|
|
|
|
},
|
|
|
|
|
handleSubmit (name) {
|
|
|
|
|
this.$refs[name].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
@ -322,15 +327,14 @@
|
|
|
|
|
downLoadImportExcel(){
|
|
|
|
|
window.location.href = '/门店号批量开通模板.xlsx'
|
|
|
|
|
},
|
|
|
|
|
handleUpload (file) { // 上传文件前的事件钩子
|
|
|
|
|
var params = {
|
|
|
|
|
file:file
|
|
|
|
|
updateSuccess (response) {
|
|
|
|
|
if (response.code === "0000") {
|
|
|
|
|
let data = response.results;
|
|
|
|
|
if (data && data.length > 0){
|
|
|
|
|
this.errorList = data;
|
|
|
|
|
this.isShowError = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var that = this;
|
|
|
|
|
http.uploadUser(params,function (data) {
|
|
|
|
|
that.errorList = data.data.results;
|
|
|
|
|
})
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|