Commit 510acdf2 by yiyu.li

按钮loading

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