From 6be28040e74e1ff7764478174a9b5d706fe4fc39 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 31 五月 2024 11:40:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/pages/staff/vehicle/apply.vue | 498 +++++++++++++++++++++++++++++++++----------------------
1 files changed, 299 insertions(+), 199 deletions(-)
diff --git a/h5/pages/staff/vehicle/apply.vue b/h5/pages/staff/vehicle/apply.vue
index 10f880f..174c512 100644
--- a/h5/pages/staff/vehicle/apply.vue
+++ b/h5/pages/staff/vehicle/apply.vue
@@ -1,215 +1,315 @@
<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銆佸叕鍙稿�熺粰鐢宠浜虹敤杞︼紝鐢宠鍊熻溅浜轰负绗竴璐d换浜猴紝涓嶅厑璁歌浆鍊熺粰鍏朵粬浜轰娇鐢紝鑻ヨ鍊熺粰浠栦汉浣跨敤銆傝矗浠讳汉瑕佹壙鎷呭叏閮ㄨ矗浠汇��</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銆佸叕鍙稿�熺粰鐢宠浜虹敤杞︼紝鐢宠鍊熻溅浜轰负绗竴璐d换浜猴紝涓嶅厑璁歌浆鍊熺粰鍏朵粬浜轰娇鐢紝鑻ヨ鍊熺粰浠栦汉浣跨敤銆傝矗浠讳汉瑕佹壙鎷呭叏閮ㄨ矗浠汇��</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>
--
Gitblit v1.9.3