|
@@ -14,7 +14,7 @@
|
|
|
<view class="video-item">
|
|
|
<view>
|
|
|
<u-image :src="item.productImage+'?x-oss-process=image/resize,p_50'" height="140px" width="100%"></u-image>
|
|
|
- <view class="back-price">返¥<text>{{item.promoRuleValue}}</text></view>
|
|
|
+ <view class="back-price">返<text>{{item.promoRuleValue}}</text>元</view>
|
|
|
<view class="product-code">{{item.productCode}}</view>
|
|
|
</view>
|
|
|
<view>
|
|
@@ -22,9 +22,13 @@
|
|
|
<view class="product-guige ellipsis-two">{{item.productOrigCode}}</view>
|
|
|
<view class="product-button">
|
|
|
<view class="price-txt">¥<text>{{item.cost}}</text></view>
|
|
|
- <view>
|
|
|
- <u-button v-if="!item.checked" :throttle-time="50" @click="chooseProduct(item)" size="mini" type="primary" shape="circle"><u-icon name="plus"></u-icon></u-button>
|
|
|
- <u-button v-else :throttle-time="50" @click="chooseProduct(item)" size="mini" type="success" shape="circle"><u-icon name="plus"></u-icon>{{item.qty}}</u-button>
|
|
|
+ <view @click="chooseProduct(item)">
|
|
|
+ <view class="cart-add" :class="!item.checked?'colr-add':'colr-checks'">
|
|
|
+ <u-icon v-if="!item.checked" color="#fff" name="plus"></u-icon>
|
|
|
+ <view v-else>
|
|
|
+ <u-icon name="plus" color="#fff"></u-icon>{{item.qty}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -85,7 +89,7 @@
|
|
|
<view>
|
|
|
<view class="choose-product-item-img">
|
|
|
<u-image :src="item.productImage+'?x-oss-process=image/resize,p_50'" height="200rpx" width="100%"></u-image>
|
|
|
- <view class="back-price">返¥<text>{{item.promoRuleValue}}</text></view>
|
|
|
+ <view class="back-price">返<text>{{item.promoRuleValue}}</text>元</view>
|
|
|
<view class="choose-product-item-left-info-code">{{item.productCode}}</view>
|
|
|
</view>
|
|
|
<view class="choose-product-item-info">
|
|
@@ -142,6 +146,7 @@
|
|
|
choosePageSize: 4, // 已选产品每页数
|
|
|
chooseTotal: 0 ,// 已选产品总记录数
|
|
|
promoActiveSn: null, // 活动sn
|
|
|
+ submitOk: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -183,6 +188,9 @@
|
|
|
// 查询产品列表
|
|
|
this.pageInit()
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ this.showChoosePopu=false
|
|
|
+ },
|
|
|
onUnload() {
|
|
|
// 存储已选列表值
|
|
|
const hasCache = this.$store.state.vuex_cartList.find(k => k.sn == this.promoActiveSn)
|
|
@@ -243,9 +251,15 @@
|
|
|
closePopu(){
|
|
|
this.chooseProductList = []
|
|
|
this.showChoosePopu=false
|
|
|
+ if(this.submitOk){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pagesB/procureOrder'
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 打开已选产品列表
|
|
|
openChoose(){
|
|
|
+ this.submitOk = false
|
|
|
if(this.chooseLength){
|
|
|
this.showChoosePopu = !this.showChoosePopu
|
|
|
if(this.showChoosePopu){
|
|
@@ -391,6 +405,7 @@
|
|
|
checked: hasChecked,
|
|
|
qty: hasChecked ? hasChecked.qty : 0,
|
|
|
productCode: k.productCode,
|
|
|
+ productSn: k.productSn,
|
|
|
productImage: k.productImage,
|
|
|
productName: k.productName,
|
|
|
productOrigCode: k.productOrigCode,
|
|
@@ -436,11 +451,9 @@
|
|
|
detailList: detailList
|
|
|
}).then(res => {
|
|
|
if(res.status == 200){
|
|
|
- this.clearChooseData()
|
|
|
this.$store.state.vuex_tempData = res.data
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pagesB/procureOrder?id='+res.id
|
|
|
- })
|
|
|
+ this.clearChooseData()
|
|
|
+ this.submitOk = true
|
|
|
}
|
|
|
uni.hideLoading()
|
|
|
})
|
|
@@ -493,7 +506,7 @@
|
|
|
overflow: hidden;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
.product-code{
|
|
|
- color: #2196F3;
|
|
|
+ color: #666;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left:0;
|
|
@@ -511,7 +524,7 @@
|
|
|
}
|
|
|
.product-guige{
|
|
|
margin: 10rpx 0 20rpx 0;
|
|
|
- color: #888;
|
|
|
+ color: #2196F3;
|
|
|
text{
|
|
|
margin-right: 10rpx;
|
|
|
}
|
|
@@ -527,6 +540,23 @@
|
|
|
width: 100%;
|
|
|
padding: 0 20rpx;
|
|
|
}
|
|
|
+ .cart-add{
|
|
|
+ padding: 6rpx 15rpx;
|
|
|
+ border-radius: 30rpx;
|
|
|
+ background: #2196F3;
|
|
|
+ color: #fff;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ font-size: 24rpx;
|
|
|
+ }
|
|
|
+ .colr-add{
|
|
|
+ background: #2196F3;
|
|
|
+ padding: 10rpx 20rpx;
|
|
|
+ }
|
|
|
+ .colr-checks{
|
|
|
+ background: #00aa00;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -631,7 +661,7 @@
|
|
|
zoom: calc(0.8);
|
|
|
}
|
|
|
.choose-product-item-left-info-code{
|
|
|
- color: #2196F3;
|
|
|
+ color: #666;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left:0;
|
|
@@ -659,7 +689,7 @@
|
|
|
font-size: 28rpx;
|
|
|
}
|
|
|
.choose-product-item-left-info-guige{
|
|
|
- color: #666;
|
|
|
+ color: #2196F3;
|
|
|
margin: 10rpx 0;
|
|
|
text{
|
|
|
margin-right: 10rpx;
|
|
@@ -670,15 +700,15 @@
|
|
|
}
|
|
|
.back-price{
|
|
|
padding: 6rpx 55rpx;
|
|
|
- background: rgba(255 ,87 ,34 , 0.6);
|
|
|
+ background: rgba(255 ,87 ,34 , 1);
|
|
|
position: absolute;
|
|
|
- top: 16rpx;
|
|
|
- left: -50rpx;
|
|
|
+ top: 10rpx;
|
|
|
+ right: -40rpx;
|
|
|
color: #fff;
|
|
|
z-index: 2;
|
|
|
font-size: 20rpx;
|
|
|
text-align: center;
|
|
|
- transform: rotate(-40deg);
|
|
|
+ transform: rotate(40deg);
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
text{
|