| | |
| | | </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> |
| | | <text class="section-desc">(多选,必填)</text> |
| | | </view> |
| | | <view class="price-note"> |
| | | <view class="price-note" @click="goRichText(9)"> |
| | | <image class="price-note-icon" src="/static/icon/ic_tips@2x.png" mode="widthFix"></image> |
| | | <text>价格说明</text> |
| | | </view> |
| | |
| | | :class="{ active: item.count > 0 }" |
| | | > |
| | | <view class="luggage-info"> |
| | | <image class="luggage-image" :src="item.iconFull" mode="widthFix"></image> |
| | | <view class="luggage-image"> |
| | | <image style="height: 100%;" :src="item.iconFull" mode="heightFix"></image> |
| | | </view> |
| | | <view class="luggage-copy"> |
| | | <text class="luggage-name">{{ item.name }}</text> |
| | | <text class="luggage-size">{{ item.otherField || '' }}</text> |
| | | <text class="luggage-size">{{ item.remark || '' }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="luggage-stepper"> |
| | |
| | | <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> |
| | |
| | | <text class="unit-text">元</text> |
| | | </view> |
| | | </view> |
| | | <view v-if="amountData" class="insurance-tip-row"> |
| | | <text class="insurance-tip-label">物品保费:</text> |
| | | <text class="insurance-tip-value">¥{{ amountData.insuranceFee }}</text> |
| | | <view v-if="amountData || showInsuranceTip" class="insurance-tip-row"> |
| | | <text v-if="showInsuranceTip" class="insurance-tip-warning">{{ showInsuranceTipText }}</text> |
| | | <text v-else></text> |
| | | <view style="display: flex; align-items: center;"> |
| | | <text v-if="amountData" class="insurance-tip-label">物品保费:</text> |
| | | <text v-if="amountData" class="insurance-tip-value">¥{{ amountData.insuranceFee }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <image class="store-option-address-icon" src="/static/icon/home_ic_location3@2x.png" mode="widthFix"></image> |
| | | <text class="store-option-address">{{ item.address }}</text> |
| | | </view> |
| | | <text class="store-option-time">{{ item.time }}</text> |
| | | <text class="store-option-time">{{ item.shopHours || '' }}</text> |
| | | </view> |
| | | </view> |
| | | <view v-if="tempSelectedStoreId === item.id" class="store-check"> |
| | |
| | | <text class="goods-main-title">物品名称</text> |
| | | <text class="goods-main-required">(必选)</text> |
| | | </view> |
| | | <view class="goods-danger-tip"> |
| | | <view class="goods-danger-tip" @click="goRichText(10)"> |
| | | <image class="goods-danger-icon" src="/static/icon/ic_tips@2x.png" mode="widthFix"></image> |
| | | <text>禁寄物品</text> |
| | | </view> |
| | | </view> |
| | | <text class="goods-popup-desc">为确保物品寄递安全,请检查是否不夹带易燃易爆物品</text> |
| | | <view class="goods-tag-grid"> |
| | | <view |
| | | v-for="(item, index) in goodsOptions" |
| | | :key="index" |
| | | class="goods-tag" |
| | | :class="{ active: item.active }" |
| | | @click="goodsOptions.forEach((row,i) => row.active = i === index)" |
| | | > |
| | | <text>{{ item.name }}</text> |
| | | <view style="display: block;height: 500rpx;overflow-y: auto;margin-top:10px ;"> |
| | | <view class="goods-tag-grid"> |
| | | <view |
| | | v-for="(item, index) in goodsOptions" |
| | | :key="index" |
| | | class="goods-tag" |
| | | :class="{ active: item.active }" |
| | | @click="goodsOptions.forEach((row,i) => row.active = i === index)" |
| | | > |
| | | <text>{{ item.name }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="goods-save-btn" @tap="confirmGoods">保存</view> |
| | | </view> |
| | | </u-popup> |
| | |
| | | </view> |
| | | <text class="amount-row-value">{{ '¥' + item.unitPrice }}</text> |
| | | </view> |
| | | <view v-if="activeMode === 'city' && amountData.distance" class="amount-row amount-row-extra"> |
| | | <view class="amount-row-left"> |
| | | <text class="amount-row-label">配送里程</text> |
| | | </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> |
| | | </view> |
| | | <text class="amount-row-value">{{ '¥' + amountData.insuranceFee }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="agreement-bar popup-agreement-bar" @click="toggleAgreement"> |
| | | <image class="agreement-icon" :src="agreementChecked ? '/static/icon/ic_accept_sel@2x.png' : '/static/icon/ic_accept@2x.png'" mode="widthFix" /> |
| | | <text class="agreement-text">我已阅读并同意</text> |
| | | <text class="agreement-link" @tap="goRichText('protocol')">《用户服务协议》</text> |
| | | <text class="agreement-link" @tap="goRichText(0)">《用户服务协议》</text> |
| | | <text class="agreement-text">及</text> |
| | | <text class="agreement-link" @tap="goRichText('privacy')">《隐私政策》</text> |
| | | <text class="agreement-link" @tap="goRichText(1)">《隐私政策》</text> |
| | | </view> |
| | | <view class="bottom-action-row popup-action-row"> |
| | | <view class="total-wrap"> |
| | | <text class="total-label">总费用</text> |
| | | <text class="total-price">{{ amountData ? '¥' + amountData.totalPrice : '¥--' }}</text> |
| | | <view @click="showAmountPopup = false"> |
| | | <view style="display: flex; align-items: center;" @click="showAmountPopup = false"> |
| | | <text class="detail-text">明细</text> |
| | | <u-icon name="arrow-up" size="13" color="#7B7F86"></u-icon> |
| | | </view> |
| | |
| | | <view class="agreement-bar" @click="toggleAgreement"> |
| | | <image class="agreement-icon" :src="agreementChecked ? '/static/icon/ic_accept_sel@2x.png' : '/static/icon/ic_accept@2x.png'" mode="widthFix" /> |
| | | <text class="agreement-text">我已阅读并同意</text> |
| | | <text class="agreement-link" @tap="goRichText('protocol')">《用户服务协议》</text> |
| | | <text class="agreement-link" @click="goRichText(0)">《用户服务协议》</text> |
| | | <text class="agreement-text">及</text> |
| | | <text class="agreement-link" @tap="goRichText('privacy')">《隐私政策》</text> |
| | | <text class="agreement-link" @click="goRichText(1)">《隐私政策》</text> |
| | | </view> |
| | | <view class="bottom-action-row"> |
| | | <view class="total-wrap"> |
| | |
| | | <view class="submit-btn active-submit-btn" @click="createOrder">立即下单</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 选择服务点/地址 --> |
| | | <u-action-sheet |
| | | :show="showReceiveAddress" |
| | |
| | | { label: '就地寄存', value: 'local' }, |
| | | { label: '同城寄送', value: 'city' } |
| | | ], |
| | | agreementChecked: true, |
| | | agreementChecked: false, |
| | | tempSelectedStoreId: 2, |
| | | selectedStoreId: 2, |
| | | tempSelectedGoodsIds: [1], |
| | |
| | | goodsImages: [], |
| | | }, |
| | | amountData: null, |
| | | showInsuranceTip: false, |
| | | showInsuranceTipText: '', |
| | | luggageTypes: [], |
| | | serviceTimes: [], |
| | | |
| | |
| | | }, |
| | | totalPriceText() { |
| | | return '¥150.00' |
| | | }, |
| | | pickupMinDate() { |
| | | if (this.form.arriveTime) { |
| | | return new Date(this.form.arriveTime).getTime() |
| | | } |
| | | return Date.now() |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getNearbyShopList() |
| | | 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) { |
| | |
| | | } |
| | | this.form.goodTypeName = this.goodsOptions.find(item => item.active)?.name || '' |
| | | this.form.goodType = this.goodsOptions.find(item => item.active)?.id || '' |
| | | this.showInsuranceTip = this.goodsOptions.find(item => item.active)?.relationOtherField === '1' |
| | | this.showInsuranceTipText = this.goodsOptions.find(item => item.active)?.relationRemark |
| | | this.showGoodsPopup = false |
| | | }, |
| | | confirmArriveTime(e) { |
| | |
| | | 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 |
| | | }) |
| | |
| | | } |
| | | }, |
| | | async createOrder() { |
| | | if (!this.agreementChecked) { |
| | | uni.showToast({ title: '请先阅读并同意用户服务协议及隐私政策', icon: 'none' }) |
| | | return |
| | | } |
| | | if (this.activeMode === 'local') { |
| | | if (!this.selectedStore) { |
| | | uni.showToast({ title: '请选择门店', icon: 'none' }) |
| | |
| | | return |
| | | } |
| | | } |
| | | if (!this.form.receiver) { |
| | | uni.showToast({ title: '请输入收件人姓名', icon: 'none' }) |
| | | return |
| | | } |
| | | if (!this.form.mobile) { |
| | | uni.showToast({ title: '请输入收件人电话', icon: 'none' }) |
| | | return |
| | | } |
| | | const mobileRegex = /^1\d{10}$/ |
| | | const landlineRegex = /^\d{3,4}-?\d{7,8}$/ |
| | | if (!mobileRegex.test(this.form.mobile) && !landlineRegex.test(this.form.mobile)) { |
| | | uni.showToast({ title: '请输入正确的手机号或固定电话', icon: 'none' }) |
| | | 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 |
| | |
| | | })) |
| | | if (luggageList.length === 0) { |
| | | uni.showToast({ title: '请选择行李类型', icon: 'none' }) |
| | | return |
| | | } |
| | | if (!this.form.goodType) { |
| | | uni.showToast({ title: '请选择物品信息', icon: 'none' }) |
| | | return |
| | | } |
| | | if (!this.form.goodsImages ||!this.form.goodsImages.length) { |
| | | uni.showToast({ title: '请上传物品照片', icon: 'none' }) |
| | | return |
| | | } |
| | | if (!this.form.goodsImages ||!this.form.goodsImages.length) { |
| | | uni.showToast({ title: '请上传物品照片', icon: 'none' }) |
| | | return |
| | | } |
| | | if (this.form.insurance === '' || this.form.insurance <= 0) { |
| | | uni.showToast({ title: '请输入保价费', icon: 'none' }) |
| | | return |
| | | } |
| | | if (!this.agreementChecked) { |
| | | uni.showToast({ title: '请先阅读并同意用户服务协议及隐私政策', icon: 'none' }) |
| | | return |
| | | } |
| | | const items = luggageList.map(item => ({ |
| | |
| | | } else { |
| | | uni.showToast({ title: '支付失败', icon: 'none' }) |
| | | } |
| | | uni.redirectTo({ |
| | | url: '/pages/delivery-order-detail/delivery-order-detail?id=' + orderId |
| | | uni.setStorageSync("orderStatus",-2) |
| | | uni.switchTab({ |
| | | url: '/pages/itinerary/itinerary' |
| | | }); |
| | | |
| | | } |
| | | }) |
| | | } |
| | |
| | | position: relative; |
| | | width: 50%; |
| | | text-align: center; |
| | | font-size: 28rpx; |
| | | font-weight: 500; |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | | color: #9097a3; |
| | | } |
| | | |
| | |
| | | .store-popup-wrap { |
| | | background: #ffffff; |
| | | border-radius: 24rpx 24rpx 0 0; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | padding: 0 30rpx 16rpx 30rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | |
| | | .store-option-address-row { |
| | | margin-top: 8rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | align-items: flex-start; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .store-option-address-icon { |
| | | flex-shrink: 0; |
| | | width: 24rpx; |
| | | height: 24rpx; |
| | | margin-right: 4rpx; |
| | | margin-top: 6rpx; |
| | | } |
| | | |
| | | .store-option-address { |
| | | flex: 1; |
| | | font-size: 26rpx; |
| | | color: #9ea4af; |
| | | } |
| | |
| | | |
| | | .luggage-item { |
| | | display: flex; |
| | | align-items: baseline; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | padding: 24rpx; |
| | | box-sizing: border-box; |
| | |
| | | height: 100rpx; |
| | | border-radius: 8rpx; |
| | | margin-right: 18rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background: #f0f1f4; |
| | | overflow: hidden; |
| | | margin-right: 24rpx; |
| | |
| | | font-weight: 500; |
| | | color: #333333; |
| | | border: 2rpx solid transparent; |
| | | white-space: nowrap; /* 防止文本换行 */ |
| | | overflow: hidden; /* 隐藏溢出的内容 */ |
| | | text-overflow: ellipsis; /* 显示省略号来代表被修剪的文本 */ |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | |
| | | padding-bottom: 14rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | justify-content: space-between; |
| | | font-size: 22rpx; |
| | | } |
| | | |
| | |
| | | color: #999999; |
| | | } |
| | | |
| | | .insurance-tip-warning { |
| | | color: #ff4d4f; |
| | | font-size: 22rpx; |
| | | font-weight: 400; |
| | | } |
| | | |
| | | .insurance-tip-value { |
| | | margin-left: 8rpx; |
| | | color: #ff4d4f; |