“linengliang”
2023-09-14 c887bb7836b82573c0bc7d11b8dd46b4d7e522e1
src/views/eam/modules/predictiveWorkOrder/PredictiveWorkOrderDrawer.vue
@@ -44,7 +44,7 @@
                  <span
                    v-if="this.model != null"
                    class="hightColor"
                  >{{ this.model.statusName }}</span>
                  >{{ this.model.status_dictText }}</span>
                  <span
                    v-else
                    class="frozenRowClass"
@@ -55,7 +55,7 @@
                <a-form-item
                  :labelCol="labelCol"
                  :wrapperCol="wrapperCol"
                  label="保养工单号"
                  label="工单统一编码"
                  class="hightColor"
                >
                  <span
@@ -72,13 +72,13 @@
                <a-form-item
                  :labelCol="labelCol"
                  :wrapperCol="wrapperCol"
                  label="保养类型"
                  label="监控类型"
                  class="hightColor"
                >
                  <span
                    v-if="this.model != null"
                    class="hightColor"
                  >{{ this.model.maintenanceTypeName }}</span>
                  >{{ this.model.monitorType_dictText }}</span>
                  <span
                    v-else
                    class="frozenRowClass"
@@ -91,30 +91,13 @@
                <a-form-item
                  :labelCol="labelCol"
                  :wrapperCol="wrapperCol"
                  label="对象部门"
                  label="标准编码"
                  class="hightColor"
                >
                  <span
                    v-if="this.model != null"
                    class="hightColor"
                  >{{ this.model.departName }}</span>
                  <span
                    v-else
                    class="frozenRowClass"
                  >-</span>
                </a-form-item>
              </a-col>
              <a-col :span="8">
                <a-form-item
                  :labelCol="labelCol"
                  :wrapperCol="wrapperCol"
                  label="维保方式"
                  class="hightColor"
                >
                  <span
                    v-if="this.model != null"
                    class="hight"
                  >{{ this.model.maintenanceMode }}</span>
                  >{{ this.model.planNum }}</span>
                  <span
                    v-else
                    class="frozenRowClass"
@@ -131,7 +114,7 @@
                  <span
                    v-if="this.model != null"
                    class="hightColor"
                  >{{ this.model.teamName }}</span>
                  >{{ this.model.teamId_dictText }}</span>
                  <span
                    v-else
                    class="frozenRowClass"
@@ -186,7 +169,7 @@
                  <span
                    v-if="this.model != null"
                    class="hightColor"
                  >{{ this.model.equipmentModel }}</span>
                  >{{ this.model.model }}</span>
                  <span
                    v-else
                    class="frozenRowClass"
@@ -200,7 +183,7 @@
            defaultActiveKey="1"
          >
            <a-tab-pane
              tab='触发条件'
              tab='监控记录'
              key="1"
              class="hightColor"
            >
@@ -208,11 +191,9 @@
            class="table-operator"
            style="margin:-16px"
            >
                <predictive-spare-parts :planId='workPlanId' v-show="model.monitorType == 'smkz'"/>
                <!--            v-if="selectionRows[0].monitorType == 'smkz'"-->
                <predictive-parameters  :planId='workPlanId' v-show="model.monitorType == 'cskz'"/>
                <predictive-parameters  :orderId='model.id' v-show="model.monitorType == 'cskz'"/>
                <!--            v-if="selectionRows[0].monitorType == 'cskz'" -->
                <predictive-warn :planId='workPlanId' v-show="model.monitorType == 'bjkz'"/>
                <predictive-warn :orderId='model.id' v-show="model.monitorType == 'bjkz'"/>
                <!--            v-if="selectionRows[0].monitorType == 'bjkz'"-->
            </div>
            </a-tab-pane>
@@ -267,9 +248,9 @@
              >
                <actual-material-edit-table
                  ref="actualMaterialTabel"
                  :specialyMaintenanceOrderId="this.model.id"
                  :specialyMaintenanceOrderStatus="this.model.status"
                  :equipmentId="this.model.equipmentId"
                  :orderId="orderId"
                  :orderStatus="orderStatus"
                  :equipmentId="equipmentId"
                ></actual-material-edit-table>
              </div>
            </a-tab-pane>
@@ -282,10 +263,10 @@
                style="margin:-16px"
              >
                <actual-work-hours-edit-table
                  :specialyMaintenanceOrderId="this.model.id"
                  :specialyMaintenanceOrderStatus="this.model.status"
                  :equipmentId="this.model.equipmentId"
                  :teamId="this.model.teamId"
                  :orderId="orderId"
                  :orderStatus="orderStatus"
                  :equipmentId="equipmentId"
                  :teamId = "teamId"
                ></actual-work-hours-edit-table>
              </div>
            </a-tab-pane>
