| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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.startTime ? '#000000' : '#999999' }"> |
| | | <text v-if="param.startTime"> |
| | | {{ param.startTime.slice(5, 16) }}è³{{ |
| | | param.endTime.slice(5, 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="selPeople"> |
| | | <text class="mr6" :style="{ |
| | | color: |
| | | param.memberList && param.memberList.length > 0 |
| | | ? '#000000' |
| | | : '#999999', |
| | | }"> |
| | | <text v-if="param.memberNames"> |
| | | <text v-for="(mem, i) in param.memberList" :key="mem.id"> |
| | | <template v-if="i < 2"> |
| | | <text>{{ mem.realname }}</text> |
| | | <text v-if="i < 1 && param.memberList.length > 1">,</text> |
| | | </template> |
| | | </text> |
| | | <text v-if="param.memberList.length > 2">ç{{ param.memberList.length }}人</text> |
| | | </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 class="sub_btn" @click="handleSub">æäº¤</view> |
| | | </view> |
| | | <!-- --> |
| | | <!-- :minDate="new Date(param.startTime).getTime()" |
| | | :maxDate="new Date(param.endTime).getTime()" --> |
| | | <u-datetime-picker :show="isShowDatetime" @confirm="confirmDate" :minDate="new Date(param.startTime).getTime()" |
| | | :maxDate="new Date(param.endTime).getTime()" @cancel="isShowDatetime = false" mode="datetime"></u-datetime-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | 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.memberId).join(',')) |
| | | this.$set(this.param, 'memberNames', res.map(i => i.realname).join(',')) |
| | | }) |
| | | }, |
| | | destroyed() { |
| | | console.log('页é¢éæ¯'); |
| | | // uni.setStorageSync('vehicleAppForm', {}) |
| | | }, |
| | | onLoad(option) { |
| | | const param = uni.getStorageSync('vehicleAppForm') || {} |
| | | this.param = { ...param, ...option } |
| | | console.log(this.param); |
| | | this.minDate = new Date().getTime() |
| | | this.param.planUseDate = dayjs(this.param.startTime).format('YYYY-MM-DD HH:mm') |
| | | }, |
| | | 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) { |
| | | uni.setStorageSync('vehicleAppForm', {}) |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: 'æäº¤æå', |
| | | icon: 'success' |
| | | }) |
| | | }) |
| | | uni.redirectTo({ |
| | | url: '/pages/staff/index' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | selPeople() { |
| | | if (this.param.memberList && this.param.memberList.length > 0) { |
| | | setTimeout(() => { |
| | | this.$eventBus.$emit('applePeoDetail', this.param.memberList || []) |
| | | }, 500) |
| | | } |
| | | this.$jump('/pages/staff/vehicle/applePeo') |
| | | }, |
| | | goBack() { |
| | | uni.setStorageSync('vehicleAppForm', this.param) |
| | | this.$goBack() |
| | | }, |
| | | confirmDate(e) { |
| | | this.param.planUseDate = dayjs(e.value).format('YYYY-MM-DD HH:mm') |
| | | this.isShowDatetime = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | page { |
| | | background-color: #f7f7f7; |
| | | } |
| | | |
| | | .main_wrap { |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx; |
| | | background-color: #fff; |
| | | width: 750rpx; |
| | | margin: 0 -30rpx; |
| | | |
| | | .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; |
| | | width: 750rpx; |
| | | margin: 0 -30rpx; |
| | | background-color: #fff; |
| | | |
| | | textarea { |
| | | margin-top: 12rpx; |
| | | width: 100%; |
| | | height: 120rpx; |
| | | 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; |
| | | margin-top: 60rpx; |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: $uni-color-primary; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee; |
| | | border-radius: 44rpx; |
| | | font-size: 30rpx; |
| | | color: #ffffff; |
| | | } |
| | | |
| | | .tip { |
| | | background: #f7f7f7; |
| | | padding: 30rpx 30rpx 10rpx; |
| | | 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; |
| | | } |
| | | |
| | | .empty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | </style> |