|
@@ -53,8 +53,12 @@
|
|
|
<text class="item-detail-text" v-if="item.affiliation=='SHELF'">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
|
|
|
</view>
|
|
|
<view class="flex justify_between">
|
|
|
- <view class="item-detail-text flex_1">
|
|
|
- <text class="item-price" v-if="item.affiliation=='SHELF'">¥{{item.price||0}}</text>
|
|
|
+ <view class="item-detail-text flex_1" v-if="item.affiliation=='SHELF'">
|
|
|
+ <text class="item-price" v-if="showJhPrice">¥{{item.cost||0}}</text>
|
|
|
+ <text class="item-price" v-else>¥{{item.price||0}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="item-detail-text flex_1" v-if="item.affiliation=='SUPER_CATALOGUE'">
|
|
|
+ <text class="item-price" v-if="!showJhPrice">¥{{item.price||0}}</text>
|
|
|
</view>
|
|
|
<view class="item-detail-text" v-if="item.currentInven">
|
|
|
<u-button shape="circle" @click="addPart(item)" v-if="!item.checked" :custom-style="{width:'48upx',height:'48upx'}" type="primary" size="mini">
|
|
@@ -103,7 +107,8 @@
|
|
|
</view>
|
|
|
<view class="flex justify_between">
|
|
|
<view class="item-detail-text flex_1">
|
|
|
- <text class="item-price">¥{{item.price||0}}</text>
|
|
|
+ <text class="item-price" v-if="showJhPrice">¥{{item.cost||0}}</text>
|
|
|
+ <text class="item-price" v-else>¥{{item.price||0}}</text>
|
|
|
</view>
|
|
|
<view class="item-detail-text" v-if="item.currentInven">
|
|
|
<u-button shape="circle" @click="addPart(item)" v-if="!item.checked" :custom-style="{width:'48upx',height:'48upx',background:'#066cff'}" type="primary" size="mini">
|
|
@@ -169,8 +174,12 @@
|
|
|
<text class="item-detail-text" v-if="item.affiliation!='SUPER_CATALOGUE'">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
|
|
|
</view>
|
|
|
<view class="flex justify_between">
|
|
|
- <view class="item-detail-text flex_1">
|
|
|
- <text class="item-price" v-if="item.affiliation!='SUPER_CATALOGUE'">¥{{item.price||0}}</text>
|
|
|
+ <view class="item-detail-text flex_1" v-if="item.affiliation&&item.affiliation=='SHELF'">
|
|
|
+ <text class="item-price" v-if="showJhPrice">¥{{item.cost||0}}</text>
|
|
|
+ <text class="item-price" v-else>¥{{item.price||0}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="item-detail-text flex_1" v-else>
|
|
|
+ <text class="item-price" v-if="!showJhPrice">¥{{item.price||0}}</text>
|
|
|
</view>
|
|
|
<view class="item-detail-text">
|
|
|
<u-number-box @change="updateCartNums" @blur="updateCartNums" v-model="item.qty" :index="'cart_'+item.productSn" :min="0" :max="item.currentInven||999999"></u-number-box>
|
|
@@ -243,6 +252,19 @@
|
|
|
},
|
|
|
storeApply(){
|
|
|
return this.$store.state.vuex_storeAuthInfo || null
|
|
|
+ },
|
|
|
+ showJhPrice(){
|
|
|
+ const showPrice = this.$store.state.vuex_showPrice
|
|
|
+ const isAdmin = this.userInfo.superAdmin == 1
|
|
|
+ const isJhPrice = showPrice[0] && showPrice[1] == 'PURCHASES_PRICE'
|
|
|
+ // 是管理员
|
|
|
+ if(isAdmin){
|
|
|
+ // 是否进货价
|
|
|
+ return isJhPrice
|
|
|
+ }else{
|
|
|
+ // 员工且是否可见进货价
|
|
|
+ return isJhPrice && showPrice[2]
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
onLoad(opts) {
|