From 2056ae6f3d8243b0555f437ec6d214666d5bde53 Mon Sep 17 00:00:00 2001
From: chengsc <11752@DESKTOP-DS49RCP>
Date: 星期一, 02 六月 2025 09:43:19 +0800
Subject: [PATCH] 修改问题

---
 Pda/View/AsnSetting/WorkshopIn.html           |  571 +++++++++++++++++++++++++++
 Wms/WMS.BLL/HttpServer.cs                     |   28 
 Wms/Wms/Controllers/UpApiController.cs        |    2 
 Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs       |    8 
 Pda/View/SoSetting/ExNoticeOut.html           |   29 +
 Wms/Wms/Controllers/PdaAsnController.cs       |   54 ++
 Wms/WMS.Entity/BllAsnEntity/BllPalletBind.cs  |    2 
 Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs      |  452 +++++++++++++++++++++
 Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs |    2 
 Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs      |    6 
 Wms/Wms/Controllers/PdaSoController.cs        |   13 
 Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs       |   55 ++
 Wms/Model/ModelVm/PdaVm/PdaAsnVm.cs           |   10 
 13 files changed, 1,192 insertions(+), 40 deletions(-)

diff --git a/Pda/View/AsnSetting/WorkshopIn.html b/Pda/View/AsnSetting/WorkshopIn.html
index e69de29..3ce1a48 100644
--- a/Pda/View/AsnSetting/WorkshopIn.html
+++ b/Pda/View/AsnSetting/WorkshopIn.html
@@ -0,0 +1,571 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" />
+    <meta charset="UTF-8" />
+    <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> -->
+    <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> -->
+    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
+    <title>Boxline PDA</title>
+
+    <link rel="stylesheet" href="/layui/css/layui.css" />
+    <link rel="stylesheet" href="/css/style.css" />
+    <script src="/js/adaptive.js"></script>
+    <link rel="stylesheet" href="/css/my.css" />
+    <style type="text/css">
+        td {
+            word-break: break-all;
+            word-wrap: break-word;
+        }
+
+        .layui-form-switch {
+            margin-top: 0;
+        }
+
+        /* 鏍囩鏍峰紡 */
+        .tableyang-this a {
+            margin: 10px 10px 0px 0px;
+            line-height: 30px;
+            width: 100px;
+            color: #999;
+            text-align: center;
+            float: left;
+            background: #f7f7f7;
+            user-select: none;
+            position: relative;
+            z-index: 1;
+            cursor: pointer;
+            border-radius: 5px;
+            border: 1px solid #ccc;
+            transition: all 0.3s ease;
+        }
+
+        .tableyang-this a.hover {
+            color: #5298ff;
+            background-color: #eff2ff;
+            border: 1px solid #5298ff;
+        }
+
+        /* 鍐呭灞呬腑 */
+        .tableyang-tab {
+            display: flex;
+            /* justify-content: center; */
+            /* align-items: center; */
+            flex-direction: column;
+            height: 90vh;
+        }
+
+        /* 蹇呯敤鏍峰紡 */
+        .tableyang-2,
+        .tableyang-3 {
+            display: none;
+        }
+
+        ul {
+            list-style-type: none;
+            padding: 0;
+        }
+
+        li {
+            cursor: pointer;
+            background-color: lightgray;
+            padding: 10px;
+            margin-bottom: 5px;
+        }
+    </style>
+    <link rel="stylesheet" href="/css/adapter.css" />
+    <script src="../../js/jquery.js"></script>
+    <script src="../../js/jquery-3.5.1.min.js"></script>
+</head>
+
+<body>
+    <div id="" class="main-content">
+
+        <div id="" class="layout-title">
+            <table border="" cellspacing="" cellpadding="">
+                <tr>
+                    <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg"></a></td>
+                    <td class="title-text" lang>杞﹂棿鍏ュ簱</td>
+                    <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg"></td>
+                </tr>
+            </table>
+        </div>
+
+        <div id="" class="layout-sub-content">
+            <div id="menuList" class="menu">
+                <ul class="" style="text-align: center;">
+                    <li><a href="../index.html" lang>涓婚〉</a></li>
+                    <!-- <li><a href="productEnterConfirm.html">鍏ュ簱淇℃伅纭</a></li> -->
+                    <li><a href="../login.html" lang>閲嶆柊鐧诲綍</a></li>
+                </ul>
+            </div>
+
+            <button id="option1" class="layout-btn" type="button">鏍囩</button>
+            <button id="option2" class="layout-btn" type="button">鏁伴噺</button>
+            <br /><br />
+
+            <!-- 鏈夌爜 -->
+            <div id="content1">
+                <div id="zongDiv" class="layout-bill-info" style="height: 285px;">
+                    <form class="layui-form" action="">
+                        
+                        <div id="" class="layui-form-item layout-input">
+                            <label class="layui-form-label" lang>鎵樼洏鏉$爜锛�</label>
+                            <div class="layui-input-block">
+                                <input id="PalletNo" type="text" lay-verify="stock" lang langholder
+                                    placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" autocomplete="off" class="layui-input">
+                            </div>
+                        </div>
+                        <div id="BOX" class="layui-form-item layout-input">
+                            <label class="layui-form-label" lang>澶栫鏉$爜锛�</label>
+                            <div class="layui-input-block">
+                                <input id="BoxCode" type="text" lay-verify="required" lang langholder
+                                    placeholder="璇锋壂鎻忓绠辨潯鐮�" autocomplete="off" class="layui-input">
+                            </div>
+                        </div>
+                        <div id="" class="layui-form-item layout-input">
+                           <label class="layui-form-label" lang>鏁伴噺锛�</label>
+                            <div class="layui-input-block">
+                                <input id="BoxNum" type="number" lay-verify="required" lang langholder
+                                    placeholder="璇疯緭鍏ユ暟閲�" autocomplete="off" class="layui-input" 
+                                    oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
+                            </div>
+                        </div>
+                        <div id="" class="layui-form-item layout-dropdownlist">
+                            <label class="layui-form-label" lang>杞﹂棿锛�</label>
+                            <div class="layui-input-block" id="selectAreaDiv">
+                                <select id="area" lay-filter="getarea" lay-search>
+                                    <option value="B06">1002</option>
+                                    <option value="B09">1003涓�妤�</option>
+                                    <option value="B07">1003浜屾ゼ</option>
+                                </select>
+                                <img src="/assets/down_arraw.png">
+                            </div>
+                        </div>
+                        <table class="layout-tbl-input" border="" cellspacing="" cellpadding="">
+                            <tr>
+                                <td>
+                                    <div id="" class="layui-form-item layout-boxinfo">
+                                        <label class="layui-form-label" lang>鎵规:</label>
+                                        <div class="layui-input-block">
+                                            <input id="LotNo" type="text" disabled placeholder="" autocomplete="off"
+                                                class="layui-input">
+                                        </div>
+                                    </div>
+                                </td>
+                                <td>
+                                    <div id="" class="layui-form-item layout-boxinfo">
+                                        <label class="layui-form-label" lang>鐗╂枡鍚嶇О锛�</label>
+                                        <div class="layui-input-block">
+                                            <input id="SkuName" type="text" disabled placeholder="" autocomplete="off"
+                                                class="layui-input">
+                                        </div>
+                                    </div>
+                                </td>
+                                
+                            </tr>
+                        </table>
+
+                        <table class="layout-tbl-submit" border="" cellspacing="" cellpadding="">
+                            <tr>
+                                <td style="width: 23%;"></td>
+                                <td>
+                                    <button class="layout-btn layout-btn-red" lang type="button" lay-submit
+                                        lay-filter="formBind">缁戝畾鍒版墭鐩�</button>
+                                </td>
+                                <td style="width: 33%;"></td>
+
+                            </tr>
+                        </table>
+                    </form>
+                </div>
+
+            </div>
+            <!-- 鏃犵爜 -->
+            <div id="content2">
+                <div id="zongDiv2" class="layout-bill-info" style="height: 255px;">
+                    <form class="layui-form" id="form2" action="">
+                       <div id="" class="layui-form-item layout-input">
+                            <label class="layui-form-label" lang>鐗╂枡缂栫爜锛�</label>
+                            <div class="layui-input-block">
+                                <input id="SkuNo" type="text" lay-verify="stock" lang langholder
+                                    placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" autocomplete="off" class="layui-input">
+                            </div>
+                        </div><div id="" class="layui-form-item layout-input">
+                            <label class="layui-form-label" lang>鎵规鍙凤細</label>
+                            <div class="layui-input-block">
+                                <input id="LotNo2" type="text" lay-verify="stock" lang langholder
+                                    placeholder="璇疯緭鍏ユ壒娆�" autocomplete="off" class="layui-input">
+                            </div>
+                        </div>
+                        <div id="" class="layui-form-item layout-input">
+                            <label class="layui-form-label" lang>鎵樼洏鏉$爜锛�</label>
+                            <div class="layui-input-block">
+                                <input id="PalletNo2" type="text" lay-verify="stock" lang langholder
+                                    placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" autocomplete="off" class="layui-input">
+                            </div>
+                        </div>
+
+                        <div id="" class="layui-form-item layout-input">
+                            <label class="layui-form-label" lang>鐗╂枡鏁伴噺锛�</label>
+                            <div class="layui-input-block">
+                                <input id="SkuQty2" type="number" lay-verify="stock" lang langholder
+                                    placeholder="璇疯緭鍏ョ墿鏂欐暟閲�" autocomplete="off" class="layui-input"
+                                    oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
+                            </div>
+                        </div>
+                        <div id="" class="layui-form-item layout-dropdownlist">
+                            <label class="layui-form-label" lang>杞﹂棿锛�</label>
+                            <div class="layui-input-block" id="selectAreaDiv2">
+                                <select id="area2" lay-filter="getarea2" lay-search>
+                                    <option value="B06">1002</option>
+                                    <option value="B09">1003涓�妤�</option>
+                                    <option value="B07">1003浜屾ゼ</option>
+                                </select>
+                                <img src="/assets/down_arraw.png">
+                            </div>
+                        </div>
+                        <table class="layout-tbl-submit" border="" cellspacing="" cellpadding="">
+                            <tr>
+                                <td style="width: 23%;"></td>
+                                <td>
+                                    <button class="layout-btn layout-btn-red" lang type="button" lay-submit
+                                        lay-filter="formBind">缁戝畾鍒版墭鐩�</button>
+                                </td>
+                                <td style="width: 33%;"></td>
+
+                            </tr>
+                        </table>
+
+                    </form>
+                </div>
+
+                <br>
+                <br>
+                <div id="demodiv1">
+                    <br><br><br><br><br><br><br>
+                </div>
+
+
+                <!-- <div id="" class="cut-line">
+                    <img src="/assets/fengexian.png">
+                </div> -->
+
+                <!-- <div class="layout-tbl-paging" id="">
+                    <table id="tableBoxList1" class="tbl-box-list" border="" cellspacing="" cellpadding="">
+                        <tr>
+                            <th lang style="width: 15%;">鐗╂枡缂栫爜</th>
+                            <th lang style="width: 35%;">鐗╂枡鍚嶇О</th>
+                            <th lang style="width: 25%;">鎵规</th>
+                            <th lang style="width: 15%;">鐗╂枡鏁伴噺</th>
+                            <th lang style="width: 10%;">鎿嶄綔</th>
+                        </tr>
+                        <tr id="boxCell" style="display: none;">
+                            <td name="code">AG000001</td>
+                            <td name="name">鐤嫍鍚嶇О鍚嶇О鍚嶇О</td>
+                            <td name="lotNo">鎵规鍙�</td>
+                            <td name="num">30</td>
+                            <td name="del">
+                                <div id="" class="tbl-btn-del" lang>
+                                    鍒犻櫎
+                                </div>
+                            </td>
+                        </tr>
+                    </table>
+
+                    <table id="tableBoxPages1" class="tbl-box-pages" border="" cellspacing="" cellpadding="">
+                        <tr>
+                            <td class="page-prev">涓婁竴椤�</td>
+                            <td class="page-num page-num-select">1</td>
+                            <td class="page-num">2</td>
+                            <td class="page-num">3</td>
+                            <td class="page-num">4</td>
+                            <td class="page-num">5</td>
+                            <td class="page-next">涓嬩竴椤�</td>
+                        </tr>
+                    </table>
+                </div> -->
+
+            </div>
+
+        </div>
+    </div>
+    <script src="/js/jquery-3.5.1.min.js"></script>
+    <script src="/layui/layui.js"></script>
+    <script src="/js/public.js"></script>
+    <script src="/js/language.js"></script>
+    <script src="/js/jquery.cookie.js"></script>
+    <script>
+        layui.use(['form', 'jquery'], function () {
+            var form = layui.form
+
+            /* 鏍囩鍒囨崲浠g爜 */
+            $('#demodiv').hide();
+            $('#demodiv1').hide();
+            var xianshiyemian = 0;
+
+            $('#option1').attr("style", "background-color: red;width: 50%;float: left;text-align: center;"); //閫変腑鍚庨鑹�
+            $('#option2').attr("style", "background-color: #999;width: 50%;float: right;text-align: center;"); //榛樿棰滆壊
+            $('#content2').hide();
+            $(document).ready(function () {
+                $('#option1').click(function () {
+                    // qingkong();
+                    xianshiyemian = 0;
+                    $('#content1').show();
+                    $('#option1').attr("style", "background-color: red;width: 50%;float: left;text-align: center;"); //閫変腑鍚庨鑹�
+
+                    $('#content2').hide();
+                    $('#option2').attr("style", "background-color: #999;width: 50%;float: right;text-align: center;"); //榛樿棰滆壊
+                });
+
+                $('#option2').click(function () {
+                    // qingkong();
+                    xianshiyemian = 1;
+                    $('#content1').hide();
+                    $('#option1').attr("style", "background-color: #999;width: 50%;float: left;text-align: center;"); //榛樿棰滆壊
+
+
+                    $('#content2').show();
+                    $('#option2').attr("style", "background-color: red;width: 50%;float: right;text-align: center;"); //閫変腑鍚庨鑹�
+
+                });
+            });
+
+            /*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/
+
+            initLanguage()
+            setLanguage()
+
+             
+            //鏄惁杩炵画缁勬墭
+            isContinue = "0";
+
+
+            // 鎵樼洏鐮佹枃鏈敼鍙樻椂瑙﹀彂
+            $("#PalletNo").on('input', function () {
+
+                if ($("#PalletNo").val() == "" || $("#PalletNo").val().length < 8) {
+                    return;
+                }
+                if ($("#PalletNo").val().length >= 8) {
+                    $("#PalletNo").val($("#PalletNo").val().substr(-8))
+                }
+                checkPalletStat()
+            })
+            // 鎵樼洏鐮佹枃鏈敼鍙樻椂瑙﹀彂-鏁伴噺
+            $("#PalletNo1").on('input', function () {
+
+                if ($("#PalletNo1").val() == "" || $("#PalletNo1").val().length < 8) {
+                    return;
+                }
+                if ($("#PalletNo1").val().length >= 8) {
+                    $("#PalletNo1").val($("#PalletNo1").val().substr(-8))
+                }
+                checkPalletStat()
+            })
+
+            // 鍒ゆ柇鎵樼洏鐮佹槸鍚﹀彲鐢�
+            function checkPalletStat() {
+                if (xianshiyemian == 0) {
+                    var param = {
+                        "PalletNo": $("#PalletNo").val()
+                    }
+                    sendData(IP + "/PdaAsn/IsEnablePalletNo", param, 'post', function (res) {
+                        if (res.code == 0) {
+                            $("#BoxCode").focus();
+
+                        } else {
+                            layer.msg(res.msg, {
+                                icon: 2,
+                                time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            }, function () { });
+                        }
+                    });
+                }
+                else if (xianshiyemian == 1) {
+                    var param = {
+                        "PalletNo": $("#PalletNo1").val()
+                    }
+                    sendData(IP + "/PdaAsn/IsEnablePalletNo", param, 'post', function (res) {
+                        if (res.code == 0) {
+
+                            $("#SkuQty").focus();
+
+                        } else {
+                            layer.msg(res.msg, {
+                                icon: 2,
+                                time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            }, function () { });
+                        }
+                    });
+                }
+
+            }
+
+
+            //绠辩爜鍥炶溅浜嬩欢
+            $("#BoxCode").keydown(function (e) {
+                if (e.keyCode === 13) {
+                    if ($("#BoxCode").val() == "") {
+                        layer.msg('璇峰厛鎵弿绠辩爜', {
+                            icon: 2,
+                            time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                        });
+                        return
+                    } 
+                    checkBoxInfo()
+                }
+            });
+
+            //绠卞洖杞︿簨浠�
+            function checkBoxInfo() {
+                var param = {
+                    "BoxNo": $("#BoxCode").val(),
+                }
+                sendData(IP + "/PdaAsn/GetWmsBoxInfos", param, 'post', function (res) {
+                    
+                    if (res.code == 0) { //鎴愬姛
+                        $("#BoxNum").val(res.data[0].Qty);
+                        $("#SkuName").val(res.data[0].SkuName);
+                        $("#LotNo").val(res.data[0].LotNo);
+                        
+                    } else { //涓嶆垚鍔�
+                        layer.msg(res.msg, {
+                                icon: 2,
+                                time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            });
+                         
+                    }
+                });
+
+            } 
+            
+            //缁戝畾鍒版墭鐩樹簨浠�
+            form.on('submit(formBind)', function (data) {
+                if (xianshiyemian == 0) {
+                    
+                    if ($("#PalletNo").val() == "") {
+                        layer.msg('璇锋壂鎻忔墭鐩樻潯鐮�', {
+                            icon: 2,
+                            time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                        });
+                        return;
+                    }
+                    if ($("#BoxCode").val() == "") {
+                        layer.msg('璇锋壂鎻忓绠辨潯鐮�', {
+                            icon: 2,
+                            time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                        });
+                        return;
+                    }
+                    var param = {
+                        PalletNo: $("#PalletNo").val(),
+                        BoxNo: $("#BoxCode").val(),
+                        SkuQty: parseFloat($("#BoxNum").val()), //鐗╂枡鏁伴噺
+                        AreaNo:$("#area").val(),
+                        TableType: xianshiyemian,
+                    }
+                    console.log(param)
+                    //缁勭洏
+                    sendData(IP + "/PdaAsn/ChejianIn", param, 'post', function (res) {
+                        if (res.code == 0) { //鎴愬姛
+                            layer.msg(res.msg, {
+                                icon: 1,
+                                time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            }, function () {
+                                $("#BoxCode").val("");
+                                $("#BoxNum").val("");
+                                $("#SkuName").val("");
+                                $("#LotNo").val("");
+                                 
+                            });
+                        } else { //涓嶆垚鍔�
+                            layer.msg(res.msg, {
+                                icon: 2,
+                                time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            }, function () {
+                                //鍥炶皟
+                            });
+                        }
+                    });
+                }
+                else if (xianshiyemian == 1) {
+                    if ($("#bar1").val() == "") {
+                        layer.msg('璇烽�夋嫨鍏ュ簱鍗�', {
+                            icon: 2,
+                            time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                        });
+                        return;
+                    }
+                    if ($("#SkuNo").val() == "") {
+                        layer.msg('璇疯緭鍏ョ墿鏂�', {
+                            icon: 2,
+                            time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                        });
+                        return;
+                    }
+                    if ($("#PalletNo2").val() == "") {
+                        layer.msg('璇锋壂鎻忔墭鐩樻潯鐮�', {
+                            icon: 2,
+                            time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                        });
+                        return;
+                    }
+                     var param = {
+                        PalletNo: $("#PalletNo2").val(),
+                        SkuNo: $("#SkuNo").val(),
+                        LotNo: $("#LotNo2").val(),
+                        SkuQty: parseFloat($("#SkuQty2").val()), //鐗╂枡鏁伴噺
+                        AreaNo:$("#area").val(),
+                        TableType: xianshiyemian,
+                    }
+                    console.log(param)
+                    //缁勭洏
+                    sendData(IP + "/PdaAsn/ChejianIn", param, 'post', function (res) {
+                        if (res.code == 0) { //鎴愬姛
+                            layer.msg(res.msg, {
+                                icon: 1,
+                                time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            }, function () {
+                                $("#PalletNo2").val("");
+                                $("#SkuNo").val("");
+                                $("#SkuQty2").val("");
+                                $("#LotNo2").val("");
+                                 
+                            });
+                        } else { //涓嶆垚鍔�
+                            layer.msg(res.msg, {
+                                icon: 2,
+                                time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            }, function () {
+                                //鍥炶皟
+                            });
+                        }
+                    });
+                }
+
+                return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆�
+            });
+
+            
+
+            /*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/
+
+            $("#menuImg").click(function (e) {
+                e.stopPropagation()
+
+                if ($("#menuList").is(":hidden")) {
+                    $("#menuList").show()
+                } else {
+                    $("#menuList").hide()
+                }
+            })
+            $('body').click(function () {
+                $("#menuList").hide()
+            })
+        })
+    </script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/Pda/View/SoSetting/ExNoticeOut.html b/Pda/View/SoSetting/ExNoticeOut.html
index 0643eae..26b6c46 100644
--- a/Pda/View/SoSetting/ExNoticeOut.html
+++ b/Pda/View/SoSetting/ExNoticeOut.html
@@ -147,13 +147,22 @@
 
             //閫変腑鍗曟嵁浜嬩欢
 			form.on('select(getbar)', function (data) {
-				
+				$("#PalletNo").empty()
+                $("#PalletNo").append('<option value =>' + '</option>');
+                form.render('select');
 				if (data.value == "") {
 					return;
 				}
 				updateGoodList();
+				
 			});
-
+			//閫変腑鍗曟嵁鏄庣粏浜嬩欢
+			form.on('select(goodSelect)', function (data) {
+				
+				$("#PalletNo").empty()
+                $("#PalletNo").append('<option value =>' + '</option>');
+                form.render('select');
+			});
 			$("#selectDiv").click(function () {
 				var input = $('select[id="bar"]').next().find('.layui-select-title input')
 				var val = input.val()
@@ -163,6 +172,17 @@
 					$('select[id="bar"]').next().find('.layui-select-title input').val(val)
 				})
 			})
+
+			$("#selectPalletNo").click(function () {
+				var input = $('select[id="PalletNo"]').next().find('.layui-select-title input')
+				var val = input.val()
+				//鍏堟洿鏂颁竴涓嬪嚭搴撳崟
+				updatePalletNoList(function (data) {
+					$('select[id="PalletNo"]').next().addClass('layui-form-selected')
+					$('select[id="PalletNo"]').next().find('.layui-select-title input').val(val)
+				})
+			})
+
 			//鍒濆鍖栨覆鏌� 鍑哄簱鍗�
 			function updateBillList(callback) {
 				var input = $('select[id="bar"]').next().find('.layui-select-title input')
@@ -271,9 +291,10 @@
                 form.render('select');
 
                 var param = {
-                    soNo:$("#bar").val()
+                    SoNo:$("#bar").val(),
+                    SoDetailId:$("#goodSelect").val(),
                 };
-                sendData(IP + "/PdaCr/GetPalletNoListBySoNo", param, 'get', function (res) {
+                sendData(IP + "/PdaSo/GetPalletListBySo", param, 'post', function (res) {
                     if (res.code == 0) { //鎴愬姛
                         for (var i = 0; i < res.data.length; i++) {
                             $("#PalletNo").append('<option value =' + res.data[i] + '>' + res.data[i]+
diff --git a/Wms/Model/ModelVm/PdaVm/PdaAsnVm.cs b/Wms/Model/ModelVm/PdaVm/PdaAsnVm.cs
index 38ea760..871e349 100644
--- a/Wms/Model/ModelVm/PdaVm/PdaAsnVm.cs
+++ b/Wms/Model/ModelVm/PdaVm/PdaAsnVm.cs
@@ -24,7 +24,8 @@
         /// Desc:澶栫鏉$爜
         /// </summary>           
         public string BoxNo { get; set; }
-        
+        public string SkuNo { get; set; }
+
         /// <summary>
         /// Desc:鏄惁杩炵画缁勬墭
         /// </summary>           
@@ -100,6 +101,11 @@
         /// </summary>
         public string BoxLevel { get; set; }
 
-        
+        /// <summary>
+        /// 杞﹂棿鍖哄煙 1002 1003涓�妤�  1003浜屾ゼ
+        /// </summary>
+        public string AreaNo { get; set; }
+
+
     }
 }
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index ad302b4..d69c86e 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -2409,6 +2409,458 @@
             }
         }
 
+        /// <summary>
+        /// 鏍规嵁绠辩爜鑾峰彇鏍囩绠辩爜淇℃伅锛堣溅闂村叆搴�-鑾峰彇WMS鐢熸垚鐨勭淇℃伅锛�
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        public List<BoxInfoDto> GetWmsBoxInfos(string boxNo)
+        {
+            try
+            {
+                if (string.IsNullOrEmpty(boxNo))
+                {
+                    throw new Exception("璇锋壂鎻忓绠辨潯鐮�!");
+                }
+                
+                string sqlString = $@"SELECT BoxNo, SkuNo, SkuName, LotNo, BitBoxMark, SUM(Qty) as Qty  FROM BllBoxInfo 
+                                        WHERE IsDel = '0' and Status='0' and BoxNo = '{boxNo}'
+                                        GROUP BY BoxNo,SkuNo,SkuName,LotNo,BitBoxMark; ";
+                var models = Db.Ado.SqlQuery<BoxInfoDto>(sqlString);
+
+                if (models.Count != 0)
+                {
+                    return models;
+                }
+                else
+                {
+                    throw new Exception("娌℃湁鏌ヨ鍒扮鐮佷俊鎭�");
+                }
+                
+            }
+            catch (Exception ex)
+            {
+                throw ex;
+            }
+        }
+
+
+        public void ChejianIn(string palletNo,string boxNo,decimal qty,string areaNo,int userId)
+        {
+            try
+            {
+                #region MyRegion
+
+                if (string.IsNullOrWhiteSpace(palletNo))
+                {
+                    throw new Exception("鎵樼洏鍙蜂笉鑳戒负绌�");
+                }
+                if (string.IsNullOrWhiteSpace(boxNo))
+                {
+                    throw new Exception("绠卞彿涓嶈兘涓虹┖");
+                }
+                if (qty<=0)
+                {
+                    throw new Exception("鏁伴噺涓嶈兘灏忕瓑0");
+                }
+                var boxInfo = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo == boxNo).ToList();
+                if (boxInfo.Count == 0)
+                {
+                    throw new Exception("鏈煡璇㈠埌褰撳墠绠卞彿淇℃伅");
+                }
+                var boxInfoOne = boxInfo.First();
+                var pall = Db.Queryable<SysPallets>().First(m => m.IsDel == "0" && m.PalletNo == palletNo);
+                if (pall == null)
+                {
+                    throw new Exception("鏈煡璇㈠埌褰撳墠鎵樼洏淇℃伅");
+                }
+                #endregion
+
+                //寮�鍚簨鍔�
+                Db.BeginTran();
+                //褰撳墠鏃堕棿
+                var comTime = DateTime.Now;
+
+                #region 鍖呰 
+
+                var sku = Db.Queryable<SysMaterials>().First(m => m.IsDel == "0" && m.SkuNo == boxInfoOne.SkuNo);
+                var pack = Db.Queryable<SysPackag>().First(m => m.IsDel == "0" && m.PackagNo == sku.PackagNo);
+
+                var pNum = 0;//鎵樼洏鐗╁搧鏁伴噺 
+                var bNum = 0;//绠辩爜鐗╁搧鏁伴噺 
+
+                //鍏叡鏂规硶鑾峰彇鍖呰鏁伴噺
+                new Common().GetPackQtyInfo(pack.PackagNo, ref pNum, ref bNum);
+
+                #endregion
+
+                var msgStr = $"绠卞彿涓簕boxNo}";
+                var boxInfoList = new List<BllBoxInfo>();
+
+                
+                boxInfoList.AddRange(boxInfo);
+
+                #region 搴撳瓨鏄庣粏
+
+                var area = Db.Queryable<SysStorageArea>().First(m => m.IsDel == "0" && m.AreaNo == areaNo);
+                if (area == null)
+                {
+                    throw new Exception("鍏ュ簱鍖哄煙涓嶈兘涓虹┖");
+                }
+                    
+                var tags = "0";
+                    
+                // 鍒ゆ柇搴撳瓨鏄庣粏鏄惁宸叉湁姝ゆ墭鐩樹俊鎭�  
+                var sd1 = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.SkuNo== boxInfoOne.SkuNo && m.LotNo == boxInfoOne.LotNo && m.PalletNo == palletNo);
+                var sdId1 = 0;
+                if (sd1 != null)
+                {
+                    if (sd1.AreaNo!= areaNo)
+                    {
+                        throw new Exception("閫夋嫨鐨勫尯鍩熶笌搴撳瓨涓嶅悓");
+                    }
+                    sdId1 = sd1.Id;
+                    // 搴撳瓨宸插瓨鍦� 鏇存柊鏁版嵁
+                    sd1.Qty += qty;
+                    sd1.CompleteTime = comTime;
+                    sd1.UpdateUser = userId;
+                    sd1.UpdateTime = comTime;
+
+                    Db.Updateable(sd1).ExecuteCommand();
+                }
+                else
+                {
+                    // 搴撳瓨涓嶅瓨鍦� 鎻掑叆鏁版嵁
+                    sd1 = new DataStockDetail()
+                    {
+                        LotNo = boxInfoOne.LotNo,
+                        LotText = boxInfoOne.LotText,
+                        SupplierLot = boxInfoOne.SupplierLot,
+                        SkuNo = sku.SkuNo,
+                        SkuName = sku.SkuName,
+                        Standard = sku.Standard,
+                        Qty = qty,
+                        LockQty = 0,
+                        FrozenQty = 0,
+                        InspectQty = 0,
+                        WareHouseNo = area.WareHouseNo,//鎵�灞炰粨搴�
+                        RoadwayNo = "",//鎵�灞炲贩閬�
+                        AreaNo = area.AreaNo,//鎵�灞炲尯鍩�
+                        LocatNo = "",//鍌ㄤ綅鍦板潃
+                        PalletNo = palletNo,
+                        PalletTags = tags,
+                        CompleteTime = comTime,
+                        ProductionTime = boxInfoOne.ProductionTime,
+                        ExpirationTime = boxInfoOne.ExpirationTime,
+                        Status = "0",
+                        InspectMark = boxInfoOne.InspectMark,
+                        InspectStatus = sku.IsInspect,
+                        BitPalletMark = "1",
+                        PackagNo = sku.PackagNo,
+
+                        IsDel = "0",
+                        CreateUser = 0,
+                        CreateTime = comTime
+                    };
+
+                    //娣诲姞搴撳瓨鏄庣粏
+                    sdId1 = Db.Insertable(sd1).ExecuteReturnIdentity();
+                }
+                #endregion
+
+                // 鏇存敼绠辨敮鍏崇郴琛�
+                decimal factQty = 0.00m;//鎵樼洏鎬绘暟閲�
+                     
+
+                //鏍囩缁勬墭
+                var boxGroup = boxInfo.GroupBy(m => m.BoxNo).ToList();
+                foreach (var g in boxGroup)
+                {
+                    decimal boxFullQty = 0;//绠卞唴鎬绘暟閲�
+                    foreach (var box in g)
+                    {
+                        if (box.BindNo != null && box.BindNo != 0)
+                        {
+                            continue;
+                        }
+                            
+                            
+                        box.PalletNo = palletNo;
+                        box.Status = "2";
+                            
+                        box.CompleteTime = comTime;
+                        box.UpdateTime = comTime;
+                        box.UpdateUser = userId;
+
+                        //box.Qty = box.Qty;
+                        //box.BitBoxMark = box.Qty == box.FullQty ? "0" : "1";
+
+                        factQty += box.Qty;
+                        boxFullQty += box.Qty;
+                            
+                        #region 搴撳瓨绠辩爜鏄庣粏
+                        var box2 = new DataBoxInfo()
+                        {
+                            StockDetailId = sdId1,
+                            BoxNo = box.BoxNo,
+                            BoxNo2 = box.BoxNo2,
+                            BoxNo3 = box.BoxNo3,
+                            PalletNo = box.PalletNo,
+                            PalletNo2 = box.PalletNo2,
+                            PalletNo3 = box.PalletNo3,
+                            Qty = box.Qty,
+                            FullQty = box.FullQty,
+                            Status = "2",//0锛氭湭缁勬墭  1锛氬凡缁勬墭 2锛氬凡鍏ュ簱 3锛氬凡鍑哄簱 4:宸插垎閰� 5锛氬凡鎷h揣
+                            LotNo = box.LotNo,
+                            LotText = box.LotText,
+                            SkuNo = box.SkuNo,
+                            SkuName = box.SkuName,
+                            Standard = sku.Standard,
+                            ProductionTime = box.ProductionTime,
+                            SupplierLot = box.SupplierLot,
+                            InspectStatus = sku.IsInspect,
+                            InspectMark = box.InspectMark,
+                            BitBoxMark = box.BitBoxMark,
+                            ExpirationTime = box.ExpirationTime,
+
+                            CreateUser = 0,
+                            CreateTime = comTime
+                        };
+                        //娣诲姞搴撳瓨绠辩爜鏄庣粏
+                        Db.Insertable(box2).ExecuteCommand();
+                        #endregion
+                    }
+                    if (boxFullQty > bNum)
+                    {
+                        throw new Exception($"缁戝畾澶辫触锛寋g.Key}绠辩爜缁戝畾鏁伴噺澶т簬璇ョ墿鍝佸寘瑁呮暟閲忥紒");
+                    }
+                }
+                //鏇存敼绠辨敮鍏崇郴琛ㄤ俊鎭�
+                Db.Updateable(boxInfoList).ExecuteCommand();
+
+
+                #region 搴撳瓨
+                var dataStock = Db.Queryable<DataStock>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == boxInfoOne.LotNo);
+                if (dataStock != null)
+                {
+                    dataStock.Qty += factQty;
+                    Db.Updateable(dataStock).ExecuteCommand();
+                }
+                else
+                {
+                    var stock = new DataStock()
+                    {
+                        SkuNo = sku.SkuNo,
+                        SkuName = sku.SkuName,
+                        Standard = sku.Standard,
+                        LotNo = boxInfoOne.LotNo,
+                        LotText = boxInfoOne.LotText,
+                        Qty = qty,
+                        LockQty = 0,
+                        FrozenQty = 0,
+                        IsSampling = "0",
+                        IsDel = "0",
+                        CreateUser = userId,
+                        CreateTime = comTime
+                    };
+                    Db.Insertable(stock).ExecuteCommand();
+                }
+                #endregion
+
+                // 鏇存敼鎵樼洏浣跨敤鐘舵��
+                var sqlStr = $"update SysPallets set Status = '1' where PalletNo = '{palletNo}';";
+                ////娣诲姞鎵樼洏璁板綍琛ㄦ暟鎹�
+                //sqlStr += $"insert into LogPalletTrack values('{palletNo}','{boxNo}','缁勭洏','0',getDate(),{userId},NULL,NULL);";
+                //Db.Ado.ExecuteCommand(sqlStr);
+                new OperationASNServer().AddLogOperationAsn("PDA妯″潡", "杞﹂棿鍏ュ簱", boxNo, "娣诲姞", $"娣诲姞浜嗘墭鐩樼爜涓猴細{palletNo}銆亄msgStr}鐨勫叆搴撲俊鎭�", userId);
+
+                //鎻愪氦浜嬪姟
+                Db.CommitTran();
+
+            }
+            catch (Exception e)
+            {
+                Db.RollbackTran();
+                throw new Exception(e.Message);
+            }
+        }
+
+        /// <summary>
+        /// 杞﹂棿缁戝畾鎵樼洏 涓嶈创鏍囩墿鏂�
+        /// </summary>
+        /// <param name="model"></param>
+        /// <param name="userId"></param>
+        /// <exception cref="Exception"></exception>
+        public void ChejianQtyIn(string palletNo, string skuNo, string lotNo, decimal qty, string areaNo, int userId)
+        {
+            try
+            {
+                #region MyRegion
+
+                if (string.IsNullOrWhiteSpace(palletNo))
+                {
+                    throw new Exception("鎵樼洏鍙蜂笉鑳戒负绌�");
+                }
+                if (string.IsNullOrWhiteSpace(skuNo))
+                {
+                    throw new Exception("鐗╂枡涓嶈兘涓虹┖");
+                }
+                if (qty <= 0)
+                {
+                    throw new Exception("鏁伴噺涓嶈兘灏忕瓑0");
+                }
+                var skuInfo = Db.Queryable<SysMaterials>().First(m => m.IsDel == "0" && m.SkuNo == skuNo);
+                if (skuInfo == null)
+                {
+                    throw new Exception("鏈煡璇㈠埌鐗╂枡淇℃伅");
+                } 
+                var pall = Db.Queryable<SysPallets>().First(m => m.IsDel == "0" && m.PalletNo == palletNo);
+                if (pall == null)
+                {
+                    throw new Exception("鏈煡璇㈠埌褰撳墠鎵樼洏淇℃伅");
+                }
+                #endregion
+
+                //寮�鍚簨鍔�
+                Db.BeginTran();
+                //褰撳墠鏃堕棿
+                var comTime = DateTime.Now;
+
+                #region 鍖呰 
+                 
+                var pack = Db.Queryable<SysPackag>().First(m => m.IsDel == "0" && m.PackagNo == skuInfo.PackagNo);
+
+                var pNum = 0;//鎵樼洏鐗╁搧鏁伴噺 
+                var bNum = 0;//绠辩爜鐗╁搧鏁伴噺 
+
+                //鍏叡鏂规硶鑾峰彇鍖呰鏁伴噺
+                new Common().GetPackQtyInfo(pack.PackagNo, ref pNum, ref bNum);
+
+                #endregion
+
+                 
+
+                #region 搴撳瓨鏄庣粏
+
+                var area = Db.Queryable<SysStorageArea>().First(m => m.IsDel == "0" && m.AreaNo == areaNo);
+                if (area == null)
+                {
+                    throw new Exception("鍏ュ簱鍖哄煙涓嶈兘涓虹┖");
+                }
+
+                var tags = "0";
+
+                // 鍒ゆ柇搴撳瓨鏄庣粏鏄惁宸叉湁姝ゆ墭鐩樹俊鎭�  
+                var sd1 = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.SkuNo == skuNo && m.LotNo == lotNo && m.PalletNo == palletNo);
+                var sdId1 = 0;
+                if (sd1 != null)
+                {
+                    if (sd1.AreaNo != areaNo)
+                    {
+                        throw new Exception("閫夋嫨鐨勫尯鍩熶笌搴撳瓨涓嶅悓");
+                    }
+                    sdId1 = sd1.Id;
+                    // 搴撳瓨宸插瓨鍦� 鏇存柊鏁版嵁
+                    sd1.Qty += qty;
+                    sd1.CompleteTime = comTime;
+                    sd1.UpdateUser = userId;
+                    sd1.UpdateTime = comTime;
+                    if (sd1.Qty >= pNum)
+                    {
+                        sd1.BitPalletMark = "0";
+                    }
+                    Db.Updateable(sd1).ExecuteCommand();
+                }
+                else
+                {
+                    // 搴撳瓨涓嶅瓨鍦� 鎻掑叆鏁版嵁
+                    sd1 = new DataStockDetail()
+                    {
+                        LotNo = lotNo,
+                        SupplierLot = "",
+                        SkuNo = skuInfo.SkuNo,
+                        SkuName = skuInfo.SkuName,
+                        Standard = skuInfo.Standard,
+                        Qty = qty,
+                        LockQty = 0,
+                        FrozenQty = 0,
+                        InspectQty = 0,
+                        WareHouseNo = area.WareHouseNo,//鎵�灞炰粨搴�
+                        RoadwayNo = "",//鎵�灞炲贩閬�
+                        AreaNo = area.AreaNo,//鎵�灞炲尯鍩�
+                        LocatNo = "",//鍌ㄤ綅鍦板潃
+                        PalletNo = palletNo,
+                        PalletTags = tags,
+                        CompleteTime = comTime,
+                        //ProductionTime = boxInfoOne.ProductionTime,
+                        //ExpirationTime = boxInfoOne.ExpirationTime,
+                        Status = "0",
+                        InspectMark = "0",
+                        InspectStatus = "1",
+                        BitPalletMark = qty >= pNum ?"0" :"1",
+                        PackagNo = skuInfo.PackagNo,
+
+                        IsDel = "0",
+                        CreateUser = 0,
+                        CreateTime = comTime
+                    };
+
+                    //娣诲姞搴撳瓨鏄庣粏
+                    sdId1 = Db.Insertable(sd1).ExecuteReturnIdentity();
+                }
+                #endregion
+
+                // 鏇存敼绠辨敮鍏崇郴琛�
+                decimal factQty = 0.00m;//鎵樼洏鎬绘暟閲�
+
+
+                #region 搴撳瓨
+                var dataStock = Db.Queryable<DataStock>().First(m => m.IsDel == "0" && m.SkuNo == skuInfo.SkuNo && m.LotNo == lotNo);
+                if (dataStock != null)
+                {
+                    dataStock.Qty += factQty;
+                    Db.Updateable(dataStock).ExecuteCommand();
+                }
+                else
+                {
+                    var stock = new DataStock()
+                    {
+                        SkuNo = skuInfo.SkuNo,
+                        SkuName = skuInfo.SkuName,
+                        Standard = skuInfo.Standard,
+                        LotNo = lotNo,
+                        LotText = "",
+                        Qty = qty,
+                        LockQty = 0,
+                        FrozenQty = 0,
+                        IsSampling = "0",
+                        IsDel = "0",
+                        CreateUser = userId,
+                        CreateTime = comTime
+                    };
+                    Db.Insertable(stock).ExecuteCommand();
+                }
+                #endregion
+
+                // 鏇存敼鎵樼洏浣跨敤鐘舵��
+                var sqlStr = $"update SysPallets set Status = '1' where PalletNo = '{palletNo}';";
+                ////娣诲姞鎵樼洏璁板綍琛ㄦ暟鎹�
+                //sqlStr += $"insert into LogPalletTrack values('{palletNo}','{boxNo}','缁勭洏','0',getDate(),{userId},NULL,NULL);";
+                Db.Ado.ExecuteCommand(sqlStr);
+                new OperationASNServer().AddLogOperationAsn("PDA妯″潡", "杞﹂棿鍏ュ簱", skuNo, "娣诲姞", $"娣诲姞浜嗘墭鐩樼爜涓猴細{palletNo}鐨勫叆搴撲俊鎭�", userId);
+
+                //鎻愪氦浜嬪姟
+                Db.CommitTran();
+
+            }
+            catch (Exception e)
+            {
+                Db.RollbackTran();
+                throw new Exception(e.Message);
+            }
+
+        }
+
         #endregion
 
 
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
index 6c14235..8cc4019 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -124,7 +124,7 @@
                  
                 if (pinStockDetail != null) 
                 {
-                    if (palletNo != palletNoNew)//闈炴暣鎵樻嫞璐�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+                    if (palletNo != palletNoNew)//闈炴暣鎵樻嫞璐�                                                
                     {
                         var pinStockDetails = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.PalletNo == palletNoNew && m.Id!= pinStockDetail.Id).ToList();
                         if (pinStockDetails.Count(m=>m.SONo != notice.SONo) > 0)
@@ -142,15 +142,19 @@
                     var newPalletInfo = await Db.Queryable<SysPallets>().FirstAsync(m => m.IsDel == "0" && m.PalletNo == palletNoNew && m.Status == "0");
                     if (newPalletInfo == null)
                     {
-                        var pinStockDetails = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.PalletNo == palletNoNew && m.Id != pinStockDetail.Id).ToList();
+                        var pinStockDetails = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.PalletNo == palletNoNew &&(m.SkuNo != stockDetail.SkuNo || m.LotNo != stockDetail.LotNo)).ToList();
                         if (pinStockDetails.Count(m => m.SONo != notice.SONo) > 0)
                         {
                             throw Oops.Bah("鏂版墭鐩樹俊鎭笉瀛樺湪鎴栧凡琚娇鐢紒");
-                        } 
+                        }
                     }
-                    //淇敼鏂版墭鐩樼姸鎬�
-                    newPalletInfo.Status = "1";
-                    await Db.Updateable(newPalletInfo).ExecuteCommandAsync();
+                    else
+                    {
+                        //淇敼鏂版墭鐩樼姸鎬�
+                        newPalletInfo.Status = "1";
+                        await Db.Updateable(newPalletInfo).ExecuteCommandAsync();
+                    }
+                    
                 }
                 
                 var sd = new DataStockDetail();
@@ -458,9 +462,10 @@
 
                 if (isNew)
                 {
-                    sd.Qty = pickQty;
-                    sd.LockQty = pickQty;
-                    await Db.Updateable(sd).ExecuteCommandAsync();
+                    var sdnew = Db.Queryable<DataStockDetail>().First(m => m.Id == sdId);
+                    sdnew.Qty = pickQty;
+                    sdnew.LockQty = pickQty;
+                    await Db.Updateable(sdnew).ExecuteCommandAsync();
                 }
                 else
                 {
@@ -588,15 +593,18 @@
                     var newPalletInfo = await Db.Queryable<SysPallets>().FirstAsync(m => m.IsDel == "0" && m.PalletNo == palletNoNew && m.Status == "0");
                     if (newPalletInfo == null)
                     {
-                        var pinStockDetails = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.PalletNo == palletNoNew && m.Id != pinStockDetail.Id).ToList();
+                        var pinStockDetails = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.PalletNo == palletNoNew && (m.SkuNo != stockDetail.SkuNo && m.LotNo != stockDetail.LotNo)).ToList();
                         if (pinStockDetails.Count(m => m.SONo != notice.SONo) > 0)
                         {
                             throw Oops.Bah("鏂版墭鐩樹俊鎭笉瀛樺湪鎴栧凡琚娇鐢紒");
                         }
                     }
-                    //淇敼鏂版墭鐩樼姸鎬�
-                    newPalletInfo.Status = "1";
-                    await Db.Updateable(newPalletInfo).ExecuteCommandAsync();
+                    else
+                    {
+                        //淇敼鏂版墭鐩樼姸鎬�
+                        newPalletInfo.Status = "1";
+                        await Db.Updateable(newPalletInfo).ExecuteCommandAsync();
+                    }
                 }
 
                 if (isNew)
@@ -1522,6 +1530,27 @@
             return allotList2;
         }
 
+
+        //鑾峰彇鎵樼洏涓惈鏈夌殑鎵ц涓殑鍗曟嵁
+        public async Task<List<string>> GetPalletListBySo(string soNo, string soDetailId)
+        {
+            if (string.IsNullOrWhiteSpace(soNo))//鍒ゆ柇鎵樼洏鏄惁涓虹┖
+            {
+                throw Oops.Bah("鍑哄簱鍗曚负绌猴紝璇烽�夋嫨鍑哄簱鍗�");
+            } 
+            if (string.IsNullOrWhiteSpace(soDetailId))
+            {
+                throw Oops.Bah("鍑哄簱鏄庣粏涓虹┖锛岃閫夋嫨鐗╂枡-鎵规");
+            }
+           
+            var allotList = await Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && m.Status == "0" && m.SONo == soNo && m.SODetailNo == int.Parse(soDetailId)).Select(m => m.PalletNo).Distinct().Where(m => !string.IsNullOrWhiteSpace(m)).ToListAsync();
+            return allotList;
+            
+
+        }
+        
+
+
         //鑾峰彇鎵樼洏涓惈鏈夌殑鎵ц涓殑鍗曟嵁
         public async Task<List<string>> GetRunNoticeList(string type)
         {
diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index 4ef8b56..0322da7 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -1014,7 +1014,7 @@
                     skuList = skuList.Where(m => m.SkuNo == "100088").ToList();
                 }
                 skuStrList = skuList.Select(m => m.SkuNo).ToList();
-                var areaStr = new List<string>() { "B02", "B05", "B08" };
+                var areaStr = new List<string>() { "B06", "B07", "B09" };
                 var stockRst = new StockServer();
                 var stockDetailRst = new StockDetailServer();
                 Expression<Func<DataStockDetail, bool>> item = Expressionable.Create<DataStockDetail>()
diff --git a/Wms/WMS.BLL/HttpServer.cs b/Wms/WMS.BLL/HttpServer.cs
index 81d4d68..e426f1e 100644
--- a/Wms/WMS.BLL/HttpServer.cs
+++ b/Wms/WMS.BLL/HttpServer.cs
@@ -1378,7 +1378,7 @@
                     throw new Exception("閫夋嫨鐨勫嚭搴撳崟鏄庣粏鍙傛暟閿欒");
                 }
                 //鎵�鏈夎鍑哄簱鐨勫嚭搴撳垎閰嶄俊鎭�(鏈笅鍙戠殑淇℃伅鍜屽緟鎷h揣鐨勪俊鎭�)
-                var item = Db.Queryable<BllExportAllot>().First(a => a.IsDel == "0" && a.SONo == soNo && a.SODetailNo == intDetailId && a.Status == "0" );
+                var item = Db.Queryable<BllExportAllot>().First(a => a.IsDel == "0" && a.SONo == soNo && a.SODetailNo == intDetailId && a.PalletNo == palletNo && a.Status == "0" );
                 if (item == null) //鍒ゆ柇鏄惁鏈夐渶瑕佷笅鍙戠殑鍑哄簱娴佹按
                 {
                     throw new Exception("褰撳墠鍑哄簱鍗曟嵁鏃犻渶瑕佷笅鍙戠殑鎵樼洏");
@@ -1418,8 +1418,7 @@
                         var imBl = com.GetImTask(item.PalletNo);
                         if (imBl != null)
                         {
-                            str = "瑕佸嚭搴撶殑鎵樼洏姝e湪鍏ュ簱";
-                            return outDto1;
+                            throw new Exception("瑕佸嚭搴撶殑鎵樼洏姝e湪鍏ュ簱");
                         }
                         //鍒ゆ柇鏄惁鏄凡缁忓嚭杩囧簱鍙堝洖搴� 
                         if (item.Status == "0")
@@ -1445,40 +1444,34 @@
                                     Db.Updateable(notice).ExecuteCommand();
                                 }
                             }
-                            str = "瑕佸嚭搴撶殑鎵樼洏宸插湪搴撳";
+                            Db.CommitTran();
+                            str = "鎵樼洏宸插湪搴撳";
                             return outDto1;
                         }
-                        str = "瑕佸嚭搴撶殑鎵樼洏姝e湪鍏ュ簱";
-                        return outDto1;
                     }
 
                     var locate = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == locateNo && m.IsDel == "0");//褰撳墠鍑哄簱鐨勫偍浣嶄俊鎭�
                     if (locate == null)
                     {
-                        str = "鍑哄簱鐨勬墭鐩樺偍浣嶄俊鎭敊璇�(鍦ㄥ偍浣嶈〃涓湭鏌ヨ鍒�)";
-                        return outDto1;
+                        throw new Exception("鍑哄簱鐨勬墭鐩樺偍浣嶄俊鎭敊璇�(鍦ㄥ偍浣嶈〃涓湭鏌ヨ鍒�)");
                     }
                     //鍒ゆ柇鍌ㄤ綅鏍囧織鏄惁涓烘崯鍧�
                     if (locate.Flag == "2")
                     {
-                        str = "鍌ㄤ綅鎹熷潖涓嶈兘鍑哄簱";
-                        return outDto1;
+                        throw new Exception("鍌ㄤ綅鎹熷潖涓嶈兘鍑哄簱");
                     }
                     if (locate.WareHouseNo != "W02")
                     {
-                        str = "鎵樼洏涓嶅湪璐ф灦搴撲笂";
-                        return outDto1;
+                        throw new Exception("鎵樼洏涓嶅湪璐ф灦搴撲笂");
                     }
                     var locateEnd = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == outModeLocate && m.IsDel == "0");//褰撳墠鍑哄簱鐨勭洰鏍囧偍浣嶄俊鎭�
                     if (locateEnd == null)
                     {
-                        str = "鍑哄簱鐨勬墭鐩樺偍浣嶄俊鎭敊璇�(鍦ㄥ偍浣嶈〃涓湭鏌ヨ鍒�)";
-                        return outDto1;
+                        throw new Exception("鍑哄簱鐨勬墭鐩樺偍浣嶄俊鎭敊璇�(鍦ㄥ偍浣嶈〃涓湭鏌ヨ鍒�)");
                     }
                     else if (locateEnd.Status != "0")
                     {
-                        str = "鐩爣鍌ㄤ綅鐘舵�佷笉鏄┖鍌ㄤ綅";
-                        return outDto1;
+                        throw new Exception("鐩爣鍌ㄤ綅鐘舵�佷笉鏄┖鍌ㄤ綅");
                     }
                     #endregion
 
@@ -1606,8 +1599,7 @@
                     }
                     else if (locate.Status == "5") //绉诲嚭涓�
                     {
-                        str = "褰撳墠瑕佸嚭搴撶殑鍌ㄤ綅姝e湪绉诲嚭";
-                        return outDto1; 
+                        throw new Exception("褰撳墠瑕佸嚭搴撶殑鍌ㄤ綅姝e湪绉诲嚭");
                     }
                     
 
diff --git a/Wms/WMS.Entity/BllAsnEntity/BllPalletBind.cs b/Wms/WMS.Entity/BllAsnEntity/BllPalletBind.cs
index 14fbde5..6106319 100644
--- a/Wms/WMS.Entity/BllAsnEntity/BllPalletBind.cs
+++ b/Wms/WMS.Entity/BllAsnEntity/BllPalletBind.cs
@@ -87,7 +87,7 @@
         public decimal? FullQty {get;set;}
 
         /// <summary>
-        /// Desc:鐘舵��
+        /// Desc:鐘舵�� 2鍏ュ簱瀹屾垚  3涓婃灦瀹屾垚
         /// Default:
         /// Nullable:True
         /// </summary>           
diff --git a/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs b/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
index 4d1624b..a68f398 100644
--- a/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
+++ b/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
@@ -29,6 +29,12 @@
         /// <param name="userId"></param>
         void SaveAppointLocate(string palletNo, string locateNo, int userId);
 
+        List<BoxInfoDto> GetWmsBoxInfos(string boxNo);
+
+        void ChejianIn(string palletNo, string boxNo, decimal qty,string areaNo, int userId);
+
+        void ChejianQtyIn(string palletNo, string skuNo, string lotNo, decimal qty, string areaNo, int userId);
+
         #endregion
 
 
diff --git a/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs b/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
index 826ff84..d2260d4 100644
--- a/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
+++ b/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
@@ -62,6 +62,14 @@
         Task<List<string>> GetRunNoticeList(string type);
 
         /// <summary>
+        /// 鑾峰彇鍑哄簱鍗曟湭涓嬪彂鍑哄簱鐨勬墭鐩�
+        /// </summary>
+        /// <param name="soNo"></param>
+        /// <param name="soDetailId"></param>
+        /// <returns></returns>
+        Task<List<string>> GetPalletListBySo(string soNo, string soDetailId);
+
+        /// <summary>
         /// 鑾峰彇鍑哄簱鎵樼洏涓婄殑鐗╂枡鎵规(鏍规嵁鎵樼洏鐮�)
         /// </summary>
         /// <param name="palletNo">鎵樼洏鐮�</param>
diff --git a/Wms/Wms/Controllers/PdaAsnController.cs b/Wms/Wms/Controllers/PdaAsnController.cs
index 3987256..fb8efd8 100644
--- a/Wms/Wms/Controllers/PdaAsnController.cs
+++ b/Wms/Wms/Controllers/PdaAsnController.cs
@@ -193,6 +193,26 @@
         }
 
         /// <summary>
+        /// 鏍规嵁绠辩爜鑾峰彇鏍囩绠辩爜淇℃伅锛堣溅闂村叆搴�-鑾峰彇WMS鐢熸垚鐨勭淇℃伅锛�
+        /// </summary>
+        /// <param name="boxNo">BoxNo:绠卞彿</param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult GetWmsBoxInfos(string boxNo)
+        {
+            try
+            {
+                var models = _PdaAsnSvc.GetWmsBoxInfos(boxNo);
+
+                return Ok(new { code = 0, msg = "鏍囩绠辩爜淇℃伅", data = models });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+
+        /// <summary>
         /// 鍒ゆ柇鎵樼洏鏄惁鍙敤  鍏敤鏂规硶
         /// </summary>
         /// <param name="model">PalletNo锛氭墭鐩樻潯鐮�</param>
@@ -243,6 +263,40 @@
         }
 
 
+        /// <summary>
+        /// 缁戝畾鎵樼洏
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost] 
+        public IActionResult ChejianIn(PdaPalletBindVm model)
+        {
+            try
+            {
+                 
+                if (_userManager.UserId ==0)
+                {
+                    throw new Exception("鏈幏鍙栧埌鐢ㄦ埛淇℃伅");
+                }
+
+                if (model.TableType == 0)
+                {
+                    _PdaAsnSvc.ChejianIn(model.PalletNo,model.BoxNo,model.SkuQty,model.AreaNo, _userManager.UserId);
+                }
+                else if (model.TableType == 1)
+                {
+                    _PdaAsnSvc.ChejianQtyIn(model.PalletNo,model.SkuNo,model.LotNo,model.SkuQty,model.AreaNo, _userManager.UserId);
+                }
+
+                return Ok(new { code = 0, msg = "缁戝畾鎴愬姛!" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+
+
         //---------------------------------------------鐢宠鍏ュ簱椤甸潰----------------------------------------------------------------------
 
 
diff --git a/Wms/Wms/Controllers/PdaSoController.cs b/Wms/Wms/Controllers/PdaSoController.cs
index 2d6283f..f23655c 100644
--- a/Wms/Wms/Controllers/PdaSoController.cs
+++ b/Wms/Wms/Controllers/PdaSoController.cs
@@ -81,6 +81,19 @@
             return await _pdaSoSvc.GetSoSkuLotNoListBySo(model.SoNo);
         }
 
+
+        /// <summary>
+        /// 鑾峰彇鐗╂枡-鎵规淇℃伅
+        /// </summary>
+        /// <param name="model">PalletNo:鎵樼洏鐮併�丼oNo:鍗曟嵁鍙�</param> 
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<List<string>> GetPalletListBySo(PdaSoVm model)
+        {
+            return await _pdaSoSvc.GetPalletListBySo(model.SoNo,model.SoDetailId);
+        }
+
+
         /// <summary>
         /// 鑾峰彇鐗╂枡-鎵规淇℃伅
         /// </summary>
diff --git a/Wms/Wms/Controllers/UpApiController.cs b/Wms/Wms/Controllers/UpApiController.cs
index b8743c0..79cb4b6 100644
--- a/Wms/Wms/Controllers/UpApiController.cs
+++ b/Wms/Wms/Controllers/UpApiController.cs
@@ -242,7 +242,7 @@
                     await _stockCheckSvc.StockAdjustAuto(model.Id);
                 }
                 //绯荤粺瀵规帴鍚庢斁寮�
-                //var bl =_stockCheckSvc.FinishCr(model.Id,_config.ErpHost + _config.DataChangeUrl, int.Parse(userId));
+                var bl =_stockCheckSvc.FinishCr(model.Id,_config.ErpHost + _config.DataChangeUrl, int.Parse(userId));
                 //if (bl)
                 //{
                 return Ok(new { code = 0, count = 0, msg = "鐩樼偣鍗曡皟鏁翠笂浼犳垚鍔�" });

--
Gitblit v1.8.0