From 54c9cb77e93d08bc330b9a421e6232b7f7bba57a Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期五, 19 九月 2025 17:30:36 +0800
Subject: [PATCH] 修改问题
---
HTML/js/public.js | 2
Pda/View/SoSetting/productOutCode.html | 799 ++++++++++++++++++++++++++++++++++++++++++++
Wms/WMS.BLL/HttpServer.cs | 58 +++
Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs | 2
Pda/View/SoSetting/pinTuoOut.html | 19 +
Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs | 9
Pda/js/public.js | 2
Wms/Model/ModelVm/SysVm/PackagVm.cs | 2
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs | 25 +
Wms/WMS.IBLL/IHttpServer.cs | 10
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs | 16
Wms/Wms/Controllers/PdaSoController.cs | 21 +
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs | 49 ++
Wms/Wms/Controllers/DownApiController.cs | 29 +
14 files changed, 1,028 insertions(+), 15 deletions(-)
diff --git a/HTML/js/public.js b/HTML/js/public.js
index 8cca1df..ff31e00 100644
--- a/HTML/js/public.js
+++ b/HTML/js/public.js
@@ -2,7 +2,7 @@
// var IP = "http://172.16.71.101:8082/";//鎺ュ彛IP
//var IP = "http://localhost:13243/api";
//var IP = "http://localhost:50515/api"; //鏈湴
-var IP="https://localhost:5001/api";
+var IP="https://localhost:44363/api";
// var IP = "http://localhost:44318/api";
//var IP = "http://192.168.1.6:8017";
//var IP = "http://192.168.1.226:8086";
diff --git a/Pda/View/SoSetting/pinTuoOut.html b/Pda/View/SoSetting/pinTuoOut.html
index d58ad03..9f622e5 100644
--- a/Pda/View/SoSetting/pinTuoOut.html
+++ b/Pda/View/SoSetting/pinTuoOut.html
@@ -1300,6 +1300,25 @@
}
});
}
+ //涓嬫媺鍗曟嵁閫変腑鍚庝簨浠�
+ form.on('select(getbar2)', function (data) {
+ if ($('#palletNo2').val() == "") {
+ layer.msg("璇疯緭鍏ユ墭鐩樻潯鐮�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ //鍥炶皟
+ });
+ return
+ }
+ if ($('#bar2').val() == "") {
+ clear21();
+ return
+ }
+ updateSkuLotNoList2();
+ updateQtyList2();
+ getBar2();
+ });
//鍒濆鍖栨覆鏌� 鐗╂枡-鎵规
function updateSkuLotNoList2() {
diff --git a/Pda/View/SoSetting/productOutCode.html b/Pda/View/SoSetting/productOutCode.html
new file mode 100644
index 0000000..6f6bbee
--- /dev/null
+++ b/Pda/View/SoSetting/productOutCode.html
@@ -0,0 +1,799 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" />
+ <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" /> -->
+ <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">
+ .layout-bill-info {
+ height: auto;
+ /* background-color: #009E94; */
+ }
+
+ .layout-tbl-submit {
+ margin-top: 10px;
+ }
+
+ /* .out-scatter-num {
+ background-color: #009688;
+
+ } */
+ .out-scatter-num .local-input {
+ width: 40%;
+ height: 25px;
+ float: left;
+ }
+
+ .out-scatter-num .local-ok button {
+ height: 25px;
+ border: 0;
+ color: #FFFFFF;
+ background-color: #0a93e3;
+ border-radius: 3px;
+ padding: 2px;
+ margin-left: 10px;
+ width: 100%;
+ }
+
+ .out-scatter-num .layui-input-block {
+ width: 100%;
+ /* background-color: #009E94; */
+ margin-left: 0;
+ }
+
+ .out-scatter-num .local-ok {
+ width: 20%;
+ height: 25px;
+ float: left;
+ }
+
+ .btn-ok-blue {
+ border: none;
+ color: #FFFFFF;
+ background-color: #0a93e3;
+ width: 48%;
+ height: 36px;
+ border-radius: 5px;
+ }
+
+ .btn-ok-red {
+ border: none;
+ color: #FFFFFF;
+ background-color: #9f1707;
+ width: 48%;
+ height: 36px;
+ border-radius: 5px;
+ }
+
+ .btn-ok-blue:active {
+ opacity: 0.8;
+ }
+
+ .btn-ok-red:active {
+ opacity: 0.8;
+ }
+
+ .layout-tbl-paging {
+ margin-top: 20px;
+ }
+
+ .foot-container {
+ text-align: center;
+ }
+
+ .layout-tab-page {
+ height: auto;
+ }
+
+ .layui-form-checkbox {
+ margin: auto;
+ /* padding-left: 2px; */
+ /* padding-right: 2px; */
+ }
+
+ .div-tbl-title {
+ width: 98%;
+ margin: auto;
+ /* background-color: #4476A7; */
+ height: 30px;
+ }
+
+ .div-tbl-title table {
+ width: 100%;
+ height: 30px;
+ }
+
+ td {
+ word-break: break-all;
+ word-wrap: break-word;
+ }
+
+ .layui-input-block .layui-input,
+ .layui-input-block .layui-textarea {
+ padding-left: 0rem;
+ font-size: 13px;
+ }
+
+ .lableWidth {
+ width: 17%;
+ }
+
+ .layui-input-block {
+ width: 83%;
+ margin-left: 17%;
+ }
+
+ .layui-form-switch {
+ margin-top: 0;
+ }
+
+ 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" />
+</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">鎴愬搧鎷h揣</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">涓婚〉</a></li>
+ <li><a href="../login.html">閲嶆柊鐧诲綍</a></li>
+ </ul>
+ </div>
+
+
+ <div id="" class="layout-bill-info">
+ <form class="layui-form" action="" style="height: auto;">
+
+ <div id="layout-bill" class="layui-form-item layout-dropdownlist">
+ <label class="layui-form-label lableWidth">鍑哄簱鍗曪細</label>
+ <div class="layui-input-block" id="selectDiv">
+ <select id="bar" lay-filter="getbar" lay-search>
+ <option value=""></option>
+ </select>
+ <img src="/assets/down_arraw.png">
+ </div>
+ </div>
+ <div id="layout-skuLotNo" class="layui-form-item layout-dropdownlist">
+ <label class="layui-form-label lableWidth">鐗╂枡 - 鎵规锛�</label>
+ <div class="layui-input-block">
+ <select id="skuLotNo" lay-filter="getSkuLotNo" lay-search>
+ <option value=""></option>
+ </select>
+ <img src="/assets/down_arraw.png">
+ </div>
+ </div>
+ <div id="" class="layout-tab-page">
+ <table class="tbl-box-sim-info" border="" cellspacing="" cellpadding="">
+ <tr>
+ <td colspan="3">
+ <div class="layui-form-item">
+ <label class="layui-form-label" style="width: 17%;">SAP鍗曞彿锛�</label>
+ <div class="layui-input-block" style="width: 83%;margin-left:17%;">
+ <input id="OrderCode" type="text" lay-verify="" disabled placeholder=""
+ class="layui-input">
+ </div>
+ </div>
+ </td>
+
+ </tr>
+ <tr>
+ <td>
+ <div class="layui-form-item">
+ <label class="layui-form-label" style="width: 50%;">璁″垝鏁伴噺锛�</label>
+ <div class="layui-input-block" style="width: 50%;margin-left:50%;">
+ <input id="planQty" type="text" lay-verify="" disabled placeholder=""
+ class="layui-input">
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="layui-form-item">
+ <label class="layui-form-label" style="width: 50%">瀹屾垚鏁伴噺锛�</label>
+ <div class="layui-input-block" style="width: 50%;margin-left:50%;">
+ <input id="finishQty" type="text" lay-verify="" disabled placeholder=""
+ class="layui-input">
+ </div>
+ </div>
+
+ </td>
+ <td>
+ <div class="layui-form-item">
+ <label class="layui-form-label" style="width: 34%;">鍑哄簱鍙o細</label>
+ <div class="layui-input-block" style="width: 66%;margin-left:34%;">
+ <input id="outModel" type="text" lay-verify="" disabled placeholder=""
+ class="layui-input">
+ </div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="layui-form-item">
+ <label class="layui-form-label" style="width: 17%;">瑙勬牸锛�</label>
+ <div class="layui-input-block" style="width: 83%;margin-left:17%;">
+ <input id="standard" type="text" lay-verify="" disabled placeholder=""
+ class="layui-input">
+ </div>
+ </div>
+ </td>
+
+ </tr>
+ </table>
+ </div>
+
+ <div id="layout-pallet" class="layui-form-item layout-input">
+ <label class="layui-form-label lableWidth">鎵樼洏鏉$爜锛�</label>
+ <div class="layui-input-block">
+ <input id="palletNo" type="text" lay-verify="stock" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�"
+ autocomplete="off" class="layui-input" style="height:24px">
+ </div>
+ </div>
+ <div id="" class="layui-form-item layout-input">
+ <label class="layui-form-label" lang>鏄惁鏁存墭鍑哄簱锛�</label>
+ <div class="layui-input-block">
+ <input type="checkbox" name="IsZhengTuo" id="IsZhengTuo" lay-skin="switch"
+ lay-text="鏄瘄鍚�" lay-filter="IsZhengTuo">
+ </div>
+ </div>
+ <div id="BoxDIv" class="layout-tab-page">
+ <table class="layout-tab-content" border="" cellspacing="" cellpadding="">
+ <tr>
+ <td>
+ <div class="layui-form-item layout-input">
+ <label class="layui-form-label lableWidth">鏍囩鏉$爜锛�</label>
+ <div class="layui-input-block">
+ <input id="boxNo" type="text" placeholder="璇锋壂鎻忔爣绛炬潯鐮�" autocomplete="off"
+ class="layui-input">
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id="" class="layout-tab-page">
+ <table class="layout-tab-content" border="" cellspacing="" cellpadding="">
+ <tr>
+ <td>
+ <table class="tbl-box-sim-info" border="" cellspacing="" cellpadding="">
+ <tr>
+ <td>
+ <div class="layui-form-item">
+ <label class="layui-form-label lableWidth">寰呮嫞鏁伴噺锛�</label>
+ <div class="layui-input-block">
+ <input id="pickQty" type="text" lay-verify="" disabled
+ placeholder="" class="layui-input">
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="layui-form-item">
+ <label class="layui-form-label lableWidth">宸叉壂鏁伴噺锛�</label>
+ <div class="layui-input-block">
+ <input id="scanQty" type="text" lay-verify="" disabled
+ placeholder="" class="layui-input">
+ </div>
+ </div>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <table class="layout-tab-content">
+ <tr>
+ <td style="width: 33%;"></td>
+ <td>
+ <button class="layout-btn layout-btn-red" lang type="button" lay-submit
+ lay-filter="formPickScatter">鎷h揣</button>
+ </td>
+ <td style="width: 33%;"></td>
+
+ </tr>
+ </table>
+ <div id="" style="text-align: right;margin-top: 10px; display: none;">
+ <div id="" class="cut-line">
+ <img src="/assets/fengexian.png">
+ </div>
+ </div>
+ </div>
+
+ </form>
+ </div>
+
+ <div class="layout-tbl-paging" id="">
+ <table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding="">
+ <tr id="tableHead">
+ <th style="width: 54%;">鏍囩鏉$爜</th>
+ <th style="width: 20%;">鏁伴噺</th>
+ </tr>
+ <tr id="boxCell" style="display: none;">
+ <td name="boxNo">AG000001</td>
+ <td name="qty">30</td>
+ </tr>
+ </table>
+
+ </div>
+
+ </div>
+
+ </div>
+
+
+ <script src="/js/jquery-3.5.1.min.js"></script>
+ <script src="/layui/layui.js"></script>
+ <script src="/js/jquery.cookie.js"></script>
+ <script src="/js/public.js"></script>
+
+ <script>
+ layui.use(['form', 'jquery'], function () {
+ var form = layui.form;
+
+ /* 鏍囩鍒囨崲浠g爜 */
+
+ var xianshiyemian = 0;
+
+
+ var boxes = [];
+ var scanQty=0;
+ //鏄惁鏁存墭鎷h揣
+ var isContinue = "0";
+ var tableData = null
+ var tableData2 = null
+ var canPickBox = true
+ $("#palletNo").focus();//鍏夋爣榛樿閫変腑
+
+ function clear1() {
+ $('#outModel').val("");//鍑哄簱鍙�
+ $('#standard').val("");//瑙勬牸
+
+ $('#pickQty').val("");//寰呮嫞鏁伴噺
+ }
+ function clear2() {
+ //鐗╂枡鎵规
+ $("#skuLotNo").empty()
+ $("#skuLotNo").append('<option value =>' + '</option>');
+ form.render('select');
+ }
+ function clear3() {
+ $("#planQty").val(""); //璁″垝鏁伴噺
+ $("#finishQty").val("");//瀹屾垚鏁伴噺
+ }
+ function clear4() {
+ $('#boxNo').val("");//绠辩爜
+ $('#boxQty').val("");//绠卞唴鏁伴噺
+ }
+ //褰撴墭鐩樻潯鐮佽緭鍏ユ鏂囨湰鏀瑰彉鏃�,妫�鏌ヤ竴涓嬫墭鐩樼姸鎬�
+ $("#palletNo").on('input', function () {
+
+ if ($("#palletNo").val() == "" || $("#palletNo").val().length < 8) {
+ return
+ }
+ if ($("#palletNo").val().length >= 8) {
+ $("#palletNo").val($("#palletNo").val().substr(-8))
+ }
+ checkPalletState()
+ })
+
+ form.on('switch(IsZhengTuo)', function (obj) {
+ if (obj.elem.checked) {
+ $('#BoxDIv').attr("style", "display:none")
+ isContinue = "1";
+ } else {
+ $('#BoxDIv').attr("style", "display:block")
+ isContinue = "0";
+ }
+ $('#boxNo').val("");
+ });
+
+ //绠辩爜鏂囨湰妗嗗洖杞︿簨浠�
+ $("#boxNo").blur(function () {
+
+ });
+ //褰撶鐮佽緭鍏ユ鏂囨湰鏀瑰彉鏃�
+ $("#boxNo").on('input', function () {
+ if ($("#boxNo").val() == "" || $("#boxNo").val().length < 20) {
+ return
+ }
+ if ($("#palletNo").val() == "" || $("#palletNo").val().length < 8) {
+ layer.msg("璇峰厛鎵弿鎵樼洏鏉$爜", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ //鍥炶皟
+ });
+ $("#boxNo").val('')
+ return;
+ }
+ var box;
+ if ($("#boxNo").val().length >= 20) {
+ var boxNum=0;
+ var param = {
+ "PalletNo": $("#palletNo").val(),
+ "BoxNo":$("#boxNo").val()
+ }
+ synData(IP + "/PdaSo/CheckBoxForPick", param, 'get', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ boxNum=res.data
+ box={BoxNo: $("#boxNo").val(), Qty:boxNum }
+
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ return;
+ }
+ });
+
+ var isExist = boxes.some(function(item) {
+ return item.BoxNo === box.BoxNo;
+ });
+ if (isExist) {
+ layer.msg("璇ユ潯鐮佸凡鎵弿锛�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ //鍥炶皟
+ });
+ $("#boxNo").val('')
+ return;
+ }
+ boxes.push(box);
+ tableData = deepCopy(boxes)
+ refreshTable(tableData)
+ $("#boxNo").val('')
+
+ scanQty=scanQty+boxNum
+ $('#scanQty').val(scanQty);
+ }
+ })
+
+ //妫�鏌ユ墭鐩樼姸鎬�
+ function checkPalletState() {
+
+ var param = {
+ "PalletNo": $("#palletNo").val()
+ }
+ synData(IP + "/PdaSo/IsEnableOkPalletNo", param, 'post', function (res) {
+
+ if (res.code == 0) { //鎴愬姛
+ updateBillList();
+ if ($('#bar').val() == "") {
+ clear1();
+ return;
+ } else {
+ updateSkuLotNoList();
+ updateQtyList();
+ getBar();
+ }
+
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
+ }
+ //涓嬫媺鍗曟嵁閫変腑鍚庝簨浠�
+ form.on('select(getbar)', function (data) {
+ if ($('#palletNo').val() == "") {
+ layer.msg("璇疯緭鍏ユ墭鐩樻潯鐮�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ //鍥炶皟
+ });
+ return
+ }
+ if ($('#bar').val() == "") {
+ clear1();
+ clear2();
+ clear3();
+ return
+ }
+ updateSkuLotNoList();
+ updateQtyList();
+ getBar();
+ });
+ //涓嬫媺鐗╂枡鎵规閫変腑鍚庝簨浠�
+ form.on('select(getSkuLotNo)', function (data) {
+ if ($('#palletNo').val() == "") {
+ layer.msg("璇疯緭鍏ユ墭鐩樻潯鐮�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ clear1();
+ clear3();
+ });
+ return
+ }
+ if ($('#skuLotNo').val() == "") {
+ clear1();
+ clear3();
+ return
+ }
+ updateQtyList();
+ getBar();
+ });
+
+ //鍒濆鍖栨覆鏌� 鍑哄簱鍗�
+ function updateBillList() {
+
+ $("#bar").empty()
+ $("#bar").append('<option value =>' + '</option>');
+ form.render('select');
+
+ var param = {
+ PalletNo: $("#palletNo").val(),
+ };
+ synData(IP + "/PdaSo/GetRunSoNoticeList", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ console.log(res.data);
+ for (var i = 0; i < res.data.length; i++) {
+ if (i == 0) {
+ $("#bar").append('<option value =' + res.data[i] + ' selected>' + res.data[i] + '</option>');
+ } else {
+ $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>');
+ }
+ }
+ form.render('select');
+
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ }
+ });
+ }
+
+ //鍒濆鍖栨覆鏌� 鐗╂枡-鎵规
+ function updateSkuLotNoList() {
+ clear2();
+
+ var param = {
+ PalletNo: $("#palletNo").val(),
+ SoNo: $("#bar").val(),
+ };
+ synData(IP + "/PdaSo/GetSoSkuLotNoListByPallet", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ for (var i = 0; i < res.data.length; i++) {
+ if (i == 0) {
+ $("#skuLotNo").append('<option value =' + res.data[i].SoDetailId + ' selected>' + res.data[i].SkuName + " - " + res.data[i].LotNo + '</option>');
+
+ } else {
+ $("#skuLotNo").append('<option value =' + res.data[i].SoDetailId + '>' + res.data[i].SkuName + " - " + res.data[i].LotNo + '</option>');
+ }
+ }
+ form.render('select');
+
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
+ }
+
+ //鍒濆鍖栨覆鍗曟嵁鐨勮鍒掓暟閲忓拰瀹屾垚鏁伴噺
+ function updateQtyList() {
+ clear3();
+ var param = {
+ SoDetailId: $("#skuLotNo").val(),
+ };
+ synData(IP + "/PdaSo/GetPlanAndFinishQty", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ console.log(res.data);
+ $("#planQty").val(res.data.PlanQty)
+ $("#finishQty").val(res.data.FinishQty)
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
+ }
+
+ //鏍规嵁鍗曟嵁鑾峰彇鍑哄簱鍙�
+ function getBar() {
+ clear1();
+
+ var param = {
+ PalletNo: $("#palletNo").val(),
+ SoDetailId: $("#skuLotNo").val(),
+ }
+ synData(IP + "/PdaSo/GetOutlets", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ let data = res.data
+ console.log(res.data);
+ $('#outModel').val(res.data.OutModel);
+ $('#standard').val(res.data.Standard);
+
+ $('#pickQty').val(res.data.PickQty);
+ } else { //涓嶆垚鍔�
+ if ($("#planQty").val() == $("#finishQty").val()) {
+ return;
+ }
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
+
+ }
+
+ //娓叉煋琛ㄦ牸鏁版嵁
+ function refreshTable(list) {
+ //鍏堟竻绌轰竴涓嬩俊鎭垪琛�
+ let trs = $("#tableBoxList tr")
+ let len = trs.length
+ for (i = len - 1; i >= 2; i--) {
+ trs[i].remove();
+ }
+
+ if (list != null && list.length > 0) { //鎴愬姛
+
+ var arrTrs = new Array()
+ let idx = 0
+ for (var i in list) {
+ // list[i].BoxCode
+ var tr = $("#boxCell").eq(0).clone();
+ tr.appendTo("#tableBoxList");
+ // tr.attr('id', list[i].BoxCode)
+ idx++;
+ tr.attr('index', idx)
+ tr.find("td[name='boxNo']").html(list[i].BoxNo);
+ tr.find("td[name='qty']").html(list[i].Qty);
+
+ tr.show();
+ arrTrs[i] = tr
+ }
+ canPickBox = true
+
+ } else { //涓嶆垚鍔�
+ layer.msg("鏃犳暟鎹�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ // $("#boxNum").val(0)
+ }
+ }
+ //鍗曟嫞璐э紙纭鎸夐挳锛�
+ form.on('submit(formPickScatter)', function (data) {
+
+ if ($('#bar').val() == "") {
+ layer.msg("璇烽�夋嫨鍑哄簱鍗�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }); return;
+ }
+ if ($('#bar').val() == "") {
+ layer.msg("璇烽�夋嫨鐗╂枡-鎵规", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }); return;
+ }
+ if ($('#palletNo').val() == "") {
+ layer.msg("璇疯緭鍏ユ墭鐩樼爜", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }); return;
+ }
+ if (isContinue == "0") {
+ if ($('#boxNo').val() == "") {
+ layer.msg("璇疯緭鍏ョ鐮�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }); return;
+ }
+ if ($('#boxQty').val() == "") {
+ layer.msg("绠卞唴鏁伴噺涓虹┖锛屼笉鑳芥嫞璐�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return;
+ }
+ }
+ if (canPickBox == false) {
+
+ layer.msg("璇锋眰鏈畬鎴愶紝涓嶈閲嶅璇锋眰", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return;
+ }
+
+ reqPickScatter()
+
+ return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆�
+ });
+
+ //纭鎷h揣
+ function reqPickScatter() {
+ var param = {
+ "SoNo": $("#bar").val(),
+ "SoDetailId": $("#skuLotNo").val(),
+ "PalletNo": $('#palletNo').val(),
+ "BoxNo": $('#boxNo').val()
+ }
+ sendData(IP + "/PdaSo/SoSetPick", param, 'post', function (res) {
+ //console.log(res);
+
+ if (res.code == 0) { //鎴愬姛
+ layer.msg(res.msg, {
+ icon: 1,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ canPickBox = true//鍥炶皟
+ $("#boxNo").val('');
+ updateQtyList();
+ getBar();
+ });
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ canPickBox = true;//鍥炶皟
+ });
+ }
+ });
+ }
+
+ //----------------------------------------------------------------------------------
+ //涓婚〉鍙婇噸鏂扮櫥褰�
+ $("#menuImg").click(function (e) {
+ //console.log("menuImg")
+ e.stopPropagation()
+
+ if ($("#menuList").is(":hidden")) {
+ $("#menuList").show()
+ } else {
+ $("#menuList").hide()
+ }
+ })
+ $('body').click(function () {
+ // //console.log("body")
+ $("#menuList").hide()
+ })
+
+ })
+ </script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/Pda/js/public.js b/Pda/js/public.js
index 7083b6a..9f55680 100644
--- a/Pda/js/public.js
+++ b/Pda/js/public.js
@@ -2,7 +2,7 @@
// var IP = "https://localhost:44368";
//var IP = "http://localhost:13243/api";
//var IP = "http://localhost:50515/api";
-var IP = "https://localhost:5001/api";
+var IP = "https://localhost:44363/api";
//var IP = "http://192.168.1.2:8017/";
// var IP = "http://192.168.10.112/WmsService/";
// var IP = "http://192.168.1.226:8086";
diff --git a/Wms/Model/ModelVm/SysVm/PackagVm.cs b/Wms/Model/ModelVm/SysVm/PackagVm.cs
index a1ce975..f019a78 100644
--- a/Wms/Model/ModelVm/SysVm/PackagVm.cs
+++ b/Wms/Model/ModelVm/SysVm/PackagVm.cs
@@ -15,7 +15,7 @@
public string PackagNo { get; set; }
[Required]
- [MaxLength(20)]
+ [MaxLength(100)]
public string PackagName { get; set; }
/// <summary>
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index f854f15..cd81f01 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -1188,7 +1188,15 @@
throw new Exception("鏈煡璇㈠埌鎵樼洏淇℃伅锛岃鏍稿疄锛�");
}
// 楠岃瘉鍏ュ簱鍗曟槑缁嗘槸鍚﹀瓨鍦�
- var detail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == model.AsnDetailId && m.ASNNo == model.AsnNo && m.LotNo.Contains(model.LotNo));
+ var detail = new BllArrivalNoticeDetail();
+ if (string.IsNullOrEmpty(model.LotNo))
+ {
+ detail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == model.AsnDetailId && m.ASNNo == model.AsnNo);
+ }
+ else
+ {
+ detail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == model.AsnDetailId && m.ASNNo == model.AsnNo && m.LotNo.Contains(model.LotNo));
+ }
if (detail == null)
{
throw new Exception("褰撳墠鐗╂枡鍙婃壒娆′笌鍗曟嵁鏃犲叧鑱旓紝璇锋牳瀹�!");
@@ -1327,14 +1335,23 @@
throw new Exception("褰撳墠鎵樼洏鍚湁璐存爣鐗╂枡淇℃伅锛屼笉鑳界粍鎵�");
}
// 鍒ゆ柇搴撳瓨鏄庣粏鏄惁宸叉湁姝ゆ墭鐩樹俊鎭�
- var sd1 = Db.Queryable<DataStockDetail>()
- .First(m => m.IsDel == "0" && m.ASNDetailNo == bind.ASNDetailNo && m.PalletNo == model.PalletNo && m.SkuNo == detail.SkuNo && m.LotNo == bind.LotNo);
+ var sd1 = new DataStockDetail();
+ if (!string.IsNullOrEmpty(bind.LotNo))
+ {
+ sd1 = Db.Queryable<DataStockDetail>()
+ .First(m => m.IsDel == "0" && m.PalletNo == model.PalletNo && m.SkuNo == detail.SkuNo && m.LotNo == bind.LotNo);//&& m.ASNDetailNo == bind.ASNDetailNo
+ }
+ else
+ {
+ sd1 = Db.Queryable<DataStockDetail>()
+ .First(m => m.IsDel == "0" && m.PalletNo == model.PalletNo && m.SkuNo == detail.SkuNo);// && m.ASNDetailNo == bind.ASNDetailNo
+ }
var sdId1 = 0;
if (sd1 != null)
{
sdId1 = sd1.Id;
// 搴撳瓨宸插瓨鍦� 鏇存柊鏁版嵁
- sd1.Qty = bind.Qty;
+ sd1.Qty += bind.Qty;
sd1.CompleteTime = comTime;
sd1.UpdateUser = userId;
sd1.UpdateTime = comTime;
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
index d0ca543..c5e12c6 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -23,6 +23,7 @@
using System.Threading.Tasks;
using Utility;
using WMS.BLL.Logic;
+using System.Web;
namespace WMS.BLL.BllPdaServer
{
@@ -2093,6 +2094,49 @@
return list;
}
+ /// <summary>
+ /// 鍑哄簱鎷h揣鑾峰彇鎵弿鏍囩鏁伴噺
+ /// </summary>
+ /// <param name="palletNo"></param>
+ /// <param name="boxNo"></param>
+ /// <returns></returns>
+ /// <exception cref="Exception"></exception>
+ public decimal CheckBoxForPick(string palletNo ,string boxNo)
+ {
+ try
+ {
+ decimal boxNum = 0;
+ if (string.IsNullOrEmpty(palletNo))
+ {
+ throw new Exception("鎵樼洏鏉$爜涓嶅彲涓虹┖!");
+ }
+ if (string.IsNullOrEmpty(boxNo))
+ {
+ throw new Exception("鏍囩鏉$爜涓嶅彲涓虹┖!");
+ }
+ var boxInfo = Db.Queryable<DataBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo == boxNo && w.PalletNo == palletNo).ToList();
+ if (boxInfo.Count <= 0)
+ {
+ boxInfo = Db.Queryable<DataBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo2 == boxNo && w.PalletNo == palletNo).ToList();
+ if (boxInfo.Count <= 0)
+ {
+ boxInfo = Db.Queryable<DataBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo3 == boxNo && w.PalletNo == palletNo).ToList();
+ }
+ }
+ if (boxInfo == null || boxInfo.Count <= 0)
+ {
+ throw new Exception("鏍囩鏉$爜鏈湪璇ユ墭鐩樺唴!");
+ }
+ boxNum = boxInfo.Sum(s => s.Qty);
+
+ return boxNum;
+ }
+ catch (Exception ex)
+ {
+ throw new Exception(ex.Message);
+ }
+ }
+
//鑾峰彇搴撳唴鏃犵鐮佺殑鎵樼洏鍒嗛厤淇℃伅
public async Task<List<BoxInfo>> GetAllotPlnInfo(string soDetailId, string palletNo)
{
@@ -2831,6 +2875,11 @@
}
boxInfos = await boxInfo.ToListAsync();
+ if (boxInfos[0].SkuNo != allot.SkuNo || boxInfos[0].LotNo != allot.LotNo)
+ {
+ throw Oops.Bah("绠辩爜鐗╂枡鎵规鍜岄�夋嫨鐗╂枡鎵规涓嶄竴鑷达紒");
+ }
+
var comDetailList = Db.Queryable<BllCompleteDetail>().Where(m => m.IsDel == "0" && m.ExportAllotId == allot.Id && m.PalletNo == palletNo).ToList();
if (biaoShi == "2") //鏁f敮鎷h揣
{
diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index 139e9d3..53d66e2 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -3338,6 +3338,22 @@
throw new Exception(e.Message);
}
}
+ public string GetHouseByPalletNo(string palletNo)
+ {
+ try
+ {
+ var datail = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.PalletNo == palletNo);
+ if (datail == null)
+ {
+ throw new Exception("鏈煡璇㈠埌鎵樼洏淇℃伅");
+ }
+ return datail.WareHouseNo;
+ }
+ catch (Exception e)
+ {
+ throw new Exception(e.Message);
+ }
+ }
public List<OutCommandDto> IssueOutHouseLk(string soNo, string outMode, int userId, string url, out string str)
{
diff --git a/Wms/WMS.BLL/HttpServer.cs b/Wms/WMS.BLL/HttpServer.cs
index ba26307..7ca3643 100644
--- a/Wms/WMS.BLL/HttpServer.cs
+++ b/Wms/WMS.BLL/HttpServer.cs
@@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Threading.Tasks;
using Utility.Tools;
using WMS.BLL.Logic;
using WMS.BLL.LogServer;
@@ -1992,7 +1993,64 @@
throw new Exception(e.Message);
}
}
+ /// <summary>
+ /// PDA骞冲簱涓嬪彂鍑哄簱
+ /// </summary>
+ /// <param name="soNo"></param>
+ /// <param name="detailId"></param>
+ /// <param name="palletNo"></param>
+ /// <param name="userId"></param>
+ /// <exception cref="Exception"></exception>
+ public void IssueOutHousePk(string soNo, string detailId, string palletNo, int userId)
+ {
+ try
+ {
+ var notice = Db.Queryable<BllExportNotice>().First(m => m.SONo == soNo && m.IsDel == "0");
+ if (notice == null)
+ {
+ throw new Exception($"鏈壘鍒皗soNo}鍑哄簱鍗曚俊鎭�");
+ }
+ var detail=Db.Queryable<DataStockDetail>().First(m => m.PalletNo == palletNo && m.IsDel == "0");
+ if (detail.WareHouseNo != "W04")
+ {
+ throw new Exception("浠撳簱鍙烽敊璇�");
+ }
+ var intDetailId = int.Parse(detailId);
+ if (intDetailId <= 0)
+ {
+ throw new Exception("閫夋嫨鐨勫嚭搴撳崟鏄庣粏鍙傛暟閿欒");
+ }
+ //寮�鍚簨鍔�
+ Db.BeginTran();
+ notice.Status = "3";//姝e湪杩涜
+ Db.Updateable(notice).ExecuteCommand();
+
+ //鎵�鏈夎鍑哄簱鐨勫嚭搴撳垎閰嶄俊鎭�(鏈笅鍙戠殑淇℃伅鍜屽緟鎷h揣鐨勪俊鎭�)
+ var allot = Db.Queryable<BllExportAllot>().Where(a => a.IsDel == "0" && a.PalletNo == palletNo && a.Status == "0").ToList();
+ if (allot == null || allot.Count <= 0) //鍒ゆ柇鏄惁鏈夐渶瑕佷笅鍙戠殑鍑哄簱娴佹按
+ {
+ throw new Exception("褰撳墠鍑哄簱鍗曟嵁鏃犻渶瑕佷笅鍙戠殑鎵樼洏");
+ }
+ //鍑哄簱娴佹按锛堟洿鏀圭姸鎬侊級
+ foreach (var item in allot)
+ {
+ item.Status = "2";
+ Db.Updateable(item).ExecuteCommand();
+ }
+
+ //娣诲姞鎿嶄綔鏃ュ織璁板綍
+ var k = new OperationSOServer().AddLogOperationSo("PDA妯″潡", "涓嬪彂鍑哄簱", soNo, "鍑哄簱", $"鐐瑰嚮鍑哄簱鎸夐挳鍑哄簱鍗曞彿涓猴細{soNo}鐨勫嚭搴撳崟", userId);
+ //鎻愪氦浜嬪姟
+ Db.CommitTran();
+ }
+ catch (Exception e)
+ {
+ //鍥炴粴浜嬪姟
+ Db.RollbackTran();
+ throw new Exception(e.Message);
+ }
+ }
#region MyRegion
diff --git a/Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs b/Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs
index bae1ed5..c2b65d3 100644
--- a/Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs
+++ b/Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs
@@ -175,6 +175,8 @@
/// <returns>鍑哄簱鍗曠殑浠撳簱鍙�</returns>
string GetHouseBySo(string soNo);
+ string GetHouseByPalletNo(string palletNo);
+
/// <summary>
/// 涓嬪彂鍑哄簱 绔嬪簱
/// </summary>
diff --git a/Wms/WMS.IBLL/IHttpServer.cs b/Wms/WMS.IBLL/IHttpServer.cs
index d99d8df..1e43ff5 100644
--- a/Wms/WMS.IBLL/IHttpServer.cs
+++ b/Wms/WMS.IBLL/IHttpServer.cs
@@ -91,6 +91,16 @@
/// <param name="str"></param>
/// <returns></returns>
List<OutCommandDto> IssueOutHouseLk(string soNo, string detailId, string outMode, string palletNo, int userId, string url, out string str);
+
+ /// <summary>
+ /// PDA骞冲簱涓嬪彂鍑哄簱
+ /// </summary>
+ /// <param name="soNo"></param>
+ /// <param name="detailId"></param>
+ /// <param name="palletNo"></param>
+ /// <param name="userId"></param>
+ /// <exception cref="Exception"></exception>
+ void IssueOutHousePk(string soNo, string detailId, string palletNo, int userId);
#endregion
diff --git a/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs b/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
index 0c97f1d..c4f6de7 100644
--- a/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
+++ b/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
@@ -122,7 +122,14 @@
/// <param name="boxNo3">鏀�/琚嬬爜</param>
/// <returns></returns>
Task<List<BoxInfo>> GetDataComBoxInfo(string soDetailId, string palletNo, string boxNo, string boxNo3);
-
+ /// <summary>
+ /// 鍑哄簱鎷h揣鑾峰彇鎵弿鏍囩鏁伴噺
+ /// </summary>
+ /// <param name="palletNo"></param>
+ /// <param name="boxNo"></param>
+ /// <returns></returns>
+ /// <exception cref="Exception"></exception>
+ decimal CheckBoxForPick(string palletNo, string boxNo);
/// <summary>
/// 鑾峰彇搴撳唴鏃犵鐮佺殑鎵樼洏鍒嗛厤淇℃伅
/// </summary>
diff --git a/Wms/Wms/Controllers/DownApiController.cs b/Wms/Wms/Controllers/DownApiController.cs
index 4fd62ab..8ba268b 100644
--- a/Wms/Wms/Controllers/DownApiController.cs
+++ b/Wms/Wms/Controllers/DownApiController.cs
@@ -174,23 +174,38 @@
{
return Ok(new HttpReturnModel { Success = "-1", Message = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�"});
}
- //楠岃瘉鍑哄簱鍙�
- if (string.IsNullOrWhiteSpace(outMode))
- {
- return Ok(new HttpReturnModel { Success = "-1", Message = "璇烽�夋嫨鍑哄簱鍦板潃" });
- }
+
var house = _exNoticeSvc.GetHouseBySo(soNo);
+ if (house != "W01")
+ {
+ house= _exNoticeSvc.GetHouseByPalletNo(palletNo);
+ }
if (house == "W01")
{
+ //楠岃瘉鍑哄簱鍙�
+ if (string.IsNullOrWhiteSpace(outMode))
+ {
+ return Ok(new HttpReturnModel { Success = "-1", Message = "璇烽�夋嫨鍑哄簱鍦板潃" });
+ }
//var list = _exNoticeSvc.IssueOutHouseMk(soNo, outMode, int.Parse(userId), _config.WcsHost + _config.IssueComApiUrl, out string str);
return Ok(new HttpReturnModel { Success = "0", Message = "str", Data = "list" });
}
else if (house == "W02")
{
- var list = _http.IssueOutHouseLk(soNo,soDetailId, outMode,palletNo, int.Parse(userId), _config.WcsHost + _config.IssueComApiUrl, out string str);
+ //楠岃瘉鍑哄簱鍙�
+ if (string.IsNullOrWhiteSpace(outMode))
+ {
+ return Ok(new HttpReturnModel { Success = "-1", Message = "璇烽�夋嫨鍑哄簱鍦板潃" });
+ }
+ var list = _http.IssueOutHouseLk(soNo, soDetailId, outMode, palletNo, int.Parse(userId), _config.WcsHost + _config.IssueComApiUrl, out string str);
- return Ok(new HttpReturnModel { Success = "0", Message = str, Data = list});
+ return Ok(new HttpReturnModel { Success = "0", Message = str, Data = list });
+ }
+ else if (house == "W04")
+ {
+ _http.IssueOutHousePk(soNo, soDetailId, palletNo, int.Parse(userId));
+ return Ok(new HttpReturnModel { Success = "0", Message = "涓嬪彂鎴愬姛" });
}
else
{
diff --git a/Wms/Wms/Controllers/PdaSoController.cs b/Wms/Wms/Controllers/PdaSoController.cs
index 037cc83..7842726 100644
--- a/Wms/Wms/Controllers/PdaSoController.cs
+++ b/Wms/Wms/Controllers/PdaSoController.cs
@@ -153,6 +153,27 @@
}
/// <summary>
+ /// 鍑哄簱鎷h揣鑾峰彇鎵弿鏍囩鏁伴噺
+ /// </summary>
+ /// <param name="palletNo"></param>
+ /// <param name="boxNo"></param>
+ /// <returns></returns>
+ [HttpGet]
+ public IActionResult CheckBoxForPick(string palletNo, string boxNo)
+ {
+ try
+ {
+ var boxNum = _pdaSoSvc.CheckBoxForPick(palletNo, boxNo);
+
+ return Ok(new { code = 0, msg = "鎷h揣鏄庣粏淇℃伅", data = boxNum });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { code = 1, msg = e.Message });
+ }
+ }
+
+ /// <summary>
/// 鍑哄簱pda鎷h揣
/// </summary>
/// <param name="model">SoDetailId:鍑哄簱鍗曟槑缁咺D銆丳alletNo:鎵樼洏鐮�</param>
--
Gitblit v1.8.0