Commit 4bc86437 authored by tanjunxin's avatar tanjunxin

fix: 1.领料申请打印优化; 2.生产报工增加工单数量字段

parent 24658682
......@@ -77,7 +77,8 @@
<el-table-column label="工作单元" width="120" align="center" prop="workunitName" />
<el-table-column label="外协单号" width="150" align="center" prop="assistProcessCode" />
<el-table-column label="生产工单编号" width="150" align="center" prop="workorderCode" />
<el-table-column label="任务数量" width="100" align="center" prop="woQuantity" />
<el-table-column label="任务数量" width="100" align="center" prop="quantity" />
<el-table-column label="工单数量" width="100" align="center" prop="woQuantity" />
<el-table-column label="报工数量" align="center" prop="feedbackTime" width="180">
<template slot-scope="scope">
<span>{{ getSumNumber(scope.row) }}</span>
......
......@@ -2,11 +2,11 @@
<div class="productOrderSpecification">
<div class="pageTop">
<div class="titles" style="padding-bottom: 30px;">领料单
<div v-if="Table.applyNo" class="barcode">
<div v-if="Table[0].applyNo" class="barcode">
<vue-barcode
:value="Table.applyNo"
:value="Table[0].applyNo"
margin-right="5"
:display-value="Table.applyNo"
:display-value="Table[0].applyNo"
font="bold"
margin-left="5"
text-margin="5"
......@@ -14,7 +14,7 @@
style="width:250px;"
width="2"
ean128="ean128"
:text="'领取单号:'+ Table.applyNo"
:text="'领取单号:'+ Table[0].applyNo"
height="45"
margin-top="10"
margin="10"
......@@ -24,12 +24,12 @@
</div>
</div>
<div class="titles text-left">
<div class="cdbh">领料部门:{{Table.workunitName}}</div>
<div class="cdbh">领料部门:{{Table[0].workunitName}}</div>
</div>
<div class="titles text-left">
<div class="cdbh">领取类型:{{Table.applyType}}</div>
<div class="cdbh">领取日期:{{Table.createTime}}</div>
<div class="cdbh" style="padding-left: 30px">列印时间:{{Table.printTime}}</div>
<div class="cdbh">领取类型:{{Table[0].applyType}}</div>
<div class="cdbh">领取日期:{{Table[0].createTime}}</div>
<div class="cdbh" style="padding-left: 30px">列印时间:{{Table[0].printTime}}</div>
</div>
</div>
<table border class="form-header font-size-16" style="table-layout: fixed;width: 100%;border:1px solid #000000;font-size:14px;line-height: 25px; margin: 8px 10px 5px 10px;">
......@@ -40,23 +40,23 @@
<!-- <td colspan="3" align="center">单位</td> -->
<td colspan="4" align="center">申请量</td>
</tr>
<tr height="20" v-for="(item,index) in Table.processes" :key="'processes' + index" class="color000">
<tr height="20" v-for="(item,index) in Table" :key="'processes' + index" class="color000">
<td colspan="3" align="center">{{item.serialNumber}}</td>
<td colspan="6" align="center">{{item.itemCode}}</td>
<td colspan="6" align="center">{{item.sapItemCode ? Number(item.sapItemCode) : ''}}</td>
<td colspan="11" align="center">{{item.itemName}}</td>
<!-- <td colspan="3" align="center">{{item.serialNumber}}</td> -->
<td colspan="4" align="center">{{item.applyNum}}</td>
</tr>
<tr height="20" class="color000">
<td colspan="9" align="center">生产单号<br/>共计:{{Table.processes.length}}份单</td>
<td colspan="9" align="center">生产单号<br/>共计:{{Table.length}}份单</td>
<td colspan="15" align="center">
{{Table.workorderCode}}
{{Table[0].workorderCode}}
</td>
</tr>
</table>
<div class="pageBottom">
<div>
领取人:{{ Table.createBy }}
领取人:{{ Table[0].createBy }}
</div>
</div>
</div>
......@@ -138,22 +138,56 @@ export default {
</script>
<style scoped lang="scss">
.productOrderSpecification{
position: relative;
width: 920px;
height: 600px;
padding: 0 49px;
padding-top:20px;
box-sizing: border-box;
@media print {
@page {
size: A4;
margin: 0;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
/* 将需要铺满A4纸的内容放在这里 */
.content {
width: 100%;
height: 100%;
padding: 0;
}
/* 表格边框 */
table {
border-collapse: collapse;
border: 1px solid #000;
}
/* 表格内容边框 */
td,
th {
border: 1px solid #000;
}
}
.font-family-song {
font-family: "宋体";
}
.pageTop{
.productOrderSpecification{
height: 100vh;
padding: 24px;
color: #000;
padding: 0px 10px;
.titles{
display: flex;
flex-direction: column;
// justify-content: center;
.pageTop {
padding-bottom: 8px;
box-sizing: border-box;
text-align: center;
font-size:22px;
position: relative;
.titles{
text-align: center;
font-size:22px;
position: relative;
.cdbh{
font-weight: 400;
font-size: 16px;
......@@ -181,22 +215,22 @@ export default {
margin:0 auto;
display: flex;
justify-content: space-between;
}
}
.pageBottom{
display: flex;
justify-content: flex-end;
width: 850px;
position: absolute;
bottom: 0px;
padding: 0px 49px;
color: #000;
div{
margin-left:100px;
min-width: 100px;
}
}
// .pageBottom{
// display: flex;
// justify-content: flex-end;
// width: 850px;
// position: absolute;
// bottom: 0px;
// padding: 0px 49px;
// color: #000;
// border: 2px solid #000;
// div{
// margin-left:100px;
// min-width: 100px;
// }
// }
[text-center]{
text-align: center;
}
......@@ -211,5 +245,6 @@ export default {
word-break:break-all
}
}
}
</style>
......@@ -498,19 +498,31 @@ export default {
return this.$message.warning('没有数据')
}
if(res.code === 200 && res.data) {
// res.data.forEach(element => {
// const item = this.dict.type.pro_requisition_type.find(v=> Number(v.value) === element.applyType)
// const applyType = item && item.label ? item.label : ''
// this.printTable.push({
// ...element,
// applyType,
// processes: [{
// serialNumber: element.serialNumber,
// itemCode: element.itemCode,
// itemName: element.itemName,
// applyNum: element.applyNum,
// }]
// })
// });
const temp = [];
res.data.forEach(element => {
const item = this.dict.type.pro_requisition_type.find(v=> Number(v.value) === element.applyType)
const applyType = item && item.label ? item.label : ''
this.printTable.push({
...element,
applyType,
processes: [{
serialNumber: element.serialNumber,
itemCode: element.itemCode,
itemName: element.itemName,
applyNum: element.applyNum,
}]
})
element.applyType = item && item.label ? item.label : '';
const index = temp.findIndex(ele => ele == element.applyNo);
if(index == -1) {
temp.push(element.applyNo);
this.printTable.push([element]);
} else {
this.printTable[index].push(element);
}
});
console.log("printTable", this.printTable)
this.$nextTick(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment