¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal title="é¢è§" :width="1248" :visible="visible" switchFullscreen centered |
| | | :mask-closable="false" @cancel="handleCancel" cancelText="å
³é"> |
| | | <a-spin :spinning="spinning" style="height: 100%;"> |
| | | <div id="dataTable"> |
| | | <div class="table-container" v-for="dataItem in dataSource"> |
| | | <div style="page-break-before:always"></div> |
| | | |
| | | <table class="import-table" :id="dataItem.inspectionYear+dataItem.inspectionMonth+'-'+dataItem.equipmentCode"> |
| | | <thead> |
| | | <tr> |
| | | <td colspan="42" style="border: none"> |
| | | <div style="text-align: right">{{dataItem.hfCode}}</div> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | |
| | | <tbody> |
| | | <tr style="height: 48px;position: relative"> |
| | | <th colspan="42">ç产设å¤èªä¸»ç»´æ¤ç¹æ£è¡¨</th> |
| | | </tr> |
| | | |
| | | <tr style="height: 48px"> |
| | | <th colspan="9">设å¤åç§°ï¼{{dataItem.equipmentName}}</th> |
| | | <th colspan="9">设å¤åå·ï¼{{dataItem.equipmentModel}}</th> |
| | | <th colspan="9">ç»ä¸ç¼å·ï¼{{dataItem.equipmentCode}}</th> |
| | | <th colspan="6"> |
| | | {{dataItem.inspectionYear}} å¹´ {{dataItem.inspectionMonth}} æ |
| | | </th> |
| | | <th colspan="9">åä½ï¼{{dataItem.factoryName_dictText}}</th> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td rowspan="2">åºå·</td> |
| | | <td rowspan="2" colspan="5">ç¹æ£é¡¹ç®</td> |
| | | <td rowspan="2" colspan="5">å®ææ°æ®/è¦æ±</td> |
| | | <td colspan="31">æ¥æ</td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td v-for="item in 31">{{item}}</td> |
| | | </tr> |
| | | |
| | | <tr v-for="item in dataItem.eamDailyInspectionList"> |
| | | <td>{{item.itemCode}}</td> |
| | | <td colspan="5">{{item.itemName}}</td> |
| | | <td colspan="5">{{item.itemDemand}}</td> |
| | | <td v-for="childItem in item.dateFlag">{{childItem!==null?childItem:''}}</td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td colspan="11">ç»´æ¤è´£ä»»äººç¾å</td> |
| | | <td v-for="item in dataItem.dailyResponsibleInfo.operators"> |
| | | {{item!==null?item:''}} |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td colspan="11">æ£æ¥è´£ä»»äººç¾å</td> |
| | | <td v-for="item in dataItem.dailyResponsibleInfo.confirmUsers"> |
| | | {{item!==null?item:''}} |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr style="height: 48px"> |
| | | <td>åºå·</td> |
| | | <td colspan="5">å¨ä¿å
»é¡¹ç®</td> |
| | | <td colspan="5">æ£æ¥æ å</td> |
| | | <td colspan="31">å¨ä¿æ§è¡è®°å½</td> |
| | | </tr> |
| | | |
| | | <tr v-for="item in dataItem.eamWeeklyInspectionList"> |
| | | <td>{{item.itemCode}}</td> |
| | | <td colspan="5">{{item.itemName}}</td> |
| | | <td colspan="5">{{item.itemDemand}}</td> |
| | | |
| | | <td v-for="(childItem,childIndex) in item.weekFlag" |
| | | :colspan="childIndex!==item.weekFlag.length-1?6:7"> |
| | | {{childItem!==null?childItem:''}} |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td colspan="11">å¨ä¿å
»æä½è
æ§è¡ï¼æä½è
ç¾åï¼</td> |
| | | <td v-for="(item,index) in dataItem.weeklyResponsibleInfo.operators" |
| | | :colspan="index!==dataItem.weeklyResponsibleInfo.operators.length-1?6:7"> |
| | | {{item!==null?item:''}} |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td colspan="11">å¨ä¿å
»æ£æ¥äººç¡®è®¤ï¼ç»´ä¿®äººåç¾åï¼</td> |
| | | <td v-for="(item,index) in dataItem.weeklyResponsibleInfo.confirmUsers" |
| | | :colspan="index!==dataItem.weeklyResponsibleInfo.confirmUsers.length-1?6:7"> |
| | | {{item!==null?item:''}} |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td colspan="42"> |
| | | <div style="text-align: left"> |
| | | å¡«åè¦æ±ï¼æ£å¸¸ï¼âï¼å¼å¸¸ï¼Ãï¼æ
éåæºï¼â³ï¼æ²¡å¼æºï¼Tï¼è®¾å¤æ¥å¸¸ç¹æ£è®°å½ç±æä½äººåæ§è¡å¹¶è®°å½ãæ§è¡æ
嵿£æ¥ç±ç»´ä¿®äººåè´è´£æ§è¡å¹¶è®°å½ï¼å¯¹åç°é®é¢è®°å½è³ç¹æ£è¡¨èé¢å¤æ³¨æ ï¼å¯¹åç°é®é¢è¿è¡å
¨ç¨éç¯è®°å½ã |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </a-spin> |
| | | |
| | | <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> |
| | | </template> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import $ from 'jquery' |
| | | import '@/components/table2excel/table2excel' |
| | | |
| | | export default { |
| | | name: 'EamInspectionOrderBatchPrintModal', |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | dataSource: [], |
| | | spinning: false, |
| | | url: { |
| | | list: '/eam/eamInspectionOrder/printInspectionOrder' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | | * æ¹éé¢è§ |
| | | * @param ids String 主页é¢å表å¾éids |
| | | */ |
| | | handlePreview(ids) { |
| | | this.visible = true |
| | | this.spinning = true |
| | | this.dataSource = [] |
| | | const that = this |
| | | getAction(this.url.list, { ids }) |
| | | .then(res => { |
| | | if (res.success) that.dataSource = res.result |
| | | }) |
| | | .finally(() => { |
| | | that.spinning = false |
| | | }) |
| | | }, |
| | | |
| | | handleImport() { |
| | | document.querySelectorAll('table.import-table').forEach(element => { |
| | | console.log('element', element.id) |
| | | $(element).table2excel({ |
| | | exclude: '.noExl', |
| | | name: 'Excel Document Name', |
| | | filename: 'ç产设å¤èªä¸»ç»´æ¤ç¹æ£è¡¨-' + element.id, |
| | | exclude_img: true, |
| | | fileext: '.xls', |
| | | exclude_links: true, |
| | | exclude_inputs: false |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | /deep/ .ant-modal { |
| | | height: 90%; |
| | | overflow: hidden; |
| | | |
| | | .ant-modal-content { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow: hidden; |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | height: 8px; |
| | | } |
| | | |
| | | .ant-modal-body { |
| | | flex: 1; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | |
| | | table { |
| | | width: 100%; |
| | | text-align: center; |
| | | table-layout: fixed; |
| | | |
| | | td, th { |
| | | border: 1px solid #000; |
| | | } |
| | | |
| | | tr:first-child th { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | tr:nth-child(2) th { |
| | | border-top: 0; |
| | | } |
| | | |
| | | tr:nth-child(2) th { |
| | | border-left: 0; |
| | | border-right: 0; |
| | | } |
| | | |
| | | tr:nth-child(2) th:first-child { |
| | | border-left: 1px solid #000; |
| | | } |
| | | |
| | | tr:nth-child(2) th:last-child { |
| | | border-right: 1px solid #000; |
| | | } |
| | | } |
| | | |
| | | .table-container:not(:last-child) { |
| | | margin-bottom: 20px; |
| | | } |
| | | </style> |