|
@@ -160,22 +160,6 @@ export default {
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
selectedRowKeys: [], // Check here to configure the default column
|
|
|
selectedRows: [],
|
|
|
- columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: 120, align: 'center' },
|
|
|
- { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '成本价', dataIndex: 'showCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '销售价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '可用库存', dataIndex: 'stockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '销售数量', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '已取消', dataIndex: 'cancelQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '已下推', dataIndex: 'pushedQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '剩余待下推', dataIndex: 'surplusQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '取消数量', dataIndex: 'cancelNums', scopedSlots: { customRender: 'nums' }, width: 100, align: 'center' },
|
|
|
- { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
- ],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -212,6 +196,29 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ columns () {
|
|
|
+ const arr = [
|
|
|
+ { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
+ { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: 120, align: 'center' },
|
|
|
+ { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '销售价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '可用库存', dataIndex: 'stockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '销售数量', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '已取消', dataIndex: 'cancelQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '已下推', dataIndex: 'pushedQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '剩余待下推', dataIndex: 'surplusQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '取消数量', dataIndex: 'cancelNums', scopedSlots: { customRender: 'nums' }, width: 100, align: 'center' },
|
|
|
+ { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
|
|
|
+ ]
|
|
|
+ if (this.$hasPermissions('B_isShowCost')) {
|
|
|
+ arr.splice(4, 0, { title: '成本价', dataIndex: 'showCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ }
|
|
|
+ return arr
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
onChange (selectedRowKeys, selectedRows) {
|
|
|
this.selectedRowKeys = selectedRowKeys
|