Commit 4e7fad66 by yiyu.li

任务列表取消按钮

parent ed4174ad
......@@ -122,13 +122,13 @@
>{{ $t("1001") }}</Button
>
<!-- -->
<!-- <Button
<Button
type="warning"
class="twoWord"
icon="ios-search"
@click="cancel()"
>取消</Button
> -->
>
<!--只有状态是待执行的可以改成取消-->
<Button
type="primary"
......@@ -203,7 +203,6 @@ export default {
title: "产线层级",
key: "section",
width: 150,
},
{
title: "触发方",
......@@ -217,7 +216,6 @@ export default {
title: "工件编号",
key: "sn",
width: 150,
},
{
title: "工单编号",
......@@ -251,7 +249,6 @@ export default {
title: "动作",
key: "action",
width: 150,
},
{
title: "执行类型",
......@@ -320,10 +317,11 @@ export default {
sn: this.sn,
status: this.status,
actionType: this.performType,
triggerbegin: this.startTime.length>0?this.startTime[0]:'',
triggerend:this.startTime.length>0?this.startTime[1]:'',
complatebegin: this.endTime.length>0?this.endTime[0]:'',
complatend:this.endTime.length>0?this.endTime[1]:'',
triggerbegin:
this.startTime.length > 0 ? this.startTime[0] : "",
triggerend: this.startTime.length > 0 ? this.startTime[1] : "",
complatebegin: this.endTime.length > 0 ? this.endTime[0] : "",
complatend: this.endTime.length > 0 ? this.endTime[1] : "",
page: page,
pageSize: pagesize,
};
......@@ -343,23 +341,30 @@ export default {
});
},
cancel() {
if (this.detailobj.status != 1) {
console.log(this.detailobj);
if (!this.detailobj.id) {
this.$Message.error(this.$t(1043));
return false;
}
if (this.detailobj.send != 0) {
this.$Message.error("该任务清单状态不能取消");
return false;
}
return;
let data = {
section: this.sectionid,
};
// return;
// let data = {
// section: this.sectionid,
// };
this.request(
// "/acc/AutomationOperate/CompalateAssemble",
data,
"post"
"/acc/AutomationState/DeleteTask?id=" + this.detailobj.id,
"",
"get"
).then((res) => {
if (res.data.ret == 1) {
this.$Message.success(this.$t(res.data.msg));
this.search(1, 10);
} else {
this.$Message.error(this.$t(res.data.msg));
this.search(1, 10);
}
});
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment