mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 11:59:37 +08:00
最新代码
This commit is contained in:
parent
0fd2e1f94a
commit
620733ffc9
@ -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
|
||||
});
|
||||
}
|
@ -58,7 +58,9 @@
|
||||
"pages/meeting/meetingRoom/meetingCoupon/meetingCoupon",
|
||||
"pages/meeting/pay/waitPay/waitPay",
|
||||
"pages/meeting/pay/waitComplete/waitComplete",
|
||||
"pages/meeting/reservationRecord/reservationRecord"
|
||||
"pages/meeting/reservationRecord/reservationRecord",
|
||||
"pages/meeting/visitorIinvitation/indexBar/indexBar",
|
||||
"pages/meeting/visitorIinvitation/appointmentRecord/appointmentRecord"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
|
@ -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',
|
||||
})
|
||||
}
|
||||
})
|
@ -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"
|
||||
}
|
||||
}
|
@ -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>
|
@ -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;
|
||||
}
|
@ -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,
|
||||
})
|
||||
}
|
||||
},
|
||||
});
|
@ -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"
|
||||
}
|
||||
}
|
@ -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>
|
@ -0,0 +1 @@
|
||||
/* pages/meeting/visitorIinvitation/indexBar/indexBar.wxss */
|
@ -1,10 +1,14 @@
|
||||
// pages/meeting/visitorIinvitation/visitorIinvitation.js
|
||||
let app = getApp();
|
||||
import {
|
||||
companyRq
|
||||
} from "../../../api/meeting/visitorIinvitation/visitorIinvitation.js"
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
value: '',
|
||||
companyShow:false,
|
||||
usernameShow:false,
|
||||
@ -12,12 +16,14 @@ Page({
|
||||
arriveShow:false,
|
||||
leaveShow:false,
|
||||
submitSuccesShow:false,
|
||||
indexList: ["A", "B", "C", "D"],
|
||||
scrollTop: 100,
|
||||
companyColumns:['公司1','公司2','公司3'],
|
||||
columns: ['身份证', '护照', '通行证'],
|
||||
fileList: [],
|
||||
currentDate: new Date().getTime(),
|
||||
/** 索引栏*/
|
||||
indexList: ["A", "B", "C", "D"],
|
||||
scrollTop: 0,
|
||||
/** mock客户数据*/
|
||||
customerList: [
|
||||
{
|
||||
firstLetter: "A",
|
||||
@ -58,6 +64,7 @@ Page({
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@ -68,10 +75,16 @@ Page({
|
||||
wx.setNavigationBarTitle({
|
||||
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(){
|
||||
this.setData({
|
||||
usernameShow: true
|
||||
});
|
||||
// this.setData({
|
||||
// usernameShow: true
|
||||
// });
|
||||
wx.navigateTo({
|
||||
url: 'pages/meeting/accessControl/accessControl'
|
||||
url: '/pages/meeting/visitorIinvitation/indexBar/indexBar'
|
||||
})
|
||||
|
||||
},
|
||||
@ -122,6 +135,13 @@ Page({
|
||||
cardTypeShow: true
|
||||
});
|
||||
},
|
||||
changeHandler(e){
|
||||
console.log(e)
|
||||
|
||||
},
|
||||
// confirmHandle(){
|
||||
|
||||
// },
|
||||
confirmHandle(){
|
||||
this.setData({
|
||||
companyShow:false,
|
||||
@ -177,17 +197,20 @@ Page({
|
||||
currentDate: event.detail,
|
||||
});
|
||||
},
|
||||
//索引栏发生变化事件
|
||||
onPageScroll(event) {
|
||||
submitFormFn(){
|
||||
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);
|
||||
}
|
||||
})
|
@ -7,6 +7,7 @@
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-index-bar": "@vant/weapp/index-bar/index",
|
||||
"van-index-anchor": "@vant/weapp/index-anchor/index"
|
||||
}
|
||||
|
@ -21,21 +21,21 @@
|
||||
</view>
|
||||
</van-cell-group>
|
||||
<view class="submitBtnView">
|
||||
<van-button block type="info">提交</van-button>
|
||||
<van-button block type="info" bind:click="submitFormFn">提交</van-button>
|
||||
</view>
|
||||
<!-- 被访单位弹框 -->
|
||||
<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 show="{{ usernameShow }}" round position="bottom" closeable custom-style="height: 100%" bind:close="onClose">
|
||||
<van-index-bar index-list="{{ indexList }}">
|
||||
<!-- <van-popup show="{{ usernameShow }}" round position="bottom" closeable custom-style="height: 100%;position:absolute" bind:close="onClose">
|
||||
<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}}">
|
||||
{{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>
|
||||
</van-popup>
|
||||
</van-popup> -->
|
||||
<!-- 身份证类型弹框 -->
|
||||
<van-popup show="{{ cardTypeShow }}" round position="bottom">
|
||||
<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-popup>
|
||||
<!-- 提交成功弹框 -->
|
||||
<van-dialog title="标题" message="弹窗内容" show="{{ submitSuccesShow }}" />
|
||||
<van-dialog title="提交成功" show="{{ submitSuccesShow }}" confirm-button-color="#4187f2" bind:confirm="submitDialogFn"/>
|
||||
</view>
|
||||
</view>
|
Loading…
x
Reference in New Issue
Block a user