|
|
|
|
@ -1,6 +1,21 @@
|
|
|
|
|
<template>
|
|
|
|
|
<page-meta :page-style="'overflow:'+(adminListShow||configshow||areaShow?'hidden':'visible')"></page-meta>
|
|
|
|
|
<view class="containers">
|
|
|
|
|
<!-- VIP:先核验名单内姓名+手机号 -->
|
|
|
|
|
<view v-if="form.type==4 && !vipGatePassed" class="vip-gate-wrap">
|
|
|
|
|
<view class="formtext">VIP 访客身份核验</view>
|
|
|
|
|
<view class="vip-gate-tip">请填写与后台 VIP 客户名单中一致的姓名与手机号</view>
|
|
|
|
|
<uni-forms labelWidth="100px">
|
|
|
|
|
<uni-forms-item label="姓名" required>
|
|
|
|
|
<uni-easyinput v-model="vipGateForm.name" placeholder="请输入姓名" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<uni-forms-item label="联系电话" required>
|
|
|
|
|
<uni-easyinput v-model="vipGateForm.mobile" placeholder="请输入手机号" type="number" maxlength="11" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
</uni-forms>
|
|
|
|
|
<button type="primary" style="background-color: #044ed7; margin-top: 24rpx;" @click="submitVipGate">验证并继续</button>
|
|
|
|
|
</view>
|
|
|
|
|
<block v-else>
|
|
|
|
|
<!-- 拜访须知 -->
|
|
|
|
|
<u-popup :show="configshow" :mask-close-able="false" class="configwrap" mode="bottom">
|
|
|
|
|
<view class="configtitle">
|
|
|
|
|
@ -9,11 +24,11 @@
|
|
|
|
|
<view class="configvalue">
|
|
|
|
|
<view v-html="configInfo.value">
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view style="text-align: center;">
|
|
|
|
|
<view class="configbtn" @click="closeConfig">
|
|
|
|
|
确认
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="text-align: center;">
|
|
|
|
|
<view class="configbtn" @click="closeConfig">
|
|
|
|
|
确认
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
@ -56,7 +71,7 @@
|
|
|
|
|
<uni-data-checkbox @change='changeVisitArea' v-model="form.visit_area_id" :localdata="visitArea"
|
|
|
|
|
:map="{text:'name',value:'id'}" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<uni-forms-item label="到访事由" v-if="form.type==1">
|
|
|
|
|
<uni-forms-item label="到访事由" v-if="form.type==1||form.type==4">
|
|
|
|
|
<uni-data-select v-model="form.reason" :localdata="reasonList">
|
|
|
|
|
</uni-data-select>
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
@ -75,12 +90,15 @@
|
|
|
|
|
<uni-forms-item label="备注">
|
|
|
|
|
<uni-easyinput type="textarea" v-model="form.remark" placeholder="请输入自我备注" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<view class="formtext">拜访人信息</view>
|
|
|
|
|
<view class="formtext formtext-flex">
|
|
|
|
|
<text>拜访人信息</text>
|
|
|
|
|
<button v-if="form.type!=4" class="history-btn" type="primary" size="mini" @click="fillLatestVisitorInfo">拉取过往信息</button>
|
|
|
|
|
</view>
|
|
|
|
|
<uni-forms-item label="姓名" required name="name">
|
|
|
|
|
<uni-easyinput v-model="form.name" placeholder="请输入姓名" />
|
|
|
|
|
<uni-easyinput v-model="form.name" placeholder="请输入姓名" :disabled="form.type==4 && vipGatePassed" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<uni-forms-item label="联系电话" required name="mobile">
|
|
|
|
|
<uni-easyinput v-model="form.mobile" placeholder="请输入联系电话" />
|
|
|
|
|
<uni-easyinput v-model="form.mobile" placeholder="请输入联系电话" :disabled="form.type==4 && vipGatePassed" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<uni-forms-item label="证件类型" required name="credent">
|
|
|
|
|
<uni-data-select v-model="form.credent" :localdata="credentList">
|
|
|
|
|
@ -95,7 +113,7 @@
|
|
|
|
|
<uni-forms-item label="单位名称" required name="company_name">
|
|
|
|
|
<uni-easyinput v-model="form.company_name" placeholder="请输入单位名称" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<uni-forms-item label="CDA编号" required name="cda" v-if="form.type==1&&visitAreaText=='生产区'">
|
|
|
|
|
<uni-forms-item label="CDA编号" required name="cda" v-if="(form.type==1||form.type==4)&&visitAreaText=='生产区'">
|
|
|
|
|
<uni-easyinput type='textarea' v-model="form.cda" placeholder="请输入CDA编号(如无注明原因)" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<uni-forms-item label="到访车辆" v-if="form.type!=3">
|
|
|
|
|
@ -176,8 +194,8 @@
|
|
|
|
|
<uni-datetime-picker type="date" :start="toadyStart" return-type="string" v-model="form.end_date" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
</template> -->
|
|
|
|
|
<view class="formtext" v-if="form.type==1||form.type==2">被访人信息</view>
|
|
|
|
|
<uni-forms-item label="被访人" required name="acceptName" v-if="form.type==1||form.type==2">
|
|
|
|
|
<view class="formtext" v-if="form.type==1||form.type==2||form.type==4">被访人信息</view>
|
|
|
|
|
<uni-forms-item label="被访人" required name="acceptName" v-if="form.type==1||form.type==2||form.type==4">
|
|
|
|
|
<uni-easyinput @clear="clearAccept('accept')" disabled v-model="form.acceptName"
|
|
|
|
|
@tap="adminListShowOpen('accept')" placeholder="请选择联系人员" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
@ -186,12 +204,12 @@
|
|
|
|
|
<uni-forms-item label="收货人" v-if="form.type==3" required name="goodsName">
|
|
|
|
|
<uni-easyinput @clear="clearAccept('goods')" disabled v-model="form.goodsName"
|
|
|
|
|
@tap="adminListShowOpen('goods')" placeholder="请选择联系人员" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
|
|
|
|
|
<view class="formtext" v-if="visitAreaText=='生产区'">陪同人信息</view>
|
|
|
|
|
<uni-forms-item label="陪同人" required name="accompanyName" v-if="visitAreaText=='生产区'">
|
|
|
|
|
<uni-easyinput @clear="clearAccept('accompany')" disabled v-model="form.accompanyName"
|
|
|
|
|
@tap="adminListShowOpen('accompany')" placeholder="请选择联系人员" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
|
|
|
|
|
<view class="formtext" v-if="visitAreaText=='生产区'">陪同人信息</view>
|
|
|
|
|
<uni-forms-item label="陪同人" required name="accompanyName" v-if="visitAreaText=='生产区'">
|
|
|
|
|
<uni-easyinput @clear="clearAccept('accompany')" disabled v-model="form.accompanyName"
|
|
|
|
|
@tap="adminListShowOpen('accompany')" placeholder="请选择联系人员" />
|
|
|
|
|
</uni-forms-item>
|
|
|
|
|
<qianziyu-select :show="adminListShow" type="radio" :popupTitle="'联系人员'" name="cworkStationName"
|
|
|
|
|
:dataLists="adminList" placeholder="输入陪同人具体姓名或手机号搜索" @search="selectSearch" @submit="submitAccept"
|
|
|
|
|
@ -227,6 +245,7 @@
|
|
|
|
|
style="background-color: #044ed7;margin-left:8px">确认</button>
|
|
|
|
|
</view>
|
|
|
|
|
</uni-drawer>
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@ -463,7 +482,12 @@
|
|
|
|
|
adminList: [],
|
|
|
|
|
isCall: '', // 是否待邀约
|
|
|
|
|
goStudy: '提交',
|
|
|
|
|
isStudy: false
|
|
|
|
|
isStudy: false,
|
|
|
|
|
vipGatePassed: true,
|
|
|
|
|
vipGateForm: {
|
|
|
|
|
name: '',
|
|
|
|
|
mobile: ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -472,36 +496,60 @@
|
|
|
|
|
// url:'/pages/visit/testStudy?type=3'
|
|
|
|
|
// })
|
|
|
|
|
// return
|
|
|
|
|
this.toadyStart = new Date()
|
|
|
|
|
this.form.type = options.type
|
|
|
|
|
this.areaShow = options.type == 1 ? true : false
|
|
|
|
|
this.configKey = options.type == 1 ? 'ptfk' : (options.type == 2 ? 'sgfk' : 'wlcl')
|
|
|
|
|
const now = new Date()
|
|
|
|
|
this.toadyStart =
|
|
|
|
|
now.getFullYear() +
|
|
|
|
|
'-' +
|
|
|
|
|
String(now.getMonth() + 1).padStart(2, '0') +
|
|
|
|
|
'-' +
|
|
|
|
|
String(now.getDate()).padStart(2, '0')
|
|
|
|
|
const visitType = parseInt(options.type || 1)
|
|
|
|
|
this.form.type = visitType
|
|
|
|
|
if (visitType == 4) {
|
|
|
|
|
this.vipGatePassed = false
|
|
|
|
|
this.areaShow = false
|
|
|
|
|
} else {
|
|
|
|
|
this.areaShow = (visitType == 1)
|
|
|
|
|
}
|
|
|
|
|
// VIP 访客:拜访须知使用后台配置 key「vipxz」;普通访客初始 ptfk(选区后在 closeArea 切换)
|
|
|
|
|
this.configKey =
|
|
|
|
|
visitType == 4 ? 'vipxz' :
|
|
|
|
|
visitType == 1 ? 'ptfk' :
|
|
|
|
|
visitType == 2 ? 'sgfk' : 'wlcl'
|
|
|
|
|
this.isCall = options.iscall ? options.iscall : ''
|
|
|
|
|
// this.goStudy = this.isCall == 'call' ? '提交' : ''
|
|
|
|
|
this.form.audit_status = this.isCall == 'call' ? 1 : 0
|
|
|
|
|
this.showStudy()
|
|
|
|
|
if (options.type == 2 || options.type == 3) {
|
|
|
|
|
if (visitType !== 4) {
|
|
|
|
|
this.showStudy()
|
|
|
|
|
}
|
|
|
|
|
if (visitType == 2 || visitType == 3) {
|
|
|
|
|
this.getConfig()
|
|
|
|
|
}
|
|
|
|
|
this.init()
|
|
|
|
|
if (uni.getStorageSync('formdata')) {
|
|
|
|
|
this.form = uni.getStorageSync('formdata')
|
|
|
|
|
}
|
|
|
|
|
if (parseInt(this.form.type, 10) === 4) {
|
|
|
|
|
this.vipGatePassed = false
|
|
|
|
|
this.areaShow = false
|
|
|
|
|
this.vipGateForm.name = (this.form.name || '').trim()
|
|
|
|
|
this.vipGateForm.mobile = (this.form.mobile || '').trim()
|
|
|
|
|
}
|
|
|
|
|
// this.getAdminList()
|
|
|
|
|
},
|
|
|
|
|
onShareAppMessage() {
|
|
|
|
|
return {
|
|
|
|
|
title: 'BD访客系统',
|
|
|
|
|
path: '/pages/index/index',
|
|
|
|
|
// imageUrl: this.logoIndex
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onShareTimeline() {
|
|
|
|
|
return {
|
|
|
|
|
title: 'BD访客系统',
|
|
|
|
|
path: '/pages/index/index',
|
|
|
|
|
// imageUrl: this.logoIndex
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onShareAppMessage() {
|
|
|
|
|
return {
|
|
|
|
|
title: 'BD访客系统',
|
|
|
|
|
path: '/pages/index/index',
|
|
|
|
|
// imageUrl: this.logoIndex
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onShareTimeline() {
|
|
|
|
|
return {
|
|
|
|
|
title: 'BD访客系统',
|
|
|
|
|
path: '/pages/index/index',
|
|
|
|
|
// imageUrl: this.logoIndex
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onReady() {},
|
|
|
|
|
@ -541,9 +589,54 @@
|
|
|
|
|
this.form.accompanyName = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
fillLatestVisitorInfo() {
|
|
|
|
|
const mobile = (this.form.mobile || '').trim()
|
|
|
|
|
const idcard = this.form.credent == 2 ? (this.form.passcard || '').trim() : (this.form.idcard || '').trim()
|
|
|
|
|
if (!mobile && !idcard) {
|
|
|
|
|
this.util.alert('请先填写手机号或证件号,再拉取过往信息')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let that = this
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/visit/latest-visitor',
|
|
|
|
|
method: 'GET',
|
|
|
|
|
data: {
|
|
|
|
|
mobile: mobile,
|
|
|
|
|
idcard: idcard
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
that.form.name = res.name || that.form.name
|
|
|
|
|
that.form.mobile = res.mobile || that.form.mobile
|
|
|
|
|
that.form.credent = res.credent || that.form.credent
|
|
|
|
|
if (parseInt(that.form.credent) === 2) {
|
|
|
|
|
that.form.passcard = res.idcard || that.form.passcard
|
|
|
|
|
that.form.idcard = res.idcard || that.form.idcard
|
|
|
|
|
} else {
|
|
|
|
|
that.form.idcard = res.idcard || that.form.idcard
|
|
|
|
|
}
|
|
|
|
|
that.form.company_name = res.company_name || that.form.company_name
|
|
|
|
|
that.form.cda = res.cda || that.form.cda
|
|
|
|
|
if (Array.isArray(res.cars)) {
|
|
|
|
|
that.form.cars = res.cars
|
|
|
|
|
}
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '已回填最近一条信息',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 1500
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(errMsg) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: errMsg || '未获取到历史数据',
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
submitAccept(e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.form.accompany_id = e.id
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.form.accompany_id = e.id
|
|
|
|
|
this.form.accompanyName = e.name
|
|
|
|
|
if (this.acceptType == 'accept') {
|
|
|
|
|
this.form.accept_admin_id = e.id
|
|
|
|
|
@ -578,11 +671,72 @@
|
|
|
|
|
closeConfig() {
|
|
|
|
|
this.configshow = false
|
|
|
|
|
},
|
|
|
|
|
submitVipGate() {
|
|
|
|
|
const name = (this.vipGateForm.name || '').trim()
|
|
|
|
|
const mobile = (this.vipGateForm.mobile || '').trim()
|
|
|
|
|
if (!name) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '请输入姓名',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (!mobile || !/^[1][3-9][\d]{9}$/.test(mobile)) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '请输入正确手机号',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const that = this
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/user/is-vip',
|
|
|
|
|
method: 'GET',
|
|
|
|
|
data: {
|
|
|
|
|
mobile,
|
|
|
|
|
name
|
|
|
|
|
},
|
|
|
|
|
customLoading: true,
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
if (parseInt(res?.is_vip || 0) !== 1) {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '您当前还不在vip客户名单中,可先联系管理员录入',
|
|
|
|
|
showCancel: false,
|
|
|
|
|
success: function() {
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
url: '/pages/index/index'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
that.vipGatePassed = true
|
|
|
|
|
that.form.name = name
|
|
|
|
|
that.form.mobile = mobile
|
|
|
|
|
that.areaShow = true
|
|
|
|
|
that.showStudy()
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(err) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: err || '验证失败',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
closeArea() {
|
|
|
|
|
if (!this.form.visit_area_id) {
|
|
|
|
|
this.util.alert("请先选择前往区域")
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// VIP 访客统一走拜访须知「vipxz」,不按区域切换 ptfk/cjfk/yffk
|
|
|
|
|
if (Number(this.form.type) === 4) {
|
|
|
|
|
this.configKey = 'vipxz'
|
|
|
|
|
this.getConfig()
|
|
|
|
|
this.areaShow = false
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.visitAreaText == "生产区") {
|
|
|
|
|
this.configKey = 'cjfk'
|
|
|
|
|
this.getConfig()
|
|
|
|
|
@ -801,15 +955,48 @@
|
|
|
|
|
id_arr.push(k.idcard)
|
|
|
|
|
}
|
|
|
|
|
this.$refs['formdata'].validate().then(res => {
|
|
|
|
|
// 录入后先按手机号匹配 VIP,供学习流程判断「仅观看/需答题」
|
|
|
|
|
this.checkVipByMobile(this.form.mobile).then(vipRes => {
|
|
|
|
|
const isVip = parseInt(vipRes?.is_vip || 0) === 1 ? 1 : 0
|
|
|
|
|
uni.setStorageSync('studydata', {
|
|
|
|
|
type: this.form.type,
|
|
|
|
|
name: this.form.name,
|
|
|
|
|
mobile: this.form.mobile,
|
|
|
|
|
idcard: this.form.credent == 2 ? this.form.passcard : this.form.idcard,
|
|
|
|
|
is_vip: isVip
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
uni.setStorageSync('studydata', {
|
|
|
|
|
type: this.form.type,
|
|
|
|
|
name: this.form.name,
|
|
|
|
|
mobile: this.form.mobile,
|
|
|
|
|
idcard: this.form.credent == 2 ? this.form.passcard : this.form.idcard
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/visit/idcard-check',
|
|
|
|
|
method: "post",
|
|
|
|
|
data: {
|
|
|
|
|
idcard: id_arr
|
|
|
|
|
idcard: id_arr,
|
|
|
|
|
type: that.form.type
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
if (res.length > 0) {
|
|
|
|
|
let str = res.join(",") + '未完成学习培训'
|
|
|
|
|
const missing = Array.isArray(res?.missing) ? res.missing : []
|
|
|
|
|
const expired = Array.isArray(res?.expired) ? res.expired : []
|
|
|
|
|
const invalidLegacy = Array.isArray(res?.invalid) ? res.invalid : (Array.isArray(res) ? res : [])
|
|
|
|
|
const hasInvalid = missing.length > 0 || expired.length > 0 || invalidLegacy.length > 0
|
|
|
|
|
if (hasInvalid) {
|
|
|
|
|
let messageArr = []
|
|
|
|
|
if (missing.length > 0) {
|
|
|
|
|
messageArr.push(`未学习:${missing.join(",")}`)
|
|
|
|
|
}
|
|
|
|
|
if (expired.length > 0) {
|
|
|
|
|
messageArr.push(`已过期:${expired.join(",")}`)
|
|
|
|
|
}
|
|
|
|
|
if (messageArr.length === 0 && invalidLegacy.length > 0) {
|
|
|
|
|
messageArr.push(`异常:${invalidLegacy.join(",")}`)
|
|
|
|
|
}
|
|
|
|
|
let str = messageArr.join(";") + '。请先完成当前访客类型的学习流程'
|
|
|
|
|
that.util.alert(str)
|
|
|
|
|
uni.setStorageSync('formdata', that.form)
|
|
|
|
|
} else {
|
|
|
|
|
@ -852,8 +1039,28 @@
|
|
|
|
|
this.submitNoStudy()
|
|
|
|
|
} else {
|
|
|
|
|
uni.setStorageSync('formdata', this.form)
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/pages/visit/study?type=' + this.form.type
|
|
|
|
|
this.checkVipByMobile(this.form.mobile).then(vipRes => {
|
|
|
|
|
const isVip = parseInt(vipRes?.is_vip || 0) === 1 ? 1 : 0
|
|
|
|
|
uni.setStorageSync('studydata', {
|
|
|
|
|
type: this.form.type,
|
|
|
|
|
name: this.form.name,
|
|
|
|
|
mobile: this.form.mobile,
|
|
|
|
|
idcard: this.form.credent == 2 ? this.form.passcard : this.form.idcard,
|
|
|
|
|
is_vip: isVip
|
|
|
|
|
})
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/pages/visit/study?type=' + this.form.type
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
uni.setStorageSync('studydata', {
|
|
|
|
|
type: this.form.type,
|
|
|
|
|
name: this.form.name,
|
|
|
|
|
mobile: this.form.mobile,
|
|
|
|
|
idcard: this.form.credent == 2 ? this.form.passcard : this.form.idcard
|
|
|
|
|
})
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/pages/visit/study?type=' + this.form.type
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -861,9 +1068,43 @@
|
|
|
|
|
console.log('err', err);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
checkVipByMobile(mobile) {
|
|
|
|
|
const that = this
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
if (!mobile) {
|
|
|
|
|
resolve({
|
|
|
|
|
is_vip: 0
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const data = {
|
|
|
|
|
mobile: mobile
|
|
|
|
|
}
|
|
|
|
|
if (parseInt(this.form.type, 10) === 4) {
|
|
|
|
|
const n = (this.form.name || '').trim()
|
|
|
|
|
if (n) {
|
|
|
|
|
data.name = n
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
that.util.request({
|
|
|
|
|
api: '/api/mobile/user/is-vip',
|
|
|
|
|
method: 'GET',
|
|
|
|
|
data: data,
|
|
|
|
|
customLoading: true,
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
resolve(res || {
|
|
|
|
|
is_vip: 0
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(err) {
|
|
|
|
|
reject(err)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
submitForm() {
|
|
|
|
|
let that = this
|
|
|
|
|
console.log("form",this.form)
|
|
|
|
|
let that = this
|
|
|
|
|
console.log("form",this.form)
|
|
|
|
|
// return
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/admin/visit/save',
|
|
|
|
|
@ -926,8 +1167,9 @@
|
|
|
|
|
} else {
|
|
|
|
|
// 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
|
|
|
|
|
uni.requestSubscribeMessage({
|
|
|
|
|
tmplIds: ['DmzNRREPFdZrMWconNDdbj_ebtVPRWufq27kRQ25eNg',
|
|
|
|
|
'IczaKkCmwf55tAAzCcxb_fbbf5L25SWrSKvaBrkIyk4'
|
|
|
|
|
tmplIds: [
|
|
|
|
|
'O898NDrqGUUeSR42uraqr2PLEg05sNbYVu46I0qLkhE',
|
|
|
|
|
'Caa0O6pPtQDHQMPsqE6PHyzueeI11JvlpenbgwkYC0s'
|
|
|
|
|
],
|
|
|
|
|
success(res) {
|
|
|
|
|
console.log("res", res)
|
|
|
|
|
@ -962,19 +1204,30 @@
|
|
|
|
|
.formtext {
|
|
|
|
|
margin-bottom: 20rpx
|
|
|
|
|
}
|
|
|
|
|
.formtext-flex{
|
|
|
|
|
display:flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
.history-btn{
|
|
|
|
|
background-color:#044ed7 !important;
|
|
|
|
|
font-size:24rpx;
|
|
|
|
|
line-height:1.8;
|
|
|
|
|
padding:0 16rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ .uni-table-td {
|
|
|
|
|
::v-deep .uni-table-td {
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ .uni-drawer__content {
|
|
|
|
|
::v-deep .uni-drawer__content {
|
|
|
|
|
padding: 40rpx
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.configtitle {
|
|
|
|
|
font-size: 40rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-top: 36rpx;
|
|
|
|
|
margin-top: 36rpx;
|
|
|
|
|
padding-bottom: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1007,12 +1260,10 @@
|
|
|
|
|
margin-right: 20rpx
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ .u-popup__content__close .u-icon__icon {
|
|
|
|
|
::v-deep .u-popup__content__close .u-icon__icon {
|
|
|
|
|
color: #fff !important
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.areavalue {}
|
|
|
|
|
|
|
|
|
|
.areabtn {
|
|
|
|
|
background-color: #044ed7;
|
|
|
|
|
/* margin-left: 8px; */
|
|
|
|
|
@ -1023,7 +1274,17 @@
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ .areavalue .uni-data-checklist .checklist-group .checklist-box.is--button {
|
|
|
|
|
::v-deep .areavalue .uni-data-checklist .checklist-group .checklist-box.is--button {
|
|
|
|
|
padding: 30rpx
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.vip-gate-wrap {
|
|
|
|
|
padding: 24rpx 12rpx;
|
|
|
|
|
}
|
|
|
|
|
.vip-gate-tip {
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
color: #666;
|
|
|
|
|
margin-bottom: 32rpx;
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
}
|
|
|
|
|
</style>
|