|
@@ -68,7 +68,7 @@ export default {
|
|
dataList () {
|
|
dataList () {
|
|
const list = this.dataObj && this.dataObj.salesPromoDetailEntityList || []
|
|
const list = this.dataObj && this.dataObj.salesPromoDetailEntityList || []
|
|
list.map(item => {
|
|
list.map(item => {
|
|
- item.totalAmount = item.promotionPrice * item.qty
|
|
|
|
|
|
+ item.totalAmount = this.modalType == 0 ? item.promotionPrice * item.qty : item.totalAmount
|
|
item.totalCostAmount = item.showCost * item.qty
|
|
item.totalCostAmount = item.showCost * item.qty
|
|
item.totalKsAmount = item.totalAmount - item.totalCostAmount
|
|
item.totalKsAmount = item.totalAmount - item.totalCostAmount
|
|
})
|
|
})
|
|
@@ -79,16 +79,18 @@ export default {
|
|
const arr = [
|
|
const arr = [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center', customRender: function (text, row, index) { return index + 1 } },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center', customRender: function (text, row, index) { return index + 1 } },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '售价', dataIndex: 'promotionPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
{ title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', isShow: false, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', isShow: false, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
{ title: '售价小计', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
{ title: '售价小计', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
-
|
|
|
|
]
|
|
]
|
|
if (_this.modalType == 0) {
|
|
if (_this.modalType == 0) {
|
|
arr.splice(2, 0, { title: '参考成本价', dataIndex: 'showCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
arr.splice(2, 0, { title: '参考成本价', dataIndex: 'showCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
+ arr.splice(3, 0, { title: '售价', dataIndex: 'promotionPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
+ arr.splice(5, 0, { title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
arr.push({ title: '参考成本价小计', dataIndex: 'totalCostAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
arr.push({ title: '参考成本价小计', dataIndex: 'totalCostAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
arr.push({ title: '亏损金额', dataIndex: 'totalKsAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
arr.push({ title: '亏损金额', dataIndex: 'totalKsAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
+ } else {
|
|
|
|
+ arr.splice(2, 0, { title: '售价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
+ arr.splice(4, 0, { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
}
|
|
}
|
|
return arr
|
|
return arr
|
|
}
|
|
}
|