2024-02-29 17:16:05 +08:00
|
|
|
let app = getApp();
|
2024-03-09 15:49:42 +08:00
|
|
|
|
|
|
|
import Notify from '@vant/weapp/notify/notify';
|
|
|
|
|
2024-02-29 17:16:05 +08:00
|
|
|
import {
|
2024-03-01 15:07:02 +08:00
|
|
|
companyRq
|
2024-03-08 14:11:33 +08:00
|
|
|
} from "../../../../api/meeting/visitorIinvitation.js"
|
2024-03-01 15:07:02 +08:00
|
|
|
|
2024-02-26 09:06:34 +08:00
|
|
|
Page({
|
|
|
|
|
2024-03-01 15:07:02 +08:00
|
|
|
/**
|
|
|
|
* 页面的初始数据
|
|
|
|
*/
|
|
|
|
data: {
|
2024-03-09 15:49:42 +08:00
|
|
|
IMG_NAME: app.IMG_NAME,
|
|
|
|
detail: {
|
|
|
|
customerId: null, //企业id
|
|
|
|
customerName: null, //企业名称
|
|
|
|
userId: null, // 被访人id
|
|
|
|
username: null, //被访人姓名
|
|
|
|
mobile: null, //被访人手机号
|
|
|
|
intervieweeId: null, // 访客id
|
|
|
|
name: null, // 访客姓名
|
|
|
|
phone: null, // 访客手机号
|
|
|
|
joinTime: null, // 加入时间
|
|
|
|
visitTime: null, // 到访时间
|
|
|
|
leaveTime: null, // 离开时间
|
|
|
|
visitContent: null, // 来访事由
|
|
|
|
cardType: null, // 证件类型
|
|
|
|
cardNo: null, // 证件号
|
|
|
|
photo: null, // 头像
|
|
|
|
}
|
2024-03-01 15:07:02 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
onLoad(options) {
|
2024-03-09 14:24:42 +08:00
|
|
|
console.log('onLoad', options)
|
|
|
|
let _this = this;
|
|
|
|
_this.setData({
|
|
|
|
...options
|
|
|
|
})
|
2024-03-01 15:07:02 +08:00
|
|
|
// 页面初始化 options为页面跳转所带来的参数
|
|
|
|
wx.setNavigationBarTitle({
|
2024-03-08 14:11:33 +08:00
|
|
|
title: options.title
|
2024-03-01 15:07:02 +08:00
|
|
|
})
|
2024-03-09 14:24:42 +08:00
|
|
|
},
|
|
|
|
|
2024-03-01 15:07:02 +08:00
|
|
|
|
2024-03-09 14:24:42 +08:00
|
|
|
|
|
|
|
// 跳转-索引栏(单位、人员)
|
|
|
|
jumpIndexBar(e) {
|
|
|
|
console.log('jumpIndexBar', e);
|
2024-03-09 15:49:42 +08:00
|
|
|
let _this = this;
|
2024-03-09 14:24:42 +08:00
|
|
|
let title = e.currentTarget.dataset.title
|
2024-03-09 15:49:42 +08:00
|
|
|
// 校验是否选择“被访单位” 后 ,再选择被访人信息
|
|
|
|
if (title == '人员' && !_this.data.detail.customerId) {
|
|
|
|
// 危险通知
|
|
|
|
Notify({
|
|
|
|
type: 'danger',
|
|
|
|
message: '请先选择被访单位!'
|
|
|
|
});
|
|
|
|
return ;
|
|
|
|
}
|
|
|
|
// url 参数
|
|
|
|
let param = '?title=' + title;
|
|
|
|
if (title == '人员') {
|
|
|
|
param = param + '&id=' + _this.data.detail.customerId;
|
|
|
|
}
|
2024-03-09 14:24:42 +08:00
|
|
|
wx.navigateTo({
|
2024-03-09 15:49:42 +08:00
|
|
|
url: '/pages/meeting/visitorIinvitation/indexBar/indexBar' + param,
|
2024-03-01 15:07:02 +08:00
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2024-03-09 14:24:42 +08:00
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
2024-03-01 15:07:02 +08:00
|
|
|
*/
|
2024-03-09 14:24:42 +08:00
|
|
|
onReady: function () {
|
2024-03-01 15:07:02 +08:00
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2024-03-09 14:24:42 +08:00
|
|
|
* 生命周期函数--监听页面显示
|
2024-03-01 15:07:02 +08:00
|
|
|
*/
|
2024-03-09 14:24:42 +08:00
|
|
|
onShow: function () {
|
2024-03-01 15:07:02 +08:00
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2024-03-09 14:24:42 +08:00
|
|
|
* 生命周期函数--监听页面隐藏
|
2024-03-01 15:07:02 +08:00
|
|
|
*/
|
2024-03-09 14:24:42 +08:00
|
|
|
onHide: function () {
|
2024-03-01 15:07:02 +08:00
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2024-03-09 14:24:42 +08:00
|
|
|
* 生命周期函数--监听页面卸载
|
2024-03-01 15:07:02 +08:00
|
|
|
*/
|
2024-03-09 14:24:42 +08:00
|
|
|
onUnload: function () {
|
2024-03-01 15:07:02 +08:00
|
|
|
|
|
|
|
},
|
|
|
|
|
2024-03-09 14:24:42 +08:00
|
|
|
/**
|
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
|
*/
|
|
|
|
onPullDownRefresh: function () {
|
2024-03-01 15:07:02 +08:00
|
|
|
|
|
|
|
},
|
|
|
|
|
2024-03-09 14:24:42 +08:00
|
|
|
/**
|
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
|
*/
|
|
|
|
onReachBottom: function () {
|
2024-03-01 15:07:02 +08:00
|
|
|
|
|
|
|
},
|
|
|
|
|
2024-03-09 14:24:42 +08:00
|
|
|
/**
|
|
|
|
* 用户点击右上角分享
|
|
|
|
*/
|
|
|
|
onShareAppMessage: function () {
|
|
|
|
|
2024-03-01 15:07:02 +08:00
|
|
|
}
|
2024-02-26 09:06:34 +08:00
|
|
|
})
|