57 lines
1.4 KiB
Plaintext
57 lines
1.4 KiB
Plaintext
<div id="receiptin">
|
|
<a-space direction="vertical" fill>
|
|
<a-input :style="{width:'320px'}" placeholder="扫描箱号" v-model="ContainerCode" allow-clear/>
|
|
<a-button @@click="handleClick"
|
|
:loading="loading1"
|
|
type="primary">
|
|
入库
|
|
</a-button>
|
|
</a-space>
|
|
</div>
|
|
<script>
|
|
const { createApp, reactive, ref } = Vue
|
|
|
|
const app = createApp({
|
|
data() {
|
|
return {
|
|
ContainerCode: '',
|
|
loading1:false,
|
|
data: reactive([])
|
|
}
|
|
},
|
|
methods: {
|
|
handleClick() {
|
|
var _this = this;
|
|
if (_this.ContainerCode == ""){
|
|
_this.$message.error("请扫描箱号!");
|
|
return;
|
|
}
|
|
|
|
_this.loading1 = !_this.loading1
|
|
|
|
let postData = new URLSearchParams();
|
|
postData.append('containerCode', _this.ContainerCode);
|
|
|
|
axios.post("/receipt/ReceiptIn/TaskIn", postData)
|
|
.then(function (json) {
|
|
_this.loading1 = !_this.loading1;
|
|
if (json.data.Code == 200){
|
|
_this.ContainerCode = '';
|
|
_this.$message.success("入库任务创建成功!");
|
|
}
|
|
else{
|
|
_this.$message.error(json.data.Msg);
|
|
}
|
|
})
|
|
.catch(function (error) {
|
|
_this.$message.error(error);
|
|
});
|
|
}
|
|
}
|
|
});
|
|
app.use(ArcoVue)
|
|
.use(ArcoVueIcon)
|
|
.mount('#receiptin');
|
|
|
|
</script>
|