Explorar o código

设备维修审批申请流程新增管件、崩的审批流程

jiangbiao %!s(int64=3) %!d(string=hai) anos
pai
achega
e5b83635bd
Modificáronse 1 ficheiros con 45 adicións e 5 borrados
  1. 45 5
      ui/src/views/intact/pump/index.vue

+ 45 - 5
ui/src/views/intact/pump/index.vue

@@ -683,7 +683,19 @@
             size="small"
             @click="hisApprove(scope.row,devType)">
             {{ $t('申请记录') }}</el-button>
-    
+          <el-button
+            v-if="scope.row.approveTime != null"
+            type="text"
+            size="mini"
+            @click="hisApprove2(scope.row,devType2)"
+          > {{ $t('维修记录') }}<br>
+          </el-button>
+          <el-button
+            type="text"
+            size="mini"
+            @click="addAprrove2(scope.row,devType2)"
+          >{{ $t('提交维修申请') }}
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -1058,6 +1070,8 @@
 
       <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
     <his-approve v-if="hisAprroveVisible" ref="hisApprove" @refreshDataList="getList"></his-approve>
+    <add-approve2 v-if="addAprroveVisible2" ref="addApprove2" @refreshDataList="getList"></add-approve2>
+    <his-approve2 v-if="hisAprroveVisible2" ref="hisApprove2" @refreshDataList="getList"></his-approve2>
     <his-check v-if="hisCheckVisible" ref="hisCheck" @refreshDataList="getList"></his-check>
     <HisReform v-if="hisReformVisible" ref="hisReformList" ></HisReform>
   </div>
@@ -1076,17 +1090,21 @@ import {mylistPlant} from "@/api/system/plant";
 import HisCheck from "../check/check"
 import {addModify} from "@/api/sems/his/modify";
 import HisReform from "./specGl-hisReform";
+import HisApprove2 from "../approve/tapprove-maintenance-his";
+import AddApprove2 from "../approve/tapprove-maintenance-add";
 
 export default {
   name: "Pump",
-  components: { Treeselect ,AddApprove,HisApprove,HisCheck,HisReform},
+  components: { Treeselect ,AddApprove,HisApprove,HisCheck,HisReform,AddApprove2,HisApprove2},
   data() {
     return {
-      devType: 1,
       // 遮罩层
+      devType2: 4,
       loading: true,
        addAprroveVisible: false,
       hisAprroveVisible: false,
+      addAprroveVisible2: false,
+      hisAprroveVisible2: false,
       hisCheckVisible: false,
       // 选中数组
       ids: [],
@@ -1253,7 +1271,7 @@ export default {
     this.getDicts("INTACT_STATUS").then(response => {
       this.statusOptions = response.data;
     });
-    this.getDicts("T_INTACT_CHANGE_STATUS").then(response => {
+    this.getDicts("spec_approve_status").then(response => {
       this.approveStatusOptions = response.data;
     });
     this.getDicts("ALARM_LEVEL").then(response => {
@@ -1267,6 +1285,29 @@ export default {
     });
   },
   methods: {
+    addAprrove2(row, type) {
+      var rows = row ? [row] : this.recordList.map(item => {
+        return item
+      })
+      for (let i = 0; i < rows.length; i++) {
+        if (rows[i].approveStatus != 0) {
+          this.$alert(this.$t('当前设备正在申请中,无法重复申请'), this.$t('提示'), {
+            type: 'warning'
+          })
+          return
+        }
+      }
+      this.addAprroveVisible2 = true
+      this.$nextTick(() => {
+        this.$refs.addApprove2.init(rows, type)
+      })
+    },
+    hisApprove2(row, type) {
+      this.hisAprroveVisible2 = true
+      this.$nextTick(() => {
+        this.$refs.hisApprove2.init(row, type)
+      })
+    },
     /** 查询设备完整性泵台账列表 */
     getList() {
       this.loading = true;
@@ -1555,7 +1596,6 @@ export default {
     },
     hisApprove (row, type) {
       this.hisAprroveVisible = true
-      
       this.$nextTick(() => {
         this.$refs.hisApprove.init(row, type)
       })