@@ -365,7 +346,13 @@
      currentPage: 1,
      pageSize: 1,
      total: 10,
      //
      workPlanId:'',
      orderId:'',
      orderStatus:'',
      equipmentId:'',
      teamId:'',
      //
      title: "专业工单执行",
      visible: false,
      maskClosable: true,
@@ -387,12 +374,14 @@
        sm: { span: 18 },
      },
      url: {
        getEquipmentTotalByOrderId: "/eam/specialtyMaintenanceOrderDetail/getEquipmentTotalByOrderId",
        listMaterial: "/eam/maintenanceOrderActualMaterial/getMaintenanceOrderActualMaterialList",
        listHours: "/eam/maintenanceOrderActualWorkingHour/getMaintenanceOrderActualWorkingHourList",
        getEquipmentTotalByOrderId: "/eam/predictiveworkorder/getEquipmentTotalByOrderId",
        urlDownload: window._CONFIG['staticDomainURL'],
        download: '/sys/upload/downloadFile',
        editStatus: "/eam/specialtyMaintenanceOrder/editStatus",
        revocation: "/eam/specialtyMaintenanceOrder/revocation",
        report: "/eam/specialtyMaintenanceOrder/report",
        editStatus: "/eam/predictiveworkorder/editStatus",
        revocation: "/eam/predictiveworkorder/revocation",
        report: "/eam/predictiveworkorder/report",
      },
    }
  },
@@ -414,7 +403,15 @@
    handleShow(record) {
      this.model = Object.assign({}, record);
      this.workPlanId = record.workPlanId;
      this.orderId = record.id;
      this.orderStatus = record.status;
      this.equipmentId = record.equipmentId;
      this.teamId  = record.teamId;
      this.visible = true;
      if(record.status=='4'){
        this.$message.success("工单正在执行当中,请在此过程中录入实际用料和工时")
      }
    },
    getEquipmentTotal() {
      var params = this.queryParam;//查询条件
@@ -512,16 +509,15 @@
      const that = this;
      that.confirmLoading = true;
      this.$confirm({
        title: '保养工单开工',
        title: '工单开工',
        content: '提示:开工后无法撤回,请谨慎操作!',
        okText: '确认',
        cancelText: '取消',
        onOk() {
          requestPut(that.url.editStatus, { id: that.specialtyMaintenanceOrderId, status: '4' }).then((res) => {
          requestPut(that.url.editStatus, { id: that.model.id, status: '4' }).then((res) => {
            if (res.success) {
              that.model.status = '4'
              that.$message.success("工单开工成功!")
              that.getEquipmentTotal()
              that.buttonDistable = false
              that.revocationDistable = true
              that.SWbuttonDistable = true
@@ -537,26 +533,18 @@
    },
    //报工
    handleReport() {
      var actualMaterials = this.$refs.actualMaterialTabel.dataSource;
      for (var i = 0; i < actualMaterials.length; i++) {
        if (actualMaterials[i].isLock == 'no') {
          this.$message.warn("实际用料第" + (i + 1) + "行尚未锁料,请锁料后再进行报工");
          return false;
        }
      }
      const that = this;
      that.confirmLoading = true;
      this.$confirm({
        title: '保养工单报工',
        content: '提示:报工后点检完工,请谨慎操作!',
      that.$confirm({
        title: '工单报工',
        content: '提示:如有未填写的必填项或导致报工失败,确认报工吗!',
        okText: '确认',
        cancelText: '取消',
        onOk() {
          requestPut(that.url.report, { id: that.specialtyMaintenanceOrderId, status: '5' }).then((res) => {
          requestPut(that.url.report, { id: that.orderId, status: '5' }).then((res) => {
            if (res.success) {
              that.model.status = '5'
              that.$message.success(res.message)
              that.getEquipmentTotal()
              that.buttonDistable = false
              that.revocationDistable = true
              that.SWbuttonDistable = true
@@ -583,14 +571,15 @@
        okText: '确认',
        cancelText: '取消',
        onOk() {
          requestPut(that.url.revocation, { id: that.specialtyMaintenanceOrderId, status: '4' }).then((res) => {
          requestPut(that.url.revocation, { id: that.orderId, status: '4' }).then((res) => {
            if (res.success) {
              that.model.status = '4'
              that.orderStatus = '4'
              that.$message.success(res.message)
              that.getEquipmentTotal()
              that.buttonDistable = false
              that.revocationDistable = true
              that.SWbuttonDistable = true
              that.$emit('ok');
            } else {
              that.$message.warning(res.message)
            }