diff --git a/pages/bd/bddetail.vue b/pages/bd/bddetail.vue index 7b8d104..f087659 100644 --- a/pages/bd/bddetail.vue +++ b/pages/bd/bddetail.vue @@ -8,8 +8,8 @@ {{info.audit_status_text}} - 访问时间:{{info.date}} - {{info.visit_time.start_time}}至{{info.visit_time.end_time}} + 访问日期:{{info.date}}{{ info.end_date?'至'+info.end_date:'' }} + 访问时间:{{info.visit_time.start_time}}至{{info.visit_time.end_time}} 施工时段:{{info.work_start_time}}至{{info.work_end_time}} @@ -22,15 +22,15 @@ 拜访人:{{info.name}} 电话:{{info.mobile}} - 事由:{{info.reason}} + 事由:{{info.reason?info.reason:''}} 车辆:{{info.plate}} - - - - 拜访公司:{{info.company_name?info.company_name:''}} - - + + + + 拜访公司:{{info.company_name?info.company_name:''}} + + - + 审核 - - - - - - - - - - + + + + + + + + + + - - - {{checkText}} + + + {{checkText}} @@ -160,23 +160,23 @@ data() { return { id: "", - info: {}, - checkText:'', - checkLevel:[{ - id:1, - value:'请等待一级审核完成' - },{ - id:2, - value:'请等待二级审核完成' - },{ - id:3, - value:'请等待三级审核完成' + info: {}, + checkText:'', + checkLevel:[{ + id:1, + value:'请等待一级审核完成' + },{ + id:2, + value:'请等待二级审核完成' + },{ + id:3, + value:'请等待三级审核完成' }], checkForm: { level: "", status: "", - audit_admin_id: "", - visit_id:"", + audit_admin_id: "", + visit_id:"", reason:"" }, rules: { @@ -197,8 +197,8 @@ text: "驳回" }, ], - check_admin_name: "", - userId:'', + check_admin_name: "", + userId:'', isCheck:false, } }, @@ -206,43 +206,43 @@ }, onLoad(options) { - this.id = options.id + this.id = options.id this.userId = uni.getStorageSync('userInfo_Bd').id this.checkForm.visit_id = parseInt(options.id) this.loadDetail() }, methods: { - checkSubmit() { + checkSubmit() { let that = this - console.log(that.checkForm) - this.$refs['formdata'].validate().then(res => { - this.util.request({ - api: '/api/admin/visit_audit/save', - method: "POST", - requestType:'bd', - data: that.checkForm, - utilSuccess: function(res) { - uni.showToast({ - title: res.msg, - duration: 2000, - icon: 'none' - }) - // uni.removeStorageSync('formData') - uni.redirectTo({ - url:'/pages/bd/record?type=mycheck' - }) - }, - utilFail: function(res) { - uni.showToast({ - title: res, - duration: 2000, - icon: 'none' - }) - } - }) - }).catch(err => { - console.log('err', err); - }) + console.log(that.checkForm) + this.$refs['formdata'].validate().then(res => { + this.util.request({ + api: '/api/admin/visit_audit/save', + method: "POST", + requestType:'bd', + data: that.checkForm, + utilSuccess: function(res) { + uni.showToast({ + title: res.msg, + duration: 2000, + icon: 'none' + }) + // uni.removeStorageSync('formData') + uni.redirectTo({ + url:'/pages/bd/record?type=mycheck' + }) + }, + utilFail: function(res) { + uni.showToast({ + title: res, + duration: 2000, + icon: 'none' + }) + } + }) + }).catch(err => { + console.log('err', err); + }) }, loadDetail() { @@ -255,30 +255,30 @@ id: that.id }, utilSuccess: function(res) { - that.info = res - for (let item of res.audit) { - if(item.status==0){ - if(that.userId==item.audit_admin_id){ - that.checkForm.level = item.level - that.checkForm.id = item.id - that.checkForm.audit_admin_id = item.audit_admin_id - that.isCheck = true - return - }else{ - that.checkText = "请等待"+item.audit_admin.name+"审核" - // that.checkLevel.map(item1=>{ - // if(item.level==item1.id){ - // that.checkText = item1.value - // } - // }) - that.isCheck = false - return - } - }else{ - - that.isCheck = false - } - + that.info = res + for (let item of res.audit) { + if(item.status==0){ + if(that.userId==item.audit_admin_id){ + that.checkForm.level = item.level + that.checkForm.id = item.id + that.checkForm.audit_admin_id = item.audit_admin_id + that.isCheck = true + return + }else{ + that.checkText = "请等待"+item.audit_admin.name+"审核" + // that.checkLevel.map(item1=>{ + // if(item.level==item1.id){ + // that.checkText = item1.value + // } + // }) + that.isCheck = false + return + } + }else{ + + that.isCheck = false + } + } }, utilFail: function(res) { @@ -317,9 +317,9 @@ font-size: 40rpx; padding-left: 30rpx } - .dbcars>view{ - width:100%; - padding-left:0 + .dbcars>view{ + width:100%; + padding-left:0 } .sfyritem { padding-bottom: 10rpx @@ -327,12 +327,12 @@ .dbinfo>view text { color: #8f9596; - } - .company{ - padding-bottom:30rpx; - margin-top:-10rpx; - } - .company text{ - color: #8f9596; } - + .company{ + padding-bottom:30rpx; + margin-top:-10rpx; + } + .company text{ + color: #8f9596; + } + diff --git a/pages/bd/mine.vue b/pages/bd/mine.vue index 71bc488..b55c8db 100644 --- a/pages/bd/mine.vue +++ b/pages/bd/mine.vue @@ -1,10 +1,10 @@ @@ -178,7 +178,7 @@ return { id: "", info: {}, - showCodes: false, + showCodes: false, showCancel:false } }, @@ -211,40 +211,40 @@ } }) - }, - showCancelM(){ - this.showCancel = true - }, - confirmCancel(){ - this.info.audit_status = 5 - this.info.audit_status_text = "已取消" - let that = this - this.showCancel = false - this.util.request({ - api: '/api/mobile/visit/visit-save', - method: "POST", - data: that.info, - utilSuccess: function(res) { - uni.showToast({ - title: res.msg, - duration: 2000, - icon: 'none' - }) - uni.navigateTo({ - url:'/pages/visit/visithistory' - }) - }, - utilFail: function(res) { - uni.showToast({ - title: res, - duration: 2000, - icon: 'none' - }) - } - }) - }, - cancelCancel(){ - this.showCancel = false + }, + showCancelM(){ + this.showCancel = true + }, + confirmCancel(){ + this.info.audit_status = 5 + this.info.audit_status_text = "已取消" + let that = this + this.showCancel = false + this.util.request({ + api: '/api/mobile/visit/visit-save', + method: "POST", + data: that.info, + utilSuccess: function(res) { + uni.showToast({ + title: res.msg, + duration: 2000, + icon: 'none' + }) + uni.navigateTo({ + url:'/pages/visit/visithistory' + }) + }, + utilFail: function(res) { + uni.showToast({ + title: res, + duration: 2000, + icon: 'none' + }) + } + }) + }, + cancelCancel(){ + this.showCancel = false }, loadDetail() { let that = this @@ -293,9 +293,9 @@ font-size: 40rpx; padding-left: 30rpx } - .dbcars>view{ - width:100%; - padding-left:0 + .dbcars>view{ + width:100%; + padding-left:0 } .sfyritem { padding-bottom: 10rpx @@ -320,25 +320,25 @@ .cancelcode button.cancelbtn,.cancelbtns button.cancelbtn { background: #dddd; - border: none; + border: none; color:#333 } .cancelcode button.codebtn,.cancelbtns button.codebtn { background: #4f607e; - border: none; + border: none; color:#fff - } - .cancelcode button.wd100{ - width:100%; - - } - .company{ - padding-bottom:30rpx; - margin-top:-10rpx; - } - .company text{ - color: #8f9596; - } + } + .cancelcode button.wd100{ + width:100%; + + } + .company{ + padding-bottom:30rpx; + margin-top:-10rpx; + } + .company text{ + color: #8f9596; + } - + diff --git a/pages/visit/tostudy.vue b/pages/visit/tostudy.vue index 9beb3c3..39753fd 100644 --- a/pages/visit/tostudy.vue +++ b/pages/visit/tostudy.vue @@ -86,10 +86,10 @@ text:'普通访客' },{ value:2, - text:'施工访客' + text:'施工人员' },{ value:3, - text:'物流访客' + text:'物流车辆' }] } }, diff --git a/pages/visit/visithistory.vue b/pages/visit/visithistory.vue index f819cce..2ae1b15 100644 --- a/pages/visit/visithistory.vue +++ b/pages/visit/visithistory.vue @@ -14,8 +14,8 @@ {{item.audit_status_text}} - 访问时间:{{item.date}} - {{item.visit_time.start_time}}至{{item.visit_time.end_time}} + 访问日期:{{item.date}}{{ item.end_date?'至'+item.end_date:'' }} + 访问时间:{{item.visit_time.start_time}}至{{item.visit_time.end_time}} @@ -27,15 +27,15 @@ 拜访人:{{item.name}} 电话:{{item.mobile}} - 事由:{{item.reason}} + 事由:{{item.reason?info.reason:''}} 车牌:{{item.plate}} - - - - 拜访公司:{{item.company_name?item.company_name:''}} - - + + + + 拜访公司:{{item.company_name?item.company_name:''}} + +