|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="purchaseOrderDetail-wrap">
|
|
|
- <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
|
|
|
+ <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="purchaseOrderDetail-cont" >
|
|
|
<!-- 自定义的二级文字标题 -->
|
|
|
<template slot="subTitle">
|
|
|
<a id="purchaseOrderDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
@@ -19,13 +19,14 @@
|
|
|
<a-collapse :activeKey="['1']">
|
|
|
<a-collapse-panel key="1" header="基础信息">
|
|
|
<a-descriptions :column="3">
|
|
|
- <a-descriptions-item label="供应商">{{ detail&&detail.dealerName }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="供应商">{{ (detail&&detail.dealerName) || '--' }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="支付方式">{{ detail&&detail.settleStyleEntity.name }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName }}({{ detail&&detail.consigneeTel }})</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="采购员工">{{ detail&&detail.operatorName }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName }}<span v-if="detail&&detail.consigneeTel">({{ detail&&detail.consigneeTel }})</span></a-descriptions-item>
|
|
|
<a-descriptions-item label="收货地址">
|
|
|
- {{ detail&&detail.shippingAddressProvinceName }} -
|
|
|
- {{ detail&&detail.shippingAddressCityName }} -
|
|
|
- {{ detail&&detail.shippingAddressCountyName }} -
|
|
|
+ {{ detail&&detail.shippingAddressProvinceName }}
|
|
|
+ {{ detail&&detail.shippingAddressCityName }}
|
|
|
+ {{ detail&&detail.shippingAddressCountyName }}
|
|
|
{{ detail&&detail.shippingAddress }}
|
|
|
</a-descriptions-item>
|
|
|
</a-descriptions>
|
|
@@ -38,9 +39,17 @@
|
|
|
<a-collapse-panel key="1" header="产品详情">
|
|
|
<!-- 总计 -->
|
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
- <div slot="message">产品款数 <strong>{{ detail&&detail.totalCategory }}</strong> ,
|
|
|
- 采购数量合计 <strong>{{ detail&&detail.totalQty }}</strong> ,
|
|
|
- 采购金额合计¥<strong>{{ detail&&detail.totalAmount }}</strong></div>
|
|
|
+ <div slot="message">
|
|
|
+ 产品款数:<strong>{{ detail ? ((detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--') : '--' }}</strong>,
|
|
|
+ 采购数量合计:<strong>{{ detail ? ((detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--') : '--' }}</strong>,
|
|
|
+ 已收货数量:<strong>{{ detail ? ((detail.totalPutQty || detail.totalPutQty==0) ? detail.totalPutQty : '--') : '--' }}</strong>,
|
|
|
+ 待收货数量:<strong>{{ receivingOty }}</strong>,
|
|
|
+ 取消数量:<strong>{{ detail ? ((detail.totalCancelQty || detail.totalCancelQty==0) ? detail.totalCancelQty : '--') : '--' }}</strong>,
|
|
|
+ 采购金额合计:¥<strong>{{ detail ? ((detail.totalAmount || detail.totalAmount==0) ? detail.totalAmount : '--') : '--' }}</strong>,
|
|
|
+ 已收货金额:¥<strong>{{ detail ? ((detail.totalPutAmount || detail.totalPutAmount==0) ? detail.totalPutAmount : '--') : '--' }}</strong>,
|
|
|
+ 待收货金额:¥<strong>{{ receivingAmount }}</strong>,
|
|
|
+ 取消金额:¥<strong>{{ detail ? ((detail.totalCancelAmount || detail.totalCancelAmount==0) ? detail.totalCancelAmount : '--') : '--' }}</strong>
|
|
|
+ </div>
|
|
|
</a-alert>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
@@ -50,7 +59,7 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 1060 }"
|
|
|
+ :scroll="{ x: 1480 }"
|
|
|
bordered>
|
|
|
<!-- 采购数量 -->
|
|
|
<template slot="origqty" slot-scope="text, record">
|
|
@@ -66,7 +75,7 @@
|
|
|
</a-collapse>
|
|
|
</a-card>
|
|
|
<!-- 促销品详情 -->
|
|
|
- <a-card size="small" v-show="false" :bordered="false" class="purchaseOrderDetail-cont">
|
|
|
+ <a-card size="small" v-if="false" :bordered="false" class="purchaseOrderDetail-cont">
|
|
|
<a-collapse :activeKey="['1']">
|
|
|
<a-collapse-panel key="1" header="促销品详情">
|
|
|
<!-- 总计 -->
|
|
@@ -129,14 +138,16 @@ export default {
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
|
- { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 140, align: 'center', customRender: function (text) { return text = ' ' ? '--' : text } },
|
|
|
+ { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 220, align: 'center', customRender: function (text) { return text = ' ' ? '--' : text } },
|
|
|
+ { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '采购单价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '采购金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
|
{ title: '采购数量', dataIndex: 'qty', width: 100, align: 'center', scopedSlots: { customRender: 'origqty' } },
|
|
|
- { title: '缺货数量', dataIndex: 'oosQty', width: 100, align: 'center', customRender: function (text) { return text || 0 } },
|
|
|
- { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '采购金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } }
|
|
|
+ { title: '取消数量', dataIndex: 'cancelQty', width: 100, align: 'center', customRender: function (text) { return text || 0 } },
|
|
|
+ { title: '已收货数量', dataIndex: 'putQty', width: 120, align: 'center', customRender: function (text) { return text || 0 } },
|
|
|
+ { title: '待收货数量', dataIndex: 'receivingOty', width: 120, align: 'center', customRender: function (text) { return text || 0 } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -146,6 +157,10 @@ export default {
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
+ const totalQty = data.list[i].totalQty ? data.list[i].totalQty : 0
|
|
|
+ const totalPutQty = data.list[i].totalPutQty ? data.list[i].totalPutQty : 0
|
|
|
+ const totalCancelQty = data.list[i].totalCancelQty ? data.list[i].totalCancelQty : 0
|
|
|
+ data.list[i].receivingOty = Number(totalQty) - Number(totalPutQty) - Number(totalCancelQty)
|
|
|
}
|
|
|
this.disabled = false
|
|
|
return data
|
|
@@ -154,6 +169,20 @@ export default {
|
|
|
detail: null // 详情数据
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ receivingOty () {
|
|
|
+ const totalQty = (this.detail && this.detail.totalQty) ? this.detail.totalQty : 0
|
|
|
+ const totalPutQty = (this.detail && this.detail.totalPutQty) ? this.detail.totalPutQty : 0
|
|
|
+ const totalCancelQty = (this.detail && this.detail.totalCancelQty) ? this.detail.totalCancelQty : 0
|
|
|
+ return Number(totalQty) - Number(totalPutQty) - Number(totalCancelQty)
|
|
|
+ },
|
|
|
+ receivingAmount () {
|
|
|
+ const totalAmount = (this.detail && this.detail.totalAmount) ? this.detail.totalAmount : 0
|
|
|
+ const totalPutAmount = (this.detail && this.detail.totalPutAmount) ? this.detail.totalPutAmount : 0
|
|
|
+ const totalCancelAmount = (this.detail && this.detail.totalCancelAmount) ? this.detail.totalCancelAmount : 0
|
|
|
+ return Number(totalAmount) - Number(totalPutAmount) - Number(totalCancelAmount)
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 返回列表
|
|
|
handleBack () {
|