| | |
| | | <text>*</text> |
| | | <text>被访人姓名</text> |
| | | </view> |
| | | <view class="list_item_content" @click="showName = true"> |
| | | <!-- <view class="list_item_content" @click="showName = true"> --> |
| | | <view class="list_item_content"> |
| | | <text :style="{ color: form1.receptMemberName ? '#000000' : '' }">{{ |
| | | form1.receptMemberName |
| | | ? form1.receptMemberName + " " + form1.receptCompanyName |
| | | : "请选择" |
| | | }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | <!-- <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> --> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item" @click="isShowReason = true"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>来访事由</text> |
| | | </view> |
| | | <view class="list_item_content" |
| | | <view class="list_item_content"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: form1.reason ? '#000000' : '#999999' }" |
| | | >{{ form1.reason ? form1.reason : "请选择" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | <!-- <view class="list_item_content" |
| | | ><input |
| | | type="text" |
| | | v-model="form1.reason" |
| | | placeholder="请输入来访事由" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | /></view> --> |
| | | </view> |
| | | </view> |
| | | <view class="zw"></view> |
| | |
| | | :show="show4" |
| | | :minDate="new Date().getTime()" |
| | | mode="datetime" |
| | | :formatter="formatter" |
| | | @cancel="show4 = false" |
| | | @confirm="setinDate" |
| | | ></u-datetime-picker> |
| | |
| | | <u-datetime-picker |
| | | v-if="form1.starttime" |
| | | :show="show5" |
| | | :formatter="formatter" |
| | | :minDate="formatTimeStamp(form1.starttime)" |
| | | :maxDate="formatTimeStamp(maxTime)" |
| | | mode="datetime" |
| | |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <!-- 来访是由 --> |
| | | <u-picker |
| | | keyName="title" |
| | | :show="isShowReason" |
| | | closeOnClickOverlay |
| | | :columns="reasonList" |
| | | @confirm="reasonSel" |
| | | @close="isShowReason = false" |
| | | @cancel="isShowReason = false" |
| | | ></u-picker> |
| | | |
| | | <u-picker |
| | | keyName="name" |
| | | :show="showName" |
| | |
| | | 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 { createVisit, getVisitedMember } from '@/api' |
| | | import { createVisit, getVisitedMember, getVisitReason } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | show4: false, |
| | | show5: false, |
| | | show7: false, |
| | | isShowReason: false, |
| | | showName: false, |
| | | fileList: [], |
| | | reasonList: [], |
| | | memberList: [[{ name: '身份证', id: 0 }, { name: '港澳证件', id: 1 }, { name: '护照', id: 2 }]], |
| | | columnsNames: [[{ name: '张三', id: 0 }, { name: '张三', id: 1 }, { name: '张三', id: 2 }]], |
| | | columns: [], |
| | |
| | | const userInfo = uni.getStorageSync('userInfo') || {} |
| | | this.$set(this.form1, 'receptMemberName', userInfo.realname) |
| | | this.$set(this.form1, 'receptMemberId', userInfo.id || '') |
| | | this.$set(this.form1, 'receptCompanyName', userInfo.company.companyName || '') |
| | | this.$set(this.form1, 'receptCompanyName', userInfo.company.name || '') |
| | | // this.getvisit() |
| | | // this.getVisit1() |
| | | // this.getUserValid() |
| | | }, |
| | | methods: { |
| | | formatter(type, value) { |
| | | if (type === 'year') { |
| | | return `${value}年` |
| | | } |
| | | if (type === 'month') { |
| | | return `${value}月` |
| | | } |
| | | if (type === 'day') { |
| | | return `${value}日` |
| | | } |
| | | if (type === 'hour') { |
| | | return `${value}时` |
| | | } |
| | | if (type === 'minute') { |
| | | return `${value}分` |
| | | } |
| | | return value |
| | | }, |
| | | openInput(type) { |
| | | this.inputType = type |
| | | this.$refs.keyboard.open() |
| | |
| | | this.$set(this.form1, 'receptCompanyName', e.value[0].companyName) |
| | | this.showName = false |
| | | }, |
| | | reasonSel(e) { |
| | | console.log('e',e); |
| | | this.$set(this.form1, 'reason', e.value[0].title) |
| | | this.isShowReason = false |
| | | }, |
| | | getUser() { |
| | | getVisitedMember().then(res => { |
| | | this.memberList = [res.data || []] |
| | | }) |
| | | getVisitReason().then(res => { |
| | | this.reasonList = [res.data || []] |
| | | }) |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close() |
| | |
| | | title: '手机号不能为空', |
| | | icon: 'none' |
| | | }) |
| | | var re = /^1[3,4,5,6,7,8,9][0-9]{9}$/; |
| | | var result = re.test(this.form1.phone); |
| | | if (!result) return uni.showToast({ |
| | | title: '手机号格式不正确', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.companyName) return uni.showToast({ |
| | | title: '来访单位不能为空', |
| | | icon: 'none' |
| | |
| | | padding: 0 30rpx; |
| | | padding-bottom: env(safe-area-inset-bottom); |
| | | box-sizing: border-box; |
| | | position: fixed; |
| | | left: 0; |
| | | bottom: 68rpx; |
| | | |
| | | margin-top: 80rpx; |
| | | .footer_btn { |
| | | width: 100%; |
| | | height: 88rpx; |