|
@@ -312,21 +312,26 @@
|
|
|
<Modal v-model="showPrint" title="确认打印" width="300" @on-ok="printOk">
|
|
|
<div style="text-align:center">是否打印?</div>
|
|
|
</Modal>
|
|
|
- <div class="print-table" ref="print" style="position: absolute;top:900px;left:100px;background-color:red">
|
|
|
- <table cellspacing="0" cellpadding="0" v-for="(item,index) in newArr" :key="index" class="print-cell">
|
|
|
+ <div class="print-table" ref="print">
|
|
|
+ <div v-for="(item,index) in prints" :key="index" class="print_parents">
|
|
|
+ <table cellspacing="0" cellpadding="0" v-for="(_item,_index) in item.childList" :key="_index" class="print-cell">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<td colspan="23" style="border: 0;">
|
|
|
<div class="table-header">
|
|
|
- <img class="left-img" :src='$store.state.ip + showTable.logo' alt="" v-show="showTable.logo?true:false">
|
|
|
- <h1 class="table-title">{{showTable.title}}</h1><img class="right-img1" :src='$store.state.ip + showTable.right_logo1' alt="" v-show="showTable.right_logo1?true:false"><img class="right-img2" :src='$store.state.ip + showTable.right_logo2' alt="" v-show="showTable.right_logo2?true:false">
|
|
|
+ <img class="left-img" :src='$store.state.ip + item.msg.logo' alt="" v-show="item.msg.logo?true:false">
|
|
|
+ <h1 class="table-title">{{item.msg.title}}</h1>
|
|
|
+ <div style=" position: absolute;right: 0;top:0px;display:flex;">
|
|
|
+ <img v-for="(v,i) in item.msg.product_img" :key="i" class="right-img1" :src='$store.state.ip + v' alt="" v-show="item.msg.product_img!=0?true:false">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <div style="float:right;margin:0 0 5pt 0">{{item.msg.box_title}}</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td colspan="23">
|
|
|
<p style="text-align: left;padding-left: 20px;"><span class="part_content"
|
|
|
- style="font-size:16px;margin-right:40px">{{showTable.part_content}}</span><span class="custom">{{showTable.custom}}</span></p>
|
|
|
+ style="font-size:16px;margin-right:40px;font-weight:600">{{item.msg.part_content}}</span><span class="custom">{{item.msg.custom.split('单号')[0]}}</span><span style="float:right;margin-right:20px;font-weight:600">单号{{item.msg.custom.split('单号')[1]}}</span></p>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="header">
|
|
@@ -343,10 +348,10 @@
|
|
|
<p style="width:80px ;">型号</p>
|
|
|
</td>
|
|
|
<td rowspan="2">
|
|
|
- <p style="width:80px ;">工艺</p>
|
|
|
+ <p style="width:auto ;">工艺</p>
|
|
|
</td>
|
|
|
<td rowspan="2">
|
|
|
- <p style="width:80px ;">木皮/颜色</p>
|
|
|
+ <p style="width:auto ;">木皮/颜色</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
<p>门洞尺寸(MM)</p>
|
|
@@ -376,19 +381,19 @@
|
|
|
<p>金额</p>
|
|
|
</td>
|
|
|
<td rowspan="2">
|
|
|
- <p>备注</p>
|
|
|
+ <p style="width:80px">备注</p>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="header">
|
|
|
|
|
|
<td>
|
|
|
- <p>高*宽*厚度</p>
|
|
|
+ <p>高*宽*厚</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>高*宽*厚度</p>
|
|
|
+ <p>高*宽*厚</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>高*宽*厚度</p>
|
|
|
+ <p>高*宽*厚</p>
|
|
|
</td>
|
|
|
|
|
|
<td>
|
|
@@ -397,83 +402,83 @@
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody class="content" >
|
|
|
- <tr v-for="(_item,_index) in item" :key="_index">
|
|
|
+ <tr v-for="(__item,__index) in _item" :key="__index">
|
|
|
<td>
|
|
|
- <p>{{_item.sort}}</p>
|
|
|
+ <p>{{__item.sort}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.postion}}</p>
|
|
|
+ <p>{{__item.postion}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.process}}</p>
|
|
|
+ <p>{{__item.process}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.model}}</p>
|
|
|
+ <p>{{__item.model}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.workmanship}}</p>
|
|
|
+ <p>{{__item.workmanship}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.color}}</p>
|
|
|
+ <p>{{__item.color}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.measure1}}</p>
|
|
|
+ <p>{{__item.measure1}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.measure2}}</p>
|
|
|
+ <p>{{__item.measure2}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.measure3}}</p>
|
|
|
+ <p>{{__item.measure3}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.num}}</p>
|
|
|
+ <p>{{__item.num}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.unit}}</p>
|
|
|
+ <p>{{__item.unit}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.square}}</p>
|
|
|
+ <p>{{__item.square}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.unit_price}}</p>
|
|
|
+ <p>{{__item.unit_price}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.ext}}</p>
|
|
|
+ <p>{{__item.ext}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.price}}</p>
|
|
|
+ <p>{{__item.price}}</p>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <p>{{_item.remark}}</p>
|
|
|
+ <p>{{__item.remark}}</p>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
<tfoot>
|
|
|
<tr>
|
|
|
- <td class="amount-index" align="center">{{showTable.list.length + 1}}</td>
|
|
|
+ <td class="amount-index" align="center">{{item.msg.list.length + 1}}</td>
|
|
|
<td colspan="11"></td>
|
|
|
<td colspan="2">合计:</td>
|
|
|
- <td class="xt_total">{{showTable.foot.xt_total}}</td>
|
|
|
+ <td class="xt_total">{{Math.floor( item.msg.foot.xt_total* 100) / 100}}</td>
|
|
|
<td></td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
- <td colspan="12" class="remark" style="padding-left: 20px;">{{showTable.foot.remark}}</td>
|
|
|
+ <td colspan="12" class="remark" style="padding-left: 20px;">{{item.msg.foot.remark}}</td>
|
|
|
<td colspan="2">返点:</td>
|
|
|
- <td class="return">{{showTable.foot.return}}</td>
|
|
|
+ <td class="return">{{Math.floor( item.msg.foot.return* 100) / 100}}</td>
|
|
|
<td></td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
- <td colspan="12" class="remark1" style="padding-left: 20px;">{{showTable.foot.remark1}}</td>
|
|
|
+ <td colspan="12" class="remark1" style="padding-left: 20px;">{{item.msg.foot.remark1}}</td>
|
|
|
<td colspan="2">尾款:</td>
|
|
|
- <td class="end_price">{{showTable.foot.end_price}}</td>
|
|
|
+ <td class="end_price">{{Math.floor( item.msg.foot.end_price* 100) / 100}}</td>
|
|
|
<td></td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td colspan="16" style="padding-left: 20px;">
|
|
|
- <span class="amount_detail" style="height: 24px;">{{showTable.foot.amount_detail}}</span>
|
|
|
+ <span class="amount_detail" style="height: 24px;">{{item.msg.foot.amount_detail}}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
@@ -481,12 +486,13 @@
|
|
|
<td colspan="16" class="order_info" style="padding-left: 20px;">
|
|
|
<!-- 客户备注:<span
|
|
|
class="customer_remark">{{showTable.foot.customer_remark}}</span> -->
|
|
|
- 订货日期:<span class="crt_time">{{showTable.foot.crt_time}}</span>交货日期:<span
|
|
|
- class="end_time">{{showTable.foot.end_time}}</span>业务经理:<span class="saleman">{{showTable.foot.saleman}}</span>制单人:<span
|
|
|
- class="crt_id">{{showTable.foot.crt_id}}</span>审核:<span class="oa">{{showTable.foot.oa}}</span>客户确认:<span class="is_confirm">{{showTable.foot.is_confirm}}</span></td>
|
|
|
+ 订货日期:<span class="crt_time">{{item.msg.foot.crt_time}}</span>交货日期:<span
|
|
|
+ class="end_time">{{item.msg.foot.end_time}}</span>业务经理:<span class="saleman">{{item.msg.foot.saleman}}</span>制单人:<span
|
|
|
+ class="crt_id">{{item.msg.foot.crt_id}}</span>审核:<span class="oa">{{item.msg.foot.oa}}</span>客户确认:<span class="is_confirm">{{item.msg.foot.is_confirm}}</span></td>
|
|
|
</tr>
|
|
|
</tfoot>
|
|
|
</table>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -496,6 +502,7 @@ import { mapState } from "vuex";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ prints:[],
|
|
|
showTableContentStr:[],
|
|
|
showTable:{
|
|
|
list:[],
|
|
@@ -1161,6 +1168,7 @@ export default {
|
|
|
return result
|
|
|
},
|
|
|
PrintRow(){
|
|
|
+ this.prints = [];
|
|
|
this.printData.forEach(v=>{
|
|
|
this.axios({
|
|
|
method:'get',
|
|
@@ -1169,16 +1177,20 @@ export default {
|
|
|
...v
|
|
|
}
|
|
|
}).then(res=>{
|
|
|
- console.log(res)
|
|
|
this.showTableContentStr = res.msg.list
|
|
|
this.showTable = res.msg
|
|
|
this.newArr = this.chunk(this.showTableContentStr,15)
|
|
|
+ let printContent = {};
|
|
|
+ printContent.childList =JSON.parse(JSON.stringify(this.newArr)) ;//15一行
|
|
|
+ printContent.msg = JSON.parse(JSON.stringify(this.showTable));//表格所有信息,包括列表信息但没分割
|
|
|
+ this.prints.push(printContent)
|
|
|
});
|
|
|
- })
|
|
|
+ });
|
|
|
+
|
|
|
this.showPrint = true;
|
|
|
},
|
|
|
printOk(){
|
|
|
-
|
|
|
+ this.$print(this.$refs.print)
|
|
|
},
|
|
|
init(row) {
|
|
|
this.page_index = 1;
|
|
@@ -1287,7 +1299,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
openLower(row, title, url) {
|
|
|
- console.log("row :>> ", row);
|
|
|
if (!row) {
|
|
|
return this.$Message.warning("请至少选择一项");
|
|
|
}
|
|
@@ -1356,7 +1367,6 @@ export default {
|
|
|
e.map((v) => result.push(v.order_no));
|
|
|
this.selectIds = result;
|
|
|
this.printData = printData;
|
|
|
- console.log(this.printData);
|
|
|
},
|
|
|
delItems(row) {
|
|
|
this.confirmDelete({
|
|
@@ -1509,12 +1519,12 @@ export default {
|
|
|
overflow-x: auto;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+.table-title{font-size: 24px;font-family: Tahoma,Helvetica,Arial,'宋体',sans-serif;font-weight: 500;}
|
|
|
h1 {
|
|
|
text-align: center;
|
|
|
- font-size: 18px;
|
|
|
- margin-bottom: 10px;
|
|
|
- margin-top: 20px;
|
|
|
+ // font-size: 12px;
|
|
|
+ // margin-bottom: 10px;
|
|
|
+ // margin-top: 20px;
|
|
|
}
|
|
|
|
|
|
p {
|
|
@@ -1524,6 +1534,9 @@ export default {
|
|
|
table {
|
|
|
width: 100%;
|
|
|
border-collapse: collapse;
|
|
|
+ font-size:12px;
|
|
|
+ font-weight:100;
|
|
|
+ letter-spacing: 1px;
|
|
|
}
|
|
|
|
|
|
td {
|
|
@@ -1532,27 +1545,28 @@ export default {
|
|
|
}
|
|
|
|
|
|
.right-img1 {
|
|
|
- position: absolute;
|
|
|
- right: 0;
|
|
|
+
|
|
|
+
|
|
|
+ vertical-align: middle;
|
|
|
+
|
|
|
width: 150px;
|
|
|
- margin-bottom: 10px;
|
|
|
+ margin-left:5px;
|
|
|
height: 60px;
|
|
|
- top: 0;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.right-img2 {
|
|
|
- position: absolute;
|
|
|
- width: 150px;
|
|
|
+
|
|
|
right: 180px;
|
|
|
margin-bottom: 10px;
|
|
|
height: 60px;
|
|
|
- top: 0;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.table-header {
|
|
|
- position: relative;
|
|
|
- height: 76px;
|
|
|
- line-height: 76px;
|
|
|
+ position: relative;
|
|
|
+ height: 60px;
|
|
|
+ line-height: 60px;
|
|
|
}
|
|
|
|
|
|
.left-img {
|
|
@@ -1584,9 +1598,12 @@ export default {
|
|
|
padding: 15px;
|
|
|
}
|
|
|
.print-table{
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
display: none;
|
|
|
}
|
|
|
@media print {
|
|
|
+
|
|
|
button {
|
|
|
display: none;
|
|
|
}
|
|
@@ -1595,16 +1612,20 @@ export default {
|
|
|
width: 100%;
|
|
|
}
|
|
|
.print-cell{
|
|
|
+ page-break-after: always;
|
|
|
+ }
|
|
|
+ .print-cell{
|
|
|
color: black;
|
|
|
- margin:16mm 8mm;
|
|
|
width: 262mm;
|
|
|
- height: auto;
|
|
|
+ margin: 0 auto;
|
|
|
+ height:auto;
|
|
|
}
|
|
|
#show-table{
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
@page {
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</style>
|