lion 2 years ago
parent 5e290bc9b8
commit 304940c490

@ -35,6 +35,9 @@
"path": "pages/visit/addrecord"
},
//
{
"path": "pages/visit/tostudy"
},
{
"path": "pages/visit/study"
},

@ -25,10 +25,16 @@
<view v-if="info.type=='1'"><text>{{info.reason}}</text></view>
<view v-else-if="info.type=='3'">车辆<text>{{info.plate}}</text></view>
</view>
</view>
<view class="company">
<view>
拜访公司<text>{{info.company_name?info.company_name:''}}</text>
</view>
</view>
<view class="dblong">
<view>长期访客申请<text>{{info.long_time==0?'否':'是'}}</text></view>
<view v-if="info.long_time==1">访{{info.start_date}} {{info.end_date}}</view>
<view v-if="info.long_time==1">访{{info.start_date?info.start_date:''}} {{info.end_date?info.end_date:''}}</view>
</view>
</view>
@ -321,5 +327,12 @@
.dbinfo>view text {
color: #8f9596;
}
.company{
padding-bottom:30rpx;
margin-top:-10rpx;
}
.company text{
color: #8f9596;
}
</style>

@ -65,10 +65,16 @@
<view v-if="item.type=='1'"><text>{{item.reason}}</text></view>
<view v-else-if="item.type=='3'">车牌<text>{{item.plate}}</text></view>
</view>
</view>
<view class="company">
<view>
拜访公司<text>{{item.company_name?item.company_name:''}}</text>
</view>
</view>
<view class="dblong">
<view>长期访客申请<text>{{item.long_time==0?'否':'是'}}</text></view>
<text v-if="item.long_time==1">访{{item.start_date}} {{item.end_date}}</text>
<text v-if="item.long_time==1">访{{item.start_date?item.start_date:''}} {{item.end_date?item.end_date:''}}</text>
</view>
</view>
</view>
@ -346,5 +352,12 @@
padding: 0 20rpx;
background-color: #044ed7;
color: #fff
}
.company{
padding-bottom:30rpx;
margin-top:-10rpx;
}
.company text{
color: #8f9596;
}
</style>

@ -35,10 +35,16 @@
<view v-if="item.type=='1'"><text>{{item.reason}}</text></view>
<view v-else-if="item.type=='3'">车牌<text>{{item.plate}}</text></view>
</view>
</view>
<view class="company">
<view>
拜访公司<text>{{item.company_name?item.company_name:''}}</text>
</view>
</view>
<view class="dblong">
<view>长期访客申请<text>{{item.long_time==0?'否':'是'}}</text></view>
<text v-if="item.long_time==1">访{{item.start_date}} {{item.end_date}}</text>
<text v-if="item.long_time==1">访{{item.start_date?item.start_date:''}} {{item.end_date?item.end_date:''}}</text>
</view>
</view>
</view>
@ -191,5 +197,12 @@
margin-left: 40rpx;
font-size: 32rpx;
line-height: 2.3;
}
.company{
padding-bottom:30rpx;
margin-top:-10rpx;
}
.company text{
color: #8f9596;
}
</style>

