Lius
2023-11-13 3a8223b71d18205d40b894fd0b4c0fa1ca773e86
src/views/eam/DailyInspectionOrderList.vue
@@ -1,7 +1,7 @@
<template>
  <a-card
    :bordered="false"
    title="日常点检工单"
    title="自主维护点检工单"
  >
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
@@ -64,6 +64,7 @@
        @click="handleAdd"
        type="primary"
        icon="plus"
        v-has="'dailyInspectionOrder:add'"
      >新增</a-button>
      <!-- <a-button
        type="primary"
@@ -128,10 +129,11 @@
          slot-scope="text, record"
        >
          <a-popconfirm
            title="确定下发工单吗?"
            title="确定接收工单吗?"
            @confirm="() => handleOrderIssue(record)"
            v-has="'dailyInspectionOrder:issue'"
          >
            <a v-if="record.status == '1'">下发</a>
            <a v-if="record.status == '1'">接收</a>
          </a-popconfirm>
          <a-divider
            v-if="record.status == '1'"
@@ -140,6 +142,7 @@
          <a-popconfirm
            title="确定撤回工单吗?"
            @confirm="() => handleOrderReset(record)"
            v-has="'dailyInspectionOrder:issue'"
          >
            <a v-if="record.status == '2'">撤回</a>
          </a-popconfirm>
@@ -150,6 +153,7 @@
          <a-popconfirm
            title="确定恢复工单吗?"
            @confirm="() => handleOrderRecover(record)"
            v-has="'dailyInspectionOrder:recover'"
          >
            <a v-if="record.status == '7'">恢复</a>
          </a-popconfirm>
@@ -160,6 +164,7 @@
          <a-popconfirm
            title="确定作废工单吗?"
            @confirm="() => handleOrderCancel(record)"
            v-has="'dailyInspectionOrder:recover'"
          >
            <a v-if="record.status == '2'">作废</a>
          </a-popconfirm>
@@ -170,20 +175,24 @@
          <a-popconfirm
            title="确定领取工单吗?"
            @confirm="() => handleOrderGet(record)"
            v-has="'dailyInspectionOrder:get'"
          >
            <a v-if="record.status == '2' && record.assignMode == '1'">领取</a>
          </a-popconfirm>
          <a
            v-if="record.status == '2' && record.assignMode == '2'  "
            @click="handleAssignOrder(record)"
            v-has="'dailyInspectionOrder:assign'"
          >派工</a>
          <a
            v-if="record.status == '2'&& record.assignMode == '3'  && record.inspectionUserName != null  "
            @click="handleAssignOrder(record)"
            v-has="'dailyInspectionOrder:assign'"
          >改派</a>
          <a
            v-if="record.status == '3'"
            @click="handleAssignOrder(record)"
            v-has="'dailyInspectionOrder:assign'"
          >改派</a>
          <a-divider
            v-if="record.status == '2'"
@@ -196,6 +205,7 @@
          <a
            v-if="record.status === '3' || record.status === '4'  "
            @click="handleOrderExe(record)"
            v-has="'dailyInspectionOrder:exe'"
          >执行</a>
          <a-divider
            v-if="record.status === '3' || record.status === '4' "
@@ -204,6 +214,7 @@
          <a
            v-if="record.status === '1'"
            @click="handleEdit(record)"
            v-has="'dailyInspectionOrder:edit'"
          >编辑</a>
          <a-divider
            v-if="record.status === '1'"
@@ -219,6 +230,7 @@
                <a-popconfirm
                  title="确定删除吗?"
                  @confirm="() => handleDelete(record.id)"
                  v-has="'dailyInspectionOrder:delete'"
                >
                  <a v-if="record.status === '1'">删除</a>
                </a-popconfirm>
@@ -299,11 +311,7 @@
            return parseInt(index) + 1;
          }
        },
        {
          title: '状态',
          align: "center",
          dataIndex: 'statusName'
        },
        {
          title: '点检工单号',
          align: "center",
@@ -311,20 +319,25 @@
          scopedSlots: { customRender: 'num' }
        },
        {
          title: '点检日期',
          title: '状态',
          align: "center",
          dataIndex: 'inspectionDate',
          customRender: function (text) {
            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
          }
          dataIndex: 'statusName'
        },
        // {
        //   title: '点检日期',
        //   align: "center",
        //   dataIndex: 'inspectionDate',
        //   customRender: function (text) {
        //     return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
        //   }
        // },
        {
          title: '点检时间',
          align: "center",
          dataIndex: 'inspectionTime',
          customRender: function (text) {
            return !text ? "" : (text.length > 10 ? text.substr(11, 20) : text)
          }
          // customRender: function (text) {
          //   return !text ? "" : (text.length > 10 ? text.substr(11, 20) : text)
          // }
        },
        {
          title: '截止时间',
@@ -332,7 +345,7 @@
          dataIndex: 'inspectionDeadline',
        },
        {
          title: '设备编码',
          title: '统一编码',
          align: "center",
          dataIndex: 'equipmentNum'
        },
@@ -347,7 +360,7 @@
          dataIndex: 'equipmentModel'
        },
        {
          title: '对象部门',
          title: '使用部门',
          align: "center",
          dataIndex: 'useDepartName'
        },
@@ -356,18 +369,18 @@
          align: "center",
          dataIndex: 'teamName'
        },
        {
          title: '开工条件',
          align: "center",
          dataIndex: 'startWorkCondition',
          customRender: (text) => {
            if (text == '1') {
              return "是";
            } else if (text == '0') {
              return "否";
            }
          },
        },
        // {
        //   title: '开工条件',
        //   align: "center",
        //   dataIndex: 'startWorkCondition',
        //   customRender: (text) => {
        //     if (text == '1') {
        //       return "是";
        //     } else if (text == '0') {
        //       return "否";
        //     }
        //   },
        // },
        {
          title: '点检标准编码',
          align: "center",