|
@@ -92,8 +92,19 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 950, y:300 }"
|
|
|
+ :scroll="{ x: 1030, y:300 }"
|
|
|
bordered>
|
|
|
+ <!-- 产品图片 -->
|
|
|
+ <template slot="imageUrl" slot-scope="text, record">
|
|
|
+ <img
|
|
|
+ v-if="record.productMainPic && record.productMainPic.imageUrl"
|
|
|
+ :src="record.productMainPic.imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''"
|
|
|
+ width="30"
|
|
|
+ height="30"
|
|
|
+ class="imageUrl"
|
|
|
+ @click="handlePicDetail(record)" />
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
<!-- 产品编码 -->
|
|
|
<template slot="code" slot-scope="text, record">
|
|
|
<a-tooltip placement="top" v-if="record.stockState=='NOT_ENOUGH'">
|
|
@@ -273,6 +284,7 @@ export default {
|
|
|
{ title: '箱/单位', dataIndex: 'unit', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '采购单价', dataIndex: 'purchasePrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') }, fixed: 'right' },
|
|
|
{ title: '采购数量', dataIndex: 'qty', scopedSlots: { customRender: 'storageQuantity' }, width: 100, align: 'center', fixed: 'right' },
|
|
|
+ { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: 80, align: 'center', fixed: 'right' },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -487,6 +499,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 查看产品
|
|
|
+ handlePicDetail (row) {},
|
|
|
// 上次缺货 导入成功
|
|
|
hanldeOkOutStock () {
|
|
|
this.$refs.purchaseTable.refresh(true)
|