|
@@ -54,11 +54,18 @@
|
|
|
</view>
|
|
|
<view class="flex justify_between">
|
|
|
<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 v-if="showPrice[0]">
|
|
|
+ <view v-if="showPrice[1]=='PURCHASES_PRICE'">
|
|
|
+ <text class="item-price" v-if="isAdmin || showPrice[2]">¥{{item.cost||0}}</text>
|
|
|
+ </view>
|
|
|
+ <text v-else class="item-price">¥{{item.price||0}}</text>
|
|
|
+ </view>
|
|
|
</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 v-if="showPrice[0]">
|
|
|
+ <text class="item-price" v-if="showPrice[1]!='PURCHASES_PRICE'">¥{{item.price||0}}</text>
|
|
|
+ <text class="item-price" v-else></text>
|
|
|
+ </view>
|
|
|
</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">
|
|
@@ -106,10 +113,13 @@
|
|
|
<text class="item-detail-text">库存:{{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="showJhPrice">¥{{item.cost||0}}</text>
|
|
|
- <text class="item-price" v-else>¥{{item.price||0}}</text>
|
|
|
+ <view class="item-detail-text flex_1" v-if="showPrice[0]">
|
|
|
+ <view v-if="showPrice[1]=='PURCHASES_PRICE'">
|
|
|
+ <text class="item-price" v-if="isAdmin || showPrice[2]">¥{{item.cost||0}}</text>
|
|
|
+ </view>
|
|
|
+ <text v-else class="item-price">¥{{item.price||0}}</text>
|
|
|
</view>
|
|
|
+ <view class="item-detail-text flex_1" v-else></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">
|
|
|
<u-icon name="plus" color="#fff" size="28"></u-icon>
|
|
@@ -174,12 +184,19 @@
|
|
|
<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" 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 class="item-detail-text flex_1" v-if="item.affiliation=='SUPER_CATALOGUE'">
|
|
|
+ <view v-if="showPrice[0]">
|
|
|
+ <text class="item-price" v-if="showPrice[1]=='CAR_OWNER_PRICE'">¥{{item.price||0}}</text>
|
|
|
+ <text class="item-price" v-else></text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="item-detail-text flex_1" v-else>
|
|
|
- <text class="item-price" v-if="!showJhPrice">¥{{item.price||0}}</text>
|
|
|
+ <view v-if="showPrice[0]">
|
|
|
+ <view v-if="showPrice[1]=='PURCHASES_PRICE'">
|
|
|
+ <text class="item-price" v-if="isAdmin || showPrice[2]">¥{{item.cost||0}}</text>
|
|
|
+ </view>
|
|
|
+ <text v-else class="item-price">¥{{item.price||0}}</text>
|
|
|
+ </view>
|
|
|
</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>
|
|
@@ -253,18 +270,11 @@
|
|
|
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]
|
|
|
- }
|
|
|
+ showPrice(){
|
|
|
+ return this.$store.state.vuex_showPrice
|
|
|
+ },
|
|
|
+ isAdmin(){
|
|
|
+ return this.userInfo.superAdmin == 1
|
|
|
}
|
|
|
},
|
|
|
onLoad(opts) {
|