From 2c25d4e4112fce9b00ec8ffefde6461a8b193d8f Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期五, 17 十一月 2023 18:10:50 +0800 Subject: [PATCH] modified: src/views/quality/finishedProductInspection/finishedProducter-print.vue modified: src/views/quality/finishedProductInspection/index.vue --- src/views/quality/finishedProductInspection/finishedProducter-print.vue | 58 +++++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 39 insertions(+), 19 deletions(-) diff --git a/src/views/quality/finishedProductInspection/finishedProducter-print.vue b/src/views/quality/finishedProductInspection/finishedProducter-print.vue index 810b8d0..9690378 100644 --- a/src/views/quality/finishedProductInspection/finishedProducter-print.vue +++ b/src/views/quality/finishedProductInspection/finishedProducter-print.vue @@ -1,5 +1,5 @@ <template> - <div id="20230721_24921" align=center x:publishsource="Excel" style="margin-top: 60pt;margin-left: 20pt;"> + <div id="20230721_24921" align=center x:publishsource="Excel" style="margin-top: 65pt;margin-left: 10pt;"> <table border=0 cellpadding=0 cellspacing=0 width=1194 style='border-collapse:collapse;table-layout:fixed;width:629pt'> <tr class=xl6524921 height=20 style='mso-height-source:userset;height:30.0pt'> <td colspan=3 rowspan=2 height=40 width=122 style='width:150pt;border: 1pt solid windowtext'> @@ -77,7 +77,7 @@ <td colspan=1 class=xl6624921 style='border-right:.5pt solid black;border-left:none'> 鏍囧噯鍊� </td> - <td colspan=1 v-for="a in 9" class=xl6624921 style='border-right:.5pt solid black; border-left:none'> + <td colspan=1 v-for="a in columnLength" class=xl6624921 style='border-right:.5pt solid black; border-left:none'> {{a>9?item:'0'+a}} </td> <td colspan=2 class=xl6624921 style='border-right:.5pt solid black;border-left:none'> @@ -89,7 +89,7 @@ <tbody v-for="(item,index) in prjdata" :key="index"> <tr class=xl6524921 height=53 style='mso-height-source:userset;height:40.05pt'> - <td rowspan=16 height=53 class=xl7624921 style='border-right:.5pt solid black; height:40.05pt'> + <td :rowspan="item.children.length" height=53 class=xl7624921 style='border-right:.5pt solid black; height:40.05pt'> <p > <span style=" writing-mode: vertical-rl;font-size: 26pt;">{{item.father}}</span> </p> @@ -146,7 +146,8 @@ <td width=235 style='width:176pt'></td> </tr> </table> - <div> + <!-- <div v-for="items in prjdata"> + <div v-for="aa in items.length"> --> <template> <div style="margin-top: 100pt;width: 75%;"> <div class="head" id="head"> @@ -372,9 +373,9 @@ <div> <table border="2px" style="width: 800px;height: 100px;margin-top: 10px;"> <tr style="height: 80px;"> - <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">娴嬭瘯鍓嶇収鐗�</span></td> - <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">娴嬭瘯鍓嶇収鐗�</span></td> - <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">娴嬭瘯鍓嶇収鐗�</span></td> + <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">娴嬭瘯椤圭洰</span></td> + <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">鏍峰搧鏁伴噺</span></td> + <td class="x1111113"><span style="font-size 40pt;margin-left: 80px;font-family:榛戜綋">娴嬭瘯缁撴灉</span></td> </tr> <tr style="height: 100px;"> <td></td> @@ -474,8 +475,9 @@ </span></p> </div> </template> - </div> - </div> + <!-- </div> + </div> --> +</div> </template> <script> @@ -505,6 +507,7 @@ quantity:null, username:null, iname:null, + columnLength: 9, } }, filters:{ @@ -565,28 +568,30 @@ required: '', iunit: '', itype: '', - testValueList: new Array(9) + testValueList: new Array(this.columnLength) } - if(list && list.length<10){ + let rowNum = 15 + let columnNum = this.columnLength + if(list && list.length<2){ list.forEach(item=>{ - if(item.children && item.children.length < 7){ - let size = 15 - item.children.length + if(item.children && item.children.length < rowNum){ + rowNum = 15 - item.children.length for(let j=0;j<item.children.length;j++){ let arr = [] if(item.children[j].inspectionValue){ arr = item.children[j].inspectionValue.split(",") } item.children[j].testValueList = arr - if(item.children[0].testValueList.length<12){ - let num = 9 - item.children[j].testValueList.length + if(item.children[j].testValueList.length<columnNum){ + let num = columnNum - item.children[j].testValueList.length for(let i=0;i<num;i++){ item.children[j].testValueList.push("") } } } - for(let i=0;i< size;i++){ + for(let i=0;i< rowNum;i++){ item.children.push(data) - item.father + // item.father } } }) @@ -595,15 +600,30 @@ list.forEach(item=>{ if(item.children){ size+=item.children.length + item.children.forEach(obj=>{ + if(obj.inspectionValue){ + let testValueList = obj.inspectionValue.split(",") + obj.testValueList = testValueList + if(testValueList.length < columnNum){ + let len = columnNum-testValueList.length + for(var i=0;i<len;i++){ + obj.testValueList.push("") + } + } + }else{ + obj.testValueList = new Array(12) + } + }) } }) - if(size<15){ - let num = 15 - size + if(size < rowNum){ + let num = rowNum - size for(let i=0;i<num;i++){ list[list.length-1].children.push(data) } } } + this.prjdata = list } }, watch:{ -- Gitblit v1.9.3