点击或拖拽文件
@@ -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;
}
}
}
diff --git a/src/services/store/IncreaseStoreManager.js b/src/services/store/IncreaseStoreManager.js
index f36c298..d500db5 100644
--- a/src/services/store/IncreaseStoreManager.js
+++ b/src/services/store/IncreaseStoreManager.js
@@ -4,6 +4,7 @@
* @date 2020/4/14
*/
import http from '../CommonHttp'
+import axios from "axios";
/**
* 上传文件
@@ -15,6 +16,12 @@ export function uploadUser(params, call) {
return http.post('/store/emp/import', params).then(call);
}
+
+export function getBaseUrl() {
+ return axios.defaults.baseURL;
+}
+
export default {
- uploadUser
+ uploadUser,
+ getBaseUrl
}