最新代码

This commit is contained in:
1692762430 2024-02-29 17:16:05 +08:00
parent 0fd2e1f94a
commit 620733ffc9
13 changed files with 395 additions and 67 deletions

View File

@ -0,0 +1,20 @@
import {
request
} from '../../selfRequest';
// 微信登录接口
export function companyRq(data) {
return request({
url: '/api/visitor/list',
method: "get"
});
}
// 注册用户
export function registerPhone(data) {
return request({
url: '/social_user_login/login',
method: "post",
data
});
}

View File

@ -58,7 +58,9 @@
"pages/meeting/meetingRoom/meetingCoupon/meetingCoupon", "pages/meeting/meetingRoom/meetingCoupon/meetingCoupon",
"pages/meeting/pay/waitPay/waitPay", "pages/meeting/pay/waitPay/waitPay",
"pages/meeting/pay/waitComplete/waitComplete", "pages/meeting/pay/waitComplete/waitComplete",
"pages/meeting/reservationRecord/reservationRecord" "pages/meeting/reservationRecord/reservationRecord",
"pages/meeting/visitorIinvitation/indexBar/indexBar",
"pages/meeting/visitorIinvitation/appointmentRecord/appointmentRecord"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",

View File

@ -0,0 +1,77 @@
// pages/meeting/visitorIinvitation/appointmentRecord/appointmentRecord.js
Page({
/**
* 页面的初始数据
*/
data: {
active: 'a',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
onChange(event) {
wx.showToast({
title: `切换到标签 ${event.detail.name}`,
icon: 'none',
});
},
toCheckFn(){
wx.reLaunch({
url: '/pages/meeting/visitorIinvitation/visitorIinvitation',
})
}
})

View File

@ -0,0 +1,9 @@
{
"navigationBarTitleText":"预约记录",
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-icon": "@vant/weapp/icon/index",
"van-button": "@vant/weapp/button/index"
}
}

View File

@ -0,0 +1,53 @@
<view class="container">
<van-tabs active="{{ active }}" bind:change="onChange" color="#0079fe">
<van-tab title="访客记录" name="a">
<view class="visitorView">
<view class="visitListView">
<view class="itemView">
<view class="itemTop">
<view>访客:张三</view>
<view>待审核</view>
</view>
<view class="itemBottom">
<view>
<view class="infoView">
<van-icon name="user-o" />
<view>访问事由: 拜访刘总</view>
</view>
<view class="infoView">
<van-icon name="clock-o" />
<view>2024-02-02 14:00</view>
</view>
</view>
<view>访客预约</view>
</view>
</view>
</view>
</view>
</van-tab>
<van-tab title="预约审核" name="b">
<view class="visitorView" bind:tap="toCheckFn">
<view class="visitListView">
<view class="itemView">
<view class="itemTop">
<view>访客:张三</view>
<view>待审核</view>
</view>
<view class="checkBottom">
<view>
<view class="infoView">
<van-icon name="user-o" />
<view>访问事由: 拜访刘总</view>
</view>
<view class="infoView">
<van-icon name="clock-o" />
<view>2024-02-02 14:00</view>
</view>
</view>
<van-button round type="info" size="small" bind:click="toCheckFn">去审核</van-button>
</view>
</view>
</view>
</view></van-tab>
</van-tabs>
</view>

View File

@ -0,0 +1,60 @@
.container{
width: 100%;
position: absolute;
height: 100vh;
background-color: #f6f6f6;
}
.visitorView{
width: 100%;
background-color: #f6f7fb;
}
.visitListView{
width: 710rpx;
margin: 0 auto;
}
.itemView{
width: 100%;
background-color: #ffffff;
margin-top: 20rpx;
font-size: 28rpx;
color: #666666;
}
.itemTop{
width: 100%;
display: flex;
justify-content: space-between;
height: 80rpx;
border-bottom: 1px solid #f2f2f2;
align-items: center;
padding: 10rpx 30rpx;
box-sizing: border-box;
}
.itemBottom{
width: 100%;
display: flex;
justify-content: space-between;
padding:20rpx 30rpx;
box-sizing: border-box;
color: #a4a4a4;
font-size: 28rpx;
}
.infoView{
display: flex;
height: 60rpx;
align-items: baseline;
}
.infoView view{
margin-left: 10rpx;
}
.checkBottom{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding:20rpx 30rpx;
box-sizing: border-box;
color: #a4a4a4;
font-size: 28rpx;
}

