Commit 510acdf2 by yiyu.li

按钮loading

parent 8c5d4f65
...@@ -126,10 +126,16 @@ ...@@ -126,10 +126,16 @@
</div> </div>
</div> </div>
<div> <div>
<Button type="primary" @click="feedReady()" <Button
type="primary"
@click="feedReady()"
:loading="loading1"
>准备上料</Button >准备上料</Button
> >
<Button type="primary" @click="installOver()" <Button
type="primary"
@click="installOver()"
:loading="loading2"
>安装完成</Button >安装完成</Button
> >
</div> </div>
...@@ -218,11 +224,13 @@ ...@@ -218,11 +224,13 @@
<Button <Button
type="primary" type="primary"
@click="blankReady()" @click="blankReady()"
:loading="loading3"
>准备下料</Button >准备下料</Button
> >
<Button <Button
type="primary" type="primary"
@click="uninstallOver()" @click="uninstallOver()"
:loading="loading4"
>拆卸完成</Button >拆卸完成</Button
> >
</div> </div>
...@@ -336,6 +344,10 @@ export default { ...@@ -336,6 +344,10 @@ export default {
sectionid: 0, sectionid: 0,
tabindex: "1", tabindex: "1",
locationobj: {}, locationobj: {},
loading1: false,
loading2: false,
loading3: false,
loading4: false,
}; };
}, },
created() { created() {
...@@ -515,6 +527,8 @@ export default { ...@@ -515,6 +527,8 @@ export default {
this.$Message.error("请选择生产线、工位"); this.$Message.error("请选择生产线、工位");
return false; return false;
} }
this.loading1 = true;
let data = { let data = {
section: this.sectionid, section: this.sectionid,
code: this.orderDetail.orderNumber, code: this.orderDetail.orderNumber,
...@@ -526,8 +540,10 @@ export default { ...@@ -526,8 +540,10 @@ export default {
if (res.data.ret == 1) { if (res.data.ret == 1) {
console.log(res.data.data); console.log(res.data.data);
this.$Message.success(this.$t(res.data.msg)); this.$Message.success(this.$t(res.data.msg));
this.loading1 = false;
} else { } else {
this.$Message.error(this.$t(res.data.msg)); this.$Message.error(this.$t(res.data.msg));
this.loading1 = false;
} }
} }
); );
...@@ -538,6 +554,7 @@ export default { ...@@ -538,6 +554,7 @@ export default {
this.$Message.error("请选择工位"); this.$Message.error("请选择工位");
return false; return false;
} }
this.loading2 = true;
let data = { let data = {
section: this.sectionid, section: this.sectionid,
}; };
...@@ -549,8 +566,10 @@ export default { ...@@ -549,8 +566,10 @@ export default {
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.orderDetail = {}; // this.orderDetail = {};
this.loading2 = false;
} else { } else {
this.$Message.error(this.$t(res.data.msg)); this.$Message.error(this.$t(res.data.msg));
this.loading2 = false;
} }
}); });
}, },
...@@ -564,6 +583,8 @@ export default { ...@@ -564,6 +583,8 @@ export default {
this.$Message.error("请选择储位"); this.$Message.error("请选择储位");
return false; return false;
} }
this.loading3 = true;
let data = { let data = {
section: this.sectionid, section: this.sectionid,
id: this.locationobj.id, id: this.locationobj.id,
...@@ -572,8 +593,10 @@ export default { ...@@ -572,8 +593,10 @@ export default {
(res) => { (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.loading3 = false;
} else { } else {
this.$Message.error(this.$t(res.data.msg)); this.$Message.error(this.$t(res.data.msg));
this.loading3 = false;
} }
} }
); );
...@@ -584,6 +607,8 @@ export default { ...@@ -584,6 +607,8 @@ export default {
this.$Message.error("请选择工位"); this.$Message.error("请选择工位");
return false; return false;
} }
this.loading4 = true;
let data = { let data = {
section: this.sectionid, section: this.sectionid,
}; };
...@@ -595,8 +620,10 @@ export default { ...@@ -595,8 +620,10 @@ export default {
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.orderDetail2 = {}; this.orderDetail2 = {};
this.loading4 = false;
} else { } else {
this.$Message.error(this.$t(res.data.msg)); this.$Message.error(this.$t(res.data.msg));
this.loading4 = false;
} }
}); });
}, },
......
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