|
@@ -3,6 +3,7 @@
|
|
:visible.sync="visible"
|
|
:visible.sync="visible"
|
|
append-to-body
|
|
append-to-body
|
|
width="297mm"
|
|
width="297mm"
|
|
|
|
+ :close-on-click-modal="false"
|
|
>
|
|
>
|
|
<pdf-exporter ref="pdfExporter" id="tag-purchase-order-export-pdf" class="flex column layout-gap" style="min-height:100%;height:600px;margin:0 calc(var(--layout-gap) * -1);padding:var(--layout-gap);color:#000000;">
|
|
<pdf-exporter ref="pdfExporter" id="tag-purchase-order-export-pdf" class="flex column layout-gap" style="min-height:100%;height:600px;margin:0 calc(var(--layout-gap) * -1);padding:var(--layout-gap);color:#000000;">
|
|
<LogoImageView width="150"></LogoImageView>
|
|
<LogoImageView width="150"></LogoImageView>
|
|
@@ -38,7 +39,7 @@
|
|
<td align="center"><div class="cell">{{ buyerName}}</div></td>
|
|
<td align="center"><div class="cell">{{ buyerName}}</div></td>
|
|
<td align="center"><div class="cell">{{ item.tagTypeName}}</div></td>
|
|
<td align="center"><div class="cell">{{ item.tagTypeName}}</div></td>
|
|
<td align="center"><div class="cell">{{ item.number}}</div></td>
|
|
<td align="center"><div class="cell">{{ item.number}}</div></td>
|
|
- <td align="center"><div class="cell">{{ item.amount}}</div></td>
|
|
|
|
|
|
+ <td align="center"><div class="cell">{{ formatAmount(item.amount)}}</div></td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td align="center" colspan="4"><div class="cell">总计</div></td>
|
|
<td align="center" colspan="4"><div class="cell">总计</div></td>
|
|
@@ -119,7 +120,7 @@ export default {
|
|
this.details = this.data && this.data.details ? this.data.details : []
|
|
this.details = this.data && this.data.details ? this.data.details : []
|
|
this.buyerName = data.buyerName
|
|
this.buyerName = data.buyerName
|
|
this.formatDataTime = (!this.data || !this.data.dataTime) ? '' : new Date(data.dataTime).format('YYYY-MM-DD')
|
|
this.formatDataTime = (!this.data || !this.data.dataTime) ? '' : new Date(data.dataTime).format('YYYY-MM-DD')
|
|
- this.amount = data.amount
|
|
|
|
|
|
+ this.amount = data.amount ? parseFloat(data.amount).toFixed(2) : null
|
|
this.number = (!this.data || !this.data.details) ? 0 : this.data.details.reduce((sum, item) => sum + item.number, 0)
|
|
this.number = (!this.data || !this.data.details) ? 0 : this.data.details.reduce((sum, item) => sum + item.number, 0)
|
|
|
|
|
|
if (flag) {
|
|
if (flag) {
|
|
@@ -159,6 +160,10 @@ export default {
|
|
formatDate (date) {
|
|
formatDate (date) {
|
|
if (!date) return ''
|
|
if (!date) return ''
|
|
return new Date(date).format('yyyy-MM-dd')
|
|
return new Date(date).format('yyyy-MM-dd')
|
|
|
|
+ },
|
|
|
|
+ formatAmount (amount) {
|
|
|
|
+ if (amount == null) return ''
|
|
|
|
+ return parseFloat(amount).toFixed(2)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|