|
@@ -1,100 +1,106 @@
|
|
<template>
|
|
<template>
|
|
<div class="detail-container">
|
|
<div class="detail-container">
|
|
- <div class="print-form-1">
|
|
|
|
- <el-row :gutter="0">
|
|
|
|
- <el-col :span="6" class="item">
|
|
|
|
- <div class="label">经销商编码:</div>
|
|
|
|
- <div class="value">{{detailData.customerId}}</div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="6" class="item">
|
|
|
|
- <div class="label">出库日期:</div>
|
|
|
|
- <div class="value">{{nowDate}}</div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="6" class="item">
|
|
|
|
- <div class="label">仓库:</div>
|
|
|
|
- <div class="value">{{detailData.correspondName}}</div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="6" class="item">
|
|
|
|
- <div class="label">信息密钥:</div>
|
|
|
|
- <div class="value">{{detailData.informationKey}}</div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="24" class="item">
|
|
|
|
- <div class="label">经销商:</div>
|
|
|
|
- <div class="value">{{detailData.customerName}}</div>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div class="print-table-1">
|
|
|
|
- <div class="head">
|
|
|
|
- <el-row :gutter="20">
|
|
|
|
- <el-col :span="4">发货单号/订单号</el-col>
|
|
|
|
- <el-col :span="3">销售类型</el-col>
|
|
|
|
- <el-col :span="3">文件编号</el-col>
|
|
|
|
- <el-col :span="8">规格型号</el-col>
|
|
|
|
- <el-col :span="3">单位</el-col>
|
|
|
|
- <el-col :span="3">数量</el-col>
|
|
|
|
|
|
+ <div class="print-page" v-for="(item, index) in showData" :key="index">
|
|
|
|
+ <div class="print-title">
|
|
|
|
+ <div class="title1">佛山盛世欣兴格力贸易有限公司</div>
|
|
|
|
+ <div class="title2">商品发货单</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="print-form-1">
|
|
|
|
+ <el-row :gutter="0">
|
|
|
|
+ <el-col :span="6" class="item">
|
|
|
|
+ <div class="label">经销商编码:</div>
|
|
|
|
+ <div class="value">{{ item.customerId }}</div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="6" class="item">
|
|
|
|
+ <div class="label">出库日期:</div>
|
|
|
|
+ <div class="value">{{nowDate}}</div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="6" class="item">
|
|
|
|
+ <div class="label">仓库:</div>
|
|
|
|
+ <div class="value">{{ item.correspondName }}</div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="6" class="item">
|
|
|
|
+ <div class="label">信息密钥:</div>
|
|
|
|
+ <div class="value">{{ item.informationKey }}</div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="item">
|
|
|
|
+ <div class="label">经销商:</div>
|
|
|
|
+ <div class="value">{{ item.customerName }}</div>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
- <div class="body">
|
|
|
|
- <div v-for="(item, index) in detailData.invoicePickBeans" :key="index">
|
|
|
|
|
|
+
|
|
|
|
+ <div class="print-table-1">
|
|
|
|
+ <div class="head">
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
- <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
|
|
|
|
- <el-col :span="3">{{ item.saleTypeName || '' }}</el-col>
|
|
|
|
- <el-col :span="3">{{ item.fileNo || '' }}</el-col>
|
|
|
|
- <el-col :span="8">{{ item.specification || '' }}</el-col>
|
|
|
|
- <el-col :span="3">{{ item.unit || '' }}</el-col>
|
|
|
|
- <el-col :span="3">{{ item.refundableQty || 0 }}</el-col>
|
|
|
|
|
|
+ <el-col :span="4">发货单号/订单号</el-col>
|
|
|
|
+ <el-col :span="3">销售类型</el-col>
|
|
|
|
+ <el-col :span="3">文件编号</el-col>
|
|
|
|
+ <el-col :span="8">规格型号</el-col>
|
|
|
|
+ <el-col :span="3">单位</el-col>
|
|
|
|
+ <el-col :span="3">数量</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="body">
|
|
|
|
+ <div v-for="(item, index) in item.invoicePickBeans" :key="index">
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
+ <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
|
|
|
|
+ <el-col :span="3">{{ item.saleTypeName || '' }}</el-col>
|
|
|
|
+ <el-col :span="3">{{ item.fileNo || '' }}</el-col>
|
|
|
|
+ <el-col :span="8">{{ item.specification || '' }}</el-col>
|
|
|
|
+ <el-col :span="3">{{ item.unit || '' }}</el-col>
|
|
|
|
+ <el-col :span="3">{{ item.refundableQty || 0 }}</el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
+ <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
|
|
|
|
+ <el-col :span="2">发货日期</el-col>
|
|
|
|
+ <el-col :span="4">{{ item.theTime || '' }}</el-col>
|
|
|
|
+ <el-col :span="2">工程编号</el-col>
|
|
|
|
+ <el-col :span="4">{{ item.refEnginRecordNo || '' }}</el-col>
|
|
|
|
+ <el-col :span="2">备注</el-col>
|
|
|
|
+ <el-col :span="6">{{ item.remark || '' }}</el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="foot">
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
- <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
|
|
|
|
- <el-col :span="2">发货日期</el-col>
|
|
|
|
- <el-col :span="4">{{ item.theTime || '' }}</el-col>
|
|
|
|
- <el-col :span="2">工程编号</el-col>
|
|
|
|
- <el-col :span="4">{{ item.refEnginRecordNo || '' }}</el-col>
|
|
|
|
- <el-col :span="2">备注</el-col>
|
|
|
|
- <el-col :span="6">{{ item.remark || '' }}</el-col>
|
|
|
|
|
|
+ <el-col :span="21">合计</el-col>
|
|
|
|
+ <el-col :span="3">{{ item.total }}</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="foot">
|
|
|
|
- <el-row :gutter="20">
|
|
|
|
- <el-col :span="21">合计</el-col>
|
|
|
|
- <el-col :span="3">{{total}}</el-col>
|
|
|
|
|
|
+
|
|
|
|
+ <div class="print-form-2">
|
|
|
|
+ <el-row :gutter="30">
|
|
|
|
+ <el-col :span="8" class="item">
|
|
|
|
+ <div class="label">销售公司</div>
|
|
|
|
+ <div class="value">
|
|
|
|
+ <el-input readonly></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8" class="item">
|
|
|
|
+ <div class="label">仓库</div>
|
|
|
|
+ <div class="value">
|
|
|
|
+ <el-input readonly></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8" class="item">
|
|
|
|
+ <div class="label">经销商</div>
|
|
|
|
+ <div class="value">
|
|
|
|
+ <el-input readonly></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class="print-form-2">
|
|
|
|
- <el-row :gutter="30">
|
|
|
|
- <el-col :span="8" class="item">
|
|
|
|
- <div class="label">销售公司</div>
|
|
|
|
- <div class="value">
|
|
|
|
- <el-input readonly></el-input>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8" class="item">
|
|
|
|
- <div class="label">仓库</div>
|
|
|
|
- <div class="value">
|
|
|
|
- <el-input readonly></el-input>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8" class="item">
|
|
|
|
- <div class="label">经销商</div>
|
|
|
|
- <div class="value">
|
|
|
|
- <el-input readonly></el-input>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: 'PrintGuangzhou',
|
|
|
|
|
|
+ name: 'PrintFoshan',
|
|
props: {
|
|
props: {
|
|
detailData: {
|
|
detailData: {
|
|
type: Object,
|
|
type: Object,
|
|
@@ -103,6 +109,24 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
computed: {
|
|
computed: {
|
|
|
|
+ showData() {
|
|
|
|
+ var showData = [];
|
|
|
|
+ if(this.detailData && this.detailData.invoicePickBeans) {
|
|
|
|
+ for(var i=0; i<this.detailData.invoicePickBeans.length; i+=2){
|
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.detailData));
|
|
|
|
+ obj.invoicePickBeans = this.detailData.invoicePickBeans.slice(i, i+2);
|
|
|
|
+ let num = 0;
|
|
|
|
+ obj.invoicePickBeans.forEach(item => {
|
|
|
|
+ num = num + item.refundableQty;
|
|
|
|
+ });
|
|
|
|
+ obj.total = num;
|
|
|
|
+ showData.push(obj);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log(showData);
|
|
|
|
+ return showData;
|
|
|
|
+ },
|
|
|
|
+
|
|
nowDate() {
|
|
nowDate() {
|
|
var date = new Date();
|
|
var date = new Date();
|
|
var seperator1 = "-";
|
|
var seperator1 = "-";
|
|
@@ -118,17 +142,6 @@ export default {
|
|
var currentdate = year + seperator1 + month + seperator1 + strDate;
|
|
var currentdate = year + seperator1 + month + seperator1 + strDate;
|
|
return currentdate;
|
|
return currentdate;
|
|
},
|
|
},
|
|
-
|
|
|
|
- total() {
|
|
|
|
- if(!this.detailData.invoicePickBeans) {
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- let num = 0;
|
|
|
|
- this.detailData.invoicePickBeans.forEach(item => {
|
|
|
|
- num = num + item.refundableQty;
|
|
|
|
- });
|
|
|
|
- return num;
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -142,6 +155,22 @@ export default {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
+ .print-page {
|
|
|
|
+ margin-bottom: 50px;
|
|
|
|
+ // min-height: 1020px;
|
|
|
|
+ page-break-after: always;
|
|
|
|
+ }
|
|
|
|
+ .print-title {
|
|
|
|
+ text-align: center;
|
|
|
|
+ .title1 {
|
|
|
|
+ font-size: 24px;
|
|
|
|
+ margin-bottom: 18px;
|
|
|
|
+ }
|
|
|
|
+ .title2 {
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ margin-bottom: 24px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.print-form-1 {
|
|
.print-form-1 {
|
|
.item {
|
|
.item {
|
|
display: flex;
|
|
display: flex;
|