lyh
5 天以前 2de735967d33dba5da5fc87191dee543b000afaf
src/views/eam/maintenance/EamInspectionOrderList.vue
@@ -40,6 +40,7 @@
    <!-- 操作按钮区域 -->
    <div class="table-operator" v-if="isDisplayOperation">
      <a-button v-has="'eam:inspection:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-button v-if="selectedRowKeys.length == 1" @click="handlePrint" type="primary">查看</a-button>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchZf('ABOLISH')" v-has="'eam:inspection:abolish'">
@@ -71,21 +72,21 @@
               @change="handleTableChange">
        <span slot="action" slot-scope="text, record">
          <template v-if=" record.inspectionStatus === 'WAIT_INSPECTION'">
            <a v-has="'eeam:inspection:edit'" @click="handleEdit(record)">编辑</a>
            <a @click="handleEdit(record)">编辑</a>
          <a-divider v-has="'eeam:inspection:edit'" type="vertical"/>
          <a-divider type="vertical"/>
          <a-popconfirm v-has="'eam:inspection:collect'" title="确定领取吗?" @confirm="() => handleInspection(record.id)">
          <a-popconfirm title="确定领取吗?" @confirm="() => handleInspection(record.id)">
            <a>领取</a>
          </a-popconfirm>
          <a-divider v-has="'eam:inspection:collect'" type="vertical"/>
          <a-divider type="vertical"/>
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a-popconfirm v-has="'eam:inspection:abolish'" title="确定作废吗?" @confirm="() => handleAbolish(record.id)">
                <a-popconfirm title="确定作废吗?" @confirm="() => handleAbolish(record.id)">
                  <a>作废</a>
                </a-popconfirm>
              </a-menu-item>
@@ -96,7 +97,14 @@
          </a-dropdown>
          </template>
          <a v-else @click="handleDetail(record)">详情</a>
          <template v-else>
            <template v-if="record.inspectionStatus=='COMPLETE'">
              <a @click="handlePrint(record)">预览</a>
              <a-divider type="vertical"/>
            </template>
             <a @click="handleDetail(record)">详情</a>
          </template>
        </span>
      </a-table>
    </div>
@@ -142,22 +150,26 @@
            align: 'center',
            customRender: function(t, r, index) {
              return parseInt(index) + 1
            }
            },
            fixed: 'left'
          },
          {
            title: '统一编码',
            align: 'center',
            dataIndex: 'equipmentCode'
            dataIndex: 'equipmentCode',
            fixed: 'left'
          },
          {
            title: '设备名称',
            align: 'center',
            dataIndex: 'equipmentName'
            dataIndex: 'equipmentName',
            fixed: 'left'
          },
          {
            title: '设备型号',
            align: 'center',
            dataIndex: 'equipmentModel'
            dataIndex: 'equipmentModel',
            fixed: 'left'
          },
          {
            title: '工单号',
@@ -175,7 +187,8 @@
            dataIndex: 'inspectionDate',
            customRender: function(text) {
              return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
            }
            },
            width: 150
          },
          {
            title: '点检过期日期',
@@ -183,7 +196,8 @@
            dataIndex: 'expirationTime',
            customRender: function(text) {
              return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
            }
            },
            width: 150
          },
          {
            title: '创建方式',
@@ -203,7 +217,8 @@
          {
            title: '点检时间',
            align: 'center',
            dataIndex: 'operateTime'
            dataIndex: 'operateTime',
            width: 150
          },
          {
            title: '维修工',
@@ -213,12 +228,14 @@
          {
            title: '确认时间',
            align: 'center',
            dataIndex: 'confirmTime'
            dataIndex: 'confirmTime',
            width: 150
          },
          {
            title: 'HF编码',
            align: 'center',
            dataIndex: 'hfCode'
            dataIndex: 'hfCode',
            width: 250
          }
        ],
        url: {
@@ -243,7 +260,8 @@
        title: '操作',
        dataIndex: 'action',
        align: 'center',
        scopedSlots: { customRender: 'action' }
        scopedSlots: { customRender: 'action' },
        fixed: 'right'
      }
      this.columns = [...this.columns, operationColumn]
      this.loadData(1)
@@ -260,8 +278,7 @@
        this.$refs.modalFormXq.visible = true
        this.$refs.modalFormXq.title = '详情'
        this.$refs.modalFormXq.disableSubmit = true
        this.$refs.modalFormXq.getAllApproveData(record)
        this.$refs.modalFormXq.getBasicInformation({ ...record, dataId: record.id })
        this.$refs.modalFormXq.handleDetail(record)
      },
      handleInspection(id) {
@@ -302,6 +319,7 @@
          }
        })
      },
      batchZf(type) {
        var ids = ''
        for (var a = 0; a < this.selectedRowKeys.length; a++) {
@@ -334,6 +352,7 @@
          }
        })
      },
      batchLq(type) {
        var ids = ''
        for (var a = 0; a < this.selectedRowKeys.length; a++) {
@@ -367,6 +386,12 @@
          }
        })
      },
      handlePrint(record) {
        let href = `${window._CONFIG['domianURL']}/jmreport/view/1105664887569121280?equipmentCode=` + record.equipmentCode
        window.open(href, '_blank')
      },
      onInspectionDateChange: function(value, dateString) {
        this.queryParam.inspectionDateBegin = dateString[0]
        this.queryParam.inspectionDateEnd = dateString[1]