102 lines
2.6 KiB
Plaintext
102 lines
2.6 KiB
Plaintext
<div id="shipout">
|
|
<a-space direction="vertical" fill :size="large">
|
|
@* <a-input :style="{width:'320px'}" placeholder="扫描箱号" v-model="ContainerCode" allow-clear/> *@
|
|
<a-button @@click="handleClick"
|
|
:loading="loading1"
|
|
type="primary"
|
|
size="large">
|
|
呼叫出库
|
|
</a-button>
|
|
|
|
<a-divider />
|
|
<a-space>
|
|
<template #split>
|
|
<a-divider direction="vertical" />
|
|
</template>
|
|
<a-button @@click='handleAGVTask("OutIn")'
|
|
:loading="loading2"
|
|
type="primary"
|
|
status="warning"
|
|
size="large">
|
|
入库
|
|
</a-button>
|
|
|
|
<a-button @@click='handleAGVTask("Charge")'
|
|
:loading="loading2"
|
|
type="primary"
|
|
status="success"
|
|
size="large">
|
|
充电任务
|
|
</a-button>
|
|
|
|
@* <a-button @@click='handleAGVTask("Out")' *@
|
|
@* :loading="loading2" *@
|
|
@* type="outline" *@
|
|
@* size="large"> *@
|
|
@* 到出库点 *@
|
|
@* </a-button> *@
|
|
</a-space>
|
|
</a-space>
|
|
</div>
|
|
<script>
|
|
const { createApp, reactive, ref } = Vue
|
|
|
|
const app = createApp({
|
|
data() {
|
|
return {
|
|
ContainerCode: '',
|
|
loading1:false,
|
|
loading2:false,
|
|
data: reactive([])
|
|
}
|
|
},
|
|
methods: {
|
|
handleClick() {
|
|
var _this = this;
|
|
|
|
_this.loading1 = !_this.loading1
|
|
|
|
axios.post("/shipment/Shipout/CallBox", {})
|
|
.then(function (json) {
|
|
_this.loading1 = !_this.loading1;
|
|
if (json.data.Code == 200){
|
|
_this.$message.success("呼叫料盒任务创建成功!");
|
|
}
|
|
else{
|
|
_this.$message.error(json.data.Msg);
|
|
}
|
|
})
|
|
.catch(function (error) {
|
|
_this.$message.error(error);
|
|
});
|
|
},
|
|
handleAGVTask(val) {
|
|
var _this = this;
|
|
|
|
_this.loading2 = !_this.loading2
|
|
|
|
let postData = new URLSearchParams();
|
|
postData.append('type', val);
|
|
|
|
axios.post("/shipment/Shipout/AgvTask", postData)
|
|
.then(function (json) {
|
|
_this.loading2 = !_this.loading2;
|
|
if (json.data.Code == 200){
|
|
_this.$message.success("任务创建成功!");
|
|
}
|
|
else{
|
|
_this.$message.error(json.data.Msg);
|
|
}
|
|
})
|
|
.catch(function (error) {
|
|
_this.$message.error(error);
|
|
});
|
|
}
|
|
}
|
|
});
|
|
app.use(ArcoVue)
|
|
.use(ArcoVueIcon)
|
|
.mount('#shipout');
|
|
|
|
</script>
|