@ -5,8 +5,14 @@
<text @click="toUrl(0)" style="color: #f27707;">我的拜访记录</text>
</view>
<view class="bdfk">
<view>
<!-- <view>
<u--image :showLoading="true" :src="ptfk" width="315rpx" height="600rpx" @click="toUrl(1)"></u--image>
</view> -->
<view class="sgry">
<u--image :src="xxpx" width="315rpx" height="280rpx" @click="toUrl(5)"></u--image>
<view>
<u--image :src="ptfk" width="315rpx" height="280rpx" @click="toUrl(1)"></u--image>
</view>
</view>
<view class="sgry">
<u--image :src="wlcl" width="315rpx" height="280rpx" @click="toUrl(3)"></u--image>
@ -14,9 +20,10 @@
<u--image :src="sgry" width="315rpx" height="280rpx" @click="toUrl(2)"></u--image>
</view>
</view>
<!-- <img src="../../static/img/ptfk1.png" alt=""> -->
</view>
<view class="title">BD管理员</view>
<view class="title justify-between">
<text>BD管理员</text>
</view>
<view>
<u--image :src="bdgl" width="670rpx" height="336rpx" @click="toUrl(4)"></u--image>
</view>
@ -28,9 +35,10 @@
export default {
data() {
return {
ptfk: require('../../static/img/ptfk1.png'),
ptfk: require('../../static/img/ptfk.png'),
wlcl: require('../../static/img/wlcl1.png'),
sgry: require('../../static/img/sgry1.png'),
sgry: require('../../static/img/sgry1.png'),
xxpx: require('../../static/img/xxpx.png'),
bdgl: require('../../static/img/bdgl.png'),
winHeight: 0,
isBd:""
@ -59,6 +67,9 @@
break;
case 0:
url = "/pages/visit/visithistory"
break;
case 5:
url = "/pages/visit/tostudy"
break;
case 4:
if(!this.util.isNull(this.isBd)){

@ -71,7 +71,13 @@
})
that.getBdInfo();
},
utilFail: function(res) {}
utilFail: function(res) {
uni.showToast({
title: res,
duration: 2000,
icon:'none'
})
}
})
}).catch(err => {
console.log('err', err);

@ -190,7 +190,7 @@
:dataLists="adminList" placeholder="输入陪同人具体姓名或手机号搜索" @search="selectSearch" @submit="submitAccept"
@cancel="cancelAccept" />
</uni-forms>
<button type="primary" style="background-color: #044ed7;" @click="saveFormgoStudy">{{goStudy}}</button>
<button type="primary" style="background-color: #044ed7;" @click="getStudy">{{goStudy}}</button>
<!-- 随访人员弹出 -->
@ -455,7 +455,7 @@
}],
adminList: [],
isCall: '', //
goStudy: '去学习',
goStudy: '提交',
isStudy:false
}
@ -470,13 +470,16 @@
this.areaShow = options.type == 1?true:false
this.configKey = options.type == 1 ? 'ptfk' : (options.type == 2 ? 'sgfk' : 'wlcl')
this.isCall = options.iscall ? options.iscall : ''
this.goStudy = this.isCall == 'call' ? '提交' : '去学习'
// this.goStudy = this.isCall == 'call' ? '' : ''
this.form.audit_status = this.isCall == 'call' ? 1 : 0
this.getStudy()
this.showStudy()
if(options.type==2||options.type==3){
this.getConfig()
}
this.init()
this.init()
if(uni.getStorageSync('formdata')){
this.form = uni.getStorageSync('formdata')
}
// this.getAdminList()
},
onReady() {},
@ -590,31 +593,7 @@
})
},
//
async getStudy() {
let that = this
this.util.request({
api: '/api/mobile/visit/ask-log',
method: "get",
data:{
type:that.form.type
},
utilSuccess: function(res) {
console.log("res",res)
if(res.msg=='学习有效中'){
that.isStudy = true
that.goStudy = '提交'
}
},
utilFail: function(res) {
// console.log(res)
// uni.showToast({
// title: res,
// duration: 2000,
// icon: 'none'
// })
}
})
},
async getVisitArea() {
let that = this
@ -737,7 +716,90 @@
},
//
//
// 访
async showStudy() {
this.util.alert("请确保每位访客都已通过学习培训,方可提交拜访")
// let that = this
// let id_arr = []
// id_arr.push(this.form.idcard)
// for(var k of this.form.follw_people){
// id_arr.push(k.idcard)
// }
// this.util.request({
// api: '/api/mobile/visit/ask-log',
// method: "post",
// data:{
// type:that.form.type
// },
// utilSuccess: function(res) {
// console.log("res",res)
// if(res.msg==''){
// uni.showToast({
// title: '访访',
// duration: 2000,
// icon: 'none'
// })
// that.isStudy = true
// that.goStudy = ''
// }
// },
// utilFail: function(res) {
// // console.log(res)
// // uni.showToast({
// // title: res,
// // duration: 2000,
// // icon: 'none'
// // })
// }
// })
},
// 访
async getStudy() {
let that = this
let id_arr = []
id_arr.push(this.form.idcard)
for(var k of this.form.follw_people){
id_arr.push(k.idcard)
}
this.$refs['formdata'].validate().then(res => {
this.util.request({
api: '/api/mobile/visit/idcard-check',
method: "post",
data:{
idcard:id_arr
},
utilSuccess: function(res) {
if(res.length>0){
let str = res.join("")+'未完成学习培训'
that.util.alert(str)
uni.setStorageSync('formdata', that.form)
}else{
//
if (that.isCall === 'call') {
that.submitForm()
}else{
// 访
that.submitNoStudy()
}
}
},
utilFail: function(res) {
// console.log(res)
uni.showToast({
title: res,
duration: 2000,
icon: 'none'
})
}
})
}).catch(err => {
console.log('err', err);
})
},
saveFormgoStudy() {
if(this.form.credent==2){
this.form.idcard = this.form.passcard
@ -775,7 +837,7 @@
duration: 2000,
icon: 'none'
})
// uni.removeStorageSync('formData')
uni.removeStorageSync('formdata')
uni.redirectTo({
url: '/pages/visit/successform?iscall=call'
})
@ -801,6 +863,7 @@
duration: 2000,
icon: 'none'
})
uni.removeStorageSync('formdata')
that.newsSubscription()
},
utilFail: function(res) {

@ -26,10 +26,17 @@
<view v-if="info.type=='1'"><text>{{info.reason}}</text></view>
<view v-else-if="info.type=='3'">车辆类型<text>{{info.plate}}</text></view>
</view>
</view>
</view>
<view class="company">
<view>
拜访公司<text>{{info.company_name?info.company_name:''}}</text>
</view>
</view>
<view class="dblong">
<view>长期访客申请<text>{{info.long_time==0?'否':'是'}}</text></view>
<view v-if="info.long_time==1">访{{info.start_date}} {{info.end_date}}</view>
<view v-if="info.long_time==1">访{{info.start_date?info.start_date:''}} {{info.end_date?info.end_date:''}}</view>
</view>
</view>
@ -325,5 +332,13 @@
.cancelcode button.wd100{
width:100%;
}
}
.company{
padding-bottom:30rpx;
margin-top:-10rpx;
}
.company text{
color: #8f9596;
}
</style>

