|
@@ -81,7 +81,7 @@
|
|
|
:columns="columns"
|
|
|
:customRow="handleClickRow"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 990, y: 300 }"
|
|
|
+ :scroll="{ y: 300 }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
<!-- 操作 -->
|
|
@@ -143,7 +143,7 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="chooseColumns"
|
|
|
:data="chooseLoadData"
|
|
|
- :scroll="{ x: 1160, y: 300 }"
|
|
|
+ :scroll="{ y: 300 }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
<!-- 售价 -->
|
|
@@ -285,34 +285,34 @@ export default {
|
|
|
computed: {
|
|
|
columns () {
|
|
|
const arr = [
|
|
|
- { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '原厂编码', dataIndex: 'productOrigCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '售价', dataIndex: 'productPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '单位', dataIndex: 'productUnit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action1' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '售价', dataIndex: 'productPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '库存数量', dataIndex: 'currentStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action1' }, width: '10%',align: 'center' }
|
|
|
]
|
|
|
if (this.$hasPermissions('B_isShowCost')) {
|
|
|
- arr.splice(4, 0, { title: '成本价', dataIndex: 'lastStockCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(4, 0, { title: '成本价', dataIndex: 'lastStockCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
}
|
|
|
return arr
|
|
|
},
|
|
|
chooseColumns () {
|
|
|
const arr = [
|
|
|
- { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'productEntity.code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '售价', scopedSlots: { customRender: 'price' }, width: 150, align: 'center' },
|
|
|
- { title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '调出数量', scopedSlots: { customRender: 'qty' }, width: 100, align: 'center' },
|
|
|
- { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
+ { title: '产品编码', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'productEntity.name', width: '20%',align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '售价', scopedSlots: { customRender: 'price' }, width: '10%', align: 'center' },
|
|
|
+ { title: '库存数量', dataIndex: 'currentStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '调出数量', scopedSlots: { customRender: 'qty' }, width: '10%',align: 'center' },
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: '6%',align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
|
|
|
]
|
|
|
if (this.$hasPermissions('B_isShowCost')) {
|
|
|
- arr.splice(4, 0, { title: '成本价', dataIndex: 'cost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(4, 0, { title: '成本价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
}
|
|
|
return arr
|
|
|
}
|