diff --git a/src/views/Equipment/equipmentOnlineRecordList.vue b/src/views/Equipment/equipmentOnlineRecordList.vue
index b6accff..2af6402 100644
--- a/src/views/Equipment/equipmentOnlineRecordList.vue
+++ b/src/views/Equipment/equipmentOnlineRecordList.vue
@@ -423,7 +423,8 @@ export default {
method: "get",
params:{
orgType:this.orgType,
- agentId:localStorage.getItem("agentId")
+ agentId:localStorage.getItem("agentId"),
+ orgCode:localStorage.getItem("orgCode"),
}
}).then((res) => {
// console.log(res.data.obj)
diff --git a/src/views/building/index.vue b/src/views/building/index.vue
index b38761d..803d1c5 100644
--- a/src/views/building/index.vue
+++ b/src/views/building/index.vue
@@ -43,12 +43,27 @@
-->
-
+
地区:
-->
筛选相关:
-
-
筛选
+
+ 筛选
清空筛选条件
- 新增
@@ -185,13 +193,19 @@
-
-
-
+
+
-
+
-
-
- {{ row.linkman +'-' +row.linkmanPhone || "-" }}
+
+
+ {{ row.linkman + "-" + row.linkmanPhone || "-" }}
-
@@ -228,12 +254,21 @@
-
-
-
+
{{
- row.houseType == 0 ? "正式" : row.houseType == 1 ? "试用" :row.houseType == 2? "演示":'测试'
+ row.houseType == 0
+ ? "正式"
+ : row.houseType == 1
+ ? "试用"
+ : row.houseType == 2
+ ? "演示"
+ : "测试"
}}
@@ -241,50 +276,91 @@
+ align="center"
+ >
-
-
-
- {{row.createTime.substring(0,10)}}
+
+
+ {{ row.createTime.substring(0, 10) }}
- 服务中({{scope.row.residueTime*1>=0?scope.row.residueTime:scope.row.residueTime*-1}})
- 过期({{scope.row.residueTime*1>=0?scope.row.residueTime:scope.row.residueTime*-1}})
+
+ 服务中({{
+ scope.row.residueTime * 1 >= 0
+ ? scope.row.residueTime
+ : scope.row.residueTime * -1
+ }})
+
+
+ 过期({{
+ scope.row.residueTime * 1 >= 0
+ ? scope.row.residueTime
+ : scope.row.residueTime * -1
+ }})
+
-
+
- {{row.lockFlag==1?'禁用':'启用'}}
+ {{ row.lockFlag == 1 ? "禁用" : "启用" }}
- 编辑
编辑
+ 更换账号
- 系统运营
- 售后运营
- 绑定代理商
- 删除
- {{row.lockFlag==0?'禁用':'启用'}}
+ 系统运营
+ 售后运营
+ 绑定代理商
+ 删除
+ {{ row.lockFlag == 0 ? "禁用" : "启用" }}
-
-
-
+
-
+
正式
试用
演示
@@ -334,7 +414,11 @@
-
+
-
+
-
+
-
+
@@ -403,7 +501,7 @@
- 保存
+ 保存
@@ -431,7 +529,7 @@
@@ -443,8 +541,10 @@
-
-
+
{
- // console.log(res);
- // 判断数据是否已经有了
- if (res.data) {
- // 由用户
- this.$api.api.userVerify({
- houseId:this.accountForm.id,
- orgType:3,
- accountId:res.data.sysUser.accountId,
- username:res.data.sysUser.username,
- agentId:localStorage.getItem('agentId'),
- orgCode:localStorage.getItem('orgCode'),
- })
- .then(res1=>{
- this.resetFlag=true
- this.passFlag=true
- if(this.changeFlag){
- this.accountForm.managerPassword=res.data.sysUser.resultPwd
- }else{
- this.ruleForm.managerPassword=res.data.sysUser.resultPwd
+ } else {
+ // 验证电话号码
+ this.$api.api.verPhone(value).then((res) => {
+ // console.log(res);
+ // 判断数据是否已经有了
+ if (res.data) {
+ // 由用户
+ this.$api.api
+ .userVerify({
+ houseId: this.accountForm.id,
+ orgType: 3,
+ accountId: res.data.sysUser.accountId,
+ username: res.data.sysUser.username,
+ agentId: localStorage.getItem("agentId"),
+ orgCode: localStorage.getItem("orgCode"),
+ })
+ .then((res1) => {
+ 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 {
+ // 没有用户
+ // console.log("没有用户");
+ // callback(new Error("没有管理员账号"));
+ if (this.changeFlag) {
+ this.accountForm.managerPassword = "";
+ } else {
+ this.ruleForm.managerPassword = "";
}
+ this.resetFlag = true;
+ this.passFlag = false;
callback();
- })
- .catch(err=>{
- console.log(err)
- //
- this.resetFlag=false
- callback(new Error(err));
- })
- } else {
- // 没有用户
- // console.log("没有用户");
- // callback(new Error("没有管理员账号"));
- if(this.changeFlag){
- this.accountForm.managerPassword=''
- }else{
- this.ruleForm.managerPassword=''
- }
- this.resetFlag=true
- this.passFlag=false
- callback();
-
- }
- });
+ }
+ });
}
}
callback();
@@ -622,22 +724,23 @@ export default {
editFlag: false,
changeFlag: false,
operaVisible: false,
- resetFlag:false,
- passFlag:false,
+ resetFlag: false,
+ passFlag: false,
starTime: [],
searchForm: {
corporateName: "",
propertyName: "",
- provinceId:'',
+ provinceId: "",
serviceStatus: "",
houseType: "",
+ timeType:'0',
// residueTime: 7,
startWorking: "",
endWorking: "",
agentName: "",
operationalPeople: "",
},
- areaList:[],
+ areaList: [],
options1: [
{
value: "0",
@@ -666,13 +769,23 @@ export default {
label: "测试",
},
],
+ timeTypeList: [
+ {
+ value: "0",
+ label: "添加时间",
+ },
+ {
+ value: "1",
+ label: "合同结束日期",
+ },
+ ],
currentPage: 1,
size: 10,
total: 10,
value: "",
input: "",
- sysFlag:'0',
- idx:'0',
+ sysFlag: "0",
+ idx: "0",
tableData: [],
optionsoperationalPeople: [],
orgType: "",
@@ -680,7 +793,7 @@ export default {
operationList: [],
dialogVisible: false,
dialogVisible1: false,
- agentVisible:false,
+ agentVisible: false,
time: [],
addressOptions: [],
accountForm: {
@@ -690,10 +803,16 @@ export default {
accountRules: {
managerPhone: [
{ required: true, message: "请填写账号", trigger: "blur" },
- { validator: validatePass1, trigger: "blur" }],
+ { validator: validatePass1, trigger: "blur" },
+ ],
managerPassword: [
{ required: true, message: "请填写密码", trigger: "blur" },
- { min: 6, max: 18, message: '请输入6~18位,数字或字母组合的密码', trigger: 'blur' }
+ {
+ min: 6,
+ max: 18,
+ message: "请输入6~18位,数字或字母组合的密码",
+ trigger: "blur",
+ },
],
},
ruleForm: {
@@ -711,10 +830,10 @@ export default {
managerPassword: "", //密码
provinceId: "", //省id
cityId: "", //市id
- agentId:localStorage.getItem('agentId')
+ agentId: localStorage.getItem("agentId"),
},
ruleForm1: {},
- optionsagentId:[],
+ optionsagentId: [],
rules: {
orgCode: [{ required: true, message: "请选择公司", trigger: "blur" }],
propertyName: [
@@ -722,19 +841,24 @@ export default {
],
managerPassword: [
{ required: true, message: "请填写密码", trigger: "blur" },
- { min: 6, max: 18, message: '请输入6~18位,数字或字母组合的密码', trigger: 'blur' }
+ {
+ min: 6,
+ max: 18,
+ message: "请输入6~18位,数字或字母组合的密码",
+ trigger: "blur",
+ },
],
startWorking: [
{ required: true, message: "请选择时间", trigger: "change" },
],
managerPhone: [
- { required: true, message: "请填写账号", trigger: "change" },
- { validator: validatePass1, trigger: "blur" }
- ],
+ { required: true, message: "请填写账号", trigger: "change" },
+ { validator: validatePass1, trigger: "blur" },
+ ],
linkmanPhone: [{ validator: validatePass, trigger: "blur" }],
- provinceId:[
- { required: false, message: "请选择省市", trigger: "change" },
- ]
+ provinceId: [
+ { required: false, message: "请选择省市", trigger: "change" },
+ ],
},
operaForm: {
operationalPeople: "",
@@ -748,11 +872,11 @@ export default {
agentId: [{ required: true, message: "请选择代理商", trigger: "blur" }],
},
agentForm: {
- agentId:'',
+ agentId: "",
},
};
},
- computed: {
+ computed: {
...mapGetters(["permissions"]),
},
created() {
@@ -761,36 +885,35 @@ export default {
this.cus_build_index_change = this.permissions["cus_build_index_change"];
this.cus_build_index_sys = this.permissions["cus_build_index_sys"];
this.cus_build_index_agent = this.permissions["cus_build_index_agent"];
- this.cus_build_index_bindAgent = this.permissions["cus_build_index_bindAgent"];
+ this.cus_build_index_bindAgent =
+ this.permissions["cus_build_index_bindAgent"];
this.cus_build_index_del = this.permissions["cus_build_index_del"];
this.cus_build_index_open = this.permissions["cus_build_index_open"];
},
mounted() {
- if(this.$route.query.serviceStatus){
- this.starTime=this.$route.query.residueTime;
- this.searchForm.startWorking=this.starTime[0];
- this.searchForm.endWorking=this.starTime[1];
- this.searchForm.serviceStatus=this.$route.query.serviceStatus;
- this.searchForm.houseType='0'
- }
+ if (this.$route.query.serviceStatus) {
+ this.starTime = this.$route.query.residueTime;
+ this.searchForm.startWorking = this.starTime[0];
+ this.searchForm.endWorking = this.starTime[1];
+ this.searchForm.serviceStatus = this.$route.query.serviceStatus;
+ this.searchForm.houseType = "0";
+ }
this.orgType = localStorage.getItem("orgType");
// 获取公司列表数据
this.getOrgList();
// 获取运营人员
// this.getAllOperationsStaff();
// 获取地区列表
- this.getCityList()
+ this.getCityList();
// 获取列表数据
this.zkhousePage();
-
},
methods: {
- getCityList(){
- this.$api.api.getAreaList({parentId:0})
- .then(res=>{
+ getCityList() {
+ this.$api.api.getAreaList({ parentId: 0 }).then((res) => {
// console.log(res,'地区列表');
- this.areaList=res.data
- })
+ this.areaList = res.data;
+ });
},
bindAgent(row) {
// console.log(row);
@@ -820,7 +943,7 @@ export default {
this.optionsagentId = res.data;
this.agentForm.orgCode = row.orgCode;
this.agentForm.houseId = row.id;
- this.agentForm.agentId=row.agentId
+ this.agentForm.agentId = row.agentId;
});
},
saveOpera() {
@@ -833,7 +956,7 @@ export default {
accountIds: this.operaForm.operationalPeople.join(","),
orgId: this.operaForm.orgId,
orgCode: this.operaForm.orgCode,
- operationType:this.idx==0?'1':'2'
+ operationType: this.idx == 0 ? "1" : "2",
})
.then((res) => {
console.log(res);
@@ -844,23 +967,23 @@ export default {
}
});
},
- editOpera(row,idx) {
+ editOpera(row, idx) {
// console.log(row,idx);
// 获取运营人员列表
this.operaForm.orgId = row.id;
this.operaForm.orgCode = row.orgCode;
- this.sysFlag=idx
- this.idx=idx
- this.AllOperationsStaff(idx,row);
- this.zkoperationrecordFindByOrg(row.id,idx,row.agentId);
+ this.sysFlag = idx;
+ this.idx = idx;
+ this.AllOperationsStaff(idx, row);
+ this.zkoperationrecordFindByOrg(row.id, idx, row.agentId);
},
- zkoperationrecordFindByOrg(orgId,idx,agentId) {
+ zkoperationrecordFindByOrg(orgId, idx, agentId) {
this.$api.api
.zkoperationrecordFindByOrg({
- orgType:3,
+ orgType: 3,
orgId,
agentId,
- operationType:this.idx==0?'1':'2'
+ operationType: this.idx == 0 ? "1" : "2",
})
.then((res) => {
// console.log(res);
@@ -878,30 +1001,32 @@ export default {
});
},
//获取运营人员
- AllOperationsStaff(idx,row) {
+ AllOperationsStaff(idx, row) {
console.log(idx);
this.optionsoperationalPeople = [];
- if(idx==1){
- this.$api.http.getAllOperationsStaffByAgent({
- agentId:row.agentId
- }).then((res) => {
- this.optionsoperationalPeople= res.data
- this.operaVisible = true;
- });
- }else{
- this.$api.http.getAllOperationsStaff().then((res) => {
- this.optionsoperationalPeople= res.data
+ if (idx == 1) {
+ this.$api.http
+ .getAllOperationsStaffByAgent({
+ agentId: row.agentId,
+ })
+ .then((res) => {
+ this.optionsoperationalPeople = res.data;
this.operaVisible = true;
});
+ } else {
+ this.$api.http.getAllOperationsStaff().then((res) => {
+ this.optionsoperationalPeople = res.data;
+ this.operaVisible = true;
+ });
}
// this.$api.api.getAllOperationsStaffByAgent({agentId}).then((res) => {
// this.optionsoperationalPeople = res.data;
// });
},
- screen(){
- this.currentPage=1
- this.zkhousePage()
+ screen() {
+ this.currentPage = 1;
+ this.zkhousePage();
},
addSurequxiao() {
this.dialogVisible = false;
@@ -910,8 +1035,8 @@ export default {
addSure() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
- if(!this.resetFlag){
- return
+ if (!this.resetFlag) {
+ return;
}
// 编辑
if (this.editFlag) {
@@ -937,30 +1062,41 @@ export default {
}
});
},
- toDisable(row){
- this.$confirm(`确定${row.lockFlag==0?'禁用'+'-'+row.propertyName+'-':'启用'+'-'+row.propertyName+'-'}楼盘吗?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
+ toDisable(row) {
+ this.$confirm(
+ `确定${
+ row.lockFlag == 0
+ ? "禁用" + "-" + row.propertyName + "-"
+ : "启用" + "-" + row.propertyName + "-"
+ }楼盘吗?`,
+ "提示",
+ {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }
+ )
+ .then(() => {
// return
// console.log(123);
- this.$api.api.editZkhouse({id:row.id,lockFlag:row.lockFlag==0?1:0}).then((res) => {
- if(res.code==0){
- this.$message({
- type: 'success',
- message: '操作成功!'
- });
- this.zkhousePage();
- }else{
- this.$message.error(res.message);
- }
- })
+ this.$api.api
+ .editZkhouse({ id: row.id, lockFlag: row.lockFlag == 0 ? 1 : 0 })
+ .then((res) => {
+ if (res.code == 0) {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.zkhousePage();
+ } else {
+ this.$message.error(res.message);
+ }
+ });
})
- .catch(err=>{
+ .catch((err) => {
// console.log('关闭');
// console.log(err);
- })
+ });
},
dialogClose() {
this.restFrom();
@@ -989,11 +1125,11 @@ export default {
addHouse() {
this.editFlag = false;
this.dialogVisible = true;
- this.passFlag=false
+ this.passFlag = false;
},
edit(row) {
console.log(row);
- this.resetFlag=true
+ this.resetFlag = true;
this.time = [
row.startWorking.substring(0, 10),
row.endWorking.substring(0, 10),
@@ -1011,14 +1147,14 @@ export default {
// 更换账号
changeAccount(row) {
this.changeFlag = true;
- this.passFlag=false
+ this.passFlag = false;
this.accountForm.id = row.id;
},
changeSure() {
- if(!this.resetFlag){
- this.$message.error('平台用户与楼盘用户不能重复添加!')
- return
- }
+ if (!this.resetFlag) {
+ this.$message.error("平台用户与楼盘用户不能重复添加!");
+ return;
+ }
this.$refs.accountForm.validate((valid) => {
if (valid) {
this.$api.api.updateManagerPhone(this.accountForm).then((res) => {
@@ -1066,7 +1202,7 @@ export default {
this.$api.api
.getCompanyList({
orgType: this.orgType,
- agentId:localStorage.getItem('agentId')
+ agentId: localStorage.getItem("agentId"),
})
.then((res) => {
if (res.code == 0) {
@@ -1164,24 +1300,25 @@ export default {
corporateName: "",
propertyName: "",
serviceStatus: "",
- provinceId:'',
+ provinceId: "",
houseType: "",
+ timeType:'0',
// residueTime: 7,
startWorking: "",
endWorking: "",
agentName: "",
operationalPeople: "",
};
- this.currentPage=1
- this.zkhousePage()
+ this.currentPage = 1;
+ this.zkhousePage();
},
timeChange1(e) {
- if(e){
- this.searchForm.startWorking = e[0];
- this.searchForm.endWorking = e[1];
- }else{
- this.searchForm.startWorking = '';
- this.searchForm.endWorking = '';
+ if (e) {
+ this.searchForm.startWorking = e[0];
+ this.searchForm.endWorking = e[1];
+ } else {
+ this.searchForm.startWorking = "";
+ this.searchForm.endWorking = "";
}
},
tabtimetap(idx) {
@@ -1266,7 +1403,6 @@ export default {
.div-lab {
display: flex;
margin: 5px;
-
}
.div-inp {
width: 250px;