Merge remote-tracking branch 'origin/master'
| | |
| | | method: 'get', |
| | | data |
| | | }) |
| | | } |
| | | // åéçä¿¡éªè¯ç |
| | | export const sendSms = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/smsEmail/sendSms', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | // login |
| | | export const loginPost = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/member/accountLogin', |
| | | url: '/loginH5', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | export const loginCaptcha = () => { |
| | | return http({ |
| | | url: '/captcha', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | export const getUserInfo = () => { |
| | | return http({ |
| | | url: '/getUserInfo', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // æ¥è¯¢äººåç¸å
³ä¿¡æ¯0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå,示ä¾å¼(1) |
| | | export const findTypeMemberInfo = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/member/findTypeMemberInfo', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // éç½®å¯ç |
| | | export const resetPassword = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/visits/resetPassword', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // ä¿®æ¹å¯ç |
| | | export const uploadPassword = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/member/updatePwd', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // loginout |
| | | export const logoutPost = (data) => { |
| | | return http({ |
| | | url: '/logout', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 鿣鿿 å建 |
| | | export const DangerCreate = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/hiddenDanger/create', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 鿣åºå |
| | | export const DangerArea = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/hiddenDanger/create', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 鿣 ç±»å |
| | | export const DangerConfigType = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/hiddenDangerParam/list', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 鿣 æ¥è¯¢åºåå
å®å
¨å |
| | | export const findHiddenAreaMemberList = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/hiddenDangerParam/findHiddenAreaMemberList', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // è½¦è¾ å表 |
| | | export const getCarsList = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/cars/list', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // æ¥è¯¢è½¦è¾å¯é¢çº¦æ¶æ®µ |
| | | export const carCanReservationDate = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/carUseBook/carCanReservationDate', |
| | | method: 'get', |
| | | data |
| | | }) |
| | | } |
| | | // æ¥è¯¢è½¦è¾ é¢çº¦è®°å½ |
| | | export const carUseBookList = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/carUseBook/carUseBookList', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // ç¨è½¦ç³è¯·æäº¤ |
| | | export const carUseBookCraete = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/carUseBook/create', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // ä»»å¡ä¸å¿ |
| | | export const taskCenter = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/member/taskCenter', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // æ¥è¯¢è½¦è¾ æ´¾è½¦è®°å½ |
| | | export const carUseBookPaiche = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/carUseBook/page', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | data |
| | | }) |
| | | } |
| | | // 访客æ¥å¤ |
| | | export const createVisit = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/visits/createVisit', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // æ¥è¯¢è¢«è®¿äººå表 |
| | | export const getVisitedMember = (data) => { |
| | | return http({ |
| | |
| | | }) |
| | | } |
| | | Vue.prototype.$goBack = () => { uni.navigateBack() } |
| | | Vue.prototype.$eventBus = new Vue() |
| | | Vue.prototype.$onWait = new Promise((resolve) => { |
| | | Vue.prototype.$reslove = resolve |
| | | }) |
| | |
| | | "easycom": {
|
| | | "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
| | | },
|
| | | "pages": [ |
| | | { |
| | | "path": "pages/index/index", |
| | | "style": { |
| | | "navigationBarTitleText": "访客ä¸å¿", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | "pages": [
|
| | | {
|
| | | "path": "pages/index/index",
|
| | | "style": {
|
| | | "navigationBarTitleText": "访客ä¸å¿",
|
| | | "enablePullDownRefresh": false
|
| | | }
|
| | | },
|
| | | {
|
| | | "path": "pages/notice/notice",
|
| | | "style": {
|
| | |
| | | }
|
| | |
|
| | | }, {
|
| | | "path": "pages/staff/sendACar",
|
| | | "path": "pages/staff/vehicle/sendACar",
|
| | | "style": {
|
| | | "navigationBarTitleText": "派车记å½",
|
| | | "enablePullDownRefresh": false
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | ,{
|
| | | "path" : "pages/staffLogin/forgetPsd",
|
| | | "style" : |
| | | {
|
| | | "navigationBarTitleText": "æ¾åå¯ç ",
|
| | | "enablePullDownRefresh": false
|
| | | }
|
| | | |
| | | }
|
| | | ,{
|
| | | "path" : "pages/staff/snapshotResult",
|
| | | "style" : |
| | | {
|
| | | "navigationBarTitleText": "鿣鿿",
|
| | | "enablePullDownRefresh": false
|
| | | }
|
| | | |
| | | }
|
| | | ,{
|
| | | "path" : "pages/staff/vehicle/applePeo",
|
| | | "style" : |
| | | {
|
| | | "navigationBarTitleText": "éæ©äººå",
|
| | | "enablePullDownRefresh": false
|
| | | }
|
| | | |
| | | }
|
| | | ],
|
| | | "subPackages": [{
|
| | | "root": "n_pages",
|
| | |
| | | (item.selAnswer && |
| | | item.answer === item.selAnswer && |
| | | item.selAnswer == line.code) || |
| | | item.selAnswer == line.code |
| | | (item.selAnswer == line.code && status != '2') || |
| | | (item.answer === item.selAnswer && |
| | | item.selAnswer == line.code) |
| | | " |
| | | /> |
| | | <image |
| | |
| | | (item.selAnswer && |
| | | item.answer === item.selAnswer && |
| | | item.selAnswer == line.code) || |
| | | item.selAnswer == line.code |
| | | (item.selAnswer == line.code && status != '2') || |
| | | (item.answer === item.selAnswer && |
| | | item.selAnswer == line.code) |
| | | " |
| | | style="color: rgba(2, 94, 239, 1)" |
| | | ><text class="mr24" style="color: rgba(2, 94, 239, 1)">{{ |
| | |
| | | <text |
| | | v-if=" |
| | | item.selAnswer && |
| | | item.selAnswer == line.code && |
| | | item.answer !== item.selAnswer && |
| | | status == '2' |
| | | " |
| | |
| | | " |
| | | > |
| | | <image src="@/static/meeting/icon/ic_choose_sel@2x.png" /> |
| | | <text>åçæ£ç¡®</text> |
| | | <text class="success">åçæ£ç¡®</text> |
| | | </view> |
| | | </template> |
| | | <template v-if="item.type == 2"> |
| | |
| | | <image src="@/static/checkbox@2x.png" v-if="!line.checked" /> |
| | | <image |
| | | src="@/static/checkbo1x_sel@2x.png" |
| | | v-if="line.checked || (item.selAnswer === item.answer && line.checked)" |
| | | v-if=" |
| | | (line.checked && status != '2') || |
| | | (item.selAnswer === item.answer && |
| | | line.checked && |
| | | status != '2') |
| | | " |
| | | /> |
| | | <image |
| | | src="@/static/checkbox_wrong@2x.png" |
| | |
| | | status == '2' |
| | | " |
| | | /> |
| | | <text v-if="!item.selAnswer || item.selAnswer !== line.code" |
| | | <text v-if="!line.checked" |
| | | ><text class="mr24">{{ line.code }}</text> |
| | | {{ line.value }}</text |
| | | > |
| | | <text |
| | | v-if=" |
| | | (item.selAnswer && |
| | | item.answer === item.selAnswer && |
| | | item.selAnswer == line.code) || |
| | | item.selAnswer == line.code |
| | | (line.checked && status != '2') || |
| | | (item.selAnswer === item.answer && |
| | | line.checked && |
| | | status != '2') |
| | | " |
| | | style="color: rgba(2, 94, 239, 1)" |
| | | ><text class="mr24" style="color: rgba(2, 94, 239, 1)">{{ |
| | |
| | | > |
| | | <text |
| | | v-if=" |
| | | item.selAnswer && |
| | | item.answer !== item.selAnswer && |
| | | line.checked && |
| | | item.selAnswer !== item.answer && |
| | | status == '2' |
| | | " |
| | | style="color: rgba(237, 69, 69, 1)" |
| | |
| | | " |
| | | > |
| | | <image src="@/static/meeting/icon/ic_choose_sel@2x.png" /> |
| | | <text>åçæ£ç¡®</text> |
| | | <text class="success">åçæ£ç¡®</text> |
| | | </view> |
| | | </template> |
| | | </view> |
| | |
| | | v-if="status == '2'" |
| | | style="background-color: #db534c" |
| | | class="box_list_answer_btn" |
| | | @click="status = '0'" |
| | | @click="handleAgain" |
| | | >çé¢å¤±è´¥ï¼åæ¥ä¸æ¬¡</view |
| | | > |
| | | <!-- å¤é --> |
| | |
| | | this.list.forEach((item, i) => { |
| | | if (index === i) { |
| | | item.options.forEach((item2, j) => { |
| | | if(j === jeck){ |
| | | if (j === jeck) { |
| | | item2.checked = !item2.checked |
| | | } |
| | | }) |
| | |
| | | } else { |
| | | this.status = '1' |
| | | } |
| | | }, |
| | | handleAgain() { |
| | | this.status = '0' |
| | | this.getProblems() |
| | | }, |
| | | next() { |
| | | uni.navigateTo({ |
| | |
| | | color: #e42d2d; |
| | | margin-left: 16rpx; |
| | | } |
| | | .success { |
| | | color: #275de6; |
| | | } |
| | | } |
| | | } |
| | | .list_item { |
| | |
| | | if (this.total > 10) { |
| | | this.getList() |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | handleDetail(id) { |
| | |
| | | <text>*</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input type="number" maxlength="11" placeholder="请è¾å
¥æ§å¯ç " placeholder-style="color: #999999;" /> |
| | | <input type="password" v-model="param.oldPwd" :maxlength="32" placeholder="请è¾å
¥æ§å¯ç " placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | |
| | | <text>*</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input type="number" maxlength="11" placeholder="请è¾å
¥6-18使°åã忝ç»å" placeholder-style="color: #999999;" /> |
| | | <input type="password" v-model="param.newPwd" :maxlength="32" placeholder="请è¾å
¥6-18使°åã忝ç»å" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | |
| | | <text>*</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input type="number" maxlength="11" placeholder="请åè¾ä¸æ¬¡æ°å¯ç " placeholder-style="color: #999999;" /> |
| | | <input type="password" v-model="param.newPwdTemp" :maxlength="32" placeholder="请åè¾ä¸æ¬¡æ°å¯ç " placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <text>å¦å¯ç éå¿ï¼è¯·èç³»ååºç³»ç»ç®¡çåéç½®</text> |
| | | </view> |
| | | <view class="footer-box"> |
| | | <view class="submit-button">æäº¤</view> |
| | | <view class="submit-button" @click="onSubmit">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { uploadPassword } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | param: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | const { param } = this |
| | | if (!param.oldPwd) return uni.showToast({ |
| | | title: 'æ§å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.newPwd) return uni.showToast({ |
| | | title: 'æ°å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.newPwdTemp) return uni.showToast({ |
| | | title: '确认å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (param.newPwdTemp != param.newPwd) return uni.showToast({ |
| | | title: '两次è¾å
¥å¯ç ä¸ä¸è´', |
| | | icon: 'none' |
| | | }) |
| | | uploadPassword({ |
| | | ...param |
| | | }).then(res => { |
| | | if (res && res.code == 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: 'å¯ç ä¿®æ¹æå,è¯·éæ°ç»å½', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | uni.redirectTo({ |
| | | url: "/pages/staffLogin/login" |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="title_wrap"> |
| | | <view class="name">æææï¼æ¬¢è¿ç»å½ï½</view> |
| | | <view class="name">{{ userInfo.realname || '' }}ï¼æ¬¢è¿ç»å½ï½</view> |
| | | <view class="btn" @click="loginOut">éåºç»å½</view> |
| | | </view> |
| | | <view class="banner_wrap"> |
| | |
| | | <view class="h1">æçä¼è®®æ¥å</view> |
| | | <view class="h2">MY MEETING CALENDAR</view> |
| | | </view> |
| | | <view class="img_wrap" @click="jump('/pages/staff/sendACar')"> |
| | | <view class="img_wrap" @click="jump('/pages/staff/vehicle/sendACar')"> |
| | | <image class="img" src="@/static/staff/ic_paichejilu.png"></image> |
| | | <view class="h1">派车记å½</view> |
| | | <view class="h2">VEHICLE DISPATCH</view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { logoutPost } from '@/api' |
| | | export default { |
| | | data() { |
| | | return {}; |
| | | return { |
| | | userInfo: uni.getStorageSync('userInfo') |
| | | }; |
| | | }, |
| | | onLoad(){ |
| | | console.log('userInfo', this.userInfo); |
| | | }, |
| | | methods: { |
| | | jump(path){ |
| | |
| | | }); |
| | | }, |
| | | loginOut() { |
| | | uni.clearStorageSync() |
| | | this.$store.commit('empty') |
| | | logoutPost() |
| | | uni.redirectTo({ |
| | | url: '/pages/staffLogin/login' |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="search_inp df_ac"> |
| | | <image class="mr12 search" src="../../static/ic_search@2x.png" mode="widthFix"></image> |
| | | <input v-model="param.name" @blur="initData()" type="text" placeholder="æç´¢" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | <view class="member_list"> |
| | | <view v-for="item in memberList" :key="item.id" class="line"> |
| | | <image :src="item.faceImgFull ? item.faceImgFull : require('@/static/logo@2x.png')" class="avatar" mode=""></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">{{ item.name }}</text> |
| | | <!-- <text class="tag">tag</text> --> |
| | | </view> |
| | | <view class="depart">{{ item.companyName }}</view> |
| | | </view> |
| | | <checkbox class="checkbox" /> |
| | | <text></text> |
| | | </view> |
| | | <view class="empty"></view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="sub_wrap"> |
| | | <view class="sel_mem"> |
| | | <text>已鿩ï¼</text> |
| | | <view class="members"> |
| | | <text v-for="(item, i) in 100" :key="i">{{ item }}</text> |
| | | </view> |
| | | <image @click="isShowSelMem = true" class="open_icon" src="../../static/staff/renyuan_ic_open.png" mode=""></image> |
| | | </view> |
| | | <view class="btn" @click="onSubmit">确认(00/20)</view> |
| | | </view> |
| | | <!-- --> |
| | | <u-popup :show="isShowSelMem" :round="12" mode="bottom" @close="isShowSelMem = false"> |
| | | <view class="modal"> |
| | | <view class="modal_header"> |
| | | <text class="status">已鿩ï¼xx人</text> |
| | | <text class="btn" @click="isShowSelMem = false">确认</text> |
| | | </view> |
| | | <view class="modal_mem_list"> |
| | | <view class="line"> |
| | | <image src="../../static/logo@2x.png" class="avatar" mode=""></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">name</text> |
| | | </view> |
| | | <view class="depart">xxç§å®¤</view> |
| | | </view> |
| | | <view class="btn">ç§»é¤</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { findHiddenAreaMemberList } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | memberList: [], |
| | | selList: [], |
| | | param: {}, |
| | | |
| | | isShowSelMem: false |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | uni.navigateBack() |
| | | }, |
| | | initData() { |
| | | const { param } = this |
| | | findHiddenAreaMemberList({ |
| | | name: param.name |
| | | }).then(res => { |
| | | this.memberList = res.data || [] |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .modal { |
| | | padding: 40rpx 30rpx; |
| | | .modal_header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .status { |
| | | font-weight: 600; |
| | | } |
| | | .btn { |
| | | color: #279baa; |
| | | } |
| | | } |
| | | .modal_mem_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .btn{ |
| | | width: 80rpx; |
| | | height: 48rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #999999; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .sub_wrap { |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2; |
| | | padding: 30rpx 30rpx 64rpx; |
| | | .sel_mem { |
| | | display: flex; |
| | | align-items: center; |
| | | .members { |
| | | width: 500rpx; |
| | | color: #4d98a7; |
| | | white-space: nowrap; |
| | | overflow: hidden; //ææ¬è¶
åºéè |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | } |
| | | .open_icon { |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | } |
| | | } |
| | | .btn { |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | background: #279baa; |
| | | border-radius: 44rpx; |
| | | color: #fff; |
| | | text-align: center; |
| | | margin-top: 22rpx; |
| | | } |
| | | } |
| | | .member_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | .tag { |
| | | font-size: 24rpx; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #f62710; |
| | | color: #f62710; |
| | | padding: 0rpx 6rpx; |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .empty { |
| | | width: 100%; |
| | | height: 280rpx; |
| | | } |
| | | } |
| | | .search_inp { |
| | | height: 72rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 4rpx; |
| | | padding-left: 16rpx; |
| | | .search{ |
| | | width: 28rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="search_inp df_ac"> |
| | | <image class="mr12 search" src="../../static/ic_search@2x.png" mode="widthFix"></image> |
| | | <input type="text" placeholder="æç´¢" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | <view class="member_list"> |
| | | <view class="line"> |
| | | <image src="../../static/logo@2x.png" class="avatar" mode=""></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">name</text> |
| | | <text class="tag">tag</text> |
| | | </view> |
| | | <view class="depart">xxç§å®¤</view> |
| | | </view> |
| | | <checkbox class="checkbox" /> |
| | | <text></text> |
| | | </view> |
| | | <view class="empty"></view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="sub_wrap"> |
| | | <view class="sel_mem"> |
| | | <text>已鿩ï¼</text> |
| | | <view class="members"> |
| | | <text v-for="(item, i) in 100" :key="i">{{ item }}</text> |
| | | </view> |
| | | <image @click="isShowSelMem = true" class="open_icon" src="../../static/staff/renyuan_ic_open.png" mode=""></image> |
| | | </view> |
| | | <view class="btn" @click="onSubmit">确认(00/20)</view> |
| | | </view> |
| | | <!-- --> |
| | | <u-popup :show="isShowSelMem" :round="12" mode="bottom" @close="isShowSelMem = false"> |
| | | <view class="modal"> |
| | | <view class="modal_header"> |
| | | <text class="status">已鿩ï¼xx人</text> |
| | | <text class="btn" @click="isShowSelMem = false">确认</text> |
| | | </view> |
| | | <view class="modal_mem_list"> |
| | | <view class="line"> |
| | | <image src="../../static/logo@2x.png" class="avatar" mode=""></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">name</text> |
| | | </view> |
| | | <view class="depart">xxç§å®¤</view> |
| | | </view> |
| | | <view class="btn">ç§»é¤</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | |
| | | </view> |
| | | <view class="main_app"> |
| | | <view class="search_inp df_ac"> |
| | | <image |
| | | class="mr12 search" |
| | | src="../../static/ic_search@2x.png" |
| | | mode="widthFix" |
| | | ></image> |
| | | <input |
| | | v-model="param.name" |
| | | @blur="initData()" |
| | | type="text" |
| | | placeholder="æç´¢" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | <view class="member_list"> |
| | | <checkbox-group @change="changeMem"> |
| | | <view v-for="item in memberList" :key="item.id" class="line"> |
| | | <image |
| | | :src=" |
| | | item.faceImgFull |
| | | ? item.faceImgFull |
| | | : require('@/static/logo@2x.png') |
| | | " |
| | | class="avatar" |
| | | mode="" |
| | | ></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">{{ item.name }}</text> |
| | | <!-- <text class="tag">tag</text> --> |
| | | </view> |
| | | <view class="depart">{{ item.companyName }}</view> |
| | | </view> |
| | | <label> |
| | | <checkbox |
| | | :value="String(item.id)" |
| | | class="checkbox" |
| | | /> |
| | | </label> |
| | | <text></text> |
| | | </view> |
| | | </checkbox-group> |
| | | <view class="empty"></view> |
| | | </view> |
| | | <!-- --> |
| | | <!-- <view class="sub_wrap"> |
| | | <view class="sel_mem"> |
| | | <text>已鿩ï¼</text> |
| | | <view class="members"> |
| | | <text v-for="(item, i) in 100" :key="i">{{ item }}</text> |
| | | </view> |
| | | <image |
| | | @click="isShowSelMem = true" |
| | | class="open_icon" |
| | | src="../../static/staff/renyuan_ic_open.png" |
| | | mode="" |
| | | ></image> |
| | | </view> |
| | | <view class="btn" @click="onSubmit">确认(00/20)</view> |
| | | </view> --> |
| | | <!-- --> |
| | | <u-popup |
| | | :show="isShowSelMem" |
| | | :round="12" |
| | | mode="bottom" |
| | | @close="isShowSelMem = false" |
| | | > |
| | | <view class="modal"> |
| | | <view class="modal_header"> |
| | | <text class="status">已鿩ï¼xx人</text> |
| | | <text class="btn" @click="isShowSelMem = false">确认</text> |
| | | </view> |
| | | <view class="modal_mem_list"> |
| | | <view class="line"> |
| | | <image |
| | | src="../../static/logo@2x.png" |
| | | class="avatar" |
| | | mode="" |
| | | ></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">name</text> |
| | | </view> |
| | | <view class="depart">xxç§å®¤</view> |
| | | </view> |
| | | <view class="btn">ç§»é¤</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { findHiddenAreaMemberList } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | memberList: [], |
| | | selList: [], |
| | | data() { |
| | | return { |
| | | memberList: [], |
| | | selList: [], |
| | | param: {}, |
| | | |
| | | isShowSelMem: false |
| | | } |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | uni.navigateBack() |
| | | } |
| | | } |
| | | isShowSelMem: false |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | uni.navigateBack() |
| | | }, |
| | | changeMem(e) { |
| | | console.log( e.detail.value[0]); |
| | | const id = Number(e.detail.value[0]) |
| | | const item = this.memberList.find(i => i.id === id) |
| | | console.log('item', item); |
| | | uni.navigateTo({ |
| | | url: `/pages/staff/snapshot?id=${item.id}&name=${item.name}` |
| | | }) |
| | | }, |
| | | initData() { |
| | | const { param } = this |
| | | findHiddenAreaMemberList({ |
| | | name: param.name |
| | | }).then(res => { |
| | | this.memberList = res.data || [] |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .modal { |
| | | padding: 40rpx 30rpx; |
| | | .modal_header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .status { |
| | | font-weight: 600; |
| | | } |
| | | .btn { |
| | | color: #279baa; |
| | | } |
| | | } |
| | | .modal_mem_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .btn{ |
| | | width: 80rpx; |
| | | height: 48rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #999999; |
| | | } |
| | | } |
| | | } |
| | | padding: 40rpx 30rpx; |
| | | .modal_header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .status { |
| | | font-weight: 600; |
| | | } |
| | | .btn { |
| | | color: #279baa; |
| | | } |
| | | } |
| | | .modal_mem_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .btn { |
| | | width: 80rpx; |
| | | height: 48rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #999999; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .sub_wrap { |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2; |
| | | padding: 30rpx 30rpx 64rpx; |
| | | .sel_mem { |
| | | display: flex; |
| | | align-items: center; |
| | | .members { |
| | | width: 500rpx; |
| | | color: #4d98a7; |
| | | white-space: nowrap; |
| | | overflow: hidden; //ææ¬è¶
åºéè |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | } |
| | | .open_icon { |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | } |
| | | } |
| | | .btn { |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | background: #279baa; |
| | | border-radius: 44rpx; |
| | | color: #fff; |
| | | text-align: center; |
| | | margin-top: 22rpx; |
| | | } |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2; |
| | | padding: 30rpx 30rpx 64rpx; |
| | | .sel_mem { |
| | | display: flex; |
| | | align-items: center; |
| | | .members { |
| | | width: 500rpx; |
| | | color: #4d98a7; |
| | | white-space: nowrap; |
| | | overflow: hidden; //ææ¬è¶
åºéè |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | } |
| | | .open_icon { |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | } |
| | | } |
| | | .btn { |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | background: #279baa; |
| | | border-radius: 44rpx; |
| | | color: #fff; |
| | | text-align: center; |
| | | margin-top: 22rpx; |
| | | } |
| | | } |
| | | .member_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | .tag { |
| | | font-size: 24rpx; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #f62710; |
| | | color: #f62710; |
| | | padding: 0rpx 6rpx; |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .empty { |
| | | width: 100%; |
| | | height: 280rpx; |
| | | } |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | .tag { |
| | | font-size: 24rpx; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #f62710; |
| | | color: #f62710; |
| | | padding: 0rpx 6rpx; |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .empty { |
| | | width: 100%; |
| | | height: 280rpx; |
| | | } |
| | | } |
| | | .search_inp { |
| | | height: 72rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 4rpx; |
| | | padding-left: 16rpx; |
| | | .search{ |
| | | width: 28rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | height: 72rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 4rpx; |
| | | padding-left: 16rpx; |
| | | .search { |
| | | width: 28rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>鿣åºå</text> |
| | | </view> |
| | | <view class="value" @click="isShowArea = true"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>æ¥å人</text> |
| | | </view> |
| | | <view class="value" @click="selMember"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>éæ£ç±»å</text> |
| | | </view> |
| | | <view class="value"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="upload_line"> |
| | | <view class="name">ç°åºæ
åµ</view> |
| | | <view class="adduser_list_item_ipt1_upload" @click="upload('imgurl')" v-if="!param.imgurlUrl"><u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon></view> |
| | | <view class="adduser_list_item_ipt1_upload" @click="upload('imgurl')" v-else><image :src="param.imgurlUrl" mode="widthFix"></image></view> |
| | | </view> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>鿣åºå</text> |
| | | </view> |
| | | <view class="value" @click="isShowArea = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.areaName ? '#000000' : '#999999' }" |
| | | >{{ param.areaName ? param.areaName : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>æ¥å人</text> |
| | | </view> |
| | | <view class="value" @click="selMember"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.checkorName ? '#000000' : '#999999' }" |
| | | >{{ param.checkorName ? param.checkorName : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>éæ£ç±»å</text> |
| | | </view> |
| | | <view class="value" @click="isShowType = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.categoryName ? '#000000' : '#999999' }" |
| | | >{{ param.categoryName ? param.categoryName : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="upload_line"> |
| | | <view class="name">ç°åºæ
åµ</view> |
| | | <view class="wrap"> |
| | | <view class="adduser_list_item_ipt1_upload" @click="showUpload = true" |
| | | ><u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon |
| | | ></view> |
| | | <view |
| | | class="adduser_list_item_ipt1_upload" |
| | | v-for="(item, i) in submitFileList" |
| | | :key="i" |
| | | ><image :src="item.fileurlFull" mode="widthFix"></image |
| | | ></view> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="upload_line" style="padding: 15px 0 0;"> |
| | | <view class="name" style="margin-bottom: 10rpx;"> |
| | | <text style="color: #e42d2d;">*</text> |
| | | <text>æ
åµè¯´æ</text> |
| | | </view> |
| | | <view class="value" |
| | | ><textarea |
| | | placeholder="è¯·è¯¦ç»æè¿°ç°åºæ
åµï¼ä¸å°äº10个å" |
| | | minlength="10" |
| | | v-model="param.content" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>ææ¥äºº</text> |
| | | </view> |
| | | <view class="value" |
| | | ><input |
| | | type="text" |
| | | disabled |
| | | placeholder="请è¾å
¥ææ¥äºº" |
| | | v-model="param.memberName" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>èç³»çµè¯</text> |
| | | </view> |
| | | <view class="value" |
| | | ><input |
| | | type="text" |
| | | disabled |
| | | placeholder="请è¾å
¥èç³»çµè¯" |
| | | v-model="param.memberPhone" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>ææ¥æ¶é´</text> |
| | | </view> |
| | | <view class="value" @click="isShowTime = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.submitTime ? '#000000' : '#999999' }" |
| | | >{{ param.submitTime ? param.submitTime : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>ææ¥äºº</text> |
| | | </view> |
| | | <view class="value"><input type="text" placeholder="请è¾å
¥ææ¥äºº" v-model="param.receptMemberName" @blur="getUser" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>èç³»çµè¯</text> |
| | | </view> |
| | | <view class="value"><input type="text" placeholder="请è¾å
¥èç³»çµè¯" v-model="param.receptMemberName" @blur="getUser" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>ææ¥æ¶é´</text> |
| | | </view> |
| | | <view class="value"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <!-- åºå --> |
| | | <u-picker keyName="name" :show="isShowArea" :columns="areaOptions" @confirm="seletedArea" @cancel="isShowArea = false"></u-picker> |
| | | </view> |
| | | <view class="footer" |
| | | ><view class="footer_btn" @click="onSubmit">æäº¤</view></view |
| | | > |
| | | </view> |
| | | <!-- --> |
| | | <!-- åºå --> |
| | | <u-picker |
| | | keyName="name" |
| | | :show="isShowArea" |
| | | closeOnClickOverlay |
| | | :columns="areaOptions" |
| | | @confirm="seletedArea" |
| | | @close="isShowArea = false" |
| | | @cancel="isShowArea = false" |
| | | ></u-picker> |
| | | <u-picker |
| | | keyName="name" |
| | | :show="isShowType" |
| | | closeOnClickOverlay |
| | | :columns="areaType" |
| | | @confirm="seletedType" |
| | | @close="isShowType = false" |
| | | @cancel="isShowType = false" |
| | | ></u-picker> |
| | | <!-- --> |
| | | <u-datetime-picker |
| | | :show="isShowTime" |
| | | :minDate="new Date().getTime()" |
| | | mode="datetime" |
| | | closeOnClickOverlay |
| | | @cancel="isShowTime = false" |
| | | @close="isShowTime = false" |
| | | @confirm="seletedDate" |
| | | ></u-datetime-picker> |
| | | <!-- --> |
| | | <u-popup :show="showUpload" @close="showUpload = false" closeOnClickOverlay> |
| | | <view class="upload_wrap"> |
| | | <view class="btn" @click="uploadImage">éæ©å¾ç</view> |
| | | <view class="btn" @click="uploadVideo">éæ©è§é¢</view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { uploadUrl } from '@/api' |
| | | import { |
| | | uploadUrl, |
| | | DangerCreate, |
| | | DangerConfigType |
| | | } from '@/api' |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | isShowArea: false, |
| | | areaOptions: [[{ name: '111', id: 11 }, { name: '111', id: 11 }]] |
| | | }; |
| | | }, |
| | | methods: { |
| | | seletedArea(e) { |
| | | const item = e.value[0]; |
| | | console.log(item); |
| | | this.isShowArea = false; |
| | | }, |
| | | selMember() { |
| | | uni.navigateTo({ |
| | | url: '/pages/staff/memberSel' |
| | | }); |
| | | }, |
| | | upload() { |
| | | uni.chooseImage({ |
| | | success: (chooseImageRes) => { |
| | | uni.showLoading({ title: 'ä¸ä¼ ä¸', mask: true }); |
| | | for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) { |
| | | uni.uploadFile({ |
| | | url: `${uploadUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`, |
| | | filePath: chooseImageRes.tempFilePaths[i], |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'MEMBER_IMG' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log('uploadFileRes', uploadFileRes); |
| | | let res = JSON.parse(uploadFileRes.data) |
| | | if (type === 'faceImg') { |
| | | this.param.faceImg = res.data.halfPath |
| | | this.param.faceImgUrl = res.data.prefixPath + res.data.folder + res.data.halfPath |
| | | } else { |
| | | this.param.imgurl = res.data.halfPath |
| | | this.param.imgurlUrl = res.data.prefixPath + res.data.folder + res.data.halfPath |
| | | } |
| | | }, |
| | | complete() { |
| | | if (i === chooseImageRes.tempFilePaths.length - 1) { |
| | | uni.hideLoading(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | getUser() {} |
| | | } |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | submitFileList: [], |
| | | |
| | | isShowArea: false, |
| | | isShowType: false, |
| | | isShowTime: false, |
| | | showUpload: false, |
| | | |
| | | areaOptions: [], |
| | | areaType: [], |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | if (option && option.id) { |
| | | this.$set(this.param, 'checkUserId', option.id) |
| | | this.$set(this.param, 'applyCheckUserId', option.id) |
| | | this.$set(this.param, 'checkorName', option.name) |
| | | } |
| | | this.initConfig() |
| | | const userInfo = uni.getStorageSync('userInfo') || {} |
| | | this.$set(this.param, 'memberName', userInfo.realname) |
| | | this.$set(this.param, 'memberPhone', userInfo.mobile) |
| | | this.$set(this.param, 'memberId', userInfo.id) |
| | | this.$set(this.param, 'submitTime', dayjs().format('YYYY-MM-DD HH:mm:ss')) |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | const { param, submitFileList } = this |
| | | if (!param.areaName) return uni.showToast({ |
| | | title: 'è¯·éæ©éæ£åºå', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.applyCheckUserId) return uni.showToast({ |
| | | title: 'è¯·éæ©æ¥å人', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.categoryName) return uni.showToast({ |
| | | title: 'è¯·éæ©éæ£ç±»å', |
| | | icon: 'none' |
| | | }) |
| | | |
| | | DangerCreate({ |
| | | ...param, |
| | | submitFileList |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$jump('/pages/staff/snapshotResult') |
| | | } |
| | | }) |
| | | }, |
| | | seletedArea(e) { |
| | | const item = e.value[0] |
| | | this.$set(this.param, 'areaId', item.id) |
| | | this.$set(this.param, 'areaName', item.name) |
| | | console.log(item) |
| | | this.isShowArea = false |
| | | }, |
| | | seletedType(e) { |
| | | const item = e.value[0] |
| | | this.$set(this.param, 'cateId', item.id) |
| | | this.$set(this.param, 'categoryName', item.name) |
| | | console.log(item) |
| | | this.isShowType = false |
| | | }, |
| | | seletedSafety(e) { |
| | | |
| | | }, |
| | | seletedDate(e) { |
| | | this.$set(this.param, 'submitTime', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')) |
| | | this.isShowTime = false |
| | | }, |
| | | initConfig() { |
| | | DangerConfigType({ type: '1' }).then(res => { |
| | | this.areaType = [res.data] |
| | | }) |
| | | DangerConfigType({ type: '0' }).then(res => { |
| | | this.areaOptions = [res.data] |
| | | }) |
| | | }, |
| | | selMember() { |
| | | uni.navigateTo({ |
| | | url: '/pages/staff/memberSel' |
| | | }) |
| | | }, |
| | | uploadImage() { |
| | | this.showUpload = false |
| | | uni.chooseImage({ |
| | | count: 6, |
| | | success: (chooseImageRes) => { |
| | | console.log('chooseImageRes.tempFilePaths', chooseImageRes.tempFilePaths) |
| | | uni.showLoading({ title: 'ä¸ä¼ ä¸', mask: true }) |
| | | for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) { |
| | | uni.uploadFile({ |
| | | url: `${uploadUrl}`, |
| | | filePath: chooseImageRes.tempFilePaths[i], |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'HIDDEN_DANGER_FILE' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | let res = JSON.parse(uploadFileRes.data) |
| | | console.log('res', res) |
| | | let obj = { |
| | | type: '0' |
| | | } |
| | | obj.fileurl = res.data.halfPath |
| | | obj.fileurlFull = res.data.addr |
| | | this.submitFileList.push(obj) |
| | | }, |
| | | complete() { |
| | | if (i === chooseImageRes.tempFilePaths.length - 1) { |
| | | uni.hideLoading() |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | uploadVideo() { |
| | | this.showUpload = false |
| | | let that = this |
| | | uni.chooseVideo({ |
| | | success: (chooseImageRes) => { |
| | | uni.showLoading({ title: 'ä¸ä¼ ä¸', mask: true }) |
| | | for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) { |
| | | uni.uploadFile({ |
| | | url: `${uploadUrl}`, |
| | | filePath: chooseImageRes.tempFilePaths[i], |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'HIDDEN_DANGER_FILE' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | let res = JSON.parse(uploadFileRes.data) |
| | | console.log('uploadFileRes', res) |
| | | let obj = { type: '1' } |
| | | obj.fileurl = res.data.halfPath |
| | | obj.fileurlFull = res.data.addr |
| | | that.submitFileList.push(obj) |
| | | console.log(that.submitFileList) |
| | | }, |
| | | complete() { |
| | | if (i === chooseImageRes.tempFilePaths.length - 1) { |
| | | uni.hideLoading() |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getUser() { } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .main_wrap { |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border: 2rpx solid #E5E5E5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | .wrap{ |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | margin-right: 24rpx; |
| | | border: 2rpx solid #e5e5e5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .main_app { |
| | | // padding-top: 10rpx; |
| | | .upload_wrap { |
| | | width: 100%; |
| | | .btn { |
| | | height: 90rpx; |
| | | line-height: 90rpx; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .footer { |
| | | width: 100%; |
| | | padding: 0 30rpx; |
| | | padding-bottom: env(safe-area-inset-bottom); |
| | | box-sizing: border-box; |
| | | position: fixed; |
| | | left: 0; |
| | | bottom: 68rpx; |
| | | |
| | | .footer_btn { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #4e99a9; |
| | | border-radius: 44rpx; |
| | | font-size: 32rpx; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | .empty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="ima_wrap"> |
| | | <image src="@/static/driver/btn_qiandao@2x.png" mode="widthFix"></image> |
| | | <u-icon class="txt" color="#fff" size="72" name="checkbox-mark"></u-icon> |
| | | </view> |
| | | <view class="h1">æäº¤æå</view> |
| | | <view class="placeholder9">æè°¢ä½ çåé¦ï¼æä»¬å°å°½å¿«æ ¸å®å¤ç</view> |
| | | <view class="btn" @click="$jump('/pages/staff/index')">è¿åé¦é¡µ</view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .main_app{ |
| | | text-align: center; |
| | | .btn{ |
| | | margin-top: 60rpx; |
| | | padding-bottom: env(safe-area-inset-bottom); |
| | | box-sizing: border-box; |
| | | width: 300rpx; |
| | | margin: 60rpx auto; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #fff; |
| | | border-radius: 44rpx; |
| | | font-size: 32rpx; |
| | | border: 1rpx solid #4e99a9; |
| | | border-radius: 50rpx; |
| | | color: #4e99a9; |
| | | } |
| | | .h1{ |
| | | font-size: 44rpx; |
| | | font-weight: 600; |
| | | margin-bottom: 30rpx; |
| | | } |
| | | .ima_wrap{ |
| | | width: 300rpx; |
| | | height: 300rpx; |
| | | margin: 300rpx auto 40rpx; |
| | | position: relative; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | image{ |
| | | width: 100%; |
| | | position: absolute; |
| | | } |
| | | .txt{ |
| | | font-size: 50rpx; |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="box"> |
| | | <scroll-view scroll-x class="box_head"> |
| | | <view class="box_head_search"> |
| | | <view class="box_head_search_ipt"> |
| | | <image src="@/static/n/ic_search@2x.png" mode="widthFix"></image> |
| | | <input type="text" placeholder="æç´¢ä»»å¡åç§°" /> |
| | | </view> |
| | | <view class="box_head_search_sha" @click="show = true"> |
| | | <image src="@/static/n/ic_shaixuan@2x.png" mode="widthFix"></image> |
| | | <text>çé</text> |
| | | </view> |
| | | </view> |
| | | <view class="box_head_list"> |
| | | <view class="box_head_item active">å¾
å¤ç 12</view> |
| | | <view class="box_head_item">å·²å¤ç</view> |
| | | <view class="box_head_item">æåèµ·ç</view> |
| | | </view> |
| | | </scroll-view> |
| | | <view class="box_list"> |
| | | <view class="box_list_item" v-for="(item, index) in 3" :key="index"> |
| | | <view class="box_list_item_head"> |
| | | <text>䏿©å¯çå³å¡å
¥åç³è¯·</text> |
| | | <text class="loading">å¾
å®¡æ ¸</text> |
| | | </view> |
| | | <view class="box_list_item_nr"> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>被访é®äººï¼</text> |
| | | <text>人äºé¨-çäºè</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>è¿åæ¶é´ï¼</text> |
| | | <text>12-12 09:00</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>ç¦»åæ¶é´ï¼</text> |
| | | <text>12-12 12:00</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>æ¥è®¿äºç±ï¼</text> |
| | | <text>ä¸å¡æ¥å¾</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>éè¡è½¦è¾ï¼</text> |
| | | <text>çA88888</text> |
| | | </view> |
| | | <view class="box_list_item_nr_x"></view> |
| | | <view class="box_list_item_nr_text"> |
| | | <text class="time">2023-12-12 09:00æäº¤</text> |
| | | <text class="btn" @click="handleAppr()">å»å¤ç</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- çé --> |
| | | <u-popup :show="show" mode="bottom" :round="10" :closeable="true" @close="show = false"> |
| | | <view class="search"> |
| | | <view class="search_head">ä»»å¡çé</view> |
| | | <view class="search_list"> |
| | | <view class="search_list_item"> |
| | | <view class="search_list_item_label">åå»ºæ¥æ</view> |
| | | <view class="search_list_item_val"> |
| | | <view class="search_list_item_val_row" @click="tiemShow = true" :style="{ color: search.startTime ? '#000' : '' }">{{search.startTime ? search.startTime : 'å¼å§æ¥æ'}}</view> |
| | | <view class="search_list_item_val_z">-</view> |
| | | <view class="search_list_item_val_row" @click="tiemShow1 = true" :style="{ color: search.endTime ? '#000' : '' }">{{search.endTime ? search.endTime : 'ç»ææ¥æ'}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="search_list_item"> |
| | | <view class="search_list_item_label">è®¢åæ¥æº</view> |
| | | <view class="search_list_item_cates"> |
| | | <view :class="index === i ? 'search_list_item_cates_row active' : 'search_list_item_cates_row'" |
| | | v-for="(item, index) in cate" |
| | | :key="index" |
| | | @click="clickItem(index)"> |
| | | {{item.name}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="search_footer"> |
| | | <view class="search_footer_item" @click="show = false">åæ¶</view> |
| | | <view class="search_footer_item t">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <u-datetime-picker |
| | | :show="tiemShow" |
| | | v-model="time" |
| | | mode="datetime" |
| | | @confirm="confirmLeft" |
| | | @cancel="tiemShow = false" |
| | | ></u-datetime-picker> |
| | | <u-datetime-picker |
| | | :show="tiemShow1" |
| | | v-model="time1" |
| | | mode="datetime" |
| | | @confirm="confirmRight" |
| | | @cancel="tiemShow1 = false" |
| | | ></u-datetime-picker> |
| | | </view> |
| | | <view class="box"> |
| | | <scroll-view scroll-x class="box_head"> |
| | | <view class="box_head_search"> |
| | | <view class="box_head_search_ipt"> |
| | | <image src="@/static/n/ic_search@2x.png" mode="widthFix"></image> |
| | | <input type="text" placeholder="æç´¢ä»»å¡åç§°" /> |
| | | </view> |
| | | <view class="box_head_search_sha" @click="show = true"> |
| | | <image src="@/static/n/ic_shaixuan@2x.png" mode="widthFix"></image> |
| | | <text>çé</text> |
| | | </view> |
| | | </view> |
| | | <view class="box_head_list"> |
| | | <view class="box_head_item active">å¾
å¤ç 12</view> |
| | | <view class="box_head_item">å·²å¤ç</view> |
| | | <view class="box_head_item">æåèµ·ç</view> |
| | | <view class="box_head_item">æéæç</view> |
| | | </view> |
| | | </scroll-view> |
| | | <view class="box_list"> |
| | | <view class="box_list_item" v-for="(item, index) in 3" :key="index"> |
| | | <view class="box_list_item_head"> |
| | | <text>䏿©å¯çå³å¡å
¥åç³è¯·</text> |
| | | <text class="loading">å¾
å®¡æ ¸</text> |
| | | </view> |
| | | <view class="box_list_item_nr"> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>被访é®äººï¼</text> |
| | | <text>人äºé¨-çäºè</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>è¿åæ¶é´ï¼</text> |
| | | <text>12-12 09:00</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>ç¦»åæ¶é´ï¼</text> |
| | | <text>12-12 12:00</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>æ¥è®¿äºç±ï¼</text> |
| | | <text>ä¸å¡æ¥å¾</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>éè¡è½¦è¾ï¼</text> |
| | | <text>çA88888</text> |
| | | </view> |
| | | <view class="box_list_item_nr_x"></view> |
| | | <view class="box_list_item_nr_text"> |
| | | <text class="time">2023-12-12 09:00æäº¤</text> |
| | | <text class="btn" @click="handleAppr()">å»å¤ç</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- çé --> |
| | | <u-popup |
| | | :show="show" |
| | | mode="bottom" |
| | | :round="10" |
| | | :closeable="true" |
| | | @close="show = false" |
| | | > |
| | | <view class="search"> |
| | | <view class="search_head">ä»»å¡çé</view> |
| | | <view class="search_list"> |
| | | <view class="search_list_item"> |
| | | <view class="search_list_item_label">åå»ºæ¥æ</view> |
| | | <view class="search_list_item_val"> |
| | | <view |
| | | class="search_list_item_val_row" |
| | | @click="tiemShow = true" |
| | | :style="{ color: search.startTime ? '#000' : '' }" |
| | | >{{ search.startTime ? search.startTime : "å¼å§æ¥æ" }}</view |
| | | > |
| | | <view class="search_list_item_val_z">-</view> |
| | | <view |
| | | class="search_list_item_val_row" |
| | | @click="tiemShow1 = true" |
| | | :style="{ color: search.endTime ? '#000' : '' }" |
| | | >{{ search.endTime ? search.endTime : "ç»ææ¥æ" }}</view |
| | | > |
| | | </view> |
| | | </view> |
| | | <view class="search_list_item"> |
| | | <view class="search_list_item_label">è®¢åæ¥æº</view> |
| | | <view class="search_list_item_cates"> |
| | | <view |
| | | :class=" |
| | | index === i |
| | | ? 'search_list_item_cates_row active' |
| | | : 'search_list_item_cates_row' |
| | | " |
| | | v-for="(item, index) in cate" |
| | | :key="index" |
| | | @click="clickItem(index)" |
| | | > |
| | | {{ item.name }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="search_footer"> |
| | | <view class="search_footer_item" @click="show = false">åæ¶</view> |
| | | <view class="search_footer_item t">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <u-datetime-picker |
| | | :show="tiemShow" |
| | | v-model="time" |
| | | mode="datetime" |
| | | @confirm="confirmLeft" |
| | | @cancel="tiemShow = false" |
| | | ></u-datetime-picker> |
| | | <u-datetime-picker |
| | | :show="tiemShow1" |
| | | v-model="time1" |
| | | mode="datetime" |
| | | @confirm="confirmRight" |
| | | @cancel="tiemShow1 = false" |
| | | ></u-datetime-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | show: false, |
| | | tiemShow: false, |
| | | tiemShow1: false, |
| | | time: '', |
| | | i: null, |
| | | time: '', |
| | | time1: '', |
| | | search: { |
| | | startTime: '', |
| | | endTime: '' |
| | | }, |
| | | cate: [ |
| | | { name: '访客ç³è¯·', id: 1 }, |
| | | { name: 'å³å¡ç³è¯·', id: 2 }, |
| | | { name: 'ç¨è½¦ç³è¯·', id: 3 } |
| | | ] |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleAppr(item) { |
| | | uni.navigateTo({ |
| | | url: '/pages/staff/task/visitorApprove' |
| | | }) |
| | | }, |
| | | clickItem(index) { |
| | | this.i = index |
| | | }, |
| | | confirmLeft(e) { |
| | | console.log(uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')) |
| | | this.search.startTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') |
| | | this.tiemShow = false |
| | | }, |
| | | confirmRight(e) { |
| | | this.search.endTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') |
| | | this.tiemShow1 = false |
| | | } |
| | | } |
| | | } |
| | | import { taskCenter } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | show: false, |
| | | tiemShow: false, |
| | | tiemShow1: false, |
| | | time: '', |
| | | i: null, |
| | | time: '', |
| | | time1: '', |
| | | search: { |
| | | startTime: '', |
| | | endTime: '' |
| | | }, |
| | | pagination: {}, |
| | | dataList: [], |
| | | cate: [ |
| | | { name: '访客ç³è¯·', id: 1 }, |
| | | { name: 'å³å¡ç³è¯·', id: 2 }, |
| | | { name: 'ç¨è½¦ç³è¯·', id: 3 } |
| | | ] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | const { pagination } = this |
| | | taskCenter({ |
| | | model: {} |
| | | }).then(res => { |
| | | this.dataList = res.data.records |
| | | }) |
| | | }, |
| | | handleAppr(item) { |
| | | uni.navigateTo({ |
| | | url: '/pages/staff/task/visitorApprove' |
| | | }) |
| | | }, |
| | | clickItem(index) { |
| | | this.i = index |
| | | }, |
| | | confirmLeft(e) { |
| | | console.log(uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')) |
| | | this.search.startTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') |
| | | this.tiemShow = false |
| | | }, |
| | | confirmRight(e) { |
| | | this.search.endTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') |
| | | this.tiemShow1 = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | page { |
| | | background-color: #F7F7F7 !important; |
| | | } |
| | | page { |
| | | background-color: #f7f7f7 !important; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .box { |
| | | width: 100%; |
| | | .box_head { |
| | | width: 100%; |
| | | height: 190rpx; |
| | | padding: 12rpx 30rpx; |
| | | box-sizing: border-box; |
| | | background: #FFFFFF; |
| | | position: sticky; |
| | | top: 0; |
| | | left: 0; |
| | | .box_head_search { |
| | | width: 100%; |
| | | height: 76rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 24rpx; |
| | | .box_head_search_ipt { |
| | | flex: 1; |
| | | height: 100%; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | background: #F7F7F7; |
| | | border-radius: 50rpx; |
| | | margin-right: 30rpx; |
| | | image { |
| | | flex-shrink: 0; |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #B2B2B2; |
| | | } |
| | | } |
| | | .box_head_search_sha { |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | image { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | text { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | .box_head_list { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | .active { |
| | | border: 1rpx solid #4c99a8 !important; |
| | | color: #4c99a8 !important; |
| | | } |
| | | .box_head_item { |
| | | padding: 0 30rpx; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 30rpx; |
| | | border: 1rpx solid #999999; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | margin-right: 20rpx; |
| | | } |
| | | } |
| | | } |
| | | .box_list { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | .box_list_item { |
| | | width: 100%; |
| | | margin-bottom: 20rpx; |
| | | &:last-child { |
| | | margin: 0 !important; |
| | | } |
| | | .box_list_item_head { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | background: linear-gradient(270deg, #FEFEFF 0%, #E1F7FE 100%); |
| | | border-radius: 8rpx 8rpx 0rpx 0rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .loading { |
| | | color: #4c99a8; |
| | | } |
| | | .success { |
| | | color: #03C68F; |
| | | } |
| | | .error { |
| | | color: #E0312A; |
| | | } |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | } |
| | | } |
| | | } |
| | | .box_list_item_nr { |
| | | padding: 30rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | background-color: #FFFFFF; |
| | | .box_list_item_nr_x { |
| | | width: 100%; |
| | | height: 1rpx; |
| | | background-color: #E5E5E5; |
| | | } |
| | | .box_list_item_nr_text { |
| | | .time{ |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | } |
| | | .btn{ |
| | | padding: 0 32rpx; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | background: #279BAA; |
| | | color: #fff; |
| | | font-size: 26rpx; |
| | | font-weight: 300; |
| | | text-align: center; |
| | | border-radius: 30rpx; |
| | | } |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | width: 100%; |
| | | margin-top: 20rpx; |
| | | } |
| | | .box_list_item_nr_item { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20rpx; |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #666666; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .search { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | .search_head { |
| | | width: 100%; |
| | | text-align: center; |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | .search_list { |
| | | width: 100%; |
| | | margin-top: 34rpx; |
| | | .search_list_item { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | margin-bottom: 48rpx; |
| | | .search_list_item_label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .search_list_item_cates { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | .active { |
| | | background: #4c99a8 !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .search_list_item_cates_row { |
| | | padding: 0 26rpx; |
| | | height: 64rpx; |
| | | line-height: 64rpx; |
| | | background: #F7F7F7; |
| | | border-radius: 36rpx; |
| | | margin-right: 20rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | &:last-child { |
| | | margin: 0; |
| | | } |
| | | } |
| | | } |
| | | .search_list_item_val { |
| | | width: 100%; |
| | | height: 64rpx; |
| | | background: #F7F7F7; |
| | | border-radius: 36rpx; |
| | | border: 1rpx solid #E5E5E5; |
| | | display: flex; |
| | | align-items: center; |
| | | .search_list_item_val_row { |
| | | flex: 1; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | } |
| | | .search_list_item_val_z { |
| | | flex-shrink: 0; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | margin: 0 30rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .search_footer { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .t { |
| | | background: #4c99a8 !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .search_footer_item { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 32rpx; |
| | | font-weight: 400; |
| | | color: #4c99a8; |
| | | margin-right: 18rpx; |
| | | border: 1rpx solid #4c99a8; |
| | | border-radius: 44rpx; |
| | | &:last-child { |
| | | margin: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .box { |
| | | width: 100%; |
| | | .box_head { |
| | | width: 100%; |
| | | height: 190rpx; |
| | | padding: 12rpx 30rpx; |
| | | box-sizing: border-box; |
| | | background: #ffffff; |
| | | position: sticky; |
| | | top: 0; |
| | | left: 0; |
| | | .box_head_search { |
| | | width: 100%; |
| | | height: 76rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 24rpx; |
| | | .box_head_search_ipt { |
| | | flex: 1; |
| | | height: 100%; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | background: #f7f7f7; |
| | | border-radius: 50rpx; |
| | | margin-right: 30rpx; |
| | | image { |
| | | flex-shrink: 0; |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #b2b2b2; |
| | | } |
| | | } |
| | | .box_head_search_sha { |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | image { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | text { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | .box_head_list { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .active { |
| | | border: 1rpx solid #4c99a8 !important; |
| | | color: #4c99a8 !important; |
| | | } |
| | | .box_head_item { |
| | | text-align: center; |
| | | flex: 1; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 30rpx; |
| | | border: 1rpx solid #999999; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | margin-right: 10rpx; |
| | | &:nth-last-child(1) { |
| | | margin-right: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .box_list { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | .box_list_item { |
| | | width: 100%; |
| | | margin-bottom: 20rpx; |
| | | &:last-child { |
| | | margin: 0 !important; |
| | | } |
| | | .box_list_item_head { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%); |
| | | border-radius: 8rpx 8rpx 0rpx 0rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .loading { |
| | | color: #4c99a8; |
| | | } |
| | | .success { |
| | | color: #03c68f; |
| | | } |
| | | .error { |
| | | color: #e0312a; |
| | | } |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | } |
| | | } |
| | | } |
| | | .box_list_item_nr { |
| | | padding: 30rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | background-color: #ffffff; |
| | | .box_list_item_nr_x { |
| | | width: 100%; |
| | | height: 1rpx; |
| | | background-color: #e5e5e5; |
| | | } |
| | | .box_list_item_nr_text { |
| | | .time { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | } |
| | | .btn { |
| | | padding: 0 32rpx; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | background: #279baa; |
| | | color: #fff; |
| | | font-size: 26rpx; |
| | | font-weight: 300; |
| | | text-align: center; |
| | | border-radius: 30rpx; |
| | | } |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | width: 100%; |
| | | margin-top: 20rpx; |
| | | } |
| | | .box_list_item_nr_item { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20rpx; |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #666666; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .search { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | .search_head { |
| | | width: 100%; |
| | | text-align: center; |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | .search_list { |
| | | width: 100%; |
| | | margin-top: 34rpx; |
| | | .search_list_item { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | margin-bottom: 48rpx; |
| | | .search_list_item_label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .search_list_item_cates { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | .active { |
| | | background: #4c99a8 !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .search_list_item_cates_row { |
| | | padding: 0 26rpx; |
| | | height: 64rpx; |
| | | line-height: 64rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 36rpx; |
| | | margin-right: 20rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | &:last-child { |
| | | margin: 0; |
| | | } |
| | | } |
| | | } |
| | | .search_list_item_val { |
| | | width: 100%; |
| | | height: 64rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 36rpx; |
| | | border: 1rpx solid #e5e5e5; |
| | | display: flex; |
| | | align-items: center; |
| | | .search_list_item_val_row { |
| | | flex: 1; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | } |
| | | .search_list_item_val_z { |
| | | flex-shrink: 0; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | margin: 0 30rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .search_footer { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .t { |
| | | background: #4c99a8 !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .search_footer_item { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 32rpx; |
| | | font-weight: 400; |
| | | color: #4c99a8; |
| | | margin-right: 18rpx; |
| | | border: 1rpx solid #4c99a8; |
| | | border-radius: 44rpx; |
| | | &:last-child { |
| | | margin: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="search_inp df_ac"> |
| | | <image |
| | | class="mr12 search" |
| | | src="@/static/ic_search@2x.png" |
| | | mode="widthFix" |
| | | ></image> |
| | | <input |
| | | v-model="param.name" |
| | | @blur="initData()" |
| | | type="text" |
| | | placeholder="æç´¢" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | <view class="member_list"> |
| | | <checkbox-group v-model="selList" @change="changeMem"> |
| | | <view v-for="item in memberList" :key="item.id" class="line"> |
| | | <image |
| | | :src=" |
| | | item.faceImgFull |
| | | ? item.faceImgFull |
| | | : require('@/static/logo@2x.png') |
| | | " |
| | | class="avatar" |
| | | mode="" |
| | | ></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">{{ item.name }}</text> |
| | | <!-- <text class="tag">tag</text> --> |
| | | </view> |
| | | <view class="depart">{{ item.companyName }}</view> |
| | | </view> |
| | | <label> |
| | | <checkbox :checked="item.checked" :value="String(item.id)" class="checkbox" /> |
| | | </label> |
| | | <text></text> |
| | | </view> |
| | | </checkbox-group> |
| | | <view class="empty"></view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="sub_wrap"> |
| | | <view class="sel_mem"> |
| | | <text>已鿩ï¼</text> |
| | | <view class="members"> |
| | | <text v-for="(item, i) in selList" :key="i">{{ item.name }}ï¼</text> |
| | | </view> |
| | | <image |
| | | @click="isShowSelMem = true" |
| | | class="open_icon" |
| | | src="@/static/staff/renyuan_ic_open.png" |
| | | mode="" |
| | | ></image> |
| | | </view> |
| | | <view class="btn" @click="onSubmit">确认({{selList.length}}/20)</view> |
| | | </view> |
| | | <!-- --> |
| | | <u-popup |
| | | :show="isShowSelMem" |
| | | :round="12" |
| | | mode="bottom" |
| | | @close="isShowSelMem = false" |
| | | > |
| | | <view class="modal"> |
| | | <view class="modal_header"> |
| | | <text class="status">已鿩ï¼{{ selList.length }}人</text> |
| | | <text class="btn" @click="isShowSelMem = false">确认</text> |
| | | </view> |
| | | <view class="modal_mem_list"> |
| | | <view class="line" v-for="(item, i) in selList" :key="i"> |
| | | <image |
| | | :src=" |
| | | item.faceImgFull |
| | | ? item.faceImgFull |
| | | : require('@/static/logo@2x.png') |
| | | " |
| | | class="avatar" |
| | | mode="" |
| | | ></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">{{ item.name }}</text> |
| | | </view> |
| | | <view class="depart">{{ item.componey }}</view> |
| | | </view> |
| | | <view class="btn" @click="handleRemove(item)">ç§»é¤</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { findTypeMemberInfo } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | memberList: [], |
| | | selList: [], |
| | | param: {}, |
| | | |
| | | isShowSelMem: false |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | this.$eventBus.$emit('applePeo', this.selList) |
| | | uni.navigateBack() |
| | | }, |
| | | changeMem(e) { |
| | | const arr = e.detail.value |
| | | let arrTemp = arr.map(item => { |
| | | let obj = {} |
| | | this.memberList.forEach(ite => { |
| | | if (item == ite.id) { |
| | | obj.name = ite.name.split('-')[0] |
| | | obj.componey = ite.name.split('-')[1] || '' |
| | | obj.id = ite.id |
| | | } |
| | | }) |
| | | return obj |
| | | }) |
| | | this.selList = arrTemp |
| | | // this.$forceUpdate() |
| | | }, |
| | | handleRemove(item) { |
| | | const selIndex = this.selList.findIndex(i => i.id === item.id) |
| | | this.selList.splice(selIndex, 1) |
| | | this.memberList.forEach(ite => { |
| | | if(item.id === ite.id){ |
| | | ite.checked = false |
| | | } |
| | | }) |
| | | // console.log(this.memberList); |
| | | this.$forceUpdate() |
| | | }, |
| | | initData() { |
| | | const { param } = this |
| | | findTypeMemberInfo({ |
| | | name: param.name, |
| | | type: '2' |
| | | }).then(res => { |
| | | this.memberList = res.data || [] |
| | | this.memberList.forEach(i => { |
| | | i.checked = false |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .modal { |
| | | padding: 40rpx 30rpx; |
| | | .modal_header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .status { |
| | | font-weight: 600; |
| | | } |
| | | .btn { |
| | | color: #279baa; |
| | | } |
| | | } |
| | | .modal_mem_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .btn { |
| | | width: 80rpx; |
| | | height: 48rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #999999; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .sub_wrap { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2; |
| | | padding: 30rpx 30rpx 64rpx; |
| | | .sel_mem { |
| | | display: flex; |
| | | align-items: center; |
| | | .members { |
| | | width: 500rpx; |
| | | color: #4d98a7; |
| | | white-space: nowrap; |
| | | overflow: hidden; //ææ¬è¶
åºéè |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | } |
| | | .open_icon { |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | } |
| | | } |
| | | .btn { |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | background: #279baa; |
| | | border-radius: 44rpx; |
| | | color: #fff; |
| | | text-align: center; |
| | | margin-top: 22rpx; |
| | | } |
| | | } |
| | | .member_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | .tag { |
| | | font-size: 24rpx; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #f62710; |
| | | color: #f62710; |
| | | padding: 0rpx 6rpx; |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .empty { |
| | | width: 100%; |
| | | height: 280rpx; |
| | | } |
| | | } |
| | | .search_inp { |
| | | height: 72rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 4rpx; |
| | | padding-left: 16rpx; |
| | | .search { |
| | | width: 28rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡ç¨è½¦æ¶æ®µ</text> |
| | | </view> |
| | | <view class="value" @click="$goBack()"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç³è¯·è½¦è¾</text> |
| | | </view> |
| | | <view class="value"> |
| | | <input type="text" placeholder="请è¾å
¥ç³è¯·è½¦è¾" v-model="param.receptMemberName" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡åºåæ¶é´</text> |
| | | </view> |
| | | <view class="value" @click="isShowDatetime = true"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç®çå°ç±»å«</text> |
| | | </view> |
| | | <view class="value"> |
| | | <text>{{ 111 }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç®çå°</text> |
| | | </view> |
| | | <view class="value"> |
| | | <input type="text" placeholder="请è¾å
¥" v-model="param.address" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ä¹è½¦äººå</text> |
| | | </view> |
| | | <view class="value" @click="$jump('/pages/staff/memberSel')"> |
| | | <text class="mr6" :style="{ color: param.peo ? '#000000' : '#999999' }">{{ param.peo ? param.peo : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="upload_line"> |
| | | <view class="label"> |
| | | <text style="color: #e42d2d;">*</text> |
| | | <text>ç¨è½¦äºç±</text> |
| | | </view> |
| | | <view class="value"> |
| | | <textarea type="text" placeholder="请è¾å
¥" :maxlength="-1" v-model="param.reson" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="tip"> |
| | | <view class="title">注æäºé¡¹ï¼</view> |
| | | <view class="line">1ãå
¬å¸è½¦è¾å¤åºéåçç¨è½¦ç³è¯·è¡¨ï¼ç»æ¹ååæ¹å¯å¤åºï¼ååºï¼ã</view> |
| | | <view class="line">2ãå¸å¤ç¨è½¦éæ»ç»å审æ¹ã</view> |
| | | <view class="line">3ãååºè½¦è¾å¿
é¡»éµå®äº¤éè§åï¼å®å
¨è¡é©¶ã对äºè½¦è¾åç交éæå¤ï¼å¯¹å½äºäººåç¬¬ä¸æ¹é æäººèº«ä¼¤å®³åæå¤±ï¼å
¬å¸å¯ä»¥åå©å¤çä¿é©å
¬å¸èµå¿ç¸å
³äºå®ï¼ä½ä¸æ¿æ
ä»»ä½è´£ä»»åè´¹ç¨ã</view> |
| | | <view class="line">4ãå
¬å¸åç»ç³è¯·äººç¨è½¦ï¼ç³è¯·å车人为第ä¸è´£ä»»äººï¼ä¸å
许转åç»å
¶ä»äººä½¿ç¨ï¼è¥è¦åç»ä»äººä½¿ç¨ãè´£ä»»äººè¦æ¿æ
å
¨é¨è´£ä»»ã</view> |
| | | </view> |
| | | <view class="sub_btn" @click="handleSub">æäº¤</view> |
| | | <!-- --> |
| | | <u-datetime-picker :show="isShowDatetime" :minDate="minDate" @confirm="confirmDate" @cancel="isShowDatetime = false" mode="date"></u-datetime-picker> |
| | | </view> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡ç¨è½¦æ¶æ®µ</text> |
| | | </view> |
| | | <view class="value" @click="$goBack()"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.startTime ? '#000000' : '#999999' }" |
| | | > |
| | | <text v-if="param.startTime"> |
| | | {{ param.startTime.slice(5, 16) }}è³{{ |
| | | param.endTime.slice(11, 16) |
| | | }} |
| | | </text> |
| | | <text v-else>è¯·éæ©</text> |
| | | </text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç³è¯·è½¦è¾</text> |
| | | </view> |
| | | <view class="value" @click="$goBack()"> |
| | | <input |
| | | type="text" |
| | | disabled |
| | | placeholder="请è¾å
¥ç³è¯·è½¦è¾" |
| | | v-model="param.carCode" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡åºåæ¶é´</text> |
| | | </view> |
| | | <view class="value" @click="isShowDatetime = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.planUseDate ? '#000000' : '#999999' }" |
| | | >{{ param.planUseDate ? param.planUseDate : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç®çå°ç±»å«</text> |
| | | </view> |
| | | <view class="value"> |
| | | <text>{{ param.type == "1" ? "å¸å¤" : "å¸å
" }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç®çå°</text> |
| | | </view> |
| | | <view class="value"> |
| | | <input |
| | | type="text" |
| | | placeholder="请è¾å
¥" |
| | | v-model="param.addr" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ä¹è½¦äººå</text> |
| | | </view> |
| | | <view class="value" @click="$jump('/pages/staff/vehicle/applePeo')"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ |
| | | color: |
| | | param.memberList && param.memberList.length > 0 |
| | | ? '#000000' |
| | | : '#999999', |
| | | }" |
| | | > |
| | | <text v-if="param.memberNames"> |
| | | {{ param.memberNames }} |
| | | </text> |
| | | <text v-else>è¯·éæ©</text> |
| | | </text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="upload_line"> |
| | | <view class="label"> |
| | | <text style="color: #e42d2d">*</text> |
| | | <text>ç¨è½¦äºç±</text> |
| | | </view> |
| | | <view class="value"> |
| | | <textarea |
| | | type="text" |
| | | placeholder="请è¾å
¥" |
| | | :maxlength="-1" |
| | | v-model="param.content" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="tip"> |
| | | <view class="title">注æäºé¡¹ï¼</view> |
| | | <view class="line" |
| | | >1ãå
¬å¸è½¦è¾å¤åºéåçç¨è½¦ç³è¯·è¡¨ï¼ç»æ¹ååæ¹å¯å¤åºï¼ååºï¼ã</view |
| | | > |
| | | <view class="line">2ãå¸å¤ç¨è½¦éæ»ç»å审æ¹ã</view> |
| | | <view class="line" |
| | | >3ãååºè½¦è¾å¿
é¡»éµå®äº¤éè§åï¼å®å
¨è¡é©¶ã对äºè½¦è¾åç交éæå¤ï¼å¯¹å½äºäººåç¬¬ä¸æ¹é æäººèº«ä¼¤å®³åæå¤±ï¼å
¬å¸å¯ä»¥åå©å¤çä¿é©å
¬å¸èµå¿ç¸å
³äºå®ï¼ä½ä¸æ¿æ
ä»»ä½è´£ä»»åè´¹ç¨ã</view |
| | | > |
| | | <view class="line" |
| | | >4ãå
¬å¸åç»ç³è¯·äººç¨è½¦ï¼ç³è¯·å车人为第ä¸è´£ä»»äººï¼ä¸å
许转åç»å
¶ä»äººä½¿ç¨ï¼è¥è¦åç»ä»äººä½¿ç¨ãè´£ä»»äººè¦æ¿æ
å
¨é¨è´£ä»»ã</view |
| | | > |
| | | </view> |
| | | <view class="sub_btn" @click="handleSub">æäº¤</view> |
| | | <!-- --> |
| | | <u-datetime-picker |
| | | :show="isShowDatetime" |
| | | :minDate="new Date(param.startTime).getTime()" |
| | | :maxDate="new Date(param.endTime).getTime()" |
| | | @confirm="confirmDate" |
| | | @cancel="isShowDatetime = false" |
| | | mode="datetime" |
| | | ></u-datetime-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | minDate: '', |
| | | isShowDatetime: false, |
| | | }; |
| | | }, |
| | | created(){ |
| | | this.minDate = new Date().getTime() |
| | | }, |
| | | methods: { |
| | | handleSub() { |
| | | console.log('---'); |
| | | }, |
| | | confirmDate(e) { |
| | | console.log(e.value); |
| | | this.param.aa = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.isShowDate = false |
| | | } |
| | | } |
| | | } |
| | | import dayjs from 'dayjs' |
| | | import { carUseBookCraete } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | minDate: '', |
| | | isShowDatetime: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$eventBus.$on('applePeo', (res) => { |
| | | this.$set(this.param, 'memberList', res) |
| | | this.$set(this.param, 'memberIds', res.map(i => i.id).join(',')) |
| | | this.$set(this.param, 'memberNames', res.map(i => i.name).join(',')) |
| | | }) |
| | | }, |
| | | onLoad(option) { |
| | | console.log(option) |
| | | this.param = { ...option } |
| | | this.minDate = new Date().getTime() |
| | | |
| | | }, |
| | | methods: { |
| | | handleSub() { |
| | | const { param } = this |
| | | console.log('---', param) |
| | | if (!param.planUseDate) return uni.showToast({ |
| | | title: 'è¯·éæ©é¢è®¡ç¨è½¦æ¶é´', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.addr) return uni.showToast({ |
| | | title: '请è¾å
¥ç®çå°', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.memberList || param.memberList.length === 0) return uni.showToast({ |
| | | title: 'è¯·éæ©ä¹è½¦äººå', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.content) return uni.showToast({ |
| | | title: '请è¾å
¥ç¨è½¦äºç±', |
| | | icon: 'none' |
| | | }) |
| | | carUseBookCraete({ |
| | | ...param, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: 'æäº¤æå', |
| | | icon: 'success' |
| | | }) |
| | | }) |
| | | uni.redirectTo({ |
| | | url: '/pages/staff/index' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | confirmDate(e) { |
| | | |
| | | this.param.planUseDate = dayjs(e.value).format('YYYY-MM-DD HH:mm') |
| | | this.isShowDatetime = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .main_wrap { |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | textarea { |
| | | margin-top: 12rpx; |
| | | width: 100%; |
| | | height: 180rpx; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border: 2rpx solid #E5E5E5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 0rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | textarea { |
| | | margin-top: 12rpx; |
| | | width: 100%; |
| | | height: 180rpx; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border: 2rpx solid #e5e5e5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .sub_btn{ |
| | | position: fixed; |
| | | bottom: 84rpx; |
| | | left: 30rpx; |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #279BAA; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE; |
| | | border-radius: 44rpx; |
| | | font-size: 30rpx; |
| | | color: #FFFFFF; |
| | | .sub_btn { |
| | | position: fixed; |
| | | bottom: 84rpx; |
| | | left: 30rpx; |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #279baa; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee; |
| | | border-radius: 44rpx; |
| | | font-size: 30rpx; |
| | | color: #ffffff; |
| | | } |
| | | .tip{ |
| | | background: #F7F7F7; |
| | | padding: 30rpx 30rpx 180rpx; |
| | | margin: 0 -30rpx; |
| | | .title{ |
| | | line-height: 40rpx; |
| | | margin-bottom: 22rpx; |
| | | } |
| | | .line{ |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | line-height: 36rpx; |
| | | } |
| | | } |
| | | .tip { |
| | | background: #f7f7f7; |
| | | padding: 30rpx 30rpx 180rpx; |
| | | margin: 0 -30rpx; |
| | | .title { |
| | | line-height: 40rpx; |
| | | margin-bottom: 22rpx; |
| | | } |
| | | .line { |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | line-height: 36rpx; |
| | | } |
| | | } |
| | | .main_app { |
| | | padding-bottom: 0; |
| | | // padding-top: 10rpx; |
| | | padding-bottom: 0; |
| | | // padding-top: 10rpx; |
| | | } |
| | | |
| | | .empty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="app_header"> |
| | | <view class="item" @click="isShowDate = true"> |
| | | <text v-if="param.queryDate">{{ param.queryDate }}</text> |
| | | <text v-else class="placeholder9">éæ©æ¥æ</text> |
| | | <u-icon class="ml12" name="arrow-down" color="#999999" /> |
| | | </view> |
| | | <view class="item" @click="isShowCar = true"> |
| | | <text v-if="param.carCode">{{ param.carCode }}</text> |
| | | <text v-else class="placeholder9">éæ©è½¦è¾</text> |
| | | <u-icon class="ml12" name="arrow-down" color="#999999" /> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="box_list"> |
| | | <view |
| | | class="box_list_item" |
| | | v-for="(item, index) in dataList" |
| | | :key="index" |
| | | > |
| | | <view class="box_list_item_head"> |
| | | <text>{{ item.carCode }}</text> |
| | | <text class="loading" v-if="item.status == '0'">ç³è¯·ä¸</text> |
| | | <text class="grr" v-if="item.status == '1'">审æ¹ä¸</text> |
| | | <text class="grr" v-if="item.status == '2'">审æ¹éè¿</text> |
| | | <text class="error" v-if="item.status == '3'">审æ¹ä¸éè¿</text> |
| | | <text class="grr" v-if="item.status == '4'">已忶</text> |
| | | </view> |
| | | <view class="box_list_item_nr"> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>å¼å§æ¶é´ï¼</text> |
| | | <text>{{ item.startTime.slice(5, 16) }}</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>ç»ææ¶é´ï¼</text> |
| | | <text>{{ item.endTime.slice(5, 16) }}</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>é¢çº¦äººï¼</text> |
| | | <text>{{ item.memberName }}</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>ç®çå°ï¼</text> |
| | | <text>{{ item.addr }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- éæ©è½¦è¾ --> |
| | | <u-picker |
| | | keyName="code" |
| | | :show="isShowCar" |
| | | @close="isShowCar = false" |
| | | :closeOnClickOverlay="true" |
| | | :columns="carsList" |
| | | @confirm="seletedCar" |
| | | @cancel="isShowCar = false" |
| | | ></u-picker> |
| | | <!-- æ¥æ --> |
| | | <u-datetime-picker |
| | | mode="date" |
| | | :show="isShowDate" |
| | | :minDate="minDate" |
| | | @close="isShowDate = false" |
| | | :closeOnClickOverlay="true" |
| | | @confirm="seletedDate" |
| | | @cancel="isShowDate = false" |
| | | /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { carUseBookPaiche, getCarsList } from '@/api' |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | data() { |
| | | return { |
| | | isShowCar: false, |
| | | isShowDate: false, |
| | | carsList: [], |
| | | param: { |
| | | memberId: uni.getStorageSync('userInfo').memberId |
| | | }, |
| | | minDate: '', |
| | | pagination: { |
| | | page: 0, |
| | | capacity: 10 |
| | | }, |
| | | total: 0, |
| | | dataList: [] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.minDate = new Date(dayjs().format('YYYY') + '-01-01').getTime() |
| | | // this.param.queryDate = dayjs().format('YYYY-MM-DD') |
| | | this.getList() |
| | | this.initData() |
| | | }, |
| | | onReachBottom() { |
| | | if (this.total > 10) { |
| | | this.getList() |
| | | } |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | const { param, pagination } = this |
| | | pagination.page = pagination.page + 1 |
| | | carUseBookPaiche({ |
| | | ...pagination, |
| | | model: { ...param } |
| | | }).then(res => { |
| | | if (pagination.page === 1) { |
| | | this.dataList = res.data.records |
| | | } else { |
| | | this.dataList = [...list, ...res.data.records] |
| | | } |
| | | this.total = res.data.total |
| | | }) |
| | | }, |
| | | seletedCar(e) { |
| | | const item = e.value[0] |
| | | this.$set(this.param, 'carCode', item.code) |
| | | this.$set(this.param, 'carId', item.id) |
| | | this.isShowCar = false |
| | | if (this.param.carId && this.param.queryDate) { |
| | | this.pagination.page = 0 |
| | | this.getList() |
| | | } |
| | | }, |
| | | seletedDate(e) { |
| | | this.param.queryDate = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.isShowDate = false |
| | | if (this.param.carId && this.param.queryDate) { |
| | | this.pagination.page = 0 |
| | | this.getList() |
| | | } |
| | | }, |
| | | endtimeClose() { |
| | | this.param.endTime = '' |
| | | this.param.startTime = '' |
| | | this.isShowEndDate = false |
| | | }, |
| | | timeFilter(mode, options) { |
| | | if (mode === 'minute') { |
| | | return options.filter(option => option === '00' || option === '30' || option === '60') |
| | | } |
| | | return options |
| | | }, |
| | | initData() { |
| | | getCarsList({ |
| | | type: 1 |
| | | }).then(res => { |
| | | this.carsList = [res.data] |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .main_app { |
| | | background: #f7f7f7; |
| | | padding: 0; |
| | | } |
| | | .app_header { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 -15rpx; |
| | | background-color: #fff; |
| | | .item { |
| | | width: 360rpx; |
| | | height: 72rpx; |
| | | margin: 15rpx; |
| | | padding: 0 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | } |
| | | .box_list { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | .box_list_item { |
| | | width: 100%; |
| | | margin-bottom: 20rpx; |
| | | &:last-child { |
| | | margin: 0 !important; |
| | | } |
| | | .box_list_item_head { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%); |
| | | border-radius: 8rpx 8rpx 0rpx 0rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .loading { |
| | | color: #4c99a8; |
| | | } |
| | | .success { |
| | | color: #03c68f; |
| | | } |
| | | .error { |
| | | color: #e0312a; |
| | | } |
| | | .grr{ |
| | | color: #999999; |
| | | } |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | } |
| | | } |
| | | } |
| | | .box_list_item_nr { |
| | | padding: 30rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | background-color: #ffffff; |
| | | .box_list_item_nr_item { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20rpx; |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #666666; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="app_header"> |
| | | <view class="item" @click="isShowCar = true"> |
| | | <text v-if="false">xx</text> |
| | | <text v-else class="placeholder9">éæ©è½¦è¾</text> |
| | | <u-icon name="arrow-down" color="#999999" /> |
| | | </view> |
| | | <view class="item" @click="isShowDate = true"> |
| | | <text v-if="param.aa">{{ param.aa }}</text> |
| | | <text v-else class="placeholder9">éæ©æ¥æ</text> |
| | | <u-icon name="arrow-down" color="#999999" /> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="time_list"> |
| | | <view class="item" v-for="item,i in timeList" :key="i">{{ item.time }}</view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_footer"> |
| | | <view class="df_ac"> |
| | | <view>已鿩ï¼</view> |
| | | <view class="sel_time">xxxxxx</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="left"> |
| | | <view class="item" v-for="item in colorOptions" :key="item.name"> |
| | | <view class="box" :style="{ background: item.color }"></view> |
| | | <view class="">{{ item.name }}</view> |
| | | </view> |
| | | </view> |
| | | <view class="sub" @click="$jump('/pages/staff/vehicle/apply')">确认é¢çº¦</view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <!-- éæ©è½¦è¾ --> |
| | | <u-picker keyName="name" :show="isShowCar" :columns="carList" @confirm="seletedCar" @cancel="isShowCar = false"></u-picker> |
| | | <!-- æ¥æ --> |
| | | <u-datetime-picker :show="isShowDate" :minDate="minDate" @confirm="confirmDate" @cancel="isShowDate = false" mode="date"></u-datetime-picker> |
| | | </view> |
| | | <view class="main_app"> |
| | | <view class="app_header"> |
| | | <view class="item" @click="isShowCar = true"> |
| | | <text v-if="param.carCode">{{ param.carCode }}</text> |
| | | <text v-else class="placeholder9">éæ©è½¦è¾</text> |
| | | <u-icon name="arrow-down" color="#999999" /> |
| | | </view> |
| | | <view class="item" @click="isShowDate = true"> |
| | | <text v-if="param.queryDate">{{ param.queryDate }}</text> |
| | | <text v-else class="placeholder9">éæ©æ¥æ</text> |
| | | <u-icon name="arrow-down" color="#999999" /> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="time_list"> |
| | | <view |
| | | class="item" |
| | | :class="{ disable: item.isUse == 1, active: item.checked == '1' }" |
| | | @click="datetimeClick(item, i)" |
| | | v-for="(item, i) in timeList" |
| | | :key="i" |
| | | >{{ item.startHours }}-{{ item.endHours }}</view |
| | | > |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_footer"> |
| | | <view class="df_ac"> |
| | | <view>已鿩ï¼</view> |
| | | <view class="sel_time">{{ selDatetime }}</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="left"> |
| | | <view class="item" v-for="item in colorOptions" :key="item.name"> |
| | | <view class="box" :style="{ background: item.color }"></view> |
| | | <view class="">{{ item.name }}</view> |
| | | </view> |
| | | </view> |
| | | <view class="sub" @click="onSubmit">确认é¢çº¦</view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <!-- éæ©è½¦è¾ --> |
| | | <u-picker |
| | | keyName="code" |
| | | :show="isShowCar" |
| | | :columns="carsList" |
| | | @confirm="seletedCar" |
| | | @cancel="isShowCar = false" |
| | | ></u-picker> |
| | | <!-- æ¥æ --> |
| | | <u-datetime-picker |
| | | :show="isShowDate" |
| | | :minDate="minDate" |
| | | @confirm="confirmDate" |
| | | @cancel="isShowDate = false" |
| | | mode="date" |
| | | ></u-datetime-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs' |
| | | import { getCarsList, carCanReservationDate } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | isShowCar: false, |
| | | isShowDate: false, |
| | | param: {}, |
| | | |
| | | minDate: '', |
| | | carList: [[{ name: 'aa', value: '11' }]], |
| | | timeList: [ |
| | | { time: '08:30-09:00' }, |
| | | { time: '08:30-09:00' }, |
| | | { time: '08:30-09:00' }, |
| | | { time: '08:30-09:00' }, |
| | | ], |
| | | |
| | | colorOptions: [ |
| | | { color: '#279BAA', name: '已鿩' }, |
| | | { color: '#F7F7F7', name: 'å¯é¢çº¦' }, |
| | | { color: '#cccccc', name: 'ä¸å¯é¢çº¦' }, |
| | | ] |
| | | }; |
| | | }, |
| | | created(){ |
| | | this.minDate = new Date().getTime() |
| | | }, |
| | | methods: { |
| | | confirmDate(e) { |
| | | console.log(e.value); |
| | | this.param.aa = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.isShowDate = false |
| | | }, |
| | | seletedCar(e) { |
| | | console.log(e.value); |
| | | this.param.aa = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.isShowDate = false |
| | | } |
| | | } |
| | | data() { |
| | | return { |
| | | isShowCar: false, |
| | | isShowDate: false, |
| | | param: {}, |
| | | |
| | | minDate: '', |
| | | carsList: [[{ name: 'aa', value: '11' }]], |
| | | timeList: [], |
| | | selDatetime: '', |
| | | |
| | | colorOptions: [ |
| | | { color: '#279BAA', name: '已鿩' }, |
| | | { color: '#F7F7F7', name: 'å¯é¢çº¦' }, |
| | | { color: '#cccccc', name: 'ä¸å¯é¢çº¦' }, |
| | | ] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.minDate = new Date().getTime() |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | const { param } = this |
| | | const selTimeList = this.timeList.filter(i => i.checked == '1') |
| | | if (selTimeList.length == -1) { |
| | | return uni.showToast({ |
| | | title: '请å
éæ©ç¨è½¦æ¶é´æ®µ', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | const obj = { |
| | | carCode: param.carCode, |
| | | carId: param.carId , |
| | | startTime: selTimeList[0].startTime, |
| | | endTime: selTimeList[selTimeList.length - 1].endTime, |
| | | dateDay: param.queryDate, |
| | | type: '0' |
| | | } |
| | | uni.navigateTo({ |
| | | url: `/pages/staff/vehicle/apply?carCode=${obj.carCode}&carId=${obj.carId}&startTime=${obj.startTime}&endTime=${obj.endTime}&dateDay=${obj.dateDay}&type=${obj.type}` |
| | | }) |
| | | // this.$jump('/pages/staff/vehicle/apply') |
| | | }, |
| | | datetimeClick(item, index) { |
| | | if(item.isUse == '1') return |
| | | const { timeList } = this |
| | | const selTimeList = timeList.filter(i => i.checked == '1') |
| | | if (selTimeList.length === 0) { |
| | | this.timeList.forEach((ite, i) => { |
| | | if (i === index) { |
| | | ite.checked = '1' |
| | | this.$forceUpdate() |
| | | } |
| | | }) |
| | | } else { |
| | | const findIndex = selTimeList.findIndex(i => i.index === index) |
| | | console.log('findIndex', findIndex) |
| | | if (findIndex === -1) { |
| | | const startNum = index - selTimeList[0].index |
| | | const endNum = index - selTimeList[selTimeList.length - 1].index |
| | | if (startNum == 1 || startNum == -1 || endNum == 1 || endNum == -1) { |
| | | console.log('ç¸é»') |
| | | item.checked = true |
| | | this.$forceUpdate() |
| | | } else { |
| | | return uni.showToast({ |
| | | title: 'è¯·éæ©ç¸é»çæ¶é´æ®µ', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } else { |
| | | if (index === selTimeList[0].index || index === selTimeList[selTimeList.length - 1].index) { |
| | | item.checked = false |
| | | this.$forceUpdate() |
| | | } else { |
| | | return uni.showToast({ |
| | | title: '请å
åæ¶æå¤å±çæ¶é´æ®µ', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | const selTimeLists = this.timeList.filter(i => i.checked == '1') |
| | | // console.log('selTimeList', selTimeList); |
| | | if (selTimeLists.length === 0) { |
| | | this.selDatetime = '' |
| | | } else { |
| | | this.selDatetime = this.param.queryDate.slice(5) + ' ' + selTimeLists[0].startHours + '-' + selTimeLists[selTimeLists.length - 1].endHours |
| | | } |
| | | // if(true){ |
| | | // this.selDatetime.push(item) |
| | | // } |
| | | }, |
| | | confirmDate(e) { |
| | | this.param.queryDate = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.isShowDate = false |
| | | if(this.param.carId && this.param.queryDate){ |
| | | this.gettimes() |
| | | } |
| | | }, |
| | | initData() { |
| | | getCarsList({ |
| | | type: 1 |
| | | }).then(res => { |
| | | this.carsList = [res.data] |
| | | }) |
| | | }, |
| | | gettimes() { |
| | | const { param } = this |
| | | carCanReservationDate({ |
| | | dateDay: param.queryDate, |
| | | carId: param.carId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.timeList = res.data || [] |
| | | this.timeList.forEach((i, j) => { |
| | | i.checked = '0', |
| | | i.index = j |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | seletedCar(e) { |
| | | const item = e.value[0] |
| | | this.$set(this.param, 'carCode', item.code) |
| | | this.$set(this.param, 'carId', item.id) |
| | | if(this.param.carId && this.param.queryDate){ |
| | | this.gettimes() |
| | | } |
| | | this.isShowCar = false |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .main_app { |
| | | .app_header { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 -15rpx; |
| | | .item { |
| | | width: 330rpx; |
| | | height: 72rpx; |
| | | margin: 15rpx; |
| | | padding: 0 30rpx; |
| | | border-radius: 36rpx; |
| | | border: 1rpx solid #e5e5e5; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | } |
| | | .main_footer{ |
| | | position: absolute; |
| | | width: 100%; |
| | | left: 0; |
| | | bottom: 0; |
| | | padding: 20rpx 30rpx 84rpx; |
| | | box-shadow: 0rpx -3rpx 6rpx 0rpx #EEEEEE; |
| | | .sel_time{ |
| | | color: #279BAA; |
| | | } |
| | | .btns{ |
| | | margin-top: 10rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .left{ |
| | | display: flex; |
| | | .item{ |
| | | display: flex; |
| | | align-items: center; |
| | | margin-right: 20rpx; |
| | | .box{ |
| | | margin-right: 10rpx; |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | } |
| | | } |
| | | } |
| | | .sub{ |
| | | width: 184rpx; |
| | | height: 72rpx; |
| | | line-height: 72rpx; |
| | | text-align: center; |
| | | background: #279BAA; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE; |
| | | border-radius: 36rpx; |
| | | font-size: 30rpx; |
| | | color: #FFFFFF; |
| | | } |
| | | } |
| | | } |
| | | .time_list{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 30rpx 0; |
| | | flex-wrap: wrap; |
| | | .item{ |
| | | width: 220rpx; |
| | | height: 80rpx; |
| | | line-height: 80rpx; |
| | | text-align: center; |
| | | background: #F7F7F7; |
| | | border-radius: 4rpx; |
| | | margin-bottom: 24rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | .active{ |
| | | background-color: #279BAA; |
| | | color: #fff; |
| | | } |
| | | .disable{ |
| | | background-color: #cccccc; |
| | | color: #999999; |
| | | } |
| | | } |
| | | |
| | | .app_header { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 -15rpx; |
| | | .item { |
| | | width: 330rpx; |
| | | height: 72rpx; |
| | | margin: 15rpx; |
| | | padding: 0 30rpx; |
| | | border-radius: 36rpx; |
| | | border: 1rpx solid #e5e5e5; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | } |
| | | .main_footer { |
| | | position: absolute; |
| | | width: 100%; |
| | | left: 0; |
| | | bottom: 0; |
| | | padding: 20rpx 30rpx 84rpx; |
| | | box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee; |
| | | .sel_time { |
| | | color: #279baa; |
| | | } |
| | | .btns { |
| | | margin-top: 10rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .left { |
| | | display: flex; |
| | | .item { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-right: 20rpx; |
| | | .box { |
| | | margin-right: 10rpx; |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | } |
| | | } |
| | | } |
| | | .sub { |
| | | width: 184rpx; |
| | | height: 72rpx; |
| | | line-height: 72rpx; |
| | | text-align: center; |
| | | background: #279baa; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee; |
| | | border-radius: 36rpx; |
| | | font-size: 30rpx; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | } |
| | | .time_list { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 30rpx 0; |
| | | flex-wrap: wrap; |
| | | .item { |
| | | width: 220rpx; |
| | | height: 80rpx; |
| | | line-height: 80rpx; |
| | | text-align: center; |
| | | background: #f7f7f7; |
| | | border-radius: 4rpx; |
| | | margin-bottom: 24rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | .active { |
| | | background-color: #279baa; |
| | | color: #fff; |
| | | } |
| | | .disable { |
| | | background-color: #cccccc; |
| | | color: #999999; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>éæ©è½¦è¾</text> |
| | | </view> |
| | | <view class="value" @click="isShowCar = true"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡ç¨è½¦æ¶æ®µ</text> |
| | | </view> |
| | | <view class="value" @click="isShowDate = true"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="have_info"> |
| | | <view class="tit">æ¨ç³è¯·çç¨è½¦æ¶æ®µå·²æè½¦è¾é¢çº¦</view> |
| | | <view class="content"> |
| | | <view class="card">çA1212</view> |
| | | <view class="line"> |
| | | <text>ç¨è½¦æ¶æ®µ</text> |
| | | <text>111111</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç®çå°</text> |
| | | <text>111111</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ä¹è½¦äººæ°</text> |
| | | <text>111111</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç¨è½¦äºç±</text> |
| | | <text>111111</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç³è¯·äºº</text> |
| | | <text>111111</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="main_footer"> |
| | | <text>已鿩ï¼</text> |
| | | <text class="sel">132123</text> |
| | | <text class="btn" @click="$jump('/pages/staff/vehicle/apply')">确认é¢çº¦</text> |
| | | </view> |
| | | <!-- --> |
| | | <!-- éæ©è½¦è¾ --> |
| | | <u-picker |
| | | keyName="name" |
| | | :show="isShowCar" |
| | | @close="isShowCar = false" |
| | | :closeOnClickOverlay="true" |
| | | :columns="carList" |
| | | @confirm="seletedCar" |
| | | @cancel="isShowCar = false" |
| | | ></u-picker> |
| | | <u-datetime-picker |
| | | mode="datetime" |
| | | keyName="name" |
| | | :show="isShowDate" |
| | | :filter="timeFilter" |
| | | @close="isShowDate = false" |
| | | :closeOnClickOverlay="true" |
| | | @confirm="seletedDate" |
| | | @cancel="isShowDate = false" |
| | | /> |
| | | |
| | | </view> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>éæ©è½¦è¾</text> |
| | | </view> |
| | | <view class="value" @click="isShowCar = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.carCode ? '#000000' : '#999999' }" |
| | | >{{ param.carCode ? param.carCode : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡ç¨è½¦æ¶æ®µ</text> |
| | | </view> |
| | | <view class="value" @click="isShowDate = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.startTime ? '#999999' : '#999999' }" |
| | | > |
| | | <template v-if="param.startTime"> |
| | | {{ param.startHours }}è³{{ param.endHours }} |
| | | </template> |
| | | <template v-else> è¯·éæ© </template> |
| | | </text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="have_info" v-if="info && info.length > 0"> |
| | | <view class="tit">æ¨ç³è¯·çç¨è½¦æ¶æ®µå·²æè½¦è¾é¢çº¦</view> |
| | | <view class="content" v-for="item,i in info" :key="i"> |
| | | <view class="card">{{ item.carCode }}</view> |
| | | <view class="line"> |
| | | <text>ç¨è½¦æ¶æ®µ</text> |
| | | <text> |
| | | {{ item.startTime.slice(5, 16) }}è³{{ |
| | | item.endTime.slice(5, 16) |
| | | }}</text |
| | | > |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç®çå°</text> |
| | | <text>{{ item.addr }}</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ä¹è½¦äººæ°</text> |
| | | <text>{{ item.memberIds.split(",").length }}人</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç¨è½¦äºç±</text> |
| | | <text>{{ item.content }}</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç³è¯·äºº</text> |
| | | <text>{{ item.memberName }} {{ item.memberMobile}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="main_footer"> |
| | | <text>已鿩ï¼</text> |
| | | <text class="sel" v-if="param.startTime" |
| | | >{{ param.startHours }}è³{{ param.endHours }}</text |
| | | > |
| | | <text class="btn" @click="onSubmit">确认é¢çº¦</text> |
| | | </view> |
| | | <!-- --> |
| | | <!-- éæ©è½¦è¾ --> |
| | | <u-picker |
| | | keyName="code" |
| | | :show="isShowCar" |
| | | @close="isShowCar = false" |
| | | :closeOnClickOverlay="true" |
| | | :columns="carsList" |
| | | @confirm="seletedCar" |
| | | @cancel="isShowCar = false" |
| | | ></u-picker> |
| | | <u-datetime-picker |
| | | mode="datetime" |
| | | :show="isShowDate" |
| | | :filter="timeFilter" |
| | | title="å¼å§æ¶é´" |
| | | :minDate="minDate" |
| | | @close="isShowDate = false" |
| | | :closeOnClickOverlay="true" |
| | | @confirm="seletedDate" |
| | | @cancel="isShowDate = false" |
| | | /> |
| | | <u-datetime-picker |
| | | mode="datetime" |
| | | :show="isShowEndDate" |
| | | :filter="timeFilter" |
| | | title="ç»ææ¶é´" |
| | | :minDate="new Date(param.startTime || null).getTime()" |
| | | @close="endtimeClose" |
| | | :closeOnClickOverlay="true" |
| | | @confirm="seletedEndDate" |
| | | @cancel="endtimeClose" |
| | | /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getCarsList, carUseBookList } from '@/api' |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | isShowCar: false, |
| | | isShowDate: false, |
| | | carList: [], |
| | | datetimeOp: [] |
| | | }; |
| | | }, |
| | | methods: { |
| | | seletedCar() {}, |
| | | seletedDate() { |
| | | this.isShowDate = false; |
| | | }, |
| | | timeFilter(mode, options) { |
| | | if (mode === 'minute') { |
| | | return options.filter(option => option === '00' || option === '30'); |
| | | } |
| | | return options; |
| | | } |
| | | } |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | isShowCar: false, |
| | | isShowDate: false, |
| | | isShowEndDate: false, |
| | | carsList: [], |
| | | info: [], |
| | | |
| | | minDate: '' |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.minDate = new Date(dayjs().format('YYYY-MM-DD HH:') + '00:00').getTime() |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | const { param, info } = this |
| | | if (info.length > 0) return uni.showToast({ |
| | | title: 'è¯·éæ°éæ©æ¶é´æ®µ', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.startTime) return uni.showToast({ |
| | | title: '请å
éæ©ç¨è½¦æ¶é´æ®µ', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.carId) return uni.showToast({ |
| | | title: 'è¯·éæ©è½¦è¾', |
| | | icon: 'none' |
| | | }) |
| | | const obj = { |
| | | carCode: param.carCode, |
| | | carId: param.carId, |
| | | startTime: param.startTime, |
| | | endTime: param.endTime, |
| | | type: '1' |
| | | } |
| | | uni.navigateTo({ |
| | | url: `/pages/staff/vehicle/apply?carCode=${obj.carCode}&carId=${obj.carId}&startTime=${obj.startTime}&endTime=${obj.endTime}&type=${obj.type}` |
| | | }) |
| | | // this.$jump('/pages/staff/vehicle/apply') |
| | | }, |
| | | getInfo() { |
| | | const { param } = this |
| | | carUseBookList({ |
| | | carId: param.carId, |
| | | startTime: param.startTime, |
| | | endTime: param.endTime, |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.info = res.data |
| | | } |
| | | }) |
| | | }, |
| | | seletedCar(e) { |
| | | const item = e.value[0] |
| | | this.$set(this.param, 'carCode', item.code) |
| | | this.$set(this.param, 'carId', item.id) |
| | | this.isShowCar = false |
| | | if (this.param.carId && this.param.startTime) { |
| | | this.getInfo() |
| | | } |
| | | }, |
| | | seletedDate(e) { |
| | | this.param.startTime = dayjs(e.value).format('YYYY-MM-DD HH:mm:ss') |
| | | this.param.startHours = dayjs(e.value).format('MM-DD HH:mm') |
| | | console.log(this.param.startTime) |
| | | this.isShowDate = false |
| | | this.isShowEndDate = true |
| | | }, |
| | | seletedEndDate(e) { |
| | | this.param.endTime = dayjs(e.value).format('YYYY-MM-DD HH:mm:ss') |
| | | this.param.endHours = dayjs(e.value).format('MM-DD HH:mm') |
| | | console.log(this.param.endTime) |
| | | this.isShowEndDate = false |
| | | if (this.param.carId && this.param.startTime) { |
| | | this.getInfo() |
| | | } |
| | | this.$forceUpdate() |
| | | }, |
| | | endtimeClose() { |
| | | this.param.endTime = '' |
| | | this.param.startTime = '' |
| | | this.isShowEndDate = false |
| | | }, |
| | | timeFilter(mode, options) { |
| | | if (mode === 'minute') { |
| | | return options.filter(option => option === '00' || option === '30' || option === '60') |
| | | } |
| | | return options |
| | | }, |
| | | initData() { |
| | | getCarsList({ |
| | | type: 1 |
| | | }).then(res => { |
| | | this.carsList = [res.data] |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .have_info { |
| | | .tit { |
| | | color: #ed4545; |
| | | margin: 40rpx 0 24rpx; |
| | | } |
| | | .content { |
| | | background: #f7f7f7; |
| | | border-radius: 16rpx; |
| | | padding: 30rpx 30rpx 10rpx; |
| | | .card { |
| | | margin-bottom: 30rpx; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #222222; |
| | | background: #f7f7f7; |
| | | padding: 0; |
| | | } |
| | | .line { |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | text { |
| | | &:nth-of-type(1) { |
| | | width: 150rpx; |
| | | color: #888888; |
| | | } |
| | | &:nth-of-type(2) { |
| | | flex: 1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | padding: 0 0 200rpx; |
| | | .tit { |
| | | color: #ed4545; |
| | | margin: 40rpx 0 24rpx; |
| | | } |
| | | .content { |
| | | background: #f7f7f7; |
| | | border-radius: 16rpx; |
| | | padding: 30rpx 30rpx 10rpx; |
| | | margin-bottom: 20rpx; |
| | | .card { |
| | | margin-bottom: 30rpx; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #222222; |
| | | background: #f7f7f7; |
| | | padding: 0; |
| | | } |
| | | .line { |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | text { |
| | | &:nth-of-type(1) { |
| | | width: 150rpx; |
| | | color: #888888; |
| | | } |
| | | &:nth-of-type(2) { |
| | | flex: 1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .main_wrap { |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | textarea { |
| | | margin-top: 12rpx; |
| | | width: 100%; |
| | | height: 180rpx; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border: 2rpx solid #e5e5e5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | textarea { |
| | | margin-top: 12rpx; |
| | | width: 100%; |
| | | height: 180rpx; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border: 2rpx solid #e5e5e5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .main_footer { |
| | | position: absolute; |
| | | width: 100%; |
| | | left: 0; |
| | | bottom: 0; |
| | | padding: 20rpx 30rpx 84rpx; |
| | | box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .btn { |
| | | width: 184rpx; |
| | | height: 72rpx; |
| | | line-height: 72rpx; |
| | | text-align: center; |
| | | background: #279baa; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee; |
| | | border-radius: 36rpx; |
| | | font-size: 30rpx; |
| | | color: #ffffff; |
| | | } |
| | | .sel { |
| | | color: #279baa; |
| | | flex: 1; |
| | | } |
| | | position: fixed; |
| | | width: 100%; |
| | | left: 0; |
| | | background-color: #fff; |
| | | bottom: 0; |
| | | padding: 20rpx 30rpx 84rpx; |
| | | box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .btn { |
| | | width: 184rpx; |
| | | height: 72rpx; |
| | | line-height: 72rpx; |
| | | text-align: center; |
| | | background: #279baa; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee; |
| | | border-radius: 36rpx; |
| | | font-size: 30rpx; |
| | | color: #ffffff; |
| | | } |
| | | .sel { |
| | | color: #279baa; |
| | | flex: 1; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="visit"> |
| | | <view class="list"> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>被访人å§å</text> |
| | | </view> |
| | | <view class="list_item_content"><input type="text" placeholder="请è¾å
¥å§å" v-model="form1.receptMemberName" @blur="getUser" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>å
¥åæ¶é´</text> |
| | | </view> |
| | | <view class="list_item_content" @click="show4 = true"> |
| | | <text :style="{ color: form1.starttime ? '#000000' : '' }">{{ form1.starttime ? form1.starttime : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>ç¦»åæ¶é´</text> |
| | | </view> |
| | | <view class="list_item_content" @click="openLC"> |
| | | <text :style="{ color: form1.endtime ? '#000000' : '' }">{{ form1.endtime ? form1.endtime : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </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> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>ææºå·</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input |
| | | type="number" |
| | | maxlength="11" |
| | | v-model="form1.phone1" |
| | | :placeholder="'请è¾å
¥èç³»äººææºå·'" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <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> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>å
¥å车è¾</text> |
| | | </view> |
| | | <view class="list_item_content" @click="openInput(1)"> |
| | | <text :style="{ color: form1.carNos ? '#000000' : '' }">{{ form1.carNos ? form1.carNos : '请è¾å
¥è½¦çå·ç ' }}</text> |
| | | <!-- <input type="text" placeholder="请è¾å
¥è½¦çå·" v-model="form1.carNos" maxlength="8" placeholder-style="color: #999999;" /> --> |
| | | </view> |
| | | </view> |
| | | <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> |
| | | </view> |
| | | <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> |
| | | </view> |
| | | </view> |
| | | <view class="zw"></view> |
| | | <view class="footer"><view class="footer_btn" @click="submit">æäº¤</view></view> |
| | | <!-- å
¥åºæ¶é´ --> |
| | | <u-datetime-picker :show="show4" :minDate="new Date().getTime()" mode="datetime" @cancel="show4 = false" @confirm="setinDate"></u-datetime-picker> |
| | | <!-- ç¦»åºæ¶é´ --> |
| | | <u-datetime-picker |
| | | v-if="form1.starttime" |
| | | :show="show5" |
| | | :minDate="formatTimeStamp(form1.starttime)" |
| | | :maxDate="formatTimeStamp(maxTime)" |
| | | mode="datetime" |
| | | @cancel="show5 = false" |
| | | @confirm="setoutDate" |
| | | ></u-datetime-picker> |
| | | <!-- è½¦è¾ --> |
| | | <u-popup :show="show2" :round="10" :safeAreaInsetBottom="true" :closeable="true" mode="bottom" @close="show2 = false"> |
| | | <view class="addcar"> |
| | | <view class="addcar_head">æ·»å 车è¾</view> |
| | | <view class="addcar_ipt"><input type="text" v-model="carName" placeholder="请è¾å
¥è½¦çå·" /></view> |
| | | <view class="addcar_footer"> |
| | | <view class="addcar_footer_item" @click="show2 = false">åæ¶</view> |
| | | <view class="addcar_footer_item t" @click="submitCart">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <u-picker keyName="name" :show="show6" :columns="columns1" @confirm="seleIdcard" @cancel="show6 = 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> |
| | | </view> |
| | | <view class="visit"> |
| | | <view class="list"> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>被访人å§å</text> |
| | | </view> |
| | | <view class="list_item_content" @click="showName = true"> |
| | | <text :style="{ color: form1.receptMemberName ? '#000000' : '' }">{{ |
| | | form1.receptMemberName |
| | | ? form1.receptMemberName + " " + form1.receptCompanyName |
| | | : "è¯·éæ©" |
| | | }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>å
¥åæ¶é´</text> |
| | | </view> |
| | | <view class="list_item_content" @click="show4 = true"> |
| | | <text :style="{ color: form1.starttime ? '#000000' : '' }">{{ |
| | | form1.starttime ? form1.starttime : "è¯·éæ©" |
| | | }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>ç¦»åæ¶é´</text> |
| | | </view> |
| | | <view class="list_item_content" @click="openLC"> |
| | | <text :style="{ color: form1.endtime ? '#000000' : '' }">{{ |
| | | form1.endtime ? form1.endtime : "è¯·éæ©" |
| | | }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </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.name" |
| | | placeholder="请è¾å
¥è系人å§å" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>ææºå·</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input |
| | | type="number" |
| | | maxlength="13" |
| | | v-model="form1.phone" |
| | | :placeholder="'请è¾å
¥èç³»äººææºå·'" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <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.companyName" |
| | | placeholder="请è¾å
¥æ¥è®¿åä½çå
¨ç§°" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>å
¥å车è¾</text> |
| | | </view> |
| | | <view class="list_item_content" @click="openInput(1)"> |
| | | <text :style="{ color: form1.carNos ? '#000000' : '' }">{{ |
| | | form1.carNos ? form1.carNos : "请è¾å
¥è½¦çå·ç " |
| | | }}</text> |
| | | <!-- <input type="text" placeholder="请è¾å
¥è½¦çå·" v-model="form1.carNos" maxlength="8" placeholder-style="color: #999999;" /> --> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>é车人æ°</text> |
| | | </view> |
| | | <view class="list_item_content" |
| | | ><input |
| | | type="number" |
| | | v-model="form1.memberNum" |
| | | placeholder="请è¾å
¥éè½¦äººåæ»æ°" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <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> |
| | | </view> |
| | | </view> |
| | | <view class="zw"></view> |
| | | <view class="footer" |
| | | ><view class="footer_btn" @click="submit">æäº¤</view></view |
| | | > |
| | | <!-- å
¥åºæ¶é´ --> |
| | | <u-datetime-picker |
| | | :show="show4" |
| | | :minDate="new Date().getTime()" |
| | | mode="datetime" |
| | | @cancel="show4 = false" |
| | | @confirm="setinDate" |
| | | ></u-datetime-picker> |
| | | <!-- ç¦»åºæ¶é´ --> |
| | | <u-datetime-picker |
| | | v-if="form1.starttime" |
| | | :show="show5" |
| | | :minDate="formatTimeStamp(form1.starttime)" |
| | | :maxDate="formatTimeStamp(maxTime)" |
| | | mode="datetime" |
| | | @cancel="show5 = false" |
| | | @confirm="setoutDate" |
| | | ></u-datetime-picker> |
| | | <!-- è½¦è¾ --> |
| | | <u-popup |
| | | :show="show2" |
| | | :round="10" |
| | | :safeAreaInsetBottom="true" |
| | | :closeable="true" |
| | | mode="bottom" |
| | | @close="show2 = false" |
| | | > |
| | | <view class="addcar"> |
| | | <view class="addcar_head">æ·»å 车è¾</view> |
| | | <view class="addcar_ipt" |
| | | ><input type="text" v-model="carName" placeholder="请è¾å
¥è½¦çå·" |
| | | /></view> |
| | | <view class="addcar_footer"> |
| | | <view class="addcar_footer_item" @click="show2 = false">åæ¶</view> |
| | | <view class="addcar_footer_item t" @click="submitCart">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <u-picker |
| | | keyName="name" |
| | | :show="showName" |
| | | closeOnClickOverlay |
| | | :columns="memberList" |
| | | @confirm="seleteName" |
| | | @cancel="showName = false" |
| | | @close="showName = 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> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import tlyPictureCut from '@/components/tly-picture-cut/tlyPictureCut.vue'; |
| | | 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 tlyPictureCut from '@/components/tly-picture-cut/tlyPictureCut.vue' |
| | | 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' |
| | | export default { |
| | | data() { |
| | | return { |
| | | photoSrc: '', |
| | | type: '', |
| | | inputType: '', |
| | | show1: false, |
| | | show2: false, |
| | | show4: false, |
| | | show5: false, |
| | | show6: false, |
| | | show7: false, |
| | | fileList: [], |
| | | columns1: [[{ name: '身份è¯', id: 0 }, { name: '港澳è¯ä»¶', id: 1 }, { name: 'æ¤ç
§', id: 2 }]], |
| | | columnsNames: [[{ name: 'å¼ ä¸', id: 0 }, { name: 'å¼ ä¸', id: 1 }, { name: 'å¼ ä¸', id: 2 }]], |
| | | columns: [], |
| | | cars: [], |
| | | day: null, |
| | | maxTime: '', |
| | | carName: '', |
| | | personnel: [], |
| | | userAnswerId: '', |
| | | form1: { |
| | | phone1: '', |
| | | receptMemberId: '', |
| | | receptMemberName: '', |
| | | starttime: '', |
| | | endtime: '', |
| | | doors: '', |
| | | doorSelectName: '', |
| | | reason: '', |
| | | carNos: '' |
| | | }, |
| | | withUserList: { |
| | | name: '', |
| | | phone: '', |
| | | idcardType: '', |
| | | idcardTypeName: '', |
| | | companyName: '', |
| | | idcardNo: '', |
| | | faceImg: '', |
| | | faceImgUrl: '', |
| | | imgurl: '', |
| | | imgurlUrl: '' |
| | | }, |
| | | visit: '', |
| | | form: {}, |
| | | accessControl: '', |
| | | verify: '' |
| | | }; |
| | | }, |
| | | components: { tlyPictureCut, keyboardInput, QfImageCropper }, |
| | | onLoad(options) { |
| | | if (options.data) { |
| | | this.form = JSON.parse(options.data); |
| | | } |
| | | // this.getvisit() |
| | | // this.getVisit1() |
| | | // this.getUserValid() |
| | | }, |
| | | methods: { |
| | | openInput(type) { |
| | | this.inputType = type; |
| | | this.$refs.keyboard.open(); |
| | | }, |
| | | setPlate(e) { |
| | | if (this.inputType === 1) { |
| | | this.form1.carNos = e; |
| | | } else if (this.inputType === 2) { |
| | | this.withUserList.carNos = e; |
| | | } |
| | | this.$forceUpdate(); |
| | | this.closeInput(); |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close(); |
| | | }, |
| | | uploadImg(file) { |
| | | this.$refs.cropper.close(); |
| | | uni.showLoading({ title: 'ä¸ä¼ ä¸', mask: true }); |
| | | uni.uploadFile({ |
| | | url: `${this.$baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`, |
| | | filePath: file.tempFilePath, |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'MEMBER_IMG' |
| | | }, |
| | | success: uploadFileRes => { |
| | | let res = JSON.parse(uploadFileRes.data); |
| | | this.withUserList.faceImg = res.data.halfPath; |
| | | this.withUserList.faceImgUrl = res.data.prefixPath + res.data.folder + res.data.halfPath; |
| | | }, |
| | | complete() { |
| | | uni.hideLoading(); |
| | | } |
| | | }); |
| | | }, |
| | | submit() { |
| | | if (!this.form1.receptMemberId) |
| | | return uni.showToast({ |
| | | title: 'è¯·å¡«åææç访é®äºº', |
| | | icon: 'none' |
| | | }); |
| | | if (!this.form1.starttime) |
| | | return uni.showToast({ |
| | | title: 'å
¥åºæ¶é´ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }); |
| | | if (!this.form1.endtime) |
| | | return uni.showToast({ |
| | | title: 'ç¦»åºæ¶é´ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }); |
| | | if (!this.form1.doorSelectName && this.accessControl == 1) |
| | | return uni.showToast({ |
| | | title: '访é®é¨ç¦ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }); |
| | | if (!this.form1.reason) |
| | | return uni.showToast({ |
| | | title: 'æè®¿äºç±ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }); |
| | | // this.form1.starttime = this.form1.starttime + ':00' |
| | | // this.form1.endtime = this.form1.endtime + ':00' |
| | | let data = JSON.parse(JSON.stringify(this.form1)); |
| | | data.starttime = data.starttime + ':00'; |
| | | data.endtime = data.endtime + ':00'; |
| | | this.$u.api |
| | | .createFk({ |
| | | ...this.form, |
| | | ...data, |
| | | openid: this.$store.state.openId, |
| | | withUserList: this.personnel |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | uni.reLaunch({ |
| | | url: `/pages/appointmentDetails/appointmentDetails?id=${res.data}` |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | deleUser(i) { |
| | | this.personnel.splice(i, 1); |
| | | }, |
| | | getVisit1() { |
| | | // æ¯å¦éè¦çé¢ |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | | label: 'HEALTH_CARD' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.visit = res.data.code; |
| | | } |
| | | }); |
| | | // èµ·å§æ¶é´æ¶é¿ |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'VISIT_CONFIG', |
| | | label: 'VALIDATE_VISIT' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.day = Number(res.data.code); |
| | | // console.log(nextDay('after', true, this.day)) |
| | | } |
| | | }); |
| | | }, |
| | | upload(type) { |
| | | this.type = type; |
| | | if (type === 'faceImg') { |
| | | this.$refs.cropper.open(); |
| | | return; |
| | | } |
| | | uni.chooseImage({ |
| | | success: chooseImageRes => { |
| | | // if (type === 'faceImg') { |
| | | // this.photoSrc = chooseImageRes.tempFilePaths[0]; |
| | | // this.$refs.tlyPictureCut.showPop(); |
| | | // return |
| | | // } |
| | | uni.showLoading({ title: 'ä¸ä¼ ä¸', mask: true }); |
| | | for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) { |
| | | uni.uploadFile({ |
| | | url: `${this.$baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`, |
| | | filePath: chooseImageRes.tempFilePaths[i], |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'MEMBER_IMG' |
| | | }, |
| | | success: uploadFileRes => { |
| | | let res = JSON.parse(uploadFileRes.data); |
| | | if (type === 'faceImg') { |
| | | this.withUserList.faceImg = res.data.halfPath; |
| | | this.withUserList.faceImgUrl = res.data.prefixPath + res.data.folder + res.data.halfPath; |
| | | } else { |
| | | this.withUserList.imgurl = res.data.halfPath; |
| | | this.withUserList.imgurlUrl = res.data.prefixPath + res.data.folder + res.data.halfPath; |
| | | } |
| | | }, |
| | | complete() { |
| | | if (i === chooseImageRes.tempFilePaths.length - 1) { |
| | | uni.hideLoading(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | seleIdcard(e) { |
| | | this.withUserList.idcardType = e.value[0].id; |
| | | this.withUserList.idcardTypeName = e.value[0].name; |
| | | this.show6 = false; |
| | | }, |
| | | submitCart() { |
| | | if (!this.carName) |
| | | return uni.showToast({ |
| | | title: '请è¾å
¥è½¦çå·ç ', |
| | | icon: 'none' |
| | | }); |
| | | this.cars.push(this.carName); |
| | | this.form1.carNos = this.cars.join(','); |
| | | this.carName = ''; |
| | | this.show2 = false; |
| | | }, |
| | | deleCars(i) { |
| | | this.cars.splice(i, 1); |
| | | this.form1.carNos = this.cars.join(','); |
| | | }, |
| | | seleMJ(i) { |
| | | this.columns.forEach((item, index) => { |
| | | if (index === i) { |
| | | item.active = !item.active; |
| | | } |
| | | }); |
| | | }, |
| | | openLC() { |
| | | if (!this.form1.starttime) |
| | | return uni.showToast({ |
| | | title: '请å
éæ©å
¥åæ¶é´', |
| | | icon: 'none' |
| | | }); |
| | | this.show5 = true; |
| | | }, |
| | | setinDate(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.slice(0, 11) + '23:59' |
| | | this.form1.endtime = '' |
| | | this.show4 = false; |
| | | }, |
| | | setoutDate(e) { |
| | | this.form1.endtime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM'); |
| | | this.show5 = false; |
| | | }, |
| | | formatTimeStamp(date) { |
| | | return Date.parse(new Date(`${date}`)) || Date.parse(new Date(`${date.replace(/-/g, '/')}`)); |
| | | }, |
| | | // æ¥è¯¢ç¨æ· |
| | | 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; |
| | | } |
| | | }); |
| | | } |
| | | } 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; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // 被æè®¿äººä¿¡æ¯æ ¡éªæ¹å¼ï¼0ææºå·åç¬æ ¡éª 1ææºå·åå§åç»åæ ¡éªï¼ |
| | | getUserValid() { |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | | label: 'BEVISITED_USER_VALID' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.verify = res.data.code; |
| | | } |
| | | }); |
| | | }, |
| | | // è·åæ¯å¦éè¦éæ©é¨ç¦/é¨ç¦å表 |
| | | getvisit() { |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | | label: 'SELECT_DOORS_VISIT_REQUIRED' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.accessControl = res.data.code; |
| | | if (res.data.code === '1') { |
| | | this.$u.api.deviceRoleList({ type: 1 }).then(device => { |
| | | if (device.code === 200) { |
| | | if (device.data.length > 0) { |
| | | device.data.forEach(item => { |
| | | item.active = false; |
| | | }); |
| | | this.columns = device.data; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | data() { |
| | | return { |
| | | photoSrc: '', |
| | | type: '', |
| | | inputType: '', |
| | | show1: false, |
| | | show2: false, |
| | | show4: false, |
| | | show5: false, |
| | | show7: false, |
| | | showName: false, |
| | | fileList: [], |
| | | memberList: [[{ name: '身份è¯', id: 0 }, { name: '港澳è¯ä»¶', id: 1 }, { name: 'æ¤ç
§', id: 2 }]], |
| | | columnsNames: [[{ name: 'å¼ ä¸', id: 0 }, { name: 'å¼ ä¸', id: 1 }, { name: 'å¼ ä¸', id: 2 }]], |
| | | columns: [], |
| | | cars: [], |
| | | day: null, |
| | | maxTime: '', |
| | | carName: '', |
| | | personnel: [], |
| | | userAnswerId: '', |
| | | form1: { |
| | | receptMemberId: '', |
| | | receptMemberName: '', |
| | | starttime: '', |
| | | endtime: '', |
| | | reason: '', |
| | | carNos: '' |
| | | }, |
| | | visit: '', |
| | | form: {}, |
| | | accessControl: '', |
| | | verify: '' |
| | | } |
| | | }, |
| | | components: { tlyPictureCut, keyboardInput, QfImageCropper }, |
| | | onLoad(options) { |
| | | if (options.data) { |
| | | this.form = JSON.parse(options.data) |
| | | } |
| | | this.getUser() |
| | | 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.getvisit() |
| | | // this.getVisit1() |
| | | // this.getUserValid() |
| | | }, |
| | | methods: { |
| | | openInput(type) { |
| | | this.inputType = type |
| | | this.$refs.keyboard.open() |
| | | }, |
| | | setPlate(e) { |
| | | if (this.inputType === 1) { |
| | | this.form1.carNos = e |
| | | } else if (this.inputType === 2) { |
| | | this.withUserList.carNos = e |
| | | } |
| | | this.$forceUpdate() |
| | | this.closeInput() |
| | | }, |
| | | seleteName(e) { |
| | | this.$set(this.form1, 'receptMemberName', e.value[0].name) |
| | | this.$set(this.form1, 'receptMemberId', e.value[0].id) |
| | | this.$set(this.form1, 'receptCompanyName', e.value[0].companyName) |
| | | this.showName = false |
| | | }, |
| | | getUser() { |
| | | getVisitedMember().then(res => { |
| | | this.memberList = [res.data || []] |
| | | }) |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close() |
| | | }, |
| | | submit() { |
| | | const { form1 } = this |
| | | if (!this.form1.receptMemberId) |
| | | return uni.showToast({ |
| | | title: 'è¯·éæ©ææç被访人', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.starttime) |
| | | return uni.showToast({ |
| | | title: 'å
¥åºæ¶é´ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.endtime) |
| | | return uni.showToast({ |
| | | title: 'ç¦»åºæ¶é´ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.name) return uni.showToast({ |
| | | title: 'è系人ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.phone) return uni.showToast({ |
| | | title: 'ææºå·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.companyName) return uni.showToast({ |
| | | title: 'æ¥è®¿åä½ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.carNos) return uni.showToast({ |
| | | title: 'å
¥å车è¾ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.memberNum) return uni.showToast({ |
| | | title: 'é车人æ°ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.reason) return uni.showToast({ |
| | | title: 'æè®¿äºç±ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | // this.form1.starttime = this.form1.starttime + ':00' |
| | | // this.form1.endtime = this.form1.endtime + ':00' |
| | | let data = JSON.parse(JSON.stringify(this.form1)) |
| | | data.starttime = data.starttime + ':00' |
| | | data.endtime = data.endtime + ':00' |
| | | createVisit({ |
| | | ...data, |
| | | type: '2', |
| | | openid: this.$store.state.openId |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: 'æäº¤æå', |
| | | icon: 'success' |
| | | }) |
| | | }) |
| | | uni.reLaunch({ |
| | | url: `/pages/staff/index` |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | deleUser(i) { |
| | | this.personnel.splice(i, 1) |
| | | }, |
| | | getVisit1() { |
| | | // æ¯å¦éè¦çé¢ |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | | label: 'HEALTH_CARD' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.visit = res.data.code |
| | | } |
| | | }) |
| | | // èµ·å§æ¶é´æ¶é¿ |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'VISIT_CONFIG', |
| | | label: 'VALIDATE_VISIT' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.day = Number(res.data.code) |
| | | // console.log(nextDay('after', true, this.day)) |
| | | } |
| | | }) |
| | | }, |
| | | submitCart() { |
| | | if (!this.carName) |
| | | return uni.showToast({ |
| | | title: '请è¾å
¥è½¦çå·ç ', |
| | | icon: 'none' |
| | | }) |
| | | this.cars.push(this.carName) |
| | | this.form1.carNos = this.cars.join(',') |
| | | this.carName = '' |
| | | this.show2 = false |
| | | }, |
| | | deleCars(i) { |
| | | this.cars.splice(i, 1) |
| | | this.form1.carNos = this.cars.join(',') |
| | | }, |
| | | seleMJ(i) { |
| | | this.columns.forEach((item, index) => { |
| | | if (index === i) { |
| | | item.active = !item.active |
| | | } |
| | | }) |
| | | }, |
| | | openLC() { |
| | | if (!this.form1.starttime) |
| | | return uni.showToast({ |
| | | title: '请å
éæ©å
¥åæ¶é´', |
| | | icon: 'none' |
| | | }) |
| | | this.show5 = true |
| | | }, |
| | | setinDate(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.slice(0, 11) + '23:59' |
| | | this.form1.endtime = '' |
| | | this.show4 = false |
| | | }, |
| | | setoutDate(e) { |
| | | this.form1.endtime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM') |
| | | this.show5 = false |
| | | }, |
| | | formatTimeStamp(date) { |
| | | return Date.parse(new Date(`${date}`)) || Date.parse(new Date(`${date.replace(/-/g, '/')}`)) |
| | | }, |
| | | // 被æè®¿äººä¿¡æ¯æ ¡éªæ¹å¼ï¼0ææºå·åç¬æ ¡éª 1ææºå·åå§åç»åæ ¡éªï¼ |
| | | getUserValid() { |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | | label: 'BEVISITED_USER_VALID' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.verify = res.data.code |
| | | } |
| | | }) |
| | | }, |
| | | // è·åæ¯å¦éè¦éæ©é¨ç¦/é¨ç¦å表 |
| | | getvisit() { |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | | label: 'SELECT_DOORS_VISIT_REQUIRED' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.accessControl = res.data.code |
| | | if (res.data.code === '1') { |
| | | this.$u.api.deviceRoleList({ type: 1 }).then(device => { |
| | | if (device.code === 200) { |
| | | if (device.data.length > 0) { |
| | | device.data.forEach(item => { |
| | | item.active = false |
| | | }) |
| | | this.columns = device.data |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style> |
| | | page { |
| | | background-color: #f7f7f7 !important; |
| | | background-color: #f7f7f7 !important; |
| | | } |
| | | .u-upload__button { |
| | | margin: 0 !important; |
| | | margin: 0 !important; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .visit { |
| | | width: 100%; |
| | | padding-top: 10rpx 0; |
| | | .menjin { |
| | | width: 100%; |
| | | .respondent-title { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | line-height: 100rpx; |
| | | text-align: center; |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | .list { |
| | | width: 100%; |
| | | height: 400rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .list_item { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | text { |
| | | font-size: 28rpx; |
| | | color: #000000; |
| | | } |
| | | image { |
| | | width: 30rpx; |
| | | height: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .menjin_footer { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .menjin_footer_item { |
| | | flex: 1; |
| | | height: 80rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 10rpx; |
| | | background-color: #025eef; |
| | | color: #ffffff; |
| | | font-size: 26rpx; |
| | | margin-left: 30rpx; |
| | | &:first-child { |
| | | margin-left: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | width: 100%; |
| | | padding-top: 10rpx 0; |
| | | .menjin { |
| | | width: 100%; |
| | | .respondent-title { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | line-height: 100rpx; |
| | | text-align: center; |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | .list { |
| | | width: 100%; |
| | | height: 400rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .list_item { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | text { |
| | | font-size: 28rpx; |
| | | color: #000000; |
| | | } |
| | | image { |
| | | width: 30rpx; |
| | | height: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .menjin_footer { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .menjin_footer_item { |
| | | flex: 1; |
| | | height: 80rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 10rpx; |
| | | background-color: #025eef; |
| | | color: #ffffff; |
| | | font-size: 26rpx; |
| | | margin-left: 30rpx; |
| | | &:first-child { |
| | | margin-left: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .addcar { |
| | | padding: 30rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | .addcar_head { |
| | | text-align: center; |
| | | font-size: 32rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | .addcar_ipt { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | line-height: 100rpx; |
| | | text-align: center; |
| | | background: #f7f7f7; |
| | | border-radius: 50rpx; |
| | | margin-top: 60rpx; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #000000; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .addcar_footer { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-top: 60rpx; |
| | | .t { |
| | | background: #025eef !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .addcar_footer_item { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | font-size: 32rpx; |
| | | font-weight: 400; |
| | | color: #025eef; |
| | | text-align: center; |
| | | border-radius: 44rpx; |
| | | border: 1rpx solid #025eef; |
| | | margin-right: 18rpx; |
| | | &:last-child { |
| | | margin-right: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .list { |
| | | width: 100%; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | background-color: #ffffff; |
| | | .empty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | .list_item { |
| | | width: 100%; |
| | | // min-height: 98rpx; |
| | | padding: 30rpx 0; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | .addcar { |
| | | padding: 30rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | .addcar_head { |
| | | text-align: center; |
| | | font-size: 32rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | .addcar_ipt { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | line-height: 100rpx; |
| | | text-align: center; |
| | | background: #f7f7f7; |
| | | border-radius: 50rpx; |
| | | margin-top: 60rpx; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #000000; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .addcar_footer { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-top: 60rpx; |
| | | .t { |
| | | background: #025eef !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .addcar_footer_item { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | font-size: 32rpx; |
| | | font-weight: 400; |
| | | color: #025eef; |
| | | text-align: center; |
| | | border-radius: 44rpx; |
| | | border: 1rpx solid #025eef; |
| | | margin-right: 18rpx; |
| | | &:last-child { |
| | | margin-right: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .list { |
| | | width: 100%; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | background-color: #ffffff; |
| | | .empty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | .list_item { |
| | | width: 100%; |
| | | // min-height: 98rpx; |
| | | padding: 30rpx 0; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | |
| | | .list_item_label { |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | .list_item_label { |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | text { |
| | | &:nth-child(2) { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | text { |
| | | &:nth-child(2) { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | |
| | | &:nth-child(1) { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #e42d2d; |
| | | } |
| | | } |
| | | } |
| | | &:nth-child(1) { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #e42d2d; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .list_item_content { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | .list_item_content { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | |
| | | text { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | margin-right: 6rpx; |
| | | } |
| | | text { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .zw { |
| | | width: 100%; |
| | | height: calc(env(safe-area-inset-bottom) + 118rpx); |
| | | } |
| | | .zw { |
| | | width: 100%; |
| | | height: calc(env(safe-area-inset-bottom) + 118rpx); |
| | | } |
| | | |
| | | .footer { |
| | | width: 100%; |
| | | padding: 0 30rpx; |
| | | padding-bottom: env(safe-area-inset-bottom); |
| | | box-sizing: border-box; |
| | | position: fixed; |
| | | left: 0; |
| | | bottom: 68rpx; |
| | | .footer { |
| | | width: 100%; |
| | | padding: 0 30rpx; |
| | | padding-bottom: env(safe-area-inset-bottom); |
| | | box-sizing: border-box; |
| | | position: fixed; |
| | | left: 0; |
| | | bottom: 68rpx; |
| | | |
| | | .footer_btn { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #4e99a9; |
| | | border-radius: 44rpx; |
| | | font-size: 32rpx; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | .footer_btn { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #4e99a9; |
| | | border-radius: 44rpx; |
| | | font-size: 32rpx; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="login"> |
| | | <image class="login_bg" src="@/static/login_bg@2x.png" /> |
| | | <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" /> |
| | | <view class="login_title">宿³°ç©æµæºæ
§ååº</view> |
| | | <view class="login_list"> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> |
| | | <input v-model="form.phone" maxlength="18" placeholder="请è¾å
¥ææºå·" /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/ic_captcha.png" mode="widthFix"></image> |
| | | <input |
| | | v-model="form.validCode" |
| | | placeholder="请è¾å
¥éªè¯ç " |
| | | type="text" |
| | | /> |
| | | <text class="captcha" v-if="countDown == 0" @click="initCaptcha" |
| | | >è·åéªè¯ç </text |
| | | > |
| | | <text class="placeholder9" v-else>{{ countDown }}</text> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> |
| | | <input |
| | | v-model="form.password" |
| | | type="password" |
| | | placeholder="请è¾å
¥æ°å¯ç " |
| | | /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> |
| | | <input |
| | | v-model="form.newPassword" |
| | | type="password" |
| | | placeholder="è¯·åæ¬¡è¾å
¥æ°å¯ç " |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="login_btn"> |
| | | <view class="login_btn_n" @click="onLogin">确认修æ¹</view> |
| | | </view> |
| | | <!-- --> |
| | | <u-popup |
| | | :show="isShowProtocol" |
| | | @close="isShowProtocol = false" |
| | | mode="center" |
| | | > |
| | | <view class="modal">111</view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { resetPassword, sendSms } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: { |
| | | }, |
| | | isShowProtocol: false, |
| | | countDown: 0 |
| | | } |
| | | }, |
| | | |
| | | onLoad() { |
| | | }, |
| | | |
| | | methods: { |
| | | dealChange(e) { |
| | | console.log(e) |
| | | }, |
| | | initCaptcha() { |
| | | if (!this.form.phone) return uni.showToast({ |
| | | title: 'ææºå·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | sendSms({ phone: this.form.phone }).then(res => { |
| | | this.countDown = 60 |
| | | setInterval(() => { |
| | | if (this.countDown == 0) return |
| | | this.countDown-- |
| | | }, 1000) |
| | | }) |
| | | }, |
| | | |
| | | onLogin() { |
| | | const { form } = this |
| | | if (!form.phone) return uni.showToast({ |
| | | title: 'ææºå·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.validCode) return uni.showToast({ |
| | | title: 'éªè¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.password) return uni.showToast({ |
| | | title: 'æ°å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.newPassword) return uni.showToast({ |
| | | title: '确认å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (form.password != form.newPassword) return uni.showToast({ |
| | | title: '两次è¾å
¥å¯ç ä¸ä¸è´', |
| | | icon: 'none' |
| | | }) |
| | | resetPassword({ |
| | | ...form |
| | | }).then(res => { |
| | | if (res && res.code == 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: 'å¯ç ä¿®æ¹æå,è¯·éæ°ç»å½', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | uni.redirectTo({ |
| | | url: "/pages/staffLogin/login" |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .login { |
| | | width: 100%; |
| | | height: 100vh; |
| | | display: flex; |
| | | padding-top: 160rpx; |
| | | box-sizing: border-box; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | background: linear-gradient( |
| | | 180deg, |
| | | rgba(39, 155, 170, 0.2) 0%, |
| | | rgba(39, 155, 170, 0) 100% |
| | | ); |
| | | .login_logo { |
| | | width: 180rpx; |
| | | height: 180rpx; |
| | | } |
| | | .login_bg { |
| | | position: absolute; |
| | | top: 0; |
| | | width: 750rpx; |
| | | } |
| | | .login_title { |
| | | font-size: 44rpx; |
| | | font-weight: 600; |
| | | color: #333333; |
| | | margin-top: 40rpx; |
| | | margin-bottom: 120rpx; |
| | | } |
| | | .login_list { |
| | | width: 100%; |
| | | padding: 0 60rpx; |
| | | box-sizing: border-box; |
| | | .login_list_item { |
| | | width: 100%; |
| | | border-radius: 50rpx; |
| | | height: 98rpx; |
| | | padding: 0 40rpx; |
| | | box-sizing: border-box; |
| | | background: #ffffff; |
| | | margin-bottom: 40rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | &:last-child { |
| | | margin-bottom: 0 !important; |
| | | } |
| | | image { |
| | | flex-shrink: 0; |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | .captcha { |
| | | color: #279baa; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | | color: #666666; |
| | | margin-left: 24rpx; |
| | | border: none; |
| | | } |
| | | } |
| | | } |
| | | .login_btn { |
| | | width: 100%; |
| | | padding: 0 60rpx; |
| | | box-sizing: border-box; |
| | | margin-top: 80rpx; |
| | | .for_psd { |
| | | color: #279baa; |
| | | margin-top: 40rpx; |
| | | width: 140rpx; |
| | | text-align: center; |
| | | margin: 40rpx auto; |
| | | } |
| | | .login_btn_n { |
| | | width: 100%; |
| | | height: 98rpx; |
| | | background: #279baa; |
| | | box-shadow: 0rpx 12rpx 24rpx 0rpx rgba(39, 155, 170, 0.2); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #ffffff; |
| | | border-radius: 50rpx; |
| | | } |
| | | } |
| | | .deal_wrap { |
| | | position: absolute; |
| | | width: 100%; |
| | | left: 0; |
| | | text-align: center; |
| | | bottom: 108rpx; |
| | | .deal { |
| | | color: #279baa; |
| | | } |
| | | } |
| | | } |
| | | .modal { |
| | | padding: 32rpx; |
| | | } |
| | | </style> |
| | |
| | | <view class="login_list"> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> |
| | | <input |
| | | v-model="form.account" |
| | | maxlength="18" |
| | | placeholder="è´¦å·" |
| | | /> |
| | | <input v-model="form.username" maxlength="18" placeholder="è´¦å·" /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> |
| | | <input v-model="form.password" type="password" placeholder="å¯ç " /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/ic_captcha.png" mode="widthFix"></image> |
| | | <input v-model="form.code" placeholder="éªè¯ç " type="text" /> |
| | | <image |
| | | @click="initCaptcha" |
| | | :src="captcha.image" |
| | | class="captcha" |
| | | mode="widthFix" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="login_btn"> |
| | | <view class="login_btn_n" @click="onLogin">ç«å³ç»å½</view> |
| | | <view class="for_psd">å¿è®°å¯ç </view> |
| | | <view @click="$jump('/pages/staffLogin/forgetPsd')" class="for_psd" |
| | | >å¿è®°å¯ç </view |
| | | > |
| | | </view> |
| | | |
| | | <view class="deal_wrap"> |
| | | <checkbox @change="dealChange" /> |
| | | <text>ç»å½å³åæ</text> |
| | | <text class="deal">ã宿³°ç©æµç¨æ·åè®®ã</text> |
| | | <text class="deal" @click="isShowProtocol = true" |
| | | >ã宿³°ç©æµç¨æ·åè®®ã</text |
| | | > |
| | | </view> |
| | | <!-- --> |
| | | <u-popup |
| | | :show="isShowProtocol" |
| | | @close="isShowProtocol = false" |
| | | mode="center" |
| | | > |
| | | <view class="modal">111</view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { loginPost } from '@/api' |
| | | import { loginPost, loginCaptcha, getUserInfo } from '@/api' |
| | | import { mapState, mapMutations } from 'vuex' |
| | | export default { |
| | | name: 'login', |
| | | |
| | |
| | | form: { |
| | | account: '', |
| | | password: '', |
| | | } |
| | | }, |
| | | isShowProtocol: false, |
| | | captcha: {} |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | onLoad() { |
| | | this.initCaptcha() |
| | | }, |
| | | |
| | | methods: { |
| | | ...mapMutations(["setToken", "setUserInfo"]), |
| | | dealChange(e) { |
| | | console.log(e) |
| | | }, |
| | | initCaptcha() { |
| | | loginCaptcha().then(res => { |
| | | this.captcha = res.data |
| | | }) |
| | | }, |
| | | |
| | | onLogin() { |
| | | const { form } = this |
| | | if (!form.account) return uni.showToast({ |
| | | title: 'è´¦å·åä¸è½ä¸ºç©º', |
| | | if (!form.username) return uni.showToast({ |
| | | title: 'è´¦å·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.password) return uni.showToast({ |
| | | title: 'å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.code) return uni.showToast({ |
| | | title: 'éªè¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | loginPost({ |
| | | ...form, |
| | | uuid: this.captcha.uuid, |
| | | openId: this.$store.state.openId |
| | | }).then(res => { |
| | | console.log('res', res); |
| | | if (res.code === 200) { |
| | | this.setToken(res.data) |
| | | getUserInfo().then(ress => { |
| | | this.setUserInfo(ress.data) |
| | | uni.redirectTo({ |
| | | url: "/pages/staff/index" |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | .captcha { |
| | | width: 200rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | |
| | | } |
| | | } |
| | | } |
| | | .modal { |
| | | padding: 32rpx; |
| | | } |
| | | </style> |
| | |
| | | // æ¸
空ææç¼å |
| | | empty(state) { |
| | | state.token = '' |
| | | state.userInfo = '' |
| | | state.userInfo = {} |
| | | uni.removeStorageSync('userInfo') |
| | | uni.removeStorageSync('token') |
| | | } |
| | |
| | | export const http = function (options) { |
| | | { |
| | | return new Promise((resolve, reject) => { |
| | | let token = uni.getStorageSync('token') |
| | | let token = uni.getStorageSync('token') || '' |
| | | // å¨ç»å½çæ¶åéè¦å¨å token uni.setStorageSync("authorization","è¿éæ¯ç»å½è·åçtokenå¼") |
| | | |
| | | // uni.showLoading({ |
| | |
| | | method: options.method || 'GET', |
| | | header: options.header || { |
| | | // æ ¹æ®å®é
æ¥å£è®¾è®¡ key å token æè
authorization |
| | | token: token, |
| | | dm_user_token: token, |
| | | "content-type": 'application/json' |
| | | }, |
| | | success: (res) => { |
| | |
| | | // ç»å½è¿æ |
| | | if (data.code === 401) { |
| | | uni.navigateTo({ |
| | | url: '/packageA/loginAgain/loginAgain' |
| | | }) |
| | | url: '/pages/staffLogin/login' |
| | | }); |
| | | } |
| | | if (data.code !== 200) { |
| | | uni.showToast({ |
| | |
| | | uni.showToast({ |
| | | title: 'è¯·æ±æ¥å£å¤±è´¥' |
| | | }) |
| | | |
| | | // è¿åéè¯¯æ¶æ¯ |
| | | reject(err) |
| | | uni.hideLoading() |
| | |
| | | int cityUseCar = 3;//å¸å
ç¨è½¦ |
| | | int unCityUseCar = 4;//å¸å¤ç¨è½¦ |
| | | int logisticsCarUse = 5;//ç©æµè½¦é¢çº¦ |
| | | } |
| | | |
| | | |
| | | |
| | | public static Integer approveTypeToNoticeType(Integer approveType){ |
| | | if(Constants.equalsInteger(approveType,Constants.approveObjectType.unConstructionVisit) |
| | | ||Constants.equalsInteger(approveType,Constants.approveObjectType.constructionVisit)){ |
| | | return Constants.noticesObjectType.visit; |
| | | }else if(Constants.equalsInteger(approveType,Constants.approveObjectType.visitReporting)){ |
| | | return Constants.noticesObjectType.visitReporting; |
| | | }else if(Constants.equalsInteger(approveType,Constants.approveObjectType.cityUseCar) |
| | | ||Constants.equalsInteger(approveType,Constants.approveObjectType.unCityUseCar)){ |
| | | return Constants.noticesObjectType.useCar; |
| | | }else { |
| | | return Constants.noticesObjectType.system; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public interface noticesObjectType{ |
| | | int visit = 0;//访客ç³è¯· |
| | | int visitReporting = 1;//访客æ¥å¤ |
| | | int useCar = 2;//ç¨è½¦ç³è¯· |
| | | int dangerDeal = 3;//鿣å¤ç |
| | | int logisticsCarUse = 4;//ç©æµè½¦å®¡æ¹ |
| | | int system = 5;//ç³»ç»æ¶æ¯ |
| | | } |
| | | |
| | | |
| | | public interface approveStatus{ |
| | |
| | | int auditIng = 1;//审æ¹ä¸ |
| | | int pass = 2;//审æ¹éè¿ |
| | | int unPass = 3;//å®¡æ¹æªéè¿ |
| | | int otherDeal = 4;//ä»äººå·²å¤ç |
| | | int cancel = 5;//已忶 |
| | | int cancel = 4;//已忶 |
| | | int otherDeal = 5;//ä»äººå·²å¤ç |
| | | int otherUnPass = 6;//ä»äººæç» |
| | | } |
| | | |
| | |
| | | return reqJson; |
| | | } |
| | | |
| | | |
| | | |
| | | public enum NoticeType { |
| | | |
| | | ZERO(0, "å¾
å®¡æ ¸","","","å¾
å®¡æ ¸","å¾
å¤ç","å¤çä¸"), |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 尿宿 ¼å¼çå符串转æ¢ä¸ºæ¥æå |
| | | * |
| | | * @param strDate |
| | | * - æ¥æ |
| | | * @param oracleFormat |
| | | * --oracleåæ¥ææ ¼å¼ |
| | | * @return 转æ¢å¾å°çæ¥æ |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public static Date stringToDate(String strDate, String oracleFormat) { |
| | | if (strDate == null) |
| | | return null; |
| | | Hashtable<Integer, String> h = new Hashtable<Integer, String>(); |
| | | String javaFormat = new String(); |
| | | String s = oracleFormat.toLowerCase(); |
| | | if (s.indexOf("yyyy") != -1) |
| | | h.put(new Integer(s.indexOf("yyyy")), "yyyy"); |
| | | else if (s.indexOf("yy") != -1) |
| | | h.put(new Integer(s.indexOf("yy")), "yy"); |
| | | if (s.indexOf("mm") != -1) |
| | | h.put(new Integer(s.indexOf("mm")), "MM"); |
| | | |
| | | if (s.indexOf("dd") != -1) |
| | | h.put(new Integer(s.indexOf("dd")), "dd"); |
| | | if (s.indexOf("hh24") != -1) |
| | | h.put(new Integer(s.indexOf("hh24")), "HH"); |
| | | if (s.indexOf("mi") != -1) |
| | | h.put(new Integer(s.indexOf("mi")), "mm"); |
| | | if (s.indexOf("ss") != -1) |
| | | h.put(new Integer(s.indexOf("ss")), "ss"); |
| | | |
| | | int intStart = 0; |
| | | while (s.indexOf("-", intStart) != -1) { |
| | | intStart = s.indexOf("-", intStart); |
| | | h.put(new Integer(intStart), "-"); |
| | | intStart++; |
| | | } |
| | | |
| | | intStart = 0; |
| | | while (s.indexOf("/", intStart) != -1) { |
| | | intStart = s.indexOf("/", intStart); |
| | | h.put(new Integer(intStart), "/"); |
| | | intStart++; |
| | | } |
| | | |
| | | intStart = 0; |
| | | while (s.indexOf(" ", intStart) != -1) { |
| | | intStart = s.indexOf(" ", intStart); |
| | | h.put(new Integer(intStart), " "); |
| | | intStart++; |
| | | } |
| | | |
| | | intStart = 0; |
| | | while (s.indexOf(":", intStart) != -1) { |
| | | intStart = s.indexOf(":", intStart); |
| | | h.put(new Integer(intStart), ":"); |
| | | intStart++; |
| | | } |
| | | |
| | | if (s.indexOf("å¹´") != -1) |
| | | h.put(new Integer(s.indexOf("å¹´")), "å¹´"); |
| | | if (s.indexOf("æ") != -1) |
| | | h.put(new Integer(s.indexOf("æ")), "æ"); |
| | | if (s.indexOf("æ¥") != -1) |
| | | h.put(new Integer(s.indexOf("æ¥")), "æ¥"); |
| | | if (s.indexOf("æ¶") != -1) |
| | | h.put(new Integer(s.indexOf("æ¶")), "æ¶"); |
| | | if (s.indexOf("å") != -1) |
| | | h.put(new Integer(s.indexOf("å")), "å"); |
| | | if (s.indexOf("ç§") != -1) |
| | | h.put(new Integer(s.indexOf("ç§")), "ç§"); |
| | | |
| | | int i = 0; |
| | | while (h.size() != 0) { |
| | | Enumeration e = h.keys(); |
| | | int n = 0; |
| | | while (e.hasMoreElements()) { |
| | | i = ((Integer) e.nextElement()).intValue(); |
| | | if (i >= n) |
| | | n = i; |
| | | } |
| | | String temp = (String) h.get(new Integer(n)); |
| | | h.remove(new Integer(n)); |
| | | |
| | | javaFormat = temp + javaFormat; |
| | | } |
| | | SimpleDateFormat df = new SimpleDateFormat(javaFormat); |
| | | |
| | | Date myDate = new Date(); |
| | | try { |
| | | myDate = df.parse(strDate); |
| | | } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | return myDate; |
| | | } |
| | | |
| | | public static Date StringToDate(String DATE1) { |
| | | DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | |
| | | @ExcelColumn(name="æ é¢") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "ç®ä»") |
| | | @ApiModelProperty(value = "ç®ä»",notes = "å±ç¤ºç¶ææè¿° æ ¹æ®param2 设置") |
| | | @ExcelColumn(name="ç®ä»") |
| | | private String info; |
| | | |
| | |
| | | private String typeDetail; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å
³èåæ°1") |
| | | @ApiModelProperty(value = "å
³èåæ°1" ,notes = "åå¨ æ¶æ¯å±ç¤ºJSON ") |
| | | @ExcelColumn(name="å
³èåæ°1") |
| | | private String param1; |
| | | |
| | | @ApiModelProperty(value = "å
³èåæ°2") |
| | | @ApiModelProperty(value = "å
³èåæ°2",notes = "ç¨äºåå¨ ä¸å¡ç¶æä¿¡æ¯ 0 =å¾
å¤ç;1=å·²åæ/å·²å¤ç;2=å·²æç»/å·²éå;3=已转交;4=å·²æ¤é") |
| | | @ExcelColumn(name="å
³èåæ°2") |
| | | private String param2; |
| | | |
| | |
| | | @ExcelColumn(name="ç¶æ 0æ£å¸¸ 1å·²å
³é ") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦æé 0䏿¯ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦æé 0䏿¯ 1æ¯") |
| | | private Integer sendacopy; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å·²è¯» 0æªè¯» 1已读", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å·²è¯» 0æªè¯» 1已读") |
| | | private Integer readed; |
| | |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:carusebook:create") |
| | | public ApiResponse create(@RequestBody CarUseBook carUseBook) { |
| | | public ApiResponse create(@RequestBody CarUseBook carUseBook) throws Exception { |
| | | return ApiResponse.success(carUseBookService.create(carUseBook)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:carusebook:create") |
| | | public ApiResponse create(@RequestBody CarUseBook carUseBook,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | public ApiResponse create(@RequestBody CarUseBook carUseBook,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) throws Exception { |
| | | LoginUserInfo loginUserInfo = getLoginUser(token); |
| | | carUseBook.setCreator(loginUserInfo.getId()); |
| | | carUseBook.setMemberId(loginUserInfo.getMemberId()); |
| | |
| | | |
| | | @ApiOperation("æ¥è¯¢è½¦è¾é¢çº¦è®°å½") |
| | | @PostMapping("/carUseBookList") |
| | | public ApiResponse<List<CarUseBook>> carUseBookList (@RequestBody CarUseBook carUseBook, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | public ApiResponse<List<CarUseBook>> carUseBookList (@RequestBody CarUseBook carUseBook, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) throws Exception { |
| | | return ApiResponse.success(carUseBookService.carUseBookList(carUseBook)); |
| | | } |
| | | |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemUserBiz; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | |
| | | import com.doumee.dao.business.dto.ResetPasswordDTO; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.MemberRole; |
| | | import com.doumee.dao.system.dto.UpdatePwdDto; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncOrgUserFromHKServiceImpl; |
| | | import io.swagger.annotations.*; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | @Autowired |
| | | private MemberService memberService; |
| | | |
| | | @Autowired |
| | | private SystemUserBiz systemUserBiz; |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | |
| | | |
| | | |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @ApiOperation("ä¿®æ¹å½åç¨æ·å¯ç ") |
| | | @PostMapping("/updatePwd") |
| | | public ApiResponse updatePwd (@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated @RequestBody UpdatePwdDto dto) { |
| | | dto.setUserId(this.getLoginUser(token).getId()); |
| | | systemUserBiz.updatePwd(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | } |
| | |
| | | @PostMapping("/createVisit") |
| | | public ApiResponse createVisit(@RequestBody Visits visits,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | visits.setMemberId(getLoginUser(token).getMemberId()); |
| | | visits.setReceptMemberId(visits.getMemberId()); |
| | | return ApiResponse.success("æ¥è¯¢æå", visitsService.visitReporting(visits)); |
| | | } |
| | | |
| | |
| | | @ExcelColumn(name="审æ¹äºº") |
| | | private String cheorId; |
| | | |
| | | @ApiModelProperty(value = "å®¡æ¹æ¶é´") |
| | | private Date checkDate; |
| | | |
| | | @ApiModelProperty(value = "审æ¹äººå§å") |
| | | @ExcelColumn(name="审æ¹äººå§å") |
| | | private String checkorName; |
| | |
| | | @ApiModelProperty(value = "æå±ç»ç»ç¼ç (å
³ècompany表)", example = "1") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "访客åç§°") |
| | | @ApiModelProperty(value = "被访é®äººåç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "被访é®äººé¨é¨") |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "ææºå·") |
| | | private String phone; |
| | | |
| | |
| | | * @param carUseBook å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(CarUseBook carUseBook); |
| | | Integer create(CarUseBook carUseBook) throws Exception ; |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | |
| | | long count(CarUseBook carUseBook); |
| | | |
| | | |
| | | List<CarUseBook> carUseBookList(CarUseBook carUseBook); |
| | | List<CarUseBook> carUseBookList(CarUseBook carUseBook) throws Exception ; |
| | | |
| | | List<DateIntervalVO> checkDateUse(Integer cars, String dateDay); |
| | | |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.dto.ApproveDTO; |
| | | import com.doumee.dao.business.join.ApproveJoinMapper; |
| | | import com.doumee.dao.business.join.CarUseBookJoinMapper; |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.ApproveDataVO; |
| | | import com.doumee.dao.system.join.NoticesJoinMapper; |
| | | import com.doumee.dao.system.model.Notices; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.web.response.InternalHomeVO; |
| | | import com.doumee.service.business.ApproveService; |
| | |
| | | import com.doumee.service.system.NoticesService; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.xpath.operations.Bool; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private VisitsMapper visitsMapper; |
| | | |
| | | @Autowired |
| | | private VisitsJoinMapper visitsJoinMapper; |
| | | |
| | | @Autowired |
| | | private CarUseBookJoinMapper carUseBookJoinMapper; |
| | | @Autowired |
| | | private NoticesJoinMapper noticesJoinMapper; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Integer create(Approve approve) { |
| | |
| | | for (int i = 0; i < approveParamList.size(); i++) { |
| | | ApproveParam approveParam = approveParamList.get(i); |
| | | List<Integer> ids = this.getApproveUserIds(approveParam,createMember); |
| | | //çæå¾
å notices è¡¨æ°æ® |
| | | if(i==0){ |
| | | |
| | | } |
| | | for (Integer memberId:ids) { |
| | | Integer noticeType = Constants.approveTypeToNoticeType(approveTempl.getType()); |
| | | String title = "ã访客ç³è¯·ãç³è¯·äºº - "; |
| | | Map<String,Object> jsonMap = new HashMap<>(); |
| | | for (int j = 0; j < ids.size(); j++) { |
| | | Integer memberId = ids.get(j); |
| | | //çæå¾
å notices è¡¨æ°æ® |
| | | if(i==0){ |
| | | if(jsonMap.isEmpty()){ |
| | | title = this.createNoticesData(noticeType,businessId,title,jsonMap); |
| | | } |
| | | Notices notices = new Notices(); |
| | | notices.setCreateDate(new Date()); |
| | | notices.setIsdeleted(Constants.ZERO); |
| | | notices.setObjId(businessId); |
| | | notices.setObjType(noticeType); |
| | | notices.setType(noticeType); |
| | | notices.setTitle(title); |
| | | notices.setParam1(JSONObject.toJSONString(jsonMap)); |
| | | notices.setUserId(memberId); |
| | | notices.setPalt(Constants.ZERO); |
| | | notices.setStatus(Constants.ZERO); |
| | | notices.setReaded(Constants.ZERO); |
| | | notices.setSendacopy(Constants.ZERO); |
| | | notices.setParam2("0"); |
| | | notices.setInfo("å¾
å¤ç"); |
| | | noticesJoinMapper.insert(notices); |
| | | } |
| | | Approve approve = new Approve(); |
| | | approve.setRemark(approveParam.getRemark()); |
| | | approve.setCreateDate(new Date()); |
| | |
| | | approveList.add(approve); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public String createNoticesData(Integer noticeType,Integer businessId,String title,Map<String,Object> jsonMap){ |
| | | jsonMap.clear(); |
| | | if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit) |
| | | || Constants.equalsInteger(noticeType,Constants.noticesObjectType.visitReporting)){ |
| | | //访客记å½ä¸è®¿å®¢æ¥å¤ |
| | | Visits visits = visitsJoinMapper.selectJoinOne(Visits.class, |
| | | new MPJLambdaWrapper<Visits>().selectAll(Visits.class) |
| | | .selectAs(Member::getName,Visits::getReceptMemberName) |
| | | .selectAs(Company::getName,Visits::getReceptMemberDepartment) |
| | | .leftJoin(Member.class,Member::getId,Visits::getReceptMemberId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .eq(Visits::getId,businessId) |
| | | .last(" limit 1 ") |
| | | ); |
| | | if(Objects.isNull(visits)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°ä¸å¡æ°æ®ä¿¡æ¯"); |
| | | } |
| | | if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit)){ |
| | | title = title + visits.getName(); |
| | | }else{ |
| | | title = "ã访客æ¥å¤ãç³è¯·äºº - " + visits.getName(); |
| | | } |
| | | jsonMap.put("name", "访é®äºº:" + visits.getCompanyName() + " - " + visits.getReceptMemberName()); |
| | | jsonMap.put("sTime", "å
¥åæ¶é´:" + DateUtil.DateToStr(visits.getStarttime() , "yyyy-MM-dd HH:mm")); |
| | | jsonMap.put("eTime", "ç¦»åæ¶é´:" + DateUtil.DateToStr(visits.getEndtime() , "yyyy-MM-dd HH:mm")); |
| | | jsonMap.put("reason", StringUtils.isBlank(visits.getReason())?"æ¥è®¿äºç±: - ": "æ¥è®¿äºç±:" +visits.getReason()); |
| | | jsonMap.put("carNos", StringUtils.isBlank(visits.getCarNos())?"éè¡è½¦è¾: - ": "éè¡è½¦è¾:" +visits.getCarNos()); |
| | | }else if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.useCar)){ |
| | | //ç¨è½¦ç³è¯· |
| | | CarUseBook carUseBook = carUseBookJoinMapper.selectJoinOne(CarUseBook.class, |
| | | new MPJLambdaWrapper<CarUseBook>().selectAll(CarUseBook.class) |
| | | .selectAs(Member::getName,CarUseBook::getMemberName) |
| | | .selectAs(Company::getName,CarUseBook::getCompanyName) |
| | | .leftJoin(Member.class,Member::getId,CarUseBook::getMemberId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .eq(CarUseBook::getId,businessId) |
| | | .last(" limit 1 ") |
| | | ); |
| | | if(Objects.isNull(carUseBook)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°ä¸å¡æ°æ®ä¿¡æ¯"); |
| | | } |
| | | title = "ãç¨è½¦ç³è¯·ãç³è¯·äºº - " + carUseBook.getMemberName(); |
| | | jsonMap.put("name", "ç³è¯·äºº:" + carUseBook.getCompanyName() + " - " + carUseBook.getMemberName()); |
| | | jsonMap.put("sTime", "å¼å§æ¶é´:" + DateUtil.DateToStr(carUseBook.getStartTime() , "yyyy-MM-dd HH:mm")); |
| | | jsonMap.put("eTime", "ç»ææ¶é´:" + DateUtil.DateToStr(carUseBook.getEndTime() , "yyyy-MM-dd HH:mm")); |
| | | jsonMap.put("usrNum", StringUtils.isBlank(carUseBook.getMemberIds())?"ä¹è½¦äººæ°: 0人": "ä¹è½¦äººæ°: " +carUseBook.getMemberIds().split(",").length +"人"); |
| | | jsonMap.put("mdd", StringUtils.isBlank(carUseBook.getAddr())?"ç®çå°: - ": "ç®çå°:" +carUseBook.getAddr()); |
| | | }else { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED); |
| | | } |
| | | return title; |
| | | } |
| | | |
| | | |
| | |
| | | return auditCompany; |
| | | } |
| | | |
| | | public ApproveDataVO arrangeApprovedDataNew(Integer businessId, Integer businessType, Integer memberId){ |
| | | @Override |
| | | public ApproveDataVO arrangeApprovedData(Integer businessId, Integer businessType, Integer memberId){ |
| | | ApproveDataVO approveDateVO = new ApproveDataVO(); |
| | | approveDateVO.setApproveList(new ArrayList<>()); |
| | | approveDateVO.setCanBeApproved(Constants.ZERO); |
| | | List<Approve> approveGroupList = approveJoinMapper.selectJoinList(Approve.class, |
| | | new MPJLambdaWrapper<Approve>(). |
| | | selectAll(Approve.class) |
| | | .selectAs(Member::getName,Approve::getMemberName) |
| | | .selectAs(Member::getPhone,Approve::getMemberPhone) |
| | | .selectAs(Member::getFaceImg,Approve::getFaceImg) |
| | | .selectAs(Company::getCompanyNamePath,Approve::getCompanyName) |
| | | .leftJoin(Member.class,Member::getId,Approve::getChekorId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .eq(Approve::getIsdeleted,Constants.ZERO) |
| | | .eq(Approve::getObjId,businessId) |
| | | .eq(Approve::getObjType,businessType) |
| | |
| | | ); |
| | | |
| | | //æ¥æ¾å
¨é¨levelList |
| | | List<Approve> levelList = getLevelListFromResult(approveGroupList); |
| | | List<Approve> levelList = getLevelListFromResult(approveGroupList,approveDateVO,memberId); |
| | | List<Approve> copyList = getAllCopyList(approveGroupList); |
| | | //éålevelæ¥è¯¢æ¯ä¸çº§å«ä¸å¡æ°æ® |
| | | for(Approve level:levelList){ |
| | | List<Approve> tlist = getLevelInfoFromList(level,approveGroupList); |
| | |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //å¤çæéè®°å½ |
| | | if (CollectionUtils.isNotEmpty(copyList)) { |
| | | Approve waitModel = new Approve(); |
| | | waitModel.setApproveType(Constants.ONE); |
| | | waitModel.setStatusInfo("æé"); |
| | | waitModel.setStatus(Constants.ONE); |
| | | waitModel.setType(Constants.ONE); |
| | | waitModel.setApproveList(copyList); |
| | | approveDateVO.getApproveList().add(waitModel); |
| | | } |
| | | |
| | | return approveDateVO; |
| | | } |
| | | |
| | | private List<Approve> getAllCopyList(List<Approve> approveGroupList) { |
| | | List<Approve> copyList = new ArrayList<>(); |
| | | if (CollectionUtils.isNotEmpty(approveGroupList)) { |
| | | copyList.addAll(approveGroupList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)).collect(Collectors.toList())); |
| | | } |
| | | return copyList; |
| | | } |
| | | |
| | | private List<Approve> getLevelInfoFromList(Approve level,List<Approve> approveGroupList) { |
| | |
| | | Approve refuseModel = new Approve();//å·²æç»çè®°å½ |
| | | List<Approve> waitList = new ArrayList<>(); //æ¥è¯¢å
¨é¨æªå¤ççéå |
| | | List<Approve> otherPassList = new ArrayList<>();//ä»äººå·²å¤ççè®°å½é |
| | | dealGroupListBiz(level,passList,refuseModel,waitList,otherPassList); |
| | | if(refuseModel !=null){ |
| | | List<Approve> levelApprove = approveGroupList.stream().filter(i->Constants.equalsInteger(i.getLevel(),level.getLevel())).collect(Collectors.toList()); |
| | | dealGroupListBiz(level,levelApprove,approveGroupList,passList,refuseModel,waitList,otherPassList); |
| | | if(Objects.nonNull(refuseModel) && Objects.nonNull(refuseModel.getId())){ |
| | | //å卿ç»çï¼åªéè¦è¿å䏿¡å¤çæ°æ®ï¼åç»ä¸éè¦åæ¾ |
| | | list.add(refuseModel); |
| | | return list; |
| | |
| | | Approve waitModel = new Approve(); |
| | | waitModel.setApproveType(Constants.ONE); |
| | | waitModel.setStatusInfo(StringUtils.defaultString(level.getTitle(),"审æ¹äºº")+"å¤çä¸"); |
| | | waitModel.setStatus(Constants.ONE); |
| | | waitModel.setStatus(Constants.equalsInteger(waitList.get(Constants.ZERO).getStatus(),Constants.ONE)?Constants.ONE:Constants.ZERO); |
| | | waitModel.setApproveList(waitList); |
| | | list.add(waitModel); |
| | | } |
| | | }else { |
| | | //å¦ææ¯æç¾ |
| | | if(otherPassList.size()>0){ |
| | | if((waitList.size()> 0 || otherPassList.size()>0)){ |
| | | Approve waitModel = new Approve(); |
| | | waitModel.setApproveType(Constants.ONE); |
| | | waitModel.setStatusInfo(StringUtils.defaultString(level.getTitle(),"审æ¹äºº")+"ï¼æéæç¾å®¡æ¹äººï¼"); |
| | | waitModel.setStatus(Constants.ONE); |
| | | waitModel.setApproveList(otherPassList); |
| | | waitModel.setStatusInfo(passList.size()<=0?StringUtils.defaultString(level.getTitle(),"审æ¹äºº"):"æéæç¾å®¡æ¹äºº"); |
| | | waitModel.setStatus(passList.size()>0?Constants.ONE:Constants.ZERO); |
| | | List<Approve> approveList = new ArrayList<>(); |
| | | approveList.addAll(waitList); |
| | | //å¦ææ¯æç¾ |
| | | if(passList.size()>0){ |
| | | approveList.addAll(otherPassList); |
| | | } |
| | | waitModel.setApproveList(approveList); |
| | | list.add(waitModel); |
| | | } |
| | | //å¦ææ¯æç¾ |
| | | // if(otherPassList.size()>0){ |
| | | // Approve waitModel = new Approve(); |
| | | // waitModel.setApproveType(Constants.ONE); |
| | | // waitModel.setStatusInfo(StringUtils.defaultString(level.getTitle(),"审æ¹äºº")+"ï¼æéæç¾å®¡æ¹äººï¼"); |
| | | // waitModel.setStatus(Constants.ONE); |
| | | // waitModel.setApproveList(otherPassList); |
| | | // list.add(waitModel); |
| | | // } |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | private void dealGroupListBiz(Approve level, List<Approve> passList, Approve refuseModel, List<Approve> waitList, List<Approve> otherPassList) { |
| | | |
| | | //TODO----------rk |
| | | private void dealGroupListBiz(Approve level, List<Approve> levelApprove,List<Approve> approveGroupList, List<Approve> passList, Approve refuseModel, List<Approve> waitList, List<Approve> otherPassList) { |
| | | //æ¥è¯¢æ¯å¦åå¨æç»æ°æ® |
| | | for (Approve approve:levelApprove) { |
| | | if(Constants.equalsInteger(Constants.approveStatus.pass,approve.getStatus())){ |
| | | passList.add(approve); |
| | | }else if(Constants.equalsInteger(Constants.approveStatus.otherDeal,approve.getStatus())){ |
| | | otherPassList.add(approve); |
| | | }else if(Constants.equalsInteger(Constants.approveStatus.auditIng,approve.getStatus())||Constants.equalsInteger(Constants.approveStatus.wait,approve.getStatus())){ |
| | | waitList.add(approve); |
| | | }else if(Constants.equalsInteger(Constants.approveStatus.unPass,approve.getStatus())){ |
| | | refuseModel = approve; |
| | | } |
| | | } |
| | | } |
| | | |
| | | private List<Approve> sortByCreateTime(List<Approve> passList) { |
| | | //TODO----------rk |
| | | |
| | | Collections.sort(passList, (a, b) -> a.getCheckDate().compareTo(b.getCheckDate())); |
| | | return passList; |
| | | } |
| | | |
| | | |
| | | private List<Approve> getLevelListFromResult(List<Approve> approveGroupList) { |
| | | //TODO----------rk |
| | | return null; |
| | | private List<Approve> getLevelListFromResult(List<Approve> approveGroupList,ApproveDataVO approveDataVO,Integer memberId) { |
| | | approveDataVO.setCanBeApproved(Constants.ZERO); |
| | | approveDataVO.setDriverParam(Constants.ZERO); |
| | | List<Approve> approveList = new ArrayList<>(); |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | | for (Approve approve:approveGroupList) { |
| | | if(StringUtils.isNotBlank(approve.getFaceImg())){ |
| | | approve.setFaceImg(path + approve.getFaceImg()); |
| | | } |
| | | if(Constants.equalsInteger(approve.getType(),Constants.ONE)){ |
| | | continue; |
| | | } |
| | | if(Constants.equalsInteger(approve.getChekorId(),memberId)){ |
| | | approveDataVO.setCanBeApproved(Constants.ONE); |
| | | approveDataVO.setDriverParam(approve.getDriverParam()); |
| | | } |
| | | if(notExsits(approveList,approve.getLevel())){ |
| | | approveList.add(approve); |
| | | } |
| | | } |
| | | |
| | | if(CollectionUtils.isEmpty(approveList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"审æ¹ä¿¡æ¯ï¼çº§å«æ°æ®å¼å¸¸"); |
| | | } |
| | | |
| | | return approveList; |
| | | } |
| | | |
| | | private boolean notExsits(List<Approve> approveList, Integer level) { |
| | | for (Approve approve:approveList) { |
| | | if(Constants.equalsInteger(approve.getLevel(),level)){ |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ´ç å®¡æ¹æ°æ® |
| | |
| | | * @param businessType |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ApproveDataVO arrangeApprovedData(Integer businessId, Integer businessType, Integer memberId){ |
| | | // @Override |
| | | public ApproveDataVO arrangeApprovedDataOld(Integer businessId, Integer businessType, Integer memberId){ |
| | | ApproveDataVO approveDateVO = new ApproveDataVO(); |
| | | approveDateVO.setCanBeApproved(Constants.ZERO); |
| | | List<Approve> approveGroupList = approveJoinMapper.selectJoinList(Approve.class, |
| | | new MPJLambdaWrapper<Approve>(). |
| | | select(Approve::getLevel,Approve::getType) |
| | | select(Approve::getLevel,Approve::getType,Approve::getTitle,Approve::getApproveType) |
| | | .eq(Approve::getIsdeleted,Constants.ZERO) |
| | | .eq(Approve::getObjId,businessId) |
| | | .isNotNull(Approve::getLevel) |
| | | .eq(Approve::getObjType,businessType) |
| | | .groupBy(Approve::getLevel,Approve::getType) |
| | | .groupBy(Approve::getLevel,Approve::getType,Approve::getTitle,Approve::getApproveType) |
| | | ); |
| | | if(CollectionUtils.isEmpty(approveGroupList)){ |
| | | return approveDateVO; |
| | |
| | | approve.setCheckInfo(approveDTO.getCheckInfo()); |
| | | approve.setCheorId(approveDTO.getLoginUserInfo().getMemberId().toString()); |
| | | approve.setCheckorName(approve.getLoginUserInfo().getRealname()); |
| | | approve.setCheckDate(new Date()); |
| | | approve.setStatusInfo(approveDTO.getStatus()==Constants.TWO?"审æ¹éè¿":approveDTO.getCheckInfo()); |
| | | Visits visits = new Visits(); |
| | | CarUseBook carUseBook = new CarUseBook(); |
| | |
| | | .ne(Approve::getId,approve.getId())); |
| | | }else{ |
| | | //å¤çå
¶ä»ä¸å¡æ°æ® |
| | | if(approve.getApproveType().equals(Constants.ZERO)&&approve.getIsEndCheck()==Constants.ONE){ |
| | | //æç¾ ä¸ ç»å®¡ |
| | | if((approve.getApproveType().equals(Constants.ZERO) |
| | | || approve.getApproveType().equals(Constants.TWO)) &&approve.getIsEndCheck()==Constants.ONE){ |
| | | //æç¾ / å人审 ä¸ ç»å®¡ |
| | | approveJoinMapper.update(null,new UpdateWrapper<Approve>() |
| | | .lambda() |
| | | .set(Approve::getStatus,Constants.approveStatus.otherDeal) |
| | | .in(Approve::getId,approveList.stream().map(m->m.getId()).collect(Collectors.toList()))); |
| | | dealBusinessBean = true; |
| | | |
| | | }else if(approve.getApproveType().equals(Constants.ZERO)&&approve.getIsEndCheck()!=Constants.ONE){ |
| | | //æç¾ éç»å®¡ åå¼å¯ä¸ä¸æ¥ä¸å¡æµç¨ |
| | | }else if((approve.getApproveType().equals(Constants.ZERO) |
| | | || approve.getApproveType().equals(Constants.TWO)) &&approve.getIsEndCheck()!=Constants.ONE){ |
| | | //æç¾ / å人审 éç»å®¡ åå¼å¯ä¸ä¸æ¥ä¸å¡æµç¨ |
| | | /**å¤çæ¬çº§æ°æ®**/ |
| | | approveJoinMapper.update(null,new UpdateWrapper<Approve>() |
| | | .lambda() |
| | |
| | | .eq(Approve::getObjType,approve.getObjType()) |
| | | .eq(Approve::getLevel,(approve.getLevel()+1)) |
| | | ); |
| | | |
| | | //TODO æ´æ°æ¶æ¯æ°æ® åéä¸ä¸çº§æ°æ®æ¶æ¯ |
| | | }else if(approve.getApproveType().equals(Constants.ONE)&&approve.getIsEndCheck()==Constants.ONE){ |
| | | //ä¼ç¾ ä¸ç»å®¡ |
| | | if(approveList.size()==Constants.ZERO){ |
| | |
| | | //TODO å®¡æ¹æªéè¿éç¥ |
| | | |
| | | } |
| | | |
| | | |
| | | }else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | Constants.approveObjectType.unCityUseCar)){ |
| | | // å¸å
å¤ç¨è½¦ç³è¯· |
| | |
| | | //TODO å®¡æ¹æªéè¿éç¥ |
| | | |
| | | } |
| | | |
| | | |
| | | }else if(approveDTO.getObjType().equals(Constants.approveObjectType.logisticsCarUse)){ |
| | | //TODO ç©æµè½¦é¢çº¦ |
| | | |
| | | } |
| | | } |
| | | |
| | | public void passNextNotices(Boolean dealBusinessBean,Approve approve){ |
| | | //æ ¹æ®å®¡æ¹è®°å½æ¥è¯¢ éç¥è®°å½ |
| | | Integer noticeType = Constants.approveTypeToNoticeType(approve.getObjType()); |
| | | Notices notices = noticesJoinMapper.selectOne(new QueryWrapper<Notices>().lambda() |
| | | .eq(Notices::getObjId,approve.getObjId()) |
| | | .eq(Notices::getObjType,noticeType) |
| | | .eq(Notices::getUserId,approve.getChekorId()) |
| | | .eq(Notices::getSendacopy,Constants.ZERO) |
| | | .eq(Notices::getIsdeleted,Constants.ZERO) |
| | | ); |
| | | if(Objects.isNull(notices)){ |
| | | return; |
| | | } |
| | | |
| | | |
| | | if(Constants.equalsInteger(approve.getApproveType(),Constants.ZERO)){ |
| | | //æç¾ |
| | | //1ãä¿®æ¹èªå·±çæ°æ®è®°å½ |
| | | |
| | | //2ãæ´æ°ä»äººçåçº§è®°å½ ä¸ºæé |
| | | |
| | | //3ã妿䏿¯ç»å®¡çæä¸ä¸çº§çæ°æ®è®°å½ |
| | | |
| | | |
| | | }else if(Constants.equalsInteger(approve.getApproveType(),Constants.ONE)){ |
| | | //ä¼ç¾ |
| | | //1ãä¿®æ¹èªå·±çæ°æ®è®°å½ |
| | | |
| | | //2ãæ ¹æ®æ¯å¦ä¸ºæåä¸ä½å®¡æ¹äºº 妿䏿¯ åç»æ |
| | | |
| | | //3ã å¦ææ¯æåä¸ä½å®¡æ¹äºº ä¸ä¸æ¯ç»å®¡å¼å¯ä¸ä¸çº§æ°æ® |
| | | |
| | | }else{ |
| | | //åäººç¾ |
| | | //1ãä¿®æ¹èªå·±çæ°æ®è®°å½ |
| | | |
| | | //2ã æ¯å¦æ¯ç»å®¡ å¼å¯ä¸ä¸çº§æ°æ® |
| | | |
| | | |
| | | } |
| | | //ä¸å¡éè¿ ä¿®æ¹å®¡æ¹å¯¹åºæ¶æ¯è®°å½ |
| | | if(Constants.equalsInteger(approve.getStatus(),Constants.approveStatus.pass)){ |
| | | |
| | | } |
| | | // |
| | | |
| | | //ç»å®¡ä¸å¡ åéæé |
| | | if (Constants.equalsInteger(approve.getIsEndCheck(),Constants.ONE)) { |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | public void dealBusinessData(ApproveDTO approveDTO,Approve approve,Visits visits,CarUseBook carUseBook){ |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.unConstructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.constructionVisit) |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.ApproveMapper; |
| | | import com.doumee.dao.business.CarDriverMapper; |
| | | import com.doumee.dao.business.CarUseBookMapper; |
| | | import com.doumee.dao.business.CarsMapper; |
| | | import com.doumee.dao.business.join.ApproveJoinMapper; |
| | |
| | | @Autowired |
| | | private ApproveService approveService; |
| | | |
| | | @Autowired |
| | | private CarDriverMapper carDriverMapper; |
| | | |
| | | |
| | | @Override |
| | | public Integer create(CarUseBook carUseBook) { |
| | | public Integer create(CarUseBook carUseBook) throws Exception { |
| | | if(Objects.isNull(carUseBook) |
| | | || Objects.isNull(carUseBook.getCarId()) |
| | | || Objects.isNull(carUseBook.getStartTime()) |
| | |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | if(carUseBook.getEndTime().getTime()<=System.currentTimeMillis()){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"éæ©æ¥æå¼å¸¸[ç»ææ¶é´å°äºå½åæ¶é´],è¯·å·æ°éè¯"); |
| | | } |
| | | if(!(DateUtil.getDateFromString(carUseBook.getPlanUseDate()+":00").getTime()>=carUseBook.getStartTime().getTime() |
| | | && DateUtil.getDateFromString(carUseBook.getPlanUseDate() +":00").getTime()<= carUseBook.getEndTime().getTime()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"åºåæ¶é´é误"); |
| | | } |
| | | carUseBook.setStatus(Constants.ZERO); |
| | | carUseBook.setCreateDate(new Date()); |
| | | carUseBook.setIsdeleted(Constants.ZERO); |
| | | Cars cars = carsMapper.selectById(carUseBook.getCarId()); |
| | | if(Objects.isNull(cars)||!cars.getType().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"车è¾ä¿¡æ¯å¼å¸¸"); |
| | | } |
| | | //æ¥è¯¢è½¦è¾æäº¤æ¶é´æ¯å¦åå¨å²çªçé¢çº¦è®°å½ |
| | | List<CarUseBook> carUseBookList = carUseBookJoinMapper.selectJoinList(CarUseBook.class, |
| | | new MPJLambdaWrapper<CarUseBook>() |
| | | .selectAll(CarUseBook.class) |
| | | .selectAs(Member::getName,CarUseBook::getMemberName) |
| | | .selectAs(Member::getPhone,CarUseBook::getMemberMobile) |
| | | .leftJoin(Member.class,Member::getId,CarUseBook::getMemberId) |
| | | .eq(CarUseBook::getId,carUseBook.getCarId()) |
| | | .in(CarUseBook::getStatus,0,1,2) |
| | | .and(i->i.and(j->j.lt(CarUseBook::getStartTime,carUseBook.getStartTime()).gt(CarUseBook::getStartTime,carUseBook.getStartTime())) |
| | | .or() |
| | | .and(j->j.lt(CarUseBook::getEndTime,carUseBook.getEndTime()).gt(CarUseBook::getEndTime,carUseBook.getStartTime())) |
| | | .or() |
| | | .and(j->j.gt(CarUseBook::getStartTime,carUseBook.getStartTime()).lt(CarUseBook::getEndTime,carUseBook.getEndTime())) |
| | | .or() |
| | | .and(j->j.lt(CarUseBook::getStartTime,carUseBook.getStartTime()).gt(CarUseBook::getEndTime,carUseBook.getEndTime())) |
| | | ) |
| | | //æ ¹æ®è½¦è¾æ¥è¯¢å¸æºä¿¡æ¯ |
| | | CarDriver carDriver = carDriverMapper.selectOne(new QueryWrapper<CarDriver>().lambda() |
| | | .eq(CarDriver::getCarId,cars.getId()) |
| | | .eq(CarDriver::getIsdeleted,Constants.ZERO) |
| | | .eq(CarDriver::getStatus,Constants.ONE) |
| | | .last( " limit 1 ") |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(carUseBookList)){ |
| | | if(Objects.nonNull(carDriver)&&Objects.nonNull(carDriver.getMemberId())){ |
| | | carUseBook.setDriverId(carDriver.getMemberId()); |
| | | } |
| | | //æ¥è¯¢è½¦è¾æäº¤æ¶é´æ¯å¦åå¨å²çªçé¢çº¦è®°å½ |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(this.carUseBookList(carUseBook))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"åå¨è½¦è¾é¢çº¦æ¶é´ä¸å·²é¢çº¦æ¶é´å²çª~"); |
| | | } |
| | | carUseBookMapper.insert(carUseBook); |
| | |
| | | .eq(pageWrap.getModel().getMemberId() != null, CarUseBook::getMemberId, pageWrap.getModel().getMemberId()) |
| | | .eq(pageWrap.getModel().getDriverId() != null, CarUseBook::getDriverId, pageWrap.getModel().getDriverId()) |
| | | .apply(pageWrap.getModel().getCompanyName() != null, "t4.company_name_path like '%"+pageWrap.getModel().getCompanyName()+"%'") |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getQueryDate()), |
| | | i->i.and(j->j.lt(CarUseBook::getStartTime,pageWrap.getModel().getQueryDate() +"00:00:00").gt(CarUseBook::getStartTime,pageWrap.getModel().getQueryDate() +"23:59:59")) |
| | | .or() |
| | | .and(j->j.lt(CarUseBook::getEndTime,pageWrap.getModel().getQueryDate() +"23:59:59").gt(CarUseBook::getEndTime,pageWrap.getModel().getQueryDate() +"00:00:00")) |
| | | .or() |
| | | .and(j->j.gt(CarUseBook::getStartTime,pageWrap.getModel().getQueryDate() +"00:00:00").lt(CarUseBook::getEndTime,pageWrap.getModel().getQueryDate() +"23:59:59")) |
| | | .or() |
| | | .and(j->j.lt(CarUseBook::getStartTime,pageWrap.getModel().getQueryDate() +"00:00:00").gt(CarUseBook::getEndTime,pageWrap.getModel().getQueryDate() +"23:59:59")) |
| | | ) |
| | | |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getMemberName()), ms->ms.like(Member::getName,pageWrap.getModel().getMemberName()) |
| | | .or().like(Member::getPhone,pageWrap.getModel().getMemberName())) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getQueryStartTime()), CarUseBook::getPlanUseDate,pageWrap.getModel().getQueryStartTime()) |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<CarUseBook> carUseBookList(CarUseBook carUseBook){ |
| | | public List<CarUseBook> carUseBookList(CarUseBook carUseBook) throws Exception { |
| | | if(Objects.isNull(carUseBook) |
| | | || Objects.isNull(carUseBook.getCarId()) |
| | | || Objects.isNull(carUseBook.getStartTime()) |
| | |
| | | .selectAs(Member::getName,CarUseBook::getMemberName) |
| | | .selectAs(Member::getPhone,CarUseBook::getMemberMobile) |
| | | .leftJoin(Member.class,Member::getId,CarUseBook::getMemberId) |
| | | .eq(CarUseBook::getId,carUseBook.getCarId()) |
| | | .eq(CarUseBook::getCarId,carUseBook.getCarId()) |
| | | .in(CarUseBook::getStatus,0,1,2) |
| | | .and(i->i.and(j->j.lt(CarUseBook::getStartTime,carUseBook.getStartTime()).gt(CarUseBook::getStartTime,carUseBook.getStartTime())) |
| | | .or() |
| | | .and(j->j.lt(CarUseBook::getEndTime,carUseBook.getStartTime()).gt(CarUseBook::getEndTime,carUseBook.getStartTime())) |
| | | .or() |
| | | .and(j->j.gt(CarUseBook::getStartTime,carUseBook.getStartTime()).lt(CarUseBook::getEndTime,carUseBook.getEndTime())) |
| | | .or() |
| | | .and(j->j.lt(CarUseBook::getStartTime,carUseBook.getStartTime()).gt(CarUseBook::getEndTime,carUseBook.getEndTime())) |
| | | ) |
| | | .apply(" ( " + |
| | | " '"+DateUtil.getPlusTime(carUseBook.getStartTime())+"' <= t.start_time AND t.start_time < '"+DateUtil.getPlusTime(carUseBook.getEndTime())+"' " + |
| | | " or " + |
| | | " ( '"+DateUtil.getPlusTime(carUseBook.getStartTime())+"' < t.end_time AND t.end_time < '"+DateUtil.getPlusTime(carUseBook.getEndTime())+"' ) " + |
| | | " or " + |
| | | " ( '"+DateUtil.getPlusTime(carUseBook.getStartTime())+"' > t.start_time AND '"+DateUtil.getPlusTime(carUseBook.getEndTime())+"' < t.end_time )" + |
| | | " ) " ) |
| | | ); |
| | | return carUseBookList; |
| | | } |
| | |
| | | ||Objects.isNull(interval.getCode())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"é
ç½®é误ï¼è¯·è系管çå"); |
| | | } |
| | | Date startTime = DateUtil.StringToDate(dateDay + workStart.getCode(),"yyyy-MM-dd HH:mm:ss"); |
| | | Date endTime = DateUtil.StringToDate(dateDay + workEnd.getCode(),"yyyy-MM-dd HH:mm:ss"); |
| | | Date startTime = DateUtil.StringToDate((dateDay + " " +workStart.getCode()),"yyyy-MM-dd HH:mm:ss"); |
| | | Date endTime = DateUtil.StringToDate(dateDay + " " + workEnd.getCode(),"yyyy-MM-dd HH:mm:ss"); |
| | | Long intervalTime = Long.valueOf(interval.getCode()); |
| | | LocalDateTime localStartTime = startTime.toInstant() |
| | | .atZone(ZoneId.systemDefault()) |
| | |
| | | .eq(CarUseBook::getIsdeleted,Constants.ZERO) |
| | | .eq(CarUseBook::getCarId,cars) |
| | | .in(CarUseBook::getStatus,0,1,2) |
| | | .and(i->i.like(CarUseBook::getStartTime,dateDay).or().like(CarUseBook::getEndTime,dateDay) |
| | | .and(i->i.like(CarUseBook::getStartTime,dateDay) |
| | | .or().like(CarUseBook::getEndTime,dateDay) |
| | | .or().apply(" START_TIME < '"+dateDay+" 00:00:00' and END_TIME > '"+dateDay+" 23:59:59' ")) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(carUseBookList)){ |
| | | for (DateIntervalVO dateIntervalVO:dateIntervalVOList) { |
| | | if( |
| | | carUseBookList.stream().filter( |
| | | i-> |
| | | ( i.getStartTime().getTime()<DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime() |
| | | && i.getEndTime().getTime() > DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime()) |
| | | || |
| | | ( i.getStartTime().getTime()<DateUtil.stringToDate(dateIntervalVO.getEndTime(),"yyyy-MM-dd HH:mm:ss ").getTime() |
| | | && i.getEndTime().getTime() > DateUtil.stringToDate(dateIntervalVO.getEndTime(),"yyyy-MM-dd HH:mm:ss ").getTime()) |
| | | || |
| | | ( DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime() < i.getStartTime().getTime() |
| | | && DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime() > i.getStartTime().getTime()) |
| | | || |
| | | ( DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime() < i.getEndTime().getTime() |
| | | && DateUtil.stringToDate(dateIntervalVO.getStartTime(),"yyyy-MM-dd HH:mm:ss ").getTime() > i.getEndTime().getTime()) |
| | | |
| | | ).collect(Collectors.toList()).size()>Constants.ZERO){ |
| | | //夿æ¶é´æ¯å¦å¤§äºå½å |
| | | if(DateUtil.getDateFromString(dateIntervalVO.getEndTime()).getTime()<=System.currentTimeMillis()){ |
| | | dateIntervalVO.setIsUse(Constants.ONE); |
| | | }; |
| | | continue; |
| | | } |
| | | for (CarUseBook i:carUseBookList ) { |
| | | if( |
| | | (DateUtil.getDateFromString(dateIntervalVO.getStartTime()).getTime() <= i.getStartTime().getTime() && |
| | | i.getStartTime().getTime() < DateUtil.getDateFromString(dateIntervalVO.getEndTime()).getTime()) |
| | | || |
| | | (DateUtil.getDateFromString(dateIntervalVO.getStartTime()).getTime() < i.getEndTime().getTime() && |
| | | i.getEndTime().getTime() <= DateUtil.getDateFromString(dateIntervalVO.getEndTime()).getTime()) |
| | | || |
| | | (DateUtil.getDateFromString(dateIntervalVO.getStartTime()).getTime() >= i.getStartTime().getTime() && |
| | | DateUtil.getDateFromString(dateIntervalVO.getEndTime()).getTime() <= i.getEndTime().getTime()) |
| | | ){ |
| | | dateIntervalVO.setIsUse(Constants.ONE); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return dateIntervalVOList; |
| | |
| | | dateIntervalVO.setStartTime(startTime); |
| | | dateIntervalVO.setEndTime(endTime); |
| | | dateIntervalVO.setIsUse(Constants.ZERO); |
| | | dateIntervalVOList.add(dateIntervalVO); |
| | | } |
| | | return dateIntervalVOList; |
| | | } |
| | |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | queryWrapper.selectAll(Member.class) |
| | | .selectAs(Company::getName,Member::getCompanyName) ; |
| | | if(StringUtils.isNotBlank(member.getName())){ |
| | | queryWrapper.like(Member::getName,member.getName()); |
| | | } |
| | | |
| | | if(null != member.getType()) { |
| | | queryWrapper.eq(Member::getType,member.getType()); |
| | |
| | | |
| | | @Override |
| | | public List<MemberVO> getVisitedMember(CheckVisitedDTO checkVisitedDTO){ |
| | | List<Member> memberList = memberMapper.selectList(new QueryWrapper<Member>().lambda() |
| | | List<Member> memberList = memberJoinMapper.selectJoinList(Member.class,new MPJLambdaWrapper<Member>() |
| | | .selectAll(Member.class) |
| | | .selectAs(Company::getName,Member::getCompanyName) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .eq(StringUtils.isNotBlank(checkVisitedDTO.getMobile()),Member::getPhone,checkVisitedDTO.getMobile()) |
| | | .eq(StringUtils.isNotBlank(checkVisitedDTO.getName()),Member::getName,checkVisitedDTO.getName()) |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer visitReporting(Visits visits) { |
| | | visits.setSourceType(Constants.ZERO); |
| | | isValidBaseParam(visits); |
| | | //æ£éªè¢«æè®¿äººæ¯å¦åæ³ |
| | | Member visitMember = isValideVisitedUser(visits.getMemberId()); |
| | |
| | | visits.setVisitType(Integer.valueOf(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.MDJ_VISIT_REQUIRED).getCode())); |
| | | visits.setIdcardNo(DESUtil.decrypt(Constants.EDS_PWD, visitMember.getIdcardNo())); |
| | | //åå§åè®¿å®¢ä¿¡æ¯ |
| | | initVisitInfo(visits,date); |
| | | // initVisitInfo(visits,date); |
| | | visitsMapper.insert(visits); |
| | | return visits.getId(); |
| | | } |
| | |
| | | || StringUtils.isBlank( visits.getName()) |
| | | || StringUtils.isBlank( visits.getPhone()) |
| | | || StringUtils.isBlank( visits.getCompanyName()) |
| | | || visits.getIdcardType() == null |
| | | || Objects.isNull(visits.getType()) |
| | | // || StringUtils.isBlank( visits.getFaceImg() ) |
| | | || StringUtils.isBlank( visits.getIdcardNo() ) |
| | | || visits.getReceptMemberId() == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼ä¿¡æ¯å¡«å䏿£ç¡®ï¼"); |
| | | } |
| | | if(Constants.equalsInteger(visits.getType(),Constants.ZERO) |
| | | || Constants.equalsInteger(visits.getType(),Constants.ONE)){ |
| | | if( visits.getIdcardType() == null |
| | | || StringUtils.isBlank( visits.getIdcardNo() ) ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼ä¿¡æ¯å¡«å䏿£ç¡®ï¼"); |
| | | } |
| | | } |
| | | //访客æ¥å¤ |
| | | if(visits.getType().equals(Constants.TWO) |
| | |
| | | || StringUtils.isBlank( visits.getPhone()) |
| | | || StringUtils.isBlank( visits.getCompanyName())) |
| | | || StringUtils.isBlank( visits.getCarNos()) |
| | | || Objects.isNull(visits.getReceptMemberId()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼ä¿¡æ¯å¡«å䏿£ç¡®ï¼"); |
| | | }else if(visits.getType().equals(Constants.ONE) && StringUtils.isBlank(visits.getConstructionReason())){ |
| | | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼æªå¡«åæ½å·¥äºç±ï¼"); |
| | | } |
| | | if(visits.getEndtime().getTime() < System.currentTimeMillis()){ |