Commit a121fc89 by fengzhaoyu

访客列表 访客详情

parent 1e38e136
......@@ -28,12 +28,11 @@ const $http = (url, data, type, loadingType) => {
"Content-Type": "application/json",
"Authorization": `Bearer ${token}`
},
url: `${app.globalData.globalUrl}/mingpay-phone/v1/${url}?${sendData}`,
url: `${app.globalData.globalUrl}${url}?${sendData}`,
method: type,
dataType: 'json',
success: function(res) {
if(res.data.resultCode === 0) {
console.log(res.data.data)
if( res.data.code == 0 || res.data.resultCode === 0 ) {
return resolve(res.data.data)
dd.hideLoading()
}
......
page {
flex: 1;
display: flex;
background: #f7f7f7;
......
......@@ -14,7 +14,9 @@ App({
},
globalData: {
loadingType: 0,
// globalUrl: 'http://192.168.1.101:9999'
globalUrl:'https://gateway.mingwork.com'
globalUrl: 'http://192.168.1.101:9999' //本地豪
// globalUrl:'http://192.168.1.110:9999' // 本地成
// globalUrl:'https://gateway.mingwork.com'
// globalUrl:'https://gateway-beta.mingwork.com'
}
});
{
"pages": [
"pages/action/action",
"pages/visitorsDetail/visitorsDetail",
"pages/visitors/visitors",
"pages/reservations/reservations",
"pages/index/index",
"pages/alipayRecharge/alipayRecharge",
"pages/allowanceList/allowanceList",
......
......@@ -90,6 +90,60 @@
<div class="code-name">&amp;#xe625;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe626;</span>
<div class="name">shouqi</div>
<div class="code-name">&amp;#xe626;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe628;</span>
<div class="name">zhankai</div>
<div class="code-name">&amp;#xe628;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe629;</span>
<div class="name">tongxunlu</div>
<div class="code-name">&amp;#xe629;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe62b;</span>
<div class="name">shanchu</div>
<div class="code-name">&amp;#xe62b;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe62c;</span>
<div class="name">qiye</div>
<div class="code-name">&amp;#xe62c;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe62d;</span>
<div class="name">dianhua</div>
<div class="code-name">&amp;#xe62d;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe62e;</span>
<div class="name">xuanze</div>
<div class="code-name">&amp;#xe62e;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe62f;</span>
<div class="name">fangk</div>
<div class="code-name">&amp;#xe62f;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe630;</span>
<div class="name">ka</div>
<div class="code-name">&amp;#xe630;</div>
</li>
</ul>
<div class="article markdown">
<h2 id="unicode-">Unicode 引用</h2>
......@@ -230,6 +284,87 @@
</div>
</li>
<li class="dib">
<span class="icon iconfont iconshouqi"></span>
<div class="name">
shouqi
</div>
<div class="code-name">.iconshouqi
</div>
</li>
<li class="dib">
<span class="icon iconfont iconzhankai"></span>
<div class="name">
zhankai
</div>
<div class="code-name">.iconzhankai
</div>
</li>
<li class="dib">
<span class="icon iconfont icontongxunlu"></span>
<div class="name">
tongxunlu
</div>
<div class="code-name">.icontongxunlu
</div>
</li>
<li class="dib">
<span class="icon iconfont iconshanchu"></span>
<div class="name">
shanchu
</div>
<div class="code-name">.iconshanchu
</div>
</li>
<li class="dib">
<span class="icon iconfont iconqiye"></span>
<div class="name">
qiye
</div>
<div class="code-name">.iconqiye
</div>
</li>
<li class="dib">
<span class="icon iconfont icondianhua"></span>
<div class="name">
dianhua
</div>
<div class="code-name">.icondianhua
</div>
</li>
<li class="dib">
<span class="icon iconfont iconxuanze"></span>
<div class="name">
xuanze
</div>
<div class="code-name">.iconxuanze
</div>
</li>
<li class="dib">
<span class="icon iconfont iconfangk"></span>
<div class="name">
fangk
</div>
<div class="code-name">.iconfangk
</div>
</li>
<li class="dib">
<span class="icon iconfont iconka"></span>
<div class="name">
ka
</div>
<div class="code-name">.iconka
</div>
</li>
</ul>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2>
......@@ -339,6 +474,78 @@
<div class="code-name">#iconCloseeyes</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconshouqi"></use>
</svg>
<div class="name">shouqi</div>
<div class="code-name">#iconshouqi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconzhankai"></use>
</svg>
<div class="name">zhankai</div>
<div class="code-name">#iconzhankai</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icontongxunlu"></use>
</svg>
<div class="name">tongxunlu</div>
<div class="code-name">#icontongxunlu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconshanchu"></use>
</svg>
<div class="name">shanchu</div>
<div class="code-name">#iconshanchu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconqiye"></use>
</svg>
<div class="name">qiye</div>
<div class="code-name">#iconqiye</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icondianhua"></use>
</svg>
<div class="name">dianhua</div>
<div class="code-name">#icondianhua</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconxuanze"></use>
</svg>
<div class="name">xuanze</div>
<div class="code-name">#iconxuanze</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconfangk"></use>
</svg>
<div class="name">fangk</div>
<div class="code-name">#iconfangk</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconka"></use>
</svg>
<div class="name">ka</div>
<div class="code-name">#iconka</div>
</li>
</ul>
<div class="article markdown">
<h2 id="symbol-">Symbol 引用</h2>
......
No preview for this file type
......@@ -74,6 +74,69 @@
"font_class": "Closeeyes",
"unicode": "e625",
"unicode_decimal": 58917
},
{
"icon_id": "11620886",
"name": "shouqi",
"font_class": "shouqi",
"unicode": "e626",
"unicode_decimal": 58918
},
{
"icon_id": "11622112",
"name": "zhankai",
"font_class": "zhankai",
"unicode": "e628",
"unicode_decimal": 58920
},
{
"icon_id": "11622113",
"name": "tongxunlu",
"font_class": "tongxunlu",
"unicode": "e629",
"unicode_decimal": 58921
},
{
"icon_id": "11622350",
"name": "shanchu",
"font_class": "shanchu",
"unicode": "e62b",
"unicode_decimal": 58923
},
{
"icon_id": "11630971",
"name": "qiye",
"font_class": "qiye",
"unicode": "e62c",
"unicode_decimal": 58924
},
{
"icon_id": "11631647",
"name": "dianhua",
"font_class": "dianhua",
"unicode": "e62d",
"unicode_decimal": 58925
},
{
"icon_id": "11633014",
"name": "xuanze",
"font_class": "xuanze",
"unicode": "e62e",
"unicode_decimal": 58926
},
{
"icon_id": "11652147",
"name": "fangk",
"font_class": "fangk",
"unicode": "e62f",
"unicode_decimal": 58927
},
{
"icon_id": "11652819",
"name": "ka",
"font_class": "ka",
"unicode": "e630",
"unicode_decimal": 58928
}
]
}
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -71,6 +71,12 @@ Page({
})
$login.login()
}
else if(res.data.resultCode == 4003) {
dd.alert({
content: '账号已注销,请联系管理员处理',
buttonText: '确定'
})
}
else {
dd.hideLoading()
dd.removeStorageSync({key:'token'})
......
......@@ -24,7 +24,7 @@ Page({
orderPrice: this.data.inputValue
}
const _that = this;
$http.$http('isv/charge/charge_alipay', data, 'GET').then((res) => {
$http.$http('/mingpay-phone/v1/isv/charge/charge_alipay', data, 'GET').then((res) => {
_that.ddPayFn(res)
}).catch((res) => {
dd.hideLoading();
......
......@@ -54,7 +54,7 @@ Page({
available: this.data.available,
ddUserId: dd.getStorageSync({ key: 'userId' }).data
}
$http.$http('isv/account/query_subsidyList_by_user_id', data, 'GET').then((res) => {
$http.$http('/mingpay-phone/v1/isv/account/query_subsidyList_by_user_id', data, 'GET').then((res) => {
let dataList = [...res.recordList];
let dataListSource = _that.data.dataList;
if (dataList.length > 0) {
......@@ -107,7 +107,7 @@ Page({
totalCount: ''
})
this.querySubsidyList()
this.resetData()
// this.resetData()
dd.stopPullDownRefresh()
},
onReachBottom() {
......
......@@ -37,7 +37,7 @@ Page({
statusList: this.data.statusList,
subsidyNo: this.data.subsidyNo
}
$http.$http('isv/consume/list_payment_record', data, 'GET').then((res) => {
$http.$http('/mingpay-phone/v1/isv/consume/list_payment_record', data, 'GET').then((res) => {
console.log('allowanceRecordList.js',res)
let dataList = [...res.recordList];
let recordAlliwanceListDataSource = _that.data.recordAlliwanceListData
......
......@@ -35,7 +35,7 @@ Page({
pageNumber: 10,
trxNo: this.data.trxNo
}
$http.$http('isv/consume/list_payment_record', data, 'GET').then((res) => {
$http.$http('/mingpay-phone/v1/isv/consume/list_payment_record', data, 'GET').then((res) => {
data = res.recordList[0]
data.createDate = _that.timeToStr(data.createDate);
_that.setData({
......
......@@ -44,7 +44,7 @@ create.Page({
let data = {
ddUserId: ddUserId
}
$http.$http('isv/account/queryAccountDetail', data, 'GET').then((res) => {
$http.$http('/mingpay-phone/v1/isv/account/queryAccountDetail', data, 'GET').then((res) => {
this.setData({
name: res.name,
realityBalance: res.realityBalance,
......@@ -149,7 +149,7 @@ create.Page({
dd.navigateTo({url:'./../recordList/recordList'});
break;
case '5':
dd.navigateTo({url:'./../example/example'})
dd.navigateTo({url:'./../visitors/visitors'})
break;
default:
// 如果表达式的值和以上的case后面的值都没有匹配上,那么就执行这里的代码。
......
......@@ -111,7 +111,7 @@ Page({
// 第三方企业修改:原先改成orderStatus,后改过来
statusList: this.data.statusList
}
$http.$http('isv/consume/list_payment_record', data, 'GET').then((res) => {
$http.$http('/mingpay-phone/v1/isv/consume/list_payment_record', data, 'GET').then((res) => {
let dataList = [...res.recordList];
let recordListDataSource = _that.data.recordListData
if (dataList.length > 0) {
......
* {
font-family: 'PingFangSC-Regular';
}
.visitorInformation {
padding: 0 32rpx;
}
.visitorInformationTitle {
height: 76rpx;
line-height: 76rpx;
background: #F7F7F7;
letter-spacing: -0.16rpx;
font-size: 32rpx;
color: #7D8082;
}
.visitorName {
height: 112rpx;
}
\ No newline at end of file
<view>
<form onSubmit="formSubmit" onReset="formReset">
<view class='visitorInformation'>
<view class=' visitorInformationTitle'> 访客信息</view>
<view class='visitorName'>
<text class='mandatory'>*</text>
<text>访客姓名</text>
<input placeholder="请输入或选择" />
<text class=''>text</text>
</view>
</view>
</form>
</view>
\ No newline at end of file
const app = getApp()
import $http from './../../API/http'
Page({
data: {
},
onLoad(query) {
dd.setNavigationBar({
title: '预约访客',
});
},
reTry() {
dd.redirectTo({
url: '/pages/action/action'
})
},
onReady() {
},
onShow() {
// 页面显示
},
onHide() {
// 页面隐藏
},
onUnload() {
// 页面被关闭
},
onTitleClick() {
// 标题被点击
},
onReachBottom() {
},
onShareAppMessage() {
// 返回自定义分享信息
return {
title: 'My App',
desc: 'My App description',
path: 'pages/index/index',
};
},
});
{}
\ No newline at end of file
* {
font-family: 'PingFangSC-Regular'
}
.visitors {
padding-bottom: 120rpx;
}
.tabs {
width: 750rpx;
height: 96rpx;
text-align: center;
background: white;
margin-top: 2rpx;
border-bottom: 4rpx solid #F1F1F1;
display: flex;
}
.tabs>view {
font-size: 30rpx;
font-family: 'PingFangSC-Regular';
width: 50%;
height: 100%;
text-align: center;
line-height: 96rpx;
color: #191F25;
letter-spacing: -0.48rpx;
}
.tabs .clickTabs {
border-bottom: 4rpx solid #3296FA;
color: #3296FA;
}
.visitorSituation {
padding: 0 32rpx;
background: #F7F7F7;
height: 84rpx;
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #191F25;
letter-spacing: -0.14rpx;
line-height: 84rpx;
text-align: right;
}
.visitorSituation>text {
font-size: 34rpx;
}
.visitorList {
height: 218rpx;
background: white;
padding: 0 32rpx;
overflow: hidden;
}
.visitorListTop {
margin-top: 32rpx;
height: 44rpx;
}
.visitorListTop .time {
width: 96rpx;
height: 44rpx;
background: rgba(50, 150, 250, 0.2);
border-radius: 8rpx;
line-height: 44rpx;
text-align: center;
float: left;
color: #3296FA;
}
.visitorListTop .ashTime {
width: 96rpx;
height: 44rpx;
background: #F9F9F9;
border-radius: 8rpx;
line-height: 44rpx;
text-align: center;
float: left;
color: rgba(25, 31, 37, 0.34);
}
.name {
margin-left: 20rpx;
font-size: 34rpx;
color: #000000;
letter-spacing: -0.82rpx;
line-height: 44rpx;
float: left;
}
.ashName {
margin-left: 20rpx;
font-size: 34rpx;
color: rgba(25, 31, 37, 0.34);
letter-spacing: -0.82rpx;
line-height: 44rpx;
float: left;
}
.status {
font-size: 24rpx;
color: #13C2C2;
letter-spacing: -0.38rpx;
text-align: right;
line-height: 44rpx;
float: right;
}
.arrive {
font-size: 24rpx;
color: #1890FF;
letter-spacing: -0.38rpx;
text-align: right;
line-height: 44rpx;
float: right;
}
.ashStaus {
font-size: 24rpx;
color: rgba(25, 31, 37, 0.34);
letter-spacing: -0.38rpx;
text-align: right;
line-height: 44rpx;
float: right;
}
.visitorListCenter {
margin-top: 20rpx;
height: 36rpx;
}
.longTime {
width: 72rpx;
height: 36rpx;
border: 2rpx solid #3296FA;
border-radius: 6rpx;
margin-left: 116rpx;
float: left;
line-height: 36rpx;
text-align: center;
font-size: 20rpx;
color: #3296FA;
letter-spacing: -0.12rpx;
}
.asglongTime {
width: 72rpx;
height: 36rpx;
border: 2rpx solid rgba(25, 31, 37, 0.34);
border-radius: 6rpx;
margin-left: 116rpx;
float: left;
line-height: 36rpx;
text-align: center;
font-size: 20rpx;
color: rgba(25, 31, 37, 0.34);
letter-spacing: -0.12rpx;
}
.people {
float: right;
font-size: 26rpx;
color: #7D8082;
letter-spacing: -0.14rpx;
line-height: 36rpx;
}
.visitorListBottom {
margin-top: 20rpx;
}
.visitorListBottom>view {
font-size: 24rpx;
color: #7D8082;
letter-spacing: -0.14rpx;
line-height: 36rpx;
text-align: right
}
.appointment {
padding: 16rpx 36rpx;
background: white;
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
.appointmentButton {
width: 100%;
height: 100%;
background: #3296FA;
border: 0 solid rgba(25, 31, 37, 0.12);
border-radius: 6rpx;
font-size: 34rpx;
color: #FFFFFF;
line-height: 96rpx;
text-align: center;
}
.nullImage {
margin: 0 auto;
width: 750rpx;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-top: 200rpx;
}
.nullImage image {
width: 280rpx;
height: 220rpx;
display: block;
margin-bottom: 48rpx;
}
.nullImage text {
display: block;
font-size: 28rpx;
color: rgba(25, 31, 37, 0.48);
}
\ No newline at end of file
<view class='visitors'>
<view class="tabs">
<view class="{{type === '0' ? 'clickTabs' : ''}}" data-type="0" onTap="changeType">我的访客</view>
<view class="{{type !== '0' ? 'clickTabs' : ''}}" data-type="1" onTap="changeType">公司访客</view>
</view>
<view class='visitorSituation' a:if="{{dataList.length !== 0}}">今天共
<text>2</text>位访客,到访
<text>1</text>位
</view>
<view class="nullImage" a:if="{{dataList.length === 0}}">
<image mode="scaleToFill" src="../../../assets/allowanceNull.png"/>
<text>当前暂无访客记录</text>
</view>
<view class='visitorList' a:for="{{dataList}}" a:for-index="index" a:for-item="item" onTap="navigatorToNext" data-item="{{item}}">
<view class='visitorListTop'>
<view class='{{item.processStatus=="cancel"|| item.overdue?"ashTime":"time"}}'>{{`${item.startTime.hour}:${item.startTime.minute}`}}</view>
<view class='{{item.processStatus=="cancel"|| item.overdue?"ashName":"name"}}'>{{item.visitorName || '未命名'}}</view>
<view class='{{item.processStatus=="cancel"|| item.overdue?"ashStaus":(item.processStatus=="invite" ? "status":"arrive")}}'>{{item.processStatus == 'invite'?'待访问':(item.processStatus == 'cancel'?"已取消":"已到访")}}</view>
</view>
<view class='visitorListCenter'>
<view class='{{item.processStatus=="cancel" || item.overdue?"asglongTime":"longTime"}}'a:if='item.longTime'>长期</view>
<view class='people'>被访人:{{item.byVisitorName}}</view>
</view>
<view class='visitorListBottom'>
<view>{{`${item.startTime.year}.${item.startTime.month}.${item.startTime.date}~${item.endTime.year}.${item.endTime.month}.${item.endTime.date}`}}</view>
</view>
</view>
<view class='appointment'>
<view class='appointmentButton' onTap="appointment">立即预约</view>
</view>
</view>
\ No newline at end of file
const app = getApp()
import $http from './../../API/http'
Page({
data: {
type: '0',
dataList: [],
currentPage: 1,
pageSize: 10,
totalCount: '',
overdue: false,
},
changeType(event) {
this.setData({
type: event.target.dataset.type,
dataList: []
})
this.visitorList(this.data.type)
},
visitorList(type) {
const _that = this
let data = {
currentPage: this.data.currentPage,
pageSize: this.data.pageSize,
type: type
}
$http.$http('/admin/visitor/getRecordList', data, 'post').then(res => {
let dataList = res.records;
let dataListSource = [];
console.log(dataList.length)
if (dataList.length > 0) {
dataList.forEach((item, index) => {
if (new Date(item.endTime).getTime() < new Date().getTime()) {
item.overdue = true
}
else {
item.overdue = false
}
if (new Date(item.endTime).getTime() - new Date(item.startTime).getTime() < 24 * 60 * 60 * 3 * 1000) {
item.longTime = false
}
else {
item.longTime = true
}
item.endTime = _that.timeToStr(item.endTime)
item.startTime = _that.timeToStr(item.startTime)
dataListSource.push(item)
})
dataList = dataListSource
let totalCount = Math.ceil(parseInt(res.total) / _that.data.pageNumber)
_that.setData({
dataList: dataList,
totalCount: totalCount
})
}
})
},
timeToStr(time) {
time = time.replace(/\-/g, "/")
let timeData = new Date(time)
console.log('timeData', timeData)
let year = timeData.getFullYear()
let month = timeData.getMonth() + 1
let date = timeData.getDate()
let hour = timeData.getHours()
let minute = timeData.getMinutes()
return {
year: year,
month: month.toString().length > 1 ? month : '0' + month,
date: date.toString().length > 1 ? date : '0' + date,
hour: hour.toString().length > 1 ? hour : '0' + hour,
minute: minute.toString().length > 1 ? minute : '0' + minute
}
},
navigatorToNext(event) {
dd.setStorageSync({ key: 'item', data: event.target.dataset.item })
dd.navigateTo({ url: `./../visitorsDetail/visitorsDetail` })
},
appointment() {
dd.navigateTo({url:'./../reservations/reservations'});
},
onLoad(query) {
dd.setNavigationBar({ title: '智能访客' });
this.visitorList(0)
},
onReady() {
},
onShow() {
// 页面显示
},
onHide() {
// 页面隐藏
},
onUnload() {
// 页面被关闭
},
onTitleClick() {
// 标题被点击
},
onReachBottom() {
let currentNum = '';
if (this.data.currentPage < this.data.totalCount) {
currentNum = this.data.currentPage + 1
this.setData({
currentPage: currentNum
})
this.visitorList(this.data.type)
}
},
onPullDownRefresh() {
this.setData({
type: '0',
dataList: [],
currentPage: 1,
pageSize: 10,
totalCount: '',
overdue: false,
})
this.visitorList(this.data.type)
dd.stopPullDownRefresh()
},
onShareAppMessage() {
// 返回自定义分享信息
return {
title: 'My App',
desc: 'My App description',
path: 'pages/index/index',
};
},
});
{}
\ No newline at end of file
@import '../../fonts/iconfont.acss';
* {
font-family: 'PingFangSC-Regular';
letter-spacing: -0.72rpx;
}
.visitorsDetail {
background: white
}
/* .iconfont {
display: inline-block;
width: 32rpx;
height: 44rpx;
line-height: 44rpx;
font-size: 32rpx;
} */
.visitorTab {
width: 686rpx;
padding: 0 32rpx;
overflow: hidden;
background: white;
position: relative;
}
.visitorName {
height: 52rpx;
line-height: 52rpx;
margin-top: 36rpx;
font-size: 34rpx;
line-height: 36rpx;
color: #000000;
font-weight: bolder;
}
.visitorNameName {
margin-right: 20rpx;
}
.visitorNumber {
height: 44rpx;
line-height: 44rpx;
margin-top: 20rpx;
font-size: 34rpx;
margin-bottom: 10rpx;
}
.call {
width: 80rpx;
height: 30rpx;
background: rgba(24, 144, 255, 0.1);
color: #1890FF;
display: inline-block;
text-align: center;
line-height: 30rpx;
margin-left: 22rpx;
font-size: 22rpx;
border-radius: 15rpx;
margin-bottom: 7rpx;
vertical-align: middle;
}
.visitorCompany {
height: 44rpx;
line-height: 44rpx;
margin-bottom: 20rpx;
font-size: 34rpx;
}
.visitorCompanyName {
display: inline-block;
line-height: 1.5;
font-size: 34rpx;
}
image {
position: absolute;
right: 0;
bottom: 0;
width: 134rpx;
height: 126rpx;
}
.clear {
width: 100%;
height: 20rpx;
background: #F7F7F7;
}
.visitorNumberIcon, .visitorCompanyIcon, .visitorTimeTopIcon {
text-align: left;
vertical-align: middle;
width: 32rpx;
height: 44rpx;
line-height: 44rpx;
display: inline-block;
color: #BFC1C2;
font-size: 40rpx;
margin-right: 20rpx;
vertical-align: middle;
}
.visitorTimeTop {
height: 44rpx;
line-height: 44rpx;
}
.visitorTime {
margin-top: 40rpx;
padding: 0 32rpx;
}
.visitorTimeTopTitle {
height: 44rpx;
vertical-align: middle;
font-size: 34rpx;
color: #7D8082;
line-height: 44rpx;
}
.visitorTimeBottom {
display: flex;
margin-top: 14rpx;
margin-left: 52rpx;
color: #000000;
font-size: 34rpx;
justify-content: space-between;
}
.visitorTimeBottom view {
line-height: 44rpx;
}
.noOverdue ,
.overdue {
padding: 16rpx 32rpx;
box-shadow: inset 0 0 0 0 rgba(25, 31, 37, 0.12);
display: flex;
justify-content: space-between;
}
.staus {
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
.noOverdue view {
width: 328rpx;
height: 96rpx;
text-align: center;
line-height: 96rpx;
font-size: 34rpx;
color: #191F25;
border-radius: 6rpx;
}
.cancel {
background: #F6F6F6;
}
.noOverdue .reception {
background: #3296FA;
color: white;
}
.overdue view {
width: 100%;
height: 96rpx;
border-radius: 6rpx;
background: #F6F6F6;
text-align: center;
line-height: 96rpx;
font-size: 34rpx;
}
\ No newline at end of file
<!--<view><view class='byVisitorDetail'><view class='name'>{{name ? name:未命名}}未命名</view><view class='phone'><view class='iconfont icondianhua'></view><view class='phoneNumber'>{{phone}}</view><view class='call'>拨打</view></view><view class='company'><view class='iconfont iconqiye'></view><view class='companyName'> {{company}}|| 未填写</view></view><image mode="scaleToFill" src="{{processStatus == 'invite'? '../../assets/await.png': (processStatus == 'cancel'? '../../assets/cancel.png':'../../assets/dao.png')}}"/></view><view class='visitorDetail'><view class='visitorTime'><view class=' visitorTimeTop'><view class='iconfont icontime'></view><view class='visitorText'>访问时间</view></view><view class=' visitorTimeBottom timers'><view class='beginTime'><view>{{startTime}}</view><view>{{startHour}}</view></view><view class='center'>~</view><view class='beginTime'><view>{{endTime}}</view><view>{{endHour}}</view></view></view></view><view class='visitorTime'><view class=' visitorTimeTop'><view class='iconfont iconbeifangren'></view><view class='visitorText'>被访人</view></view><view class=' visitorTimeBottom'><view class='beginTime'>林萍萍</view></view></view><view class='visitorTime'><view class=' visitorTimeTop'><view class='iconfont iconlaifangmudi'></view><view class='visitorText'>来访目的</view></view><view class=' visitorTimeBottom'><view class='beginTime'>商务洽谈</view></view></view><view class='visitorTime'><view class=' visitorTimeTop'><view class='iconfont icondingwei'></view><view class='visitorText'>到访地址</view></view><view class=' visitorTimeBottom'><view class='beginTime'>浙江商杭州市余杭区</view></view></view><view class='visitorTime'><view class=' visitorTimeTop'><view class='iconfont iconzhouzhiren'></view><view class='visitorText'>周知人员</view></view><view class=' visitorTimeBottom'><text>叶琴哈</text><text>叶琴哈</text><text>叶琴哈</text><text>叶琴哈</text><text>叶琴哈</text><text>叶琴哈</text></view></view></view><view class='visitorButton'><view><view class='cancel'>取消访客</view><view class='reception'>接待访客</view></view><view></view></view></view><view> -->
<view class="visitorsDetail">
<view class="visitorTab">
<view class="visitorName">
<text class="visitorNameName">赖蜜桃</text>
<text class="visitorNameIcon iconfont iconzhankai">
<!--<text class="visitorHidden"><text>1111111111</text><text>1111111111</text><text>1111111111</text><text>1111111111</text><text>1111111111</text></text> -->
</text>
</view>
<view class="visitorNumber">
<text class="iconfont icondianhua visitorNumberIcon"></text>
<text class="visitorNumberNumber">17853553699</text>
<text class="call" onTap="call">拨打</text>
</view>
<view class="visitorCompany">
<text class="visitorCompanyIcon iconfont iconqiye"></text>
<text class="visitorCompanyName">杭州明我科技有限公司</text>
</view>
<image mode="scaleToFill" src="{{processStatus == 'invite'? '../../assets/await.png': (processStatus == 'cancel'? '../../assets/cancel.png':'../../assets/dao.png')}}"/>
</view>
<view class="otherInfo">
<view class="clear"></view>
<view class="visitorTime">
<view class="visitorTimeTop">
<text class="visitorTimeTopIcon icontime iconfont"></text>
<text class="visitorTimeTopTitle">访问时间</text>
</view>
<view class="visitorTimeBottom">
<view>
<view>2019年10月11日</view>
<view>10:14</view>
</view>
<view class="fu">~</view>
<view>
<view>2019年10月11日</view>
<view>10:14</view>
</view>
</view>
</view>
<view class="visitorTime">
<view class="visitorTimeTop">
<text class="visitorTimeTopIcon iconbeifangren iconfont"></text>
<text class="visitorTimeTopTitle">被访人</text>
</view>
<view class="visitorTimeBottom">
林萍萍
</view>
</view>
<view class="visitorTime">
<view class="visitorTimeTop">
<text class="visitorTimeTopIcon iconlaifangmudi iconfont"></text>
<text class="visitorTimeTopTitle">来访目的</text>
</view>
<view class="visitorTimeBottom">
商务洽谈
</view>
</view>
<view class="visitorTime">
<view class="visitorTimeTop">
<text class="visitorTimeTopIcon icondingwei iconfont"></text>
<text class="visitorTimeTopTitle">到访地址</text>
</view>
<view class="visitorTimeBottom">
浙江省杭州市余杭区
</view>
</view>
<view class="visitorTime">
<view class="visitorTimeTop">
<text class="visitorTimeTopIcon iconzhouzhiren iconfont"></text>
<text class="visitorTimeTopTitle">周知人员</text>
</view>
<view class="visitorTimeBottom">
<text>廖培培</text>
<text>廖培培</text>
<text>廖培培</text>
<text>廖培培</text>
<text>廖培培</text>
<text>廖培培</text>
</view>
</view>
</view>
<view class="staus" a:if="{{processStatus == 'cancel'|| processStatus == 'arrive'?false:true}}">
<view class="noOverdue" a:if='!overdue'>
<view class="cancel" onTap="cancel">取消访客</view>
<view class="reception" onTap="reception">接待访客</view>
</view>
<view class="overdue" a:else>
<view onTap="reception">已接待访客</view>
</view>
</view>
</view>
\ No newline at end of file
const app = getApp()
import $http from './../../API/http'
Page({
data: {
name: '',
company: '',
startTime: '',
endTime: '',
byVisitorName: '',
purpose: '',
participator: '',
endHour: '',
startHour: '',
phone: '',
processStatus: '',
overdue: ''
},
onLoad() {
const that = this
let query = dd.getStorageSync({ key: 'item' }).data
dd.setNavigationBar({
title: "访客详情",
});
},
onReady() {
let query = dd.getStorageSync({ key: 'item' }).data
this.setData({
name: query.name,
company: query.companyName,
startTime: `${query.startTime.year}${query.startTime.month}${query.startTime.date}日`,
endTime: `${query.endTime.year}${query.endTime.month}${query.endTime.date}日`,
startHour: `${query.startTime.date}:${query.startTime.minute}`,
endHour: `${query.endTime.date}:${query.endTime.minute}`,
byVisitorName: '',
purpose: '',
participator: '',
phone: query.mobile,
processStatus: query.processStatus,
overdue: query.overdue,
recordId:query.recordId
})
},
cancel() {
dd.confirm({
title: '确认取消访问',
content: '是否确认取消该预约,取消后访客将不能使用该访问码',
confirmButtonText: '确认',
cancelButtonText: '取消',
success: (result) => {
this.setData({ processStatus: 'cancel' })
let data = {
recordId: this.data.recordId
}
$http.$http('/admin/visitor/cancelVisit', data, 'post').then(res => {
console.log(res)
})
},
});
},
reception() {
dd.confirm({
title: '确认已接待',
confirmButtonText: '确认',
cancelButtonText: '取消',
success: (result) => {
this.setData({ processStatus: 'arrive' })
let data = {
recordId: this.data.recordId
}
$http.$http('/admin/visitor/confirmVisit', data, 'post').then(res => {
console.log(res)
})
},
});
},
call() {
dd.showCallMenu({
phoneNumber: this.data.phone, // 期望拨打的电话号码
code: '+86', // 国家代号,中国是+86
showDingCall: true, // 是否显示钉钉电话
success: function(res) {
},
fail: function(err) {
}
});
},
onShow() {
// 页面显示
},
onHide() {
// 页面隐藏
},
onUnload() {
// 页面被关闭
},
onTitleClick() {
// 标题被点击
},
onReachBottom() {
},
onShareAppMessage() {
// 返回自定义分享信息
return {
title: 'My App',
desc: 'My App description',
path: 'pages/index/index',
};
},
});
{}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment