马远东 6 months ago
parent
commit
5214be13ec
  1. 131
      src/components/ArteryPrintTemplate/ArteryPrintTemplate.vue
  2. 13
      src/utils/print.js
  3. 2
      src/views/distribution/artery/VehicleArrivalManagement.vue
  4. 2
      src/views/distribution/artery/VehicleStowage.vue
  5. 2
      src/views/waybill/TemporaryStorageList.vue
  6. 2
      vite.config.js

131
src/components/ArteryPrintTemplate/ArteryPrintTemplate.vue

@ -1,132 +1,127 @@
<template>
<div>
<div class="VehicleStowageTable">
<table
border="1"
style="width: 100%; text-align: center; border-collapse: collapse; border-spacing: 0"
style="width: 100%; text-align: center; border-collapse: collapse; border-spacing: 0; border-top: 1px solid #000; border-right: 1px solid #000;"
>
<thead>
<tr>
<th colspan="4">
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" colspan="4">
<img style="height: 40px" src="../../../public/img/htlogo.png" alt="暂无图片" />
</th>
<th colspan="6" style="font-size: 20px"> 线 </th>
<th :colspan="6 + goodsTitleList.length + 1">
<th colspan="6" style="font-size: 20px; border-bottom: 1px solid #000; border-left: 1px solid #000;"> 线 </th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" :colspan="6 + goodsTitleList.length + 1">
<img id="imgcode" :src="renderInfo.carsNoBase64" />
<div>{{ renderInfo.carsNo }}</div>
</th>
</tr>
<tr>
<th colspan="4">始发站{{ renderInfo.startWarehouseName }}</th>
<th colspan="6">
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" colspan="4">始发站{{ renderInfo.startWarehouseName }}</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" colspan="6">
经停站{{
renderInfo.endWarehouseNames.slice(0, renderInfo.endWarehouseNames.length - 1)[0] ||
''
}}
</th>
<th :colspan="6 + goodsTitleList.length + 1">
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" :colspan="6 + goodsTitleList.length + 1">
目的站{{ renderInfo.endWarehouseNames.slice(-1)[0] }}
</th>
</tr>
<tr>
<th colspan="4">司机{{ renderInfo.assistantName || '' }}</th>
<th colspan="2">司机电话{{ renderInfo.assistantMobile || '' }}</th>
<th colspan="3">车牌号{{ renderInfo.carNumber || '' }}</th>
<th>卸车完成时间 {{ renderInfo.unloadDate || '年 月 日' }}</th>
<th :colspan="6 + goodsTitleList.length + 1">卸车人员签字</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" colspan="4">司机{{ renderInfo.assistantName || '' }}</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" colspan="2">司机电话{{ renderInfo.assistantMobile || '' }}</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" colspan="3">车牌号{{ renderInfo.carNumber || '' }}</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;">卸车完成时间 {{ renderInfo.unloadDate || '年 月 日' }}</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" :colspan="6 + goodsTitleList.length + 1">卸车人员签字</th>
</tr>
<tr>
<th rowspan="2">序号</th>
<th rowspan="2">发货单位</th>
<th rowspan="2">开单时间</th>
<th rowspan="2">始发仓</th>
<th rowspan="2">目的仓</th>
<th rowspan="2">收货单位</th>
<th rowspan="2">收货人</th>
<th rowspan="2">收货电话</th>
<th rowspan="2">物流单号</th>
<th rowspan="2">合同号</th>
<th rowspan="2">计划件数</th>
<th rowspan="2">货位</th>
<th :colspan="goodsTitleList.length + 1">装车产品明细</th>
<!-- <th rowspan="2">合计件数</th> -->
<th rowspan="2">卸车件数</th>
<th rowspan="2">卸车网点</th>
<th rowspan="2">卸车时间</th>
<th rowspan="2">异常备注</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">序号</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">发货单位</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">开单时间</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">始发仓</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">目的仓</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">收货单位</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">收货人</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">收货电话</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">物流单号</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">合同号</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">计划件数</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">货位</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" :colspan="goodsTitleList.length + 1">装车产品明细</th>
<!-- <th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">合计件数</th> -->
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">卸车件数</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">卸车网点</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">卸车时间</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" rowspan="2">异常备注</th>
</tr>
<tr>
<th v-for="item in goodsTitleList" :key="item">{{ item }}</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;" v-for="item in goodsTitleList" :key="item">{{ item }}</th>
<th>小计</th>
<th style="border-bottom: 1px solid #000; border-left: 1px solid #000;">小计</th>
</tr>
</thead>
<tbody>
<!-- -->
<tr v-for="(value, index) in renderInfo.mainList" style="word-break: break-all">
<td>{{ index + 1 }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;">{{ index + 1 }}</td>
<!-- 发货单位 -->
<td contenteditable>{{ value.shipper || '' }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.shipper || '' }}</td>
<!-- 开单时间 -->
<td contenteditable>{{ value.createTime || '' }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.createTime || '' }}</td>
<!-- 始发仓 -->
<td contenteditable>{{ value.departureWarehouseName || '' }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.departureWarehouseName || '' }}</td>
<!-- 目的仓 -->
<td contenteditable>{{ value.destinationWarehouseName || '' }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.destinationWarehouseName || '' }}</td>
<!-- 收货单位 -->
<td contenteditable>{{ value.consignee }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.consignee }}</td>
<!-- 收货人 -->
<td contenteditable>{{ value.consigneeName }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.consigneeName }}</td>
<!-- 收货电话 -->
<td contenteditable>{{ value.consigneeMobile }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.consigneeMobile }}</td>
<!-- 物流单号 -->
<td>{{ value.waybillNo }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;">{{ value.waybillNo }}</td>
<!-- 合同号 -->
<td>{{ value.orderCode }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;">{{ value.orderCode }}</td>
<!-- 计划件数 -->
<td contenteditable>{{ value.planNum }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.planNum }}</td>
<!-- 货位 -->
<td></td>
<td contenteditable v-for="item in goodsTitleList">
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;"></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable v-for="item in goodsTitleList">
{{ (value.goodsList.find(val => val.goodsName === item) || {}).num || '' }}
</td>
<!-- 小计 -->
<td contenteditable>{{ value.smallTotal }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.smallTotal }}</td>
<!-- 合计件数 -->
<!-- <td contenteditable>{{ value.smallTotal }}</td> -->
<!-- <td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.smallTotal }}</td> -->
<!-- 卸车件数 -->
<td contenteditable>{{ value.unloadNum }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ value.unloadNum }}</td>
<!-- 卸车网点 -->
<td contenteditable></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable></td>
<!-- 卸车时间 -->
<td contenteditable></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable></td>
<!-- 异常备注 -->
<td contenteditable></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable></td>
</tr>
<!-- 合计行 -->
<tr>
<th colspan="10">合计</th>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" colspan="10">合计</td>
<!-- 合计 -- 计划件数 -->
<td contenteditable>{{ totalPlanNum }}</td>
<td></td>
<td contenteditable v-for="item in goodsTitleList"></td>
<td contenteditable>{{ totalNum }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ totalPlanNum }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;"></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable v-for="item in goodsTitleList"></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ totalNum }}</td>
<!-- 合计件数 -->
<!-- <td contenteditable>{{ totalNum }}</td> -->
<!-- <td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ totalNum }}</td> -->
<!-- 卸车件数 -->
<td contenteditable>{{ totalUnLoadNum }}</td>
<td></td>
<td></td>
<td></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" contenteditable>{{ totalUnLoadNum }}</td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;"></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;"></td>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;"></td>
</tr>
<tr>
<td colspan="17" contenteditable>
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000;" colspan="18" contenteditable>
<span style="display: inline-block; margin-right: 20px; min-width: 200px;"> 投诉电话4000184668 </span>
<span style="display: inline-block; margin-right: 20px; min-width: 200px;"> 营业部电话 </span>
<span style="display: inline-block; margin-right: 20px; min-width: 200px;"> 系统单调度 </span>
</td>
</tr>
</tbody>
</table>
</div>
</template>

