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