123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <template>
- <block>
- <view class="nav-right-item flex" v-for="(item, index) in list" :key="item.productSn">
- <view class="uni-col-2">
- <u-image :src="item.images+'?x-oss-process=image/resize,m_fixed,h_120,w_120,color_ffffff'" @click="viewImg(item)" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
- </view>
- <view class="item-info uni-col-10">
- <view class="item-name">
- <text>{{item.name}}</text>
- </view>
- <view class="item-detail">
- <view class="item-detail-info">
- <view class="flex justify_between">
- <view>
- <text class="item-detail-text flex_1">{{item.code}}</text>
- <u-tag v-if="commonPartCode.includes(item.code)" size="mini" style="margin-left: 5px;" text="通用" mode="light" shape="circle" type="success"></u-tag>
- </view>
- <text class="item-detail-text" v-if="item.affiliation=='SHELF'">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
- </view>
- <view class="flex" v-if="item.productTypeSn=='543766811373752320'">
- <u-tag :text="item.origCode" mode="light" borderColor="#ffffff" shape="circle" type="success"></u-tag>
- </view>
- <view class="flex justify_between">
- <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&&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&&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>
- <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">
- <u-icon name="plus" color="#fff" size="28"></u-icon>
- </u-button>
- <u-number-box v-else @change="updateVinNums" @blur="updateVinNums" v-model="item.qty" :index="item.productSn" :min="0" :max="item.currentInven"></u-number-box>
- </view>
- <view class="item-detail-text" v-if="item.affiliation=='NON_SHELF'||!item.currentInven">
- <text v-if="!item.checked" @click="addPart(item)" class="phtxt">我要急送</text>
- <u-number-box v-else @change="updateVinNums" @blur="updateVinNums" v-model="item.qty" :index="item.productSn" :min="0"></u-number-box>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </block>
- </template>
- <script>
- export default {
- props: {
- list: {
- type: Array,
- default: () => {
- return []
- }
- },
- commonPartCode: {
- type: Array,
- default: () => {
- return []
- }
- },
- configPrice: {
- type: Object,
- default: () => {
- return {}
- }
- },
- showCarPrice: {
- type: Boolean,
- default: false
- },
- showCostPrice: {
- type: Boolean,
- default: false
- },
- showShelfDetial: {
- type: Boolean,
- default: false
- },
- showNonShelfDetial: {
- type: Boolean,
- default: false
- },
- priceShowVal: {
- type: Boolean,
- default: false
- },
- },
- data() {
- return {
- }
- },
- methods: {
- openPriceModal(item, type, show) {
- this.$emit('openPrice', item, type, show)
- },
- addPart(item) {
- this.$emit('addPart', item, 'vin')
- },
- updateVinNums(e) {
- this.$emit('updateVinNums', e)
- },
- viewImg(item){
- this.$emit('viewImg',item)
- }
- }
- }
- </script>
- <style>
- </style>
|