@ -67,8 +67,10 @@
},
methods: {
getFormdata(){
let res = uni.getStorageSync('formdata')
this.formData = res
// let res = uni.getStorageSync('formdata')
// this.formData = res
let res = uni.getStorageSync('studydata')
this.askData = res
},
async getStudy() {
let that = this
@ -146,7 +148,7 @@
console.log(this.result,this.resultArr,'---',this.askContent)
console.log("askdata",this.askData)
that.submitStudy()
// return
return
this.util.request({
api: '/api/mobile/visit/visit-save',
method: "POST",
@ -171,12 +173,27 @@
},
submitStudy() {
let that = this
console.log("that.askData",that.askData)
// return
this.util.request({
api: '/api/mobile/visit/ask-save',
method: "POST",
data: that.askData,
utilSuccess: function(res) {
if(uni.getStorageSync('studydata')){
uni.removeStorageSync('studydata')
}
uni.showToast({
title: '提交成功',
duration: 1500,
icon: 'none'
})
setTimeout(function(){
uni.redirectTo({
url: '/pages/index/index'
})
},1500)
},
utilFail: function(res) {
uni.showToast({
@ -234,6 +251,7 @@
.asks {
min-height: 80vh;
overflow-y: auto;
padding-bottom:60rpx
}
.asks>view,
@ -244,7 +262,8 @@
.containers>.submitBtn {
position: fixed;
bottom: 0;
width: 100%;
width: 100%;
left:0
}
.containers>.submitBtn text {
@ -259,7 +278,7 @@
}
.containers>.submitBtn text:first-child {
border-radius: 10rpx 0 0 10rpx;
border-radius: 0rpx 0 0 10rpx;
}
.containers>.submitBtn text:last-child {
@ -267,7 +286,7 @@
background-color: #044ed7;
color: #fff;
display: inline-block;
border-radius: 0 10rpx 10rpx 0;
border-radius: 0 0rpx 10rpx 0;
}
.steps {

@ -0,0 +1,166 @@
<template>
<view class="containers">
<view class="steps">
<uni-steps :options="steps" :active="stepActive" active-color="#044ed7" />
</view>
<uni-forms ref="formdata" :model="form" :rules="rules" labelWidth="100px">
<view class="formtext">基础信息</view>
<uni-forms-item label="学习类型" required>
<uni-data-select @change='changeType' v-model="form.type" :localdata="typeList">
</uni-data-select>
</uni-forms-item>
<uni-forms-item label="姓名" required name="name">
<uni-easyinput v-model="form.name" placeholder="请输入姓名" />
</uni-forms-item>
<uni-forms-item label="联系电话" required name="mobile">
<uni-easyinput v-model="form.mobile" placeholder="请输入联系电话" />
</uni-forms-item>
<uni-forms-item label="身份证号" required name="idcard">
<uni-easyinput type="idcard" v-model="form.idcard" placeholder="请输入证件号码" />
</uni-forms-item>
</uni-forms>
<button class='study' type="primary" style="background-color: #044ed7;" @click="toUrl"></button>
</view>
</template>
<script>
export default{
data(){
return{
steps: [{
title: '填报'
}, {
title: '学习'
}, {
title: '完成'
}],
stepActive: 0,
form:{
type:1,
name:'',
idcard:'',
mobile:''
},
rules:{
name: {
rules: [{
required: true,
errorMessage: '姓名不能为空'
}]
},
type: {
rules: [{
required: true,
errorMessage: '类型不能为空'
}]
},
mobile: {
rules: [{
required: true,
errorMessage: '联系电话不能为空'
}, {
pattern: '^[1][3-9][\\d]{9}',
errorMessage: '联系号码格式错误'
}]
},
idcard: {
rules: [{
required: true,
errorMessage: '身份证号码不能为空'
}, {
pattern: '^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]',
errorMessage: '身份证格式错误'
}]
},
},
typeList:[{
value:1,
text:'普通访客'
},{
value:2,
text:'施工访客'
},{
value:3,
text:'物流访客'
}]
}
},
onLoad() {
this.isStudy()
let res = uni.getStorageSync('studydata')
if(res){
console.log(res)
this.form = res
}
},
methods:{
toUrl(){
this.$refs['formdata'].validate().then(res => {
uni.setStorageSync('studydata', this.form)
uni.navigateTo({
url: '/pages/visit/study?type=' + this.form.type
})
}).catch(err => {
console.log('err', err);
})
},
changeType(e){
console.log(e)
this.form.type = e
this.isStudy()
},
isStudy(){
let that = this
this.util.request({
api: '/api/mobile/visit/ask-log',
method: "get",
data:{
type:that.form.type
},
utilSuccess: function(res) {
if(res.msg=='学习有效中'){
uni.showToast({
title: '该类型培训已通过,无须重复培训',
duration: 2000,
icon: 'none'
})
}
},
utilFail: function(res) {
// console.log(res)
// uni.showToast({
// title: res,
// duration: 2000,
// icon: 'none'
// })
}
})
}
}
}
</script>
<style>
.containers {
background-color: #fff;
min-height: 100vh;
padding: 20rpx;
padding-bottom: 60rpx;
}
.formtext {
margin-bottom: 20rpx
}
.steps {
margin-bottom: 40rpx
}
.study{
position: absolute;
bottom: 60rpx;
margin: 20rpx;
width: 90%;
}
</style>

@ -30,10 +30,16 @@
<view v-if="item.type=='1'"><text>{{item.reason}}</text></view>
<view v-else-if="item.type=='3'">车牌<text>{{item.plate}}</text></view>
</view>
</view>
<view class="company">
<view>
拜访公司<text>{{item.company_name?item.company_name:''}}</text>
</view>
</view>
<view class="dblong">
<view>长期访客申请<text>{{item.long_time==0?'否':'是'}}</text></view>
<text v-if="item.long_time==1">访{{item.start_date}} {{item.end_date}}</text>
<text v-if="item.long_time==1">访{{item.start_date?item.start_date:''}} {{item.end_date?item.end_date:''}}</text>
</view>
</view>
</view>
@ -158,5 +164,12 @@
}
/deep/ .u-empty{
min-height: 60vh;
}
.company{
padding-bottom:30rpx;
margin-top:-10rpx;
}
.company text{
color: #8f9596;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

@ -199,7 +199,8 @@ const request = options => {
success: function(res) {
uni.hideLoading();
if (res.statusCode != 200) {
if (options.utilFail != undefined) {
if (options.utilFail != undefined) {
if (res.statusCode == 401) {
uni.clearStorageSync();
uni.navigateTo({
@ -210,8 +211,10 @@ const request = options => {
}
}
} else {
if (res.data.hasOwnProperty("errcode")) {
if (res.data.hasOwnProperty("errcode")) {
if (options.utilFail != undefined) {
// console.log("res",res.data.errmsg)
options.utilFail(res.data.errmsg || '接口发生未知错误');
// setTimeout(function(){
// if(res.data.errcode==40001){

Loading…
Cancel
Save