更新访客预约
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/records/records",
|
||||
"pages/index/index",
|
||||
"pages/appointment/appointment",
|
||||
|
||||
"pages/records/records",
|
||||
"pages/scan/result/index"
|
||||
],
|
||||
"window": {
|
||||
|
||||
@@ -16,7 +16,9 @@ Page({
|
||||
time: '',
|
||||
hostName: '',
|
||||
hostId: '',
|
||||
area: ''
|
||||
personId: '',
|
||||
area: '',
|
||||
plateNumber: ''
|
||||
},
|
||||
areas: ['A区-生产车间', 'B区-办公楼', 'C区-仓储区', 'D区-研发中心', 'E区-综合区'],
|
||||
areaMap: { 'A区-生产车间': 'A', 'B区-办公楼': 'B', 'C区-仓储区': 'C', 'D区-研发中心': 'D', 'E区-综合区': 'E' },
|
||||
@@ -78,6 +80,9 @@ Page({
|
||||
onHostNameInput(e) {
|
||||
this.setData({ 'form.hostName': e.detail.value })
|
||||
},
|
||||
onPlateNumberInput(e) {
|
||||
this.setData({ 'form.plateNumber': e.detail.value })
|
||||
},
|
||||
|
||||
onAreaChange(e) {
|
||||
const index = Number(e.detail.value)
|
||||
@@ -88,6 +93,7 @@ Page({
|
||||
'form.area': areaName,
|
||||
'form.hostId': '',
|
||||
'form.hostName': '',
|
||||
'form.personId': '',
|
||||
persons: [],
|
||||
personNames: [],
|
||||
personIndex: -1
|
||||
@@ -103,7 +109,8 @@ Page({
|
||||
const list = await appointmentDB.getPersonSelector(department)
|
||||
const persons = list.map(item => ({
|
||||
personId: item.personId,
|
||||
personName: item.personName
|
||||
personName: item.personName,
|
||||
personId: item.personId
|
||||
}))
|
||||
this.setData({
|
||||
persons,
|
||||
@@ -125,7 +132,8 @@ Page({
|
||||
this.setData({
|
||||
personIndex: index,
|
||||
'form.hostId': person.personId,
|
||||
'form.hostName': person.personName
|
||||
'form.hostName': person.personName,
|
||||
'form.personId': person.personId
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
<text class="form-label">来访事由</text>
|
||||
<input class="form-input" placeholder="请输入来访事由" value="{{form.reason}}" bindinput="onReasonInput" />
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<text class="form-label">车牌号</text>
|
||||
<input class="form-input" placeholder="如: 粤A12345(选填)" value="{{form.plateNumber}}" bindinput="onPlateNumberInput" maxlength="8" confirm-type="done" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 预约时间 -->
|
||||
|
||||
@@ -122,7 +122,9 @@ const appointmentDB = {
|
||||
visitDate: data.date,
|
||||
visitTime: data.time,
|
||||
hostName: data.hostName,
|
||||
personId: data.personId,
|
||||
area: data.area,
|
||||
plateNumber: data.plateNumber,
|
||||
openid: data.openid
|
||||
}
|
||||
})
|
||||
|
||||
+3
-6
@@ -2,12 +2,9 @@
|
||||
|
||||
// 环境地址配置
|
||||
const ENV_CONFIG = {
|
||||
// 正式版
|
||||
// release: 'https://xcx.yun.588580.xyz',
|
||||
trial: 'https://qywx.yun.588580.xyz',
|
||||
// 开发版 & 体验版
|
||||
develop: 'http://172.16.60.235:8080'
|
||||
// develop: 'http://10.50.13.191:8080'
|
||||
trial: 'https://smartguest.bmser.com:8091',
|
||||
// develop: 'https://192.168.123.76:8080'
|
||||
develop: 'https://10.50.13.191:8091'
|
||||
}
|
||||
|
||||
// 自动判断当前运行环境
|
||||
|
||||
Reference in New Issue
Block a user