|
@@ -75,8 +75,8 @@ export default {
|
|
|
{ title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '入库数量', dataIndex: 'productQty', width: 100, align: 'center' },
|
|
|
- { title: '入库单价', dataIndex: 'productCost', width: 100, align: 'center' },
|
|
|
+ { title: '入库数量', dataIndex: 'productQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '入库单价', dataIndex: 'productCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '小计', dataIndex: 'subtotal', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -87,7 +87,7 @@ export default {
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
// 小计 由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
|
|
|
- data.list[i].subtotal = getOperationalPrecision(data.list[i].productCost, data.list[i].productQty)
|
|
|
+ data.list[i].subtotal = getOperationalPrecision(data.list[i].productCost || 0, data.list[i].productQty)
|
|
|
}
|
|
|
this.getDetailCount(Object.assign(parameter, { sn: this.itemSn }))
|
|
|
return data
|