View File

@ -0,0 +1,68 @@
Page({
data: {
type: "",
/** 索引栏*/
indexList: ["A", "B", "C", "D"],
scrollTop: 0,
/** mock客户数据*/
customerList: [
{
firstLetter: "A",
list: [
{ code: "AB01", name: "A1客户" },
{ code: "AB02", name: "A2客户" },
{ code: "AB03", name: "A3客户" },
],
},
{
firstLetter: "B",
list: [
{ code: "BB01", name: "B1客户" },
{ code: "BB02", name: "B2客户" },
{ code: "BB03", name: "B3客户" },
{ code: "BB04", name: "B4客户" },
],
},
{
firstLetter: "C",
list: [
{ code: "CB01", name: "C1客户" },
{ code: "CB02", name: "C2客户" },
{ code: "CB03", name: "C3客户" },
{ code: "CB04", name: "C4客户" },
{ code: "CB05", name: "C5客户" },
],
},
{
firstLetter: "D",
list: [
{ code: "DB01", name: "D1客户" },
{ code: "DB02", name: "D2客户" },
{ code: "DB03", name: "D3客户" },
{ code: "DB04", name: "D4客户" },
{ code: "DB05", name: "D5客户" },
{ code: "DB06", name: "D6客户" },
],
},
],
},
//索引栏发生变化事件
onPageScroll(event) {
this.setData({
scrollTop: event.scrollTop,
});
},
/**选择客户发生事件 */
getCustomer: function (event) {
console.log(event.currentTarget.dataset.id);
console.log(event.currentTarget.dataset.name);
const value = event.currentTarget.dataset.name
if(value){
wx.reLaunch({
url: '/pages/meeting/visitorIinvitation/visitorIinvitation?name='+value,
})
}
},
});

View File

@ -0,0 +1,8 @@
{
"navigationBarTitleText":"选择被访人姓名",
"usingComponents": {
"van-cell": "@vant/weapp/cell/index",
"van-index-bar": "@vant/weapp/index-bar/index",
"van-index-anchor": "@vant/weapp/index-anchor/index"
}
}

View File

@ -0,0 +1,6 @@
<van-index-bar index-list="{{ indexList }}" scroll-top="{{ scrollTop }}">
<van-index-anchor wx:for="{{customerList}}" wx:key="index" index="{{item.firstLetter}}" use-slot="{{true}}">
{{item.firstLetter}}
<van-cell wx:for="{{item.list}}" wx:key="index" data-id="{{item.code}}" data-name="{{item.name}}" title="{{item.name}}" bindtap="getCustomer" />
</van-index-anchor>
</van-index-bar>

View File

@ -0,0 +1 @@
/* pages/meeting/visitorIinvitation/indexBar/indexBar.wxss */

View File

