From 8f1df61c8902a35e41205d7cbd9d0763619e6d46 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 22 八月 2025 16:36:47 +0800 Subject: [PATCH] mdc首页设备管理部分功能调整 --- src/views/eam/maintenance/modules/EamThirdMaintenanceOrderBatchPrintModal.vue | 223 ++++++++++++++++++++++++++++++------------------------- 1 files changed, 120 insertions(+), 103 deletions(-) diff --git a/src/views/eam/maintenance/modules/EamThirdMaintenanceOrderBatchPrintModal.vue b/src/views/eam/maintenance/modules/EamThirdMaintenanceOrderBatchPrintModal.vue index 0b3c0c8..cc45411 100644 --- a/src/views/eam/maintenance/modules/EamThirdMaintenanceOrderBatchPrintModal.vue +++ b/src/views/eam/maintenance/modules/EamThirdMaintenanceOrderBatchPrintModal.vue @@ -11,58 +11,64 @@ <table class="import-table" :id="'鍔犲伐璁惧涓夌骇淇濆吇楠屾敹鍗�-'+dataItem.equipmentCode"> <thead> <tr> - <td colspan="18" style="border: none;text-align: right">{{dataItem.hfCodeB}}</td> + <td colspan="5" style="border: none"> + <div style="text-align: right">{{dataItem.hfCodeB}}</div> + </td> </tr> </thead> <tbody> <tr style="height: 48px;"> - <th colspan="18" style="border: none;font-size: 20px">鍔犲伐璁惧涓夌骇淇濆吇楠屾敹鍗�</th> + <th colspan="5" style="border: none;font-size: 20px">鍔犲伐璁惧涓夌骇淇濆吇楠屾敹鍗�</th> </tr> <tr> - <td colspan="3">璁惧绫诲埆</td> - <td colspan="6">{{dataItem.equipmentCategory_dictText}}</td> - - <td colspan="3">璁惧缂栧彿</td> - <td colspan="6">{{dataItem.equipmentCode}}</td> + <td>璁惧绫诲埆</td> + <td>{{dataItem.equipmentCategory_dictText}}</td> + <td>璁惧缂栧彿</td> + <td colspan="2">{{dataItem.equipmentCode}}</td> </tr> <tr> - <td colspan="3">璁惧鍚嶇О</td> - <td colspan="6">{{dataItem.equipmentName}}</td> - - <td colspan="3">璁惧鍨嬪彿</td> - <td colspan="6">{{dataItem.equipmentModel}}</td> + <td>璁惧鍚嶇О</td> + <td>{{dataItem.equipmentName}}</td> + <td>璁惧鍨嬪彿</td> + <td colspan="2">{{dataItem.equipmentModel}}</td> </tr> <tr> - <td colspan="3" rowspan="2">淇濆吇閮ㄤ綅</td> - <td colspan="6" rowspan="2">淇濆吇鍐呭</td> - <td colspan="3" rowspan="2">楠屾敹鏍囧噯</td> - <td colspan="6">楠屾敹娆℃暟</td> + <td rowspan="2">淇濆吇閮ㄤ綅</td> + <td rowspan="2">淇濆吇鍐呭</td> + <td rowspan="2">楠屾敹鏍囧噯</td> + <td colspan="2">楠屾敹娆℃暟</td> </tr> <tr> - <td colspan="3">绗竴娆℃</td> - <td colspan="3">绗簩娆℃</td> + <td>绗竴娆℃</td> + <td>绗簩娆℃</td> </tr> <tr v-for="item in dataItem.eamThirdMaintenanceOrderDetailList"> - <td colspan="3" :rowSpan="item.rowSpan" v-show="!item.rowSpanDis">{{item.itemPart}}</td> - <td colspan="6">{{item.itemName}}</td> - <td colspan="3">{{item.itemDemand}}</td> - <td colspan="3">{{+item.firstInspectResult?'鈭�':'脳'}}</td> - <td colspan="3">{{item.secondInspectResult}}</td> + <td :rowSpan="item.rowSpan" v-if="!item.rowSpanDis">{{item.itemPart}}</td> + <td>{{item.itemName}}</td> + <td>{{item.itemDemand}}</td> + <td>{{+item.firstInspectResult?'鈭�':'脳'}}</td> + <td>{{item.secondInspectResult}}</td> + </tr> + + <tr> + <td colspan="3" style="border: none"> + <div style="text-align: left">妫�鏌ヤ汉鍛橈細{{dataItem.inspectorSignature_dictText}}</div> + </td> + <td colspan="2" style="border: none"> + <div style="text-align:right">妫�鏌ユ棩鏈燂細{{dataItem.inspectTime}}</div> + </td> </tr> </tbody> </table> - - <div style="display:flex;justify-content: space-between; margin-top: 5px;padding: 0 20px"> - <div>妫�鏌ヤ汉鍛橈細{{dataItem.inspectorSignature_dictText}}</div> - <div>妫�鏌ユ棩鏈燂細{{dataItem.inspectTime}}</div> - </div> </template> + + <br v-if="tableType===3"/> <template v-if="tableType!==1"> <div style="page-break-before:always"></div> @@ -70,86 +76,106 @@ <table class="import-table" :id="'鍔犲伐璁惧涓夌骇淇濆吇瀹屽伐绉讳氦鍗�-'+dataItem.equipmentCode"> <thead> <tr> - <td colspan="18" style="border: none;text-align: right">{{dataItem.hfCodeA}}</td> + <td colspan="12" style="border-color: transparent"> + <div style="text-align: right">{{dataItem.hfCodeA}}</div> + </td> </tr> </thead> <tbody> <tr style="height: 48px;"> - <th colspan="18" style="border: none;font-size: 20px">鍔犲伐璁惧涓夌骇淇濆吇瀹屽伐绉讳氦鍗�</th> + <th colspan="12" style="border-color: transparent transparent #000 transparent;font-size: 20px;"> + 鍔犲伐璁惧涓夌骇淇濆吇瀹屽伐绉讳氦鍗� + </th> </tr> <tr> - <td colspan="3">璁惧鍚嶇О</td> - <td colspan="3">{{dataItem.equipmentName}}</td> - <td colspan="3">璁惧鍨嬪彿</td> - <td colspan="3">{{dataItem.equipmentModel}}</td> - <td colspan="3">缁熶竴缂栧彿</td> - <td colspan="3">{{dataItem.equipmentCode}}</td> + <td colspan="2">璁惧鍚嶇О</td> + <td colspan="2">{{dataItem.equipmentName}}</td> + <td colspan="2">璁惧鍨嬪彿</td> + <td colspan="2">{{dataItem.equipmentModel}}</td> + <td colspan="2">缁熶竴缂栧彿</td> + <td colspan="2">{{dataItem.equipmentCode}}</td> </tr> <tr> - <td colspan="3">浣跨敤鍗曚綅</td> - <td colspan="3">{{dataItem.factoryName}}</td> - <td colspan="3">淇濆吇鏃ユ湡</td> - <td colspan="9">{{dataItem.maintenanceDateFormatted}}</td> + <td colspan="2">浣跨敤鍗曚綅</td> + <td colspan="2">{{dataItem.factoryName}}</td> + <td colspan="2">淇濆吇鏃ユ湡</td> + <td colspan="6">{{dataItem.maintenanceDateFormatted}}</td> </tr> <tr> - <td colspan="18" style="text-align: left;padding: 5px"> - 淇濆吇鍓嶆妧鏈姸鎬�<br/> - 1銆佽澶囧姛鑳芥槸鍚﹂綈鍏細{{+dataItem.fullyFunctional===1?'鏄紙鈭氾級鍚︼紙锛�':'鏄紙锛夊惁锛堚垰锛�'}}<br/> - 2銆佽澶囪兘鍚︽甯歌繍杞紝婊¤冻鍔犲伐瑕佹眰锛歿{+dataItem.runningNormally===1?'鏄紙鈭氾級鍚︼紙锛�':'鏄紙锛夊惁锛堚垰锛�'}}<br/> - 3銆侀棶棰樻弿杩帮細{{dataItem.problemDescription}} + <td colspan="12" style="padding: 5px"> + <div style="text-align: left;">淇濆吇鍓嶆妧鏈姸鎬�</div> + <div style="text-align: left;">1銆佽澶囧姛鑳芥槸鍚﹂綈鍏細{{+dataItem.fullyFunctional===1?'鏄紙鈭氾級鍚︼紙锛�':'鏄紙锛夊惁锛堚垰锛�'}}</div> + <div style="text-align: left;"> + 2銆佽澶囪兘鍚︽甯歌繍杞紝婊¤冻鍔犲伐瑕佹眰锛歿{+dataItem.runningNormally===1?'鏄紙鈭氾級鍚︼紙锛�':'鏄紙锛夊惁锛堚垰锛�'}} + </div> + <div style="text-align: left;">3銆侀棶棰樻弿杩帮細{{dataItem.problemDescription}}</div> </td> </tr> <tr> - <td colspan="18" style="text-align: left;padding: 5px"> - 淇濆吇鍐呭<br/> - 1銆佹寜鐓т笁绾т繚鍏昏鑼冭繘琛屼繚鍏汇��<br/> - 2銆佸鏁存敼鎯呭喌杩涜鎻忚堪銆� + <td colspan="12" style="padding: 5px"> + <div style="text-align: left;">淇濆吇鍐呭</div> + <div style="text-align: left;">1銆佹寜鐓т笁绾т繚鍏昏鑼冭繘琛屼繚鍏汇��</div> + <div style="text-align: left;">2銆佸鏁存敼鎯呭喌杩涜鎻忚堪銆�</div> </td> </tr> <tr> - <td colspan="18" style="text-align: left;padding: 5px"> - 淇悊鏇存崲澶囦欢鏄庣粏锛� + <td colspan="12" style="padding: 5px"> + <div style="text-align: left;">淇悊鏇存崲澶囦欢鏄庣粏锛�</div> </td> </tr> <tr> - <td colspan="3">搴忓彿</td> - <td colspan="3">鍚嶇О</td> - <td colspan="3">鍨嬪彿</td> - <td colspan="3">鏁伴噺</td> - <td colspan="6">澶囨敞</td> + <td colspan="2">搴忓彿</td> + <td colspan="2">鍚嶇О</td> + <td colspan="2">鍨嬪彿</td> + <td colspan="2">鏁伴噺</td> + <td colspan="4">澶囨敞</td> </tr> <tr v-for="item in dataItem.eamThirdMaintenanceSpareList"> - <td colspan="3">{{item.spareCode}}</td> - <td colspan="3">{{item.spareName}}</td> - <td colspan="3">{{item.spareModel}}</td> - <td colspan="3">{{item.spareQuantity}}</td> - <td colspan="6">{{item.remark}}</td> + <td colspan="2">{{item.spareCode}}</td> + <td colspan="2">{{item.spareName}}</td> + <td colspan="2">{{item.spareModel}}</td> + <td colspan="2">{{item.spareQuantity}}</td> + <td colspan="4">{{item.remark}}</td> </tr> <tr> - <td colspan="18" style="text-align: left;padding: 5px"> - 璇ヨ澶囩粡涓夌骇淇濆吇妫�鏌ュ悗锛岃揪鍒颁繚鍏昏鑼冭姹傘�� - <br/><br/><br/> - <div style="display: flex;justify-content: space-between"> - <div>鎿嶄綔浜哄憳锛歿{dataItem.operatorSignature_dictText}}</div> - <div>缁翠慨瀹や富浠伙細{{dataItem.repairManagerSignature_dictText}}</div> - <br/><br/><br/> - </div> + <td colspan="12" style="padding: 5px"> + <div style="text-align: left;">璇ヨ澶囩粡涓夌骇淇濆吇妫�鏌ュ悗锛岃揪鍒颁繚鍏昏鑼冭姹傘��</div> + <br/><br/> + <template v-if="handleMethod===1"> + <div style="text-align: left"> + <span>鎿嶄綔浜哄憳锛歿{dataItem.operatorSignature_dictText}}</span> + <span v-for="item in 30"> </span> + <span>缁翠慨瀹や富浠伙細{{dataItem.repairManagerSignature_dictText}}</span> + </div> + <br/><br/> + <div style="text-align: left"> + <span>缁翠慨浜哄憳锛歿{dataItem.repairmanSignature_dictText}}</span> + <span v-for="item in 30"> </span> + <span>璁惧妫�楠屽憳锛歿{dataItem.inspectorSignature_dictText}}</span> + </div> + </template> - - <div style="display: flex;justify-content: space-between"> - <div>缁翠慨浜哄憳锛歿{dataItem.repairmanSignature_dictText}}</div> - <div>璁惧妫�楠屽憳锛歿{dataItem.inspectorSignature_dictText}}</div> - <br/> - </div> + <template v-if="handleMethod===2"> + <div style="text-align: left"> + <span style="margin-right: 50%">鎿嶄綔浜哄憳锛歿{dataItem.operatorSignature_dictText}}</span> + <span>缁翠慨瀹や富浠伙細{{dataItem.repairManagerSignature_dictText}}</span> + </div> + <br/><br/> + <div style="text-align: left"> + <span style="margin-right: 50%">缁翠慨浜哄憳锛歿{dataItem.repairmanSignature_dictText}}</span> + <span>璁惧妫�楠屽憳锛歿{dataItem.inspectorSignature_dictText}}</span> + </div> + </template> + <br/> </td> </tr> </tbody> @@ -161,8 +187,8 @@ <template slot="footer"> <a-button @click="handleCancel">鍏抽棴</a-button> - <a-button type="primary" @click="handleImport">瀵煎嚭</a-button> - <a-button type="primary" v-print="'#dataTable'">鎵撳嵃</a-button> + <a-button type="primary" @click="handleExportToExcel">瀵煎嚭</a-button> + <a-button type="primary" @click="handleMethod = 2" v-print="'#dataTable'">鎵撳嵃</a-button> </template> </j-modal> </template> @@ -179,17 +205,8 @@ visible: false, spinning: false, tableType: null, - dataSource: [ - { - hfCode: 'HF-16548ASDSADA', - equipmentName: '鎵嬫墦鍗佺偣澶�', - equipmentModel: '6500P', - equipmentCode: '2125400', - factoryName: '鐕冩満鍘�', - maintenanceDateFormatted: '2025骞�5鏈�20鏃�' - - } - ], + handleMethod: 2, + dataSource: [], url: { list1: '/eam/thirdMaintenanceOrder/batchExportCheck', list2: '/eam/thirdMaintenanceOrder/batchExport' @@ -235,10 +252,8 @@ res1.result.forEach(item1 => { for (let i = 0; i < res2.result.length; i++) { if (item1.id === res2.result[i].id) { - console.log('res2', res2.result) const dataItem = { ...item1, ...res2.result[i] } that.dataSource.push(dataItem) - console.log('item1', item1) break } } @@ -275,23 +290,25 @@ k = i } }) - console.log('dataSource', this.dataSource) }, - handleImport() { - document.querySelectorAll('table.import-table').forEach(item => { - console.log('item', item) - $(item).table2excel({ - exclude: '.noExl', - name: 'Excel Document Name', - filename: item.id, - exclude_img: true, - fileext: '.xls', - exclude_links: true, - exclude_inputs: false + // 瀵煎嚭鍒癊xcel + handleExportToExcel() { + this.handleMethod = 1 + this.$nextTick(() => { + document.querySelectorAll('table.import-table').forEach(item => { + console.log('item', item) + $(item).table2excel({ + exclude: '.noExl', + name: 'Excel Document Name', + filename: item.id, + exclude_img: true, + fileext: '.xls', + exclude_links: true, + exclude_inputs: false + }) }) }) - }, handleCancel() { -- Gitblit v1.9.3