|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
<div class="detail-container">
|
|
|
- <el-page-header @back="goBack" content="详情"></el-page-header>
|
|
|
+ <div v-show="!isShowPrint">
|
|
|
+ <el-page-header @back="goBack" content="详情"></el-page-header>
|
|
|
|
|
|
- <div id="printMe">
|
|
|
<div class="main-title">
|
|
|
<div class="title">发货单信息</div>
|
|
|
</div>
|
|
@@ -112,7 +112,7 @@
|
|
|
</div>
|
|
|
<div class="table">
|
|
|
<el-table
|
|
|
- :data="detailData.shipDocumentOrders"
|
|
|
+ :data="detailData.invoicePickBeans"
|
|
|
element-loading-text="Loading"
|
|
|
border
|
|
|
fit
|
|
@@ -165,30 +165,33 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
|
- </div>
|
|
|
|
|
|
- <div class="page-footer">
|
|
|
- <div class="footer" :class="classObj">
|
|
|
- <!-- <el-button type="primary" icon="el-icon-printer" v-print="printObj">打 印</el-button> -->
|
|
|
- <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
|
|
|
- <el-button slot="reference">关 闭</el-button>
|
|
|
- </el-popconfirm>
|
|
|
+ <div class="page-footer">
|
|
|
+ <div class="footer">
|
|
|
+ <el-button type="primary" icon="el-icon-printer" @click="toPrint">打 印</el-button>
|
|
|
+ <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
|
|
|
+ <el-button slot="reference">关 闭</el-button>
|
|
|
+ </el-popconfirm>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
+ <CommonPrint :printId="printId" :printType="printType" v-if="isShowPrint" @backDetail="backDetail" />
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import print from 'vue-print-nb'
|
|
|
import { getDeliverDetail } from "@/api/supply/deliver";
|
|
|
+import CommonPrint from "@/views/supply/deliver/components/common_print";
|
|
|
|
|
|
export default {
|
|
|
name: 'DeliverDetail',
|
|
|
componentName: 'DeliverDetail',
|
|
|
props: ['listItem'],
|
|
|
- directives: {
|
|
|
- print
|
|
|
+ components: {
|
|
|
+ CommonPrint,
|
|
|
},
|
|
|
filters: {
|
|
|
statusFilter(val) {
|
|
@@ -218,25 +221,13 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- printObj: {
|
|
|
- id: 'printMe'
|
|
|
- },
|
|
|
detailData: {},
|
|
|
+ printType: 1,
|
|
|
+ printId: '',
|
|
|
+ isShowPrint: false,
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- computed: {
|
|
|
- sidebar() {
|
|
|
- return this.$store.state.app.sidebar
|
|
|
- },
|
|
|
- classObj() {
|
|
|
- return {
|
|
|
- hideSidebar: !this.sidebar.opened,
|
|
|
- openSidebar: this.sidebar.opened
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
-
|
|
|
created() {
|
|
|
this.getDetail();
|
|
|
},
|
|
@@ -250,8 +241,8 @@ export default {
|
|
|
// 获取详情
|
|
|
getDetail() {
|
|
|
getDeliverDetail({id: this.listItem.id}).then(res => {
|
|
|
- if(res.data.shipDocumentOrders) {
|
|
|
- res.data.shipDocumentOrders.forEach(item => {
|
|
|
+ if(res.data.invoicePickBeans) {
|
|
|
+ res.data.invoicePickBeans.forEach(item => {
|
|
|
item.notOutNumber = item.salesStatus ? 0 : item.refundableQty;
|
|
|
item.sums1 = ['notOutNumber', 'refundableQty'];
|
|
|
item.sums2 = ['price', 'afterTaxPrice', 'payAmount', 'totalDiscAmount', 'singlePayPrice'];
|
|
@@ -261,6 +252,17 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 点击打印
|
|
|
+ toPrint() {
|
|
|
+ this.printId = this.listItem.id;
|
|
|
+ this.isShowPrint = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ backDetail() {
|
|
|
+ this.printId = '';
|
|
|
+ this.isShowPrint = false;
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|