|
@@ -107,6 +107,12 @@
|
|
|
:data="loadData"
|
|
|
:scroll="{ x: 1060 }"
|
|
|
bordered>
|
|
|
+ <!-- 产品编码 -->
|
|
|
+ <template slot="code" slot-scope="text, record">
|
|
|
+ <span>{{ record.dealerProductEntity.code }}</span>
|
|
|
+ <a-badge v-if="record.promotionFlag && record.promotionFlag=='GIFT'" count="促" :number-style="{ backgroundColor: '#52c41a', zoom:'86%',marginLeft:'8px' }"></a-badge>
|
|
|
+ <a-badge v-if="record.promotionFlag && record.promotionFlag=='DISCOUNT'" count="特" :number-style="{ backgroundColor: '#faad14', zoom:'86%',marginLeft:'8px' }"></a-badge>
|
|
|
+ </template>
|
|
|
<!-- 采购数量 -->
|
|
|
<template slot="origqty" slot-scope="text, record">
|
|
|
<div>{{ text }}</div>
|
|
@@ -116,6 +122,16 @@
|
|
|
<template slot="outOfStockNum" slot-scope="text, record">
|
|
|
<span>{{ record.outOfStockNum }}</span>
|
|
|
</template>
|
|
|
+ <!-- 采购单价 -->
|
|
|
+ <template slot="unitPrice" slot-scope="text, record">
|
|
|
+ <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{ record.discountedPrice? toThousands(record.discountedPrice): '--' }}{{ record.origPrice ? '(' + toThousands(record.origPrice) + ')' : '' }}</span>
|
|
|
+ <span v-else>{{ toThousands(record.discountedPrice) }}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 采购金额 -->
|
|
|
+ <template slot="amount" slot-scope="text, record">
|
|
|
+ <span v-if="record.promotionFlag && (record.promotionFlag=='GIFT' || record.promotionFlag=='DISCOUNT')">{{ record.discountedAmount?toThousands(record.discountedAmount) : '--' }}{{ record.origPrice ? '(' + toThousands(record.origPrice) + ')' : '' }}</span>
|
|
|
+ <span v-else>{{ toThousands(record.discountedAmount) }}</span>
|
|
|
+ </template>
|
|
|
</s-table>
|
|
|
</a-collapse-panel>
|
|
|
</a-collapse>
|
|
@@ -185,10 +201,10 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
columns () {
|
|
|
- let _this=this
|
|
|
+ const _this = this
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '16%', align: 'center', scopedSlots: { customRender: 'code' } },
|
|
|
{ title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '单位', dataIndex: 'dealerProductEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -197,12 +213,12 @@ export default {
|
|
|
{ title: '采购数量', dataIndex: 'qty', width: '7%', align: 'center', scopedSlots: { customRender: 'origqty' } },
|
|
|
// { title: '审核订单金额', dataIndex: 'pushedAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '审核订单数量', dataIndex: 'pushedQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '已取消数量', dataIndex: 'cancelQty', width: '7%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '已取消数量', dataIndex: 'cancelQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
]
|
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
|
- arr.splice(5, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text,2) : '--') } })
|
|
|
- arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text,2) : '--') } })
|
|
|
- arr.splice(8, 0, { title: '审核订单金额', dataIndex: 'pushedAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text,2) : '--') } })
|
|
|
+ arr.splice(5, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '7%', align: 'right', scopedSlots: { customRender: 'unitPrice' } })
|
|
|
+ arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '7%', align: 'right', scopedSlots: { customRender: 'amount' } })
|
|
|
+ arr.splice(8, 0, { title: '审核订单金额', dataIndex: 'pushedAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
|
}
|
|
|
return arr
|
|
|
}
|