| | |
| | | </view> |
| | | </view> |
| | | <view v-if="receiveAddr" class="store-cell-copy-addr"> |
| | | <text class="store-cell-title">{{ receiveAddr.name }}</text> |
| | | <view class="store-cell-subtitle-container"> |
| | | <image src="/static/icon/home_ic_location3@2x.png" mode="widthFix"></image> |
| | | <text class="store-cell-subtitle">{{ receiveAddr.addr }}</text> |
| | | </view> |
| | | <text class="store-cell-title">{{ receiveAddr.addr }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <input v-model="form.mobile" class="form-input" :class="{ 'filled-input': form.mobile }" type="number" placeholder="请输入收件人电话" placeholder-style="color: #B2B2B2;" /> |
| | | </view> |
| | | <view class="form-row dashed-row"> |
| | | <text class="form-label">预计到店时间</text> |
| | | <text class="form-label">到店寄存时间</text> |
| | | <view class="row-picker" @click="showArriveTimePicker = true"> |
| | | <text :class="form.arriveTime ? 'picker-value-text' : 'placeholder-text'">{{ form.arriveTime || '请选择' }}</text> |
| | | <u-icon name="arrow-right" size="18" color="#222222"></u-icon> |
| | |
| | | </view> |
| | | <view class="form-row no-border"> |
| | | <text class="form-label">预计取件时间</text> |
| | | <view class="row-picker" @click="showPickupTimePicker = true"> |
| | | <view class="row-picker" @click="openPickupTimePicker"> |
| | | <text :class="form.pickupTime ? 'picker-value-text' : 'placeholder-text'">{{ form.pickupTime || '请选择' }}</text> |
| | | <u-icon name="arrow-right" size="18" color="#222222"></u-icon> |
| | | </view> |
| | |
| | | :show="showArriveTimePicker" |
| | | v-model="arriveTimeValue" |
| | | mode="datetime" |
| | | :minDate="Date.now()" |
| | | confirmText="确定" |
| | | cancelText="取消" |
| | | title="选择预计到店时间" |
| | | title="选择到店寄存时间" |
| | | @confirm="confirmArriveTime" |
| | | @cancel="showArriveTimePicker = false" |
| | | @close="showArriveTimePicker = false" |
| | |
| | | :show="showPickupTimePicker" |
| | | v-model="pickupTimeValue" |
| | | mode="datetime" |
| | | :minDate="pickupMinDate" |
| | | confirmText="确定" |
| | | cancelText="取消" |
| | | title="选择预计取件时间" |
| | |
| | | <text class="section-title">物品信息</text> |
| | | </view> |
| | | <view class="required-wrap"> |
| | | <text class="section-required goods-required-text" :style="{ color: form.goodTypeName ? '#111111' : '#B2B2B2' }">{{ form.goodTypeName || '必选,请选择' }}</text> |
| | | <text class="section-required goods-required-text" :style="{ color: form.goodTypeName ? '#111111' : 'red' }">{{ form.goodTypeName || '必选,请选择' }}</text> |
| | | <u-icon name="arrow-right" size="12" color="#A8AFBA"></u-icon> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="upload-box" @click="chooseAndUploadImage(9)"> |
| | | <image class="upload-icon" src="/static/image/btn_upload@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view v-for="(item, index) in uploadedImages" :key="index" class="uploaded-box" @click="deleteImage(index)"> |
| | | <view v-for="(item, index) in uploadedImages" :key="index" class="uploaded-box"> |
| | | <image class="uploaded-image" :src="item.url" mode="aspectFill"></image> |
| | | <text class="uploaded-delete" @click="deleteImage(index)">删除</text> |
| | | <text class="uploaded-delete" @click.stop="deleteImage(index)">删除</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | <text class="amount-row-value">{{ amountData.distance + 'km' }}</text> |
| | | </view> |
| | | <view v-if="activeMode !== 'city' && amountData.days" class="amount-row amount-row-extra"> |
| | | <view class="amount-row-left"> |
| | | <text class="amount-row-label">寄存天数</text> |
| | | </view> |
| | | <text class="amount-row-value">{{ amountData.days + '天' }}</text> |
| | | </view> |
| | | <view v-if="amountData.insuranceFee" class="amount-row amount-row-extra"> |
| | | <view class="amount-row-left"> |
| | | <text class="amount-row-label">行李保价</text> |
| | | <text class="amount-row-label">物品保费</text> |
| | | </view> |
| | | <text class="amount-row-value">{{ '¥' + amountData.insuranceFee }}</text> |
| | | </view> |
| | |
| | | }, |
| | | totalPriceText() { |
| | | return '¥150.00' |
| | | }, |
| | | pickupMinDate() { |
| | | if (this.form.arriveTime) { |
| | | return new Date(this.form.arriveTime).getTime() |
| | | } |
| | | return Date.now() |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | this.getCategoryList() |
| | | this.getCitySizeList() |
| | | this.agreementChecked=false |
| | | this.getContactInfo() |
| | | |
| | | if (uni.getStorageSync('selectedStore')) { |
| | | this.selectedStore = uni.getStorageSync('selectedStore') |
| | | uni.removeStorageSync('selectedStore') |
| | | } |
| | | |
| | | uni.$on('updateAddress', (data) => { |
| | | console.log(data) |
| | | this.form.receiver = data.name |
| | | this.form.mobile = data.phone |
| | | this.receiveAddr = data |
| | | this.receiveAddr.addr = data.provinceName + data.cityName + data.districtName + data.addr |
| | | }) |
| | | }, |
| | | methods: { |
| | | caozuo(e) { |
| | | var that = this; |
| | | this.receiveStore = null |
| | | this.receiveAddr = null |
| | | if (e.name === '选择服务点') { |
| | | that.storePopupType = 'receive' |
| | | that.receiveStore = null |
| | | that.showStorePopup = true |
| | | } else if (e.name === '选择地址簿') { |
| | | that.receiveAddr = null |
| | | uni.navigateTo({ |
| | | url: '/pages/address/address?type=1' |
| | | }) |
| | | } |
| | | that.showReceiveAddress = false |
| | | this.showReceiveAddress = false |
| | | }, |
| | | async uploadFiles(filePaths, maxCount = 9) { |
| | | if (!filePaths || filePaths.length === 0) { |
| | |
| | | const hour = String(date.getHours()).padStart(2, '0') |
| | | const minute = String(date.getMinutes()).padStart(2, '0') |
| | | this.form.arriveTime = `${year}-${month}-${day} ${hour}:${minute}` |
| | | this.form.pickupTime = '' |
| | | this.pickupTimeValue = e.value + 3600000 |
| | | this.showArriveTimePicker = false |
| | | this.calculateLocalPrice() |
| | | }, |
| | | openPickupTimePicker() { |
| | | if (!this.form.arriveTime) { |
| | | uni.showToast({ title: '请先选择到店寄存时间', icon: 'none' }) |
| | | return |
| | | } |
| | | this.showPickupTimePicker = true |
| | | }, |
| | | confirmPickupTime(e) { |
| | | const date = new Date(e.value) |
| | |
| | | const minute = String(date.getMinutes()).padStart(2, '0') |
| | | const pickupTime = `${year}-${month}-${day} ${hour}:${minute}` |
| | | if (this.form.arriveTime && new Date(pickupTime) <= new Date(this.form.arriveTime)) { |
| | | uni.showToast({ title: '预计取件时间必须大于预计到店时间', icon: 'none' }) |
| | | uni.showToast({ title: '预计取件时间必须大于到店寄存时间', icon: 'none' }) |
| | | return |
| | | } |
| | | this.form.pickupTime = pickupTime |
| | |
| | | item.count = 0 |
| | | }) |
| | | this.luggageTypes = res.data || [] |
| | | } |
| | | }, |
| | | async getContactInfo() { |
| | | const res = await this.$u.api.getContactInfo({}) |
| | | if (res.code === 200 && res.data) { |
| | | if (res.data.name) { |
| | | this.form.receiver = res.data.name |
| | | } |
| | | if (res.data.phone) { |
| | | this.form.mobile = res.data.phone |
| | | } |
| | | } |
| | | }, |
| | | async getNearbyShopList() { |
| | |
| | | } |
| | | }, |
| | | async calculateLocalPriceOnly() { |
| | | if (!this.selectedStore || !this.form.arriveTime || !this.form.pickupTime) { |
| | | if (!this.form.arriveTime || !this.form.pickupTime) { |
| | | this.amountData = null |
| | | return |
| | | } |
| | | const luggageList = this.luggageTypes |
| | |
| | | quantity: item.count |
| | | })) |
| | | if (luggageList.length === 0) { |
| | | this.amountData = null |
| | | return |
| | | } |
| | | const res = await this.$u.api.calculateLocalPrice({ |
| | | cityId: this.cityId, |
| | | shopId: this.selectedStore.id, |
| | | depositStartTime: this.form.arriveTime + ':00', |
| | | depositEndTime: this.form.pickupTime + ':00', |
| | | items: luggageList, |
| | |
| | | } |
| | | }, |
| | | async calculateRemotePrice() { |
| | | if (!this.sendStore || !this.form.arriveTime || !this.form.pickupTime) { |
| | | if (!this.sendStore) { |
| | | this.amountData = null |
| | | return |
| | | } |
| | | if (!this.receiveStore && !this.receiveAddr) { |
| | | this.amountData = null |
| | | return |
| | | } |
| | | const luggageList = this.luggageTypes |
| | |
| | | quantity: item.count |
| | | })) |
| | | if (luggageList.length === 0) { |
| | | this.amountData = null |
| | | return |
| | | } |
| | | let fromLat = '' |
| | |
| | | toLat: toLat, |
| | | toLgt: toLgt, |
| | | urgent: this.isUrgent, |
| | | depositStartTime: this.form.arriveTime + ':00', |
| | | depositEndTime: this.form.pickupTime + ':00', |
| | | items: luggageList, |
| | | declaredAmount: this.form.insurance || 0 |
| | | }) |
| | |
| | | return |
| | | } |
| | | if (!this.form.arriveTime) { |
| | | uni.showToast({ title: '请选择预计到店时间', icon: 'none' }) |
| | | uni.showToast({ title: '请选择到店寄存时间', icon: 'none' }) |
| | | return |
| | | } |
| | | if (!this.form.pickupTime) { |
| | |
| | | return |
| | | } |
| | | if (new Date(this.form.pickupTime) <= new Date(this.form.arriveTime)) { |
| | | uni.showToast({ title: '预计取件时间必须大于预计到店时间', icon: 'none' }) |
| | | uni.showToast({ title: '预计取件时间必须大于到店寄存时间', icon: 'none' }) |
| | | return |
| | | } |
| | | const luggageList = this.luggageTypes |