Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mingPayMobile
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fengzhaoyu
mingPayMobile
Commits
1eba81b5
Commit
1eba81b5
authored
5 years ago
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111111
parent
9455e2f4
dev
…
ISV
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
298 additions
and
137 deletions
+298
-137
app.js
app.js
+2
-2
externalContact.js
pages/externalContact/externalContact.js
+1
-0
phoneAddressBook.js
pages/phoneAddressBook/phoneAddressBook.js
+0
-1
reservations.acss
pages/reservations/reservations.acss
+12
-8
reservations.axml
pages/reservations/reservations.axml
+15
-9
reservations.js
pages/reservations/reservations.js
+186
-57
reservations.json
pages/reservations/reservations.json
+2
-2
visitors.axml
pages/visitors/visitors.axml
+2
-2
visitors.js
pages/visitors/visitors.js
+30
-10
visitorsDetail.axml
pages/visitorsDetail/visitorsDetail.axml
+15
-20
visitorsDetail.js
pages/visitorsDetail/visitorsDetail.js
+33
-26
No files found.
app.js
View file @
1eba81b5
...
@@ -14,9 +14,9 @@ App({
...
@@ -14,9 +14,9 @@ App({
},
},
globalData
:
{
globalData
:
{
loadingType
:
0
,
loadingType
:
0
,
globalUrl
:
'http://192.168.1.101:9999'
//本地豪
//
globalUrl: 'http://192.168.1.101:9999' //本地豪
// globalUrl:'http://192.168.1.110:9999' // 本地成
// globalUrl:'http://192.168.1.110:9999' // 本地成
// globalUrl:'https://gateway.mingwork.com'
// globalUrl:'https://gateway.mingwork.com'
//
globalUrl:'https://gateway-beta.mingwork.com'
globalUrl
:
'https://gateway-beta.mingwork.com'
}
}
});
});
This diff is collapsed.
Click to expand it.
pages/externalContact/externalContact.js
View file @
1eba81b5
...
@@ -23,6 +23,7 @@ create.Page({
...
@@ -23,6 +23,7 @@ create.Page({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
_that
.
data
.
query
==
0
)
{
if
(
_that
.
data
.
query
==
0
)
{
_that
.
store
.
data
.
visitorName
=
res
[
0
].
name
_that
.
store
.
data
.
visitorName
=
res
[
0
].
name
debugger
_that
.
store
.
data
.
selectVisitors
=
false
_that
.
store
.
data
.
selectVisitors
=
false
_that
.
update
()
_that
.
update
()
}
}
...
...
This diff is collapsed.
Click to expand it.
pages/phoneAddressBook/phoneAddressBook.js
View file @
1eba81b5
...
@@ -19,7 +19,6 @@ create.Page({
...
@@ -19,7 +19,6 @@ create.Page({
const
_that
=
this
const
_that
=
this
dd
.
choosePhonebook
({
dd
.
choosePhonebook
({
multiple
:
false
,
//是否多选: true多选 false单选; 默认true
multiple
:
false
,
//是否多选: true多选 false单选; 默认true
maxUsers
:
1
,
//人数限制,当multiple为true才生效,可选范围1-1500
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
_that
.
data
.
query
==
0
)
{
if
(
_that
.
data
.
query
==
0
)
{
_that
.
store
.
data
.
visitorName
=
res
[
0
].
name
_that
.
store
.
data
.
visitorName
=
res
[
0
].
name
...
...
This diff is collapsed.
Click to expand it.
pages/reservations/reservations.acss
View file @
1eba81b5
...
@@ -189,25 +189,23 @@
...
@@ -189,25 +189,23 @@
.address {
.address {
overflow: hidden;
overflow: hidden;
width: 686rpx;
width: 686rpx;
padding: 0 32rpx;
padding: 32rpx;
height: 144rpx;
display: flex;
display: flex;
overflow: hidden;
overflow: hidden;
border-bottom: 2rpx solid #EEEEEE;
border-bottom: 2rpx solid #EEEEEE;
}
}
.address>view {
/*
.address>view {
margin-top: 32rpx;
margin-top: 32rpx;
}
}
*/
.address .addressTitle {
.address .addressTitle {
width: 30%;
width: 30%;
height: 44rpx;
}
}
.addressDetail {
.addressDetail {
width: 482rpx;
width: 482rpx;
height:
80rpx
;
height:
auto
;
line-height: 40rpx;
line-height: 40rpx;
font-size: 32rpx;
font-size: 32rpx;
color: #717579;
color: #717579;
...
@@ -228,7 +226,7 @@
...
@@ -228,7 +226,7 @@
.iconshanchu {
.iconshanchu {
color: #D4D5D6;
color: #D4D5D6;
font-size: 40rpx;
font-size: 40rpx;
line-height: 76rpx;
/* line-height: 76rpx; */
}
}
.addCompanions {
.addCompanions {
...
@@ -347,12 +345,17 @@
...
@@ -347,12 +345,17 @@
align-items: center;
align-items: center;
}
}
.ccPeople view {
.ccPeople view {
position: relative;
height: 100rpx;
height: 100rpx;
width: 100rpx;
width: 100rpx;
border-radius: 50%;
border-radius: 50%;
background: blue;
background: blue;
margin-right: 10rpx;
margin-right: 10rpx;
color: white;
color: white;
overflow: hidden;
text-align: center;
text-align: center;
}
.ccPeopleShanChu {
position: absolute;
top: -40rpx;
right: -6rpx;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
pages/reservations/reservations.axml
View file @
1eba81b5
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<picker value="{{
0}}" range="{{P
urposes}}" onChange='selectPurpose'>
<picker value="{{
1}}" range="{{p
urposes}}" onChange='selectPurpose'>
<view>
<view>
<view class="purpose">
<view class="purpose">
<view class="purposeTitle">来访目的</view>
<view class="purposeTitle">来访目的</view>
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
<view class="iconjia iconfont"></view>
<view class="iconjia iconfont"></view>
添加同行人员
添加同行人员
</view>
</view>
<view class="more">
<view class="more"
a:if='{{isPackUp}}'
>
<view class="moreTitle visitorInfoTitle">更多信息</view>
<view class="moreTitle visitorInfoTitle">更多信息</view>
<view class="visitorName moreName">
<view class="visitorName moreName">
<view class="visitorNameText visitorComNameText">
<view class="visitorNameText visitorComNameText">
...
@@ -116,22 +116,28 @@
...
@@ -116,22 +116,28 @@
<view class="iconfont iconjia moreJia" onTap="copyPerson">
<view class="iconfont iconjia moreJia" onTap="copyPerson">
</view>
</view>
</view>
</view>
<view class="ccPeople">
<view class="ccPeople" a:if='{{copyPerson.length}}'>
<view a:for="{{copyPerson}}" a:for-index="index" a:for-item="item"></view>
<view a:for="{{copyPerson}}" a:for-index="index" a:for-item="item">
{{item.name.substring(item.name.length-2)}}
<text class="iconshanchu iconfont ccPeopleShanChu" data-index='{{index}}' onTap="deleateCcPeople"></text>
</view>
</view>
</view>
<view class="visitorName">
<view class="visitorName">
<view class="visitorNameText visitorComNameText">
<view class="visitorNameText visitorComNameText">
备注
备注
</view>
</view>
<view class="visitorInput">
<view class="visitorInput">
<input placeholder="请输入" data-type='visitorNode' onInput='visitorInput'/>
<input placeholder="请输入" data-type='visitorNode' onInput='visitorInput'
value="{{visitorNode}}"
/>
</view>
</view>
</view>
</view>
<view class="isHidden">
</view>
<view class="isHidden" onTap="isPackUp" a:if='{{isPackUp}}'>
收起更多消息
收起更多消息
<!--<text class='iconzhankai iconfont'></text> -->
<text class='iconshouqi iconfont'></text>
<text class='iconshouqi iconfont'></text>
</view>
</view>
<view class="isHidden" onTap="isPackUp" a:else>
展开更多消息
<text class='iconzhankai iconfont'></text>
</view>
</view>
<view class="confirmAppointment">
<view class="confirmAppointment">
<view class="confirmAppointmentButton" onTap="confirmAppointment">确认预约</view>
<view class="confirmAppointmentButton" onTap="confirmAppointment">确认预约</view>
...
...
This diff is collapsed.
Click to expand it.
pages/reservations/reservations.js
View file @
1eba81b5
...
@@ -12,38 +12,73 @@ create.Page({
...
@@ -12,38 +12,73 @@ create.Page({
endTimeHour
:
''
,
// 结束时间的时分
endTimeHour
:
''
,
// 结束时间的时分
startTime
:
''
,
// 完整的开始时间
startTime
:
''
,
// 完整的开始时间
endTime
:
''
,
// 完整的结束时间
endTime
:
''
,
// 完整的结束时间
Purpose
:
''
,
purpose
:
''
,
//来访目的完整的信息
Purposes
:
[],
purposes
:
[],
// 所有的来访目的
currentPurpose
:
''
,
currentPurpose
:
''
,
// 当前选择的来访目的
isInput
:
true
,
isInput
:
false
,
// 来访目的是否需要手动输入
arriveAddress
:
[],
arriveAddress
:
[],
// 来访的地址
defaultAddress
:
''
,
defaultAddress
:
''
,
// 选中的来访地址
Companions
:
[],
Companions
:
[],
copyPerson
:
[],
copyPerson
:
[],
// 周知人
index
:
''
,
index
:
''
,
copyPerson
:
[],
visitorPhone
:
''
,
// 主访客的手机号
visitorPhone
:
''
,
// 主访客的手机号
visitorCompany
:
''
,
// 访客的单位
visitorCompany
:
''
,
// 访客的单位
visitorPurpose
:
''
,
// 访客手动输入的目的
visitorPurpose
:
''
,
// 访客手动输入的目的
visitorNode
:
''
// 访客的备注
visitorNode
:
''
,
// 访客的备注
isPackUp
:
false
// 是否收起更多消息
},
},
onLoad
(
query
)
{
onLoad
(
query
)
{
console
.
log
(
'onload事件触发'
)
this
.
reSet
(
)
dd
.
setNavigationBar
({
dd
.
setNavigationBar
({
title
:
'预约访客'
title
:
'预约访客'
});
});
this
.
Purpose
()
this
.
arriveAddress
()
},
// 重置事件
reSet
()
{
console
.
log
(
'djjj'
)
const
_that
=
this
_that
.
setData
({
startTimeYear
:
''
,
// 开始时间的年月日
startTimeHour
:
''
,
// 开始时间的时分
endTimeYear
:
''
,
// 结束时间的年月日
endTimeHour
:
''
,
// 结束时间的时分
startTime
:
''
,
// 完整的开始时间
endTime
:
''
,
// 完整的结束时间
purpose
:
''
,
//来访目的完整的信息
purposes
:
[],
// 所有的来访目的
currentPurpose
:
''
,
// 当前选择的来访目的
isInput
:
false
,
// 来访目的是否需要手动输入
arriveAddress
:
[],
// 来访的地址
defaultAddress
:
''
,
// 选中的来访地址
Companions
:
[],
copyPerson
:
[],
// 周知人
index
:
''
,
visitorPhone
:
''
,
// 主访客的手机号
visitorCompany
:
''
,
// 访客的单位
visitorPurpose
:
''
,
// 访客手动输入的目的
visitorNode
:
''
,
// 访客的备注
isPackUp
:
false
// 是否收起更多消息
})
_that
.
store
.
data
.
visitorName
=
''
,
_that
.
store
.
data
.
selectVisitors
=
false
,
_that
.
store
.
data
.
visitorPeer
=
[],
_that
.
update
()
let
startTimeYear
=
this
.
timeToStr
(
new
Date
()).
yearMonthDate
let
startTimeYear
=
this
.
timeToStr
(
new
Date
()).
yearMonthDate
let
startTimeHour
=
this
.
timeToStr
(
new
Date
()).
hourMinute
let
startTimeHour
=
this
.
timeToStr
(
new
Date
()).
hourMinute
let
endTimeYear
=
this
.
timeToStr
(
new
Date
()).
yearMonthDate
let
endTimeYear
=
this
.
timeToStr
(
new
Date
()).
yearMonthDate
let
endTimeHour
=
this
.
timeToStr
(
new
Date
()).
hourMinute
let
endTimeHour
=
this
.
timeToStr
(
new
Date
()).
hourMinute
let
startTime
=
this
.
timeToStr
(
new
Date
())
let
endTime
=
this
.
timeToStr
(
new
Date
())
this
.
setData
({
this
.
setData
({
startTimeYear
:
startTimeYear
,
startTimeYear
:
startTimeYear
,
startTimeHour
:
startTimeHour
,
startTimeHour
:
startTimeHour
,
endTimeYear
:
endTimeYear
,
endTimeYear
:
endTimeYear
,
endTimeHour
:
endTimeHour
endTimeHour
:
`24:00`
,
startTime
:
`
${
startTime
.
year
}
-
${
startTime
.
month
}
-
${
startTime
.
date
}
${
startTime
.
hour
}
:
${
startTime
.
minute
}
`
,
endTime
:
`
${
startTime
.
year
}
-
${
startTime
.
month
}
-
${
startTime
.
date
}
24:00`
})
})
this
.
Purpose
()
this
.
arriveAddress
()
},
},
//本页面input输入事件
//本页面input输入事件
visitorInput
(
event
)
{
visitorInput
(
event
)
{
...
@@ -112,7 +147,15 @@ create.Page({
...
@@ -112,7 +147,15 @@ create.Page({
content
:
'最多可添加四名同行人员'
,
content
:
'最多可添加四名同行人员'
,
buttonText
:
'确定'
buttonText
:
'确定'
})
})
}
},
// 收起更多消息
isPackUp
()
{
if
(
this
.
data
.
isPackUp
==
false
)
{
this
.
setData
({
isPackUp
:
true
})
}
else
{
this
.
setData
({
isPackUp
:
false
})
}
}
},
},
...
@@ -121,85 +164,170 @@ create.Page({
...
@@ -121,85 +164,170 @@ create.Page({
this
.
store
.
data
.
visitorPeer
.
splice
(
event
.
target
.
dataset
.
index
,
1
)
this
.
store
.
data
.
visitorPeer
.
splice
(
event
.
target
.
dataset
.
index
,
1
)
this
.
update
()
this
.
update
()
},
},
// 删除周知人
deleateCcPeople
(
event
)
{
this
.
data
.
copyPerson
.
splice
(
event
.
target
.
dataset
.
index
,
1
)
this
.
setData
({
copyPerson
:
this
.
data
.
copyPerson
})
},
// 周知人
// 周知人
copyPerson
()
{
copyPerson
()
{
const
_that
=
this
const
_that
=
this
dd
.
complexChoose
({
console
.
log
(
_that
.
data
.
copyPerson
.
length
)
title
:
"选择周知人"
,
//标题
if
(
_that
.
data
.
copyPerson
.
length
<=
5
)
{
multiple
:
true
,
//是否多选
dd
.
complexChoose
({
limitTips
:
"最多可选取6人"
,
//超过限定人数返回提示
title
:
"选择周知人"
,
//标题
maxUsers
:
6
,
//最大可选人数
multiple
:
false
,
//是否多选
responseUserOnly
:
true
,
//返回人,或者返回人和部门
responseUserOnly
:
true
,
//返回人,或者返回人和部门
success
:
function
(
res
)
{
success
:
function
(
res
)
{
let
copyPerson
=
[]
console
.
log
(
res
,
'copyPerson'
)
res
.
users
.
forEach
((
item
,
index
)
=>
{
res
.
users
.
forEach
((
item
,
index
)
=>
{
copyPerson
.
push
(
item
)
_that
.
data
.
copyPerson
.
push
(
item
)
})
})
_that
.
setData
({
_that
.
setData
({
copyPerson
:
copyPerson
copyPerson
:
_that
.
duplicateRemoval
(
_that
.
data
.
copyPerson
)
})
})
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
}
console
.
log
(
err
,
'copyPerson'
)
})
}
})
}
else
{
dd
.
alert
({
content
:
'最多可选取6人'
,
buttonText
:
'确定'
})
}
},
// 周知人去重
duplicateRemoval
(
person
)
{
let
obj
=
{};
let
peon
=
person
.
reduce
((
cur
,
next
)
=>
{
obj
[
next
.
userId
]
?
""
:
obj
[
next
.
userId
]
=
true
&&
cur
.
push
(
next
);
return
cur
;
},
[])
return
peon
},
},
// 提交预约单
// 提交预约单
confirmAppointment
()
{
confirmAppointment
()
{
const
_that
=
this
// _that.formValidation()
let
participator
=
''
_that
.
data
.
copyPerson
.
forEach
((
item
,
index
)
=>
{
participator
=
participator
+
item
.
userId
+
','
})
participator
=
participator
.
substring
(
0
,
participator
.
length
-
1
)
let
visitorPeer
=
''
_that
.
store
.
data
.
visitorPeer
.
forEach
((
item
,
index
)
=>
{
visitorPeer
=
visitorPeer
+
item
.
name
+
':'
+
item
.
phone
+
','
})
visitorPeer
=
visitorPeer
.
substring
(
0
,
visitorPeer
.
length
-
1
)
let
purpose
=
''
if
(
this
.
data
.
currentPurpose
==
'其他'
)
{
purpose
=
this
.
data
.
visitorPurpose
}
else
{
purpose
=
this
.
data
.
currentPurpose
}
let
data
=
{
let
data
=
{
startTime
:
this
.
data
.
startTime
s
,
startTime
:
this
.
data
.
startTime
+
''
+
':00'
,
endTime
:
this
.
data
.
endTime
s
,
endTime
:
this
.
data
.
endTime
+
''
+
':00'
,
visitorInfo
:
`
${
this
.
store
.
data
.
visitorName
}
:
${
this
.
data
.
visitorPhone
}
`
,
visitorInfo
:
`
${
this
.
store
.
data
.
visitorName
}
:
${
this
.
data
.
visitorPhone
}
,
${
visitorPeer
}
`
,
visitorCompany
:
this
.
data
.
visitorCompany
,
companyName
:
this
.
data
.
visitorCompany
,
purpose
:
JSON
.
stringify
(
this
.
data
.
currentPurpose
)
,
purpose
:
purpose
,
visitorPurpose
:
this
.
data
.
visitorPurpose
,
visitorPurpose
:
this
.
data
.
visitorPurpose
,
visitAddress
:
this
.
data
.
defaultAddress
,
visitAddress
:
this
.
data
.
defaultAddress
,
visitor
Peer
:
JSON
.
stringify
(
this
.
store
.
data
.
visitorPeer
)
,
visitor
Node
:
this
.
data
.
visitorNode
,
visitorNode
:
this
.
data
.
visitorNode
participator
:
participator
}
}
$http
.
$http
(
'/admin/visitor/addRecord'
,
data
,
'post'
).
then
(
res
=>
{
$http
.
$http
(
'/admin/visitor/addRecord'
,
data
,
'post'
).
then
(
res
=>
{
console
.
log
(
res
,
66666666666
)
dd
.
alert
({
content
:
'预约成功'
,
buttonText
:
'确定'
,
success
:
()
=>
{
dd
.
redirectTo
({
url
:
'/pages/visitors/visitors'
})
},
});
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
})
},
},
// 表单验证
formValidation
()
{
if
(
this
.
store
.
data
.
visitorName
==
''
||
this
.
store
.
data
.
visitorName
.
length
>
20
)
{
dd
.
alert
({
content
:
'访客姓名不能为空且长度小于20个字符'
,
buttonText
:
'确定'
})
return
}
else
if
(
this
.
data
.
visitorPhone
==
''
||
!
(
/^
[
1
][
3,4,5,7,8
][
0-9
]{9}
$/
).
test
(
this
.
data
.
visitorPhone
))
{
dd
.
alert
({
content
:
'请输入正确的手机号码'
,
buttonText
:
'确定'
})
return
}
else
if
(
this
.
data
.
visitorCompany
.
length
>
20
)
{
dd
.
alert
({
content
:
'访客单位的长度小于20个字符'
,
buttonText
:
'确定'
})
return
}
else
if
(
new
Date
(
this
.
data
.
startTime
).
getTime
()
<
new
Date
(
this
.
data
.
endTime
))
{
dd
.
alert
({
content
:
'开始时间不能晚于结束时间'
,
buttonText
:
'确定'
})
return
}
else
if
(
this
.
data
.
visitorPurpose
.
length
>
20
)
{
dd
.
alert
({
content
:
'来访目的的长度小于20个字符'
,
buttonText
:
'确定'
})
return
}
},
// 选择开始时间
selectStartTime
()
{
selectStartTime
()
{
dd
.
datePicker
({
dd
.
datePicker
({
format
:
'yyyy-MM-dd HH:mm'
,
format
:
'yyyy-MM-dd HH:mm'
,
success
:
(
res
=>
{
success
:
(
res
=>
{
let
time
=
this
.
timeToStr
(
res
.
date
)
let
time
=
this
.
timeToStr
(
res
.
date
)
console
.
log
(
time
)
this
.
setData
({
this
.
setData
({
startTime
:
`
${
time
.
year
}
年
${
time
.
month
}
月
${
time
.
date
}
日
`
,
startTime
Year
:
`
${
time
.
yearMonthDate
}
`
,
startTimeHour
:
`
${
time
.
hour
}
:
${
time
.
m
inute
}
`
,
startTimeHour
:
`
${
time
.
hour
M
inute
}
`
,
startTime
s
:
res
.
date
startTime
:
`
${
res
.
date
}
`
})
})
})
})
})
})
},
},
// 选择结束时间
selectEndTime
()
{
selectEndTime
()
{
dd
.
datePicker
({
dd
.
datePicker
({
format
:
'yyyy-MM-dd HH:mm'
,
format
:
'yyyy-MM-dd HH:mm'
,
success
:
(
res
=>
{
success
:
(
res
=>
{
let
time
=
this
.
timeToStr
(
res
.
date
)
let
time
=
this
.
timeToStr
(
res
.
date
)
console
.
log
(
res
.
date
)
this
.
setData
({
this
.
setData
({
endTime
:
`
${
time
.
year
}
年
${
time
.
month
}
月
${
time
.
date
}
日
`
,
endTime
Year
:
`
${
time
.
yearMonthDate
}
`
,
endTimeHour
:
`
${
time
.
hour
}
:
${
time
.
m
inute
}
`
,
endTimeHour
:
`
${
time
.
hour
M
inute
}
`
,
endTime
s
:
res
.
date
endTime
:
`
${
res
.
date
}
`
})
})
})
})
})
})
},
},
// 选择来访目的
selectPurpose
(
event
)
{
selectPurpose
(
event
)
{
console
.
log
(
this
.
data
.
purpose
,
'selectPurpose'
)
this
.
setData
({
this
.
setData
({
currentPurpose
:
this
.
data
.
P
urpose
[
event
.
detail
.
value
].
visitPurpose
currentPurpose
:
this
.
data
.
p
urpose
[
event
.
detail
.
value
].
visitPurpose
})
})
this
.
isInput
()
this
.
isInput
()
},
},
// 选择地址
selectAddress
(
event
)
{
selectAddress
(
event
)
{
console
.
log
(
event
)
console
.
log
(
this
.
data
.
arriveAddress
[
event
.
detail
.
value
].
address
,
'this.data.arriveAddress[event.detail.value].address'
)
this
.
setData
({
this
.
setData
({
defaultAddress
:
this
.
data
.
arriveAddress
[
event
.
detail
.
value
]
.
address
defaultAddress
:
this
.
data
.
arriveAddress
[
event
.
detail
.
value
]
})
})
},
},
// 所有的到访地址
arriveAddress
()
{
arriveAddress
()
{
$http
.
$http
(
'/admin/address/list'
,
{},
'get'
).
then
(
res
=>
{
$http
.
$http
(
'/admin/address/list'
,
{},
'get'
).
then
(
res
=>
{
console
.
log
(
res
,
'arriveAddress'
)
console
.
log
(
res
,
'arriveAddress'
)
...
@@ -216,23 +344,24 @@ create.Page({
...
@@ -216,23 +344,24 @@ create.Page({
this
.
setData
({
arriveAddress
:
arriveAddress
})
this
.
setData
({
arriveAddress
:
arriveAddress
})
})
})
},
},
// 来访的目的
//
所有的
来访的目的
Purpose
()
{
Purpose
()
{
$http
.
$http
(
'/admin/visit-purpose/list'
,
{},
'post'
).
then
(
res
=>
{
$http
.
$http
(
'/admin/visit-purpose/list'
,
{},
'post'
).
then
(
res
=>
{
console
.
log
(
res
,
'Purpose'
)
console
.
log
(
res
,
'Purpose'
)
let
P
urposes
=
[]
let
p
urposes
=
[]
res
.
forEach
((
item
,
index
)
=>
{
res
.
forEach
((
item
,
index
)
=>
{
P
urposes
.
push
(
item
.
visitPurpose
)
p
urposes
.
push
(
item
.
visitPurpose
)
})
})
this
.
setData
({
this
.
setData
({
P
urpose
:
res
,
p
urpose
:
res
,
Purposes
:
P
urposes
,
purposes
:
p
urposes
,
currentPurpose
:
res
[
0
].
visitPurpose
,
currentPurpose
:
res
[
1
].
visitPurpose
,
})
})
})
})
},
},
// 处理时间
timeToStr
(
time
)
{
timeToStr
(
time
)
{
if
(
/-/
.
test
(
time
))
{
if
(
/-/
.
test
(
time
))
{
time
=
time
.
replace
(
/
\-
/g
,
"/"
)
time
=
time
.
replace
(
/
\-
/g
,
"/"
)
}
}
let
timeData
=
new
Date
(
time
)
let
timeData
=
new
Date
(
time
)
...
@@ -252,7 +381,7 @@ create.Page({
...
@@ -252,7 +381,7 @@ create.Page({
allTime
:
`
${
year
}
年
${
month
.
toString
().
length
>
1
?
month
:
'0'
+
month
}
月
${
date
.
toString
().
length
>
1
?
date
:
'0'
+
date
}
日
${
hour
.
toString
().
length
>
1
?
hour
:
'0'
+
hour
}
:
${
minute
.
toString
().
length
>
1
?
minute
:
'0'
+
minute
}
分`
allTime
:
`
${
year
}
年
${
month
.
toString
().
length
>
1
?
month
:
'0'
+
month
}
月
${
date
.
toString
().
length
>
1
?
date
:
'0'
+
date
}
日
${
hour
.
toString
().
length
>
1
?
hour
:
'0'
+
hour
}
:
${
minute
.
toString
().
length
>
1
?
minute
:
'0'
+
minute
}
分`
}
}
},
},
// 是否展示到访目的的输入框
isInput
()
{
isInput
()
{
if
(
this
.
data
.
currentPurpose
!=
'其他'
)
{
if
(
this
.
data
.
currentPurpose
!=
'其他'
)
{
this
.
setData
({
this
.
setData
({
...
...
This diff is collapsed.
Click to expand it.
pages/reservations/reservations.json
View file @
1eba81b5
{}
{
"pullRefresh"
:
false
}
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
pages/visitors/visitors.axml
View file @
1eba81b5
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
<view class="{{type !== '0' ? 'clickTabs' : ''}}" data-type="1" onTap="changeType">公司访客</view>
<view class="{{type !== '0' ? 'clickTabs' : ''}}" data-type="1" onTap="changeType">公司访客</view>
</view>
</view>
<view class='visitorSituation' a:if="{{dataList.length !== 0}}">今天共
<view class='visitorSituation' a:if="{{dataList.length !== 0}}">今天共
<text>
2
</text>位访客,到访
<text>
{{todayVisit}}
</text>位访客,到访
<text>
1
</text>位
<text>
{{arrivedVisit}}
</text>位
</view>
</view>
<view class="nullImage" a:if="{{dataList.length === 0}}">
<view class="nullImage" a:if="{{dataList.length === 0}}">
<image mode="scaleToFill" src="../../../assets/allowanceNull.png"/>
<image mode="scaleToFill" src="../../../assets/allowanceNull.png"/>
...
...
This diff is collapsed.
Click to expand it.
pages/visitors/visitors.js
View file @
1eba81b5
...
@@ -8,11 +8,28 @@ Page({
...
@@ -8,11 +8,28 @@ Page({
pageSize
:
10
,
pageSize
:
10
,
totalCount
:
''
,
totalCount
:
''
,
overdue
:
false
,
overdue
:
false
,
todayVisit
:
0
,
arrivedVisit
:
0
},
arriveStaus
()
{
const
_that
=
this
let
data
=
{
type
:
0
}
$http
.
$http
(
'/admin/visitor/getCurrentCount'
,
data
,
'post'
).
then
(
res
=>
{
_that
.
setData
({
todayVisit
:
res
[
1
],
arrivedVisit
:
res
[
0
]
})
}).
catch
(
err
=>
{
})
},
},
changeType
(
event
)
{
changeType
(
event
)
{
this
.
setData
({
this
.
setData
({
type
:
event
.
target
.
dataset
.
type
,
type
:
event
.
target
.
dataset
.
type
,
dataList
:
[]
dataList
:
[],
currentPage
:
1
})
})
this
.
visitorList
(
this
.
data
.
type
)
this
.
visitorList
(
this
.
data
.
type
)
},
},
...
@@ -25,7 +42,7 @@ Page({
...
@@ -25,7 +42,7 @@ Page({
}
}
$http
.
$http
(
'/admin/visitor/getRecordList'
,
data
,
'post'
).
then
(
res
=>
{
$http
.
$http
(
'/admin/visitor/getRecordList'
,
data
,
'post'
).
then
(
res
=>
{
let
dataList
=
res
.
records
;
let
dataList
=
res
.
records
;
let
dataListSource
=
[]
;
let
dataListSource
=
_that
.
data
.
dataList
;
;
console
.
log
(
dataList
.
length
)
console
.
log
(
dataList
.
length
)
if
(
dataList
.
length
>
0
)
{
if
(
dataList
.
length
>
0
)
{
dataList
.
forEach
((
item
,
index
)
=>
{
dataList
.
forEach
((
item
,
index
)
=>
{
...
@@ -46,19 +63,19 @@ Page({
...
@@ -46,19 +63,19 @@ Page({
dataListSource
.
push
(
item
)
dataListSource
.
push
(
item
)
})
})
dataList
=
dataListSource
dataList
=
dataListSource
let
totalCount
=
Math
.
ceil
(
parseInt
(
res
.
total
)
/
_that
.
data
.
page
Number
)
let
totalCount
=
Math
.
ceil
(
parseInt
(
res
.
total
)
/
_that
.
data
.
page
Size
)
_that
.
setData
({
_that
.
setData
({
dataList
:
dataList
,
dataList
:
dataList
,
totalCount
:
totalCount
totalCount
:
totalCount
})
})
}
}
})
})
},
},
timeToStr
(
time
)
{
timeToStr
(
time
)
{
time
=
time
.
replace
(
/
\-
/g
,
"/"
)
if
(
/-/
.
test
(
time
))
{
time
=
time
.
replace
(
/
\-
/g
,
"/"
)
}
let
timeData
=
new
Date
(
time
)
let
timeData
=
new
Date
(
time
)
console
.
log
(
'timeData'
,
timeData
)
let
year
=
timeData
.
getFullYear
()
let
year
=
timeData
.
getFullYear
()
let
month
=
timeData
.
getMonth
()
+
1
let
month
=
timeData
.
getMonth
()
+
1
let
date
=
timeData
.
getDate
()
let
date
=
timeData
.
getDate
()
...
@@ -69,19 +86,22 @@ Page({
...
@@ -69,19 +86,22 @@ Page({
month
:
month
.
toString
().
length
>
1
?
month
:
'0'
+
month
,
month
:
month
.
toString
().
length
>
1
?
month
:
'0'
+
month
,
date
:
date
.
toString
().
length
>
1
?
date
:
'0'
+
date
,
date
:
date
.
toString
().
length
>
1
?
date
:
'0'
+
date
,
hour
:
hour
.
toString
().
length
>
1
?
hour
:
'0'
+
hour
,
hour
:
hour
.
toString
().
length
>
1
?
hour
:
'0'
+
hour
,
minute
:
minute
.
toString
().
length
>
1
?
minute
:
'0'
+
minute
minute
:
minute
.
toString
().
length
>
1
?
minute
:
'0'
+
minute
,
yearMonthDate
:
`
${
year
}
年
${
month
.
toString
().
length
>
1
?
month
:
'0'
+
month
}
月
${
date
.
toString
().
length
>
1
?
date
:
'0'
+
date
}
日`
,
hourMinute
:
`
${
hour
.
toString
().
length
>
1
?
hour
:
'0'
+
hour
}
:
${
minute
.
toString
().
length
>
1
?
minute
:
'0'
+
minute
}
`
,
allTime
:
`
${
year
}
年
${
month
.
toString
().
length
>
1
?
month
:
'0'
+
month
}
月
${
date
.
toString
().
length
>
1
?
date
:
'0'
+
date
}
日
${
hour
.
toString
().
length
>
1
?
hour
:
'0'
+
hour
}
:
${
minute
.
toString
().
length
>
1
?
minute
:
'0'
+
minute
}
分`
}
}
},
},
navigatorToNext
(
event
)
{
navigatorToNext
(
event
)
{
dd
.
setStorageSync
({
key
:
'item'
,
data
:
event
.
target
.
dataset
.
item
})
dd
.
navigateTo
({
url
:
`./../visitorsDetail/visitorsDetail?item=
${
JSON
.
stringify
(
event
.
target
.
dataset
.
item
)}
`
})
dd
.
navigateTo
({
url
:
`./../visitorsDetail/visitorsDetail`
})
},
},
appointment
()
{
appointment
()
{
dd
.
navigateTo
({
url
:
'./../reservations/reservations'
});
dd
.
navigateTo
({
url
:
'./../reservations/reservations'
});
},
},
onLoad
(
query
)
{
onLoad
(
query
)
{
dd
.
setNavigationBar
({
title
:
'智能访客'
});
dd
.
setNavigationBar
({
title
:
'智能访客'
});
this
.
visitorList
(
0
)
this
.
visitorList
(
0
)
this
.
arriveStaus
()
},
},
onReady
()
{
onReady
()
{
},
},
...
...
This diff is collapsed.
Click to expand it.
pages/visitorsDetail/visitorsDetail.axml
View file @
1eba81b5
...
@@ -2,19 +2,19 @@
...
@@ -2,19 +2,19 @@
<view class="visitorsDetail">
<view class="visitorsDetail">
<view class="visitorTab">
<view class="visitorTab">
<view class="visitorName">
<view class="visitorName">
<text class="visitorNameName">
赖蜜桃
</text>
<text class="visitorNameName">
{{visitorName}}
</text>
<text class="visitorNameIcon iconfont iconzhankai">
<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 class="visitorHidden"><text>1111111111</text><text>1111111111</text><text>1111111111</text><text>1111111111</text><text>1111111111</text></text> -->
</text>
</text>
</view>
</view>
<view class="visitorNumber">
<view class="visitorNumber">
<text class="iconfont icondianhua visitorNumberIcon"></text>
<text class="iconfont icondianhua visitorNumberIcon"></text>
<text class="visitorNumberNumber">
17853553699
</text>
<text class="visitorNumberNumber">
{{phone}}
</text>
<text class="call" onTap="call">拨打</text>
<text class="call" onTap="call">拨打</text>
</view>
</view>
<view class="visitorCompany">
<view class="visitorCompany"
a:if='{{company}}'
>
<text class="visitorCompanyIcon iconfont iconqiye"></text>
<text class="visitorCompanyIcon iconfont iconqiye"></text>
<text class="visitorCompanyName">
杭州明我科技有限公司
</text>
<text class="visitorCompanyName">
{{company}}
</text>
</view>
</view>
<image mode="scaleToFill" src="{{processStatus == 'invite'? '../../assets/await.png': (processStatus == 'cancel'? '../../assets/cancel.png':'../../assets/dao.png')}}"/>
<image mode="scaleToFill" src="{{processStatus == 'invite'? '../../assets/await.png': (processStatus == 'cancel'? '../../assets/cancel.png':'../../assets/dao.png')}}"/>
</view>
</view>
...
@@ -27,13 +27,13 @@
...
@@ -27,13 +27,13 @@
</view>
</view>
<view class="visitorTimeBottom">
<view class="visitorTimeBottom">
<view>
<view>
<view>
2019年10月11日
</view>
<view>
{{startTimeYear}}
</view>
<view>
10:14
</view>
<view>
{{startHour}}
</view>
</view>
</view>
<view class="fu">~</view>
<view class="fu">~</view>
<view>
<view>
<view>
2019年10月11日
</view>
<view>
{{endTimeYear}}
</view>
<view>
10:14
</view>
<view>
{{endHour}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<text class="visitorTimeTopTitle">被访人</text>
<text class="visitorTimeTopTitle">被访人</text>
</view>
</view>
<view class="visitorTimeBottom">
<view class="visitorTimeBottom">
林萍萍
{{byVisitorName}}
</view>
</view>
</view>
</view>
<view class="visitorTime">
<view class="visitorTime">
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<text class="visitorTimeTopTitle">来访目的</text>
<text class="visitorTimeTopTitle">来访目的</text>
</view>
</view>
<view class="visitorTimeBottom">
<view class="visitorTimeBottom">
商务洽谈
{{purpose}}
</view>
</view>
</view>
</view>
<view class="visitorTime">
<view class="visitorTime">
...
@@ -61,26 +61,21 @@
...
@@ -61,26 +61,21 @@
<text class="visitorTimeTopTitle">到访地址</text>
<text class="visitorTimeTopTitle">到访地址</text>
</view>
</view>
<view class="visitorTimeBottom">
<view class="visitorTimeBottom">
浙江省杭州市余杭区
{{visitAddress}}
</view>
</view>
</view>
</view>
<view class="visitorTime">
<view class="visitorTime">
<view class="visitorTimeTop">
<view class="visitorTimeTop">
<text class="visitorTimeTopIcon iconzhouzhiren iconfont"></text>
<text class="visitorTimeTopIcon iconzhouzhiren iconfont"></text>
<text class="visitorTimeTopTitle">周知人员</text>
<text class="visitorTimeTopTitle">周知人员</text>
</view>
</view>
<view class="visitorTimeBottom">
<view class="visitorTimeBottom">
<text>廖培培</text>
<text a:for='{{participatorUserList}}' a:for-index="index" a:for-item="item">{{item.username}}</text>
<text>廖培培</text>
<text>廖培培</text>
<text>廖培培</text>
<text>廖培培</text>
<text>廖培培</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="staus" a:if="{{processStatus == '
cancel'|| processStatus == 'arrive'?false:true
}}">
<view class="staus" a:if="{{processStatus == '
invite'
}}">
<view class="noOverdue" a:if='
!overdue
'>
<view class="noOverdue" a:if='
{{!overdue}}
'>
<view class="cancel" onTap="cancel">取消访客</view>
<view class="cancel" onTap="cancel">取消访客</view>
<view class="reception" onTap="reception">接待访客</view>
<view class="reception" onTap="reception">接待访客</view>
</view>
</view>
...
...
This diff is collapsed.
Click to expand it.
pages/visitorsDetail/visitorsDetail.js
View file @
1eba81b5
...
@@ -2,44 +2,50 @@ const app = getApp()
...
@@ -2,44 +2,50 @@ const app = getApp()
import
$http
from
'./../../API/http'
import
$http
from
'./../../API/http'
Page
({
Page
({
data
:
{
data
:
{
name
:
''
,
visitorName
:
''
,
//访客的名字
company
:
''
,
company
:
''
,
// 到访者的公司
startTime
:
''
,
startTimeYear
:
''
,
// 开始时间的年月日
endTime
:
''
,
startHour
:
''
,
// 开始时间的小时
byVisitorName
:
''
,
endHour
:
''
,
//结束时间的小时
purpose
:
''
,
endTimeYear
:
''
,
// 结束时间的年月日
byVisitorName
:
''
,
// 被访人
purpose
:
''
,
// 来访的目的
participatorUserList
:
''
,
// 周知人员
participator
:
''
,
participator
:
''
,
endHour
:
''
,
phone
:
''
,
// 访客的手机号
startHour
:
''
,
processStatus
:
''
,
// 访客的状态
phone
:
''
,
overdue
:
''
,
processStatus
:
''
,
visitAddress
:
''
//到访的地址
overdue
:
''
},
},
onLoad
()
{
onLoad
(
event
)
{
console
.
log
(
JSON
.
parse
(
event
.
item
),
'query'
)
//由JSON字符串转换为JSON对象)
const
that
=
this
const
that
=
this
let
query
=
dd
.
getStorageSync
({
key
:
'item'
}).
data
let
query
=
JSON
.
parse
(
event
.
item
)
dd
.
setNavigationBar
({
dd
.
setNavigationBar
({
title
:
"访客详情"
,
title
:
"访客详情"
,
});
});
},
onReady
()
{
let
query
=
dd
.
getStorageSync
({
key
:
'item'
}).
data
this
.
setData
({
this
.
setData
({
name
:
query
.
n
ame
,
visitorName
:
query
.
visitorN
ame
,
company
:
query
.
companyName
,
company
:
query
.
companyName
,
startTime
:
`
${
query
.
startTime
.
year
}
年
${
query
.
startTime
.
month
}
月
${
query
.
startTime
.
date
}
日`
,
startTimeYear
:
`
${
query
.
startTime
.
yearMonthDate
}
`
,
endTime
:
`
${
query
.
endTime
.
year
}
年
${
query
.
endTime
.
month
}
月
${
query
.
endTime
.
date
}
日`
,
startHour
:
`
${
query
.
startTime
.
hourMinute
}
`
,
startHour
:
`
${
query
.
startTime
.
date
}
:
${
query
.
startTime
.
minute
}
`
,
endTimeYear
:
`
${
query
.
endTime
.
yearMonthDate
}
`
,
endHour
:
`
${
query
.
endTime
.
date
}
:
${
query
.
endTime
.
minute
}
`
,
endHour
:
`
${
query
.
endTime
.
hourMinute
}
`
,
byVisitorName
:
''
,
byVisitorName
:
`
${
query
.
byVisitorName
}
`
,
purpose
:
''
,
purpose
:
query
.
purpose
,
visitAddress
:
query
.
visitAddress
,
participatorUserList
:
query
.
participatorUserList
,
participator
:
''
,
participator
:
''
,
phone
:
query
.
mobile
,
phone
:
query
.
mobile
,
processStatus
:
query
.
processStatus
,
processStatus
:
query
.
processStatus
,
overdue
:
query
.
overdue
,
overdue
:
query
.
overdue
,
recordId
:
query
.
recordId
recordId
:
query
.
recordId
})
})
},
},
onReady
()
{
},
cancel
()
{
cancel
()
{
dd
.
confirm
({
dd
.
confirm
({
title
:
'确认取消访问'
,
title
:
'确认取消访问'
,
...
@@ -47,12 +53,13 @@ Page({
...
@@ -47,12 +53,13 @@ Page({
confirmButtonText
:
'确认'
,
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
success
:
(
result
)
=>
{
success
:
(
result
)
=>
{
this
.
setData
({
processStatus
:
'cancel'
}
)
console
.
log
(
result
,
11111111111
)
let
data
=
{
let
data
=
{
recordId
:
this
.
data
.
recordId
recordId
:
this
.
data
.
recordId
}
}
$http
.
$http
(
'/admin/visitor/cancelVisit'
,
data
,
'post'
).
then
(
res
=>
{
$http
.
$http
(
'/admin/visitor/cancelVisit'
,
data
,
'post'
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
setData
({
processStatus
:
'cancel'
})
})
})
},
},
});
});
...
@@ -64,12 +71,12 @@ Page({
...
@@ -64,12 +71,12 @@ Page({
confirmButtonText
:
'确认'
,
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
success
:
(
result
)
=>
{
success
:
(
result
)
=>
{
this
.
setData
({
processStatus
:
'arrive'
})
let
data
=
{
let
data
=
{
recordId
:
this
.
data
.
recordId
recordId
:
this
.
data
.
recordId
}
}
$http
.
$http
(
'/admin/visitor/confirmVisit'
,
data
,
'post'
).
then
(
res
=>
{
$http
.
$http
(
'/admin/visitor/confirmVisit'
,
data
,
'post'
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
setData
({
processStatus
:
'arrive'
})
})
})
},
},
});
});
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment