| | |
| | | |
| | | <scroll-view scroll-y class="page-scroll"> |
| | | <view class="page-content"> |
| | | <view v-if="activeMode === 'local'" class="service-point-card cell-card" @click="openStorePopup"> |
| | | <view v-if="activeMode === 'local'" class="service-point-card cell-card" @click="openStorePopup0"> |
| | | <view class="cell-left with-icon"> |
| | | <image class="cell-icon" src="/static/icon/ic_store@2x.png" mode="widthFix"></image> |
| | | <view class="store-cell-copy"> |
| | |
| | | <image class="luggage-image" :src="item.iconFull" mode="widthFix"></image> |
| | | <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"> |
| | | <image class="step-btn" src="/static/icon/ic_jian@2x.png" mode="widthFix" @click="decreaseCount(index)"></image> |
| | | <text class="step-count">{{ item.count }}</text> |
| | | <text class="step-count">{{ item.count || 0}}</text> |
| | | <image class="step-btn" src="/static/icon/ic_jia@2x.png" mode="widthFix" @click="increaseCount(index)"></image> |
| | | </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">您的物品价值较高,建议购买保价服务</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> |
| | | |
| | |
| | | @click="storeList.forEach((row,i) => row.active = index === i)" |
| | | > |
| | | <view class="store-option-main"> |
| | | <image class="store-thumb" src="" mode="aspectFill"></image> |
| | | <image class="store-thumb" :src="item.coverImg || '/static/icon/default2.png'" mode="aspectFill"></image> |
| | | <view class="store-option-copy"> |
| | | <view class="store-option-head"> |
| | | <text class="store-option-name">{{ item.name }}</text> |
| | |
| | | <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"> |
| | |
| | | <view class="submit-btn active-submit-btn" @click="createOrder">立即下单</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 选择服务点/地址 --> |
| | | <u-action-sheet |
| | | :show="showReceiveAddress" |
| | |
| | | goodsImages: [], |
| | | }, |
| | | amountData: null, |
| | | showInsuranceTip: false, |
| | | luggageTypes: [], |
| | | serviceTimes: [], |
| | | |
| | |
| | | }) |
| | | try { |
| | | const uploadResults = await this.uploadFiles(tempFilePaths, maxCount) |
| | | const addrs = uploadResults.map(item => item.imgaddr) |
| | | const fullPaths = uploadResults.map(item => item.url || item.path || item) |
| | | this.uploadedImages = [...this.uploadedImages, ...fullPaths.map(url => ({ url }))] |
| | | this.form.goodsImages = [...this.form.goodsImages, ...fullPaths] |
| | | this.form.goodsImages = [...this.form.goodsImages, ...addrs] |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '上传成功', |
| | |
| | | this.tempSelectedStoreId = null |
| | | this.showStorePopup = true |
| | | }, |
| | | openStorePopup0() { |
| | | this.storePopupType = 'send0' |
| | | this.tempSelectedStoreId = null |
| | | this.showStorePopup = true |
| | | }, |
| | | confirmStore() { |
| | | |
| | | console.log("=========================") |
| | | const selected = this.storeList.find(item => item.active) |
| | | console.log(selected) |
| | | if (this.storePopupType === 'send') { |
| | | this.sendStore = selected |
| | | } else if (this.storePopupType === 'receive') { |
| | |
| | | } |
| | | this.showStorePopup = false |
| | | }, |
| | | confirmGoods() { |
| | | confirmGoods(relationOtherField) { |
| | | if (!this.goodsOptions.find(item => item.active)) { |
| | | uni.showToast({ title: '请选择物品信息', icon: 'none' }) |
| | | return |
| | | } |
| | | this.form.goodTypeName = this.goodsOptions.find(item => item.active)?.name || '' |
| | | this.form.goodType = this.goodsOptions.find(item => item.active)?.id || '' |
| | | this.showInsuranceTip = relationOtherField === 1 |
| | | this.showGoodsPopup = false |
| | | }, |
| | | confirmArriveTime(e) { |
| | |
| | | latitude: this.latitude, |
| | | longitude: this.longitude, |
| | | cityId: this.cityId, |
| | | name:this.storeForm.keyword, |
| | | sortType: 1 |
| | | } |
| | | }) |
| | |
| | | } |
| | | }, |
| | | async createOrder() { |
| | | if (!this.agreementChecked) { |
| | | uni.showToast({ title: '请先阅读并同意用户服务协议及隐私政策', icon: 'none' }) |
| | | return |
| | | } |
| | | if (this.activeMode === 'local') { |
| | | if (!this.selectedStore) { |
| | | uni.showToast({ title: '请选择门店', icon: 'none' }) |
| | |
| | | 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' }) |
| | |
| | | })) |
| | | 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 => ({ |
| | |
| | | orderParams.fromShopId = this.sendStore.id |
| | | if (this.receiveStore) { |
| | | orderParams.toType = 0 |
| | | orderParams.toShopId = this.receiveStore.id |
| | | orderParams.takeShopId = this.receiveStore.id |
| | | orderParams.takeLat = this.receiveStore.latitude |
| | | orderParams.takeLgt = this.receiveStore.longitude |
| | | orderParams.takeLocation = this.receiveStore.address |
| | |
| | | signType: paymentData.signType || 'MD5', |
| | | paySign: paymentData.paySign || '', |
| | | success: (res) => { |
| | | uni.navigateTo({ |
| | | uni.redirectTo({ |
| | | url: '/pages/payment-success/payment-success?orderId=' + orderId |
| | | }); |
| | | }, |
| | |
| | | } else { |
| | | uni.showToast({ title: '支付失败', icon: 'none' }) |
| | | } |
| | | uni.redirectTo({ |
| | | url: '/pages/delivery-order-detail/delivery-order-detail?id=' + orderId |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | 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; |
| | | } |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | image { |
| | | flex-shrink: 0; |
| | | width: 24rpx; |
| | | height: 24rpx; |
| | | margin-right: 4rpx; |
| | |
| | | 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; |