| | |
| | | <text>*</text> |
| | | </view> |
| | | <view class="list_item_content" @click="showName = true"> |
| | | <text :style="{color: form1.name ? '#000000' : ''}">{{form1.name ? form1.name : '请选择'}}</text> |
| | | <text :style="{color: form1.receptMemberName ? '#000000' : ''}">{{form1.receptMemberName ? form1.receptMemberName : '请选择'}}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="list_item" v-if="accessControl === '1'" @click="show = true"> |
| | | <!-- <view class="list_item" v-if="accessControl === '1'" @click="show = true"> |
| | | <view class="list_item_label"> |
| | | <text>访问门禁</text> |
| | | <text>*</text> |
| | | </view> |
| | | <!-- @click="show6 = true" --> |
| | | <view class="list_item_content"> |
| | | <text :style="{color: form1.doorSelectName ? '#000000' : ''}">{{form1.doorSelectName ? form1.doorSelectName : '请选择'}}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <div class="empty"></div> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>拜访事由</text> |
| | | <text>*</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input type="text" v-model="form1.reason" placeholder="请输入来访事由" placeholder-style="color: #999999;" /> |
| | | <view class="list_item_content" @click="showReason = true"> |
| | | <text :style="{color: form1.reason ? '#000000' : ''}">{{form1.reason ? form1.reason : '请选择拜访事由'}}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | |
| | | <switch color="#4e99a9" style="transform:scale(0.8)" @change="constructionChange" /> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view v-if="form1.type == '1'" class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>施工内容</text> |
| | | <text>*</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input type="text" v-model="form1.ss" placeholder="请输入施工内容" placeholder-style="color: #999999;" /> |
| | | <input type="text" v-model="form1.constructionReason" placeholder="请输入施工内容" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="cate"> |
| | | <view class="cate_head">车辆信息</view> |
| | | <view class="cate_list"> |
| | | <view class="cate_list_item" v-for="(item, index) in cars" :key="index"> |
| | | <text>{{item}}</text> |
| | | <u-icon name="close" color="#999999" size="20" @click="deleCars(index)"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="cate_add" @click="show2 = true">+添加车辆</view> |
| | | </view> --> |
| | | <view class="cate"> |
| | | <view class="cate_head">随访人员信息</view> |
| | | <view class="cate_list"> |
| | | <view class="cate_list_item" v-for="(item,index) in personnel" :key="index"> |
| | | <text>{{item.name}}</text> |
| | | <u-icon name="close" color="#999999" size="20" @click="deleUser(index)"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="cate_add" @click="show3 = true">+添加随访人员</view> |
| | | </view> |
| | | <view class="zw"></view> |
| | | <view class="footer"> |
| | | <view class="footer_btn" @click="submit">提交</view> |
| | | <view class="footer_btn" @click="onSubmit">提交</view> |
| | | </view> |
| | | <!-- 入场时间 --> |
| | | <u-datetime-picker |
| | |
| | | :minDate="new Date().getTime()" |
| | | mode="datetime" |
| | | @cancel="show4 = false" |
| | | @confirm="setinDate" |
| | | @confirm="setstarttime" |
| | | ></u-datetime-picker> |
| | | <!-- 离场时间 --> |
| | | <u-datetime-picker |
| | |
| | | :minDate="formatTimeStamp(form1.starttime)" |
| | | mode="datetime" |
| | | @cancel="show5 = false" |
| | | @confirm="setoutDate" |
| | | @confirm="setendtime" |
| | | ></u-datetime-picker> |
| | | <!-- 门禁 --> |
| | | <u-popup :show="show" :round="10" :safeAreaInsetBottom="true" :closeable="true" mode="bottom" @close="closeMJ"> |
| | |
| | | </view> |
| | | </u-popup> |
| | | <u-picker keyName="name" :show="show6" :columns="columns1" @confirm="seleIdcard" @cancel="show6 = false"></u-picker> |
| | | <u-picker keyName="name" :show="showName" :columns="columnsNames" @confirm="selectedName" @cancel="showName = false"></u-picker> |
| | | <u-picker keyName="name" :show="showName" :columns="VisitPoeple" @confirm="selectedName" @cancel="showName = false"></u-picker> |
| | | <u-picker keyName="title" :show="showReason" :columns="VisitReason" @confirm="selectedReason" @cancel="showReason = false"></u-picker> |
| | | <!-- <tly-picture-cut ref="tlyPictureCut" :pictureSrc="photoSrc" @createImg="uploadImg"></tly-picture-cut> --> |
| | | <keyboardInput ref="keyboard" @export="setPlate" @close="closeInput" /> |
| | | <qf-image-cropper ref="cropper" :width="280" :height="280" :radius="30" @crop="uploadImg"></qf-image-cropper> |
| | |
| | | import keyboardInput from "@/components/keyboard-input/keyboard-input.vue"; |
| | | import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue'; |
| | | import { getDaysAfterDate } from '@/utils/utils.js' |
| | | import { |
| | | getVisitedMember, |
| | | getSystemDictData, |
| | | getVisitedVisitReason, |
| | | createFk |
| | | } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | show5: false, |
| | | show6: false, |
| | | show7: false, |
| | | showReason: false, |
| | | fileList: [], |
| | | columns1: [ |
| | | [{name: '身份证', id: 0}, {name: '港澳证件', id: 1},{name: '护照', id: 2}], |
| | | ], |
| | | columnsNames: [ |
| | | [{name: '张三', id: 0},{name: '张三', id: 1},{name: '张三', id: 2},] |
| | | ], |
| | | VisitReason: [], |
| | | VisitPoeple: [], |
| | | columns: [], |
| | | cars: [], |
| | | day: null, |
| | |
| | | doors: '', |
| | | doorSelectName: '', |
| | | reason: '', |
| | | carNos: '' |
| | | carNos: '', |
| | | type: 0 |
| | | }, |
| | | withUserList: { |
| | | name: '', |
| | |
| | | if (options.data) { |
| | | this.form = JSON.parse(options.data) |
| | | } |
| | | console.log('this.form', this.form); |
| | | // this.getvisit() |
| | | // this.getVisit1() |
| | | // this.getUserValid() |
| | | this.getUser() |
| | | }, |
| | | methods: { |
| | | openInput(type) { |
| | |
| | | }, |
| | | constructionChange(e) { |
| | | console.log(e.detail.value); |
| | | this.form1.type = Number(e.detail.value) |
| | | console.log(this.form1.type); |
| | | }, |
| | | uploadImg(file) { |
| | | this.$refs.cropper.close() |
| | |
| | | item.active = false |
| | | }) |
| | | }, |
| | | submit() { |
| | | onSubmit() { |
| | | if (!this.form1.receptMemberId) return uni.showToast({ |
| | | title: '请填写有效的访问人', |
| | | icon: 'none' |
| | |
| | | let data = JSON.parse(JSON.stringify(this.form1)) |
| | | data.starttime = data.starttime + ':00' |
| | | data.endtime = data.endtime + ':00' |
| | | this.$u.api.createFk({ |
| | | createFk({ |
| | | ...this.form, |
| | | ...data, |
| | | openid: this.$store.state.openId, |
| | |
| | | } |
| | | }) |
| | | // 起始时间时长 |
| | | this.$u.api.getSystemDictData({ |
| | | getSystemDictData({ |
| | | dictCode: 'VISIT_CONFIG', |
| | | label: 'VALIDATE_VISIT' |
| | | }).then(res => { |
| | |
| | | this.show6 = false |
| | | }, |
| | | selectedName(e) { |
| | | this.form1.name = e.value[0].name |
| | | this.form1.id = e.value[0].id |
| | | this.form1.receptMemberName = e.value[0].name |
| | | this.form1.receptMemberId = e.value[0].id |
| | | this.form1.receptMemberDepartment = e.value[0].companyId |
| | | this.showName = false |
| | | }, |
| | | selectedReason(e) { |
| | | this.form1.reason = e.value[0].title |
| | | console.log(e.value[0].title); |
| | | this.showReason = false |
| | | }, |
| | | submitCart() { |
| | | if (!this.carName) return uni.showToast({ |
| | |
| | | }) |
| | | this.show5 = true |
| | | }, |
| | | setinDate(e) { |
| | | setstarttime(e) { |
| | | this.form1.starttime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM'); |
| | | // this.maxTime = getDaysAfterDate(uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM'), this.day) |
| | | this.maxTime = this.form1.starttime |
| | | console.log(this.form1.starttime); |
| | | this.show4 = false |
| | | }, |
| | | setoutDate(e) { |
| | | setendtime(e) { |
| | | this.form1.endtime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM'); |
| | | this.show5 = false |
| | | }, |
| | |
| | | }, |
| | | // 查询用户 |
| | | getUser() { |
| | | if (this.verify === '0') { |
| | | if (this.form1.phone1) { |
| | | this.$u.api.getVisitedMember({ |
| | | mobile: this.form1.phone1 |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.form1.receptMemberId = res.data.id |
| | | this.form1.receptMemberName = res.data.name |
| | | } |
| | | getVisitedMember().then(res => { |
| | | this.VisitPoeple = [res.data || []] |
| | | }) |
| | | } |
| | | } else { |
| | | if (this.form1.phone1 && this.form1.receptMemberName) { |
| | | this.$u.api.getVisitedMember({ |
| | | mobile: this.form1.phone1, |
| | | name: this.form1.receptMemberName |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.form1.receptMemberId = res.data.id |
| | | this.form1.receptMemberName = res.data.name |
| | | } |
| | | getVisitedVisitReason({}).then(res => { |
| | | this.VisitReason = [res.data || []] |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | // 被拜访人信息校验方式(0手机号单独校验 1手机号和姓名组合校验) |
| | | getUserValid() { |
| | | this.$u.api.getSystemDictData({ |
| | | getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | | label: 'BEVISITED_USER_VALID' |
| | | }).then(res => { |
| | |
| | | }, |
| | | // 获取是否需要选择门禁/门禁列表 |
| | | getvisit() { |
| | | this.$u.api.getSystemDictData({ |
| | | getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | | label: 'SELECT_DOORS_VISIT_REQUIRED' |
| | | }).then(res => { |