|
@@ -53,20 +53,11 @@
|
|
|
<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" v-if="item.affiliation=='SHELF'">
|
|
|
- <view v-if="showPrice[0]">
|
|
|
- <view v-if="showPrice[1]=='PURCHASES_PRICE'&&item.cost">
|
|
|
- <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'">
|
|
|
- <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>
|
|
|
- {{showPrice[2]?(item.cost||''):(isAdmin?(item.cost||''):'')}}
|
|
|
- </text>
|
|
|
+ <view class="item-detail-text flex_1">
|
|
|
+ <view @click="openPriceModal(item)">
|
|
|
+ <text class="item-price" v-if="showCarPrice">¥{{item.price||0}}</text>
|
|
|
+ <text class="item-price" v-else>¥{{item.cost||0}}</text>
|
|
|
+ <u-icon name="arrow-right" v-if="priceShowVal"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="item-detail-text" v-if="item.currentInven">
|
|
@@ -115,13 +106,11 @@
|
|
|
<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" v-if="showPrice[0]">
|
|
|
- <view v-if="showPrice[1]=='PURCHASES_PRICE'&&item.cost">
|
|
|
- <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 class="item-detail-text flex_1" @click="openPriceModal(item)">
|
|
|
+ <text class="item-price" v-if="showCarPrice">¥{{item.price||0}}</text>
|
|
|
+ <text class="item-price" v-else>¥{{item.cost||0}}</text>
|
|
|
+ <u-icon name="arrow-right" v-if="priceShowVal"></u-icon>
|
|
|
</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>
|
|
@@ -158,7 +147,7 @@
|
|
|
<u-image width="44" height="44" :src="`/static/icon_shopping@3x.png`"></u-image>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <view v-if="showPrice[0]&&showPrice[1]=='CAR_OWNER_PRICE'&&totalAmount">
|
|
|
+ <view v-if="(showCarPrice||showCostPrice)&&totalAmount">
|
|
|
合计:<text>¥{{totalAmount}}</text>
|
|
|
</view>
|
|
|
<div>
|
|
@@ -189,21 +178,9 @@
|
|
|
<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=='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>
|
|
|
- {{showPrice[2]?(item.cost||''):(isAdmin?(item.cost||''):'')}}
|
|
|
- </text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="item-detail-text flex_1" v-else>
|
|
|
- <view v-if="showPrice[0]">
|
|
|
- <view v-if="showPrice[1]=='PURCHASES_PRICE'&&item.cost">
|
|
|
- <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">
|
|
|
+ <text class="item-price" v-if="showCarPrice">¥{{item.price||0}}</text>
|
|
|
+ <text class="item-price" v-else>¥{{item.cost||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>
|
|
@@ -225,16 +202,38 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <!-- 价格查看 -->
|
|
|
+ <u-popup v-model="showPriceModal" mode="center" length="80%" closeable>
|
|
|
+ <view class="show-price-modal" v-if="tempData">
|
|
|
+ <view>
|
|
|
+ <text>产品编码</text>
|
|
|
+ <text>{{tempData.code||'--'}}</text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <text>产品名称</text>
|
|
|
+ <text>{{tempData.name||'--'}}</text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <text>进货价</text>
|
|
|
+ <text>{{tempData.cost||0}}</text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <text>车主价</text>
|
|
|
+ <text>{{tempData.price||0}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { getShelfProductList, getShelfProductType, queryPartCodeByVin, getShelfQueryList, shelfOrderFlowCreate } from '@/api/shelf'
|
|
|
+ import { getShelfProductList, getShelfProductType, queryPartCodeByVin, getShelfQueryList, shelfOrderFlowCreate, findShelfUserParam } from '@/api/shelf'
|
|
|
import { scanVinLogCopy } from '@/api/car'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
showOther: false,
|
|
|
+ showPriceModal: false,
|
|
|
theme: '',
|
|
|
vinNumber: '',
|
|
|
leve2Data: [], // 二级菜单数据
|
|
@@ -255,6 +254,10 @@
|
|
|
isIphoneXup: false,
|
|
|
saveLoading: false,
|
|
|
showPopup: false,
|
|
|
+ priceShowVal: null, // 是否可以查看所有价格
|
|
|
+ showCarPrice: false, // 显示车主价
|
|
|
+ showCostPrice: false, // 显示成本价
|
|
|
+ tempData: null // 临时数据
|
|
|
}
|
|
|
},
|
|
|
computed:{
|
|
@@ -286,9 +289,6 @@
|
|
|
storeApply(){
|
|
|
return this.$store.state.vuex_storeAuthInfo || null
|
|
|
},
|
|
|
- showPrice(){
|
|
|
- return this.$store.state.vuex_showPrice
|
|
|
- },
|
|
|
isAdmin(){
|
|
|
return this.userInfo.superAdmin == 1
|
|
|
},
|
|
@@ -317,8 +317,35 @@
|
|
|
},
|
|
|
onShow() {
|
|
|
this.$store.state.vuex_shelfChoosePart = []
|
|
|
+ this.getShowPriceType()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getShowPriceType(){
|
|
|
+ const storeShelf = this.$store.state.vuex_storeShelf
|
|
|
+ findShelfUserParam({shelfSn: storeShelf?storeShelf.shelfSn:''}).then(res => {
|
|
|
+ this.priceShowVal = res.data.carOwnerPrice == '1' && res.data.purchasesPrice == '1'
|
|
|
+ // 选中了2中价格,则从列表显示价格中取值
|
|
|
+ if(this.priceShowVal){
|
|
|
+ // 进货价
|
|
|
+ this.showCostPrice = res.data.priceShowType == 'PURCHASES_PRICE'
|
|
|
+ // 车主价
|
|
|
+ this.showCarPrice = res.data.priceShowType == 'CAR_OWNER_PRICE'
|
|
|
+ }else{
|
|
|
+ // 进货价
|
|
|
+ this.showCostPrice = res.data.purchasesPrice == '1'
|
|
|
+ // 车主价
|
|
|
+ this.showCarPrice = res.data.carOwnerPrice == '1'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 打开价格信息弹框
|
|
|
+ openPriceModal(row){
|
|
|
+ console.log(row)
|
|
|
+ if(this.priceShowVal){
|
|
|
+ this.tempData = row
|
|
|
+ this.showPriceModal = true
|
|
|
+ }
|
|
|
+ },
|
|
|
scanVinLogCopy(){
|
|
|
scanVinLogCopy({id:this.carInfo.id}).then(res => {
|
|
|
console.log(res)
|
|
@@ -684,6 +711,21 @@
|
|
|
margin-left: 10rpx;
|
|
|
}
|
|
|
}
|
|
|
+ .show-price-modal{
|
|
|
+ padding: 30px 20px;
|
|
|
+ >view{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ > text{
|
|
|
+ &:last-child{
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ border-bottom: 1px solid #eee;
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
.cpb_middle{
|
|
|
flex-grow: 1;
|
|
|
padding-top: 10rpx;
|