qushaowei
2023-11-18 eb48d3bada053e26def2a94d46dbe115a5a7bb2f
src/views/eam/DailyInspectionOrderList.vue
@@ -150,7 +150,7 @@
            v-if="record.status == '2'"
            type="vertical"
          />
          <a-popconfirm
          <!-- <a-popconfirm
            title="确定恢复工单吗?"
            @confirm="() => handleOrderRecover(record)"
            v-has="'dailyInspectionOrder:recover'"
@@ -160,8 +160,8 @@
          <a-divider
            v-if="record.status == '7'"
            type="vertical"
          />
          <a-popconfirm
          /> -->
          <!-- <a-popconfirm
            title="确定作废工单吗?"
            @confirm="() => handleOrderCancel(record)"
            v-has="'dailyInspectionOrder:recover'"
@@ -171,7 +171,7 @@
          <a-divider
            v-if="record.status == '2'"
            type="vertical"
          />
          /> -->
          <a-popconfirm
            title="确定领取工单吗?"
            @confirm="() => handleOrderGet(record)"
@@ -179,12 +179,12 @@
          >
            <a v-if="record.status == '2' && record.assignMode == '1'">领取</a>
          </a-popconfirm>
          <a
          <!-- <a
            v-if="record.status == '2' && record.assignMode == '2'  "
            @click="handleAssignOrder(record)"
            v-has="'dailyInspectionOrder:assign'"
          >派工</a>
          <a
          >派工</a> -->
          <!-- <a
            v-if="record.status == '2'&& record.assignMode == '3'  && record.inspectionUserName != null  "
            @click="handleAssignOrder(record)"
            v-has="'dailyInspectionOrder:assign'"
@@ -193,7 +193,7 @@
            v-if="record.status == '3'"
            @click="handleAssignOrder(record)"
            v-has="'dailyInspectionOrder:assign'"
          >改派</a>
          >改派</a>-->
          <a-divider
            v-if="record.status == '2'"
            type="vertical"
@@ -209,6 +209,17 @@
          >执行</a>
          <a-divider
            v-if="record.status === '3' || record.status === '4' "
            type="vertical"
          />
          <a-popconfirm
            title="维修人确认完工吗?"
            @confirm="() => handleOrderRepairConfirm(record)"
            v-has="'dailyInspectionOrder:repairConfirm'"
          >
            <a v-if="record.status == '5'">维修确认</a>
          </a-popconfirm>
          <a-divider
            v-if="record.status == '5'"
            type="vertical"
          />
          <a
@@ -244,7 +255,7 @@
          slot-scope="text, record"
        >
          <a
            v-if="record.status === '3' || record.status === '4' ||record.status === '5'  ||record.status === '7' "
            v-if="record.status === '3' || record.status === '4' ||record.status === '5'  ||record.status === '6' "
            class="lot"
            @click="handleOrderExe(record)"
          >{{record.num}}</a>
@@ -331,19 +342,19 @@
        //     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)
          // }
        },
        {
          title: '截止时间',
          align: "center",
          dataIndex: 'inspectionDeadline',
        },
        // {
        //   title: '点检时间',
        //   align: "center",
        //   dataIndex: 'inspectionTime',
        //   // customRender: function (text) {
        //   //   return !text ? "" : (text.length > 10 ? text.substr(11, 20) : text)
        //   // }
        // },
        // {
        //   title: '截止时间',
        //   align: "center",
        //   dataIndex: 'inspectionDeadline',
        // },
        {
          title: '统一编码',
          align: "center",
@@ -381,33 +392,33 @@
        //     }
        //   },
        // },
        {
          title: '点检标准编码',
          align: "center",
          dataIndex: 'inspectionStandardNum'
        },
        // {
        //   title: '点检标准编码',
        //   align: "center",
        //   dataIndex: 'inspectionStandardNum'
        // },
        {
          title: '点检周期',
          align: "center",
          dataIndex: 'inspectionCycleName'
        },
        {
          title: '派工方式',
          align: "center",
          dataIndex: 'assignModeName'
        },
        {
          title: '点检结果',
          align: "center",
          dataIndex: 'result'
        },
        // {
        //   title: '派工方式',
        //   align: "center",
        //   dataIndex: 'assignModeName'
        // },
        // {
        //   title: '点检结果',
        //   align: "center",
        //   dataIndex: 'result'
        // },
        {
          title: '点检人',
          align: "center",
          dataIndex: 'inspectionUserName'
        },
        {
          title: '完成时间',
          title: '点检时间',
          align: "center",
          dataIndex: 'actualEndTime',
          // customRender: function (text) {
@@ -415,10 +426,23 @@
          // }
        },
        {
          title: '创建人',
          title: '维修确认人',
          align: "center",
          dataIndex: 'createBy'
          dataIndex: 'repairConfirmPerson'
        },
        {
          title: '确认时间',
          align: "center",
          dataIndex: 'repairConfirmDate',
          // customRender: function (text) {
          //   return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
          // }
        },
        // {
        //   title: '创建人',
        //   align: "center",
        //   dataIndex: 'createBy'
        // },
        {
          title: '创建日期',
          align: "center",
@@ -496,7 +520,7 @@
        this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = true
        this.$refs.DailyInspectionOrderExeDrawer.revocationDistable = false
        this.$refs.DailyInspectionOrderExeDrawer.SWbuttonDistable = true
      } else if (record.status === '7') {
      } else if (record.status === '6') {
        this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = true
        this.$refs.DailyInspectionOrderExeDrawer.revocationDistable = true
        this.$refs.DailyInspectionOrderExeDrawer.SWbuttonDistable = true
@@ -541,15 +565,15 @@
        }
      })
    },
    //作废
    handleOrderCancel(record) {
    //维修确认
    handleOrderRepairConfirm(record) {
      const that = this;
      requestPut(that.url.edit, { id: record.id, status: '7' }).then((res) => {
      requestPut(that.url.edit, { id: record.id, status: '6' }).then((res) => {
        if (res.success) {
          that.$message.success("工单作废成功!")
          that.$message.success("工单完工成功!")
          that.loadData()
        } else {
          that.$message.warning("工单作废失败!")
          that.$message.warning("工单完工失败!")
        }
      })
    },