|
@ -836,6 +836,19 @@ export default { |
|
|
// 重新绑定房间 |
|
|
// 重新绑定房间 |
|
|
httpPost(unbind, this.$api.setTenant).then((res) => { |
|
|
httpPost(unbind, this.$api.setTenant).then((res) => { |
|
|
console.log(res); |
|
|
console.log(res); |
|
|
|
|
|
// 续约 |
|
|
|
|
|
let data = { |
|
|
|
|
|
cardId: this.batchmessage.cardId, |
|
|
|
|
|
signingTime: this.batchRenewalFrom.startTime, |
|
|
|
|
|
cutoffTime: this.batchRenewalFrom.endTime, |
|
|
|
|
|
status: 1 |
|
|
|
|
|
} |
|
|
|
|
|
httpPost(data, this.$api.postrenewal).then(res1 => { |
|
|
|
|
|
console.log(123123, res1); |
|
|
|
|
|
if (res1.success) { |
|
|
|
|
|
this.getLeasesList() |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
// 修改凭证 |
|
|
// 修改凭证 |
|
|
httpGet(data, this.$api.getCertificates).then((res) => { |
|
|
httpGet(data, this.$api.getCertificates).then((res) => { |
|
@ -887,7 +900,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
this.batchRenewalShow = false |
|
|
this.batchRenewalShow = false |
|
|
}else{ |
|
|
|
|
|
|
|
|
} else { |
|
|
this.$message.error("暂未发现对应设备") |
|
|
this.$message.error("暂未发现对应设备") |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
@ -904,10 +917,47 @@ export default { |
|
|
|
|
|
|
|
|
// 查询和房间相关的设备 |
|
|
// 查询和房间相关的设备 |
|
|
getAboutDevice() { |
|
|
getAboutDevice() { |
|
|
httpGet("", this.$api.onlySiteDevice).then((res) => { |
|
|
|
|
|
this.AboutDevice = res.data.list; |
|
|
|
|
|
this.$store.commit("getAboutDevice", res.data.list); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
orderBy: "create_time desc", |
|
|
|
|
|
pageNum: 0, |
|
|
|
|
|
pageSize: 0, |
|
|
|
|
|
q: JSON.stringify({ |
|
|
|
|
|
name: '', |
|
|
|
|
|
number: '', |
|
|
|
|
|
cardId: '' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
let data1 = [] |
|
|
|
|
|
httpPost(data, this.$api.getlistNum).then((res) => { |
|
|
|
|
|
console.log("123", res); |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
res.data.list.map(li => { |
|
|
|
|
|
data1.push(li.id) |
|
|
|
|
|
}) |
|
|
|
|
|
let data2 = { |
|
|
|
|
|
cardIds: data1 |
|
|
|
|
|
} |
|
|
|
|
|
httpPost(data2, this.$api.onlyTenant).then((res1) => { |
|
|
|
|
|
// this.$store.commit("getAboutRoom", res.data.list); |
|
|
|
|
|
// this.getlist(); |
|
|
|
|
|
console.log(res1); |
|
|
|
|
|
let data3 = [] |
|
|
|
|
|
if (res1.success) { |
|
|
|
|
|
res1.data.list.map(li => { |
|
|
|
|
|
data3.push(li.roomId) |
|
|
|
|
|
}) |
|
|
|
|
|
let data4 = { |
|
|
|
|
|
ids: data3 |
|
|
|
|
|
} |
|
|
|
|
|
httpPost(data4, this.$api.onlySiteDevice).then((res) => { |
|
|
|
|
|
console.log(res); |
|
|
|
|
|
this.AboutDevice = res.data.list; |
|
|
|
|
|
this.$store.commit("getAboutDevice", res.data.list); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getEnterprise() { |
|
|
getEnterprise() { |
|
|
httpGet("", this.$api.getEnterprise).then((res) => { |
|
|
httpGet("", this.$api.getEnterprise).then((res) => { |
|
@ -1552,9 +1602,31 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 查询和人员相关的房间 |
|
|
// 查询和人员相关的房间 |
|
|
getAboutRoom() { |
|
|
getAboutRoom() { |
|
|
httpGet("", this.$api.onlyTenant).then((res) => { |
|
|
|
|
|
this.$store.commit("getAboutRoom", res.data.list); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
orderBy: "create_time desc", |
|
|
|
|
|
pageNum: 0, |
|
|
|
|
|
pageSize: 0, |
|
|
|
|
|
q: JSON.stringify({ |
|
|
|
|
|
name: '', |
|
|
|
|
|
number: '', |
|
|
|
|
|
cardId: '' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
let data1 = [] |
|
|
|
|
|
httpPost(data, this.$api.getlistNum).then((res) => { |
|
|
|
|
|
console.log("123", res); |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
res.data.list.map(li => { |
|
|
|
|
|
data1.push(li.id) |
|
|
|
|
|
}) |
|
|
|
|
|
let data2 = { |
|
|
|
|
|
cardIds: data1 |
|
|
|
|
|
} |
|
|
|
|
|
httpPost(data2, this.$api.onlyTenant).then((res1) => { |
|
|
|
|
|
this.$store.commit("getAboutRoom", res.data.list); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 添加人员 |
|
|
// 添加人员 |
|
|
saveEdit() { |
|
|
saveEdit() { |
|
@ -1602,9 +1674,31 @@ export default { |
|
|
httpPost(ids, this.$api.createkeyCard).then(res => { |
|
|
httpPost(ids, this.$api.createkeyCard).then(res => { |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
httpGet("", this.$api.onlyTenant).then((res) => { |
|
|
|
|
|
this.$store.commit("getAboutRoom", res.data.list); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
orderBy: "create_time desc", |
|
|
|
|
|
pageNum: 0, |
|
|
|
|
|
pageSize: 0, |
|
|
|
|
|
q: JSON.stringify({ |
|
|
|
|
|
name: '', |
|
|
|
|
|
number: '', |
|
|
|
|
|
cardId: '' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
let data1 = [] |
|
|
|
|
|
httpPost(data, this.$api.getlistNum).then((res) => { |
|
|
|
|
|
console.log("123", res); |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
res.data.list.map(li => { |
|
|
|
|
|
data1.push(li.id) |
|
|
|
|
|
}) |
|
|
|
|
|
let data2 = { |
|
|
|
|
|
cardIds: data1 |
|
|
|
|
|
} |
|
|
|
|
|
httpPost(data2, this.$api.onlyTenant).then((res1) => { |
|
|
|
|
|
this.$store.commit("getAboutRoom", res.data.list); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -2223,9 +2317,9 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 删除凭证 |
|
|
// 删除凭证 |
|
|
deletefun(index, row) { |
|
|
deletefun(index, row) { |
|
|
|
|
|
|
|
|
this.savevoucherlist = this.savevoucherlist.filter(li => { |
|
|
this.savevoucherlist = this.savevoucherlist.filter(li => { |
|
|
console.log(li, row) |
|
|
|
|
|
return li.password == row.password |
|
|
|
|
|
|
|
|
return li.password != row.password |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 录入凭证 |
|
|
// 录入凭证 |
|
@ -3274,13 +3368,17 @@ export default { |
|
|
let _this = this |
|
|
let _this = this |
|
|
this.multipleSelection.map(li => { |
|
|
this.multipleSelection.map(li => { |
|
|
this.getRoomIdDeviceInfo(li.siteId).then(res => { |
|
|
this.getRoomIdDeviceInfo(li.siteId).then(res => { |
|
|
|
|
|
console.log(res, res.data.total); |
|
|
if (res.data.total > 0) { |
|
|
if (res.data.total > 0) { |
|
|
if (res.data.list[0].manufactureId === 201 || res.data.list[0].manufactureId === 221) { |
|
|
if (res.data.list[0].manufactureId === 201 || res.data.list[0].manufactureId === 221) { |
|
|
RequestSet.unbindPeopleAndRooms(li.cardId, res.data.list[0].imei, (callback) => { |
|
|
RequestSet.unbindPeopleAndRooms(li.cardId, res.data.list[0].imei, (callback) => { |
|
|
|
|
|
console.log(callback); |
|
|
if (callback.success) { |
|
|
if (callback.success) { |
|
|
let dataOne = utils.zlib_unzip(callback.data) |
|
|
let dataOne = utils.zlib_unzip(callback.data) |
|
|
|
|
|
console.log(dataOne); |
|
|
if (dataOne.length > 0) { |
|
|
if (dataOne.length > 0) { |
|
|
let lookUserInfo = JSON.parse(dataOne[0].content) |
|
|
let lookUserInfo = JSON.parse(dataOne[0].content) |
|
|
|
|
|
console.log(lookUserInfo); |
|
|
let dataLook = { |
|
|
let dataLook = { |
|
|
lockerId: dataOne[0].deviceNum, |
|
|
lockerId: dataOne[0].deviceNum, |
|
|
imei: dataOne[0].imei, |
|
|
imei: dataOne[0].imei, |
|
@ -3293,12 +3391,14 @@ export default { |
|
|
roomName: lookUserInfo.roomName |
|
|
roomName: lookUserInfo.roomName |
|
|
} |
|
|
} |
|
|
httpPost(dataLook, _this.$api.ZGduserOperation).then(res2 => { |
|
|
httpPost(dataLook, _this.$api.ZGduserOperation).then(res2 => { |
|
|
|
|
|
console.log(dataLook, res2); |
|
|
if (res2.success) { |
|
|
if (res2.success) { |
|
|
let dataUnbind = [{ |
|
|
let dataUnbind = [{ |
|
|
siteId: li.siteId, |
|
|
siteId: li.siteId, |
|
|
cardId: li.cardId, |
|
|
cardId: li.cardId, |
|
|
}] |
|
|
}] |
|
|
httpPost(dataUnbind, _this.$api.unbindCard).then((res) => { |
|
|
httpPost(dataUnbind, _this.$api.unbindCard).then((res) => { |
|
|
|
|
|
console.log(res); |
|
|
_this.$message.success("退租成功") |
|
|
_this.$message.success("退租成功") |
|
|
let refundLeasesData = [ |
|
|
let refundLeasesData = [ |
|
|
{ |
|
|
{ |
|
@ -3306,7 +3406,9 @@ export default { |
|
|
status: 3 |
|
|
status: 3 |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
httpPost(refundLeasesData, _this.$api.postUpdateLeases).then(res => { }) |
|
|
|
|
|
|
|
|
httpPost(refundLeasesData, _this.$api.postUpdateLeases).then(res => { |
|
|
|
|
|
console.log(res); |
|
|
|
|
|
}) |
|
|
_this.getLeasesList() |
|
|
_this.getLeasesList() |
|
|
_this.getLeasesStatus() |
|
|
_this.getLeasesStatus() |
|
|
}) |
|
|
}) |
|
|