|
@@ -62,14 +62,14 @@
|
|
|
<view class="item-detail-text flex_1">
|
|
|
<!-- 货架产品 -->
|
|
|
<view @click="openPriceModal(item,1,showShelfDetial)" v-if="item.affiliation=='SHELF'">
|
|
|
- <text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice.shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
|
|
|
- <text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice.shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
|
|
|
+ <text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice&&configPrice.shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
|
|
|
+ <text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice&&configPrice.shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
|
|
|
<u-icon name="arrow-right" v-if="priceShowVal&&showShelfDetial"></u-icon>
|
|
|
</view>
|
|
|
<!-- 非货架 -->
|
|
|
<view @click="openPriceModal(item,1,showNonShelfDetial)" v-else>
|
|
|
- <text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice.non_shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
|
|
|
- <text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice.non_shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
|
|
|
+ <text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice&&configPrice.non_shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
|
|
|
+ <text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice&&configPrice.non_shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
|
|
|
<u-icon name="arrow-right" v-if="priceShowVal&&showNonShelfDetial"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -123,8 +123,8 @@
|
|
|
</view>
|
|
|
<view class="flex justify_between">
|
|
|
<view class="item-detail-text flex_1" @click="openPriceModal(item,0,showShelfDetial)">
|
|
|
- <text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice.shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
|
|
|
- <text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice.shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
|
|
|
+ <text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice&&configPrice.shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
|
|
|
+ <text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice&&configPrice.shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
|
|
|
<u-icon name="arrow-right" v-if="priceShowVal&&showShelfDetial"></u-icon>
|
|
|
</view>
|
|
|
<view class="item-detail-text" v-if="item.currentInven">
|
|
@@ -237,21 +237,21 @@
|
|
|
<text>{{tempData.name||'--'}}</text>
|
|
|
</view>
|
|
|
<view v-if="tempData.affiliation=='SHELF'">
|
|
|
- <view class="itemlist" v-if="configPrice.shelf_cost_show == '1'">
|
|
|
+ <view class="itemlist" v-if="configPrice&&configPrice.shelf_cost_show == '1'">
|
|
|
<text>进货价</text>
|
|
|
<text>{{tempData.cost?'¥'+tempData.cost:'暂无价格'}}</text>
|
|
|
</view>
|
|
|
- <view class="itemlist" v-if="configPrice.shelf_price_show == '1'">
|
|
|
+ <view class="itemlist" v-if="configPrice&&configPrice.shelf_price_show == '1'">
|
|
|
<text>车主价</text>
|
|
|
<text>{{tempData.price?'¥'+tempData.price:'暂无价格'}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-else>
|
|
|
- <view class="itemlist" v-if="configPrice.non_shelf_cost_show == '1'">
|
|
|
+ <view class="itemlist" v-if="configPrice&&configPrice.non_shelf_cost_show == '1'">
|
|
|
<text>进货价</text>
|
|
|
<text>{{tempData.cost?'¥'+tempData.cost:'暂无价格'}}</text>
|
|
|
</view>
|
|
|
- <view class="itemlist" v-if="configPrice.non_shelf_price_show == '1'">
|
|
|
+ <view class="itemlist" v-if="configPrice&&configPrice.non_shelf_price_show == '1'">
|
|
|
<text>车主价</text>
|
|
|
<text>{{tempData.price?'¥'+tempData.price:'暂无价格'}}</text>
|
|
|
</view>
|
|
@@ -337,10 +337,10 @@
|
|
|
return this.$store.state.vuex_configPrice
|
|
|
},
|
|
|
showShelfDetial(){
|
|
|
- return this.configPrice.shelf_price_show == '1'&&this.configPrice.shelf_cost_show == '1'
|
|
|
+ return this.configPrice && this.configPrice.shelf_price_show == '1'&&this.configPrice.shelf_cost_show == '1'
|
|
|
},
|
|
|
showNonShelfDetial(){
|
|
|
- return this.configPrice.non_shelf_price_show == '1'&&this.configPrice.non_shelf_cost_show == '1'
|
|
|
+ return this.configPrice && this.configPrice.non_shelf_price_show == '1'&&this.configPrice.non_shelf_cost_show == '1'
|
|
|
}
|
|
|
},
|
|
|
onLoad(opts) {
|
|
@@ -368,21 +368,27 @@
|
|
|
methods: {
|
|
|
getShowPriceType(){
|
|
|
const storeShelf = this.$store.state.vuex_storeShelf
|
|
|
- findShelfUserParam({shelfSn: storeShelf?storeShelf.shelfSn:''}).then(res => {
|
|
|
- this.priceShowVal = res.data ? res.data.carOwnerPrice == '1' && res.data.purchasesPrice == '1' : false
|
|
|
- // 选中了2中价格,则从列表显示价格中取值
|
|
|
- if(this.priceShowVal){
|
|
|
- // 进货价
|
|
|
- this.showCostPrice = res.data.priceShowType == 'PURCHASES_PRICE'
|
|
|
- // 车主价
|
|
|
- this.showCarPrice = res.data.priceShowType == 'CAR_OWNER_PRICE'
|
|
|
- }else{
|
|
|
- // 进货价
|
|
|
- this.showCostPrice = res.data ? res.data.purchasesPrice == '1' : false
|
|
|
- // 车主价
|
|
|
- this.showCarPrice = res.data ? res.data.carOwnerPrice == '1' : false
|
|
|
- }
|
|
|
- })
|
|
|
+ if(storeShelf){
|
|
|
+ findShelfUserParam({shelfSn: storeShelf?storeShelf.shelfSn:''}).then(res => {
|
|
|
+ this.priceShowVal = res.data ? res.data.carOwnerPrice == '1' && res.data.purchasesPrice == '1' : false
|
|
|
+ // 选中了2中价格,则从列表显示价格中取值
|
|
|
+ if(this.priceShowVal){
|
|
|
+ // 进货价
|
|
|
+ this.showCostPrice = res.data.priceShowType == 'PURCHASES_PRICE'
|
|
|
+ // 车主价
|
|
|
+ this.showCarPrice = res.data.priceShowType == 'CAR_OWNER_PRICE'
|
|
|
+ }else{
|
|
|
+ // 进货价
|
|
|
+ this.showCostPrice = res.data ? res.data.purchasesPrice == '1' : false
|
|
|
+ // 车主价
|
|
|
+ this.showCarPrice = res.data ? res.data.carOwnerPrice == '1' : false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.priceShowVal = false
|
|
|
+ this.showCostPrice = false
|
|
|
+ this.showCarPrice = false
|
|
|
+ }
|
|
|
},
|
|
|
// 打开价格信息弹框
|
|
|
openPriceModal(row,type,show){
|
|
@@ -451,7 +457,7 @@
|
|
|
codeList: this.vinCode,
|
|
|
shelfSn: storeShelf?storeShelf.shelfSn:''
|
|
|
}).then(res => {
|
|
|
- console.log(res,'getShelfProductType')
|
|
|
+ // console.log(res,'getShelfProductType')
|
|
|
this.leve2Data = this.labelToPart(res.data || [])
|
|
|
// 默认该车适用或全部
|
|
|
this.selLeve2('all')
|
|
@@ -668,6 +674,14 @@
|
|
|
})
|
|
|
}
|
|
|
}else{
|
|
|
+ const storeShelf = this.$store.state.vuex_storeShelf
|
|
|
+ if(!storeShelf){
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '您还未开通数字货架,暂时无法使用'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
// 已认证用户
|
|
|
if(this.partListData.length==0){
|
|
|
uni.showToast({
|