From 5318a00f815702e707c47c5ce475cfc5981b1046 Mon Sep 17 00:00:00 2001 From: lancer <1905818361@qq.com> Date: Sat, 20 Nov 2021 15:58:12 +0800 Subject: [PATCH] init --- src/api/login.js | 6 +++++- src/page/check/chose.vue | 6 +++--- src/views/Customer/AgentManagement.vue | 20 ++++++++++++++++++-- src/views/Customer/CompanyRecord.vue | 20 ++++++++++++++++++-- src/views/Customer/Companymanagement.vue | 1 + src/views/ReceivingRecords/index.vue | 2 +- src/views/admin/log/index.vue | 2 +- src/views/admin/log/log.vue | 2 +- src/views/building/index.vue | 21 +++++++++++++++++++-- 9 files changed, 67 insertions(+), 13 deletions(-) diff --git a/src/api/login.js b/src/api/login.js index c4c22e4..03450ff 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -82,7 +82,11 @@ export const getUserInfo = (query) => { return request({ url: '/admin/user/info', method: 'get', - params:query + params:{ + orgCode:localStorage.getItem('orgCode'), + agentId:localStorage.getItem('agentId'), + ...query, + } }) } diff --git a/src/page/check/chose.vue b/src/page/check/chose.vue index 4fbc8f1..f013bd2 100644 --- a/src/page/check/chose.vue +++ b/src/page/check/chose.vue @@ -42,7 +42,7 @@ >{{ item.residueTime > 0 ? "服务中" : "已过期" }} -
{{ item.provinceName+'-'+item.cityName|| "暂无" }}
+
{{ (item.provinceName||'-')+'-'+(item.cityName|| "-") }}
@@ -107,7 +107,7 @@ >{{ item.residueTime > 0 ? "服务中" : "已过期" }} --> -
区域位置:{{ item.provinceName+'-'+item.cityName || "暂无" }}
+
区域位置:{{ (item.provinceName||'-')+'-'+(item.cityName|| "-") }}
@@ -172,7 +172,7 @@ >{{ item.residueTime > 0 ? "服务中" : "已过期" }} -
{{ item.provinceName+'-'+item.cityName|| "暂无" }}
+
{{ (item.provinceName||'-')+'-'+(item.cityName|| "-") }}
diff --git a/src/views/Customer/AgentManagement.vue b/src/views/Customer/AgentManagement.vue index ed56ad5..2923bc6 100644 --- a/src/views/Customer/AgentManagement.vue +++ b/src/views/Customer/AgentManagement.vue @@ -387,17 +387,19 @@ export default { orgCode:localStorage.getItem('orgCode'), }) .then(res1=>{ - callback(); + + this.resetFlag=true this.passFlag=true if(this.dialogVisible3){ this.replaceagentobj.managerPassword=res.data.sysUser.resultPwd }else{ this.addagentobj.managerPassword=res.data.sysUser.resultPwd } - + callback(); }) .catch(err=>{ console.log(err) + this.resetFlag=false callback(new Error(err)); }) } else { @@ -409,6 +411,7 @@ export default { }else{ this.addagentobj.managerPassword='' } + this.resetFlag=false this.passFlag=false callback(); @@ -434,6 +437,7 @@ export default { passFlag:false, dialogVisible:false, dialogVisible2:false, + resetFlag:false, dialogVisible3:false, operaVisible:false, timelist:'', @@ -673,6 +677,10 @@ export default { }, //确认编辑 editor(){ + if(!this.resetFlag){ + this.$message.error('平台用户与楼盘用户不能重复添加!') + return + } this.$refs.editoragentobj.validate((valid) => { if (valid) { this.$api.http.editorAgent(this.editoragentobj).then((res) => { @@ -736,6 +744,10 @@ export default { }, //确认更换 replace(){ + if(!this.resetFlag){ + this.$message.error('平台用户与楼盘用户不能重复添加!') + return + } this.$refs.replaceagentobj.validate((valid) => { if (valid) { this.$api.http.updateManagerPhone(this.replaceagentobj).then((res) => { @@ -767,6 +779,10 @@ export default { }, //确认新增 add(){ + if(!this.resetFlag){ + this.$message.error('平台用户与楼盘用户不能重复添加!') + return + } this.$refs.addagentobj.validate((valid) => { if (valid) { this.$api.http.AddAgent(this.addagentobj).then((res) => { diff --git a/src/views/Customer/CompanyRecord.vue b/src/views/Customer/CompanyRecord.vue index b573690..3799fee 100644 --- a/src/views/Customer/CompanyRecord.vue +++ b/src/views/Customer/CompanyRecord.vue @@ -323,17 +323,19 @@ export default { orgCode:localStorage.getItem('orgCode'), }) .then(res1=>{ - callback(); + this.passFlag=true + this.resetFlag=false if(this.dialogVisible3){ this.replaceagentobj.managerPassword=res.data.sysUser.resultPwd }else{ this.addagentobj.managerPassword=res.data.sysUser.resultPwd } - + callback(); }) .catch(err=>{ console.log(err) + this.resetFlag=false callback(new Error(err)); }) } else { @@ -345,6 +347,7 @@ export default { }else{ this.addagentobj.managerPassword='' } + this.resetFlag=false this.passFlag=false callback(); @@ -432,6 +435,7 @@ export default { dialogVisible3:false, operaVisible:false, agentVisible:false, + resetFlag:false, passFlag:false, currentPage4:1, operatorName:'',//代理商名称 @@ -665,6 +669,10 @@ export default { }, //确认编辑 editor(){ + if(!this.resetFlag){ + this.$message.error('平台用户与楼盘用户不能重复添加!') + return + } this.$refs.editoragentobj.validate((valid) => { if (valid) { this.$api.http.updateOrg(this.editoragentobj).then((res) => { @@ -724,6 +732,10 @@ export default { }, //确认更换 replace(){ + if(!this.resetFlag){ + this.$message.error('平台用户与楼盘用户不能重复添加!') + return + } this.$refs.replaceagentobj.validate((valid) => { if (valid) { this.$api.http.changeAccount(this.replaceagentobj).then((res) => { @@ -853,6 +865,10 @@ export default { //确认新增 add(){ + if(!this.resetFlag){ + this.$message.error('平台用户与楼盘用户不能重复添加!') + return + } this.$refs.addagentobj.validate((valid) => { if (valid) { this.addagentobj.pid=0; diff --git a/src/views/Customer/Companymanagement.vue b/src/views/Customer/Companymanagement.vue index 0e54b54..b59327e 100644 --- a/src/views/Customer/Companymanagement.vue +++ b/src/views/Customer/Companymanagement.vue @@ -364,6 +364,7 @@ export default { dialogVisible:false, dialogVisible2:false, dialogVisible3:false, + resetFlag:false, operaVisible:false, agentVisible:false, currentPage4:1, diff --git a/src/views/ReceivingRecords/index.vue b/src/views/ReceivingRecords/index.vue index 4df8ab0..def86dc 100644 --- a/src/views/ReceivingRecords/index.vue +++ b/src/views/ReceivingRecords/index.vue @@ -528,11 +528,11 @@ export default { if (idx == 2) { num = 24 * 3600 * 1000 * 7; } - this.time = [ this.timestampToTime(new Date().getTime() - num), this.timestampToTime(new Date().getTime()), ]; + this.houseChange(); }, timestampToTime(timestamp) { var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000 diff --git a/src/views/admin/log/index.vue b/src/views/admin/log/index.vue index ff0656e..ae9f5ac 100644 --- a/src/views/admin/log/index.vue +++ b/src/views/admin/log/index.vue @@ -4,7 +4,7 @@
-
添加时间
+
登录时间:
-
添加时间:
+
登录时间:
- + 正式 试用 演示 @@ -583,16 +587,19 @@ export default { orgCode:localStorage.getItem('orgCode'), }) .then(res1=>{ - callback(); + this.resetFlag=true this.passFlag=true if(this.changeFlag){ this.accountForm.managerPassword=res.data.sysUser.resultPwd }else{ this.ruleForm.managerPassword=res.data.sysUser.resultPwd } + callback(); }) .catch(err=>{ console.log(err) + // + this.resetFlag=false callback(new Error(err)); }) } else { @@ -604,6 +611,7 @@ export default { }else{ this.ruleForm.managerPassword='' } + this.resetFlag=false this.passFlag=false callback(); @@ -647,6 +655,7 @@ export default { editFlag: false, changeFlag: false, operaVisible: false, + resetFlag:false, passFlag:false, starTime: [], searchForm: { @@ -912,6 +921,10 @@ export default { }, // 添加楼盘 addSure() { + if(!this.resetFlag){ + this.$message.error('平台用户与楼盘用户不能重复添加!') + return + } // console.log(this.addressOptions) this.$refs.ruleForm.validate((valid) => { if (valid) { @@ -1019,6 +1032,10 @@ export default { this.accountForm.id = row.id; }, changeSure() { + if(!this.resetFlag){ + this.$message.error('平台用户与楼盘用户不能重复添加!') + return + } this.$refs.accountForm.validate((valid) => { if (valid) { this.$api.api.updateManagerPhone(this.accountForm).then((res) => {