diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue
index 779c33e..fc69c1e 100644
--- a/pages/checkMessageDetail/checkMessageDetail.vue
+++ b/pages/checkMessageDetail/checkMessageDetail.vue
@@ -60,7 +60,7 @@
data() {
return {
isManager: true,
- userId: ''; //用户id
+ userId: '', //用户id
show: false, //控制模态框显隐
content: '', //模态框显示内容
list: [
diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue
index 779c33e..fc69c1e 100644
--- a/pages/checkMessageDetail/checkMessageDetail.vue
+++ b/pages/checkMessageDetail/checkMessageDetail.vue
@@ -60,7 +60,7 @@
data() {
return {
isManager: true,
- userId: ''; //用户id
+ userId: '', //用户id
show: false, //控制模态框显隐
content: '', //模态框显示内容
list: [
diff --git a/pages/info/info.vue b/pages/info/info.vue
index 84f745f..a1d6bcb 100644
--- a/pages/info/info.vue
+++ b/pages/info/info.vue
@@ -18,10 +18,6 @@
{{info.staffName}}
- 申请者手机号
- {{info.staffPhone}}
-
-
访客姓名
{{info.visitorName}}
@@ -59,37 +55,39 @@
data() {
return {
info: {
- applyNo: 1254611,
- status: 2,
- staffCode: 123456,
- staffName: '张三',
- staffPhone: 123456789,
- visitorName: '李四',
- visitorIdCard:1234567894662552,
- visitorPhone:123456799,
- visitReason:'商务会议',
- visitPosition:'一楼',
- inTime:'2022-09-16 13:28:41',
- outTime: "2022-10-06 13:28:46",
- remarks:'无'
+ // applyNo: 1254611,
+ // status: 2,
+ // staffCode: 123456,
+ // staffName: '张三',
+ // staffPhone: 123456789,
+ // visitorName: '李四',
+ // visitorIdCard:1234567894662552,
+ // visitorPhone:123456799,
+ // visitReason:'商务会议',
+ // visitPosition:'一楼',
+ // inTime:'2022-09-16 13:28:41',
+ // outTime: "2022-10-06 13:28:46",
+ // remarks:'无'
},
color:'',
- status:''
+ status:'',
+ messageId:''
}
},
- async onLoad(option){
- this.info = await getMessageInfo({messageId:option.messageId})
+ onLoad(option){
+ this.messageId = option.messageId
},
- onShow(){
- if(this.info.status == '1'){
- this.status = '申请已提交'
- this.color = 'blue'
- }else if(this.info.status == '2'){
- this.status = '申请已通过'
- this.color = 'green'
+ async onShow(){
+ this.info = await getMessageInfo({messageId:this.messageId})
+ if(this.info.visitorApplyStatus == '1'){
+ this.status = '申请已提交'
+ this.color = 'blue'
+ }else if(this.info.visitorApplyStatus == '2'){
+ this.status = '申请已通过'
+ this.color = 'green'
}else {
- this.status = '申请未通过'
- this.color = 'red'
+ this.status = '申请未通过'
+ this.color = 'red'
}
},
methods: {
diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue
index 779c33e..fc69c1e 100644
--- a/pages/checkMessageDetail/checkMessageDetail.vue
+++ b/pages/checkMessageDetail/checkMessageDetail.vue
@@ -60,7 +60,7 @@
data() {
return {
isManager: true,
- userId: ''; //用户id
+ userId: '', //用户id
show: false, //控制模态框显隐
content: '', //模态框显示内容
list: [
diff --git a/pages/info/info.vue b/pages/info/info.vue
index 84f745f..a1d6bcb 100644
--- a/pages/info/info.vue
+++ b/pages/info/info.vue
@@ -18,10 +18,6 @@
{{info.staffName}}
- 申请者手机号
- {{info.staffPhone}}
-
-
访客姓名
{{info.visitorName}}
@@ -59,37 +55,39 @@
data() {
return {
info: {
- applyNo: 1254611,
- status: 2,
- staffCode: 123456,
- staffName: '张三',
- staffPhone: 123456789,
- visitorName: '李四',
- visitorIdCard:1234567894662552,
- visitorPhone:123456799,
- visitReason:'商务会议',
- visitPosition:'一楼',
- inTime:'2022-09-16 13:28:41',
- outTime: "2022-10-06 13:28:46",
- remarks:'无'
+ // applyNo: 1254611,
+ // status: 2,
+ // staffCode: 123456,
+ // staffName: '张三',
+ // staffPhone: 123456789,
+ // visitorName: '李四',
+ // visitorIdCard:1234567894662552,
+ // visitorPhone:123456799,
+ // visitReason:'商务会议',
+ // visitPosition:'一楼',
+ // inTime:'2022-09-16 13:28:41',
+ // outTime: "2022-10-06 13:28:46",
+ // remarks:'无'
},
color:'',
- status:''
+ status:'',
+ messageId:''
}
},
- async onLoad(option){
- this.info = await getMessageInfo({messageId:option.messageId})
+ onLoad(option){
+ this.messageId = option.messageId
},
- onShow(){
- if(this.info.status == '1'){
- this.status = '申请已提交'
- this.color = 'blue'
- }else if(this.info.status == '2'){
- this.status = '申请已通过'
- this.color = 'green'
+ async onShow(){
+ this.info = await getMessageInfo({messageId:this.messageId})
+ if(this.info.visitorApplyStatus == '1'){
+ this.status = '申请已提交'
+ this.color = 'blue'
+ }else if(this.info.visitorApplyStatus == '2'){
+ this.status = '申请已通过'
+ this.color = 'green'
}else {
- this.status = '申请未通过'
- this.color = 'red'
+ this.status = '申请未通过'
+ this.color = 'red'
}
},
methods: {
diff --git a/pages/information/information.vue b/pages/information/information.vue
index 7c2fb84..6299c8d 100644
--- a/pages/information/information.vue
+++ b/pages/information/information.vue
@@ -117,12 +117,14 @@
onLoad() {
this.callerInfo.inTime = this.shijianc(this.callerInfo.inTime)
this.callerInfo.outTime = this.shijianc(this.callerInfo.outTime)
+ const userInfo = JSON.parse(uni.getStorageSync('userInfo'));
+ this.callerInfo.staffCode = userInfo.account
+ this.callerInfo.staffName = userInfo.name
},
methods: {
change(e) {},
//点击提交访客记录
async submit() {
- console.log(JSON.stringify(this.callerInfo))
if (this.callerInfo.visitorName.trim() == '' || this.callerInfo.visitorIdCard.trim() == '' || this.callerInfo
.visitorPhone.trim() == '' || this.callerInfo.visitReason.trim() == '' || this.callerInfo.visitPosition.trim() == '' || this.callerInfo.staffCode.trim() == ''){
return uni.showToast({
@@ -138,8 +140,8 @@
})
}
if (this.isForm) {
- const res = await getSubmit(this.callerInfo)
- res.data.code === 200 ? this.isForm = false : this.isForm = true
+ let res = await getSubmit(this.callerInfo)
+ res === '' ? this.isForm = false : this.isForm = true
} else {
wx.switchTab({
url: `/pages/index/index`,
diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue
index 779c33e..fc69c1e 100644
--- a/pages/checkMessageDetail/checkMessageDetail.vue
+++ b/pages/checkMessageDetail/checkMessageDetail.vue
@@ -60,7 +60,7 @@
data() {
return {
isManager: true,
- userId: ''; //用户id
+ userId: '', //用户id
show: false, //控制模态框显隐
content: '', //模态框显示内容
list: [
diff --git a/pages/info/info.vue b/pages/info/info.vue
index 84f745f..a1d6bcb 100644
--- a/pages/info/info.vue
+++ b/pages/info/info.vue
@@ -18,10 +18,6 @@
{{info.staffName}}
- 申请者手机号
- {{info.staffPhone}}
-
-
访客姓名
{{info.visitorName}}
@@ -59,37 +55,39 @@
data() {
return {
info: {
- applyNo: 1254611,
- status: 2,
- staffCode: 123456,
- staffName: '张三',
- staffPhone: 123456789,
- visitorName: '李四',
- visitorIdCard:1234567894662552,
- visitorPhone:123456799,
- visitReason:'商务会议',
- visitPosition:'一楼',
- inTime:'2022-09-16 13:28:41',
- outTime: "2022-10-06 13:28:46",
- remarks:'无'
+ // applyNo: 1254611,
+ // status: 2,
+ // staffCode: 123456,
+ // staffName: '张三',
+ // staffPhone: 123456789,
+ // visitorName: '李四',
+ // visitorIdCard:1234567894662552,
+ // visitorPhone:123456799,
+ // visitReason:'商务会议',
+ // visitPosition:'一楼',
+ // inTime:'2022-09-16 13:28:41',
+ // outTime: "2022-10-06 13:28:46",
+ // remarks:'无'
},
color:'',
- status:''
+ status:'',
+ messageId:''
}
},
- async onLoad(option){
- this.info = await getMessageInfo({messageId:option.messageId})
+ onLoad(option){
+ this.messageId = option.messageId
},
- onShow(){
- if(this.info.status == '1'){
- this.status = '申请已提交'
- this.color = 'blue'
- }else if(this.info.status == '2'){
- this.status = '申请已通过'
- this.color = 'green'
+ async onShow(){
+ this.info = await getMessageInfo({messageId:this.messageId})
+ if(this.info.visitorApplyStatus == '1'){
+ this.status = '申请已提交'
+ this.color = 'blue'
+ }else if(this.info.visitorApplyStatus == '2'){
+ this.status = '申请已通过'
+ this.color = 'green'
}else {
- this.status = '申请未通过'
- this.color = 'red'
+ this.status = '申请未通过'
+ this.color = 'red'
}
},
methods: {
diff --git a/pages/information/information.vue b/pages/information/information.vue
index 7c2fb84..6299c8d 100644
--- a/pages/information/information.vue
+++ b/pages/information/information.vue
@@ -117,12 +117,14 @@
onLoad() {
this.callerInfo.inTime = this.shijianc(this.callerInfo.inTime)
this.callerInfo.outTime = this.shijianc(this.callerInfo.outTime)
+ const userInfo = JSON.parse(uni.getStorageSync('userInfo'));
+ this.callerInfo.staffCode = userInfo.account
+ this.callerInfo.staffName = userInfo.name
},
methods: {
change(e) {},
//点击提交访客记录
async submit() {
- console.log(JSON.stringify(this.callerInfo))
if (this.callerInfo.visitorName.trim() == '' || this.callerInfo.visitorIdCard.trim() == '' || this.callerInfo
.visitorPhone.trim() == '' || this.callerInfo.visitReason.trim() == '' || this.callerInfo.visitPosition.trim() == '' || this.callerInfo.staffCode.trim() == ''){
return uni.showToast({
@@ -138,8 +140,8 @@
})
}
if (this.isForm) {
- const res = await getSubmit(this.callerInfo)
- res.data.code === 200 ? this.isForm = false : this.isForm = true
+ let res = await getSubmit(this.callerInfo)
+ res === '' ? this.isForm = false : this.isForm = true
} else {
wx.switchTab({
url: `/pages/index/index`,
diff --git a/pages/list/list.vue b/pages/list/list.vue
index aea44c5..8d16d5d 100644
--- a/pages/list/list.vue
+++ b/pages/list/list.vue
@@ -169,7 +169,9 @@
}
this.statusInfo = '筛选状态'
this.time ='筛选时间'
- this.searchList()
+ this.searchList()
+ this.checkboxList = []
+ this.checkExport = '所有'
setTimeout(()=>{
uni.stopPullDownRefresh()
},1000)
@@ -192,12 +194,25 @@
async change(e){
if(e.trim() === '') {
const res = await getList({})
- return this.list = res
+ return this.list = res.map(item=>{
+ if(item.visitorApplyStatus == '1'){
+ item.status = '申请已提交'
+ item.color = 'blue'
+ }else if(item.visitorApplyStatus == '2'){
+ item.status = '申请已通过'
+ item.color = 'green'
+ }else {
+ item.status = '申请未通过'
+ item.color = 'red'
+ }
+ return item
+ })
}
- setTimeout(()=>{
- this.searchList()
- },1000)
+ debounce(this.searchList(),10000)
},
+ exportClick() {
+
+ },
//根据条件搜索
async searchList(){
const res = await getList(this.queryList)
@@ -236,6 +251,7 @@
},
exportQr(){
this.isExportShow = false
+ this.exportClick()
},
eyeLoock(messageId){
wx.navigateTo({
@@ -304,7 +320,7 @@