|
|
@@ -217,7 +217,8 @@
|
|
|
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-sm btn-primary btn-lg" @click="paddingEmptyBox">填充空箱</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">
|
|
|
<option v-for="strategy in strategies" :value="strategy.code">@{{ strategy.name }}</option>
|
|
|
@@ -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 = {
|