Admin
5 天以前 bd6818fc9d40f343547bafca0743658f3c0379dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<template>
    <div>
      <!-- 取消任务 -->
      <vol-box
        :width="500"
        :height="150"
        v-model="cancelTaskFlag"
        title="取消任务"
      >
      
      <div style="font-size:20px;margin-top:20px;margin-left:20px">确定要取消选择的任务吗?</div>
 
      <template #footer>
        <div style="text-align: center;">
          <el-button
            type="primary"
            size="max"
            icon="md-checkmark-circle"
            long
            @click="cancelTask_Ok"
            >确认取消</el-button
          >
        </div>
      </template>
    </vol-box>
  </div>
 
 
  <div>
      <!-- 取消测量、直接回库 -->
      <vol-box
        :width="500"
        :height="150"
        v-model="cancelMaesureFlag"
        title="取消测量、直接回库"
      >
      
      <div style="font-size:20px;margin-top:20px;margin-left:20px">确定要回库选择的任务吗?</div>
 
      <template #footer>
        <div style="text-align: center;">
          <el-button
            type="primary"
            size="max"
            icon="md-checkmark-circle"
            long
            @click="cancelMaesure_Ok"
            >确认回库</el-button
          >
        </div>
      </template>
    </vol-box>
  </div>
 
 
</template>
 
 
<script>
import VolBox from "@/components/basic/VolBox.vue";
import VolForm from "@/components/basic/VolForm.vue";
export default {
  components: { "vol-box": VolBox ,"vol-form":VolForm },
  methods: {
  },
  data () {
    return {
        
      cancelTaskInfo : null,
      cancelTaskFlag :false,
 
      cancelMaesureInfo:null,
      cancelMaesureFlag :false,
 
    }
  },
 
  methods: {
 
    //务取消
    showCancelTaskAlert(res){
      this.cancelTaskInfo = res;
      this.cancelTaskFlag = true;
    },
 
    cancelTask_Ok(){
      
      let params = {
          MainData:
            {
                barcode:this.cancelTaskInfo.task_barcode,
            },
          DetailData: null,
          DelKeys: null,
          Extra: false
      }
      this.http.post("/api/Dt_taskinfo/CancelATask", params, "任务取消中....").then(x => {
          if (!x.status) 
            return this.$Message.error(x.message);
          else 
            this.$Message.success("任务取消成功");
          this.cancelTaskFlag = false;
          this.cancelTaskInfo = null;
          this.$parent.refresh();
      });
    },
 
 
    //取消测量,直接回库
    showCancelMaesureAlert(res){
      this.cancelMaesureFlag = true;
      this.cancelMaesureInfo = res;
    },
 
    cancelMaesure_Ok(){
      let params = {
          MainData:
            {
                barcode:this.cancelMaesureInfo.task_barcode,
            },
          DetailData: null,
          DelKeys: null,
          Extra: false
      }
      this.http.post("/api/Dt_taskinfo/CancelAMeasureTask", params, "任务回库中....").then(x => {
          if (!x.status) 
            return this.$Message.error(x.message);
          else 
            this.$Message.success("开始执行任务回库成功");
          this.cancelMaesureFlag = false;
          this.cancelMaesureInfo = null;
          this.$parent.refresh();
      });
    }
 
  }
  
}
</script>