|
|
@@ -42,33 +42,40 @@
|
|
|
<button class="admin-button-com big" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(1)">到店自取</button>
|
|
|
</block>
|
|
|
<block v-else-if="account == 4609">
|
|
|
- <button class="admin-button-com big" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(2)">请跑腿送</button>
|
|
|
+ <button class="admin-button-com big" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(2)">跑腿送货</button>
|
|
|
<button class="admin-button-com big" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(1)">到店自取</button>
|
|
|
</block>
|
|
|
<block v-else-if="account == 27829">
|
|
|
<button class="admin-button-com big" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(0)">送货上门</button>
|
|
|
- <button class="admin-button-com big" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(2)">请跑腿送</button>
|
|
|
+ <button class="admin-button-com big" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(2)">跑腿送货</button>
|
|
|
<button class="admin-button-com big" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(1)">到店自取</button>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
- <button class="admin-button-com big" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(2)">请跑腿送</button>
|
|
|
+ <button class="admin-button-com big" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(2)">跑腿送货</button>
|
|
|
<button class="admin-button-com big" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(1)">到店自取</button>
|
|
|
- <button class="admin-button-com big" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(0)">送货上门</button>
|
|
|
+ <!-- <button class="admin-button-com big" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(0)">送货上门</button> -->
|
|
|
</block>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
- <view v-if="form.sendType == 0">
|
|
|
- <text style="color: #3385FF;width:100%;">
|
|
|
- 在本店配送范围的,免配送货上门(楼下)。首次下单,请联系客服确认是否在配送范围
|
|
|
- </text>
|
|
|
- </view>
|
|
|
- <view v-if="form.sendType == 1">
|
|
|
- <text v-if="account == 4805" style="color: #3385FF;width:100%;">
|
|
|
- 需要送货上门,运费另付,下单后请联系客服
|
|
|
- </text>
|
|
|
- <text v-else style="color: #3385FF;width:100%;">到店取货,没有配送费</text>
|
|
|
- </view>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="form.sendType == 0 || form.sendType == 1">
|
|
|
+ <view v-if="form.sendType == 0">
|
|
|
+ <text style="color: #3385FF;width:100%;">
|
|
|
+ 在本店配送范围的,免配送货上门(楼下)。首次下单,请联系客服确认是否在配送范围
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view v-if="form.sendType == 1">
|
|
|
+ <text v-if="account == 4805" style="color: #3385FF;width:100%;">
|
|
|
+ 需要送货上门,运费另付,下单后请联系客服
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 2 || form.sendType == 0">
|
|
|
+ <div class="tui-title">收花人姓名</div>
|
|
|
+ <input v-model="form.receiveUserName" placeholder-class="phcolor" placeholder-style="color:#ccc" @blur="onInputBlur" class="tui-input" name="receiveUserName" placeholder="请填写姓名" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 2 || form.sendType == 0">
|
|
|
+ <div class="tui-title">收花人电话</div>
|
|
|
+ <input v-model="form.receiveMobile" placeholder-class="phcolor" placeholder-style="color:#ccc" @blur="onInputBlur" class="tui-input" name="receiveMobile" placeholder="请填写电话" type="number" />
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="form.sendType == 2 || form.sendType == 0" @click="modifyAddress">
|
|
|
<view class="tui-title">收花地址</view>
|
|
|
@@ -118,17 +125,19 @@
|
|
|
<block v-if="form.openIntraCity == 1">
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="displaySendCost == true && Number(showDistance)>0">
|
|
|
<view class="tui-title">距离</view>
|
|
|
- <text v-if="showDistance > 100" style="color: #3385FF">{{ (showDistance/1000).toFixed(1) }}公里</text>
|
|
|
- <text v-else style="color: #3385FF">{{ showDistance }} 米</text>
|
|
|
+ <view>
|
|
|
+ <text v-if="showDistance > 100" style="color: #3385FF">{{ (showDistance/1000).toFixed(1) }}公里</text>
|
|
|
+ <text v-else style="color: #3385FF">{{ showDistance }} 米</text>
|
|
|
+ <text v-if="showDeliveryPolicy" class="delivery-policy-link" @click="showDeliveryPolicyModal">
|
|
|
+ 免费配送条件
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="displaySendCost == true">
|
|
|
<view class="tui-title">跑腿费</view>
|
|
|
<view>
|
|
|
<text :class="isFreeDelivery ? 'delivery-price-free' : 'delivery-price-normal'">¥ {{ form.sendCost }}</text>
|
|
|
<text v-if="isFreeDelivery" class="free-delivery-tag">【免跑腿费】</text>
|
|
|
- <text v-if="showDeliveryPolicy" class="delivery-policy-link" @click="showDeliveryPolicyModal">
|
|
|
- 免费配送要求
|
|
|
- </text>
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
</block>
|
|
|
@@ -288,7 +297,9 @@ export default {
|
|
|
packCost:0,
|
|
|
sendCost:0,
|
|
|
showAddress:'',
|
|
|
- openIntraCity:0 // 是否支持跑腿送: 0不支持 1支持 2暂不可用
|
|
|
+ openIntraCity:0, // 是否支持跑腿送: 0不支持 1支持 2暂不可用
|
|
|
+ receiveUserName:'',
|
|
|
+ receiveMobile:''
|
|
|
},
|
|
|
userInfo:{},
|
|
|
shopInfo:{},
|
|
|
@@ -556,6 +567,13 @@ export default {
|
|
|
that.form.long = userInfo.long
|
|
|
that.form.lat = userInfo.lat
|
|
|
that.form.showAddress = userInfo.showAddress
|
|
|
+ that.form.receiveMobile = userInfo.mobile
|
|
|
+
|
|
|
+ let userName = userInfo.name?userInfo.name:''
|
|
|
+ if (/^\d+$/.test(userName)){
|
|
|
+ userName = '尾号'+userName.slice(-4)
|
|
|
+ }
|
|
|
+ that.form.receiveUserName = userName
|
|
|
|
|
|
if(!this.$util.isEmpty(userInfo.lat) && !this.$util.isEmpty(userInfo.long) && !this.$util.isEmpty(userInfo.address)){
|
|
|
this.validAddress = true
|
|
|
@@ -567,7 +585,6 @@ export default {
|
|
|
if(Number(openIntraCity) == 1 && that.form.sendType == 2 && this.validAddress == true){
|
|
|
that.getDeliveryQuotes()
|
|
|
const isFreeDelivery = that.checkFreeDelivery()
|
|
|
- console.log('getUserInfo -- isFreeDelivery: ',isFreeDelivery)
|
|
|
}
|
|
|
}
|
|
|
}).catch(()=>{})
|
|
|
@@ -651,8 +668,6 @@ export default {
|
|
|
} else {
|
|
|
uni.showToast({ title: '没有跑腿可用', icon: 'none' })
|
|
|
}
|
|
|
- }).catch(err => {
|
|
|
- uni.showToast({ title: '没有获取到跑腿费', icon: 'none' })
|
|
|
})
|
|
|
},
|
|
|
// 选择跑腿平台
|
|
|
@@ -668,6 +683,16 @@ export default {
|
|
|
console.log('selectDelivery -- isFreeDelivery: ',isFreeDelivery)
|
|
|
},
|
|
|
confirmForm(){
|
|
|
+ if(this.form.sendType == 0 || this.form.sendType == 2){
|
|
|
+ if(this.$util.isEmpty(this.form.receiveMobile)){
|
|
|
+ this.$msg('请填写收花人手机号')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if(this.$util.isEmpty(this.form.receiveUserName)){
|
|
|
+ this.$msg('请填写收花人名称')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$util.confirmModal({content:'确认提交?'},() => {
|
|
|
this.submitMyForm()
|
|
|
})
|
|
|
@@ -910,7 +935,7 @@ export default {
|
|
|
flex: 1;
|
|
|
padding: 20upx;
|
|
|
background-color: #f0f2f6;
|
|
|
- margin-bottom:90upx;
|
|
|
+ margin-bottom:120upx;
|
|
|
.commodity-view {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
@@ -1169,7 +1194,7 @@ export default {
|
|
|
.delivery-policy-link {
|
|
|
color: rgb(201, 52, 52);
|
|
|
font-size: 32upx;
|
|
|
- margin-left: 10upx;
|
|
|
+ margin-left: 30upx;
|
|
|
font-weight:bold;
|
|
|
text-decoration: underline;
|
|
|
}
|