Commit 4e7fad66 by yiyu.li

任务列表取消按钮

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