<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>
|