@ -1,10 +1,14 @@
// pages/meeting/visitorIinvitation/visitorIinvitation.js let app = getApp();
import {
companyRq
} from "../../../api/meeting/visitorIinvitation/visitorIinvitation.js"
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMG_NAME: app.IMG_NAME,
value: '', value: '',
companyShow:false, companyShow:false,
usernameShow:false, usernameShow:false,
@ -12,52 +16,55 @@ Page({
arriveShow:false, arriveShow:false,
leaveShow:false, leaveShow:false,
submitSuccesShow:false, submitSuccesShow:false,
indexList: ["A", "B", "C", "D"],
scrollTop: 100,
companyColumns:['公司1','公司2','公司3'], companyColumns:['公司1','公司2','公司3'],
columns: ['身份证', '护照', '通行证'], columns: ['身份证', '护照', '通行证'],
fileList: [], fileList: [],
currentDate: new Date().getTime(), currentDate: new Date().getTime(),
customerList: [ /** 索引栏*/
{ indexList: ["A", "B", "C", "D"],
firstLetter: "A", scrollTop: 0,
list: [ /** mock客户数据*/
{ code: "AB01", name: "A1客户" }, customerList: [
{ code: "AB02", name: "A2客户" }, {
{ code: "AB03", name: "A3客户" }, firstLetter: "A",
], list: [
}, { code: "AB01", name: "A1客户" },
{ { code: "AB02", name: "A2客户" },
firstLetter: "B", { code: "AB03", name: "A3客户" },
list: [ ],
{ code: "BB01", name: "B1客户" }, },
{ code: "BB02", name: "B2客户" }, {
{ code: "BB03", name: "B3客户" }, firstLetter: "B",
{ code: "BB04", name: "B4客户" }, list: [
], { code: "BB01", name: "B1客户" },
}, { code: "BB02", name: "B2客户" },
{ { code: "BB03", name: "B3客户" },
firstLetter: "C", { code: "BB04", name: "B4客户" },
list: [ ],
{ code: "CB01", name: "C1客户" }, },
{ code: "CB02", name: "C2客户" }, {
{ code: "CB03", name: "C3客户" }, firstLetter: "C",
{ code: "CB04", name: "C4客户" }, list: [
{ code: "CB05", name: "C5客户" }, { code: "CB01", name: "C1客户" },
], { code: "CB02", name: "C2客户" },
}, { code: "CB03", name: "C3客户" },
{ { code: "CB04", name: "C4客户" },
firstLetter: "D", { code: "CB05", name: "C5客户" },
list: [ ],
{ code: "DB01", name: "D1客户" }, },
{ code: "DB02", name: "D2客户" }, {
{ code: "DB03", name: "D3客户" }, firstLetter: "D",
{ code: "DB04", name: "D4客户" }, list: [
{ code: "DB05", name: "D5客户" }, { code: "DB01", name: "D1客户" },
{ code: "DB06", name: "D6客户" }, { code: "DB02", name: "D2客户" },
], { code: "DB03", name: "D3客户" },
}, { code: "DB04", name: "D4客户" },
], { code: "DB05", name: "D5客户" },
{ code: "DB06", name: "D6客户" },
],
},
],
}, },
/** /**
@ -68,10 +75,16 @@ Page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: options.name title: options.name
}) })
console.log('options.goods_id',options.name)
companyRq({}).then( res =>{
console.log('res',res)
if(res.code ==0){
// res.row
}
})
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
@ -104,11 +117,11 @@ Page({
}, },
getUsernameHandle(){ getUsernameHandle(){
this.setData({ // this.setData({
usernameShow: true // usernameShow: true
}); // });
wx.navigateTo({ wx.navigateTo({
url: 'pages/meeting/accessControl/accessControl' url: '/pages/meeting/visitorIinvitation/indexBar/indexBar'
}) })
}, },
@ -122,6 +135,13 @@ Page({
cardTypeShow: true cardTypeShow: true
}); });
}, },
changeHandler(e){
console.log(e)
},
// confirmHandle(){
// },
confirmHandle(){ confirmHandle(){
this.setData({ this.setData({
companyShow:false, companyShow:false,
@ -177,17 +197,20 @@ Page({
currentDate: event.detail, currentDate: event.detail,
}); });
}, },
//索引栏发生变化事件 submitFormFn(){
onPageScroll(event) {
this.setData({ this.setData({
scrollTop: event.scrollTop, submitSuccesShow: true,
}); });
},
/**选择客户发生事件 */
getCustomer: function (event) {
console.log(event.currentTarget.dataset.id);
console.log(event.currentTarget.dataset.name);
}, },
submitDialogFn(){
this.setData({
submitSuccesShow: false,
});
setTimeout(() => {
wx.navigateTo({
url: '/pages/meeting/visitorIinvitation/appointmentRecord/appointmentRecord',
})
}, 10);
}
}) })

View File

