|
@@ -86,6 +86,11 @@
|
|
|
:scroll="{ y: tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
+ <template slot="productCode" slot-scope="text, record">
|
|
|
+ <span style="padding-right: 15px;">{{ text }}</span>
|
|
|
+ <a-badge count="促" v-if="record.promotionFlag=='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
|
|
|
+ <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'80%' }"></a-badge>
|
|
|
+ </template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
|
</a-card>
|
|
@@ -155,7 +160,7 @@ export default {
|
|
|
columns () {
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', scopedSlots: { customRender: 'productCode' } },
|
|
|
{ title: '产品名称', dataIndex: 'productName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '原厂编码', dataIndex: 'origCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '单位', dataIndex: 'unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -166,7 +171,7 @@ export default {
|
|
|
{ title: '产品状态', dataIndex: 'productShowStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
]
|
|
|
if (this.$hasPermissions('M_shortageStatisticsPList_costPrice')) { // 成本权限
|
|
|
- arr.splice(6, 0, { title: '缺货成本金额', dataIndex: 'showCost', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
+ arr.splice(6, 0, { title: '缺货成本金额', dataIndex: 'totalShowCostAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
}
|
|
|
if (this.$hasPermissions('M_shortageStatisticsPList_salesPrice')) { // 售价权限
|
|
|
arr.splice(7, 0, { title: '缺货金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|