|
@@ -16,7 +16,7 @@
|
|
|
<view class="pinfo flex_1">
|
|
|
<view class="ptxt flex align_center justify_between">
|
|
|
<view>{{productInfo.code}}</view>
|
|
|
- <view class="pcode" v-if="productInfo.shelfProductApi&&productInfo.shelfProductApi.enableFlag==1">
|
|
|
+ <view class="pcode" v-if="productInfo.shelfProductApi">
|
|
|
可用库存:
|
|
|
<text>{{productInfo.shelfProductApi.qty}}</text>
|
|
|
{{productInfo.unit}}
|
|
@@ -28,7 +28,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="product-nums" v-if="productInfo.shelfProductApi&&productInfo.shelfProductApi.enableFlag==1">
|
|
|
+ <view class="product-nums" v-if="!isDisable">
|
|
|
<view>本次上架数量<text>(左右滑动选择)</text></view>
|
|
|
<view class="numsBox flex align_center justify_between">
|
|
|
<view class="a-left" @click="numsBoxScroll(0)"><u-icon name="arrow-left"></u-icon></view>
|
|
@@ -42,8 +42,8 @@
|
|
|
<view class="a-right" @click="numsBoxScroll(1)"><u-icon name="arrow-right"></u-icon></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="infoTits" v-if="productInfo.shelfCartApi&&productInfo.shelfProductApi&&productInfo.shelfProductApi.enableFlag==1">产品已录入,请确认数量</view>
|
|
|
- <view class="infoTits" v-else>此产品已被禁用,不可添加!</view>
|
|
|
+ <view class="infoTits" v-if="!isDisable&&productInfo.shelfCartApi">产品已录入,请确认数量</view>
|
|
|
+ <view class="infoTits" v-if="isDisable">此产品已被禁用,不可添加!</view>
|
|
|
</view>
|
|
|
<view class="noData" v-else>
|
|
|
暂无扫描结果
|
|
@@ -82,7 +82,8 @@
|
|
|
scleft: 0,
|
|
|
fromPage: null,
|
|
|
qrCode: '',
|
|
|
- numsWidth: 52
|
|
|
+ numsWidth: 52,
|
|
|
+ isDisable: false
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
@@ -147,6 +148,7 @@
|
|
|
if(res.status == 200&&res.data&&res.data.productList&&res.data.productList.length){
|
|
|
const ret = res.data.productList[0]
|
|
|
this.productInfo = ret
|
|
|
+ this.isDisable = ret.shelfProductApi&&ret.shelfProductApi.enableFlag==0
|
|
|
this.shelfPlaceCode = res.data.shelfPlaceCode
|
|
|
// 数量区域宽度
|
|
|
const query = uni.createSelectorQuery().in(_this);
|