|
|
@@ -0,0 +1,75 @@
|
|
|
+@extends('layouts.app')
|
|
|
+@section('title')料箱绑定货架-入库管理@endsection
|
|
|
+
|
|
|
+@section('content')
|
|
|
+ <div class="container-fluid d-none" id="container">
|
|
|
+ <div class="mt-3 col-8 offset-2">
|
|
|
+ <div class="form-group row">
|
|
|
+ <label for="ide">料箱编码</label>
|
|
|
+ <input id="ide" type="text" class="form-control" v-model="info.ide" @blur="completion()"></input>
|
|
|
+ </div>
|
|
|
+ <div class="form-group row mt-4">
|
|
|
+ <label for="model">选择型号</label>
|
|
|
+ <select class="form-control" id="model" v-model="info.material_box_model_id">
|
|
|
+ <option v-for="model in models" :value="model.id">@{{ model.description }}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="input-group row mt-5">
|
|
|
+ <button type="submit" id="submit" class="btn btn-success offset-2 col-10" @click="submitBind()">提交</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+@stop
|
|
|
+
|
|
|
+@section('lastScript')
|
|
|
+ <script type="text/javascript">
|
|
|
+ new Vue({
|
|
|
+ el:"#container",
|
|
|
+ data:{
|
|
|
+ models:[@foreach($models as $model)@json($model),@endforeach],
|
|
|
+ before:{},
|
|
|
+ isAndroid:false,
|
|
|
+ info:{},
|
|
|
+ },
|
|
|
+ mounted(){
|
|
|
+ if (navigator.userAgent.indexOf("Android")!==-1)this.isAndroid = true;
|
|
|
+ this.createBefore();
|
|
|
+ this.pageInit();
|
|
|
+ $("#container").removeClass("d-none");
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ //页面初始化
|
|
|
+ pageInit(){
|
|
|
+ if (!this.isAndroid)return;
|
|
|
+ let element = document.getElementById("navbarSupportedContent").parentElement;
|
|
|
+ element.className = "row";
|
|
|
+ element.children[0].className += " col-5";
|
|
|
+ element.children[0].href = "#";
|
|
|
+ element.innerHTML = element.children[0].outerHTML;
|
|
|
+ let e1 = document.getElementById("menu");
|
|
|
+ let e2 = document.getElementById("demand-div");
|
|
|
+ if (e1)e1.remove();
|
|
|
+ if (e2)e2.remove();
|
|
|
+ document.getElementById("container").style.height = (window.innerHeight-100)+"px";
|
|
|
+ },
|
|
|
+ createBefore(){
|
|
|
+ this.before.ide = 'IDE000000';
|
|
|
+ },
|
|
|
+ completion(){
|
|
|
+ if(!this.info.ide)return;
|
|
|
+ let len = this.info.ide.length;
|
|
|
+ if (len<10)this.info.ide = this.before.ide.substr(0,10-len)+this.info.ide;
|
|
|
+ window.tempTip.postBasicRequest("{{url('store/inStorage/searchIde')}}",{ide:this.info.ide},res=>{
|
|
|
+ this.info.material_box_model_id = res;
|
|
|
+ },true)
|
|
|
+ },
|
|
|
+ submitBind(){
|
|
|
+ window.tempTip.postBasicRequest("{{url('store/inStorage/boxBindModel')}}",this.info,()=>{
|
|
|
+ this.info = {};
|
|
|
+ return "绑定成功";
|
|
|
+ })
|
|
|
+ },
|
|
|
+ },
|
|
|
+ });
|
|
|
+ </script>
|
|
|
+@stop
|