|
@@ -222,12 +222,12 @@ export default {
|
|
|
},
|
|
|
// 动态计算表格宽度
|
|
|
tableWidth () {
|
|
|
- let w = 1410
|
|
|
- if (this.isDealerUp) {
|
|
|
- w = 1510
|
|
|
+ let w = 1380
|
|
|
+ if (!this.isDealerUp) {
|
|
|
+ w -= 80
|
|
|
}
|
|
|
- if (this.$hasPermissions('M_ShowAllCost')) {
|
|
|
- w = this.isDealerUp ? 1510 : 1410
|
|
|
+ if (!this.$hasPermissions('M_ShowAllCost')) {
|
|
|
+ w -= 80
|
|
|
}
|
|
|
return w
|
|
|
},
|
|
@@ -236,28 +236,28 @@ export default {
|
|
|
const _this = this
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '50px', align: 'center' },
|
|
|
- { title: '产品名称', dataIndex: 'name', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '产品名称', dataIndex: 'name', width: '180px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '原厂编码', dataIndex: 'origCode', width: '150px', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
|
|
|
- { title: '在途数', dataIndex: 'transitQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '可用库存', dataIndex: 'currentStockQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '80px', align: 'center' },
|
|
|
+ { title: '在途数', dataIndex: 'transitQty', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '可用库存', dataIndex: 'currentStockQty', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '60px', align: 'center' },
|
|
|
{ title: '单位', dataIndex: 'unit', width: '60px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '包装数', scopedSlots: { customRender: 'baozh' }, width: '60px', align: 'center' },
|
|
|
- { title: '终端会员价', dataIndex: 'terminalPrice', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
- { title: '车主零售价', dataIndex: 'carOwnersPrice', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
- { title: '采购数量', dataIndex: 'qty', scopedSlots: { customRender: 'storageQuantity' }, width: '100px', align: 'center', fixed: 'right' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '100px', align: 'center', fixed: 'right' }
|
|
|
+ { title: '终端会员价', dataIndex: 'terminalPrice', width: '80px', align: 'right', fixed: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
+ { title: '车主零售价', dataIndex: 'carOwnersPrice', width: '80px', align: 'right', fixed: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
+ { title: '采购数量', dataIndex: 'qty', scopedSlots: { customRender: 'storageQuantity' }, width: '80px', align: 'center', fixed: 'right' },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '60px', align: 'center', fixed: 'right' }
|
|
|
]
|
|
|
// 产品来源,如果时上级
|
|
|
if (this.isDealerUp) {
|
|
|
- arr.splice(0, 0, { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '150px', align: 'center', fixed: 'left' })
|
|
|
- arr.splice(2, 0, { title: '产品来源', dataIndex: 'sysFlagDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
+ arr.splice(1, 0, { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '120px', align: 'center' })
|
|
|
+ arr.splice(2, 0, { title: '产品来源', dataIndex: 'sysFlagDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
} else {
|
|
|
- arr.splice(0, 0, { title: '产品编码', dataIndex: 'code', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left', sorter: true })
|
|
|
+ arr.splice(1, 0, { title: '产品编码', dataIndex: 'code', width: '120px', align: 'center', customRender: function (text) { return text || '--' }, sorter: true })
|
|
|
}
|
|
|
// 成本价权限
|
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
|
- arr.splice(this.isDealerUp ? 4 : 3, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
|
+ arr.splice(this.isDealerUp ? 10 : 9, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '80px', align: 'right', fixed: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
|
}
|
|
|
return arr
|
|
|
}
|