@ -7,8 +7,9 @@
"van-button": "@vant/weapp/button/index", "van-button": "@vant/weapp/button/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index", "van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-dialog": "@vant/weapp/dialog/index", "van-dialog": "@vant/weapp/dialog/index",
"van-index-bar": "@vant/weapp/index-bar/index", "van-cell": "@vant/weapp/cell/index",
"van-index-anchor": "@vant/weapp/index-anchor/index" "van-index-bar": "@vant/weapp/index-bar/index",
"van-index-anchor": "@vant/weapp/index-anchor/index"
} }
} }

View File

@ -21,21 +21,21 @@
</view> </view>
</van-cell-group> </van-cell-group>
<view class="submitBtnView"> <view class="submitBtnView">
<van-button block type="info">提交</van-button> <van-button block type="info" bind:click="submitFormFn">提交</van-button>
</view> </view>
<!-- 被访单位弹框 --> <!-- 被访单位弹框 -->
<van-popup show="{{ companyShow }}" round position="bottom"> <van-popup show="{{ companyShow }}" round position="bottom">
<van-picker show-toolbar title="被访单位" columns="{{ companyColumns }}" bind:confirm="confirmHandle" bind:cancel="cancelHandle" /> <van-picker show-toolbar title="被访单位" columns="{{ companyColumns }}" bind:confirm="confirmHandle" bind:cancel="cancelHandle" bind:change="changeHandler"/>
</van-popup> </van-popup>
<!-- 被访人姓名弹框 --> <!-- 被访人姓名弹框 -->
<van-popup show="{{ usernameShow }}" round position="bottom" closeable custom-style="height: 100%" bind:close="onClose"> <!-- <van-popup show="{{ usernameShow }}" round position="bottom" closeable custom-style="height: 100%;position:absolute" bind:close="onClose">
<van-index-bar index-list="{{ indexList }}"> <van-index-bar index-list="{{ indexList }}" scroll-top="{{ scrollTop }}" z-index="2">
<van-index-anchor wx:for="{{customerList}}" wx:key="index" index="{{item.firstLetter}}" use-slot="{{true}}"> <van-index-anchor wx:for="{{customerList}}" wx:key="index" index="{{item.firstLetter}}" use-slot="{{true}}">
{{item.firstLetter}} {{item.firstLetter}}
<van-cell wx:for="{{item.list}}" wx:key="index" data-id="{{item.code}}" data-name="{{item.name}}" title="{{item.name}}" bindtap="getCustomer" /> <van-cell wx:for="{{item.list}}" wx:key="index" data-id="{{item.code}}" data-name="{{item.name}}" title="{{item.name}}" bindtap="getCustomer" />
</van-index-anchor> </van-index-anchor>
</van-index-bar> </van-index-bar>
</van-popup> </van-popup> -->
<!-- 身份证类型弹框 --> <!-- 身份证类型弹框 -->
<van-popup show="{{ cardTypeShow }}" round position="bottom"> <van-popup show="{{ cardTypeShow }}" round position="bottom">
<van-picker show-toolbar title="身份证类型" columns="{{ columns }}" bind:confirm="confirmHandle" bind:cancel="cancelHandle" /> <van-picker show-toolbar title="身份证类型" columns="{{ columns }}" bind:confirm="confirmHandle" bind:cancel="cancelHandle" />
@ -49,6 +49,6 @@
<van-datetime-picker type="datetime" value="{{ currentDate }}" bind:input="onInput" bind:confirm="confirmHandle" bind:cancel="cancelHandle" /> <van-datetime-picker type="datetime" value="{{ currentDate }}" bind:input="onInput" bind:confirm="confirmHandle" bind:cancel="cancelHandle" />
</van-popup> </van-popup>
<!-- 提交成功弹框 --> <!-- 提交成功弹框 -->
<van-dialog title="标题" message="弹窗内容" show="{{ submitSuccesShow }}" /> <van-dialog title="提交成功" show="{{ submitSuccesShow }}" confirm-button-color="#4187f2" bind:confirm="submitDialogFn"/>
</view> </view>
</view> </view>