| <template> | 
|     <view class="main_app"> | 
|         <view class="main_wrap"> | 
|             <view class="main_title">运输信息</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="showDatetime = true"> | 
|                     <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : '请选择' }}</text> | 
|                     <u-icon name="arrow-right" color="#CCCCCC" size="16"></u-icon> | 
|                 </view> | 
|             </view> | 
|             <view class="line"> | 
|                 <view class="label"> | 
|                     <text>*</text> | 
|                     <text>入库类型</text> | 
|                 </view> | 
|                 <view class="value"> | 
|                     <view class="btns"> | 
|                         <view class="btn active">整托盘</view> | 
|                         <view class="btn">件烟</view> | 
|                     </view> | 
|                 </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;" /> | 
|                     <text class="unit">万支</text> | 
|                 </view> | 
|             </view> | 
|             <view class="line"> | 
|                 <view class="label"> | 
|                     <text>*</text> | 
|                     <text>准运证照片</text> | 
|                 </view> | 
|                 <view class="value"> | 
|                     <view class="upload_wrap"><u-icon name="plus" size="20" color="#999999"></u-icon></view> | 
|                 </view> | 
|             </view> | 
|             <view class="empty"></view> | 
|             <view class="main_title">司机/车辆信息</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"><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="openInput(1)"> | 
|                     <text :style="{ color: param.carNos ? '#000000' : '' }">{{ param.carNos ? param.carNos : '请输入车牌号码' }}</text> | 
|                 </view> | 
|             </view> | 
|             <view class="line"> | 
|                 <view class="label"> | 
|                     <text>*</text> | 
|                     <text>车后牌照号</text> | 
|                 </view> | 
|                 <view class="value" @click="openInput(1)"> | 
|                     <text :style="{ color: param.carNos ? '#000000' : '' }">{{ param.carNos ? param.carNos : '请输入车牌号码' }}</text> | 
|                 </view> | 
|             </view> | 
|             <view class="copy" @click="copy">复制车前牌照号</view> | 
|             <view class="perch"></view> | 
|             <view class="handle_sub"> | 
|                 提交 | 
|             </view> | 
|   | 
|             <!--  --> | 
|         </view> | 
|         <u-datetime-picker | 
|             :show="showDatetime" | 
|             closeOnClickOverlay | 
|             :minDate="new Date().getTime()" | 
|             mode="datetime" | 
|             @close="showDatetime = false" | 
|             @cancel="showDatetime = false" | 
|             @confirm="setinDate" | 
|         ></u-datetime-picker> | 
|         <keyboardInput ref="keyboard" @export="setPlate" @close="closeInput" /> | 
|     </view> | 
| </template> | 
|   | 
| <script> | 
| import keyboardInput from '@/components/keyboard-input/keyboard-input.vue'; | 
| import { uploadUrl } from '@/api'; | 
| export default { | 
|     components: { | 
|         keyboardInput | 
|     }, | 
|     data() { | 
|         return { | 
|             param: {}, | 
|             showDatetime: false, | 
|   | 
|             inputType: '' | 
|         }; | 
|     }, | 
|     methods: { | 
|         copy(){ | 
|             this.param.carNos = this.param.carNos | 
|             uni.showToast({ | 
|                 title: '复制成功', | 
|                 duration: 1000 | 
|             }); | 
|         }, | 
|         handleUpload() { | 
|             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(); | 
|                                 } | 
|                             } | 
|                         }); | 
|                     } | 
|                 } | 
|             }); | 
|         }, | 
|         setinDate(e) {}, | 
|         openInput(type) { | 
|             this.inputType = type; | 
|             this.$refs.keyboard.open(); | 
|         }, | 
|         setPlate(e) { | 
|             if (this.inputType === 1) { | 
|                 this.param.carNos = e; | 
|             } else if (this.inputType === 2) { | 
|                 this.param.carNos = e; | 
|             } | 
|             this.$forceUpdate(); | 
|             this.closeInput(); | 
|         }, | 
|         closeInput() { | 
|             this.$refs.keyboard.close(); | 
|         } | 
|     } | 
| }; | 
| </script> | 
|   | 
| <style lang="scss"> | 
| page { | 
|     background-color: #f7f7f7; | 
| } | 
| .main_wrap { | 
|     background-color: #fff; | 
|     margin: 0 -30rpx; | 
|     padding: 0 30rpx; | 
|     .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; | 
|             .btns { | 
|                 display: flex; | 
|                 align-items: center; | 
|                 .btn { | 
|                     height: 60rpx; | 
|                     line-height: 60rpx; | 
|                     padding: 0 16rpx; | 
|                     font-size: 26rpx; | 
|                     margin-left: 12rpx; | 
|                     border-radius: 12rpx; | 
|                     border: 1rpx solid #777777; | 
|                     color: #777777; | 
|                 } | 
|                 .active { | 
|                     background-color: #4d99a8; | 
|                     color: #fff; | 
|                     border: 1rpx solid #4d99a8; | 
|                 } | 
|             } | 
|             .unit { | 
|                 width: 64rpx; | 
|                 text-align: right; | 
|                 font-size: 26rpx; | 
|                 margin-bottom: 2rpx; | 
|             } | 
|             input { | 
|                 flex: 1; | 
|                 height: 100%; | 
|                 text-align: right; | 
|                 font-size: 28rpx; | 
|                 font-weight: 400; | 
|                 color: #222222; | 
|             } | 
|             .upload_wrap { | 
|                 width: 120rpx; | 
|                 height: 120rpx; | 
|                 border-radius: 12rpx; | 
|                 border: 2rpx solid #e5e5e5; | 
|                 background: #f7f7f7; | 
|                 color: #666666; | 
|                 display: flex; | 
|                 align-items: center; | 
|                 justify-content: center; | 
|                 overflow: hidden; | 
|                 image { | 
|                     width: 100%; | 
|                     height: 100%; | 
|                 } | 
|             } | 
|         } | 
|     } | 
| } | 
| .main_app { | 
|     // padding-top: 10rpx; | 
|     .handle_sub{ | 
|         position: fixed; | 
|         bottom: 64rpx; | 
|         width: 690rpx; | 
|         left: 30rpx; | 
|         background-color: #4d99a8; | 
|         height: 88rpx; | 
|         line-height: 88rpx; | 
|         text-align: center; | 
|         color: #fff; | 
|         border-radius: 50rpx; | 
|     } | 
|     .perch{ | 
|         width: 750rpx; | 
|         margin: 0 -30rpx; | 
|         height: 200rpx; | 
|         background-color: #f7f7f7; | 
|     } | 
|     .copy{ | 
|         background-color: #f7f7f7; | 
|         display: flex; | 
|         margin: 0 -30rpx; | 
|         justify-content: flex-end; | 
|         padding: 12rpx 30rpx; | 
|         font-size: 26rpx; | 
|         color: #4d99a8; | 
|     } | 
| } | 
| .main_title { | 
|     width: 750rpx; | 
|     padding: 16rpx 30rpx; | 
|     background-color: #f7f7f7; | 
|     margin: 0 -30rpx; | 
|     color: #666666; | 
|     font-size: 26rpx; | 
| } | 
| .empty { | 
|     width: 750rpx; | 
|     height: 20rpx; | 
|     background-color: #f7f7f7; | 
|     margin: 0 -30rpx; | 
| } | 
| </style> |