瀏覽代碼

拆解工单优化

wyh 1 年之前
父節點
當前提交
883a7c146d
共有 1 個文件被更改,包括 25 次插入2 次删除
  1. 25 2
      itdmWeb/src/views/module-iTDM/itdmGongdanMaster/uGantt.vue

+ 25 - 2
itdmWeb/src/views/module-iTDM/itdmGongdanMaster/uGantt.vue

@@ -463,8 +463,16 @@ export default {
     // 新增事件
     addRow(row, index){
       console.log(row, index)
+      // this.currentDbEdit = row
+      // this.currentDbEdit.parent = row.id
+      // this.currentDbEdit.pid = row.id
+
+
       this.currentDbEdit = {}
       // 灯箱部分
+      this.currentDbEdit.start_date = row.start_date
+      this.currentDbEdit.lastTime = row.lastTime
+      this.currentDbEdit.end_date = row.end_date
       this.currentDbEdit.shebeiId = row.shebeiId
       // this.currentDbEdit.reportNo = row.reportNo
       this.currentDbEdit.chuanganqiArray = row.chuanganqiArray
@@ -484,7 +492,22 @@ export default {
     },
     // 删除
     remove(){
-
+      console.log(this.currentDbEdit.id)
+      if (this.currentDbEdit.statusC == "不可修改"){
+          this.$message.error('该项已进行,不可修改');
+          this.visible = false
+      }else{
+        var select={id: this.currentDbEdit.id}
+          delProjectJl(select).then((res) => {
+            console.log("删除",res)
+            if (res.success) {
+              this.$message.success('删除成功');
+              this.dialogVisible = false
+              this.currentDbEdit = {}
+              this.getHjlist()
+            }
+          })
+      }
     },
     cancel(){
       this.currentDbEdit = {}
@@ -498,10 +521,10 @@ export default {
       console.log(this.currentDbEdit)
       this.currentDbEdit.jihuaStartDate = this.currentDbEdit.start_date ;
       this.currentDbEdit.parent = this.currentDbEdit.pid ;
-      console.log("提交",this.currentDbEdit)
       saveProjectJl(this.currentDbEdit).then((res) => {
         console.log("提交返回",res)
         if (res.success) {
+          this.$message.success('提交成功');
           this.dialogVisible = false
           this.currentDbEdit = {}
           this.getHjlist()