13
src/utils/print.js

@ -8,7 +8,9 @@ const handleTitlePrint = (LODOP, templateData) => {
LODOP.SET_PRINT_STYLEA(0, 'TextNeatRow', true); //允许标点溢出,且英文单词拆开
// LODOP.SET_PRINT_STYLE('FontColor', '#000000');
// // 设置打印整宽且不变形
LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', '95%');
LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', '100%');
/**设定打印的带线啊哦 */
LODOP.SET_PRINT_PAGESIZE(1,970, 720, "");
// // 设置打印后自动关闭
LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1);
// // data就是一段html文本
@ -22,12 +24,15 @@ const handleDeliveryPrint = (LODOP, templateData) => {
LODOP.SET_PRINT_STYLEA(0, 'TextNeatRow', true); //允许标点溢出,且英文单词拆开
// LODOP.SET_PRINT_STYLE('FontColor', '#000000');
// // 设置打印整宽且不变形
LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', '98%');
LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', '100%');
LODOP.SET_PRINT_PAGESIZE(1,2160, 1400, "");
// // 设置打印后自动关闭
LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1);
// // data就是一段html文本
LODOP.ADD_PRINT_HTM('0', '0%', '100%%', '100%', templateData);
// // data就是一段html文本
LODOP.ADD_PRINT_HTM('0', '0%', '100%', '100%', templateData);
};
/**

2
src/views/distribution/artery/VehicleArrivalManagement.vue

@ -1569,7 +1569,7 @@ const handleDirectGoMarketDetails = ({ row }) => {
/** 配载打印 */
const handlePrint = () => {
const nodeList = document.querySelectorAll('.listOfLoadedWagonsPopUp table');
const nodeList = document.querySelectorAll('.listOfLoadedWagonsPopUp .VehicleStowageTable');
print(nodeList);
};

2
src/views/distribution/artery/VehicleStowage.vue

@ -1485,7 +1485,7 @@ const handleShowListOfLoadedWagons = async () => {
/** 配载打印 */
const handlePrint = () => {
const nodeList = document.querySelectorAll('.listOfLoadedWagonsPopUp table');
console.log(nodeList, 123)
print(nodeList);
};

2
src/views/waybill/TemporaryStorageList.vue

@ -541,7 +541,7 @@ import {
onActivated,
onDeactivated,
} from 'vue';
import functions from '@/utils/functions.js';
import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
/** 获取字典 */

2
vite.config.js

@ -40,7 +40,7 @@ export default ({ mode, command }) => {
// target: 'http://192.168.3.16:13000',
// target: 'http://192.168.3.73:13000', //
// target: 'http://h5uapi.huitongys.com',
target: 'http://test.api.huo5u.com',
// target: 'http://test.api.huo5u.com',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
},

Loading…
Cancel
Save