|
|
@@ -1,226 +1,179 @@
|
|
|
<template>
|
|
|
- <ele-modal
|
|
|
- title="出库单"
|
|
|
- :visible.sync="QRvisible"
|
|
|
- v-if="QRvisible"
|
|
|
- width="90%"
|
|
|
- >
|
|
|
- <div
|
|
|
- id="printSection"
|
|
|
- style="
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- flex-direction: column;
|
|
|
- "
|
|
|
- >
|
|
|
- <div
|
|
|
- style="
|
|
|
- position: relative;
|
|
|
- width: 100%;
|
|
|
- height: 100px;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- "
|
|
|
- >
|
|
|
- <!-- <img
|
|
|
- v-if="groupName.includes('宝盛')"
|
|
|
- style="width: 80px; height: 80px; position: absolute; left: 20px"
|
|
|
- src="@/assets/bslogo.png"
|
|
|
- alt=""
|
|
|
- /> -->
|
|
|
- <div
|
|
|
- style="
|
|
|
- font-size: 20px;
|
|
|
- font-weight: 800;
|
|
|
- text-align: center;
|
|
|
- width: 100%;
|
|
|
- "
|
|
|
- >{{ groupName || '长沙宝盛汽车配件有限公司' }}</div
|
|
|
- >
|
|
|
- <div
|
|
|
- style="
|
|
|
- font-size: 18px;
|
|
|
- font-weight: 800;
|
|
|
- text-align: center;
|
|
|
- width: 100%;
|
|
|
- "
|
|
|
- >送货单</div
|
|
|
- >
|
|
|
- </div>
|
|
|
- <div
|
|
|
- style="
|
|
|
- width: 100%;
|
|
|
- font-size: 12px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- margin-bottom: 10px;
|
|
|
- "
|
|
|
- >
|
|
|
- <span style="width: 40%">客户名称:{{ formData.contactName }}</span>
|
|
|
- <span style="width: 40%"
|
|
|
- >发货单号:{{ formData.printNo || formData.docNo }}</span
|
|
|
- >
|
|
|
+ <el-dialog
|
|
|
+ title="送货单详情"
|
|
|
+ :visible.sync="visible"
|
|
|
+ center
|
|
|
+ append-to-body
|
|
|
+ width="70%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+
|
|
|
+>
|
|
|
+
|
|
|
+ <div id="printSection">
|
|
|
+ <div style="text-align: center; padding-bottom: 20px;">
|
|
|
+ <h3 style="margin: 0; font-size: 20px; font-weight: 800;">送货单</h3>
|
|
|
</div>
|
|
|
- <div
|
|
|
- style="
|
|
|
- width: 100%;
|
|
|
- font-size: 12px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- margin-bottom: 10px;
|
|
|
- "
|
|
|
- >
|
|
|
- <span style="width: 40%">发货日期:{{ formData.createTime }}</span>
|
|
|
- <span style="width: 40%"
|
|
|
- >联系人:{{ formData.linkName }}
|
|
|
|
|
|
- 联系电话:{{ formData.linkPhone }}
|
|
|
- </span>
|
|
|
- <span> 车牌号:{{ formData.carNo }} </span>
|
|
|
+ <div style="margin-bottom: 15px; width: 100%;">
|
|
|
+ <div style="display: flex; margin-bottom: 8px; width: 100%;">
|
|
|
+ <div style="flex: 1; text-align: left;">客户名称:{{ infoData.customerName || '' }}</div>
|
|
|
+ <div style="flex: 1; text-align: left;">发货单号:{{ infoData.deliveryNumber || '' }}</div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; margin-bottom: 8px;">
|
|
|
+ <div style="flex: 1; text-align: left;">发货日期:{{ infoData.deliveryDate || '' }}</div>
|
|
|
+ <div style="flex: 1; text-align: left;">联系人:{{ infoData.contactPerson || '' }}</div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex;">
|
|
|
+ <div style="flex: 1; text-align: left;">联系电话:{{ infoData.contactPhone || '' }}</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <table
|
|
|
- cellspacing="0"
|
|
|
- border
|
|
|
- style="
|
|
|
- width: 100%;
|
|
|
- table-layout: fixed;
|
|
|
- word-break: break-all;
|
|
|
- word-wrap: break-word;
|
|
|
- font-size: 12px;
|
|
|
- "
|
|
|
- >
|
|
|
+
|
|
|
+ <table style="width: 100%; border-collapse: collapse; margin-bottom: 20px;">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th style="border: 1px solid #000; padding: 8px; text-align: center;" width="50px;">序号</th>
|
|
|
+ <th style="border: 1px solid #000; padding: 8px; text-align: center;">型号</th>
|
|
|
+ <th style="border: 1px solid #000; padding: 8px; text-align: center; width: 160px;">零件名</th>
|
|
|
+ <th style="border: 1px solid #000; padding: 8px; text-align: center;">单位</th>
|
|
|
+ <th style="border: 1px solid #000; padding: 8px; text-align: center;">送货数量</th>
|
|
|
+ <th style="border: 1px solid #000; padding: 8px; text-align: center;">验收数量</th>
|
|
|
+ <th style="border: 1px solid #000; padding: 8px; text-align: center;">备注</th>
|
|
|
+ <th style="border: 1px solid #000; padding: 8px; text-align: center;">订单号</th>
|
|
|
+ <th style="border: 1px solid #000; padding: 8px; text-align: center;">加工工艺</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
<tbody>
|
|
|
- <tr align="center">
|
|
|
- <td style="padding: 5px; width: 35px"> 序号 </td>
|
|
|
- <td style="padding: 5px"> 编码 </td>
|
|
|
- <td style="padding: 5px"> 零件名 </td>
|
|
|
- <td style="padding: 5px; width: 50px"> 单位</td>
|
|
|
- <td style="padding: 5px"> 送货数量</td>
|
|
|
- <td style="padding: 5px"> 验收数量</td>
|
|
|
- <td style="padding: 5px"> 备注</td>
|
|
|
- <td style="padding: 5px"> 订单号</td>
|
|
|
- <td style="padding: 5px"> 加工工艺</td>
|
|
|
+ <tr v-for="(item, index) in detailList" :key="index">
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ index + 1 }}</td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.categoryModel || '' }}</td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.categoryName || '' }}</td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.measureUnit || '' }}</td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.measureQuantity || '' }}</td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.measureQuantity || '' }}</td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.remark || '' }}</td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.orderNumber || '' }}</td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ item.processingTechnology || '' }}</td>
|
|
|
</tr>
|
|
|
-
|
|
|
- <tr align="center" v-for="(item, index) in formData.productList">
|
|
|
- <td style="padding: 5px"> {{ index + 1 }} </td>
|
|
|
- <td style="padding: 5px">
|
|
|
- {{ item.productCode }}
|
|
|
- </td>
|
|
|
- <td style="padding: 5px"> {{ item.productName }} </td>
|
|
|
- <td style="padding: 5px"> {{ item.measuringUnit }}</td>
|
|
|
- <td style="padding: 5px"> {{ item.totalCount }}</td>
|
|
|
- <td style="padding: 5px"> {{ item.totalCount }}</td>
|
|
|
- <td style="padding: 5px"> </td>
|
|
|
- <td style="padding: 5px">{{ item.orderNo }} </td>
|
|
|
- <td style="padding: 5px"> </td>
|
|
|
+ <tr style="height: 40px;">
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;"></td>
|
|
|
+ <td colspan="2" style="border: 1px solid #000; padding: 8px; text-align: center;">合计</td>
|
|
|
+ <!-- <td style="border: 1px solid #000; padding: 8px; text-align: center;"></td> -->
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;"></td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ detailList.reduce((total, item) => total + Number(item.measureQuantity || 0), 0) || ''}}</td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ detailList.reduce((total, item) => total + Number(item.measureQuantity || 0), 0) || ''}}</td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;"></td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;"></td>
|
|
|
+ <td style="border: 1px solid #000; padding: 8px; text-align: center;"></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
- <div
|
|
|
- style="
|
|
|
- width: 100%;
|
|
|
- font-size: 12px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- margin-top: 10px;
|
|
|
- "
|
|
|
- >
|
|
|
- <div style="flex: 1">
|
|
|
- <div>发货人:</div>
|
|
|
- </div>
|
|
|
- <div style="flex: 1">
|
|
|
- <div>送货人:</div>
|
|
|
- </div>
|
|
|
- <div style="flex: 1"> 收货人: </div>
|
|
|
- <div style="flex: 1"> 托盘:{{ formData.trayNum }} </div>
|
|
|
-
|
|
|
+
|
|
|
+ <div style="display: flex; margin-top: 20px; width: 100%;">
|
|
|
+ <div style="flex: 1;">发货人:{{ infoData.deliverer || '' }}</div>
|
|
|
+ <div style="flex: 1;">送货人:{{ infoData.carrier || '' }}</div>
|
|
|
+ <div style="flex: 1;">收货人:{{ infoData.receiver || '' }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div slot="footer">
|
|
|
- <el-button @click="print">打印预览</el-button>
|
|
|
- <el-button @click="close">关闭</el-button>
|
|
|
+ <div
|
|
|
+ slot="footer"
|
|
|
+ style="text-align: right"
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="confirm">打印预览</el-button>
|
|
|
+ <el-button @click="cancel">返回</el-button>
|
|
|
</div>
|
|
|
- </ele-modal>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- // import { getSendSaleOrderrecordDetailSplit } from '@/api/saleManage/saleordersendrecord';
|
|
|
- import { mapGetters } from 'vuex';
|
|
|
- export default {
|
|
|
- name: 'print',
|
|
|
- computed: {
|
|
|
- ...mapGetters(['user'])
|
|
|
+import storageApi from '@/api/warehouseManagement/index.js';
|
|
|
+export default {
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ visible: false,
|
|
|
+ row: {
|
|
|
+ customerName: '',
|
|
|
+ contactPerson: '',
|
|
|
+ contactPhone: '',
|
|
|
+ items: [{
|
|
|
+ model: '',
|
|
|
+ partName: '',
|
|
|
+ unit: '',
|
|
|
+ deliveryQuantity: '',
|
|
|
+ receivedQuantity: '',
|
|
|
+ remark: '',
|
|
|
+ orderNumber: '',
|
|
|
+ processingTechnology: '',
|
|
|
+ }],
|
|
|
+ deliverer: '',
|
|
|
+ carrier: '',
|
|
|
+ receiver: '',
|
|
|
+ },
|
|
|
+ detailList: [],
|
|
|
+ infoData: {},
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async open (row) {
|
|
|
+ console.log('row', row)
|
|
|
+ this.row = row;
|
|
|
+ this.getData();
|
|
|
+ this.visible = true;
|
|
|
},
|
|
|
- props: {
|
|
|
- groupName: ''
|
|
|
+ async getData() {
|
|
|
+ const res = await storageApi.getAllotDetailList({
|
|
|
+ applyId: this.row.id
|
|
|
+ });
|
|
|
+ const data = await storageApi.getAllotDetail(this.row.id);
|
|
|
+ this.infoData = data;
|
|
|
+ if (this.infoData.type == 1) {
|
|
|
+ // 库内调拨
|
|
|
+ /* this.infoData.auditStatus = 2; */
|
|
|
+ this.infoData.auditStatus = data.status;
|
|
|
+ } else {
|
|
|
+ // 库外调拨
|
|
|
+ this.infoData.auditStatus = data.status;
|
|
|
+ }
|
|
|
+ this.detailList = res.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ categoryCode: this.infoData.categoryCode,
|
|
|
+ categoryName: this.infoData.categoryName,
|
|
|
+ brandNum: this.infoData.brandNum,
|
|
|
+ categoryModel: this.infoData.model,
|
|
|
+ specification: this.infoData.specification
|
|
|
+ };
|
|
|
+ });
|
|
|
+ console.log('infoData', this.infoData)
|
|
|
+ console.log('detailList', this.detailList)
|
|
|
},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- checked: '',
|
|
|
- QRvisible: false,
|
|
|
- isPrintPrice: false,
|
|
|
- formData: {},
|
|
|
- outBound: {}
|
|
|
+ confirm () {
|
|
|
+ const printSection = document.getElementById('printSection');
|
|
|
+ // 创建打印任务
|
|
|
+ const printWindow = window.open('', '_blank');
|
|
|
+ printWindow.document.open();
|
|
|
+ printWindow.document.write('<html><head><title>打印预览</title>');
|
|
|
+ printWindow.document.write(
|
|
|
+ '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
|
|
|
+ );
|
|
|
+ printWindow.document.write('</head><body>');
|
|
|
+ printWindow.document.write(printSection.innerHTML);
|
|
|
+ printWindow.document.write('</body></html>');
|
|
|
+ printWindow.document.close();
|
|
|
+ printWindow.onload = function () {
|
|
|
+ printWindow.print();
|
|
|
};
|
|
|
},
|
|
|
-
|
|
|
- methods: {
|
|
|
- async open(id) {
|
|
|
- // this.formData = await getSendSaleOrderrecordDetailSplit(id);
|
|
|
- // this.QRvisible = true;
|
|
|
- // let dataArray = await getInfoBySourceBizNoAll(this.formData.docNo);
|
|
|
- // this.outBound = JSON.parse(JSON.stringify(dataArray[0]));
|
|
|
- // this.outBound['outInDetailRecordRequestList'] = [];
|
|
|
-
|
|
|
- // dataArray.forEach((item) => {
|
|
|
- // item.outInDetailList.forEach((val) => {
|
|
|
- // val['orderNo'] = item.orderNo;
|
|
|
- // if (val.outInDetailRecordRequestList.length) {
|
|
|
- // val.outInDetailRecordRequestList.forEach((j) => {
|
|
|
- // j['categoryName'] = val.categoryName;
|
|
|
- // j['categoryModel'] = val.categoryModel;
|
|
|
- // j['specification'] = val.specification;
|
|
|
- // j['categoryCode'] = val.categoryCode;
|
|
|
- // j['orderNo'] = item.orderNo;
|
|
|
-
|
|
|
- // });
|
|
|
- // this.outBound['outInDetailRecordRequestList'].push(
|
|
|
- // ...val.outInDetailRecordRequestList
|
|
|
- // );
|
|
|
- // } else {
|
|
|
- // this.outBound['outInDetailRecordRequestList'].push(val);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // });
|
|
|
- //包装维度
|
|
|
- },
|
|
|
- close() {
|
|
|
- this.QRvisible = false;
|
|
|
- },
|
|
|
-
|
|
|
- print() {
|
|
|
- const printSection = document.getElementById('printSection');
|
|
|
- // 创建打印任务
|
|
|
- const printWindow = window.open('', '_blank');
|
|
|
- printWindow.document.open();
|
|
|
- printWindow.document.write('<html><head><title>打印预览</title>');
|
|
|
- printWindow.document.write(
|
|
|
- '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
|
|
|
- );
|
|
|
- printWindow.document.write('</head><body>');
|
|
|
- printWindow.document.write(printSection.innerHTML);
|
|
|
- printWindow.document.write('</body></html>');
|
|
|
- printWindow.document.close();
|
|
|
- printWindow.onload = function () {
|
|
|
- printWindow.print();
|
|
|
- };
|
|
|
- }
|
|
|
+ cancel () {
|
|
|
+ this.visible = false
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss"></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+
|
|
|
+</style>
|