|
@@ -22,36 +22,63 @@
|
|
共<text class="cText">{{total}}</text>款
|
|
共<text class="cText">{{total}}</text>款
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view v-for="(item,dix) in partList" :key="item.id" class="flex align-center item-list">
|
|
|
|
- <view style="height: 160rpx;width: 160rpx;">
|
|
|
|
- <u-image :src="item.product.images+'?x-oss-process=image/resize,p_50'" border-radius="16" width="160" height="160" bg-color="#EBEBEB" ></u-image>
|
|
|
|
- <!-- <view class="back-price" v-if="item.giveAmount">返<text>{{item.giveAmount}}</text>元</view> -->
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- <view class="item-name">
|
|
|
|
- <text>{{item.product.productName}}</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="item-nums" v-if="item.product&&item.product.code">
|
|
|
|
- <text>{{item.product.code}}</text>
|
|
|
|
|
|
+ <view v-for="(item,dix) in partList" :key="item.id" class="item-list-box">
|
|
|
|
+ <view class="item-list flex">
|
|
|
|
+ <view style="height: 160rpx;width: 160rpx;">
|
|
|
|
+ <u-image :src="item.product.images+'?x-oss-process=image/resize,p_50'" border-radius="16" width="160" height="160" bg-color="#EBEBEB" ></u-image>
|
|
</view>
|
|
</view>
|
|
- <view class="item-nums" v-if="item.product&&item.product.origCode">
|
|
|
|
- <text style="color: #00aaff;">{{item.product.origCode}}</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="item-head">
|
|
|
|
- <view class="flex align_center">
|
|
|
|
- <view class="price-txt">¥<text>{{item.price}}</text></view>
|
|
|
|
- <view class="flex align_center rebate-tag" v-if="dix==0">
|
|
|
|
- 返<text>5</text>元
|
|
|
|
- </view>
|
|
|
|
- <view class="flex align_center rebate-tag" v-if="dix==1">
|
|
|
|
- 买3赠2
|
|
|
|
|
|
+ <view>
|
|
|
|
+ <view class="item-name">
|
|
|
|
+ <text>{{item.product.productName}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-nums" v-if="item.product&&item.product.origCode">
|
|
|
|
+ <text style="color: #00aaff;">{{item.product.origCode}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-nums" v-if="item.product&&item.product.code">
|
|
|
|
+ <text>{{item.product.code}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-head">
|
|
|
|
+ <view class="flex align_center">
|
|
|
|
+ <view class="price-txt">¥<text>{{item.priceStr[0]}}</text>.{{item.priceStr[1]}}</view>
|
|
|
|
+ <view class="flex align_center rebate-tag" v-if="item.promoType=='BUY_PROD_GIVE_VALID'">
|
|
|
|
+ 返<text>{{item.resultValue}}</text>元
|
|
|
|
+ </view>
|
|
|
|
+ <view class="flex align_center rebate-tag" v-if="item.promoType=='BUY_PROD_GIVE_PROD'">
|
|
|
|
+ 买{{item.conditionValue}}赠{{item.resultValue}}
|
|
|
|
+ </view>
|
|
|
|
+ <view class="flex align_center tejia-tag" v-if="item.promoType=='PROMO_PROD'">
|
|
|
|
+ 特价<text>¥{{item.orginPrice}}</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view class="flex align_center tejia-tag" v-if="dix==2">
|
|
|
|
- 特价<text>¥20</text>
|
|
|
|
|
|
+ <view>
|
|
|
|
+ X <text class="cText">{{item.qty}}</text>{{item.product&&item.product.unit||''}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view>
|
|
|
|
- X <text class="cText">{{item.qty}}</text>{{item.product&&item.product.unit||''}}
|
|
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- 赠品 -->
|
|
|
|
+ <view class="item-list flex gift-box" v-if="item.giftQty">
|
|
|
|
+ <view style="height: 120rpx;width: 120rpx;margin-left: 40rpx;">
|
|
|
|
+ <u-image :src="item.product.images+'?x-oss-process=image/resize,p_50'" border-radius="16" width="120" height="120" bg-color="#EBEBEB" ></u-image>
|
|
|
|
+ </view>
|
|
|
|
+ <view>
|
|
|
|
+ <view class="item-name flex align_center ellipsis-one">
|
|
|
|
+ <view class="flex align_center rebate-tag">
|
|
|
|
+ 赠品
|
|
|
|
+ </view>
|
|
|
|
+ <text>{{item.product.productName}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-nums ellipsis-one" v-if="item.product&&item.product.origCode">
|
|
|
|
+ <text style="color: #666;">{{item.product.origCode}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-nums ellipsis-one" v-if="item.product&&item.product.code">
|
|
|
|
+ <text>{{item.product.code}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-head">
|
|
|
|
+ <view class="flex align_center"></view>
|
|
|
|
+ <view>
|
|
|
|
+ X <text class="cText">{{item.giftQty}}</text>{{item.product&&item.product.unit||''}}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -62,17 +89,17 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="info" v-if="info">
|
|
<view class="info" v-if="info">
|
|
- <view class="infoList">
|
|
|
|
- <text>总金额</text>
|
|
|
|
- <text class="redText">¥{{info.totalAmount}}</text>
|
|
|
|
|
|
+ <view class="infoList" v-if="info.totalTicketGiveAmount">
|
|
|
|
+ <text>代金券</text>
|
|
|
|
+ <text class="cText">¥{{info.totalTicketGiveAmount}}</text>
|
|
</view>
|
|
</view>
|
|
- <view class="infoList">
|
|
|
|
|
|
+ <view class="infoList" v-if="info.totalSpecialGiveAmount">
|
|
<text>总优惠</text>
|
|
<text>总优惠</text>
|
|
- <text class="cText">¥{{info.totalAmount}}</text>
|
|
|
|
|
|
+ <text class="cText">¥{{info.totalSpecialGiveAmount}}</text>
|
|
</view>
|
|
</view>
|
|
- <view class="infoList" v-if="state=='FINISH'">
|
|
|
|
- <text>代金券</text>
|
|
|
|
- <text class="cText">¥{{info.totalGiveAmount}}</text>
|
|
|
|
|
|
+ <view class="infoList">
|
|
|
|
+ <text>总金额</text>
|
|
|
|
+ <text class="redText">¥{{info.totalAmount}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="info" v-if="info">
|
|
<view class="info" v-if="info">
|
|
@@ -180,7 +207,34 @@
|
|
})
|
|
})
|
|
purchaseQueryDetailPage({purchaseSn: this.purchaseSn,pageNo:this.pageNo,pageSize:this.pageSize}).then(res => {
|
|
purchaseQueryDetailPage({purchaseSn: this.purchaseSn,pageNo:this.pageNo,pageSize:this.pageSize}).then(res => {
|
|
if(res.status == 200){
|
|
if(res.status == 200){
|
|
- this.partList = res.data ? res.data.list : [],
|
|
|
|
|
|
+ this.partList = res.data ? res.data.list : []
|
|
|
|
+ this.partList.map(item=>{
|
|
|
|
+ const a = item.shopPromoProduct
|
|
|
|
+ if(a){
|
|
|
|
+ item.promoType = a.promoType
|
|
|
|
+ item.resultValue = a.resultValue
|
|
|
|
+ item.conditionValue = a.conditionValue
|
|
|
|
+ item.discountType = a.discountType
|
|
|
|
+ item.promoProductSn = a.promoProductSn
|
|
|
|
+ item.promoSn = a.promoSn
|
|
|
|
+ // 特价
|
|
|
|
+ if(item.promoType=='PROMO_PROD'){
|
|
|
|
+ item.orginPrice = item.price
|
|
|
|
+ // 直降
|
|
|
|
+ if(item.discountType == 'STRAIGHT_DOWN'){
|
|
|
|
+ item.price = item.price - item.resultValue
|
|
|
|
+ }
|
|
|
|
+ // 折扣
|
|
|
|
+ if(item.discountType == 'DISCOUNT'){
|
|
|
|
+ item.price = Number(item.price * item.resultValue).toFixed(2)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 满赠数量
|
|
|
|
+ item.giftQty = item.promoType=='BUY_PROD_GIVE_PROD' ? Math.floor(item.qty / item.conditionValue)*item.resultValue : 0
|
|
|
|
+ }
|
|
|
|
+ item.priceStr = Number(item.price).toFixed(2).toString().split('.')
|
|
|
|
+ delete item.shopPromoProduct
|
|
|
|
+ })
|
|
this.total = res.data ? res.data.count : 0
|
|
this.total = res.data ? res.data.count : 0
|
|
}
|
|
}
|
|
// 滚动到顶部
|
|
// 滚动到顶部
|
|
@@ -316,8 +370,10 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .item-list{
|
|
|
|
|
|
+ .item-list-box{
|
|
border-bottom: 2rpx solid #f2f2f2;
|
|
border-bottom: 2rpx solid #f2f2f2;
|
|
|
|
+ }
|
|
|
|
+ .item-list{
|
|
padding: 20rpx 0;
|
|
padding: 20rpx 0;
|
|
&:last-child{
|
|
&:last-child{
|
|
border: none;
|
|
border: none;
|
|
@@ -325,7 +381,6 @@
|
|
> view{
|
|
> view{
|
|
&:first-child{
|
|
&:first-child{
|
|
margin-right: 20rpx;
|
|
margin-right: 20rpx;
|
|
- margin-top: 18rpx;
|
|
|
|
position: relative;
|
|
position: relative;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
width: 160rpx;
|
|
width: 160rpx;
|
|
@@ -333,25 +388,6 @@
|
|
border-radius: 6px;
|
|
border-radius: 6px;
|
|
border: 1px solid #eee;
|
|
border: 1px solid #eee;
|
|
}
|
|
}
|
|
- .back-price{
|
|
|
|
- zoom: calc(0.8);
|
|
|
|
- padding: 6rpx 65rpx;
|
|
|
|
- background: rgba(255 ,87 ,34 , 1);
|
|
|
|
- position: absolute;
|
|
|
|
- top: 20rpx;
|
|
|
|
- right: -55rpx;
|
|
|
|
- color: #fff;
|
|
|
|
- z-index: 2;
|
|
|
|
- font-size: 20rpx;
|
|
|
|
- text-align: center;
|
|
|
|
- transform: rotate(40deg);
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- text{
|
|
|
|
- font-size: 28rpx;
|
|
|
|
- margin: 0 5rpx;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
&:last-child{
|
|
&:last-child{
|
|
flex-grow: 1;
|
|
flex-grow: 1;
|
|
width: 60%;
|
|
width: 60%;
|
|
@@ -408,10 +444,29 @@
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
color: #999;
|
|
color: #999;
|
|
margin-left: 5px;
|
|
margin-left: 5px;
|
|
|
|
+ text-decoration: line-through;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .gift-box.item-list{
|
|
|
|
+ .item-name{
|
|
|
|
+ color: #666;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ font-weight: normal;
|
|
|
|
+ }
|
|
|
|
+ .item-nums{
|
|
|
|
+ text{
|
|
|
|
+ color: #666;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .rebate-tag{
|
|
|
|
+ width: 40px;
|
|
|
|
+ margin-left: 0;
|
|
|
|
+ margin-right: 5px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.footer{
|
|
.footer{
|
|
padding: 20upx 60upx;
|
|
padding: 20upx 60upx;
|
|
background: #FFFFFF;
|
|
background: #FFFFFF;
|