|
@@ -328,23 +328,23 @@ export default {
|
|
// 表格列定义
|
|
// 表格列定义
|
|
columns () {
|
|
columns () {
|
|
const arr = [
|
|
const arr = [
|
|
- { title: '序号', dataIndex: 'no', width: '40px', align: 'center' },
|
|
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: 40, align: 'center' },
|
|
{ title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '150px', align: 'left' },
|
|
{ title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '150px', align: 'left' },
|
|
- { title: '产品名称', dataIndex: 'productEntity.name', align: 'left', width: '200px', ellipsis: true },
|
|
|
|
- { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '100px', align: 'center' },
|
|
|
|
- { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '100px', align: 'center' },
|
|
|
|
- { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '150px', align: 'center' },
|
|
|
|
- { title: '单位', dataIndex: 'productEntity.unit', width: '60px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '120px', align: 'center' }
|
|
|
|
|
|
+ { title: '产品名称', dataIndex: 'productEntity.name', align: 'left', width: 200, ellipsis: true },
|
|
|
|
+ { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: 100, align: 'center' },
|
|
|
|
+ { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: 100, align: 'center' },
|
|
|
|
+ { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: 150, align: 'center' },
|
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 120, align: 'center' }
|
|
]
|
|
]
|
|
if (this.showStockCol) {
|
|
if (this.showStockCol) {
|
|
- arr.splice(5, 0, { title: '第三方库存', dataIndex: 'thirdStockQty', width: '100px', align: 'center', customRender: text => ((text || text == 0) ? text : '--') })
|
|
|
|
|
|
+ arr.splice(5, 0, { title: '第三方库存', dataIndex: 'thirdStockQty', width: 100, align: 'center', customRender: text => ((text || text == 0) ? text : '--') })
|
|
}
|
|
}
|
|
// 售价权限
|
|
// 售价权限
|
|
if (this.$hasPermissions('B_salesEdit_salesPrice')) {
|
|
if (this.$hasPermissions('B_salesEdit_salesPrice')) {
|
|
- arr.splice(3, 0, { title: '售价', dataIndex: 'price', width: '100px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
|
- arr.splice(4, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
|
- arr.splice(this.showStockCol ? 8 : 7, 0, { title: '售价小计', dataIndex: 'totalAmount', width: '100px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
|
|
|
+ arr.splice(3, 0, { title: '售价', dataIndex: 'price', width: 100, align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
|
+ arr.splice(4, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
|
+ arr.splice(this.showStockCol ? 8 : 7, 0, { title: '售价小计', dataIndex: 'totalAmount', width: 100, align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
}
|
|
}
|
|
let wt = 0
|
|
let wt = 0
|
|
arr.forEach(item => {
|
|
arr.forEach(item => {
|