|
@@ -48,18 +48,23 @@
|
|
|
<a-card size="small" :bordered="false" class="pages-wrap">
|
|
|
<!-- alert -->
|
|
|
<a-alert type="info" style="margin-bottom: 10px;">
|
|
|
- <div slot="message">
|
|
|
- 总款数:<strong>{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}</strong>;
|
|
|
- 总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
|
|
|
- 总赠品数量:<strong>{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</strong>;
|
|
|
- 急件总款数:<strong>{{ detailData&&(detailData.oosCategory || detailData.oosCategory==0) ? detailData.oosCategory : '--' }}</strong>;
|
|
|
- 急件总数量:<strong>{{ detailData&&(detailData.oosQty || detailData.oosQty==0) ? detailData.oosQty : '--' }}</strong>;<br/>
|
|
|
- 总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? detailData.totalAmount : '--' }}</strong>;
|
|
|
- 总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? detailData.totalCost : '--' }}</strong>;
|
|
|
- 总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? detailData.grossProfit : '--' }}</strong>;
|
|
|
- 折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? detailData.discountedAmount : '--' }}</strong>;
|
|
|
- 折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
|
|
|
- 折扣金额:<strong>{{ detailData&&(detailData.discountAmount || detailData.discountAmount==0) ? detailData.discountAmount : '--' }}</strong>;
|
|
|
+ <div style="display: flex;align-items: center;justify-content: space-between;" slot="message">
|
|
|
+ <div>
|
|
|
+ 总款数:<strong>{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}</strong>;
|
|
|
+ 总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
|
|
|
+ 总赠品数量:<strong>{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</strong>;
|
|
|
+ 急件总款数:<strong>{{ detailData&&(detailData.oosCategory || detailData.oosCategory==0) ? detailData.oosCategory : '--' }}</strong>;
|
|
|
+ 急件总数量:<strong>{{ detailData&&(detailData.oosQty || detailData.oosQty==0) ? detailData.oosQty : '--' }}</strong>;<br/>
|
|
|
+ 总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? detailData.totalAmount : '--' }}</strong>;
|
|
|
+ 总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? detailData.totalCost : '--' }}</strong>;
|
|
|
+ 总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? detailData.grossProfit : '--' }}</strong>;
|
|
|
+ 折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? detailData.discountedAmount : '--' }}</strong>;
|
|
|
+ 折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
|
|
|
+ 折扣金额:<strong>{{ detailData&&(detailData.discountAmount || detailData.discountAmount==0) ? detailData.discountAmount : '--' }}</strong>;
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <a-checkbox v-model="showCost" id="salesQuery-cost">成本价</a-checkbox>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</a-alert>
|
|
|
<!-- 列表 -->
|
|
@@ -101,13 +106,13 @@ export default {
|
|
|
showPage: false,
|
|
|
spinning: false,
|
|
|
disabled: false,
|
|
|
+ showCost: false,
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品名称', dataIndex: 'productName', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '原厂编码', dataIndex: 'productOrigCode', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '成本价', dataIndex: 'cost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', width: '9%', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
|
|
|
{ title: '售价', dataIndex: 'price', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '折后售价', dataIndex: 'discountedPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '销售数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
@@ -131,7 +136,7 @@ export default {
|
|
|
data.list[i].no = no + i + 1
|
|
|
const productCode = (data.list[i].productEntity && data.list[i].productEntity.code) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.code)
|
|
|
const productName = (data.list[i].productEntity && data.list[i].productEntity.name) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.name)
|
|
|
- const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode)
|
|
|
+ const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode) || '--'
|
|
|
const productOrigUnit = (data.list[i].productEntity && data.list[i].productEntity.unit) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.unit)
|
|
|
data.list[i].productCode = productCode || '--'
|
|
|
data.list[i].productName = productName || '--'
|
|
@@ -196,6 +201,15 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ showCost (newValue, oldValue) {
|
|
|
+ if (newValue) {
|
|
|
+ this.columns.splice(4, 0, { title: '成本价', dataIndex: 'cost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ } else {
|
|
|
+ this.columns.splice(4, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted () {
|
|
|
this.showPage = true
|
|
|
if (!this.$store.state.app.isNewTab || this.outBizSn) { // 页签刷新 或 为弹框时调用
|