Sfoglia il codice sorgente

临时增加海柔二期机器人操作口

Zhouzhendong 4 anni fa
parent
commit
3bb83a3e9c
1 ha cambiato i file con 45 aggiunte e 6 eliminazioni
  1. 45 6
      resources/views/station/monitor/show.blade.php

+ 45 - 6
resources/views/station/monitor/show.blade.php

@@ -217,6 +217,7 @@
                                            placeholder="点选此处写入料箱号,可以省略IDE前缀和0,多个用空格分隔,例入:5121 156"></textarea>
                                             <button class="btn btn-info btn-lg" @click="manuallyTakeBoxOut">出库</button>
                                             <button class="btn btn-success btn-lg" @click="manuallyTakeBoxOutTwo">二期出库</button>
+                                            <button class="btn btn-success btn-lg" @click="manuallyTakeBoxInTwo">二期入库</button>
 <!--                                            <button class="btn btn-sm btn-primary btn-lg" @click="paddingEmptyBox">填充空箱</button>-->
                                             <div class="row mt-1">
                                                 <select class="form-control ml-3" v-model="type" style="width:150px">
@@ -589,11 +590,7 @@
                         timeout:3000,
                     })
                 },
-                manuallyTakeBoxOutTwo(){
-                    if (this.inputs.manuallyTakeBox.text.length === 13 && this.inputs.manuallyTakeBox.text.substring(0,1) === "W"){
-                        this._waveOutBound(this.inputs.manuallyTakeBox.text);
-                        return;
-                    }
+                _formatBoxes(){
                     let arr = this.inputs.manuallyTakeBox.text.trim().split(/\s+/);
                     if (arr.length===0){
                         return;
@@ -605,7 +602,49 @@
                             boxes.push(before.substring(0,before.length - box.length)+box);
                         }
                     });
-                    if (boxes.length === 0){
+                    return boxes;
+                },
+                manuallyTakeBoxInTwo(){
+                    let boxes = this._formatBoxes();
+                    if (boxes.length===0){
+                        return;
+                    }
+                    window.tempTip.inputVal('请输入货主名称:',(code)=>{
+                        let obj = {
+                            "boxCodes":boxes,
+                            "toLocations":null,
+                            "owner":code,
+                        }
+                        $.ajax({
+                            url: this.baseUrl+"device/robot/hairou/task/createInBound/custom",
+                            type: "post",
+                            headers: {'Content-Type':'application/json;charset=utf8'},
+                            data: JSON.stringify(obj),
+                            success : (res,status)=>{
+                                if (res.code === 200 && res.data){
+                                    window.tempTip.showSuccess("开始执行");
+                                } else {
+                                    window.tempTip.show(res.message);
+                                }
+                            },
+                            error : (err,status)=>{
+                                window.tempTip.show("系统错误");
+                            },
+                            timeout:3000,
+                        })
+                    });
+                },
+                manuallyTakeBoxOutTwo(){
+                    if (this.inputs.manuallyTakeBox.text.length === 13 && this.inputs.manuallyTakeBox.text.substring(0,1) === "W"){
+                        this._waveOutBound(this.inputs.manuallyTakeBox.text);
+                        return;
+                    }
+                    let arr = this.inputs.manuallyTakeBox.text.trim().split(/\s+/);
+                    if (arr.length===0){
+                        return;
+                    }
+                    let boxes = this._formatBoxes();
+                    if (boxes.length===0){
                         return;
                     }
                     let obj = {