diff --git a/pages.json b/pages.json index f9ba655..302ed83 100644 --- a/pages.json +++ b/pages.json @@ -76,6 +76,14 @@ "navigationBarTitleText": "信息查看", "enablePullDownRefresh": false } + }, + { + "path" : "pages/info/info", + "style" : + { + "navigationBarTitleText": "信息查看", + "enablePullDownRefresh": false + } } ], "globalStyle": { diff --git a/pages.json b/pages.json index f9ba655..302ed83 100644 --- a/pages.json +++ b/pages.json @@ -76,6 +76,14 @@ "navigationBarTitleText": "信息查看", "enablePullDownRefresh": false } + }, + { + "path" : "pages/info/info", + "style" : + { + "navigationBarTitleText": "信息查看", + "enablePullDownRefresh": false + } } ], "globalStyle": { diff --git a/pages/info/info.vue b/pages/info/info.vue new file mode 100644 index 0000000..4f5b443 --- /dev/null +++ b/pages/info/info.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/pages.json b/pages.json index f9ba655..302ed83 100644 --- a/pages.json +++ b/pages.json @@ -76,6 +76,14 @@ "navigationBarTitleText": "信息查看", "enablePullDownRefresh": false } + }, + { + "path" : "pages/info/info", + "style" : + { + "navigationBarTitleText": "信息查看", + "enablePullDownRefresh": false + } } ], "globalStyle": { diff --git a/pages/info/info.vue b/pages/info/info.vue new file mode 100644 index 0000000..4f5b443 --- /dev/null +++ b/pages/info/info.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/pages/information/information.vue b/pages/information/information.vue index 1a03a22..4f7ea5c 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -1,6 +1,6 @@ @@ -43,19 +70,93 @@ contact: '', purpose: '', building: '', - time: '', + time: Number(new Date()), number: '', name: '', - bz: '' + bz: '', + endTime:Number(new Date()) + 1000 }, - rules:{}, + rules:{ + callerNmae:[{ + required: true, + message: '请填写访客姓名', + trigger: ['blur', 'change'], + }], + id:[{ + required: true, + message: '请填写访客身份证', + trigger: ['blur', 'change'], + }], + contact:[{ + required: true, + message: '请填写访客联系方式', + trigger: ['blur', 'change'], + }], + number:[{ + required: true, + message: '请填写申请者工号', + trigger: ['blur', 'change'], + }] + }, show:false, + isForm:true, + isTimeShow:false, buildingShow:false, columns:[['商务会议','安装维修','其他事宜']], buildingColumns:[['一期主楼','二期主楼','录制楼','1600演播厅']] } }, + onLoad(){ + this.callerInfo.time = this.shijianc(this.callerInfo.time) + this.callerInfo.endTime = this.shijianc(this.callerInfo.endTime) + }, methods:{ + //点击提交访客记录 + async submit(){ + if(this.isForm){ + this.isForm = false + }else { + wx.switchTab({ + url: `/pages/index/index`, + }); + this.isForm = true + } + }, + async changeTime(e){ + this.callerInfo.endTime = await this.shijianc(e.value) + }, + //确定选择时间 + async confirmTime(e){ + this.callerInfo.endTime = await this.shijianc(e.value) + this.isTimeShow = false + }, + //取消选择时间 + closeTime(){ + this.isTimeShow = false + }, + shijianc(time) { + let date = new Date(time) + let Y = date.getFullYear() + '-' + let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-' + let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ' + let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':' + let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':' + let s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()) + return Y + M + D + h + m + s + }, + //格式化时间 + formatter(type, value) { + if (type === 'year') { + return `${value}年` + } + if (type === 'month') { + return `${value}月` + } + if (type === 'day') { + return `${value}日` + } + return value + }, getPurpose(val){ this.callerInfo.purpose = val.value[0] this.show = false @@ -73,4 +174,24 @@ .information{ padding: 52rpx; } + .informationSubmit{ + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 680rpx; + .informationSubmit-box{ + display: flex; + justify-content: center; + align-items: center; + border-radius: 150rpx; + width: 300rpx; + height: 300rpx; + background-color: #0ade13; + } + .informationSubmit-text{ + position: absolute; + top: 42%; + } + } diff --git a/pages.json b/pages.json index f9ba655..302ed83 100644 --- a/pages.json +++ b/pages.json @@ -76,6 +76,14 @@ "navigationBarTitleText": "信息查看", "enablePullDownRefresh": false } + }, + { + "path" : "pages/info/info", + "style" : + { + "navigationBarTitleText": "信息查看", + "enablePullDownRefresh": false + } } ], "globalStyle": { diff --git a/pages/info/info.vue b/pages/info/info.vue new file mode 100644 index 0000000..4f5b443 --- /dev/null +++ b/pages/info/info.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/pages/information/information.vue b/pages/information/information.vue index 1a03a22..4f7ea5c 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -1,6 +1,6 @@ @@ -43,19 +70,93 @@ contact: '', purpose: '', building: '', - time: '', + time: Number(new Date()), number: '', name: '', - bz: '' + bz: '', + endTime:Number(new Date()) + 1000 }, - rules:{}, + rules:{ + callerNmae:[{ + required: true, + message: '请填写访客姓名', + trigger: ['blur', 'change'], + }], + id:[{ + required: true, + message: '请填写访客身份证', + trigger: ['blur', 'change'], + }], + contact:[{ + required: true, + message: '请填写访客联系方式', + trigger: ['blur', 'change'], + }], + number:[{ + required: true, + message: '请填写申请者工号', + trigger: ['blur', 'change'], + }] + }, show:false, + isForm:true, + isTimeShow:false, buildingShow:false, columns:[['商务会议','安装维修','其他事宜']], buildingColumns:[['一期主楼','二期主楼','录制楼','1600演播厅']] } }, + onLoad(){ + this.callerInfo.time = this.shijianc(this.callerInfo.time) + this.callerInfo.endTime = this.shijianc(this.callerInfo.endTime) + }, methods:{ + //点击提交访客记录 + async submit(){ + if(this.isForm){ + this.isForm = false + }else { + wx.switchTab({ + url: `/pages/index/index`, + }); + this.isForm = true + } + }, + async changeTime(e){ + this.callerInfo.endTime = await this.shijianc(e.value) + }, + //确定选择时间 + async confirmTime(e){ + this.callerInfo.endTime = await this.shijianc(e.value) + this.isTimeShow = false + }, + //取消选择时间 + closeTime(){ + this.isTimeShow = false + }, + shijianc(time) { + let date = new Date(time) + let Y = date.getFullYear() + '-' + let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-' + let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ' + let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':' + let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':' + let s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()) + return Y + M + D + h + m + s + }, + //格式化时间 + formatter(type, value) { + if (type === 'year') { + return `${value}年` + } + if (type === 'month') { + return `${value}月` + } + if (type === 'day') { + return `${value}日` + } + return value + }, getPurpose(val){ this.callerInfo.purpose = val.value[0] this.show = false @@ -73,4 +174,24 @@ .information{ padding: 52rpx; } + .informationSubmit{ + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 680rpx; + .informationSubmit-box{ + display: flex; + justify-content: center; + align-items: center; + border-radius: 150rpx; + width: 300rpx; + height: 300rpx; + background-color: #0ade13; + } + .informationSubmit-text{ + position: absolute; + top: 42%; + } + } diff --git a/pages/list/list.vue b/pages/list/list.vue index 59ae990..7814121 100644 --- a/pages/list/list.vue +++ b/pages/list/list.vue @@ -12,7 +12,7 @@ 筛选状态 - + - + - - - + + + - 2022-10-2912:25:00 - 202210290001 - 张三 + {{item.time}} + {{item.number}} + {{item.name}} - - - + + + + + + + 确认将所有访客表单导出吗? + + + + 取消 + + + 确认 + + + + + + + + 单号{{number}}访客申请{{text}} + + + + 取消 + + + 确认 + + + + diff --git a/pages.json b/pages.json index f9ba655..302ed83 100644 --- a/pages.json +++ b/pages.json @@ -76,6 +76,14 @@ "navigationBarTitleText": "信息查看", "enablePullDownRefresh": false } + }, + { + "path" : "pages/info/info", + "style" : + { + "navigationBarTitleText": "信息查看", + "enablePullDownRefresh": false + } } ], "globalStyle": { diff --git a/pages/info/info.vue b/pages/info/info.vue new file mode 100644 index 0000000..4f5b443 --- /dev/null +++ b/pages/info/info.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/pages/information/information.vue b/pages/information/information.vue index 1a03a22..4f7ea5c 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -1,6 +1,6 @@ @@ -43,19 +70,93 @@ contact: '', purpose: '', building: '', - time: '', + time: Number(new Date()), number: '', name: '', - bz: '' + bz: '', + endTime:Number(new Date()) + 1000 }, - rules:{}, + rules:{ + callerNmae:[{ + required: true, + message: '请填写访客姓名', + trigger: ['blur', 'change'], + }], + id:[{ + required: true, + message: '请填写访客身份证', + trigger: ['blur', 'change'], + }], + contact:[{ + required: true, + message: '请填写访客联系方式', + trigger: ['blur', 'change'], + }], + number:[{ + required: true, + message: '请填写申请者工号', + trigger: ['blur', 'change'], + }] + }, show:false, + isForm:true, + isTimeShow:false, buildingShow:false, columns:[['商务会议','安装维修','其他事宜']], buildingColumns:[['一期主楼','二期主楼','录制楼','1600演播厅']] } }, + onLoad(){ + this.callerInfo.time = this.shijianc(this.callerInfo.time) + this.callerInfo.endTime = this.shijianc(this.callerInfo.endTime) + }, methods:{ + //点击提交访客记录 + async submit(){ + if(this.isForm){ + this.isForm = false + }else { + wx.switchTab({ + url: `/pages/index/index`, + }); + this.isForm = true + } + }, + async changeTime(e){ + this.callerInfo.endTime = await this.shijianc(e.value) + }, + //确定选择时间 + async confirmTime(e){ + this.callerInfo.endTime = await this.shijianc(e.value) + this.isTimeShow = false + }, + //取消选择时间 + closeTime(){ + this.isTimeShow = false + }, + shijianc(time) { + let date = new Date(time) + let Y = date.getFullYear() + '-' + let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-' + let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ' + let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':' + let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':' + let s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()) + return Y + M + D + h + m + s + }, + //格式化时间 + formatter(type, value) { + if (type === 'year') { + return `${value}年` + } + if (type === 'month') { + return `${value}月` + } + if (type === 'day') { + return `${value}日` + } + return value + }, getPurpose(val){ this.callerInfo.purpose = val.value[0] this.show = false @@ -73,4 +174,24 @@ .information{ padding: 52rpx; } + .informationSubmit{ + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 680rpx; + .informationSubmit-box{ + display: flex; + justify-content: center; + align-items: center; + border-radius: 150rpx; + width: 300rpx; + height: 300rpx; + background-color: #0ade13; + } + .informationSubmit-text{ + position: absolute; + top: 42%; + } + } diff --git a/pages/list/list.vue b/pages/list/list.vue index 59ae990..7814121 100644 --- a/pages/list/list.vue +++ b/pages/list/list.vue @@ -12,7 +12,7 @@ 筛选状态 - + - + - - - + + + - 2022-10-2912:25:00 - 202210290001 - 张三 + {{item.time}} + {{item.number}} + {{item.name}} - - - + + + + + + + 确认将所有访客表单导出吗? + + + + 取消 + + + 确认 + + + + + + + + 单号{{number}}访客申请{{text}} + + + + 取消 + + + 确认 + + + + diff --git a/pages/register/register.vue b/pages/register/register.vue index 97da986..8ce6117 100644 --- a/pages/register/register.vue +++ b/pages/register/register.vue @@ -23,12 +23,6 @@ {{form.phone || '获取手机号'}} - - - - - - 已有账号,点击登录 @@ -147,11 +141,14 @@ fontSize: 24 }, list: [{ - name: '正式员工' + name: '广播电视台员工' }, { - name: '暂时员工' - } + name: '广播电视台员工' + }, + { + name: '网络有限公司员工' + }, ], show: false, sqShow: false, @@ -214,7 +211,6 @@ }, //选中员工类型 sexSelect(e) { - this.hideKeyBorder() setTimeout(() => { this.form.type = e.name }, 30) @@ -240,7 +236,6 @@ font-weight: 500; margin-bottom: 32rpx; } - .form-item { // white-space: nowrap; width: 390rpx;