zhaowei
13 小时以前 8f1df61c8902a35e41205d7cbd9d0763619e6d46
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">&nbsp;</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">&nbsp;</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
      // 导出到Excel
      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() {