【修复】提货增加收获地址

This commit is contained in:
liqianjin 2023-04-07 19:08:12 +08:00
parent b29428ffdb
commit cfe8d241b6
1 changed files with 287 additions and 2 deletions

View File

@ -59,7 +59,7 @@
</view>
<!--操作按钮-->
<view class="buttons">
<view class="buttons-item buttons-item-pickup" @click="$refs.pickupConfirm.open()" v-if="parseInt(info.status) === 1">自提产品</view>
<view class="buttons-item buttons-item-pickup" @click="openWarehouseShopConfirm" v-if="parseInt(info.status) === 1 && info.order_id !== 0">自提产品</view>
<view class="buttons-item buttons-item-sale" @click="$refs.saleGoods.open()" v-if="parseInt(info.status) === 1">出售商品</view>
<view class="buttons-item buttons-item-undercarriage" @click="$refs.undercarriageConfirm.open()" v-if="parseInt(info.status) === 2">下架商品</view>
</view>
@ -115,6 +115,40 @@
<!--加载动画-->
<loading-cover ref="loadingCover"></loading-cover>
</view>
<!-- 仓库卖出确认 增加数量选择 -->
<uni-popup ref="warehouseConfirm" type="bottom">
<view class="sku-info" style="height: 22vh;background: white">
<view class="header" style="height: 3vh;">
<view class="sku-close iconfont iconclose" @click="closeWarehouseShopConfirm()"></view>
</view>
<view class="address-box" :class="{ 'not-delivery-type': true }" >
<view class="info-wrap" v-if="memberAddress" @click="selectAddress">
<view class="content">
<text class="name">{{ memberAddress.name ? memberAddress.name : '' }}</text>
<text class="mobile">{{ memberAddress.mobile ? memberAddress.mobile : '' }}</text>
<view class="desc-wrap">
{{ memberAddress.full_address ? memberAddress.full_address : '' }} {{ memberAddress.address ? memberAddress.address : '' }}
</view>
</view>
<text class="cell-more iconfont icon-right"></text>
</view>
<view class="empty-wrap" v-else @click="selectAddress">
<view class="info">请设置收货地址</view>
<view class="cell-more"><view class="iconfont icon-right"></view></view>
</view>
<image class="address-line" :src="$util.img('public/uniapp/order/address-line.png')"></image>
</view>
<view class="footer" @click="pickup()" style="margin-top: 70rpx;">
<template >
<template >
<button type="primary">确认提货</button>
</template>
</template>
</view>
</view>
</uni-popup>
</template>
<script>
@ -144,10 +178,13 @@ export default {
split_message: '',//
service_charge: 0.00, //
real_income: 0.00,//
memberAddress: null, //
is_pickup: false
};
},
mixins: [],
onLoad(option) {
this.getMemberAddress()
this.futures_id = option.futures_id || 0;
this.getDetail();
},
@ -157,6 +194,12 @@ export default {
if (!uni.getStorageSync('token')) this.$refs.login.open('/pages_rush/futures/list');
},
methods: {
openWarehouseShopConfirm(GoodsId,count) {
this.$refs.warehouseConfirm.open()
},
closeWarehouseShopConfirm() {
this.$refs.warehouseConfirm.close()
},
//
getDetail() {
this.$api.sendRequest({
@ -201,14 +244,25 @@ export default {
},
//
pickup(){
if(this.is_pickup){
return 1
}
this.is_pickup = true
this.closeWarehouseShopConfirm()
if (!this.memberAddress) {
this.$util.showToast({ title: '请先选择您的收货地址' });
return false;
}
this.$refs.pickupConfirm.close();
let _this = this;
_this.$api.sendRequest({
url: '/futures/api/futures/pickUp',
data: {
id: _this.futures_id
id: _this.futures_id,
member_address: JSON.stringify(this.memberAddress)
},
success: res => {
this.is_pickup = false
_this.$util.showToast({
title: res.message,
mask: true,
@ -223,6 +277,32 @@ export default {
}
});
},
/**
* 选择收货地址
*/
selectAddress() {
var params = {
back: this.$util.getCurrentRoute().path,
local: 0,
type: 1
}
this.$util.redirectTo('/pages_tool/member/address', params);
},
/**
* 用户地址
*/
getMemberAddress(){
this.$api.sendRequest({
url: '/futures/api/ordercreate/memberAddress',
success: res => {
console.log()
this.memberAddress = res.member_address;
this.$forceUpdate();
}
})
},
//
sale(agree_split_order = 0){
let _this = this;
@ -554,4 +634,209 @@ export default {
}
}
}
//
.address-box {
margin: 0 24rpx 0;
background-color: #fff;
position: relative;
overflow: hidden;
border-bottom-left-radius: 16rpx;
border-bottom-right-radius: 16rpx;
padding: 30rpx 24rpx;
&.not-delivery-type {
border-radius: 16rpx;
}
.address-line{
position: absolute;
bottom: 0rpx;
left: 0;
width: 100%;
height: 6rpx;
}
.info-wrap {
display: flex;
align-items: center;
&.local {
padding-bottom: 20rpx;
}
.content {
flex: 1;
.name {
margin-right: 10rpx;
font-weight: bold;
font-size: 28rpx;
}
.mobile {
font-weight: bold;
font-size: 28rpx;
}
}
.desc-wrap {
word-break: break-word;
font-size: 26rpx;
color: #666;
}
}
.icon-wrap {
width: 24rpx;
height: 42rpx;
position: relative;
margin-right: 26rpx;
align-self: flex-start;
padding-top: 6rpx;
&.empty{
padding-top: 0;
}
.iconfont {
font-size: $font-size-toolbar;
display: inline-block;
vertical-align: middle;
}
}
.empty-wrap {
height: 80rpx;
line-height: 80rpx;
display: flex;
align-items: center;
.info {
flex: 1;
font-size: $font-size-base;
}
}
.cell-more {
margin-left: 50rpx;
float: right;
color: $color-tip;
font-size: $font-size-tag;
.iconfont{
color: $color-tip;
}
}
.local-delivery-store {
display: flex;
align-items: center;
padding-bottom: 20rpx;
margin-bottom: 20rpx;
border-bottom: 2rpx solid #eeeeee;
.info {
flex: 1;
width: 0;
font-size: 28rpx;
}
.store-name {
color: $base-color;
margin: 0 10rpx;
}
.cell-more {
font-size: 28rpx;
display: flex;
align-items: center;
}
.icon-right {
float: right;
color: #909399;
font-size: 24rpx
}
}
}
.sku-close {
position: absolute;
top: 20rpx;
right: 40rpx;
width: 40rpx;
height: 80rpx;
font-size: 40rpx;
}
.sku-close {
color: #fff;
width: 50rpx;
text-align: center;
font-size: 76rpx;
border-radius: 50%;
margin: 40rpx auto 0;
}
.number-wrap .number-line {
padding: 20rpx 0;
line-height: 72rpx;
}
.number-wrap .title {
font-weight: 400;
}
.number-wrap .limit-txt {
}
.number-wrap .number {
display: flex;
height: 72rpx;
border-radius: 6rpx;
float: right;
}
.number-wrap .number button {
display: inline-block;
line-height: 64rpx;
height: 68rpx;
width: 60rpx;
font-size: 48rpx;
box-sizing: content-box;
border: 2rpx solid $color-line;
padding: 0;
margin: 0;
border-radius: 0;
background-color: #fff !important;
&.disabled {
background: #f7f7f7 !important;
}
}
.number-wrap .number button.decrease {
border-right-width: 0 !important;
}
.number-wrap .number button.increase {
border-left: 0 !important;
}
.number-wrap .number button:after {
border-radius: 0;
border: none;
}
.number-wrap .number input {
display: inline-block;
line-height: 64rpx;
height: 68rpx;
width: 72rpx;
text-align: center;
font-weight: 700;
border: 2rpx solid;
margin: 0;
padding: 0;
vertical-align: top;
background-color: $color-bg !important;
}
.number-wrap .number .show {
vertical-align: top;
display: inline-block;
line-height: 64rpx;
height: 68rpx;
width: 72rpx;
text-align: center;
font-weight: 700;
box-sizing: content-box;
border: 1px solid #eeeeee;
padding: 0;
margin: 0;
border-radius: 0;
//background-color: #fff !important;
background-color: $color-bg !important;
}
</style>