Przeglądaj źródła

手持入库页面临时提交

hu hao 4 lat temu
rodzic
commit
51e1d2079c

+ 30 - 0
resources/views/store/handInStorage/androidIndex.blade.php

@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="h-100">
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <link rel="icon" href="{{asset('icon/faviconc.ico')}}" type="image/x-icon"/>
+    <!-- CSRF Token -->
+    <meta name="csrf-token" content="{{ csrf_token() }}">
+    <title>手持入库首页</title>
+    <link href="{{ mix('css/app.css') }}" rel="stylesheet">
+</head>
+<body class="h-100">
+<div class="container-fluid h-100 text-center">
+    <div class="container-fluid h-25">
+        <a class="navbar-brand" href="{{ url('/control/panel/menu') }}" title="宝时 Warehouse Assistance System" style="vertical-align: text-bottom">
+            <img src="{{asset('icon/logo100b.png')}}" alt="宝时 Warehouse Assistance System" height="30" >
+        </a>
+    </div>
+    <div class="text-center h-75">
+        <div class="w-100 center h-75 row align-items-center justify-content-center">
+            <div class="w-100">
+                <a href="{{url('')}}"><button class="btn btn-info w-75 text-white" style="height: 60px"><h4>收货</h4></button></a>
+                <a href="{{url('')}}"><button class="btn btn-info w-75 mt-3 text-white" style="height: 60px"><h4>上架</h4></button></a>
+            </div>
+        </div>
+    </div>
+</div>
+<script src="{{ mix('js/app.js') }}"></script>
+</body>
+</html>

+ 0 - 0
resources/views/store/handInStorage/putaway.blade.php


+ 125 - 0
resources/views/store/handInStorage/receive.blade.php

@@ -0,0 +1,125 @@
+@extends('layouts.app')
+@section('title')手持入库-收货@endsection
+
+@section('content')
+    <div class="container-fluid d-none" id="container">
+        <div class="card offset-md-3 col-md-6 col-sm-12">
+            <div class="card-header text-center mt-2 bg-transparent" id="header_title">
+                <span class="font-weight-bold h4">收货</span>
+            </div>
+            <div class="card-body">
+                <div class="offset-2">
+                    <span class="font-weight-bold">ASN号:</span>
+                    <div class="form-group row mt-2">
+                        <label for="asn"></label>
+                        <input type="text" class="form-control col-8" id="asn"
+                               @change="downSign()" :class="errors.asn ? 'is-invalid' : ''" @keydown.enter="enterVal($event)" v-model="info.asn" @blur="checkAsn()">
+                        <span class="invalid-feedback offset-3" role="alert" v-if="errors.asn">
+                            <strong>@{{ errors.asn[0] }}</strong>
+                        </span>
+                        <span class="ml-2">
+                             <button type="button" id="select" class="btn btn-info" @click="selectAsn()">搜索</button>
+                        </span>
+                    </div>
+                </div>
+            </div>
+            <div class="card-footer bg-transparent">
+                <button type="button" id="confirm" class="btn btn-sm btn-outline-success float-right" @click="">确定</button>
+                <button type="button" id="cancel" class="btn btn-sm btn-outline-info float-left" @click="">取消</button>
+            </div>
+        </div>
+    </div>
+@stop
+
+@section('lastScript')
+    <script type="text/javascript">
+        new Vue({
+            el:"#container",
+            data:{
+                permissionList:[ //允许聚焦许可列表
+                    "asn","station","amount","location","ov_amount"
+                ],
+                info:{},
+                mount:false,
+                before:{
+                    asn:"",
+                },
+                focus:"",
+                errors:{},
+                ov:{},//溢出减量数值
+                checkSign:false,
+                element:[
+                    "asn","station","barCode","amount","submit"
+                ],
+                isAndroid:false,
+            },
+            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.innerHTML = element.children[0].outerHTML;
+                    let e1 = document.getElementById("menu");
+                    let e2 = document.getElementById("demand-div");
+                    if (e1)e1.remove();
+                    if (e2)e2.remove();
+                },
+                // checkInfo(){
+                //     let error = {};
+                //     if (!this.info.asn)error.asn = ["ASN号必填"];
+                //     if (this.info.asn && this.info.asn.length!==13)error.asn = ["非法ASN号"];
+                //     if (!this.info.barCode)error.barCode = ["商品条码必填"];
+                //     if (!this.info.station)error.station = ["库位必填"];
+                //     if (!this.info.amount && !this.info.maximum)error.amount = ["数量必填"];
+                //     if (JSON.stringify(error)!=='{}'){this.errors = error;return;}
+                //     if (!this.info.amount && this.info.maximum)this.info.amount = this.info.maximum;
+                // },
+                createBefore(){
+                    let now = new Date();
+                    let yy = now.getFullYear().toString().substr(2, 2);
+                    let mm = now.getMonth() + 1;
+                    mm = mm <10 ? '0'+mm : mm.toString();
+                    let dd = now.getDate();
+                    dd = dd <10 ? '0'+dd : dd.toString();
+                    this.before.asn = 'ASN'+yy+mm+dd+'000';
+                },
+                checkAsn(){
+                    if(!this.info.asn)return;
+                    let len = this.info.asn.length;
+                    if (len<13)this.info.asn = this.before.asn.substr(0,13-len)+this.info.asn;
+                    if (!this.checkSign)this.checkMaximum(e,'');
+                },
+                downSign(){
+                    this.checkSign = false;
+                },
+                checkMaximum(){
+                    if (!this.info.asn || !this.info.barCode || this.checkSign)return;
+                    window.tempTip.postBasicRequest("{{url('store/inStorage/checkMaximum')}}",this.info,res=>{
+                        this.info.maximum = res.maximum;
+                        this.info.material_box_id = res.material_box_id;
+                        this.info.material_box_model_id = res.material_box_model_id;
+                        this.info.commodity_id = res.commodity_id;
+                        if(!this.info.amount)this.info.amount = res.maximum;
+                        return "该库位最大可上数为"+res.maximum;
+                    });
+                    this.checkSign = true;
+                },
+                enterVal(e){
+                    let index = this.element.indexOf(e.target.id)+1;
+                    let element = document.getElementById(this.element[index]);
+                    if (element)element.focus();
+                    e.preventDefault();
+                    return false;
+                }
+            },
+        });
+    </script>
+@stop

+ 5 - 0
routes/web.php

@@ -468,6 +468,11 @@ Route::group(['middleware'=>'auth'],function ($route){
             Route::post('android.login','StorageController@androidLogin');
             Route::get('boxBindShelf',function (){return view("store.inStorage.bindShelf");});
         });
+        Route::group(['prefix'=>'handInStorage'],function() {
+            Route::get('receive',function (){return view('store.handInStorage.receive');});//收货页面
+            Route::get('putaway',function (){return view('store.handInStorage.putaway');});//上架页面
+            Route::get('android.index',function (){return view('store.handInStorage.androidIndex');});
+        });
         Route::group(['prefix'=>'fast'],function() {
             Route::resource('storeItem','StoreItemController');
         });