diff --git a/public/门店号批量开通模板.xlsx b/public/门店号批量开通模板.xlsx deleted file mode 100644 index 89fc8f2..0000000 Binary files a/public/门店号批量开通模板.xlsx and /dev/null differ diff --git a/public/门店推广号批量开通模板.xlsx b/public/门店推广号批量开通模板.xlsx new file mode 100644 index 0000000..5c05330 Binary files /dev/null and b/public/门店推广号批量开通模板.xlsx differ diff --git a/src/App.vue b/src/App.vue index 7402194..7c867d9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -37,8 +37,8 @@ .search-span { font-size: 16px; line-height: 32px; - margin-left: 20px; - margin-right: 20px; + margin-left: 10px; + margin-right: 10px; } .search-row{ diff --git a/src/pages/analysis/AddCustomerTable.vue b/src/pages/analysis/AddCustomerTable.vue index cb26639..b38f932 100644 --- a/src/pages/analysis/AddCustomerTable.vue +++ b/src/pages/analysis/AddCustomerTable.vue @@ -1,14 +1,14 @@ - - - + @@ -63,60 +63,23 @@
开通企业微信号
- - + + - + - - - - - - - - - - - - + - + - - - - - - - 通过邮箱或短信发送企业邀请 - - - - + @@ -185,7 +148,7 @@ isShowError: false, isShowAdd: false, showStoreName: '', - updateUrl: http.getBaseUrl() + "/store/emp/import", + updateUrl: http.getBaseUrl() + "/store/emp/staff/import", downLoadStoreCodeUrl: http.getBaseUrl() + "/store/emp/download/store/code", qrCodeImage: '', selectedRegion: 0, @@ -199,7 +162,6 @@ companyList: [], customerList: [], companyId: 0, - errorList: [], selectedStore: 0, shopList: [], @@ -261,72 +223,23 @@ slot: 'action' } ], - data1: [ - /* { - id: 1, - storeName: '店铺1', - storeWx: 'D1', - staffNum: 10, - customerNum: 999 - }, - { - id: 2, - storeName: '店铺2', - storeWx: 'D2', - staffNum: 10, - customerNum: 999 - }, - { - id: 3, - storeName: '店铺3', - storeWx: 'D3', - staffNum: 10, - customerNum: 999 - }, - { - id: 4, - storeName: '店铺4', - storeWx: 'D4', - staffNum: 10, - customerNum: 999 - }*/ - ], - // 开通企业微信 表单 + data1: [], formValidate: { alias: '', - userId: '', - gender: '', + id: '', + cpUserId: '', mobile: '', - email: '', - address: '', - departIds: '', - selectedPhoneRegion: '86', - duty: '', - position: '', - interest: [], - desc: '', checkbox: ['vail'], storeId: '', + cpUserName: '', + shopName: '' }, ruleValidate: { - userId: [ - {required: true, message: '账号不能为空', trigger: 'blur'} - ], - // gender: [ - // { required: true, message: '请选择性别', trigger: 'change' } - // ], mobile: [ {required: true, message: '手机号码不能为空', trigger: 'blur'} ], - // mail: [ - // { required: true, message: '邮箱不能为空', trigger: 'blur' }, - // { type: 'email', message: '邮箱格式错误', trigger: 'blur' } - // ], - departIds: [ - {required: true, message: '请选择部门', trigger: 'change'} - ], - storeId: [ - {required: true, message: '请选择部门', trigger: 'change'}, + cpUserName: [ + {required: true, message: '名称不能为空', trigger: 'blur'} ] } } @@ -335,8 +248,6 @@ this.setMenuName("门店推广", "推广管理"); this.listOfStore(); this.getSelectList(); - // this.downBigRegionData(); - // this.downRegionData(); this.downShopData(); }, methods: { @@ -379,19 +290,14 @@ that.loading = false; }); }, - addStoreWX: function (request) { + modifyStoreWX: function (request) { let that = this; - http.addStoreWX(request, function (data) { + http.modifyStoreWX(request, function (data) { data = data.data; if (data.code == "0000") { - if (data.results.indexOf("8888") != -1) { - let str = data.results.split(","); - that.$Message.success('该企业微信已被 【' + str[1] + '】绑定 请从新绑定微信号'); - } else { - that.$Message.success('添加成功!'); - that.listOfStore(); - this.handleAdd(this.formValidate); - } + that.$Message.success('修改成功!'); + that.listOfStore(); + this.handleAdd(this.formValidate); } }) }, @@ -442,7 +348,9 @@ this.downShopData(); }, //零售公司选择 - companySelect: function () { + companySelect: function (value) { + this.companyId = value; + //加载店铺 this.downShopData(this.companyId); this.selectedStore = 0; @@ -526,9 +434,19 @@ cancel: function () { this.isShow = false; }, - open: function () { + open: function (item) { this.isShowAdd = true; + this.formValidate = { + alias: item.alias, + cpUserName: item.cpUserName, + cpUserId: item.cpUserId, + id: item.userId, + mobile: item.mobile, + checkbox: ['vail'], + storeId: item.id, + shopName: item.name + } }, remove: function () { @@ -537,10 +455,10 @@ this.isShowImport = true; this.isShowError = false }, - handleSubmit(name) { - if (name) { + handleSubmit(value) { + if (value) { // 调用添加接口 - this.addStoreWX(name); + this.modifyStoreWX(value); } else { this.$Message.error('Fail!'); } @@ -550,7 +468,7 @@ this.isShowAdd = false; }, downLoadImportExcel() { - window.location.href = '/门店号批量开通模板.xlsx' + window.location.href = '/门店推广号批量开通模板.xlsx' }, handleAdd(value) { value.alias = '', @@ -569,10 +487,14 @@ value.storeId = '' }, downloadStoreCode() { - http.downloadStoreCode({}, null); + this.loading = true; + let that = this; + http.downloadStoreCode({page:that}, null); }, downloadStoreSellerCode() { - http.downloadStoreSellerCode({}, null); + this.loading = true; + let that = this; + http.downloadStoreSellerCode({page:that}, null); }, updateSuccess(response) { if (response.code === "0000") { diff --git a/src/pages/user/AccountManagementModify.vue b/src/pages/user/AccountManagementModify.vue index 517c280..4b962b5 100644 --- a/src/pages/user/AccountManagementModify.vue +++ b/src/pages/user/AccountManagementModify.vue @@ -113,12 +113,10 @@ ], userName:[ {required:true,message:'用户名不能为空',trigger:'blur'}, - { min: 1, max: 8, message: '长度在 1 到 8 个字符', trigger: 'blur' }, { pattern: /^[\u4e00-\u9fa5_0-9a-zA-Z]+$/, message: '只可以输入数字,字母,中文',trigger: 'blur'} ], account:[ {required:true,message:'账号不能为空',trigger:'blur'}, - { min: 2, max: 8, message: '长度在 2 到 8 个字符', trigger: 'blur' }, { pattern: /^[0-9a-zA-Z]*$/g, message: '只可以输入数字和字母',trigger: 'blur'}, ], password:null, diff --git a/src/pages/user/AccountManager.vue b/src/pages/user/AccountManager.vue index 19c938e..ed67c0d 100644 --- a/src/pages/user/AccountManager.vue +++ b/src/pages/user/AccountManager.vue @@ -2,29 +2,32 @@
@@ -45,10 +48,14 @@ diff --git a/src/pages/user/AccountManagerAdd.vue b/src/pages/user/AccountManagerAdd.vue index 32b2902..9e10f77 100644 --- a/src/pages/user/AccountManagerAdd.vue +++ b/src/pages/user/AccountManagerAdd.vue @@ -103,12 +103,10 @@ addValidate: { userName: [ {required: true, message: '用户名不能为空', trigger: 'blur'}, - {min: 1, max: 8, message: '长度在 1 到 8 个字符', trigger: 'blur'}, {pattern: /^[\u4e00-\u9fa5_0-9a-zA-Z]+$/, message: '只可以输入数字,字母,中文', trigger: 'blur'} ], account: [ {required: true, message: '账号不能为空', trigger: 'blur'}, - {min: 2, max: 8, message: '长度在 2 到 8 个字符', trigger: 'blur'}, {pattern: /^[0-9a-zA-Z]*$/g, message: '只可以输入数字和字母', trigger: 'blur'}, ], mobil: [ diff --git a/src/router/index.js b/src/router/index.js index 8de1026..0d14182 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,7 +14,8 @@ import TableAnalysis from "@/pages/TableAnalysis"; import AddCustomerTable from "@/pages/analysis/AddCustomerTable"; import ApplyCustomerTable from "@/pages/analysis/ApplyCustomerTable"; import ZeroExtendDetail from "@/pages/home/ZeroExtendDetail"; -import CustomerDetail from "@/pages/home/CustomerDetail"; +import CustomerDetail from "@/pages/data/CustomerDetail"; +import StoreDetail from "@/pages/data/StoreDetail"; import IncreaseData from '@/pages/shop/IncreaseData'; import IncreaseDataCompany from '@/pages/shop/IncreaseDataCompany'; import IncreaseDataStaff from '@/pages/shop/IncreaseDataStaff'; @@ -211,6 +212,11 @@ const router = new Router({ name: 'CustomerDetail', component: CustomerDetail, }, + { + path: '/store/data/detail', + name: 'StoreDetail', + component: StoreDetail, + }, { path: '/no/permission', name: 'NoPermission', diff --git a/src/services/CommonHttp.js b/src/services/CommonHttp.js index f5e6d86..5cdcff0 100755 --- a/src/services/CommonHttp.js +++ b/src/services/CommonHttp.js @@ -6,11 +6,11 @@ import commonUtils from '../utils/Common' //base url // http://mf.kiisoo.com:58080/ -// axios.defaults.baseURL = 'https://wxtk.bsdits.com/kiisoo-ic/'; -axios.defaults.baseURL = '/kiisoo-ic'; +axios.defaults.baseURL = 'https://wxtk.bsdits.com/kiisoo-ic/'; +// axios.defaults.baseURL = '/ic'; //响应时间 -axios.defaults.timeout = 120000; +axios.defaults.timeout = 3600000; axios.defaults.withCredentials=true; //配置请求头 @@ -200,7 +200,7 @@ export function downloadZip(url,filename, options = {}) { axios({ method: 'post', url: url, // 请求地址 - data: options, // 参数 + data: {}, // 参数 responseType: 'blob' // 表明返回服务器返回的数据类型 }).then( response => { @@ -222,8 +222,10 @@ export function downloadZip(url,filename, options = {}) { //释放内存 window.URL.revokeObjectURL(link.href) } + options.page.loading = false }, err => { + options.page.loading = false reject(err) } ) diff --git a/src/services/account/AccountManagement.js b/src/services/account/AccountManagement.js index d00cc95..3ec9abc 100644 --- a/src/services/account/AccountManagement.js +++ b/src/services/account/AccountManagement.js @@ -11,8 +11,8 @@ import http from '../CommonHttp' * @param call * @returns {Promise} */ -export function listAccountInfoApi(params, call) { - return http.post('account/info/list', params).then(call); +export function listAccountInfoApi(params, call, errorCallback) { + return http.post('account/info/list', params).then(call).catch(errorCallback); } /** * 删除账号 diff --git a/src/services/datacenter/DataCenter.js b/src/services/datacenter/DataCenter.js index abb19fd..eadbfcd 100644 --- a/src/services/datacenter/DataCenter.js +++ b/src/services/datacenter/DataCenter.js @@ -2,7 +2,7 @@ * 客户数据明细 */ -import http from '../CommonHttp' +import http, {downloadExcel} from '../CommonHttp' /** * 查询客户数据明细 @@ -11,6 +11,19 @@ export function dataDetail(params, call, errorCallBack) { return http.post('/customer/info',params).then(call).catch(errorCallBack) } +/** + * 查询客户数据明细 + */ +export function storeDataDetail(params, call, errorCallBack) { + return http.post('/store/promotion/data/behavior',params).then(call).catch(errorCallBack) +} +/** + * 查询客户数据明细 + */ +export function downloadstoreDataDetailExcel(params,call) { + return http.downloadExcel('/store/promotion/data/behavior/excel','店铺号数据',params).then(call) +} + /** * 下拉框数据导购 */ @@ -49,6 +62,8 @@ export function downCompanyData(params, call) { export default { dataDetail: dataDetail, downSellerData: downSellerData, + storeDataDetail, + downloadstoreDataDetailExcel, downShopData, downRegionData, editCustomerData, diff --git a/src/services/store/IncreaseStoreManager.js b/src/services/store/IncreaseStoreManager.js index 8da0563..c6fd64a 100644 --- a/src/services/store/IncreaseStoreManager.js +++ b/src/services/store/IncreaseStoreManager.js @@ -21,6 +21,9 @@ export function storeList(params, call, errorCallBack) { export function addStoreWX(params, call) { return http.post('/user/add', params).then(call); } +export function modifyStoreWX(params, call) { + return http.post('/user/update', params).then(call); +} export function downloadImg(params,name, call) { return http.downloadImg('/user/img/download',name, params).then(call); } @@ -78,6 +81,7 @@ export default { getBaseUrl, storeList, addStoreWX, + modifyStoreWX, downloadImg, downCompanyData, downBigRegionData, diff --git a/vue.config.js b/vue.config.js index 5dbb489..853dbc6 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,48 +1,36 @@ module.exports = { - /* 部署生产环境和开发环境下的URL:可对当前环境进行区分,baseUrl 从 Vue CLI 3.3 起已弃用,要使用publicPath */ - /* baseUrl: process.env.NODE_ENV === 'production' ? './' : '/' */ + /* 部署生产环境和开发环境下的URL:可对当前环境进行区分,baseUrl 从 Vue CLI 3.3 起已弃用,要使用publicPath */ + /* baseUrl: process.env.NODE_ENV === 'production' ? './' : '/' */ - /* 用于默认#模式 */ - // publicPath: process.env.NODE_ENV === 'production' ? '/public/' : './', + /* 用于默认#模式 */ + // publicPath: process.env.NODE_ENV === 'production' ? '/public/' : './', - /* history模式 */ - publicPath: process.env.NODE_ENV === "production" ? "/dist/" : "/", - /* 输出文件目录:在npm run build时,生成文件的目录名称 */ - outputDir: "dist", - /* 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录 */ - assetsDir: "assets", - /* 是否在构建生产包时生成 sourceMap 文件,false将提高构建速度 */ - productionSourceMap: false, - /* 默认情况下,生成的静态资源在它们的文件名中包含了 hash 以便更好的控制缓存,你可以通过将这个选项设为 false 来关闭文件名哈希。(false的时候就是让原来的文件名不改变) */ - filenameHashing: false, - /* 代码保存时进行eslint检测 */ - lintOnSave: true, - /* webpack-dev-server 相关配置 */ - devServer: { - /* 自动打开浏览器 */ - open: true, - /* 设置为0.0.0.0则所有的地址均能访问 */ - host: "0.0.0.0", - port: 8311, - https: false, - hotOnly: false, - disableHostCheck: true, - /* 使用代理 后台接口路径 */ - // proxy: 'http://192.168.1.123:8312/' - // proxy: 'http://192.168.31.177:8312/' - proxy: "http://localhost:8312/", - // proxy: 'http://jdxdev.vipgz4.idcfengye.com/' - }, - chainWebpack: (config) => { - config.module - .rule("css") - .test(/\.css$/) - .oneOf("vue") - .resourceQuery(/\?vue/) - .use("px2rem") - .loader("px2rem-loader") - .options({ - remUnit: 40, - }); - }, -}; + /* history模式 */ + publicPath: process.env.NODE_ENV === 'production' ? '/dist/' : '/', + /* 输出文件目录:在npm run build时,生成文件的目录名称 */ + outputDir: 'dist', + /* 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录 */ + assetsDir: "assets", + /* 是否在构建生产包时生成 sourceMap 文件,false将提高构建速度 */ + productionSourceMap: false, + /* 默认情况下,生成的静态资源在它们的文件名中包含了 hash 以便更好的控制缓存,你可以通过将这个选项设为 false 来关闭文件名哈希。(false的时候就是让原来的文件名不改变) */ + filenameHashing: false, + /* 代码保存时进行eslint检测 */ + lintOnSave: true, + /* webpack-dev-server 相关配置 */ + devServer: { + /* 自动打开浏览器 */ + open: true, + /* 设置为0.0.0.0则所有的地址均能访问 */ + host: '0.0.0.0', + port: 8311, + https: false, + hotOnly: false, + disableHostCheck: true, + /* 使用代理 后台接口路径 */ + // proxy: 'http://192.168.1.123:8312/' + // proxy: 'http://192.168.31.177:8312/' + proxy: 'http://localhost:8312/' + // proxy: 'http://jdxdev.vipgz4.idcfengye.com/' + } +}