描述:预约添加详情审核拆开

This commit is contained in:
SelfRidicule 2024-03-11 09:18:17 +08:00
parent c4665909f4
commit f8ead93f40
10 changed files with 620 additions and 261 deletions

View File

@ -63,6 +63,7 @@
"pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail", "pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail",
"pages/meeting/invite/invite", "pages/meeting/invite/invite",
"pages/meeting/visitorIinvitation/list/list", "pages/meeting/visitorIinvitation/list/list",
"pages/meeting/visitorIinvitation/add/add",
"pages/meeting/visitorIinvitation/detail/detail", "pages/meeting/visitorIinvitation/detail/detail",
"pages/meeting/visitorIinvitation/indexBar/indexBar" "pages/meeting/visitorIinvitation/indexBar/indexBar"
], ],

View File

@ -0,0 +1,382 @@
let app = getApp();
import Notify from '@vant/weapp/notify/notify';
import {
selfFormatTimeYMDHMS
} from "../../../../utils/util.js"
import {
visitorPersonRq,
selectVisitorRecordByIdRq,
updateVisitorPersonStatusRq
} from "../../../../api/meeting/visitorIinvitation.js"
Page({
/**
* 页面的初始数据
*/
data: {
IMG_NAME: app.IMG_NAME,
id: null,
title: null,
userDetail: {},
idcardTypeShow: false,
idcardTypeList: [{
name: '居民身份证',
}, ],
visitTimeShow: false, // 到访时间show
visitTimeDate: new Date().getTime(), // 到访时间-当前
visitTimeMinDate: new Date().getTime(), // 到访时间-最小
leaveTimeShow: false, // 离开时间show
leaveTimeDate: new Date().getTime(), // 离开时间-当前
fileList: [], // 上传文件
detail: {
customerId: null, //企业id
customerName: null, //企业名称
userId: null, // 被访人id
username: null, //被访人姓名
mobile: null, //被访人手机号
intervieweeId: null, // 访客id
name: null, // 访客姓名
phone: null, // 访客手机号
cardType: '居民身份证', // 证件类型
cardNo: null, // 证件号
visitTime: null, // 到访时间
leaveTime: null, // 离开时间
visitContent: null, // 来访事由
photo: null, // 头像-相对路径
url: null, // 人脸设备图片-全路径
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log('onLoad', options)
let _this = this;
let userDetail = wx.getStorageSync('user')
//
let detail = _this.data.detail;
// 添加 默认设置访客信息
detail.intervieweeId = userDetail.id // 访客id
detail.name = userDetail.username // 访客姓名
detail.phone = userDetail.mobile // 访客手机号
_this.setData({
...options,
userDetail,
detail
})
// 页面初始化 options为页面跳转所带来的参数
wx.setNavigationBarTitle({
title: options.title
})
},
// 跳转-索引栏(单位、人员)
jumpIndexBar(e) {
console.log('jumpIndexBar', e);
let _this = this;
let title = e.currentTarget.dataset.title
// 校验是否选择“被访单位” 后 ,再选择被访人信息
if (title == '人员' && !_this.data.detail.customerId) {
// 错误消息提示
_this.showErrMsg('请先选择被访单位!')
return;
}
// url 参数
let param = '?title=' + title;
if (title == '人员') {
param = param + '&id=' + _this.data.detail.customerId;
}
wx.navigateTo({
url: '/pages/meeting/visitorIinvitation/indexBar/indexBar' + param,
})
},
// 显示-身份证类型
showIdcardType() {
let _this = this;
_this.setData({
idcardTypeShow: true
})
},
// 选择-身份证类型
selectIdcardType(e) {
console.log('selectIdcardType', e);
let _this = this;
let detail = _this.data.detail;
detail.cardType = e.detail.name;
_this.setData({
idcardTypeShow: false,
detail
})
},
// 关闭-身份证类型
closeIdcardType() {
let _this = this;
_this.setData({
idcardTypeShow: false
})
},
// 显示-到访时间
showVisitTime() {
let _this = this;
_this.setData({
visitTimeShow: true
})
},
// 关闭-到访时间
closeVisitTime() {
let _this = this;
_this.setData({
visitTimeShow: false
})
},
// 确认-到访时间
confirmVisitTime(e) {
console.log('confirmVisitTime', e);
let _this = this;
let detail = _this.data.detail;
detail.visitTime = selfFormatTimeYMDHMS(e.detail);
_this.setData({
visitTimeShow: false,
visitTimeDate: e.detail,
detail
})
},
// 显示-离开时间
showLeaveTime() {
let _this = this;
_this.setData({
leaveTimeShow: true
})
},
// 关闭-离开时间
closeLeaveTime() {
let _this = this;
_this.setData({
leaveTimeShow: false
})
},
// 确认-离开时间
confirmLeaveTime(e) {
console.log('confirmLeaveTime111', e);
let _this = this;
let detail = _this.data.detail;
detail.leaveTime = selfFormatTimeYMDHMS(e.detail);
_this.setData({
leaveTimeShow: false,
leaveTimeDate: e.detail,
detail
})
},
// 图片-上传前校验
beforeRead(event) {
const {
file,
callback
} = event.detail;
callback(file.type === 'image');
},
// 图片-上传后
afterRead(event) {
let _this = this;
const {
file
} = event.detail;
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
wx.uploadFile({
url: app.DOMAIN_NAME + '/api/dfs/upload',
filePath: file.url,
name: 'file',
formData: {},
success(res) {
console.log('upload file ', res);
let fileData = JSON.parse(res.data)
// 上传完成需要更新 fileList
let fileList = _this.data.fileList;
fileList.push({
relativeUrl: fileData.fileName,
url: app.IMG_NAME + fileData.fileName,
name: fileData.fileName,
deletable: true,
})
_this.setData({
fileList
})
},
});
},
// 删除图片
deleteImg(event) {
console.log('deleteImg', event);
let _this = this;
let fileList = _this.data.fileList;
fileList.splice(event.detail.index, 1);
_this.setData({
fileList
})
},
// input输入内容监听
fieldInput(e) {
console.log('fieldInput', e);
let _this = this;
let detail = _this.data.detail;
detail[e.currentTarget.dataset.name] = e.detail
_this.setData({
detail
})
},
// 提交数据
submitData() {
let _this = this;
// 上传文件列表
let fileList = _this.data.fileList;
// 数据
let detail = _this.data.detail;
//
// 校验数据
//
// 被访单位
if (!detail.customerId) {
_this.showErrMsg('请选择被访单位!')
return;
}
// 被访人姓名、电话
if (!detail.userId) {
_this.showErrMsg('请选择被访人姓名、电话!')
return;
}
// 访客姓名
if (!detail.name) {
_this.showErrMsg('请填写访客姓名!')
return;
}
// 访客手机号
if (!detail.phone) {
_this.showErrMsg('请填写访客手机号!')
return;
}
// 证件号
if (!detail.cardNo) {
_this.showErrMsg('请填写证件号!')
return;
}
// 到访时间
if (!detail.visitTime) {
_this.showErrMsg('请选择到访时间!')
return;
}
// 离开时间
if (!detail.leaveTime) {
_this.showErrMsg('请选择离开时间!')
return;
}
// 来访事由
if (!detail.visitContent) {
_this.showErrMsg('请填写来访事由!')
return;
}
// 图片上传
if (fileList && fileList.length > 0) {
detail.photo = fileList[0].relativeUrl // 头像-相对路径
detail.url = fileList[0].url // 人脸设备图片-全路径
} else {
_this.showErrMsg('请上传照片!')
return;
}
//
// 添加数据
visitorPersonRq(detail).then(res => {
console.log('visitorPersonRq', res);
// 刷新上个页面参数
let pages = getCurrentPages(); //获取page
let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
prevPage.setData({
changeData: true
})
//
if (res.code == 0) {
wx.navigateBack()
} else {
_this.showErrMsg(res.msg)
}
})
},
// 显示错误消息
showErrMsg(msg) {
Notify({
type: 'danger',
message: msg
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,14 @@
{
"navigationBarTitleText": "详情",
"usingComponents": {
"van-field": "@vant/weapp/field/index",
"van-popup": "@vant/weapp/popup/index",
"van-uploader": "@vant/weapp/uploader/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-notify": "@vant/weapp/notify/index",
"van-action-sheet": "@vant/weapp/action-sheet/index",
"van-dialog": "@vant/weapp/dialog/index"
}
}

View File

@ -0,0 +1,78 @@
<view class="containerView public">
<view class="headView">
<view class="leftLineTitle">预约信息</view>
</view>
<view class="contentView">
<view class="rowView" bind:tap="jumpIndexBar" data-title="单位">
<view class="label must">被访单位</view>
<van-field value="{{ detail.customerName }}" input-class="input" is-link readonly placeholder="请选择" input-align="right" border="{{ false }}" />
</view>
<view class="rowView" bind:tap="jumpIndexBar" data-title="人员">
<view class="label must">被访人姓名</view>
<van-field value="{{ detail.username }}" input-class="input" is-link readonly placeholder="请选择" border="{{ false }}" input-align="right" />
</view>
<view class="rowView" bind:tap="jumpIndexBar" data-title="人员">
<view class="label must">被访人电话</view>
<van-field value="{{ detail.mobile }}" is-link readonly input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
</view>
<view class="rowView">
<view class="label must">访客姓名</view>
<van-field value="{{ detail.name }}" bind:input="fieldInput" data-name="name" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
</view>
<view class="rowView">
<view class="label must">手机号码</view>
<van-field value="{{ detail.phone }}" bind:input="fieldInput" data-name="phone" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
</view>
<view class="rowView">
<view class="label must">身份证类型</view>
<van-field value="{{ detail.cardType }}" input-class="input" is-link readonly placeholder="请选择" arrow-direction="down" input-align="right" bind:tap="showIdcardType" />
</view>
<view class="rowView">
<view class="label must">身份证号</view>
<van-field value="{{ detail.cardNo }}" bind:input="fieldInput" data-name="cardNo" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
</view>
<view class="rowView" bind:tap="showVisitTime">
<view class="label must">到访时间</view>
<van-field value="{{ detail.visitTime }}" input-class="input" is-link readonly placeholder="请选择" border="{{ false }}" arrow-direction="down" input-align="right" />
</view>
<view class="rowView" bind:tap="showLeaveTime">
<view class="label must">离开时间</view>
<van-field value="{{ detail.leaveTime }}" input-class="input" is-link readonly placeholder="请选择" border="{{ false }}" arrow-direction="down" input-align="right" />
</view>
<view class="rowView">
<view class="label must">来访事由</view>
<van-field value="{{ detail.visitContent }}" bind:input="fieldInput" data-name="visitContent" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
</view>
<view class="rowView">
<view class="label must">访客照片</view>
<van-field style="visibility: hidden;" />
</view>
</view>
<!-- 上传图片 -->
<view class="uploadImgView">
<van-uploader file-list="{{ fileList }}" upload-text="点击上传照片" use-before-read bind:before-read="beforeRead" bind:after-read="afterRead" deletable="{{ true }}" bind:delete="deleteImg" max-count="1" />
<view class="tipsView">提示:请保持五官清晰,以方便系统精准识</view>
</view>
<!-- 提交 -->
<view class="submitBtnView" bind:tap="submitData">提交</view>
</view>
<!-- 消息通知 -->
<van-notify id="van-notify" />
<!-- 选择-身份证类型 -->
<van-action-sheet description="请选择身份证类型" close-on-click-overlay="{{true}}" show="{{ idcardTypeShow }}" actions="{{ idcardTypeList }}" bind:select="selectIdcardType" bind:close="closeIdcardType" />
<!-- 选择-到访时间 -->
<van-popup show="{{ visitTimeShow }}" position="bottom" custom-style="height: 50vh;" bind:close="closeVisitTime">
<van-datetime-picker type="datetime" value="{{ visitTimeDate }}" min-date="{{ visitTimeMinDate }}" bind:confirm="confirmVisitTime" bind:cancel="closeVisitTime" />
</van-popup>
<!-- 选择-离开时间 -->
<van-popup show="{{ leaveTimeShow }}" position="bottom" custom-style="height: 50vh;" bind:close="closeLeaveTime">
<van-datetime-picker type="datetime" value="{{ leaveTimeDate }}" min-date="{{ visitTimeDate }}" bind:confirm="confirmLeaveTime" bind:cancel="closeLeaveTime" />
</van-popup>

View File

@ -0,0 +1,119 @@
.containerView.public {
height: auto;
}
.headView {
padding: 30rpx 20rpx;
background: #f6f6f6;
}
.contentView {}
.contentView .rowView.self {
padding: 28rpx 28rpx 28rpx 30rpx;
align-items: flex-start;
}
.contentView .rowView {
display: flex;
justify-content: space-between;
align-items: center;
padding: 2rpx 0 2rpx 30rpx;
border-bottom: 1px solid rgb(126, 126, 126, 0.2);
}
.contentView .rowView:last-of-type {
border-bottom: none;
}
.contentView .rowView .label {
position: relative;
font-size: 30rpx;
color: #000000;
min-width: 120rpx;
margin-right: 30rpx;
}
.contentView .rowView .label.must::after {
content: '*';
display: block;
position: absolute;
left: 100%;
top: 6rpx;
margin-left: 10rpx;
color: red;
}
.input {
font-size: 30rpx;
}
.uploadImgView {
padding: 0 40rpx;
background-color: #ffffff;
font-size: 28rpx;
color: #646566;
}
.uploadImgView .tipsView {
text-align: center;
}
.submitBtnView {
width: 600rpx;
padding: 20rpx;
background: #4e96f8;
color: white;
font-size: 30rpx;
text-align: center;
border-radius: 10rpx;
margin: 60rpx auto;
}
.submitBtn {
box-sizing: border-box;
position: fixed;
z-index: 10;
width: 600rpx;
left: 50%;
transform: translateX(-50%);
bottom: 120rpx;
border-radius: 10rpx;
padding: 20rpx;
background: #4e96f8;
color: white;
font-size: 30rpx;
text-align: center;
}
.textarea {
height: 300rpx !important;
border: 1px solid rgb(126, 126, 126, 0.2) !important;
padding: 20rpx !important;
}
.dialogBtnView {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid rgb(126, 126, 126, 0.2);
}
.dialogBtnView .rejectBtn,
.dialogBtnView .successBtn {
width: 50%;
text-align: center;
padding: 30rpx 0;
font-size: 32rpx;
}
.dialogBtnView .rejectBtn {
border-right: 1px solid rgb(126, 126, 126, 0.2);
color: red;
}
.dialogBtnView .successBtn {
color: #4e96f8;
}

View File

@ -23,18 +23,8 @@ Page({
id: null, id: null,
title: null, title: null,
type: null, type: null,
submitShow: false,
verifyShow: false, verifyShow: false,
userDetail: {}, userDetail: {},
idcardTypeShow: false,
idcardTypeList: [{
name: '居民身份证',
}, ],
visitTimeShow: false, // 到访时间show
visitTimeDate: new Date().getTime(), // 到访时间-当前
visitTimeMinDate: new Date().getTime(), // 到访时间-最小
leaveTimeShow: false, // 离开时间show
leaveTimeDate: new Date().getTime(), // 离开时间-当前
fileList: [], // 上传文件 fileList: [], // 上传文件
detail: { detail: {
customerId: null, //企业id customerId: null, //企业id
@ -68,12 +58,6 @@ Page({
let userDetail = wx.getStorageSync('user') let userDetail = wx.getStorageSync('user')
// //
let detail = _this.data.detail; let detail = _this.data.detail;
// 添加 默认设置访客信息
if (options.type == 'add') {
detail.intervieweeId = userDetail.id // 访客id
detail.name = userDetail.username // 访客姓名
detail.phone = userDetail.mobile // 访客手机号
}
_this.setData({ _this.setData({
...options, ...options,
userDetail, userDetail,
@ -83,16 +67,6 @@ Page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: options.title title: options.title
}) })
// 根据类型 判断显示
if (options.type == 'add') {
_this.setData({
submitShow: true
})
} else if (options.type == 'verify') {
} else if (options.type == 'detail') {
}
// 有id查询详情 // 有id查询详情
if (options.id) { if (options.id) {
// 获取详情 // 获取详情
@ -135,113 +109,6 @@ Page({
}) })
}, },
// 跳转-索引栏(单位、人员)
jumpIndexBar(e) {
console.log('jumpIndexBar', e);
let _this = this;
let title = e.currentTarget.dataset.title
// 校验是否选择“被访单位” 后 ,再选择被访人信息
if (title == '人员' && !_this.data.detail.customerId) {
// 错误消息提示
_this.showErrMsg('请先选择被访单位!')
return;
}
// url 参数
let param = '?title=' + title;
if (title == '人员') {
param = param + '&id=' + _this.data.detail.customerId;
}
wx.navigateTo({
url: '/pages/meeting/visitorIinvitation/indexBar/indexBar' + param,
})
},
// 显示-身份证类型
showIdcardType() {
let _this = this;
_this.setData({
idcardTypeShow: true
})
},
// 选择-身份证类型
selectIdcardType(e) {
console.log('selectIdcardType', e);
let _this = this;
let detail = _this.data.detail;
detail.cardType = e.detail.name;
_this.setData({
idcardTypeShow: false,
detail
})
},
// 关闭-身份证类型
closeIdcardType() {
let _this = this;
_this.setData({
idcardTypeShow: false
})
},
// 显示-到访时间
showVisitTime() {
let _this = this;
_this.setData({
visitTimeShow: true
})
},
// 关闭-到访时间
closeVisitTime() {
let _this = this;
_this.setData({
visitTimeShow: false
})
},
// 确认-到访时间
confirmVisitTime(e) {
console.log('confirmVisitTime', e);
let _this = this;
let detail = _this.data.detail;
detail.visitTime = selfFormatTimeYMDHMS(e.detail);
_this.setData({
visitTimeShow: false,
visitTimeDate: e.detail,
detail
})
},
// 显示-离开时间
showLeaveTime() {
let _this = this;
_this.setData({
leaveTimeShow: true
})
},
// 关闭-离开时间
closeLeaveTime() {
let _this = this;
_this.setData({
leaveTimeShow: false
})
},
// 确认-离开时间
confirmLeaveTime(e) {
console.log('confirmLeaveTime111', e);
let _this = this;
let detail = _this.data.detail;
detail.leaveTime = selfFormatTimeYMDHMS(e.detail);
_this.setData({
leaveTimeShow: false,
leaveTimeDate: e.detail,
detail
})
},
// 图片-上传前校验 // 图片-上传前校验
beforeRead(event) { beforeRead(event) {
@ -293,93 +160,6 @@ Page({
}) })
}, },
// input输入内容监听
fieldInput(e) {
console.log('fieldInput', e);
let _this = this;
let detail = _this.data.detail;
detail[e.currentTarget.dataset.name] = e.detail
_this.setData({
detail
})
},
// 提交数据
submitData() {
let _this = this;
// 上传文件列表
let fileList = _this.data.fileList;
// 数据
let detail = _this.data.detail;
//
// 校验数据
//
// 被访单位
if (!detail.customerId) {
_this.showErrMsg('请选择被访单位!')
return;
}
// 被访人姓名、电话
if (!detail.userId) {
_this.showErrMsg('请选择被访人姓名、电话!')
return;
}
// 访客姓名
if (!detail.name) {
_this.showErrMsg('请填写访客姓名!')
return;
}
// 访客手机号
if (!detail.phone) {
_this.showErrMsg('请填写访客手机号!')
return;
}
// 证件号
if (!detail.cardNo) {
_this.showErrMsg('请填写证件号!')
return;
}
// 到访时间
if (!detail.visitTime) {
_this.showErrMsg('请选择到访时间!')
return;
}
// 离开时间
if (!detail.leaveTime) {
_this.showErrMsg('请选择离开时间!')
return;
}
// 来访事由
if (!detail.visitContent) {
_this.showErrMsg('请填写来访事由!')
return;
}
// 图片上传
if (fileList && fileList.length > 0) {
detail.photo = fileList[0].relativeUrl // 头像-相对路径
detail.url = fileList[0].url // 人脸设备图片-全路径
} else {
_this.showErrMsg('请上传照片!')
return;
}
//
// 添加数据
visitorPersonRq(detail).then(res => {
console.log('visitorPersonRq', res);
// 刷新上个页面参数
let pages = getCurrentPages(); //获取page
let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
prevPage.setData({
changeData: true
})
//
if (res.code == 0) {
wx.navigateBack()
} else {
_this.showErrMsg(res.msg)
}
})
},
// 显示-弹出框 // 显示-弹出框
showDialog(e) { showDialog(e) {

View File

@ -5,56 +5,55 @@
<view class="contentView"> <view class="contentView">
<view class="rowView" bind:tap="jumpIndexBar" data-title="单位"> <view class="rowView" bind:tap="jumpIndexBar" data-title="单位">
<view class="label must">被访单位</view> <view class="label must">被访单位</view>
<van-field value="{{ detail.customerName }}" input-class="input" is-link readonly placeholder="请选择" input-align="right" border="{{ false }}" /> <view class="input">{{detail.customerName}}</view>
</view> </view>
<view class="rowView" bind:tap="jumpIndexBar" data-title="人员"> <view class="rowView" bind:tap="jumpIndexBar" data-title="人员">
<view class="label must">被访人姓名</view> <view class="label must">被访人姓名</view>
<van-field value="{{ detail.username }}" input-class="input" is-link readonly placeholder="请选择" border="{{ false }}" input-align="right" /> <view class="input">{{detail.username}}</view>
</view> </view>
<view class="rowView" bind:tap="jumpIndexBar" data-title="人员"> <view class="rowView" bind:tap="jumpIndexBar" data-title="人员">
<view class="label must">被访人电话</view> <view class="label must">被访人电话</view>
<van-field value="{{ detail.mobile }}" is-link readonly input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" /> <view class="input">{{detail.mobile}}</view>
</view> </view>
<view class="rowView"> <view class="rowView">
<view class="label must">访客姓名</view> <view class="label must">访客姓名</view>
<van-field value="{{ detail.name }}" bind:input="fieldInput" data-name="name" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" /> <view class="input">{{detail.name}}</view>
</view> </view>
<view class="rowView"> <view class="rowView">
<view class="label must">手机号码</view> <view class="label must">手机号码</view>
<van-field value="{{ detail.phone }}" bind:input="fieldInput" data-name="phone" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" /> <view class="input">{{detail.phone}}</view>
</view> </view>
<view class="rowView"> <view class="rowView">
<view class="label must">身份证类型</view> <view class="label must">身份证类型</view>
<van-field value="{{ detail.cardType }}" input-class="input" is-link readonly placeholder="请选择" arrow-direction="down" input-align="right" bind:tap="showIdcardType" /> <view class="input">{{detail.cardType}}</view>
</view> </view>
<view class="rowView"> <view class="rowView">
<view class="label must">身份证号</view> <view class="label must">身份证号</view>
<van-field value="{{ detail.cardNo }}" bind:input="fieldInput" data-name="cardNo" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" /> <view class="input">{{detail.cardNo }}</view>
</view> </view>
<view class="rowView" bind:tap="showVisitTime"> <view class="rowView" bind:tap="showVisitTime">
<view class="label must">到访时间</view> <view class="label must">到访时间</view>
<van-field value="{{ detail.visitTime }}" input-class="input" is-link readonly placeholder="请选择" border="{{ false }}" arrow-direction="down" input-align="right" /> <view class="input">{{detail.visitTime}}</view>
</view> </view>
<view class="rowView" bind:tap="showLeaveTime"> <view class="rowView" bind:tap="showLeaveTime">
<view class="label must">离开时间</view> <view class="label must">离开时间</view>
<van-field value="{{ detail.leaveTime }}" input-class="input" is-link readonly placeholder="请选择" border="{{ false }}" arrow-direction="down" input-align="right" /> <view class="input">{{detail.leaveTime}}</view>
</view> </view>
<view class="rowView"> <view class="rowView">
<view class="label must">来访事由</view> <view class="label must">来访事由</view>
<van-field value="{{ detail.visitContent }}" bind:input="fieldInput" data-name="visitContent" input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" /> <view class="input">{{detail.visitContent}}</view>
</view> </view>
<view class="rowView self" wx:if="{{type != 'add'}}"> <view class="rowView">
<view class="label">审核状态</view> <view class="label">审核状态</view>
<view class="input" style="color: {{detail.fontColor}};">{{detail.statusName}}</view> <view class="input" style="color: {{detail.fontColor}};">{{detail.statusName}}</view>
</view> </view>
<view class="rowView self" wx:if="{{type != 'add'}}"> <view class="rowView">
<view class="label">审核内容</view> <view class="label">审核内容</view>
<view class="input">{{detail.rejectContent ? detail.rejectContent : ''}}</view> <view class="input">{{detail.rejectContent ? detail.rejectContent : ''}}</view>
</view> </view>
<view class="rowView"> <view class="rowView">
<view class="label must">访客照片</view> <view class="label must">访客照片</view>
<van-field style="visibility: hidden;" />
</view> </view>
</view> </view>
@ -64,8 +63,6 @@
<view class="tipsView">提示:请保持五官清晰,以方便系统精准识</view> <view class="tipsView">提示:请保持五官清晰,以方便系统精准识</view>
</view> </view>
<!-- 提交 -->
<view class="submitBtnView" wx:if="{{submitShow}}" bind:tap="submitData">提交</view>
<!-- 审核 --> <!-- 审核 -->
<view class="submitBtnView" wx:if="{{verifyShow}}" bind:tap="showDialog" data-id="{{id}}">审核</view> <view class="submitBtnView" wx:if="{{verifyShow}}" bind:tap="showDialog" data-id="{{id}}">审核</view>
@ -74,19 +71,6 @@
<!-- 消息通知 --> <!-- 消息通知 -->
<van-notify id="van-notify" /> <van-notify id="van-notify" />
<!-- 选择-身份证类型 -->
<van-action-sheet description="请选择身份证类型" close-on-click-overlay="{{true}}" show="{{ idcardTypeShow }}" actions="{{ idcardTypeList }}" bind:select="selectIdcardType" bind:close="closeIdcardType" />
<!-- 选择-到访时间 -->
<van-popup show="{{ visitTimeShow }}" position="bottom" custom-style="height: 50vh;" bind:close="closeVisitTime">
<van-datetime-picker type="datetime" value="{{ visitTimeDate }}" min-date="{{ visitTimeMinDate }}" bind:confirm="confirmVisitTime" bind:cancel="closeVisitTime" />
</van-popup>
<!-- 选择-离开时间 -->
<van-popup show="{{ leaveTimeShow }}" position="bottom" custom-style="height: 50vh;" bind:close="closeLeaveTime">
<van-datetime-picker type="datetime" value="{{ leaveTimeDate }}" min-date="{{ visitTimeDate }}" bind:confirm="confirmLeaveTime" bind:cancel="closeLeaveTime" />
</van-popup>
<!-- 审核弹出框 --> <!-- 审核弹出框 -->
<van-dialog use-slot title="审核" show="{{ dialogShow }}" show-confirm-button="{{false}}" show-cancel-button="{{false}}" close-on-click-overlay> <van-dialog use-slot title="审核" show="{{ dialogShow }}" show-confirm-button="{{false}}" show-cancel-button="{{false}}" close-on-click-overlay>
<van-field input-class="textarea" bind:input="dialogInput" value="{{ dialogContent }}" type="textarea" placeholder="请输入描述信息" /> <van-field input-class="textarea" bind:input="dialogInput" value="{{ dialogContent }}" type="textarea" placeholder="请输入描述信息" />

View File

@ -9,21 +9,16 @@
.contentView {} .contentView {}
.contentView .rowView.self {
padding: 28rpx 28rpx 28rpx 30rpx;
align-items: flex-start;
}
.contentView .rowView { .contentView .rowView {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: flex-start;
padding: 2rpx 0 2rpx 30rpx; padding: 28rpx 28rpx 28rpx 30rpx;
border-bottom: 1px solid rgb(126, 126, 126, 0.2); border-bottom: 1px solid rgb(126, 126, 126, 0.2);
} }
.contentView .rowView:last-of-type { .contentView .rowView:last-of-type {
border-bottom: none; border-bottom: 1px solid transparent;
} }
.contentView .rowView .label { .contentView .rowView .label {
@ -31,7 +26,7 @@
font-size: 30rpx; font-size: 30rpx;
color: #000000; color: #000000;
min-width: 120rpx; min-width: 120rpx;
margin-right: 30rpx; margin-right: 60rpx;
} }
.contentView .rowView .label.must::after { .contentView .rowView .label.must::after {

View File

@ -220,14 +220,20 @@ Page({
}) })
}, },
// 跳转-添加
goAdd() {
wx.navigateTo({
url: '/pages/meeting/visitorIinvitation/add/add?title=预约',
})
},
// 跳转-详情、修改
goDetail(e) { goDetail(e) {
console.log('goDetail', e); console.log('goDetail', e);
let id = e.currentTarget.dataset.id let id = e.currentTarget.dataset.id
let type = e.currentTarget.dataset.type let type = e.currentTarget.dataset.type
let urlParam = "?type=" + type; let urlParam = "?type=" + type;
if (type == 'add') { if (type == 'verify') {
urlParam = urlParam + "&title=预约"
} else if (type == 'verify') {
urlParam = urlParam + "&title=审核" + "&id=" + id urlParam = urlParam + "&title=审核" + "&id=" + id
} else if (type == 'detail') { } else if (type == 'detail') {
urlParam = urlParam + "&title=详情" + "&id=" + id urlParam = urlParam + "&title=详情" + "&id=" + id

View File

@ -45,7 +45,7 @@
</van-tab> </van-tab>
</van-tabs> </van-tabs>
<view class="submitBtn" data-type="add" bind:tap="goDetail">立即预约</view> <view class="submitBtn" bind:tap="goAdd">立即预约</view>
</view> </view>