diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue index d9901f0..da13230 100644 --- a/pages/checkMessageDetail/checkMessageDetail.vue +++ b/pages/checkMessageDetail/checkMessageDetail.vue @@ -82,7 +82,7 @@ }, { id: 'staffCode', - name: '申请者工号', + name: '申请者证件编号', value: '' }, { diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue index d9901f0..da13230 100644 --- a/pages/checkMessageDetail/checkMessageDetail.vue +++ b/pages/checkMessageDetail/checkMessageDetail.vue @@ -82,7 +82,7 @@ }, { id: 'staffCode', - name: '申请者工号', + name: '申请者证件编号', value: '' }, { diff --git a/pages/info/info.vue b/pages/info/info.vue index 938bbcf..0fdcf86 100644 --- a/pages/info/info.vue +++ b/pages/info/info.vue @@ -10,7 +10,7 @@ {{status}} - 申请者工号 + 申请者证件编号 {{info.staffCode}} @@ -106,6 +106,8 @@ height: 100%; .title { font-weight: 600; + white-space: nowrap; + margin-right: 20rpx; } .detail-content { padding: 22rpx; diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue index d9901f0..da13230 100644 --- a/pages/checkMessageDetail/checkMessageDetail.vue +++ b/pages/checkMessageDetail/checkMessageDetail.vue @@ -82,7 +82,7 @@ }, { id: 'staffCode', - name: '申请者工号', + name: '申请者证件编号', value: '' }, { diff --git a/pages/info/info.vue b/pages/info/info.vue index 938bbcf..0fdcf86 100644 --- a/pages/info/info.vue +++ b/pages/info/info.vue @@ -10,7 +10,7 @@ {{status}} - 申请者工号 + 申请者证件编号 {{info.staffCode}} @@ -106,6 +106,8 @@ height: 100%; .title { font-weight: 600; + white-space: nowrap; + margin-right: 20rpx; } .detail-content { padding: 22rpx; diff --git a/pages/information/information.vue b/pages/information/information.vue index 6b09e67..4e523ed 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -3,43 +3,44 @@ - + - + - + - + {{callerInfo.visitReason || '请选择访问目的'}} - + {{callerInfo.visitPosition || '请选择访问楼栋'}} - + {{`开始时间:${callerInfo.inTime}`}} {{`结束时间:${callerInfo.outTime}`}} - - + + - + - - + + - - + + + @@ -151,7 +152,7 @@ ], staffCode: [{ required: true, - message: '请填写申请者工号', + message: '请填写员工证件编号', trigger: ['blur', 'change'], }] }, @@ -338,3 +339,15 @@ bottom: 0; } + \ No newline at end of file diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue index d9901f0..da13230 100644 --- a/pages/checkMessageDetail/checkMessageDetail.vue +++ b/pages/checkMessageDetail/checkMessageDetail.vue @@ -82,7 +82,7 @@ }, { id: 'staffCode', - name: '申请者工号', + name: '申请者证件编号', value: '' }, { diff --git a/pages/info/info.vue b/pages/info/info.vue index 938bbcf..0fdcf86 100644 --- a/pages/info/info.vue +++ b/pages/info/info.vue @@ -10,7 +10,7 @@ {{status}} - 申请者工号 + 申请者证件编号 {{info.staffCode}} @@ -106,6 +106,8 @@ height: 100%; .title { font-weight: 600; + white-space: nowrap; + margin-right: 20rpx; } .detail-content { padding: 22rpx; diff --git a/pages/information/information.vue b/pages/information/information.vue index 6b09e67..4e523ed 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -3,43 +3,44 @@ - + - + - + - + {{callerInfo.visitReason || '请选择访问目的'}} - + {{callerInfo.visitPosition || '请选择访问楼栋'}} - + {{`开始时间:${callerInfo.inTime}`}} {{`结束时间:${callerInfo.outTime}`}} - - + + - + - - + + - - + + + @@ -151,7 +152,7 @@ ], staffCode: [{ required: true, - message: '请填写申请者工号', + message: '请填写员工证件编号', trigger: ['blur', 'change'], }] }, @@ -338,3 +339,15 @@ bottom: 0; } + \ No newline at end of file diff --git a/pages/list/list.vue b/pages/list/list.vue index f25eb76..31df73b 100644 --- a/pages/list/list.vue +++ b/pages/list/list.vue @@ -39,19 +39,36 @@ + + + {{ item.status }} + + + + + {{ item.visitorName }} - {{ item.applyNo }} + - + + + + + {{ item.applyNo }} + + + + {{ item.inTime }} ~ {{ item.showOutTime }} + + + - {{ item.status }} - - - - + import TabBar from "@/components/tabBar/tabBar.vue"; import { getList } from "@/api/list.js"; -import { debounce, deepCopy } from "@/common/utils.js"; +import { debounce, deepCopy, dateToString, getDateTime} from "@/common/utils.js"; import { getLastMonth } from "@/common/formatTime.js"; import { solveStatus } from "@/api/message.js"; import { verifyPhone } from "@/api/index.js"; @@ -141,14 +158,14 @@ import GetPhonePopup from "@/components/base/getphonePopup.vue" import BASE_URL from "@/api/base.js"; import LoadingList from '@/components/base/LoadingList.vue'; - import { subscription } from "@/utils/common.js" +import { subscription } from "@/utils/common.js" export default { components: { TabBar, GetPhonePopup, LoadingList }, data() { return { - account: '', //申请者工号---获取列表申请者需要传申请者工号 + account: '', //员工证件编号---获取列表申请者需要传员工证件编号 checkRadio: null, //单选框选中 isManager: false, //是否是物业管理员 scrollTop: 0, @@ -215,6 +232,8 @@ this.scrollTop = e.scrollTop; }, async onShow() { + this.time = "筛选时间"; + this.statusInfo = "筛选状态" this.offset = 1; let pages = getCurrentPages(); const curPage = pages[pages.length - 1]; @@ -235,17 +254,18 @@ this.nothingMore = false; const res = await getList(this.queryList); this.list = res.records.map((item) => { - item.value = false - if (item.visitorApplyStatus == "1") { - item.status = this.isManager ? "申请已提交" : '申请中'; - item.color = "blue"; - } else if (item.visitorApplyStatus == "2") { - item.status = "申请已通过"; - item.color = "green"; - } else { - item.status = "申请未通过"; - item.color = "red"; - } + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") + if (item.visitorApplyStatus == "1") { + item.status = this.isManager ? "申请已提交" : '申请中'; + item.color = "blue"; + } else if (item.visitorApplyStatus == "2") { + item.status = "申请已通过"; + item.color = "green"; + } else { + item.status = "申请未通过"; + item.color = "red"; + } return item; }); }, @@ -305,6 +325,8 @@ }; const res = await getList(this.queryList); this.list = res.records.map((item) => { + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") if (item.visitorApplyStatus == "1") { item.status = this.isManager ? "申请已提交" : '申请中'; item.color = "blue"; @@ -326,11 +348,16 @@ let filePath = `${wx.env.USER_DATA_PATH}/${+new Date()}.xlsx`; let ids = []; ids = this.checkboxList.length === 0 ? this.list.map((item) => item.id) : this.checkboxList.map((item) => item.id); - uni.request({ + const params = { + idList: ids, + startTime: this.queryList.startTime, + endTime: this.queryList.endTime, + } + uni.request({ url: 'https://visitor.gd.smartlog.work/visitor/exportMessage', responseType: "arraybuffer", method:"POST", - data: { ids }, + data: params, //自定义请求头信息 header: { token: sessionId }, success: ({ data }) => { @@ -364,6 +391,8 @@ if(res.records && res.records.length) { this.nothingMore = false; const resData = res.records.map((item, index) => { + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") if (item.visitorApplyStatus == "1") { item.status = this.isManager ? "申请已提交" : '申请中'; item.color = "blue"; @@ -410,7 +439,7 @@ this.ispassShow = false; this.searchList(false); return uni.showToast({ - title: `暂无需要改动状态人员`, + title: `访客申请状态仅能修改一次,不能重复修改`, icon: 'none', duration: 2000, }) @@ -429,6 +458,7 @@ this.ispassShow = false; this.checkboxList = []; }, + // 点击确认导出 exportQr() { this.exportClick(); this.isExportShow = false; @@ -540,9 +570,9 @@ this.isManager = false } if(this.isManager) { //是物业人员 - this.account = '' //物业人员不允许传申请者工号 + this.account = '' //物业人员不允许传员工证件编号 } else { - this.account = userInfo.account //申请者工号 + this.account = userInfo.account //员工证件编号 } } } else { @@ -627,7 +657,7 @@ .list-content { border-radius: 20rpx; margin-top: 20rpx; - padding: 0 20rpx; + padding: 20rpx; background-color: #fff; font-weight: 600; } @@ -699,26 +729,29 @@ padding: 50rpx 5rpx 3rpx 3rpx; } .table-item { - width: 360rpx; + width: 100%; margin-left: 20rpx; margin-right: 40rpx; + border-bottom: 2rpx solid #ccc; + padding: 20rpx 0; .table-item-top { display: flex; - justify-content: space-between; + flex-direction: column; .table-name { font-size: 34rpx; - font-weight: 500; + // font-weight: 500; + margin-top: 10rpx; } .table-number { - font-size: 26rpx; - color: #ccc; + font-size: 28rpx; + color: #949598; + margin-top: 10rpx; } } .table-time { - margin-top: 10rpx; - font-size: 26rpx; - color: #ccc; + font-size: 28rpx; + color: #949598; } } diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue index d9901f0..da13230 100644 --- a/pages/checkMessageDetail/checkMessageDetail.vue +++ b/pages/checkMessageDetail/checkMessageDetail.vue @@ -82,7 +82,7 @@ }, { id: 'staffCode', - name: '申请者工号', + name: '申请者证件编号', value: '' }, { diff --git a/pages/info/info.vue b/pages/info/info.vue index 938bbcf..0fdcf86 100644 --- a/pages/info/info.vue +++ b/pages/info/info.vue @@ -10,7 +10,7 @@ {{status}} - 申请者工号 + 申请者证件编号 {{info.staffCode}} @@ -106,6 +106,8 @@ height: 100%; .title { font-weight: 600; + white-space: nowrap; + margin-right: 20rpx; } .detail-content { padding: 22rpx; diff --git a/pages/information/information.vue b/pages/information/information.vue index 6b09e67..4e523ed 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -3,43 +3,44 @@ - + - + - + - + {{callerInfo.visitReason || '请选择访问目的'}} - + {{callerInfo.visitPosition || '请选择访问楼栋'}} - + {{`开始时间:${callerInfo.inTime}`}} {{`结束时间:${callerInfo.outTime}`}} - - + + - + - - + + - - + + + @@ -151,7 +152,7 @@ ], staffCode: [{ required: true, - message: '请填写申请者工号', + message: '请填写员工证件编号', trigger: ['blur', 'change'], }] }, @@ -338,3 +339,15 @@ bottom: 0; } + \ No newline at end of file diff --git a/pages/list/list.vue b/pages/list/list.vue index f25eb76..31df73b 100644 --- a/pages/list/list.vue +++ b/pages/list/list.vue @@ -39,19 +39,36 @@ + + + {{ item.status }} + + + + + {{ item.visitorName }} - {{ item.applyNo }} + - + + + + + {{ item.applyNo }} + + + + {{ item.inTime }} ~ {{ item.showOutTime }} + + + - {{ item.status }} - - - - + import TabBar from "@/components/tabBar/tabBar.vue"; import { getList } from "@/api/list.js"; -import { debounce, deepCopy } from "@/common/utils.js"; +import { debounce, deepCopy, dateToString, getDateTime} from "@/common/utils.js"; import { getLastMonth } from "@/common/formatTime.js"; import { solveStatus } from "@/api/message.js"; import { verifyPhone } from "@/api/index.js"; @@ -141,14 +158,14 @@ import GetPhonePopup from "@/components/base/getphonePopup.vue" import BASE_URL from "@/api/base.js"; import LoadingList from '@/components/base/LoadingList.vue'; - import { subscription } from "@/utils/common.js" +import { subscription } from "@/utils/common.js" export default { components: { TabBar, GetPhonePopup, LoadingList }, data() { return { - account: '', //申请者工号---获取列表申请者需要传申请者工号 + account: '', //员工证件编号---获取列表申请者需要传员工证件编号 checkRadio: null, //单选框选中 isManager: false, //是否是物业管理员 scrollTop: 0, @@ -215,6 +232,8 @@ this.scrollTop = e.scrollTop; }, async onShow() { + this.time = "筛选时间"; + this.statusInfo = "筛选状态" this.offset = 1; let pages = getCurrentPages(); const curPage = pages[pages.length - 1]; @@ -235,17 +254,18 @@ this.nothingMore = false; const res = await getList(this.queryList); this.list = res.records.map((item) => { - item.value = false - if (item.visitorApplyStatus == "1") { - item.status = this.isManager ? "申请已提交" : '申请中'; - item.color = "blue"; - } else if (item.visitorApplyStatus == "2") { - item.status = "申请已通过"; - item.color = "green"; - } else { - item.status = "申请未通过"; - item.color = "red"; - } + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") + if (item.visitorApplyStatus == "1") { + item.status = this.isManager ? "申请已提交" : '申请中'; + item.color = "blue"; + } else if (item.visitorApplyStatus == "2") { + item.status = "申请已通过"; + item.color = "green"; + } else { + item.status = "申请未通过"; + item.color = "red"; + } return item; }); }, @@ -305,6 +325,8 @@ }; const res = await getList(this.queryList); this.list = res.records.map((item) => { + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") if (item.visitorApplyStatus == "1") { item.status = this.isManager ? "申请已提交" : '申请中'; item.color = "blue"; @@ -326,11 +348,16 @@ let filePath = `${wx.env.USER_DATA_PATH}/${+new Date()}.xlsx`; let ids = []; ids = this.checkboxList.length === 0 ? this.list.map((item) => item.id) : this.checkboxList.map((item) => item.id); - uni.request({ + const params = { + idList: ids, + startTime: this.queryList.startTime, + endTime: this.queryList.endTime, + } + uni.request({ url: 'https://visitor.gd.smartlog.work/visitor/exportMessage', responseType: "arraybuffer", method:"POST", - data: { ids }, + data: params, //自定义请求头信息 header: { token: sessionId }, success: ({ data }) => { @@ -364,6 +391,8 @@ if(res.records && res.records.length) { this.nothingMore = false; const resData = res.records.map((item, index) => { + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") if (item.visitorApplyStatus == "1") { item.status = this.isManager ? "申请已提交" : '申请中'; item.color = "blue"; @@ -410,7 +439,7 @@ this.ispassShow = false; this.searchList(false); return uni.showToast({ - title: `暂无需要改动状态人员`, + title: `访客申请状态仅能修改一次,不能重复修改`, icon: 'none', duration: 2000, }) @@ -429,6 +458,7 @@ this.ispassShow = false; this.checkboxList = []; }, + // 点击确认导出 exportQr() { this.exportClick(); this.isExportShow = false; @@ -540,9 +570,9 @@ this.isManager = false } if(this.isManager) { //是物业人员 - this.account = '' //物业人员不允许传申请者工号 + this.account = '' //物业人员不允许传员工证件编号 } else { - this.account = userInfo.account //申请者工号 + this.account = userInfo.account //员工证件编号 } } } else { @@ -627,7 +657,7 @@ .list-content { border-radius: 20rpx; margin-top: 20rpx; - padding: 0 20rpx; + padding: 20rpx; background-color: #fff; font-weight: 600; } @@ -699,26 +729,29 @@ padding: 50rpx 5rpx 3rpx 3rpx; } .table-item { - width: 360rpx; + width: 100%; margin-left: 20rpx; margin-right: 40rpx; + border-bottom: 2rpx solid #ccc; + padding: 20rpx 0; .table-item-top { display: flex; - justify-content: space-between; + flex-direction: column; .table-name { font-size: 34rpx; - font-weight: 500; + // font-weight: 500; + margin-top: 10rpx; } .table-number { - font-size: 26rpx; - color: #ccc; + font-size: 28rpx; + color: #949598; + margin-top: 10rpx; } } .table-time { - margin-top: 10rpx; - font-size: 26rpx; - color: #ccc; + font-size: 28rpx; + color: #949598; } } diff --git a/pages/message/message.vue b/pages/message/message.vue index a951b84..0775847 100644 --- a/pages/message/message.vue +++ b/pages/message/message.vue @@ -23,7 +23,7 @@ {{ item.name }} - {{ item.number }} + @@ -38,7 +38,7 @@ + @@ -151,7 +152,7 @@ ], staffCode: [{ required: true, - message: '请填写申请者工号', + message: '请填写员工证件编号', trigger: ['blur', 'change'], }] }, @@ -338,3 +339,15 @@ bottom: 0; } + \ No newline at end of file diff --git a/pages/list/list.vue b/pages/list/list.vue index f25eb76..31df73b 100644 --- a/pages/list/list.vue +++ b/pages/list/list.vue @@ -39,19 +39,36 @@ + + + {{ item.status }} + + + + + {{ item.visitorName }} - {{ item.applyNo }} + - + + + + + {{ item.applyNo }} + + + + {{ item.inTime }} ~ {{ item.showOutTime }} + + + - {{ item.status }} - - - - + import TabBar from "@/components/tabBar/tabBar.vue"; import { getList } from "@/api/list.js"; -import { debounce, deepCopy } from "@/common/utils.js"; +import { debounce, deepCopy, dateToString, getDateTime} from "@/common/utils.js"; import { getLastMonth } from "@/common/formatTime.js"; import { solveStatus } from "@/api/message.js"; import { verifyPhone } from "@/api/index.js"; @@ -141,14 +158,14 @@ import GetPhonePopup from "@/components/base/getphonePopup.vue" import BASE_URL from "@/api/base.js"; import LoadingList from '@/components/base/LoadingList.vue'; - import { subscription } from "@/utils/common.js" +import { subscription } from "@/utils/common.js" export default { components: { TabBar, GetPhonePopup, LoadingList }, data() { return { - account: '', //申请者工号---获取列表申请者需要传申请者工号 + account: '', //员工证件编号---获取列表申请者需要传员工证件编号 checkRadio: null, //单选框选中 isManager: false, //是否是物业管理员 scrollTop: 0, @@ -215,6 +232,8 @@ this.scrollTop = e.scrollTop; }, async onShow() { + this.time = "筛选时间"; + this.statusInfo = "筛选状态" this.offset = 1; let pages = getCurrentPages(); const curPage = pages[pages.length - 1]; @@ -235,17 +254,18 @@ this.nothingMore = false; const res = await getList(this.queryList); this.list = res.records.map((item) => { - item.value = false - if (item.visitorApplyStatus == "1") { - item.status = this.isManager ? "申请已提交" : '申请中'; - item.color = "blue"; - } else if (item.visitorApplyStatus == "2") { - item.status = "申请已通过"; - item.color = "green"; - } else { - item.status = "申请未通过"; - item.color = "red"; - } + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") + if (item.visitorApplyStatus == "1") { + item.status = this.isManager ? "申请已提交" : '申请中'; + item.color = "blue"; + } else if (item.visitorApplyStatus == "2") { + item.status = "申请已通过"; + item.color = "green"; + } else { + item.status = "申请未通过"; + item.color = "red"; + } return item; }); }, @@ -305,6 +325,8 @@ }; const res = await getList(this.queryList); this.list = res.records.map((item) => { + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") if (item.visitorApplyStatus == "1") { item.status = this.isManager ? "申请已提交" : '申请中'; item.color = "blue"; @@ -326,11 +348,16 @@ let filePath = `${wx.env.USER_DATA_PATH}/${+new Date()}.xlsx`; let ids = []; ids = this.checkboxList.length === 0 ? this.list.map((item) => item.id) : this.checkboxList.map((item) => item.id); - uni.request({ + const params = { + idList: ids, + startTime: this.queryList.startTime, + endTime: this.queryList.endTime, + } + uni.request({ url: 'https://visitor.gd.smartlog.work/visitor/exportMessage', responseType: "arraybuffer", method:"POST", - data: { ids }, + data: params, //自定义请求头信息 header: { token: sessionId }, success: ({ data }) => { @@ -364,6 +391,8 @@ if(res.records && res.records.length) { this.nothingMore = false; const resData = res.records.map((item, index) => { + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") if (item.visitorApplyStatus == "1") { item.status = this.isManager ? "申请已提交" : '申请中'; item.color = "blue"; @@ -410,7 +439,7 @@ this.ispassShow = false; this.searchList(false); return uni.showToast({ - title: `暂无需要改动状态人员`, + title: `访客申请状态仅能修改一次,不能重复修改`, icon: 'none', duration: 2000, }) @@ -429,6 +458,7 @@ this.ispassShow = false; this.checkboxList = []; }, + // 点击确认导出 exportQr() { this.exportClick(); this.isExportShow = false; @@ -540,9 +570,9 @@ this.isManager = false } if(this.isManager) { //是物业人员 - this.account = '' //物业人员不允许传申请者工号 + this.account = '' //物业人员不允许传员工证件编号 } else { - this.account = userInfo.account //申请者工号 + this.account = userInfo.account //员工证件编号 } } } else { @@ -627,7 +657,7 @@ .list-content { border-radius: 20rpx; margin-top: 20rpx; - padding: 0 20rpx; + padding: 20rpx; background-color: #fff; font-weight: 600; } @@ -699,26 +729,29 @@ padding: 50rpx 5rpx 3rpx 3rpx; } .table-item { - width: 360rpx; + width: 100%; margin-left: 20rpx; margin-right: 40rpx; + border-bottom: 2rpx solid #ccc; + padding: 20rpx 0; .table-item-top { display: flex; - justify-content: space-between; + flex-direction: column; .table-name { font-size: 34rpx; - font-weight: 500; + // font-weight: 500; + margin-top: 10rpx; } .table-number { - font-size: 26rpx; - color: #ccc; + font-size: 28rpx; + color: #949598; + margin-top: 10rpx; } } .table-time { - margin-top: 10rpx; - font-size: 26rpx; - color: #ccc; + font-size: 28rpx; + color: #949598; } } diff --git a/pages/message/message.vue b/pages/message/message.vue index a951b84..0775847 100644 --- a/pages/message/message.vue +++ b/pages/message/message.vue @@ -23,7 +23,7 @@ {{ item.name }} - {{ item.number }} + @@ -38,7 +38,7 @@ {{form.applyNo}} - + {{form.status}} - - + + {{form.staffCode}} - + {{form.staffName}} - + {{form.staffPhone}} - - - {{form.visitorName}} + + + - - - {{form.visitorIdCard}} + + + - + - + {{form.visitReason || '请选择访问目的'}} - + {{form.visitPosition || '请选择访问楼栋'}} - + {{`开始时间:${form.inTime}`}} {{`结束时间:${form.outTime}`}} - - + + + @@ -177,7 +178,7 @@ this.form.visitorPhone = getFormData.visitorPhone this.form.visitReason = getFormData.visitReason //访问目的 this.form.visitPosition = getFormData.visitPosition //访问楼栋 - this.form.staffCode = getFormData.staffCode //申请者工号 + this.form.staffCode = getFormData.staffCode //员工证件编号 this.form.staffName = getFormData.staffName //申请者姓名 this.form.remarks = getFormData.remarks //备注 this.form.staffPhone = getFormData.staffPhone || '' // 申请者手机号 @@ -291,7 +292,7 @@ diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue index d9901f0..da13230 100644 --- a/pages/checkMessageDetail/checkMessageDetail.vue +++ b/pages/checkMessageDetail/checkMessageDetail.vue @@ -82,7 +82,7 @@ }, { id: 'staffCode', - name: '申请者工号', + name: '申请者证件编号', value: '' }, { diff --git a/pages/info/info.vue b/pages/info/info.vue index 938bbcf..0fdcf86 100644 --- a/pages/info/info.vue +++ b/pages/info/info.vue @@ -10,7 +10,7 @@ {{status}} - 申请者工号 + 申请者证件编号 {{info.staffCode}} @@ -106,6 +106,8 @@ height: 100%; .title { font-weight: 600; + white-space: nowrap; + margin-right: 20rpx; } .detail-content { padding: 22rpx; diff --git a/pages/information/information.vue b/pages/information/information.vue index 6b09e67..4e523ed 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -3,43 +3,44 @@ - + - + - + - + {{callerInfo.visitReason || '请选择访问目的'}} - + {{callerInfo.visitPosition || '请选择访问楼栋'}} - + {{`开始时间:${callerInfo.inTime}`}} {{`结束时间:${callerInfo.outTime}`}} - - + + - + - - + + - - + + + @@ -151,7 +152,7 @@ ], staffCode: [{ required: true, - message: '请填写申请者工号', + message: '请填写员工证件编号', trigger: ['blur', 'change'], }] }, @@ -338,3 +339,15 @@ bottom: 0; } + \ No newline at end of file diff --git a/pages/list/list.vue b/pages/list/list.vue index f25eb76..31df73b 100644 --- a/pages/list/list.vue +++ b/pages/list/list.vue @@ -39,19 +39,36 @@ + + + {{ item.status }} + + + + + {{ item.visitorName }} - {{ item.applyNo }} + - + + + + + {{ item.applyNo }} + + + + {{ item.inTime }} ~ {{ item.showOutTime }} + + + - {{ item.status }} - - - - + import TabBar from "@/components/tabBar/tabBar.vue"; import { getList } from "@/api/list.js"; -import { debounce, deepCopy } from "@/common/utils.js"; +import { debounce, deepCopy, dateToString, getDateTime} from "@/common/utils.js"; import { getLastMonth } from "@/common/formatTime.js"; import { solveStatus } from "@/api/message.js"; import { verifyPhone } from "@/api/index.js"; @@ -141,14 +158,14 @@ import GetPhonePopup from "@/components/base/getphonePopup.vue" import BASE_URL from "@/api/base.js"; import LoadingList from '@/components/base/LoadingList.vue'; - import { subscription } from "@/utils/common.js" +import { subscription } from "@/utils/common.js" export default { components: { TabBar, GetPhonePopup, LoadingList }, data() { return { - account: '', //申请者工号---获取列表申请者需要传申请者工号 + account: '', //员工证件编号---获取列表申请者需要传员工证件编号 checkRadio: null, //单选框选中 isManager: false, //是否是物业管理员 scrollTop: 0, @@ -215,6 +232,8 @@ this.scrollTop = e.scrollTop; }, async onShow() { + this.time = "筛选时间"; + this.statusInfo = "筛选状态" this.offset = 1; let pages = getCurrentPages(); const curPage = pages[pages.length - 1]; @@ -235,17 +254,18 @@ this.nothingMore = false; const res = await getList(this.queryList); this.list = res.records.map((item) => { - item.value = false - if (item.visitorApplyStatus == "1") { - item.status = this.isManager ? "申请已提交" : '申请中'; - item.color = "blue"; - } else if (item.visitorApplyStatus == "2") { - item.status = "申请已通过"; - item.color = "green"; - } else { - item.status = "申请未通过"; - item.color = "red"; - } + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") + if (item.visitorApplyStatus == "1") { + item.status = this.isManager ? "申请已提交" : '申请中'; + item.color = "blue"; + } else if (item.visitorApplyStatus == "2") { + item.status = "申请已通过"; + item.color = "green"; + } else { + item.status = "申请未通过"; + item.color = "red"; + } return item; }); }, @@ -305,6 +325,8 @@ }; const res = await getList(this.queryList); this.list = res.records.map((item) => { + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") if (item.visitorApplyStatus == "1") { item.status = this.isManager ? "申请已提交" : '申请中'; item.color = "blue"; @@ -326,11 +348,16 @@ let filePath = `${wx.env.USER_DATA_PATH}/${+new Date()}.xlsx`; let ids = []; ids = this.checkboxList.length === 0 ? this.list.map((item) => item.id) : this.checkboxList.map((item) => item.id); - uni.request({ + const params = { + idList: ids, + startTime: this.queryList.startTime, + endTime: this.queryList.endTime, + } + uni.request({ url: 'https://visitor.gd.smartlog.work/visitor/exportMessage', responseType: "arraybuffer", method:"POST", - data: { ids }, + data: params, //自定义请求头信息 header: { token: sessionId }, success: ({ data }) => { @@ -364,6 +391,8 @@ if(res.records && res.records.length) { this.nothingMore = false; const resData = res.records.map((item, index) => { + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") if (item.visitorApplyStatus == "1") { item.status = this.isManager ? "申请已提交" : '申请中'; item.color = "blue"; @@ -410,7 +439,7 @@ this.ispassShow = false; this.searchList(false); return uni.showToast({ - title: `暂无需要改动状态人员`, + title: `访客申请状态仅能修改一次,不能重复修改`, icon: 'none', duration: 2000, }) @@ -429,6 +458,7 @@ this.ispassShow = false; this.checkboxList = []; }, + // 点击确认导出 exportQr() { this.exportClick(); this.isExportShow = false; @@ -540,9 +570,9 @@ this.isManager = false } if(this.isManager) { //是物业人员 - this.account = '' //物业人员不允许传申请者工号 + this.account = '' //物业人员不允许传员工证件编号 } else { - this.account = userInfo.account //申请者工号 + this.account = userInfo.account //员工证件编号 } } } else { @@ -627,7 +657,7 @@ .list-content { border-radius: 20rpx; margin-top: 20rpx; - padding: 0 20rpx; + padding: 20rpx; background-color: #fff; font-weight: 600; } @@ -699,26 +729,29 @@ padding: 50rpx 5rpx 3rpx 3rpx; } .table-item { - width: 360rpx; + width: 100%; margin-left: 20rpx; margin-right: 40rpx; + border-bottom: 2rpx solid #ccc; + padding: 20rpx 0; .table-item-top { display: flex; - justify-content: space-between; + flex-direction: column; .table-name { font-size: 34rpx; - font-weight: 500; + // font-weight: 500; + margin-top: 10rpx; } .table-number { - font-size: 26rpx; - color: #ccc; + font-size: 28rpx; + color: #949598; + margin-top: 10rpx; } } .table-time { - margin-top: 10rpx; - font-size: 26rpx; - color: #ccc; + font-size: 28rpx; + color: #949598; } } diff --git a/pages/message/message.vue b/pages/message/message.vue index a951b84..0775847 100644 --- a/pages/message/message.vue +++ b/pages/message/message.vue @@ -23,7 +23,7 @@ {{ item.name }} - {{ item.number }} + @@ -38,7 +38,7 @@ {{form.applyNo}} - + {{form.status}} - - + + {{form.staffCode}} - + {{form.staffName}} - + {{form.staffPhone}} - - - {{form.visitorName}} + + + - - - {{form.visitorIdCard}} + + + - + - + {{form.visitReason || '请选择访问目的'}} - + {{form.visitPosition || '请选择访问楼栋'}} - + {{`开始时间:${form.inTime}`}} {{`结束时间:${form.outTime}`}} - - + + + @@ -177,7 +178,7 @@ this.form.visitorPhone = getFormData.visitorPhone this.form.visitReason = getFormData.visitReason //访问目的 this.form.visitPosition = getFormData.visitPosition //访问楼栋 - this.form.staffCode = getFormData.staffCode //申请者工号 + this.form.staffCode = getFormData.staffCode //员工证件编号 this.form.staffName = getFormData.staffName //申请者姓名 this.form.remarks = getFormData.remarks //备注 this.form.staffPhone = getFormData.staffPhone || '' // 申请者手机号 @@ -291,7 +292,7 @@ diff --git a/pagesA/checkListInfo/checkListInfo.vue b/pagesA/checkListInfo/checkListInfo.vue index 834b859..04bf91e 100644 --- a/pagesA/checkListInfo/checkListInfo.vue +++ b/pagesA/checkListInfo/checkListInfo.vue @@ -3,43 +3,43 @@ - + {{form.applyNo}} - + {{form.status}} - + {{form.staffCode}} - + {{form.staffName}} - + {{form.staffPhone}} - + {{form.visitorName}} - + {{form.visitorIdCard}} - + {{form.visitorPhone}} - + {{form.visitReason}} - + {{form.visitPosition}} - - {{form.inTime}} ~ {{form.outTime}} + + {{form.inTime}} ~ {{form.showOutTime}} - - {{form.remarks}} + + @@ -102,6 +102,7 @@ visitPosition: '', //访问楼栋 inTime: '', //开始时间 outTime: '', //结束时间 + showOutTime: '', // 结束时间不带日期 staffCode: '', staffName: '', remarks: '', @@ -118,12 +119,13 @@ this.form.applyNo = getFormData.applyNo //申请单号 this.form.inTime = getFormData.inTime //开始时间 this.form.outTime = getFormData.outTime //结束时间 + this.form.showOutTime = getFormData.showOutTime //结束时间 this.form.visitorName = getFormData.visitorName //访客姓名 this.form.visitorIdCard = getFormData.visitorIdCard //访客身份证 this.form.visitorPhone = getFormData.visitorPhone this.form.visitReason = getFormData.visitReason //访问目的 this.form.visitPosition = getFormData.visitPosition //访问楼栋 - this.form.staffCode = getFormData.staffCode //申请者工号 + this.form.staffCode = getFormData.staffCode //员工证件编号 this.form.staffName = getFormData.staffName //申请者姓名 this.form.remarks = getFormData.remarks //备注 this.form.staffPhone = getFormData.staffPhone || '' // 申请者手机号 @@ -198,40 +200,41 @@ diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue index d9901f0..da13230 100644 --- a/pages/checkMessageDetail/checkMessageDetail.vue +++ b/pages/checkMessageDetail/checkMessageDetail.vue @@ -82,7 +82,7 @@ }, { id: 'staffCode', - name: '申请者工号', + name: '申请者证件编号', value: '' }, { diff --git a/pages/info/info.vue b/pages/info/info.vue index 938bbcf..0fdcf86 100644 --- a/pages/info/info.vue +++ b/pages/info/info.vue @@ -10,7 +10,7 @@ {{status}} - 申请者工号 + 申请者证件编号 {{info.staffCode}} @@ -106,6 +106,8 @@ height: 100%; .title { font-weight: 600; + white-space: nowrap; + margin-right: 20rpx; } .detail-content { padding: 22rpx; diff --git a/pages/information/information.vue b/pages/information/information.vue index 6b09e67..4e523ed 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -3,43 +3,44 @@ - + - + - + - + {{callerInfo.visitReason || '请选择访问目的'}} - + {{callerInfo.visitPosition || '请选择访问楼栋'}} - + {{`开始时间:${callerInfo.inTime}`}} {{`结束时间:${callerInfo.outTime}`}} - - + + - + - - + + - - + + + @@ -151,7 +152,7 @@ ], staffCode: [{ required: true, - message: '请填写申请者工号', + message: '请填写员工证件编号', trigger: ['blur', 'change'], }] }, @@ -338,3 +339,15 @@ bottom: 0; } + \ No newline at end of file diff --git a/pages/list/list.vue b/pages/list/list.vue index f25eb76..31df73b 100644 --- a/pages/list/list.vue +++ b/pages/list/list.vue @@ -39,19 +39,36 @@ + + + {{ item.status }} + + + + + {{ item.visitorName }} - {{ item.applyNo }} + - + + + + + {{ item.applyNo }} + + + + {{ item.inTime }} ~ {{ item.showOutTime }} + + + - {{ item.status }} - - - - + import TabBar from "@/components/tabBar/tabBar.vue"; import { getList } from "@/api/list.js"; -import { debounce, deepCopy } from "@/common/utils.js"; +import { debounce, deepCopy, dateToString, getDateTime} from "@/common/utils.js"; import { getLastMonth } from "@/common/formatTime.js"; import { solveStatus } from "@/api/message.js"; import { verifyPhone } from "@/api/index.js"; @@ -141,14 +158,14 @@ import GetPhonePopup from "@/components/base/getphonePopup.vue" import BASE_URL from "@/api/base.js"; import LoadingList from '@/components/base/LoadingList.vue'; - import { subscription } from "@/utils/common.js" +import { subscription } from "@/utils/common.js" export default { components: { TabBar, GetPhonePopup, LoadingList }, data() { return { - account: '', //申请者工号---获取列表申请者需要传申请者工号 + account: '', //员工证件编号---获取列表申请者需要传员工证件编号 checkRadio: null, //单选框选中 isManager: false, //是否是物业管理员 scrollTop: 0, @@ -215,6 +232,8 @@ this.scrollTop = e.scrollTop; }, async onShow() { + this.time = "筛选时间"; + this.statusInfo = "筛选状态" this.offset = 1; let pages = getCurrentPages(); const curPage = pages[pages.length - 1]; @@ -235,17 +254,18 @@ this.nothingMore = false; const res = await getList(this.queryList); this.list = res.records.map((item) => { - item.value = false - if (item.visitorApplyStatus == "1") { - item.status = this.isManager ? "申请已提交" : '申请中'; - item.color = "blue"; - } else if (item.visitorApplyStatus == "2") { - item.status = "申请已通过"; - item.color = "green"; - } else { - item.status = "申请未通过"; - item.color = "red"; - } + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") + if (item.visitorApplyStatus == "1") { + item.status = this.isManager ? "申请已提交" : '申请中'; + item.color = "blue"; + } else if (item.visitorApplyStatus == "2") { + item.status = "申请已通过"; + item.color = "green"; + } else { + item.status = "申请未通过"; + item.color = "red"; + } return item; }); }, @@ -305,6 +325,8 @@ }; const res = await getList(this.queryList); this.list = res.records.map((item) => { + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") if (item.visitorApplyStatus == "1") { item.status = this.isManager ? "申请已提交" : '申请中'; item.color = "blue"; @@ -326,11 +348,16 @@ let filePath = `${wx.env.USER_DATA_PATH}/${+new Date()}.xlsx`; let ids = []; ids = this.checkboxList.length === 0 ? this.list.map((item) => item.id) : this.checkboxList.map((item) => item.id); - uni.request({ + const params = { + idList: ids, + startTime: this.queryList.startTime, + endTime: this.queryList.endTime, + } + uni.request({ url: 'https://visitor.gd.smartlog.work/visitor/exportMessage', responseType: "arraybuffer", method:"POST", - data: { ids }, + data: params, //自定义请求头信息 header: { token: sessionId }, success: ({ data }) => { @@ -364,6 +391,8 @@ if(res.records && res.records.length) { this.nothingMore = false; const resData = res.records.map((item, index) => { + let tempTime = item.outTime.replace(/-/g,"/") + item.showOutTime = dateToString(new Date(tempTime.slice(tempTime.indexOf("/") + 1)),"HH:mm:ss") if (item.visitorApplyStatus == "1") { item.status = this.isManager ? "申请已提交" : '申请中'; item.color = "blue"; @@ -410,7 +439,7 @@ this.ispassShow = false; this.searchList(false); return uni.showToast({ - title: `暂无需要改动状态人员`, + title: `访客申请状态仅能修改一次,不能重复修改`, icon: 'none', duration: 2000, }) @@ -429,6 +458,7 @@ this.ispassShow = false; this.checkboxList = []; }, + // 点击确认导出 exportQr() { this.exportClick(); this.isExportShow = false; @@ -540,9 +570,9 @@ this.isManager = false } if(this.isManager) { //是物业人员 - this.account = '' //物业人员不允许传申请者工号 + this.account = '' //物业人员不允许传员工证件编号 } else { - this.account = userInfo.account //申请者工号 + this.account = userInfo.account //员工证件编号 } } } else { @@ -627,7 +657,7 @@ .list-content { border-radius: 20rpx; margin-top: 20rpx; - padding: 0 20rpx; + padding: 20rpx; background-color: #fff; font-weight: 600; } @@ -699,26 +729,29 @@ padding: 50rpx 5rpx 3rpx 3rpx; } .table-item { - width: 360rpx; + width: 100%; margin-left: 20rpx; margin-right: 40rpx; + border-bottom: 2rpx solid #ccc; + padding: 20rpx 0; .table-item-top { display: flex; - justify-content: space-between; + flex-direction: column; .table-name { font-size: 34rpx; - font-weight: 500; + // font-weight: 500; + margin-top: 10rpx; } .table-number { - font-size: 26rpx; - color: #ccc; + font-size: 28rpx; + color: #949598; + margin-top: 10rpx; } } .table-time { - margin-top: 10rpx; - font-size: 26rpx; - color: #ccc; + font-size: 28rpx; + color: #949598; } } diff --git a/pages/message/message.vue b/pages/message/message.vue index a951b84..0775847 100644 --- a/pages/message/message.vue +++ b/pages/message/message.vue @@ -23,7 +23,7 @@ {{ item.name }} - {{ item.number }} + @@ -38,7 +38,7 @@ {{form.applyNo}} - + {{form.status}} - - + + {{form.staffCode}} - + {{form.staffName}} - + {{form.staffPhone}} - - - {{form.visitorName}} + + + - - - {{form.visitorIdCard}} + + + - + - + {{form.visitReason || '请选择访问目的'}} - + {{form.visitPosition || '请选择访问楼栋'}} - + {{`开始时间:${form.inTime}`}} {{`结束时间:${form.outTime}`}} - - + + + @@ -177,7 +178,7 @@ this.form.visitorPhone = getFormData.visitorPhone this.form.visitReason = getFormData.visitReason //访问目的 this.form.visitPosition = getFormData.visitPosition //访问楼栋 - this.form.staffCode = getFormData.staffCode //申请者工号 + this.form.staffCode = getFormData.staffCode //员工证件编号 this.form.staffName = getFormData.staffName //申请者姓名 this.form.remarks = getFormData.remarks //备注 this.form.staffPhone = getFormData.staffPhone || '' // 申请者手机号 @@ -291,7 +292,7 @@ diff --git a/pagesA/checkListInfo/checkListInfo.vue b/pagesA/checkListInfo/checkListInfo.vue index 834b859..04bf91e 100644 --- a/pagesA/checkListInfo/checkListInfo.vue +++ b/pagesA/checkListInfo/checkListInfo.vue @@ -3,43 +3,43 @@ - + {{form.applyNo}} - + {{form.status}} - + {{form.staffCode}} - + {{form.staffName}} - + {{form.staffPhone}} - + {{form.visitorName}} - + {{form.visitorIdCard}} - + {{form.visitorPhone}} - + {{form.visitReason}} - + {{form.visitPosition}} - - {{form.inTime}} ~ {{form.outTime}} + + {{form.inTime}} ~ {{form.showOutTime}} - - {{form.remarks}} + + @@ -102,6 +102,7 @@ visitPosition: '', //访问楼栋 inTime: '', //开始时间 outTime: '', //结束时间 + showOutTime: '', // 结束时间不带日期 staffCode: '', staffName: '', remarks: '', @@ -118,12 +119,13 @@ this.form.applyNo = getFormData.applyNo //申请单号 this.form.inTime = getFormData.inTime //开始时间 this.form.outTime = getFormData.outTime //结束时间 + this.form.showOutTime = getFormData.showOutTime //结束时间 this.form.visitorName = getFormData.visitorName //访客姓名 this.form.visitorIdCard = getFormData.visitorIdCard //访客身份证 this.form.visitorPhone = getFormData.visitorPhone this.form.visitReason = getFormData.visitReason //访问目的 this.form.visitPosition = getFormData.visitPosition //访问楼栋 - this.form.staffCode = getFormData.staffCode //申请者工号 + this.form.staffCode = getFormData.staffCode //员工证件编号 this.form.staffName = getFormData.staffName //申请者姓名 this.form.remarks = getFormData.remarks //备注 this.form.staffPhone = getFormData.staffPhone || '' // 申请者手机号 @@ -198,40 +200,41 @@ diff --git a/pagesA/submitInfo/submitInfo.vue b/pagesA/submitInfo/submitInfo.vue index 3705a75..6c3b81b 100644 --- a/pagesA/submitInfo/submitInfo.vue +++ b/pagesA/submitInfo/submitInfo.vue @@ -3,57 +3,58 @@ - + {{form.applyNo}} - + {{form.status}} - - + + {{form.staffCode}} - + {{form.staffName}} - + {{form.staffPhone}} - + {{form.visitorName}} - + {{form.visitorIdCard}} - + - + {{form.visitReason || '请选择访问目的'}} - + {{form.visitPosition || '请选择访问楼栋'}} - + {{`开始时间:${form.inTime}`}} {{`结束时间:${form.outTime}`}} - - + + + @@ -173,7 +174,7 @@ this.form.visitorPhone = getFormData.visitorPhone this.form.visitReason = getFormData.visitReason //访问目的 this.form.visitPosition = getFormData.visitPosition //访问楼栋 - this.form.staffCode = getFormData.staffCode //申请者工号 + this.form.staffCode = getFormData.staffCode //员工证件编号 this.form.staffName = getFormData.staffName //申请者姓名 this.form.remarks = getFormData.remarks //备注 this.form.staffPhone = getFormData.staffPhone || '' // 申请者手机号 @@ -284,7 +285,7 @@