完善商品库存的图片展示

This commit is contained in:
jishenghua
2024-10-08 23:09:03 +08:00
parent 22652be64e
commit da693deebd
2 changed files with 14 additions and 10 deletions

View File

@@ -171,7 +171,7 @@
<template slot="content"> <template slot="content">
<img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px" /> <img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px" />
</template> </template>
<div style="width:52px;height:52px;" v-if="record.imgName"> <div class="item-info" v-if="record.imgName">
<img v-if="record.imgName" :src="getImgUrl(record.imgName, record.imgSmall)" class="item-img" title="查看大图" /> <img v-if="record.imgName" :src="getImgUrl(record.imgName, record.imgSmall)" class="item-img" title="查看大图" />
</div> </div>
</a-popover> </a-popover>
@@ -276,7 +276,7 @@
width: 100, width: 100,
scopedSlots: { customRender: 'action' }, scopedSlots: { customRender: 'action' },
}, },
{title: '图片', dataIndex: 'pic', width: 65, scopedSlots: { customRender: 'customPic' }}, {title: '图片', dataIndex: 'pic', width: 60, scopedSlots: { customRender: 'customPic' }},
{title: '条码', dataIndex: 'mBarCode', width: 120}, {title: '条码', dataIndex: 'mBarCode', width: 120},
{title: '名称', dataIndex: 'name', width: 160, scopedSlots: { customRender: 'customName' }}, {title: '名称', dataIndex: 'name', width: 160, scopedSlots: { customRender: 'customName' }},
{title: '规格', dataIndex: 'standard', width: 120}, {title: '规格', dataIndex: 'standard', width: 120},
@@ -486,6 +486,12 @@
@import '~@assets/less/common.less' @import '~@assets/less/common.less'
</style> </style>
<style> <style>
.item-info {
float:left;
width:38px;
height:38px;
margin-left:6px
}
.item-img { .item-img {
cursor:pointer; cursor:pointer;
position: static; position: static;

View File

@@ -110,8 +110,7 @@
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="showMaterialInOutList(record)">{{record.id?'流水':''}}</a> <a @click="showMaterialInOutList(record)">{{record.id?'流水':''}}</a>
</span> </span>
<template slot="customBarCode" slot-scope="text, record"> <template slot="customPic" slot-scope="text, record">
<div :style="record.imgName?'float:left;line-height:30px':'float:left;'">{{record.mBarCode}}</div>
<a-popover placement="right" trigger="click"> <a-popover placement="right" trigger="click">
<template slot="content"> <template slot="content">
<img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px" /> <img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px" />
@@ -209,9 +208,8 @@
{title: '库存流水', dataIndex: 'action', align:"center", width: 60, {title: '库存流水', dataIndex: 'action', align:"center", width: 60,
scopedSlots: { customRender: 'action' } scopedSlots: { customRender: 'action' }
}, },
{title: '条码', dataIndex: 'mBarCode', width: 100, sorter: (a, b) => a.mBarCode - b.mBarCode, {title: '图片', dataIndex: 'pic', width: 40, scopedSlots: { customRender: 'customPic' }},
scopedSlots: { customRender: 'customBarCode' } {title: '条码', dataIndex: 'mBarCode', width: 100, sorter: (a, b) => a.mBarCode - b.mBarCode},
},
{title: '名称', dataIndex: 'name', width: 140, ellipsis:true}, {title: '名称', dataIndex: 'name', width: 140, ellipsis:true},
{title: '规格', dataIndex: 'standard', width: 100, ellipsis:true}, {title: '规格', dataIndex: 'standard', width: 100, ellipsis:true},
{title: '型号', dataIndex: 'model', width: 100, ellipsis:true}, {title: '型号', dataIndex: 'model', width: 100, ellipsis:true},
@@ -339,9 +337,9 @@
<style scoped> <style scoped>
.item-info { .item-info {
float:left; float:left;
width:30px; width:38px;
height:30px; height:38px;
margin-left:8px margin-left:6px
} }
.item-img { .item-img {
cursor:pointer; cursor:pointer;