|
@@ -166,7 +166,10 @@ export default {
|
|
|
]
|
|
|
if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
|
|
|
arr.splice(4, 0, { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
- arr.splice(7, 0, { title: '采购价', dataIndex: 'showCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ }
|
|
|
+ if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
|
|
|
+ const ind = this.$hasPermissions('B_isShowPrice') ? 7 : 6
|
|
|
+ arr.splice(ind, 0, { title: '采购价', dataIndex: 'showCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
}
|
|
|
this.columns = arr
|
|
|
} else {
|
|
@@ -182,7 +185,10 @@ export default {
|
|
|
]
|
|
|
if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
|
|
|
arr.splice(3, 0, { title: '当前售价', dataIndex: 'productPrice', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
- arr.splice(5, 0, { title: '采购价', dataIndex: 'lastStockCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ }
|
|
|
+ if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
|
|
|
+ const ind = this.$hasPermissions('B_isShowPrice') ? 5 : 4
|
|
|
+ arr.splice(ind, 0, { title: '采购价', dataIndex: 'lastStockCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
}
|
|
|
this.columns = arr
|
|
|
}
|