|
@@ -114,7 +114,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<div>
|
|
|
- <button class="submitBtn" type="primary" :loading="saveLoading" @click="submitForm">确认拿货</button>
|
|
|
+ <button class="submitBtn" type="warn" size="mini" :loading="saveLoading" @click="submitForm">确认拿货</button>
|
|
|
</div>
|
|
|
</view>
|
|
|
<view :style="{height:safeAreaBottom+'px'}"></view>
|
|
@@ -161,7 +161,12 @@
|
|
|
<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
|
|
|
</view>
|
|
|
<view class="item-detail-text">
|
|
|
- <uni-number-box @change="e=>updateCartNums({value:e,index:'cart_'+item.productSn})" v-model="item.qty" :index="'cart_'+item.productSn" :min="0" :max="item.currentInven||999999"></uni-number-box>
|
|
|
+ <view class="flex align_center qty-box">
|
|
|
+ <view class="qty-btn" @click="updateCartNums(item.qty-1,'cart_'+item.productSn,item.currentInven||999999,1)" :class="(item.qty <= 0)?'qty-disabled':''">-</view>
|
|
|
+ <view class="qty-num"><input type="number" @blur="e=>updateCartNums(Number(e.detail.value),'cart_'+item.productSn,item.currentInven||999999,0)" :value="item.qty"/></view>
|
|
|
+ <view class="qty-btn" @click="updateCartNums(item.qty+1,'cart_'+item.productSn,item.currentInven||999999,1)" :class="(item.qty >= (item.currentInven||999999))?'qty-disabled':''">+</view>
|
|
|
+ </view>
|
|
|
+ <!-- <uni-number-box @change="e=>updateCartNums({value:e,index:'cart_'+item.productSn})" v-model="item.qty" :index="'cart_'+item.productSn" :min="0" :max="item.currentInven||999999"></uni-number-box> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -175,17 +180,17 @@
|
|
|
<!-- 去认证 -->
|
|
|
<uni-popup ref="showPopup" type="center" :is-mask-click="false">
|
|
|
<view class="popu-modal">
|
|
|
- <view class="popu-close" @click="$refs.showPopup.close()"><uni-icons type="closeempty" size="26"></uni-icons></view>
|
|
|
+ <view class="popu-close" @click="$refs.showPopup.close()"><uni-icons type="closeempty" size="28"></uni-icons></view>
|
|
|
<image width="533" height="415" style="width: 533rpx;height: 415rpx;" src="/static/authimg.jpg"></image>
|
|
|
<view style="padding-top:1rem;" class="flex justify_center">
|
|
|
- <button @click="toAuthStore()" shape="circle" :style="{background:'#066cff',color:'#fff',width:'350rpx'}">开始认证</button>
|
|
|
+ <button @click="toAuthStore()" type="primary" :style="{background:'#066cff',color:'#fff',width:'350rpx',borderRadius:'100px'}">开始认证</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
<!-- 价格查看 -->
|
|
|
<uni-popup ref="showPriceModal" type="center">
|
|
|
<view class="show-price-modal popu-modal" v-if="tempData">
|
|
|
- <view class="popu-close" @click="$refs.showPriceModal.close()"><uni-icons type="closeempty" size="26"></uni-icons></view>
|
|
|
+ <view class="popu-close" @click="$refs.showPriceModal.close()"><uni-icons type="closeempty" size="28"></uni-icons></view>
|
|
|
<view class="itemlist">
|
|
|
<text>产品编码</text>
|
|
|
<text>{{tempData.code||'--'}}</text>
|
|
@@ -599,32 +604,49 @@
|
|
|
// 更新数量
|
|
|
this.partListData[index].qty = data.value
|
|
|
this.partListData.splice()
|
|
|
+ // 更新页面数据
|
|
|
+ this.updateListData(data.index,type,data.value,true)
|
|
|
}
|
|
|
},
|
|
|
// 修改适配配件上数量
|
|
|
updateVinNums(data){
|
|
|
+ console.log(data)
|
|
|
this.updatePartList(data,'vinPartList')
|
|
|
},
|
|
|
// 修改其它配件上的数量
|
|
|
updateNums(data){
|
|
|
+ console.log(data)
|
|
|
this.updatePartList(data,'partList')
|
|
|
},
|
|
|
// 点击购物车修改数量
|
|
|
- updateCartNums(data){
|
|
|
- console.log(data)
|
|
|
- if(!data.value){
|
|
|
- const index = this.partListData.findIndex(item => 'cart_'+item.productSn == data.index)
|
|
|
+ updateCartNums(value,sn,max,type){
|
|
|
+ if(!value){
|
|
|
+ // 删除
|
|
|
+ const index = this.partListData.findIndex(item => 'cart_'+item.productSn == sn)
|
|
|
if(index>=0){
|
|
|
this.partListData.splice(index,1)
|
|
|
}
|
|
|
if(this.partListData.length==0){
|
|
|
this.showCart = false
|
|
|
}
|
|
|
+ }else{
|
|
|
+ const row = this.partListData.find(item => 'cart_'+item.productSn == sn)
|
|
|
+ const v = value > max ? max : value
|
|
|
+ if(value > max && type == 0){
|
|
|
+ if(row){
|
|
|
+ row.qty = value
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ row.qty = v
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ row.qty = v
|
|
|
+ }
|
|
|
}
|
|
|
// 同步更新Vin适配配件列表上的
|
|
|
- this.updateListData(data.index.split('_')[1],'vinPartList',data.value,!!data.value)
|
|
|
+ this.updateListData(sn.split('_')[1],'vinPartList',value,!!value)
|
|
|
// 同步更新其它配件列表上的
|
|
|
- this.updateListData(data.index.split('_')[1],'partList',data.value,!!data.value)
|
|
|
+ this.updateListData(sn.split('_')[1],'partList',value,!!value)
|
|
|
},
|
|
|
// 打开购物车
|
|
|
openCart(){
|
|
@@ -889,9 +911,9 @@
|
|
|
height: 50px;
|
|
|
align-items: center;
|
|
|
.submitBtn{
|
|
|
- background-color: #FB1E1E;
|
|
|
- font-size: 28rpx;
|
|
|
- border-radius: 100px;
|
|
|
+ width: 140rpx;
|
|
|
+ border-radius: 100rpx;
|
|
|
+ height: 36px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -935,6 +957,35 @@
|
|
|
font-size: 36rpx;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
+ .qty-box{
|
|
|
+ display: flex;
|
|
|
+ .qty-btn{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 22px;
|
|
|
+ height: 22px;
|
|
|
+ border-radius: 50px;
|
|
|
+ font-size: 18px;
|
|
|
+ background-color: #066cff;
|
|
|
+ color: #fff;
|
|
|
+ &.qty-disabled{
|
|
|
+ background-color: #c0c0c0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .qty-num{
|
|
|
+ width: 25px;
|
|
|
+ height: 22px;
|
|
|
+ line-height: 22px;
|
|
|
+ padding:0 3px;
|
|
|
+ input{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ text-align: center;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.cpb_cart-list{
|
|
|
flex-grow: 1;
|
|
|
.nav-right-item{
|