From 87d55df7b7446d7c4c3532a2dd2e78f72574e34b Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期三, 21 二月 2024 08:23:53 +0800
Subject: [PATCH] Merge branch 'master' into wxw
---
HTML/views/ASNSetting/LabelBoxBuDa.html | 10
Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs | 153 +-
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs | 53
HTML/views/ASNSetting/PalletBind.html | 56
Wms/Wms/Controllers/PdaAsnController.cs | 20
HTML/views/StatisticalReport/BoxInfor.html | 8
Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs | 41
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs | 94 +
HTML/views/ASNSetting/LabelPrintSelect.html | 13
Wms/WMS.BLL/DataServer/StockServer.cs | 2
Wms/WMS.IBLL/IDataServer/IStockDetailServer.cs | 5
HTML/views/ASNSetting/ArrivalNoticeDetail.html | 14
Pda/View/AsnSetting/pingKuEnter.html | 1163 +++++++++++----------
Pda/View/AsnSetting/productEnterQuantity.html | 956 ++++++++---------
Wms/WMS.BLL/DataServer/StockDetailServer.cs | 21
Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs | 7
HTML/views/StatisticalReport/InventoryStatistics.html | 3
Wms/Wms/Controllers/StatisticalController.cs | 2
HTML/views/ASNSetting/ArrivalNotice.html | 45
HTML/views/ASNSetting/LabelPrint.html | 71
Wms/WMS.IBLL/IBllAsnServer/IPalletBindServer.cs | 7
Wms/WMS.BLL/Logic/AllotLocation.cs | 30
Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs | 348 ++++++
23 files changed, 1,878 insertions(+), 1,244 deletions(-)
diff --git a/HTML/views/ASNSetting/ArrivalNotice.html b/HTML/views/ASNSetting/ArrivalNotice.html
index 3c4ae48..3c07fab 100644
--- a/HTML/views/ASNSetting/ArrivalNotice.html
+++ b/HTML/views/ASNSetting/ArrivalNotice.html
@@ -310,9 +310,13 @@
html = `<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del">
<i class="layui-icon layui-icon-delete"></i>鍒犻櫎</a>`;
}
- if((d.AsnType =="1" || d.AsnType == "4") && (d.Status == "0" || d.Status == "1")){
+ if(d.AsnType =="1" && (d.Status == "0" || d.Status == "1")){
html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel">
<i class="layui-icon layui-icon-edit"></i>鐢熸垚鏍囩</a>`;
+ }
+ if(d.AsnType == "4"&& (d.Status == "0" || d.Status == "1")){
+ html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel2">
+ <i class="layui-icon layui-icon-edit"></i>鐢熸垚鏍囩</a>`;
}
return html;
}
@@ -1201,7 +1205,44 @@
console.log(field);
//鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹�
//"&Level="+field.level+"&Type="+field.type+"&BoxType="+field.boxType+"&Qty="+field.qty+
- var str = "Id="+id+"&Reset="+field.reset+"&ArriveQty="+field.arriveQty+"&ProductionTime="+field.productionTime+"&ExpirationTime="+field.expirationTime+"&StoreTime="+field.storeTime;
+ var str = "Id="+id+"&IsReset="+field.reset+"&ArriveQty="+field.arriveQty+"&ProductionTime="+field.productionTime+"&ExpirationTime="+field.expirationTime+"&StoreTime="+field.storeTime;
+
+ layer.open({
+ type: 2,
+ title: '鐢熸垚鏍囩',
+ content: 'LabelPrint.html?'+str,
+ maxmin: true,
+ area: ['660px', '660px'],
+ btn: ['鍙栨秷'],
+
+
+ });
+ });
+ submit.trigger('click');
+ }
+
+ });
+
+ break;
+ case "Addlabel2" :
+ layer.open({
+ type: 2,
+ title: '鐢熸垚鏍囩',
+ content: 'LabelPrintSelect.html?Id='+id+'&Type=4',
+ maxmin: true,
+ area: ['480px', '615px'],
+ btn: ['纭畾','鍙栨秷'],
+ yes: function(index, layero){
+ var iframeWindow = window['layui-layer-iframe'+ index]
+ ,submitID = 'layuiadmin-app-form-edit'
+ ,submit = layero.find('iframe').contents().find('#'+ submitID);
+ //鐩戝惉鎻愪氦
+ iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
+ var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈�
+ console.log(field);
+ //鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹�
+ //"&Level="+field.level+"&Type="+field.type+"&BoxType="+field.boxType+"&Qty="+field.qty+
+ var str = "Id="+id+"&IsReset="+field.reset+"&ArriveQty="+field.arriveQty+"&ProductionTime="+field.productionTime+"&ExpirationTime="+field.expirationTime+"&StoreTime="+field.storeTime;
layer.open({
type: 2,
diff --git a/HTML/views/ASNSetting/ArrivalNoticeDetail.html b/HTML/views/ASNSetting/ArrivalNoticeDetail.html
index c3f0575..c6e0191 100644
--- a/HTML/views/ASNSetting/ArrivalNoticeDetail.html
+++ b/HTML/views/ASNSetting/ArrivalNoticeDetail.html
@@ -116,7 +116,15 @@
</script>
<script type="text/html" id="table-content-list">
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"> <i class="layui-icon layui-icon-delete"></i>鍒犻櫎</a>
- </script>
+ </script>
+ <script type="text/html" id="table-content-Packlist">
+ {{#
+ function GetPack(d){
+ return d.PackagNo + '-' + d.PackagName;
+ }
+ }}
+ {{ GetPack(d) }}
+ </script>
</div>
</div>
</div>
@@ -161,7 +169,7 @@
{field: 'UnitName',title: '璁¢噺鍗曚綅',align: 'center',width: 70},
{field: 'Standard',title: '瑙勬牸',width: 160,align: 'center'},
{field: 'LotText',title: '鎵规鎻忚堪',align: 'center',edit: 'text',width: 160},
- {field: 'PackagNo',title: '鍖呰鍚嶇О',width: 160},
+ {field: 'PackagNo',title: '鍖呰鍚嶇О',width: 160, templet: "#table-content-Packlist"},
{field: 'Price',title: '鍗曚环',align: 'center',width: 80},
{field: 'Money',title: '閲戦',align: 'center',width: 100},
{field: 'UDF1',title: '鑷畾涔夊垪1',align: 'center',edit: 'text',width: 140},
@@ -681,12 +689,14 @@
}
arr.push(data[i]); //灞炴��
}
+
$.extend(infoOptions, {
data: arr
});
infoOptions.page = {
curr: 1
}
+ console.log(infoOptions)
table.render(infoOptions);
}
diff --git a/HTML/views/ASNSetting/LabelBoxBuDa.html b/HTML/views/ASNSetting/LabelBoxBuDa.html
index 77d3981..976df1c 100644
--- a/HTML/views/ASNSetting/LabelBoxBuDa.html
+++ b/HTML/views/ASNSetting/LabelBoxBuDa.html
@@ -190,7 +190,7 @@
GetImportId();
});
form.on('select(Type)', function (data) {
- console.log(data.value); //寰楀埌琚�変腑鐨勫��
+ // console.log(data.value); //寰楀埌琚�変腑鐨勫��
if (data.value == "1") {
$("#LabelStream").removeAttr("readonly")
$("#EndBoxCode").removeAttr("readonly")
@@ -226,14 +226,14 @@
synData(IP + "/BllAsn/GetBuDaLabelList", param1, 'post', function (res) {
if (res.code == 0) { //鎴愬姛
var labels = "";
- console.log(res.data);
+ // console.log(res.data);
for (var z = 0; z < res.data.length; z++) {
var idd = "";
if (z - 1 >= 0) {
idd = (z - 1).toString();
}
- console.log(res.data[z]);
- console.log(z);
+ // console.log(res.data[z]);
+ // console.log(z);
$("#SkuNo").attr("id", "SkuNo" + z.toString());
$("#SkuNo" + z.toString()).html(res.data[z].SkuNo);
@@ -303,7 +303,7 @@
$("#imgBar" + z.toString()).attr("id", "imgBar");
$("#imgBar").attr("src", "");
}
- console.log(labels);
+ // console.log(labels);
document.getElementById('print2').innerHTML = "";
document.getElementById('print2').innerHTML = labels;
$("#print2").removeClass("hideCls");
diff --git a/HTML/views/ASNSetting/LabelPrint.html b/HTML/views/ASNSetting/LabelPrint.html
index 974caae..2519584 100644
--- a/HTML/views/ASNSetting/LabelPrint.html
+++ b/HTML/views/ASNSetting/LabelPrint.html
@@ -112,45 +112,54 @@
var laydate = layui.laydate;
var id = getQueryString('Id');
- var reset = getQueryString('Reset');
+ var reset = getQueryString('IsReset');
var arriveQty = getQueryString('ArriveQty');
var productionTime = getQueryString('ProductionTime');
var expirationTime = getQueryString('ExpirationTime');
var storeTime = getQueryString('StoreTime');
- console.log(productionTime);
- console.log(expirationTime);
- console.log(storeTime);
+ var doing = true;
+ // console.log(productionTime);
+ // console.log(expirationTime);
+ // console.log(storeTime);
//鐢熸垚
$('#btnAdd').on('click', function () {
- var param = {
- Id: parseInt(id),
- IsReset:reset,
- ArriveQty:arriveQty,
- ProductionTime:productionTime,
- ExpirationTime:expirationTime,
- StoreTime:storeTime
- };
- console.log(param);
- synData(IP + "/BllAsn/AddLabelBox", param , 'post', function (res) {
- if (res.code == 0) { //鎴愬姛
- layer.msg(res.msg, {
- icon: 1,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function () {
- parent.location.reload();
- parent.layer.close(layer.index);
- });
-
- } else { //涓嶆垚鍔�
- layer.msg(res.msg, {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function () { });
- }
- });
+ if(doing){
+ doing= false;
+
+
+ var param = {
+ Id: parseInt(id),
+ IsReset:reset,
+ ArriveQty:arriveQty,
+ ProductionTime:productionTime,
+ ExpirationTime:expirationTime,
+ StoreTime:storeTime
+ };
+ // console.log(param);
+ synData(IP + "/BllAsn/AddLabelBox", param , 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ layer.msg(res.msg, {
+ icon: 1,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ parent.location.reload();
+ parent.layer.close(layer.index);
+ doing = true;
+ });
+
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ doing = true;
+ });
+ }
+ });
+ }
});
//鎵撳嵃
$('#btnPrint').on('click', function () {
@@ -189,7 +198,7 @@
}
- // 寰幆鍔犺浇鏍囩
+ // 鍔犺浇鏍囩
function div(i, isprint, bqNum) {
var param1 = {
diff --git a/HTML/views/ASNSetting/LabelPrintSelect.html b/HTML/views/ASNSetting/LabelPrintSelect.html
index 8e9281d..b2efa30 100644
--- a/HTML/views/ASNSetting/LabelPrintSelect.html
+++ b/HTML/views/ASNSetting/LabelPrintSelect.html
@@ -32,7 +32,7 @@
<div class="layui-form-item">
<label class="layui-form-label">閲嶇疆鎵瑰彿</label>
<div class="layui-input-block">
- <select name="reset" id="reset" lay-verify="required">
+ <select name="reset" id="reset" lay-filter="reset" lay-verify="required">
<option value="1">鏄�</option>
<option value="0">鍚�</option>
</select>
@@ -116,7 +116,16 @@
});
var id = getQueryString('Id');
-
+ var asnType = getQueryString('Type');
+ console.log(asnType);
+ console.log(asnType == 4);
+ if(asnType == 4){
+
+ $("#reset option[value='0']").attr("selected","selected"); //鎬у埆
+ $("#reset").attr("disabled","disabled");
+ form.render('select');
+ }
+
var param = {
id: parseInt(id),
};
diff --git a/HTML/views/ASNSetting/PalletBind.html b/HTML/views/ASNSetting/PalletBind.html
index 09c9fa5..0a07864 100644
--- a/HTML/views/ASNSetting/PalletBind.html
+++ b/HTML/views/ASNSetting/PalletBind.html
@@ -62,22 +62,40 @@
</div>
</div>
<div class="layui-inline">
+ <label class="layui-form-label" style="width: 60px;">鎵�灞炰粨搴�</label>
+ <div class="layui-input-inline">
+ <select name="WareHouseNo" id="WareHouseNo" lay-filter="ImportExecuteFlag" lay-search>
+ <option value=""></option>
+ <option value="W01">鍔涜绔嬩綋搴�</option>
+ <option value="W02">鍔涜骞冲簱</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
<label class="layui-form-label" style="width: 60px;">鎵�灞炲贩閬�</label>
<div class="layui-input-inline">
<select name="RoadwayNo" id="RoadwayNo" lay-filter="ImportExecuteFlag" lay-search>
<option value=""></option>
<option value="R01">01宸烽亾</option>
<option value="R02">02宸烽亾</option>
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 60px;">鎵�灞炰粨搴�</label>
- <div class="layui-input-inline">
- <select name="WareHouseNo" id="WareHouseNo" lay-filter="ImportExecuteFlag" lay-search>
- <option value=""></option>
- <option value="W01">09浠撳簱</option>
- <option value="W02">09闆剁搴�</option>
+ <option value="R03">03宸烽亾</option>
+ <option value="R04">04宸烽亾</option>
+ <option value="R05">05宸烽亾</option>
+ <option value="R06">06宸烽亾</option>
+ <option value="R07">07宸烽亾</option>
+ <option value="R08">08宸烽亾</option>
+ <option value="R09">09宸烽亾</option>
+ <option value="R10">10宸烽亾</option>
+ <option value="R11">11宸烽亾</option>
+ <option value="R12">12宸烽亾</option>
+ <option value="R13">13宸烽亾</option>
+ <option value="R14">14宸烽亾</option>
+ <option value="R15">15宸烽亾</option>
+ <option value="R16">16宸烽亾</option>
+ <option value="R17">17宸烽亾</option>
+ <option value="R18">18宸烽亾</option>
+ <option value="R19">19宸烽亾</option>
+ <option value="R20">20宸烽亾</option>
</select>
</div>
</div>
@@ -340,6 +358,24 @@
switch (d.RoadwayNo) {
case "R01": return '01宸烽亾';
case "R02": return '02宸烽亾';
+ case "R03": return '03宸烽亾';
+ case "R04": return '04宸烽亾';
+ case "R05": return '05宸烽亾';
+ case "R06": return '06宸烽亾';
+ case "R07": return '07宸烽亾';
+ case "R08": return '08宸烽亾';
+ case "R09": return '09宸烽亾';
+ case "R10": return '10宸烽亾';
+ case "R11": return '11宸烽亾';
+ case "R12": return '12宸烽亾';
+ case "R13": return '13宸烽亾';
+ case "R14": return '14宸烽亾';
+ case "R15": return '15宸烽亾';
+ case "R16": return '16宸烽亾';
+ case "R17": return '17宸烽亾';
+ case "R18": return '18宸烽亾';
+ case "R19": return '19宸烽亾';
+ case "R20": return '20宸烽亾';
default: return "";
}
diff --git a/HTML/views/StatisticalReport/BoxInfor.html b/HTML/views/StatisticalReport/BoxInfor.html
index 9041137..0e75ea6 100644
--- a/HTML/views/StatisticalReport/BoxInfor.html
+++ b/HTML/views/StatisticalReport/BoxInfor.html
@@ -371,8 +371,9 @@
//#region 鑷畾涔夎〃澶�
var TotalColsArr = [[
{field: '',title: '搴忓彿',type:'numbers',align: 'center',fixed: 'left', "disabled": true},
- {field: 'WareHouseNo', title: '鎵�灞炰粨搴�', align: 'center'},
- {field: 'AreaNo', title: '鎵�灞炲尯鍩�', align: 'center'},
+ {field: 'WareHouseName', title: '鎵�灞炰粨搴�', align: 'center'},
+ {field: 'RoadwayName', title: '鎵�灞炲贩閬�', align: 'center'},
+ {field: 'AreaName', title: '鎵�灞炲尯鍩�', align: 'center'},
{field: 'LocatNo', title: '鍌ㄤ綅鍦板潃', align: 'center'},
{field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center'},
{field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center'},
@@ -433,7 +434,8 @@
BitBoxMark:BitBoxMark, //闆剁鏍囪
InspectStatus:InspectStatus //璐ㄩ噺鐘舵��
};
- sendData(IP + "/Statistical/GetBindList", param, 'get', function(res) {
+ sendData(IP + "/Statistical/GetBindList", param, 'get', function(res) {
+ console.log(res)
if (res.code == 0) { //鎴愬姛
var list = res.data;
$.extend(infoOptions, {
diff --git a/HTML/views/StatisticalReport/InventoryStatistics.html b/HTML/views/StatisticalReport/InventoryStatistics.html
index 8dd1e35..9a1d1fd 100644
--- a/HTML/views/StatisticalReport/InventoryStatistics.html
+++ b/HTML/views/StatisticalReport/InventoryStatistics.html
@@ -495,8 +495,9 @@
var DetailColsArr = [[
{field: 'PalletNo',title: '鎵樼洏鍙�',align: 'center',width: 110,},
{field: 'LocatNo',title: '鍌ㄤ綅鍦板潃',align: 'center',width: 100,},
- {field: 'RoadwayName',title: '鎵�灞炲贩閬�',width: 90,align: 'center'},
{field: 'WareHouseName',title: '鎵�灞炰粨搴�',width: 90,align: 'center'},
+ {field: 'RoadwayName',title: '鎵�灞炲贩閬�',width: 90,align: 'center'},
+ {field: 'AreaName',title: '鎵�灞炲尯鍩�',width: 90,align: 'center'},
{field: 'SkuNo',title: '鐗╂枡缂栫爜',width: 100,align: 'center'},
{field: 'SkuName',title: '鐗╂枡鍚嶇О',align: 'center'},
{field: 'Standard',title: '鐗╂枡瑙勬牸',width: 130,align: 'center'},
diff --git a/Pda/View/AsnSetting/pingKuEnter.html b/Pda/View/AsnSetting/pingKuEnter.html
index 03eaa90..9f3ec0a 100644
--- a/Pda/View/AsnSetting/pingKuEnter.html
+++ b/Pda/View/AsnSetting/pingKuEnter.html
@@ -1,589 +1,634 @@
<!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">
- .layout-bill-info {
- height: auto;
- /* background-color: #009E94; */
- }
- .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;
- }
- .foot-container {
- text-align: center;
- /* background-color: #007DDB; */
- }
- </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" lang>骞冲簱鍏ュ簱</td>
- <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg" ></td>
- </tr>
- </table>
+<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">
+ .layout-bill-info {
+ height: auto;
+ /* background-color: #009E94; */
+ }
+
+ .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;
+ }
+
+ .foot-container {
+ text-align: center;
+ /* background-color: #007DDB; */
+ }
+ </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" 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>
- <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>
-
- <div id="" class="layout-bill-info">
- <form class="layui-form" action="" style="height: auto;">
- <div id="" class="layui-form-item layout-dropdownlist" >
- <label class="layui-form-label" lang>鍏ュ簱鍗曪細</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 id="" class="layout-bill-info">
+ <form class="layui-form" action="" style="height: auto;">
+ <div id="" class="layui-form-item layout-dropdownlist">
+ <label class="layui-form-label" lang>鍏ュ簱鍗曪細</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 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="" class="layui-form-item layout-input">
- <label class="layui-form-label" lang>鍦扮爜锛�</label>
- <div class="layui-input-block">
- <input id="LocatNo" type="text" lay-verify="stock" lang langholder placeholder="璇锋壂鎻忓湴鐮�"
- autocomplete="off" class="layui-input">
- </div>
- </div>
- </form>
- <div id="" style="text-align: center;">
- <button class="btn-ok-blue" type="button" lay-submit lay-filter="formBind">纭鍏ュ簱</button>
</div>
+ <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="" class="layui-form-item layout-input">
+ <label class="layui-form-label" lang>鍦扮爜锛�</label>
+ <div class="layui-input-block">
+ <input id="LocatNo" type="text" lay-verify="stock" lang langholder placeholder="璇锋壂鎻忓湴鐮�"
+ autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </form>
+ <div id="" style="text-align: center;">
+ <button class="btn-ok-blue" type="button" lay-submit lay-filter="formBind">纭鍏ュ簱</button>
</div>
-
- <div id="" class="cut-line" >
- <img src="/assets/fengexian.png" >
- </div>
-
- <div class="layout-tbl-paging" id="" >
- <div id="" class="tbl-title">
- <table class="layout-tbl-input" border="0" cellspacing="" cellpadding="" >
- <tr>
- <td>
- <!-- <div class="layout-boxinfo">
+ </div>
+
+ <div id="" class="cut-line">
+ <img src="/assets/fengexian.png">
+ </div>
+
+ <div class="layout-tbl-paging" id="">
+ <div id="" class="tbl-title">
+ <table class="layout-tbl-input" border="0" cellspacing="" cellpadding="">
+ <tr>
+ <td>
+ <!-- <div class="layout-boxinfo">
<label class="layui-form-label" lang style="width: 35%;">鎵樼洏鍙凤細</label>
<div class="layui-input-block" style="width: 70%;">
<input id="PalletNo" type="text" disabled lay-verify="required" placeholder=""
autocomplete="off" class="layui-input" style="margin-left: -35px;">
</div>
</div> -->
- </td>
- <td>
- <div class="layout-boxinfo">
- <label class="layui-form-label" style="color: #FF0000" lang>绠卞瓙鏁伴噺锛�</label>
- <div class="layui-input-block">
- <input id="boxNum" type="text" disabled lay-verify="required" placeholder=""
- autocomplete="off" class="layui-input">
- </div>
+ </td>
+ <td>
+ <div class="layout-boxinfo">
+ <label class="layui-form-label" style="color: #FF0000" lang>绠卞瓙鏁伴噺锛�</label>
+ <div class="layui-input-block">
+ <input id="boxNum" type="text" disabled lay-verify="required" placeholder=""
+ autocomplete="off" class="layui-input">
</div>
- </td>
- </tr>
- </table>
- </div>
- <table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding="">
- <tr><th lang>绠辩爜</th><th lang>鍚嶇О</th><th lang>鏁伴噺</th></tr>
- <tr id="boxCell" style="display: none">
- <td id="BoxNo" name="BoxNo">AG000001</td>
- <td id="SkuName" name="SkuName">鐤嫍鍚嶇О鍚嶇О鍚嶇О</td>
- <td id="Qty" name="Qty">30</td>
- <!-- <td name="del">
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding="">
+ <tr>
+ <th lang>绠辩爜</th>
+ <th lang>鍚嶇О</th>
+ <th lang>鏁伴噺</th>
+ </tr>
+ <tr id="boxCell" style="display: none">
+ <td id="BoxNo" name="BoxNo">AG000001</td>
+ <td id="SkuName" name="SkuName">鐤嫍鍚嶇О鍚嶇О鍚嶇О</td>
+ <td id="Qty" name="Qty">30</td>
+ <!-- <td name="del">
<div id="" class="tbl-btn-del" lang>
鍒犻櫎
</div>
</td> -->
- </tr>
- </table>
-
- <!-- 鍒嗛〉 -->
- <table id="tableBoxPages" class="tbl-box-pages" border="" cellspacing="" cellpadding="">
- <tr >
- <td class="page-prev" lang>涓婁竴椤�</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" lang>涓嬩竴椤�</td>
- </tr>
- </table>
- </div>
- </div>
+ </tr>
+ </table>
+
+ <!-- 鍒嗛〉 -->
+ <table id="tableBoxPages" class="tbl-box-pages" border="" cellspacing="" cellpadding="">
+ <tr>
+ <td class="page-prev" lang>涓婁竴椤�</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" lang>涓嬩竴椤�</td>
+ </tr>
+ </table>
+ </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
-
- initLanguage()
- setLanguage()
-
- //褰撳墠鍒嗛〉
- var curPageIndex = 1
- var billList = null
- var IsHuiKu=0 //鏄惁鍥炲簱锛�0:鍚� 1:鏄�
+ </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
- //鑾峰彇鍏ュ簱鍗�
- function getBar(selectedvalue) {
- if (selectedvalue) {
- let item = getCurBillInfo(selectedvalue)
- let str = item.ImportWarehouseId + "; " + item.WarehouseName + "; "
- if(item.LanewayCode == ""){
- str += ""
- }else{
- str += item.LanewayCode
- str += ";"
- }
- if(item.LanewayName == null || $.isPlainObject(item.LanewayName)){
- str += ""
- }else{
- str += item.LanewayName
- }
- $('#whName').val(str)
+ initLanguage()
+ setLanguage()
+
+ //褰撳墠鍒嗛〉
+ var curPageIndex = 1
+ var billList = null
+ var IsHuiKu = 0 //鏄惁鍥炲簱锛�0:鍚� 1:鏄�
+ //
+ //鑾峰彇鍏ュ簱鍗�
+ function getBar(selectedvalue) {
+ if (selectedvalue) {
+ let item = getCurBillInfo(selectedvalue)
+ let str = item.ImportWarehouseId + "; " + item.WarehouseName + "; "
+ if (item.LanewayCode == "") {
+ str += ""
} else {
- $('#whName').val('')
+ str += item.LanewayCode
+ str += ";"
}
+ if (item.LanewayName == null || $.isPlainObject(item.LanewayName)) {
+ str += ""
+ } else {
+ str += item.LanewayName
+ }
+ $('#whName').val(str)
+ } else {
+ $('#whName').val('')
}
-
- //鑾峰彇褰撳墠鎵�閫夊叆搴撳崟鐨勪俊鎭�
- function getCurBillInfo(billcode){
- for(var i in billList){
- if(billList[i].ImportBillCode == billcode){
- return billList[i]
- }
- }
-
- return null
- }
+ }
- $("#selectDiv").click(function(){
- var input = $('select[id="bar"]').next().find('.layui-select-title input')
- var val = input.val()
- //鍏堟洿鏂颁竴涓嬪叆搴撳崟
- updateBillList(function(data){
- $('select[id="bar"]').next().addClass('layui-form-selected')
-
- $('select[id="bar"]').next().find('.layui-select-title input').val(val)
- })
- })
-
- //鏇存柊鍏ュ簱鍗�
- function updateBillList(callback){
- var input = $('select[id="bar"]').next().find('.layui-select-title input')
- var val = input.val()
- $("#bar").empty()
- $("#bar").append('<option value =>' + '</option>');
- form.render('select');
-
- var param = {
- Type: '0,1,2,3',
- };
- sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function(res) {
- if (res.code == 0) { //鎴愬姛
- billList = deepCopy(res.data)
- console.log(billList)
- for (var i = 0; i < billList.length; i++) {
- $("#bar").append('<option value =' + billList[i].ASNNo + '>' + billList[i]
- .ASNNo +
- '</option>');
- }
- form.render('select');
-
- if(!val){
- $('#bar').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this')
- }else{
- var sel = 'dd[lay-value=' + val + ']';
- $('#bar').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
- }
-
- callback(billList)
- } else { //涓嶆垚鍔�
- // billList = null
- // layer.msg(res.msg, {
- // icon: 2,
- // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- // }, function() {});
- }
- });
- }
- //褰撴墭鐩樻潯鐮佽緭鍏ユ澶卞幓鐒︾偣鏃�,妫�鏌ヤ竴涓嬫墭鐩樼姸鎬�
- $("#PalletNo").blur(function(){
- checkPalletStat()
- })
- $("#PalletNo").keydown(function(e) {
- if (e.keyCode === 13) {
- //妫�鏌ユ墭鐩樼姸鎬�
- checkPalletStat();
- }
- });
- //妫�鏌ユ墭鐩樼姸鎬�
- function checkPalletStat(){
- if($("#PalletNo").val() == ""){
- return
- }
- IsHuiKu=0
- var param1 = {
- "PalletNo": $("#PalletNo").val()
- }
- //鑾峰彇鎵樼洏绠$悊鐨勫叆搴撳崟
- sendData(IP + "/PdaAsn/GetASNNoByPalletNo", param1, 'post', function(res) {
- if (res.code == 0) { //鎴愬姛
- $("#bar").append('<option value =' + res.data + '>' + res.data +'</option>');
- $("#bar").find("option[value='"+res.data+"']").prop("selected",true);
- form.render();
- if(res.data==''){
- IsHuiKu=1
- }
- var param = {
- "PalletNo": $("#PalletNo").val()
- }
- //妫�鏌ユ墭鐩樼姸鎬�
- sendData(IP + "/PdaAsn/IsEnablePalletNo", param, 'post', function(res) {
- if (res.code == 0) { //鎴愬姛
- $.cookie('PalletNo', $("#PalletNo").val());
- refreshTable()
- } else { //涓嶆垚鍔�
- layer.msg(res.msg, {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {});
- }
- });
- } else { //涓嶆垚鍔�
- layer.msg(res.msg, {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {
- //鍏堟竻绌轰竴涓嬬瀛愬垪琛�
- let trs = $("#tableBoxList tr")
- let len = trs.length
- for(i=len - 1; i >=2; i--){
- trs[i].remove();
- }
- });
- return
- }
- });
- }
- //娓叉煋鍒楄〃
- function refreshTable() {
- //鍏堟竻绌轰竴涓嬬瀛愬垪琛�
- let trs = $("#tableBoxList tr")
- let len = trs.length
- for(i=len - 1; i >=2; i--){
- trs[i].remove();
- }
- //璁剧疆鎵樼洏鍙�
- $("#PalletNo").val($.cookie('PalletNo'))
-
- var param = {
- // PalletNo: $.cookie('PalletNo')
- PalletNo: $.cookie('PalletNo'),
- IsHuiKu : IsHuiKu
- };
- sendData(IP + "/PdaAsn/GetBoxInfos", param, 'post', function(res) {
- console.log(res)
- if (res.code == 0) { //鎴愬姛
- console.log(res)
- $("#boxNum").val(res.data.length)
- var list = res.data
- var arrTrs = new Array()
- let idx = 0
- for(var i in list) {
- // list[i].BoxNo
- var tr = $("#boxCell").eq(0).clone();
- tr.appendTo("#tableBoxList");
- tr.attr('id', list[i].BoxNo)
- idx++;
- tr.attr('index', idx)
- tr.find("td[name='BoxNo']").html(list[i].BoxNo);
- tr.find("td[name='SkuName']").html(list[i].SkuName);
- tr.find("td[name='Qty']").html(list[i].Qty);
- var code = list[i].BoxNo
- //console.log("code is "+code)
-
- // //console.log("BoxNo is "+tr.find("td[name='BoxNo']").html())
- tr.show();
- arrTrs[i] = tr
- }
-
- //璁剧疆鍒嗛〉
- setPages(1, list.length)
- } else { //涓嶆垚鍔�
- layer.msg("鏃犳暟鎹�", {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {});
- $("#boxNum").val(0)
- setPages(1, 0)
- }
- });
- }
- //纭鍏ュ簱
- form.on('submit(formBind)', function(data) {
- // if (!$.cookie('userId')) {
- // layer.msg('鐧婚檰澶辨晥锛岃閲嶆柊鐧婚檰', {
- // icon: 2,
- // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- // }, function() {
- // location.href = "login.html";
- // //鍥炶皟
- // });
- // }
- let bval = $('select[id="bar"]').next().find('.layui-select-title input').val()
- if (!bval && IsHuiKu==0) {
- layer.msg('璇烽�夋嫨鍏ュ簱鍗�', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- });
- return;
- }
- if (!$("#PalletNo").val()) {
- layer.msg('璇锋壂鎻忔墭鐩樻潯鐮�', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- });
- return;
- }
- if (!$("#LocatNo").val()) {
- layer.msg('璇锋壂鎻忓湴鐮�', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- });
- return;
- }
-
- let item = getCurBillInfo(bval)
- var param = {
- PalletNo:$("#PalletNo").val(),
- LocatNo:$("#LocatNo").val(),
- ASNNo:$("#bar").val()
- }
- param.Qty=Number(param.Qty)
- sendData(IP + "/PdaAsn/ConfirmInStock", param, 'post', function(res) {
- if (res.code == 0) { //鎴愬姛
- layer.msg(res.msg, {
- icon: 1,
- time: 2500 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {
- clearTable()
- $("#PalletNo").val('')
- });
- } else { //涓嶆垚鍔�
- layer.msg(res.msg, {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {
- //鍥炶皟
- });
- }
- });
- return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆�
- });
- function clearTable(){
- $("#PalletNo").val('')
- $("#boxNum").val('')
- let trs = $("#tableBoxList tr")
- let len = trs.length
- for(i=len - 1; i >=2; i--){
- trs[i].remove();
+ //鑾峰彇褰撳墠鎵�閫夊叆搴撳崟鐨勪俊鎭�
+ function getCurBillInfo(billcode) {
+ for (var i in billList) {
+ if (billList[i].ImportBillCode == billcode) {
+ return billList[i]
}
}
- form.verify({
- stock: [/^[\S]{8}$/, '鎵樼洏鏉$爜蹇呴』涓哄叚浣嶅瓧绗�']
- });
+ return null
+ }
- function onClickPrevPage(){
- //console.log("涓婁竴椤垫寜閽鐐瑰嚮")
- if(curPageIndex == 1){
- return
- }
- setCurPage(curPageIndex - 1)
- }
-
- function onClickNextPage(){
- //console.log("涓嬩竴椤垫寜閽鐐瑰嚮")
- let n = getBoxPageNum()
- if(curPageIndex == n){
- return
- }
- setCurPage(curPageIndex + 1)
- }
-
- function getBoxPageNum()
- {
- let num = $("#tableBoxList tr").length
- if(num <= 2 ){
- return 0
- }
-
- let pageNum = Math.floor(num / 10);
- if(num % 10 > 0){
- pageNum += 1;
- }
-
- return pageNum
- }
-
- //璁剧疆鍒嗛〉
- function setPages(pageIndex, boxNum){
- if(boxNum <= 0){
- //鍒楄〃涓虹┖锛岄殣钘忓垎椤甸〉鐮�
- $("#tableBoxPages").hide()
- return
- }
-
- let pageNum = Math.floor(boxNum / 10);
- if(boxNum % 10 > 0){
- pageNum += 1;
- }
- //console.log("pageNum is " + pageNum)
-
- $("#tableBoxPages").find("tr").remove()
- let table = $("#tableBoxPages")
- $("<tr></tr>").appendTo("#tableBoxPages")
-
- // let newTr = table.append("<tr></tr>")
- // newTr.append("<td class='page-prev'>涓婁竴椤�</td>")
- $("<td id='prevPage' class='page-prev'>涓婁竴椤�</td>").appendTo("#tableBoxPages tr")
- $("#tableBoxPages tr").eq(0).find("td[id^='prevPage']").click(function(){
- onClickPrevPage()
- })
- for(i=1; i < pageNum + 1; i++){
- // newTr.append("<td class='page-num'>"+ i +"</td>")
- $("<td class='page-num'>"+ i +"</td>").appendTo("#tableBoxPages tr")
- }
- // newTr.append("<td class='page-next'>涓嬩竴椤�</td>")
- $("<td id='nextPage' class='page-next'>涓嬩竴椤�</td>").appendTo("#tableBoxPages tr")
- $("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function(){
- onClickNextPage()
- })
- // pages.show()
- $("#tableBoxPages").show()
-
- setCurPage(1)
- }
-
- //璁剧疆褰撳墠鍒嗛〉
- function setCurPage(pageIndex){
- let totalTrNum = $("#tableBoxList tr").length
- if(totalTrNum <= 2 ){
- //console.log("tableBoxList 涓虹┖ totalTrNum: " + totalTrNum)
- //curPageIndex = 1
- return
- }
-
- let pageNum = getBoxPageNum()
- if(pageIndex > pageNum){
- //console.log("璁剧疆鐨勯〉鐮佽秴鍑洪〉鏁�, pageIndex : " + pageIndex)
- //curPageIndex = 1
- return
- }
-
- let startIndex = (pageIndex - 1) * 10 + 1
- let n = totalTrNum - startIndex
- let endIndex = 0
- if(n > 9){
- endIndex = startIndex + 9
- }else{
- endIndex = startIndex + n
- }
- //console.log("startIndex is "+startIndex)
- //console.log("endIndex is "+endIndex)
- //startIndex =2
- //endIndex = 2
- let trs = $("#tableBoxList tr")
- //console.log("琛屾暟 "+trs.length)
- let d = 0
- for(let i = 2; i < trs.length; i++){
- //console.log("琛岀储寮� " + trs.eq(i).attr('index'))
- let t = trs.eq(i)
- d = t.attr('index')
- if(d >= startIndex && d <= endIndex){
- //console.log("闇�瑕佹樉绀�")
- //鏄剧ず琛�
- t.show()
- }else{
- //闅愯棌琛�
- t.hide()
- }
- }
-
- curPageIndex = pageIndex
-
- let ptr = $("#tableBoxPages tr")
- for(let i = 1; i < pageNum+1; i++){
- ptr.eq(0).find("td").eq(i).removeClass("page-num-select")
- if(i == curPageIndex){
- ptr.eq(0).find("td").eq(i).addClass("page-num-select")
- }
- }
- //console.log("totalTrNum is " + totalTrNum)
- }
- $("#menuImg").click(function(e){
- e.stopPropagation()
-
- if($("#menuList").is(":hidden")){
- $("#menuList").show()
- }else{
- $("#menuList").hide()
- }
- })
- $('body').click(function(){
- // //console.log("body")
- $("#menuList").hide()
+ $("#selectDiv").click(function () {
+ var input = $('select[id="bar"]').next().find('.layui-select-title input')
+ var val = input.val()
+ //鍏堟洿鏂颁竴涓嬪叆搴撳崟
+ updateBillList(function (data) {
+ $('select[id="bar"]').next().addClass('layui-form-selected')
+
+ $('select[id="bar"]').next().find('.layui-select-title input').val(val)
})
})
- </script>
- </body>
-</html>
+
+ //鏇存柊鍏ュ簱鍗�
+ function updateBillList(callback) {
+ var input = $('select[id="bar"]').next().find('.layui-select-title input')
+ var val = input.val()
+ $("#bar").empty()
+ $("#bar").append('<option value =>' + '</option>');
+ form.render('select');
+
+ var param = {
+ Type: '0,1,2,3',
+ };
+ sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ billList = deepCopy(res.data)
+ console.log(billList)
+ for (var i = 0; i < billList.length; i++) {
+ $("#bar").append('<option value =' + billList[i].ASNNo + '>' + billList[i]
+ .ASNNo +
+ '</option>');
+ }
+ form.render('select');
+
+ if (!val) {
+ $('#bar').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this')
+ } else {
+ var sel = 'dd[lay-value=' + val + ']';
+ $('#bar').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
+ }
+
+ callback(billList)
+ } else { //涓嶆垚鍔�
+ // billList = null
+ // layer.msg(res.msg, {
+ // icon: 2,
+ // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ // }, function() {});
+ }
+ });
+ }
+ //褰撴墭鐩樻潯鐮佽緭鍏ユ澶卞幓鐒︾偣鏃�,妫�鏌ヤ竴涓嬫墭鐩樼姸鎬�
+ $("#PalletNo").blur(function () {
+ checkPalletStat()
+ })
+ $("#PalletNo").keydown(function (e) {
+ if (e.keyCode === 13) {
+ //妫�鏌ユ墭鐩樼姸鎬�
+ checkPalletStat();
+ }
+ });
+ //妫�鏌ユ墭鐩樼姸鎬�
+ function checkPalletStat() {
+ if ($("#PalletNo").val() == "") {
+ return
+ }
+ IsHuiKu = 0
+ var param1 = {
+ "PalletNo": $("#PalletNo").val()
+ }
+ //鑾峰彇鎵樼洏绠$悊鐨勫叆搴撳崟
+ sendData(IP + "/PdaAsn/GetASNNoByPalletNo", param1, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ $("#bar").append('<option value =' + res.data + '>' + res.data + '</option>');
+ $("#bar").find("option[value='" + res.data + "']").prop("selected", true);
+ form.render();
+ if (res.data == '') {
+ IsHuiKu = 1
+ }
+ var param = {
+ "PalletNo": $("#PalletNo").val()
+ }
+ //妫�鏌ユ墭鐩樼姸鎬�
+ sendData(IP + "/PdaAsn/IsEnablePalletNo", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ $.cookie('PalletNo', $("#PalletNo").val());
+ refreshTable()
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ //鍏堟竻绌轰竴涓嬬瀛愬垪琛�
+ let trs = $("#tableBoxList tr")
+ let len = trs.length
+ for (i = len - 1; i >= 2; i--) {
+ trs[i].remove();
+ }
+ });
+ return
+ }
+ });
+ }
+
+ // 鍌ㄤ綅淇℃伅(鍦扮爜)澶卞幓鐒︾偣鍚庤Е鍙戦獙璇�
+ $("#LocatNo").blur(function () {
+ CheckLocatNo()
+ })
+ // 鍌ㄤ綅淇℃伅(鍦扮爜)鐐瑰嚮鍥炶溅鍚庤Е鍙戦獙璇�
+ $("#LocatNo").keydown(function (e) {
+ if (e.keyCode === 13) {
+ CheckLocatNo();
+ }
+ });
+ // 楠岃瘉鍌ㄤ綅淇℃伅(鍦扮爜)鏄惁鍙敤
+ function CheckLocatNo() {
+ if ($("#LocatNo").val() == "") {
+ return
+ }
+ var param1 = {
+ "LocatNo": $("#LocatNo").val()
+ }
+ //鑾峰彇鎵樼洏绠$悊鐨勫叆搴撳崟
+ sendData(IP + "/PdaAsn/CheckLocatNo", param1, 'post', function (res) {
+ if (res.code != 0) { //鎴愬姛
+ layer.msg(res.msg, {
+ icon: 0,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+
+ // 娓呯┖鍦扮爜淇℃伅銆傛殏瀹氭竻绌鸿緭鍏ユ淇℃伅
+ $("#LocatNo").val('');
+ return
+ }
+ });
+ }
+
+ //娓叉煋鍒楄〃
+ function refreshTable() {
+ //鍏堟竻绌轰竴涓嬬瀛愬垪琛�
+ let trs = $("#tableBoxList tr")
+ let len = trs.length
+ for (i = len - 1; i >= 2; i--) {
+ trs[i].remove();
+ }
+ //璁剧疆鎵樼洏鍙�
+ $("#PalletNo").val($.cookie('PalletNo'))
+
+ var param = {
+ // PalletNo: $.cookie('PalletNo')
+ PalletNo: $.cookie('PalletNo'),
+ IsHuiKu: IsHuiKu
+ };
+ sendData(IP + "/PdaAsn/GetBoxInfos", param, 'post', function (res) {
+ console.log(res)
+ if (res.code == 0) { //鎴愬姛
+ console.log(res)
+ $("#boxNum").val(res.data.length)
+ var list = res.data
+ var arrTrs = new Array()
+ let idx = 0
+ for (var i in list) {
+ // list[i].BoxNo
+ var tr = $("#boxCell").eq(0).clone();
+ tr.appendTo("#tableBoxList");
+ tr.attr('id', list[i].BoxNo)
+ idx++;
+ tr.attr('index', idx)
+ tr.find("td[name='BoxNo']").html(list[i].BoxNo);
+ tr.find("td[name='SkuName']").html(list[i].SkuName);
+ tr.find("td[name='Qty']").html(list[i].Qty);
+ var code = list[i].BoxNo
+ //console.log("code is "+code)
+
+ // //console.log("BoxNo is "+tr.find("td[name='BoxNo']").html())
+ tr.show();
+ arrTrs[i] = tr
+ }
+
+ //璁剧疆鍒嗛〉
+ setPages(1, list.length)
+ } else { //涓嶆垚鍔�
+ layer.msg("鏃犳暟鎹�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ $("#boxNum").val(0)
+ setPages(1, 0)
+ }
+ });
+ }
+ //纭鍏ュ簱
+ form.on('submit(formBind)', function (data) {
+ // if (!$.cookie('userId')) {
+ // layer.msg('鐧婚檰澶辨晥锛岃閲嶆柊鐧婚檰', {
+ // icon: 2,
+ // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ // }, function() {
+ // location.href = "login.html";
+ // //鍥炶皟
+ // });
+ // }
+ let bval = $('select[id="bar"]').next().find('.layui-select-title input').val()
+ if (!bval && IsHuiKu == 0) {
+ layer.msg('璇烽�夋嫨鍏ュ簱鍗�', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return;
+ }
+ if (!$("#PalletNo").val()) {
+ layer.msg('璇锋壂鎻忔墭鐩樻潯鐮�', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return;
+ }
+ if (!$("#LocatNo").val()) {
+ layer.msg('璇锋壂鎻忓湴鐮�', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return;
+ }
+
+ let item = getCurBillInfo(bval)
+ var param = {
+ PalletNo: $("#PalletNo").val(),
+ LocatNo: $("#LocatNo").val(),
+ ASNNo: $("#bar").val()
+ }
+ param.Qty = Number(param.Qty)
+ sendData(IP + "/PdaAsn/ConfirmInStock", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ layer.msg(res.msg, {
+ icon: 1,
+ time: 2500 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ clearTable()
+ $("#PalletNo").val('')
+ });
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ //鍥炶皟
+ });
+ }
+ });
+ return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆�
+ });
+ function clearTable() {
+ $("#PalletNo").val('')
+ $("#boxNum").val('')
+ let trs = $("#tableBoxList tr")
+ let len = trs.length
+ for (i = len - 1; i >= 2; i--) {
+ trs[i].remove();
+ }
+ }
+
+ form.verify({
+ stock: [/^[\S]{8}$/, '鎵樼洏鏉$爜蹇呴』涓哄叚浣嶅瓧绗�']
+ });
+
+ function onClickPrevPage() {
+ //console.log("涓婁竴椤垫寜閽鐐瑰嚮")
+ if (curPageIndex == 1) {
+ return
+ }
+ setCurPage(curPageIndex - 1)
+ }
+
+ function onClickNextPage() {
+ //console.log("涓嬩竴椤垫寜閽鐐瑰嚮")
+ let n = getBoxPageNum()
+ if (curPageIndex == n) {
+ return
+ }
+ setCurPage(curPageIndex + 1)
+ }
+
+ function getBoxPageNum() {
+ let num = $("#tableBoxList tr").length
+ if (num <= 2) {
+ return 0
+ }
+
+ let pageNum = Math.floor(num / 10);
+ if (num % 10 > 0) {
+ pageNum += 1;
+ }
+
+ return pageNum
+ }
+
+ //璁剧疆鍒嗛〉
+ function setPages(pageIndex, boxNum) {
+ if (boxNum <= 0) {
+ //鍒楄〃涓虹┖锛岄殣钘忓垎椤甸〉鐮�
+ $("#tableBoxPages").hide()
+ return
+ }
+
+ let pageNum = Math.floor(boxNum / 10);
+ if (boxNum % 10 > 0) {
+ pageNum += 1;
+ }
+ //console.log("pageNum is " + pageNum)
+
+ $("#tableBoxPages").find("tr").remove()
+ let table = $("#tableBoxPages")
+ $("<tr></tr>").appendTo("#tableBoxPages")
+
+ // let newTr = table.append("<tr></tr>")
+ // newTr.append("<td class='page-prev'>涓婁竴椤�</td>")
+ $("<td id='prevPage' class='page-prev'>涓婁竴椤�</td>").appendTo("#tableBoxPages tr")
+ $("#tableBoxPages tr").eq(0).find("td[id^='prevPage']").click(function () {
+ onClickPrevPage()
+ })
+ for (i = 1; i < pageNum + 1; i++) {
+ // newTr.append("<td class='page-num'>"+ i +"</td>")
+ $("<td class='page-num'>" + i + "</td>").appendTo("#tableBoxPages tr")
+ }
+ // newTr.append("<td class='page-next'>涓嬩竴椤�</td>")
+ $("<td id='nextPage' class='page-next'>涓嬩竴椤�</td>").appendTo("#tableBoxPages tr")
+ $("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function () {
+ onClickNextPage()
+ })
+ // pages.show()
+ $("#tableBoxPages").show()
+
+ setCurPage(1)
+ }
+
+ //璁剧疆褰撳墠鍒嗛〉
+ function setCurPage(pageIndex) {
+ let totalTrNum = $("#tableBoxList tr").length
+ if (totalTrNum <= 2) {
+ //console.log("tableBoxList 涓虹┖ totalTrNum: " + totalTrNum)
+ //curPageIndex = 1
+ return
+ }
+
+ let pageNum = getBoxPageNum()
+ if (pageIndex > pageNum) {
+ //console.log("璁剧疆鐨勯〉鐮佽秴鍑洪〉鏁�, pageIndex : " + pageIndex)
+ //curPageIndex = 1
+ return
+ }
+
+ let startIndex = (pageIndex - 1) * 10 + 1
+ let n = totalTrNum - startIndex
+ let endIndex = 0
+ if (n > 9) {
+ endIndex = startIndex + 9
+ } else {
+ endIndex = startIndex + n
+ }
+ //console.log("startIndex is "+startIndex)
+ //console.log("endIndex is "+endIndex)
+ //startIndex =2
+ //endIndex = 2
+ let trs = $("#tableBoxList tr")
+ //console.log("琛屾暟 "+trs.length)
+ let d = 0
+ for (let i = 2; i < trs.length; i++) {
+ //console.log("琛岀储寮� " + trs.eq(i).attr('index'))
+ let t = trs.eq(i)
+ d = t.attr('index')
+ if (d >= startIndex && d <= endIndex) {
+ //console.log("闇�瑕佹樉绀�")
+ //鏄剧ず琛�
+ t.show()
+ } else {
+ //闅愯棌琛�
+ t.hide()
+ }
+ }
+
+ curPageIndex = pageIndex
+
+ let ptr = $("#tableBoxPages tr")
+ for (let i = 1; i < pageNum + 1; i++) {
+ ptr.eq(0).find("td").eq(i).removeClass("page-num-select")
+ if (i == curPageIndex) {
+ ptr.eq(0).find("td").eq(i).addClass("page-num-select")
+ }
+ }
+ //console.log("totalTrNum is " + totalTrNum)
+ }
+ $("#menuImg").click(function (e) {
+ 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/View/AsnSetting/productEnterQuantity.html b/Pda/View/AsnSetting/productEnterQuantity.html
index da587ad..3f7a994 100644
--- a/Pda/View/AsnSetting/productEnterQuantity.html
+++ b/Pda/View/AsnSetting/productEnterQuantity.html
@@ -2,26 +2,26 @@
<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>
+ <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;
- }
+ <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;
- }
+ .layui-form-switch {
+ margin-top: 0;
+ }
/* 鏍囩鏍峰紡 */
.tableyang-this a {
@@ -40,12 +40,13 @@
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;
@@ -54,9 +55,11 @@
flex-direction: column;
height: 90vh;
}
+
/* 蹇呯敤鏍峰紡 */
- .tableyang-2,.tableyang-3 {
- display: none;
+ .tableyang-2,
+ .tableyang-3 {
+ display: none;
}
ul {
@@ -70,43 +73,40 @@
padding: 10px;
margin-bottom: 5px;
}
-
-
-
- </style>
- <link rel="stylesheet" href="/css/adapter.css" />
+ </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>
+ <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>
<ul>
<li id="option1">鏍囩</li>
<li id="option2">鏁伴噺</li>
-
+
</ul>
-
+
<br />
<!-- 鏈夌爜 -->
<div id="content1">
@@ -130,19 +130,19 @@
<img src="/assets/down_arraw.png">
</div>
</div>
-
+
<div id="" class="layui-form-item layout-input">
<label class="layui-form-label" lang>鎵樼洏鏉$爜锛�</label>
<div class="layui-input-block">
- <input id="STOCKCODE" type="text" lay-verify="stock" lang langholder placeholder="璇锋壂鎻忔墭鐩樻潯鐮�"
- autocomplete="off" class="layui-input">
+ <input id="STOCKCODE" 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">
+ <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">
@@ -155,11 +155,11 @@
<div id="BOX2" class="layui-form-item layout-input" style="display: none;">
<label class="layui-form-label" lang>灏剧鏉$爜锛�</label>
<div class="layui-input-block">
- <input id="BOXCODE2" type="text" lang langholder placeholder="璇锋壂鎻忓绠辨潯鐮�" autocomplete="off"
- class="layui-input">
+ <input id="BOXCODE2" type="text" lang langholder placeholder="璇锋壂鎻忓绠辨潯鐮�"
+ autocomplete="off" class="layui-input">
</div>
</div>
-
+
<table class="layout-tbl-input" border="" cellspacing="" cellpadding="">
<tr>
<td>
@@ -180,7 +180,7 @@
</div>
</div>
</td>
-
+
</tr>
<tr>
<td>
@@ -202,9 +202,9 @@
</div>
</td>
</tr>
-
+
</table>
-
+
<table class="layout-tbl-submit" border="" cellspacing="" cellpadding="">
<tr>
<td style="width: 23%;"></td>
@@ -213,7 +213,7 @@
lay-filter="formBind">缁戝畾鍒版墭鐩�</button>
</td>
<td style="width: 33%;"></td>
-
+
</tr>
</table>
</form>
@@ -224,7 +224,7 @@
<div id="" class="cut-line">
<img src="/assets/fengexian.png">
</div>
-
+
<div class="layout-tbl-paging" id="">
<table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding="">
<tr>
@@ -247,17 +247,17 @@
</tr>
</table>
<!-- 鍒嗛〉 -->
- <table id="tableBoxPages" class="tbl-box-pages" border="" cellspacing="" cellpadding="">
- <tr style="display: ;">
- <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>
+ <table id="tableBoxPages" class="tbl-box-pages" border="" cellspacing="" cellpadding="">
+ <tr style="display: ;">
+ <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>
@@ -287,8 +287,8 @@
<div id="" class="layui-form-item layout-input">
<label class="layui-form-label" lang>鎵樼洏鏉$爜锛�</label>
<div class="layui-input-block">
- <input id="STOCKCODE1" type="text" lay-verify="stock" lang langholder placeholder="璇锋壂鎻忔墭鐩樻潯鐮�"
- autocomplete="off" class="layui-input">
+ <input id="STOCKCODE1" type="text" lay-verify="stock" lang langholder
+ placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" autocomplete="off" class="layui-input">
</div>
</div>
@@ -299,7 +299,7 @@
autocomplete="off" class="layui-input">
</div>
</div>
-
+
<table class="layout-tbl-input" border="" cellspacing="" cellpadding="">
<tr>
<td>
@@ -311,6 +311,7 @@
</div>
</div>
</td>
+ <td></td>
</tr>
<tr>
<td>
@@ -346,7 +347,7 @@
lay-filter="formBind">缁戝畾鍒版墭鐩�</button>
</td>
<td style="width: 33%;"></td>
-
+
</tr>
</table>
@@ -358,7 +359,7 @@
<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>
@@ -381,41 +382,41 @@
</tr>
</table>
<!-- 鍒嗛〉 -->
- <table id="tableBoxPages1" class="tbl-box-pages" border="" cellspacing="" cellpadding="">
- <tr style="display: ;">
- <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>
+ <table id="tableBoxPages1" class="tbl-box-pages" border="" cellspacing="" cellpadding="">
+ <tr style="display: ;">
+ <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
+ </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爜 */
-
+
var xianshiyemian = 0;
-
+
$('#option1').attr("style", "background-color: aqua;width: 45.77%;float: left;text-align: center;"); //閫変腑鍚庨鑹�
$('#option2').attr("style", "background-color: #999;width: 45.77%;float: right;text-align: center;"); //榛樿棰滆壊
$('#content2').hide();
- $(document).ready(function() {
- $('#option1').click(function() {
+ $(document).ready(function () {
+ $('#option1').click(function () {
// qingkong();
xianshiyemian = 0;
$('#content1').show();
@@ -425,7 +426,7 @@
$('#option2').attr("style", "background-color: #999;width: 45.77%;float: right;text-align: center;"); //榛樿棰滆壊
});
- $('#option2').click(function() {
+ $('#option2').click(function () {
// qingkong();
xianshiyemian = 1;
$('#content1').hide();
@@ -433,12 +434,12 @@
$('#content2').show();
$('#option2').attr("style", "background-color: aqua;width: 45.77%;float: right;text-align: center;"); //閫変腑鍚庨鑹�
-
+
});
});
//娓呮鏂囨湰妗嗕腑鏁版嵁
- // function clear() {
+ // function clear() {
// if (xianshiyemian == "0")
// {
// $("#BOXCODE").val("");
@@ -459,32 +460,32 @@
// $("#ImportFactQuantity").val("");
// $("#BoxQty").val("");
// }
-
- // }
-
+
+ // }
+
/*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/
- initLanguage()
- setLanguage()
+ initLanguage()
+ setLanguage()
- //褰撳墠鍒嗛〉
- var curPageIndex = 1;
- //鏄惁杩炵画缁勬墭
- isContinue = "0";
+ //褰撳墠鍒嗛〉
+ var curPageIndex = 1;
+ //鏄惁杩炵画缁勬墭
+ isContinue = "0";
- // 鎵樼洏鐮佹枃鏈敼鍙樻椂瑙﹀彂
- $("#STOCKCODE").on('input', function () {
+ // 鎵樼洏鐮佹枃鏈敼鍙樻椂瑙﹀彂
+ $("#STOCKCODE").on('input', function () {
- if ($("#STOCKCODE").val() == "" || $("#STOCKCODE").val().length < 8) {
- return
- }
- if ($("#STOCKCODE").val().length >= 8) {
- $("#STOCKCODE").val($("#STOCKCODE").val().substr(-8))
- }
- checkPalletStat()
- })
+ if ($("#STOCKCODE").val() == "" || $("#STOCKCODE").val().length < 8) {
+ return
+ }
+ if ($("#STOCKCODE").val().length >= 8) {
+ $("#STOCKCODE").val($("#STOCKCODE").val().substr(-8))
+ }
+ checkPalletStat()
+ })
// 鎵樼洏鐮佹枃鏈敼鍙樻椂瑙﹀彂-鏁伴噺
- $("#STOCKCODE1").on('input', function () {
+ $("#STOCKCODE1").on('input', function () {
if ($("#STOCKCODE1").val() == "" || $("#STOCKCODE1").val().length < 8) {
return
@@ -495,35 +496,34 @@
checkPalletStat()
})
- //绠辩爜鍥炶溅浜嬩欢
- $("#BOXCODE").keydown(function (e) {
- if (e.keyCode === 13) {
- if ($("#BOXCODE").val() == "") {
+ //绠辩爜鍥炶溅浜嬩欢
+ $("#BOXCODE").keydown(function (e) {
+ if (e.keyCode === 13) {
+ if ($("#BOXCODE").val() == "") {
layer.msg('璇峰厛鎵弿绠辩爜', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- });
- return
- }
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return
+ }
- // if ($("#STOCKCODE").val() == "") {
- // layer.msg('璇峰厛鎵弿鎵樼洏鐮�', {
- // icon: 2,
- // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- // });
- // $("#BOXCODE").val("");
- // $("#STOCKCODE").focus();
- // return;
- // }
- checkBoxInfo()
- }
- });
+ // if ($("#STOCKCODE").val() == "") {
+ // layer.msg('璇峰厛鎵弿鎵樼洏鐮�', {
+ // icon: 2,
+ // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ // });
+ // $("#BOXCODE").val("");
+ // $("#STOCKCODE").focus();
+ // return;
+ // }
+ checkBoxInfo()
+ }
+ });
/* 鍏ュ簱鍗曟嵁涓嬫媺妗� */
- //鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠�
- $("#selectDiv").click(function () {
- if (xianshiyemian == 0)
- {
+ //鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠�
+ $("#selectDiv").click(function () {
+ if (xianshiyemian == 0) {
var input = $('select[id="bar"]').next().find('.layui-select-title input')
var val = input.val()
//鍏堟洿鏂颁竴涓嬪叆搴撳崟
@@ -532,11 +532,10 @@
$('select[id="bar"]').next().find('.layui-select-title input').val(val)
})
}
- })
+ })
//鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠�
- $("#selectDiv1").click(function () {
- if (xianshiyemian == 1)
- {
+ $("#selectDiv1").click(function () {
+ if (xianshiyemian == 1) {
var input = $('select[id="bar1"]').next().find('.layui-select-title input')
var val = input.val()
//鍏堟洿鏂颁竴涓嬪叆搴撳崟
@@ -545,16 +544,15 @@
$('select[id="bar1"]').next().find('.layui-select-title input').val(val)
})
}
- })
+ })
/*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/
- /* 缁戝畾鍏ュ簱鍗曚俊鎭� */
+ /* 缁戝畾鍏ュ簱鍗曚俊鎭� */
- function updateBillList(callback) {
- if (xianshiyemian == 0)
- {
+ function updateBillList(callback) {
+ if (xianshiyemian == 0) {
var input = $('select[id="bar"]').next().find('.layui-select-title input')
var val = input.val()
$("#bar").empty()
@@ -589,8 +587,7 @@
}
});
}
- else if (xianshiyemian == 1)
- {
+ else if (xianshiyemian == 1) {
var input = $('select[id="bar1"]').next().find('.layui-select-title input')
var val = input.val()
$("#bar1").empty()
@@ -625,54 +622,53 @@
}
});
}
-
- }
-
+
+ }
+
/*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/
- //鐐瑰嚮鐗╂枡涓嬫媺妗嗕簨浠�
- $("#goodDiv").click(function () {
- if ($("#bar").val() == null || $("#bar").val() == "" || $("#bar").val() == undefined) {
- layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗�", {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function () { });
- }
- })
+ //鐐瑰嚮鐗╂枡涓嬫媺妗嗕簨浠�
+ $("#goodDiv").click(function () {
+ if ($("#bar").val() == null || $("#bar").val() == "" || $("#bar").val() == undefined) {
+ layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ })
//鐐瑰嚮鐗╂枡涓嬫媺妗嗕簨浠�-鏁伴噺
- $("#goodDiv1").click(function () {
- if ($("#bar1").val() == null || $("#bar1").val() == "" || $("#bar1").val() == undefined) {
- layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗�", {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function () { });
- }
- })
- //閫変腑鍏ュ簱鍗曚簨浠�
- form.on('select(getbar)', function (data) {
- updateGoodList()
- setOrderGoods();
- });
+ $("#goodDiv1").click(function () {
+ if ($("#bar1").val() == null || $("#bar1").val() == "" || $("#bar1").val() == undefined) {
+ layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ })
+ //閫変腑鍏ュ簱鍗曚簨浠�
+ form.on('select(getbar)', function (data) {
+ updateGoodList()
+ setOrderGoods();
+ });
//閫変腑鍏ュ簱鍗曚簨浠�-鏁伴噺
- form.on('select(getbar1)', function (data) {
- updateGoodList()
- setOrderGoods();
- });
-
- //閫変腑鐗╂枡浜嬩欢
- form.on('select(goodSelect)', function (data) {
- setOrderGoods();
- });
- //閫変腑鐗╂枡浜嬩欢-鏁伴噺
- form.on('select(goodSelect1)', function (data) {
- setOrderGoods();
- });
+ form.on('select(getbar1)', function (data) {
+ updateGoodList()
+ setOrderGoods();
+ });
- //缁戝畾鍒版墭鐩樹簨浠�
- form.on('submit(formBind)', function (data) {
- if(xianshiyemian == 0)
- {
- console.log($("#goodSelect").val());
+ //閫変腑鐗╂枡浜嬩欢
+ form.on('select(goodSelect)', function (data) {
+ setOrderGoods();
+ });
+ //閫変腑鐗╂枡浜嬩欢-鏁伴噺
+ form.on('select(goodSelect1)', function (data) {
+ setOrderGoods();
+ });
+
+ //缁戝畾鍒版墭鐩樹簨浠�
+ form.on('submit(formBind)', function (data) {
+ if (xianshiyemian == 0) {
+ console.log($("#goodSelect").val());
if ($("#bar").val() == "") {
layer.msg('璇烽�夋嫨鍏ュ簱鍗�', {
icon: 2,
@@ -702,40 +698,39 @@
return;
}
var param = {
- AsnNo: $("#bar").val(),
- PalletNo: $("#STOCKCODE").val(),
- AsnDetailId: parseInt($("#goodSelect").val()),
- LotNo:$("#goodSelect").find("option:selected").text(),
- BoxNo: $("#BOXCODE").val(),
- IsContinue: isContinue,
- TailBoxNo: $("#BOXCODE2").val(),
- Origin:"PDA"
- }
- //缁勭洏
- sendData(IP + "/PdaAsn/BindPallet", param, 'post', function (res) {
- if (res.code == 0) { //鎴愬姛
- layer.msg(res.msg, {
- icon: 1,
- time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function () {
- setOrderGoods();
- refreshTable();
- $("#BOXCODE").val("");
- $("#BOXCODE2").val("");
- $("#QTY").val("");
- });
- } else { //涓嶆垚鍔�
- layer.msg(res.msg, {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function () {
- //鍥炶皟
- });
- }
- });
+ AsnNo: $("#bar").val(),
+ PalletNo: $("#STOCKCODE").val(),
+ AsnDetailId: parseInt($("#goodSelect").val()),
+ LotNo: $("#goodSelect").find("option:selected").text(),
+ BoxNo: $("#BOXCODE").val(),
+ IsContinue: isContinue,
+ TailBoxNo: $("#BOXCODE2").val(),
+ Origin: "PDA"
+ }
+ //缁勭洏
+ sendData(IP + "/PdaAsn/BindPallet", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ layer.msg(res.msg, {
+ icon: 1,
+ time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ setOrderGoods();
+ refreshTable();
+ $("#BOXCODE").val("");
+ $("#BOXCODE2").val("");
+ $("#QTY").val("");
+ });
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ //鍥炶皟
+ });
+ }
+ });
}
- else if(xianshiyemian == 1)
- {
+ else if (xianshiyemian == 1) {
if ($("#bar1").val() == "") {
layer.msg('璇烽�夋嫨鍏ュ簱鍗�', {
icon: 2,
@@ -760,11 +755,12 @@
var param = {
AsnNo: $("#bar1").val(), //鍑哄簱鍗曟嵁
PalletNo: $("#STOCKCODE1").val(), //鎵樼洏鏉$爜
- AsnDetailId: parseInt($("#goodSelect1").val()), //鐗╂枡鎵规
+ AsnDetailId: parseInt($("#goodSelect1").val()), //鍏ュ簱鍗曟槑缁咺D
+ LotNo: $("#goodSelect1").find("option:selected").text(), //鐗╂枡鎵规
SkuQty: parseInt($("#SkuQty").val()), //鐗╂枡鏁伴噺
- Origin:"PDA"
+ Origin: "PDA"
}
-
+
console.log(param)
//缁勭洏
sendData(IP + "/PdaAsn/BindPallet", param, 'post', function (res) {
@@ -788,15 +784,14 @@
}
});
}
-
- return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆�
- });
+
+ return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆�
+ });
- // 鏍规嵁鍏ュ簱鏄庣粏ID 鑾峰彇璇︾粏淇℃伅
- function setOrderGoods() {
- if (xianshiyemian == 0)
- {
+ // 鏍规嵁鍏ュ簱鏄庣粏ID 鑾峰彇璇︾粏淇℃伅
+ function setOrderGoods() {
+ if (xianshiyemian == 0) {
$("#ImportQuantity").val("");
$("#Standard").val("");
$("#ImportFactQuantity").val("");
@@ -814,10 +809,9 @@
}
});
}
- else if (xianshiyemian == 1)
- {
+ else if (xianshiyemian == 1) {
$("#ImportQuantity1").val("");
- $("#Standard1").val("");
+ $("#Standard1").val("");
$("#ImportFactQuantity1").val("");
var param = {
@@ -833,15 +827,14 @@
}
});
}
-
- }
-
- var asnDetails = "";
- /* 缁戝畾鍏ュ簱鍗曠墿鏂欏強鎵规 */
- function updateGoodList(skuNo) {
- if (xianshiyemian == 0)
- {
+ }
+
+ var asnDetails = "";
+
+ /* 缁戝畾鍏ュ簱鍗曠墿鏂欏強鎵规 */
+ function updateGoodList(skuNo) {
+ if (xianshiyemian == 0) {
console.log("aaaa");
var input = $('select[id="goodSelect"]').next().find('.layui-select-title input')
var val = input.val()
@@ -857,40 +850,40 @@
if (res.code == 0) { //鎴愬姛
asnDetails = res.data;
for (var i = 0; i < res.data.length; i++) {
- if(skuNo!='' && skuNo==res.data[i].SkuNo){
- if(res.data[i].LotNo=='' || res.data[i].LotNo == null){
+ if (skuNo != '' && skuNo == res.data[i].SkuNo) {
+ if (res.data[i].LotNo == '' || res.data[i].LotNo == null) {
$("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
- .SkuName +
- '</option>');
- }else{
- $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
- '</option>');
- }
- }else{
- if (i == 0) {
- if(res.data[i].LotNo=='' || res.data[i].LotNo == null){
- $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
.SkuName +
'</option>');
- }else{
- $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
- '</option>');
- }
-
} else {
- if(res.data[i].LotNo=='' || res.data[i].LotNo == null){
- $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i]
- .SkuName +
- '</option>');
- }else{
- $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i]
+ $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
.SkuName + "-" + res.data[i].LotNo +
'</option>');
- }
- }
- }
+ }
+ } else {
+ if (i == 0) {
+ if (res.data[i].LotNo == '' || res.data[i].LotNo == null) {
+ $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
+ .SkuName +
+ '</option>');
+ } else {
+ $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
+ .SkuName + "-" + res.data[i].LotNo +
+ '</option>');
+ }
+
+ } else {
+ if (res.data[i].LotNo == '' || res.data[i].LotNo == null) {
+ $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i]
+ .SkuName +
+ '</option>');
+ } else {
+ $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i]
+ .SkuName + "-" + res.data[i].LotNo +
+ '</option>');
+ }
+ }
+ }
}
form.render('select');
@@ -904,8 +897,7 @@
}
});
}
- else if (xianshiyemian == 1)
- {
+ else if (xianshiyemian == 1) {
console.log("bbbb");
var input = $('select[id="goodSelect1"]').next().find('.layui-select-title input')
var val = input.val()
@@ -921,17 +913,28 @@
if (res.code == 0) { //鎴愬姛
asnDetails = res.data;
for (var i = 0; i < res.data.length; i++) {
- if (i == 0) {
- $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
- .SkuName);
+ if (skuNo != '' && skuNo == res.data[i].SkuNo) {
+ if (i == 0) {
+ $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
+ .SkuName);
+ } else {
+ $("#goodSelect1").append('<option value =' + res.data[i].Id + '>' + res.data[i]
+ .SkuName);
+ }
+ if (res.data[i].LotNo != null) {
+ $("#goodSelect1").append("-" + res.data[i].LotNo +
+ '</option>');
+ }
} else {
- $("#goodSelect1").append('<option value =' + res.data[i].Id + '>' + res.data[i]
- .SkuName);
- }
- if (res.data[i].LotNo != null)
- {
- $("#goodSelect1").append("-" + res.data[i].LotNo +
- '</option>');
+ if (res.data[i].LotNo == '' || res.data[i].LotNo == null) {
+ $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
+ .SkuName +
+ '</option>');
+ } else {
+ $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
+ .SkuName + "-" + res.data[i].LotNo +
+ '</option>');
+ }
}
}
@@ -947,13 +950,12 @@
}
});
}
-
- }
-
- // 娓叉煋绠辩爜淇℃伅
- function refreshTable() {
- if (xianshiyemian == 0)
- {
+
+ }
+
+ // 娓叉煋绠辩爜淇℃伅
+ function refreshTable() {
+ if (xianshiyemian == 0) {
//鍏堟竻绌轰竴涓嬬瀛愬垪琛�
let trs = $("#tableBoxList tr")
let len = trs.length
@@ -1033,8 +1035,7 @@
}
});
}
- else if (xianshiyemian == 1)
- {
+ else if (xianshiyemian == 1) {
//鍏堟竻绌轰竴涓嬬瀛愬垪琛�
let trs = $("#tableBoxList1 tr")
let len = trs.length
@@ -1107,8 +1108,8 @@
arrTrs[i] = tr
}
- //璁剧疆鍒嗛〉
- setPages(1, list.length)
+ //璁剧疆鍒嗛〉
+ setPages(1, list.length)
} else { //涓嶆垚鍔�
layer.msg("鏃犳暟鎹�", {
@@ -1120,13 +1121,12 @@
}
});
}
-
- }
- // 鍒ゆ柇鎵樼洏鐮佹槸鍚﹀彲鐢�
- function checkPalletStat() {
- if (xianshiyemian == 0)
- {
+ }
+
+ // 鍒ゆ柇鎵樼洏鐮佹槸鍚﹀彲鐢�
+ function checkPalletStat() {
+ if (xianshiyemian == 0) {
var param = {
"PalletNo": $("#STOCKCODE").val()
}
@@ -1145,8 +1145,7 @@
}
});
}
- else if (xianshiyemian == 1)
- {
+ else if (xianshiyemian == 1) {
var param = {
"PalletNo": $("#STOCKCODE1").val()
}
@@ -1165,342 +1164,335 @@
}
});
}
-
- }
-
- function checkBoxInfo() {
- var param = {
- "BoxNo": $("#BOXCODE").val(),
- }
- sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) {
- if (res.code == 0) { //鎴愬姛
- var bl = false;
- if (res.data.length == 0) {
- layer.msg("鏈煡璇㈠埌姝ょ鐗╂枡淇℃伅锛岃鏍稿疄!", {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- });
- return;
- }
- if(res.data[0].ASNNo!='' && res.data[0].ASNNo!=null){
- $("#bar").empty()
- $("#bar").append('<option value =>' + '</option>');
- form.render('select');
+ }
- $("#bar").append('<option value =' + res.data[0].ASNNo + ' selected>' + res.data[0].ASNNo +'</option>');
- updateGoodList(res.data[0].SkuNo)
- setOrderGoods();
- }else{
- if(asnDetails==''){
- layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗曟嵁!", {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- });
- return;
- }
- }
- asnDetails.forEach(element => {
- console.log(element);
+ function checkBoxInfo() {
+ var param = {
+ "BoxNo": $("#BOXCODE").val(),
+ }
+ sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ var bl = false;
+ if (res.data.length == 0) {
+ layer.msg("鏈煡璇㈠埌姝ょ鐗╂枡淇℃伅锛岃鏍稿疄!", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return;
+ }
+ if (res.data[0].ASNNo != '' && res.data[0].ASNNo != null) {
+ $("#bar").empty()
+ $("#bar").append('<option value =>' + '</option>');
+ form.render('select');
- if (element.SkuNo == res.data[0].SkuNo && element.LotNo == res.data[0].LotNo) {
- var sel = 'dd[lay-value=' + element.id + ']';
- $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this');
- bl = true;
- }
- });
- if (!bl) {
- layer.msg("姝ょ鐗╂枡涓嶇鍚堣鍏ュ簱鍗曪紝璇锋牳瀹�!", {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- });
- } else {
- $("#BoxQty").val(res.data[0].Qty);
- }
+ $("#bar").append('<option value =' + res.data[0].ASNNo + ' selected>' + res.data[0].ASNNo + '</option>');
- } else { //涓嶆垚鍔�
- layer.msg(res.msg, {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- });
- }
- });
+ updateGoodList(res.data[0].SkuNo)
+ setOrderGoods();
+ } else {
+ if (asnDetails == '') {
+ layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗曟嵁!", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return;
+ }
+ }
+ asnDetails.forEach(element => {
+ console.log(element);
- }
+ if (element.SkuNo == res.data[0].SkuNo && element.LotNo == res.data[0].LotNo) {
+ var sel = 'dd[lay-value=' + element.id + ']';
+ $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this');
+ bl = true;
+ }
+ });
+ if (!bl) {
+ layer.msg("姝ょ鐗╂枡涓嶇鍚堣鍏ュ簱鍗曪紝璇锋牳瀹�!", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ } else {
+ $("#BoxQty").val(res.data[0].Qty);
+ }
+
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ }
+ });
+
+ }
/* 鍒嗛〉 */
//璁剧疆鍒嗛〉
- function setPages(pageIndex, boxNum){
+ function setPages(pageIndex, boxNum) {
- if (xianshiyemian == 0)
- {
- if(boxNum <= 0){
+ if (xianshiyemian == 0) {
+ if (boxNum <= 0) {
//鍒楄〃涓虹┖锛岄殣钘忓垎椤甸〉鐮�
$("#tableBoxPages").hide()
return
}
-
+
let pageNum = Math.floor(boxNum / 10);
- if(boxNum % 10 > 0){
+ if (boxNum % 10 > 0) {
pageNum += 1;
}
//console.log("pageNum is " + pageNum)
-
+
$("#tableBoxPages").find("tr").remove()
let table = $("#tableBoxPages")
$("<tr></tr>").appendTo("#tableBoxPages")
-
+
// let newTr = table.append("<tr></tr>")
// newTr.append("<td class='page-prev'>涓婁竴椤�</td>")
$("<td id='prevPage' class='page-prev'>涓婁竴椤�</td>").appendTo("#tableBoxPages tr")
- $("#tableBoxPages tr").eq(0).find("td[id^='prevPage']").click(function(){
+ $("#tableBoxPages tr").eq(0).find("td[id^='prevPage']").click(function () {
onClickPrevPage()
})
- for(i=1; i < pageNum + 1; i++){
+ for (i = 1; i < pageNum + 1; i++) {
// newTr.append("<td class='page-num'>"+ i +"</td>")
- $("<td class='page-num'>"+ i +"</td>").appendTo("#tableBoxPages tr")
+ $("<td class='page-num'>" + i + "</td>").appendTo("#tableBoxPages tr")
}
// newTr.append("<td class='page-next'>涓嬩竴椤�</td>")
$("<td id='nextPage' class='page-next'>涓嬩竴椤�</td>").appendTo("#tableBoxPages tr")
- $("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function(){
+ $("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function () {
onClickNextPage()
})
// pages.show()
$("#tableBoxPages").show()
-
+
setCurPage(1)
}
- else if (xianshiyemian == 1)
- {
- if(boxNum <= 0){
+ else if (xianshiyemian == 1) {
+ if (boxNum <= 0) {
//鍒楄〃涓虹┖锛岄殣钘忓垎椤甸〉鐮�
$("#tableBoxPages1").hide()
return
}
-
+
let pageNum = Math.floor(boxNum / 10);
- if(boxNum % 10 > 0){
+ if (boxNum % 10 > 0) {
pageNum += 1;
}
//console.log("pageNum is " + pageNum)
-
+
$("#tableBoxPages1").find("tr").remove()
let table = $("#tableBoxPages1")
$("<tr></tr>").appendTo("#tableBoxPages1")
-
+
// let newTr = table.append("<tr></tr>")
// newTr.append("<td class='page-prev'>涓婁竴椤�</td>")
$("<td id='prevPage' class='page-prev'>涓婁竴椤�</td>").appendTo("#tableBoxPages1 tr")
- $("#tableBoxPages1 tr").eq(0).find("td[id^='prevPage']").click(function(){
+ $("#tableBoxPages1 tr").eq(0).find("td[id^='prevPage']").click(function () {
onClickPrevPage()
})
- for(i=1; i < pageNum + 1; i++){
+ for (i = 1; i < pageNum + 1; i++) {
// newTr.append("<td class='page-num'>"+ i +"</td>")
- $("<td class='page-num'>"+ i +"</td>").appendTo("#tableBoxPages1 tr")
+ $("<td class='page-num'>" + i + "</td>").appendTo("#tableBoxPages1 tr")
}
// newTr.append("<td class='page-next'>涓嬩竴椤�</td>")
$("<td id='nextPage' class='page-next'>涓嬩竴椤�</td>").appendTo("#tableBoxPages1 tr")
- $("#tableBoxPages1 tr").eq(0).find("td[id^='nextPage']").click(function(){
+ $("#tableBoxPages1 tr").eq(0).find("td[id^='nextPage']").click(function () {
onClickNextPage()
})
// pages.show()
$("#tableBoxPages1").show()
-
+
setCurPage(1)
}
-
+
}
-
+
//璁剧疆褰撳墠鍒嗛〉
- function setCurPage(pageIndex){
- if (xianshiyemian == 0)
- {
+ function setCurPage(pageIndex) {
+ if (xianshiyemian == 0) {
let totalTrNum = $("#tableBoxList tr").length
- if(totalTrNum <= 2 ){
+ if (totalTrNum <= 2) {
//console.log("tableBoxList 涓虹┖ totalTrNum: " + totalTrNum)
//curPageIndex = 1
return
}
-
+
let pageNum = getBoxPageNum()
- if(pageIndex > pageNum){
+ if (pageIndex > pageNum) {
//console.log("璁剧疆鐨勯〉鐮佽秴鍑洪〉鏁�, pageIndex : " + pageIndex)
//curPageIndex = 1
return
}
-
+
let startIndex = (pageIndex - 1) * 10 + 1
let n = totalTrNum - startIndex
let endIndex = 0
- if(n > 9){
+ if (n > 9) {
endIndex = startIndex + 9
- }else{
+ } else {
endIndex = startIndex + n
}
-
+
let trs = $("#tableBoxList tr")
//console.log("琛屾暟 "+trs.length)
let d = 0
- for(let i = 2; i < trs.length; i++){
+ for (let i = 2; i < trs.length; i++) {
//console.log("琛岀储寮� " + trs.eq(i).attr('index'))
let t = trs.eq(i)
d = t.attr('index')
- if(d >= startIndex && d <= endIndex){
+ if (d >= startIndex && d <= endIndex) {
//console.log("闇�瑕佹樉绀�")
//鏄剧ず琛�
t.show()
- }else{
+ } else {
//闅愯棌琛�
t.hide()
}
}
-
+
curPageIndex = pageIndex
-
+
let ptr = $("#tableBoxPages tr")
- for(let i = 1; i < pageNum+1; i++){
+ for (let i = 1; i < pageNum + 1; i++) {
ptr.eq(0).find("td").eq(i).removeClass("page-num-select")
- if(i == curPageIndex){
+ if (i == curPageIndex) {
ptr.eq(0).find("td").eq(i).addClass("page-num-select")
}
}
}
- else if (xianshiyemian == 1)
- {
+ else if (xianshiyemian == 1) {
let totalTrNum = $("#tableBoxList1 tr").length
- if(totalTrNum <= 2 ){
+ if (totalTrNum <= 2) {
return
}
-
+
let pageNum = getBoxPageNum()
- if(pageIndex > pageNum){
+ if (pageIndex > pageNum) {
//console.log("璁剧疆鐨勯〉鐮佽秴鍑洪〉鏁�, pageIndex : " + pageIndex)
//curPageIndex = 1
return
}
-
+
let startIndex = (pageIndex - 1) * 10 + 1
let n = totalTrNum - startIndex
let endIndex = 0
- if(n > 9){
+ if (n > 9) {
endIndex = startIndex + 9
- }else{
+ } else {
endIndex = startIndex + n
}
-
+
let trs = $("#tableBoxList1 tr")
//console.log("琛屾暟 "+trs.length)
let d = 0
- for(let i = 2; i < trs.length; i++){
+ for (let i = 2; i < trs.length; i++) {
//console.log("琛岀储寮� " + trs.eq(i).attr('index'))
let t = trs.eq(i)
d = t.attr('index')
- if(d >= startIndex && d <= endIndex){
+ if (d >= startIndex && d <= endIndex) {
//console.log("闇�瑕佹樉绀�")
//鏄剧ず琛�
t.show()
- }else{
+ } else {
//闅愯棌琛�
t.hide()
}
}
-
+
curPageIndex = pageIndex
-
+
let ptr = $("#tableBoxPages1 tr")
- for(let i = 1; i < pageNum+1; i++){
+ for (let i = 1; i < pageNum + 1; i++) {
ptr.eq(0).find("td").eq(i).removeClass("page-num-select")
- if(i == curPageIndex){
+ if (i == curPageIndex) {
ptr.eq(0).find("td").eq(i).addClass("page-num-select")
}
}
}
-
+
}
- function getBoxPageNum()
- {
- if (xianshiyemian == 0)
- {
+ function getBoxPageNum() {
+ if (xianshiyemian == 0) {
let num = $("#tableBoxList tr").length
- if(num <= 2 ){
+ if (num <= 2) {
return 0
}
-
+
let pageNum = Math.floor(num / 10);
- if(num % 10 > 0){
+ if (num % 10 > 0) {
pageNum += 1;
}
-
+
return pageNum
}
- else if (xianshiyemian == 1)
- {
+ else if (xianshiyemian == 1) {
let num = $("#tableBoxList1 tr").length
- if(num <= 2 ){
+ if (num <= 2) {
return 0
}
-
+
let pageNum = Math.floor(num / 10);
- if(num % 10 > 0){
+ if (num % 10 > 0) {
pageNum += 1;
}
-
+
return pageNum
}
-
+
}
- function onClickPrevPage(){
+ function onClickPrevPage() {
//console.log("涓婁竴椤垫寜閽鐐瑰嚮")
- if(curPageIndex == 1){
+ if (curPageIndex == 1) {
return
}
setCurPage(curPageIndex - 1)
}
- function onClickNextPage(){
+ function onClickNextPage() {
//console.log("涓嬩竴椤垫寜閽鐐瑰嚮")
let n = getBoxPageNum()
- if(curPageIndex == n){
+ if (curPageIndex == n) {
return
}
setCurPage(curPageIndex + 1)
}
-
+
/*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/
- form.on('switch(IsLianXu)', function (obj) {
- if (obj.elem.checked) {
- $('#BOX2').attr("style", "display:block")
- $('#zongDiv').attr("style", "height: 285px;")
- isContinue = "1";
- } else {
- $('#BOX2').attr("style", "display:none")
- $('#zongDiv').attr("style", "height: 255px;")
- isContinue = "0";
- }
- $('#BOXCODE2').val("");
- });
+ form.on('switch(IsLianXu)', function (obj) {
+ if (obj.elem.checked) {
+ $('#BOX2').attr("style", "display:block")
+ $('#zongDiv').attr("style", "height: 285px;")
+ isContinue = "1";
+ } else {
+ $('#BOX2').attr("style", "display:none")
+ $('#zongDiv').attr("style", "height: 255px;")
+ isContinue = "0";
+ }
+ $('#BOXCODE2').val("");
+ });
- $("#menuImg").click(function (e) {
- //console.log("menuImg")
- e.stopPropagation()
+ $("#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>
+ 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/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
index 5045811..b4df4b9 100644
--- a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -136,8 +136,8 @@
throw new Exception("鏈煡璇㈠埌鍏ュ簱鍗曟槑缁�");
}
- var labelQty = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.ASNDetailNo == id).Sum(m=>m.Qty);
- var qty = detail.Qty-labelQty;
+ var labelQty = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.ASNDetailNo == id).Sum(m => m.Qty);
+ var qty = detail.Qty - labelQty;
return qty.ToString();
}
@@ -249,6 +249,15 @@
throw new Exception("鍗曟嵁绫诲瀷涓嶅彲涓虹┖!");
}
}
+ //鍒ゆ柇鏄惁涓洪噰璐叆搴撳崟鎹垨杞﹂棿浣欐枡閫�鍥炲叆搴�
+ // 0锛氭垚鍝佸叆搴� 1锛氶噰璐叆搴� 2锛氫腑闂村搧鍏ュ簱 3锛氶��璐у叆搴� 4锛氳溅闂翠綑鏂欓��鍥炲叆搴� 5锛氬叾瀹冨叆搴� 6锛氫唬鍌ㄥ叆搴� 7锛氬瘎瀛樺叆搴�
+ if (model.Type == "1" || model.Type == "4")
+ {
+ if (!string.IsNullOrWhiteSpace(model.LotNo))
+ {
+ throw new Exception("閲囪喘鍏ュ簱鎴栦綑鏂欓��鍥炰笉鍙緭鍏ユ壒娆★紝涓嶅彲缂栬緫!");
+ }
+ }
sqlString += "Insert into BllArrivalNotice (ASNNo,Type,Origin,CustomerNo,";
sqlString += "CustomerName,LotNo,LotText,SupplierLot,CreateUser) values ( ";
@@ -342,6 +351,18 @@
string sqlDetailStr = string.Empty;
try
{
+ //鍒ゆ柇鏄惁涓洪噰璐叆搴撳崟鎹垨杞﹂棿浣欐枡閫�鍥炲叆搴�
+ // 0锛氭垚鍝佸叆搴� 1锛氶噰璐叆搴� 2锛氫腑闂村搧鍏ュ簱 3锛氶��璐у叆搴� 4锛氳溅闂翠綑鏂欓��鍥炲叆搴� 5锛氬叾瀹冨叆搴� 6锛氫唬鍌ㄥ叆搴� 7锛氬瘎瀛樺叆搴�
+ int isType = 0;
+ if (model.Type == "1" || model.Type == "4")
+ {
+ isType = 1;
+ if (!string.IsNullOrWhiteSpace(model.LotNo))
+ {
+ strMessage = "-1:閲囪喘鍏ュ簱鎴栦綑鏂欓��鍥炰笉鍙緭鍏ユ壒娆★紝涓嶅彲缂栬緫;";
+ return strMessage;
+ }
+ }
if (model.Origin != "褰曞叆")
{
strMessage = "-1:涓婃父绯荤粺涓嬪彂鐨勫崟鎹紝涓嶅彲缂栬緫;";
@@ -396,7 +417,7 @@
strMessage = "-1:鏁伴噺蹇呴』澶т簬0;";
continue;
}
- if (string.IsNullOrEmpty(detailModel.LotNo))
+ if (string.IsNullOrEmpty(detailModel.LotNo) && isType != 1)
{
strMessage = "-1:鎵规鍙蜂笉鍙负绌�;";
continue;
@@ -501,6 +522,7 @@
}
+
// 鍒犻櫎鎬诲崟
sqlString = $"UPDATE BllArrivalNotice SET IsDel = '1',";
sqlString += $"UpdateTime = GETDATE(),UpdateUser = '{model.CreateUser}' ";
@@ -510,10 +532,30 @@
sqlString += $"UPDATE BllArrivalNoticeDetail SET IsDel = '1',";
sqlString += $"UpdateTime = GETDATE(),UpdateUser = '{model.CreateUser}' ";
sqlString += $"WHERE ASNNo = '{model.ASNNo}';";
+
+ //鍒ゆ柇鏄惁涓洪噰璐叆搴撳崟鎹垨杞﹂棿浣欐枡閫�鍥炲叆搴�
+ // 0锛氭垚鍝佸叆搴� 1锛氶噰璐叆搴� 2锛氫腑闂村搧鍏ュ簱 3锛氶��璐у叆搴� 4锛氳溅闂翠綑鏂欓��鍥炲叆搴� 5锛氬叾瀹冨叆搴� 6锛氫唬鍌ㄥ叆搴� 7锛氬瘎瀛樺叆搴�
+ int notdel = 0;
+ if (model.Type == "1" || model.Type == "4")
+ {
+ //鑾峰彇鍗曟嵁鐢熸垚瀵瑰簲鏍囩
+ var list = Db.Queryable<BllBoxInfo>().Where(a => a.IsDel == "0" && a.Status == "0" && a.BindNo == null);
+
+ //楠岃瘉瀵瑰簲绠辨敮淇℃伅鏄惁瀛樺湪
+ if (list == null)
+ {
+ return "-1:宸叉湁绠辩爜宸茬粦瀹氭墭鐩樻垨宸插叆搴擄紝涓嶅彲鍒犻櫎!";
+ }
+
+ // 鍒犻櫎瀵瑰簲绠辨敮淇℃伅
+ sqlString += $"UPDATE BllBoxInfo SET IsDel = '1',";
+ sqlString += $"UpdateTime = GETDATE(),UpdateUser = '{model.CreateUser}' ";
+ sqlString += $"WHERE ASNNo = '{model.ASNNo}';";
+ notdel = 1;
+ }
Db.Ado.BeginTran();
int rowCount = Db.Ado.ExecuteCommand(sqlString);
-
- if (rowCount < 2)
+ if (rowCount < 2 + notdel)
{
Db.RollbackTran();
return "-1:鍒犻櫎澶辫触锛�";
@@ -524,6 +566,7 @@
}
catch (Exception ex)
{
+ Db.RollbackTran();
throw ex;
}
}
diff --git a/Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs b/Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs
index 26cde9e..c902df5 100644
--- a/Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/AuditLogServer.cs
@@ -15,7 +15,7 @@
namespace WMS.BLL.BllAsnServer
{
- public class AuditLogServer: DbHelper<BllAuditLog>, IAuditLogServer
+ public class AuditLogServer : DbHelper<BllAuditLog>, IAuditLogServer
{
private static readonly SqlSugarScope Db = DataContext.Db;
@@ -29,22 +29,22 @@
try
{
Expression<Func<BllAuditLog, bool>> item = Expressionable.Create<BllAuditLog>()
- .AndIF(!string.IsNullOrWhiteSpace(model.AsnNo),it=>it.OrderNo.Contains(model.AsnNo.Trim()))
- .AndIF(!string.IsNullOrWhiteSpace(model.Status),it=>it.Status == model.Status)
- .AndIF(!string.IsNullOrWhiteSpace(model.StartTime),it=> it.CreateTime >= Convert.ToDateTime(model.StartTime))
- .AndIF(!string.IsNullOrWhiteSpace(model.EndTime),it=> it.CreateTime <= Convert.ToDateTime(model.EndTime).AddDays(1))
- .And(it=>it.IsDel=="0")
+ .AndIF(!string.IsNullOrWhiteSpace(model.AsnNo), it => it.OrderNo.Contains(model.AsnNo.Trim()))
+ .AndIF(!string.IsNullOrWhiteSpace(model.Status), it => it.Status == model.Status)
+ .AndIF(!string.IsNullOrWhiteSpace(model.StartTime), it => it.CreateTime >= Convert.ToDateTime(model.StartTime))
+ .AndIF(!string.IsNullOrWhiteSpace(model.EndTime), it => it.CreateTime <= Convert.ToDateTime(model.EndTime).AddDays(1))
+ .And(it => it.IsDel == "0")
.ToExpression();
var total = 0;
var data = GetAllWhereAsync(item)
- .LeftJoin<SysUserInfor>((a, b ) => a.CreateUser == b.Id)
+ .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id)
.LeftJoin<SysUserInfor>((a, b, c) => a.AuditUser == c.Id)
.Select((a, b, c) => new AuditLogDto()
{
Id = a.Id,
OrderNo = a.OrderNo,
PalletNo = a.PalletNo,
-
+
Msg = a.Msg,
Status = a.Status,
Reason = a.Reason,
@@ -68,11 +68,11 @@
}
//缂栬緫瀹℃牳
- public void EditAudit(int id, string status,string opinion,int userId)
+ public void EditAudit(int id, string status, string opinion, int userId)
{
try
{
- var log = Db.Queryable<BllAuditLog>().First(m => m.Id == id && m.IsDel =="0");
+ var log = Db.Queryable<BllAuditLog>().First(m => m.Id == id && m.IsDel == "0");
if (log == null)
{
throw new Exception("鏈煡璇㈠埌瀹℃牳淇℃伅锛岃鏍稿疄");
@@ -156,7 +156,7 @@
.First(m => m.IsDel == "0" && m.LocatNo == item.LocatNo);
if (item.Qty != null)
{
- if (item.LockQty>0)
+ if (item.LockQty > 0)
{
throw new Exception("褰撳墠鐗╂枡鎵规宸茶鍒嗛厤锛屾棤娉曟挙閿�");
}
@@ -197,9 +197,12 @@
{
if (demo2.Origin != "WMS")
{
- demo2.ASNNo = null;
- demo2.ASNDetailNo = null;
- }
+ if (notice.Type != "1" && notice.Type != "4")
+ {
+ demo2.ASNNo = null;
+ demo2.ASNDetailNo = null;
+ }
+ }
demo2.BindNo = null;
demo2.PalletNo = null;
demo2.Status = "0";
@@ -246,7 +249,7 @@
{
Db.Updateable(stock).ExecuteCommand();
}
-
+
}
Db.Deleteable(item).ExecuteCommand();
@@ -404,7 +407,7 @@
if (stockDetail.Qty != null)
{
stock.Qty -= (int)stockDetail.Qty;
-
+
}
if (stock.Qty == 0)
@@ -415,7 +418,7 @@
{
Db.Updateable(stock).ExecuteCommand();
}
-
+
Db.Deleteable(stockDetail).ExecuteCommand();
Db.Deleteable(stockInfo).ExecuteCommand();
if (locate != null)
@@ -435,14 +438,14 @@
bind.TaskNo = "";
bind.CompleteTime = null;
Db.Updateable(bind).ExecuteCommand();
-
+
}
else
{
throw new Exception("璁板綍鐨勫姛鑳界紪鍙峰紓甯�");
}
}
-
+
log.Status = status;
log.Opinion = opinion;
log.AuditTime = DateTime.Now;
diff --git a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
index e05c647..34dfa59 100644
--- a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
@@ -576,7 +576,7 @@
packStr += "-" + pack.L5Num + "/" + pack.L5Name;
}
//鏍囩琛�
- var label = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.ASNDetailNo == imId).ToList();
+ var label = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.Origin == "WMS鐢熸垚").ToList();
#endregion
@@ -614,30 +614,35 @@
var modelList = new List<BllBoxInfo>();
var addLotNo = "";
-
+ if (arriveQty < 0)
+ {
+ throw new Exception("鍒拌揣鏁伴噺涓嶈兘灏忎簬0!");
+ }
+ Db.BeginTran();
if (packLevel == 1)
{
#region 涓�绾у寘瑁�
// 鏍规嵁鐢ㄦ埛杈撳叆鐨勭鏁伴噺璁$畻闇�瑕佺殑鏉$爜鏁�
- var labQty = label.Sum(m => m.Qty);
- var qty = asnList.Qty - labQty;//褰撳墠鍗曟嵁鍓╀綑闇�瑕佹墦鍗扮殑鐗╂枡鏁伴噺(涓嶆槸鏍囩鏁伴噺)
- if (qty <= 0)
- {
- throw new Exception("褰撳墠鍗曟嵁鐗╂枡鏍囩宸叉墦鍗板畬姣曪紝濡傛湁闇�瑕佽琛ユ墦");
- }
+ //var labQty = label.Sum(m => m.Qty);
+ //var qty = asnList.Qty - labQty;//褰撳墠鍗曟嵁鍓╀綑闇�瑕佹墦鍗扮殑鐗╂枡鏁伴噺(涓嶆槸鏍囩鏁伴噺)
+ //if (qty <= 0)
+ //{
+ // throw new Exception("褰撳墠鍗曟嵁鐗╂枡鏍囩宸叉墦鍗板畬姣曪紝濡傛湁闇�瑕佽琛ユ墦");
+ //}
#region 鍒拌揣鏁伴噺
- if (arriveQty - qty > 0)
- {
- throw new Exception("鍒拌揣鏁伴噺澶т簬鏈墦鏍囩鏁伴噺锛岃閲嶆柊杈撳叆鍒拌揣鏁伴噺骞舵牳瀹�!");
- }
- else
- {
- qty = arriveQty;
- }
-
+ //if (arriveQty - qty > 0)
+ //{
+ // throw new Exception("鍒拌揣鏁伴噺澶т簬鏈墦鏍囩鏁伴噺锛岃閲嶆柊杈撳叆鍒拌揣鏁伴噺骞舵牳瀹�!");
+ //}
+ //else
+ //{
+ // qty = arriveQty;
+ //}
+
+ var qty = arriveQty;
#endregion
int labelNum = 1; //鐢熶骇鏉$爜鏁伴噺
@@ -656,23 +661,38 @@
string maxBoxCode = ""; //绠辩爜鍙�
// 鐢熸垚鑷紪鎵瑰彿
string toDayTime = DateTime.Now.ToString("yyyyMMdd");
-
-
- var maxLotNo = label.Max(a => a.LotNo);
- var maxBoxNo = label.Max(a => a.BoxNo);
+
if (isReset == "0")
{
-
- maxLotNoStr = maxLotNo;
- maxBoxCode = maxBoxNo;
- if (string.IsNullOrWhiteSpace(maxLotNoStr))
+ //鍒ゆ柇鍗曟嵁鏄惁鏄綑鏂欓��鍥炲崟
+ if (asn.Type == "4")
{
- maxLotNoStr = toDayTime.Substring(2, 6) + "0001";
+ maxLotNoStr = asnList.LotNo;
+ maxBoxCode = label.Where(m=>m.LotNo == maxLotNoStr).Max(a => a.BoxNo);
+ if (string.IsNullOrWhiteSpace(maxLotNoStr))
+ {
+ throw new Exception("杞﹂棿浣欐枡閫�鍥炲崟鎹壒娆′笉鑳戒负绌�");
+ }
}
+ else
+ {
+ var labelCount = label.Where(m => m.ASNDetailNo == imId).ToList();
+ if (labelCount.Count <= 0)
+ {
+ throw new Exception("褰撳墠鍗曟嵁鏄庣粏杩樻湭鐢熸垚鏍囩锛岃閫夋嫨閲嶇疆鎵规閫夐」涓衡�樻槸鈥欙紱");
+ }
+ maxLotNoStr = label.Max(a => a.LotNo);
+ maxBoxCode = label.Max(a => a.BoxNo);
+ if (string.IsNullOrWhiteSpace(maxLotNoStr))
+ {
+ maxLotNoStr = toDayTime.Substring(2, 6) + "0001";
+ }
+ }
+
}
else
{
- var maxCode = Db.Queryable<BllLabelBoxNo>().Max(a => a.LotNo); // 鑾峰彇浠婂ぉ鏈�澶ф壒娆″彿
+ var maxCode = Db.Queryable<BllBoxInfo>().Where(m=>m.Origin == "WMS鐢熸垚").Max(a => a.LotNo); // 鑾峰彇浠婂ぉ鏈�澶ф壒娆″彿
if (string.IsNullOrWhiteSpace(maxCode))
{
maxLotNoStr = toDayTime.Substring(2, 6) + "0001";
@@ -720,7 +740,7 @@
}
//鑾峰彇绠辩爜
- if (maxBoxCode == "")
+ if (string.IsNullOrWhiteSpace(maxBoxCode))
{
var str = "B"+maxLotNoStr + "000001"; //鎵瑰彿+ 娴佹按 2302010001000001
maxBoxCode = str;
@@ -769,25 +789,27 @@
#region 浜岀骇鍖呰
// 鏍规嵁鐢ㄦ埛杈撳叆鐨勭鏁伴噺璁$畻闇�瑕佺殑鏉$爜鏁�
- var labQty = label.Sum(m => m.Qty);
- var qty2 = asnList.Qty - labQty;
- if (qty2 <= 0)
- {
- throw new Exception("褰撳墠鍗曟嵁鐗╂枡鏍囩宸叉墦鍗板畬姣曪紝濡傛湁闇�瑕佽琛ユ墦");
- }
+ //var labQty = label.Sum(m => m.Qty);
+ //var qty2 = asnList.Qty - labQty;
+ //if (qty2 <= 0)
+ //{
+ // throw new Exception("褰撳墠鍗曟嵁鐗╂枡鏍囩宸叉墦鍗板畬姣曪紝濡傛湁闇�瑕佽琛ユ墦");
+ //}
#region 澧炲姞鍒拌揣鏁伴噺
- if (arriveQty - qty2 > 0)
- {
- throw new Exception("鍒拌揣鏁伴噺澶т簬鏈墦鏍囩鏁伴噺锛岃閲嶆柊杈撳叆鍒拌揣鏁伴噺!");
- }
- else
- {
- qty2 = arriveQty;
- }
+ //if (arriveQty - qty2 > 0)
+ //{
+ // throw new Exception("鍒拌揣鏁伴噺澶т簬鏈墦鏍囩鏁伴噺锛岃閲嶆柊杈撳叆鍒拌揣鏁伴噺!");
+ //}
+ //else
+ //{
+ // qty2 = arriveQty;
+ //}
#endregion
+
+ var qty2 = arriveQty;
int labelNum2 = 1; //鐢熶骇绠辨潯鐮佹暟閲�
labelNum2 = int.Parse(Math.Ceiling(qty2 / bNum).ToString());
@@ -806,20 +828,37 @@
string toDayTime2 = DateTime.Now.ToString("yyyyMMdd");
if (isReset == "0")
{
- var maxCode = label.Max(a => a.LotNo);
- var boxCode1 = label.Max(a => a.BoxNo);//绠卞彿
- var boxCode2 = label.Max(a => a.BoxNo3);//鏀彿
- maxCodestr2 = maxCode;
- maxboxcode2 = boxCode1;
- maxboxcode3 = boxCode2;
- if (string.IsNullOrWhiteSpace(maxCodestr2))
+ //鍒ゆ柇鍗曟嵁鏄惁鏄綑鏂欓��鍥炲崟
+ if (asn.Type == "4")
{
- maxCodestr2 = toDayTime2.Substring(2, 6) + "0001";
+ maxCodestr2 = asnList.LotNo;
+ maxboxcode2 = label.Where(m => m.LotNo == maxCodestr2).Max(a => a.BoxNo);
+ maxboxcode3 = label.Where(m => m.LotNo == maxCodestr2).Max(a => a.BoxNo3);//鏀彿
+ if (string.IsNullOrWhiteSpace(maxCodestr2))
+ {
+ throw new Exception("杞﹂棿浣欐枡閫�鍥炲崟鎹壒娆′笉鑳戒负绌�");
+ }
}
+ else
+ {
+ var labelCount = label.Where(m => m.ASNDetailNo == imId).ToList();
+ if (labelCount.Count <= 0)
+ {
+ throw new Exception("褰撳墠鍗曟嵁鏄庣粏杩樻湭鐢熸垚鏍囩锛岃閫夋嫨閲嶇疆鎵规閫夐」涓衡�樻槸鈥欙紱");
+ }
+ maxCodestr2 = label.Max(a => a.LotNo); ;
+ maxboxcode2 = label.Max(a => a.BoxNo);//绠卞彿;
+ maxboxcode3 = label.Max(a => a.BoxNo3);//鏀彿;
+ if (string.IsNullOrWhiteSpace(maxCodestr2))
+ {
+ maxCodestr2 = toDayTime2.Substring(2, 6) + "0001";
+ }
+ }
+
}
else
{
- var maxCode = Db.Queryable<BllLabelBoxNo>().Max(a => a.LotNo); // 鑾峰彇浠婂ぉ鏈�澶ф壒娆″彿
+ var maxCode = Db.Queryable<BllBoxInfo>().Where(m => m.Origin == "WMS鐢熸垚").Max(a => a.LotNo); // 鑾峰彇浠婂ぉ鏈�澶ф壒娆″彿
if (string.IsNullOrWhiteSpace(maxCode))
{
maxCodestr2 = toDayTime2.Substring(2, 6) + "0001";
@@ -868,7 +907,7 @@
}
//鑾峰彇绠辩爜
- if (maxboxcode2 == "")
+ if (string.IsNullOrWhiteSpace(maxboxcode2))
{
maxboxcode2 = "B"+maxCodestr2 + "000001"; // 绠卞彿 鎵瑰彿+绗嚑绠�
}
@@ -912,7 +951,7 @@
}
}
- if (maxboxcode3 == "")
+ if (string.IsNullOrWhiteSpace(maxboxcode3))
{
maxboxcode3 = "Z"+maxCodestr2 + "0001"; // 鏀彿 鎵瑰彿+绗嚑绠�
}
@@ -975,7 +1014,7 @@
Db.Updateable(asnList).ExecuteCommand();
}
}
-
+ Db.CommitTran();
return modelList;
@@ -983,6 +1022,7 @@
}
catch (Exception e)
{
+ Db.RollbackTran();
throw new Exception(e.Message);
}
}
@@ -1512,7 +1552,7 @@
model1.Qty = item.Qty;// 鏁伴噺
model1.BoxNo = item.BoxNo3; // 鏀彿
- model.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 40, false);
+ model1.ImgStr = BarcodeHelper.GetCodeBarBase64(model1.BoxNo, 160, 40, false);
// 娣诲姞鍒發ist闆嗗悎
printModelList.Add(model1);
@@ -1543,9 +1583,6 @@
#endregion
- //dataContext.WmsLabelPrintLog.InsertAllOnSubmit(printlog);
- // dataContext.SubmitChanges();
- // return printModel;
return printModelList;
}
catch (Exception e)
diff --git a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
index 472de61..fe0f1cc 100644
--- a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -48,7 +48,7 @@
.AndIF(!string.IsNullOrWhiteSpace(model.PalletNo), it => it.PalletNo.Contains(model.PalletNo.Trim()))
.AndIF(!string.IsNullOrWhiteSpace(model.LocatNo), it => it.LocatNo.Contains(model.LocatNo.Trim()))
.AndIF(!string.IsNullOrEmpty(model.RoadwayNo), a => a.RoadwayNo == model.RoadwayNo)
- .AndIF(!string.IsNullOrEmpty(model.WareHouseNo), a => a.RoadwayNo == model.WareHouseNo)
+ .AndIF(!string.IsNullOrEmpty(model.WareHouseNo), a => a.WareHouseNo == model.WareHouseNo)
.AndIF(strList.Count>0, it => strList.Contains((int)it.ASNDetailNo))
.AndIF(!string.IsNullOrWhiteSpace(model.LotNo), it => it.LotNo.Contains(model.LotNo.Trim()))
.AndIF(!string.IsNullOrWhiteSpace(model.LotText), it => it.LotText.Contains(model.LotText.Trim()))
@@ -664,6 +664,314 @@
}
#endregion
+ // 鐢宠宸烽亾
+ public OutCommandDto RequestRoadWay(string palletNo, string houseNo)
+ {
+ try
+ {
+ //楠岃瘉鎵樼洏鏉$爜鏄惁涓虹┖
+ if (string.IsNullOrEmpty(palletNo))
+ {
+ throw new Exception("璇疯緭鍏ヨ鐢宠鐨勬墭鐩樻潯鐮�");
+ }
+ //楠岃瘉鎵�灞炰粨搴撴槸鍚︿负绌�
+ if (string.IsNullOrEmpty(houseNo))
+ {
+ throw new Exception("璇烽�夋嫨鎵�灞炰粨搴�");
+ }
+ //楠岃瘉鏄惁涓哄钩搴撳叆搴�
+ if (houseNo == "W02")
+ {
+ throw new Exception("骞冲簱璇蜂娇鐢≒DA鎵嬫寔杩涜骞冲簱鍏ュ簱");
+ }
+
+ OutCommandDto comDto;//杩斿洖wcs鐨勫叆搴撳懡浠�
+ var isHaveLocateNo = false; //鎵樼洏缁戝畾淇℃伅涓槸鍚﹀凡鏈夋寚瀹氬偍浣�
+
+ var stock = Db.Queryable<SysPallets>().First(a => a.PalletNo == palletNo);//鎵樼洏淇℃伅
+
+ //鍒ゆ柇鎵樼洏鏉$爜鏄惁鏈夋晥
+ if (stock == null)
+ {
+ throw new Exception("鎵樼洏鏉$爜涓嶅彈WMS绠$悊锛屼笉鍙叆搴擄紒");
+ }
+
+ #region
+
+ //鏌ヨ鎵樼洏缁戝畾淇℃伅(鐘舵�佷负绛夊緟鍏ュ簱鐨�)
+ var palletBindList = Db.Queryable<BllPalletBind>().Where(m => m.IsDel == "0" && m.PalletNo == palletNo && m.Status != "2").ToList();
+ var haveLocate = palletBindList.FirstOrDefault(m => !string.IsNullOrWhiteSpace(m.LocatNo));
+
+ var skuList = Db.Queryable<SysMaterials>().Where(m => m.IsDel == "0").ToList();
+ //鐗╂枡绫诲埆淇℃伅
+ var skuCategoryList = Db.Queryable<SysMaterialCategory>().Where(m => m.IsDel == "0").ToList();
+
+ var skuNo = ""; //鍏ュ簱鐗╂枡
+
+ if (palletBindList.Count >= 1) //姝e父鍏ュ簱
+ {
+ var palletBind = palletBindList.FirstOrDefault(m => m.Status == "1");//鏌ヨ鏄惁鏈夋鍦ㄦ墽琛岀殑鎵樼洏缁戝畾
+ if (palletBind != null)
+ {
+ var beingTask = Db.Queryable<LogTask>().First(m => m.IsDel == "0" && m.TaskNo == palletBind.TaskNo);
+ if (beingTask == null)
+ {
+ throw new Exception("璇ユ墭鐩樻鍦ㄥ叆搴擄紝浣嗘湭鏌ヨ鍒颁换鍔′俊鎭�");
+ }
+ comDto = new OutCommandDto()
+ {
+ PalletNo = palletNo,//鎵樼洏鍙�
+ StartRoadway = beingTask.StartRoadway, // 璧峰宸烽亾
+ StartLocate = "", // 璧峰浣嶇疆
+ EndLocate = beingTask.EndLocat, // 鐩爣浣嶇疆
+ EndRoadway = beingTask.EndRoadway, // 鐩爣宸烽亾
+ TaskNo = beingTask.TaskNo, // 浠诲姟鍙�
+ TaskType = "0",// 浠诲姟绫诲瀷 (鍑哄簱)
+ OutMode = "", //鐩爣鍦板潃
+ Order = 1
+ };
+ return comDto;
+ }
+ if (haveLocate != null)
+ {
+ isHaveLocateNo = true; //宸叉湁鎸囧畾鍌ㄤ綅
+ }
+
+ if (palletBindList.First().Type == "0") //鐗╂枡鎵樺叆搴�
+ {
+ //鍒ゆ柇鏄惁缁戝畾鍗曟嵁鍙婂崟鎹姸鎬佹槸鍚︽甯�
+ foreach (var item in palletBindList)
+ {
+ var notice = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == item.ASNNo);
+ if (notice == null)
+ {
+ throw new Exception("鎵樼洏瀛樺湪鐗╂枡鏈粦瀹氬叆搴撳崟锛屼笉鍙叆搴擄紒");
+ }
+ if (notice.Status == "3")
+ {
+ throw new Exception($"鍏ュ簱鍗晎item.ASNNo}宸插叧闂紝涓嶅彲鍏ュ簱锛�");
+ }
+ }
+
+ //鑾峰彇鐗╂枡瀛樻斁鍖哄煙
+ var noticeDetail = Db.Queryable<BllArrivalNoticeDetail>().First(m =>
+ m.IsDel == "0" && m.Id == palletBindList.First().ASNDetailNo);
+ if (noticeDetail == null)
+ {
+ throw new Exception("鎵樼洏瀛樺湪鐗╂枡鏈粦瀹氬叆搴撳崟鏄庣粏锛屼笉鍙叆搴�");
+ }
+
+ skuNo = noticeDetail.SkuNo;
+
+ }
+ else if (palletBindList.First().Type == "1")//绌烘墭鐩�
+ {
+ skuNo = "100099";
+ }
+ }
+ else //鍥炴祦鍏ュ簱
+ {
+ var stockDetail = Db.Queryable<DataStockDetail>().Where(m => m.PalletNo == palletNo).ToList();
+ if (stockDetail.Count == 0)
+ {
+ throw new Exception($"{palletNo}鎵樼洏鏉$爜涓嶅叿鏈夌鐮佷俊鎭紝涓嶅彲鍏ュ簱锛�");
+ }
+ skuNo = stockDetail.First().SkuNo;
+
+ //鑾峰彇瀵瑰簲鍥炲簱瑙勫垯
+ var function = Db.Queryable<SysFunSetting>().First(a => a.IsDel == "0" && a.FunSetName == "鎵樼洏鍥炲簱楠岃瘉" && a.IsEnable == "NO");
+ #region 鎵樼洏鍥炲簱瑙勫垯
+
+ if (function != null)
+ {
+ //鎷h揣瀹屾垚鍚庡厑璁告墭鐩樺洖搴�
+ if (function.SetValue == "CompletePick")
+ {
+ var allot = Db.Queryable<BllExportAllot>().First(a => a.IsDel == "0" && a.LotNo == stockDetail[0].LotNo && a.PalletNo == palletNo && a.SkuNo == stockDetail[0].SkuNo);
+
+ //楠岃瘉鎷h揣鏄庣粏鏄惁瀛樺湪
+ if (allot != null)
+ {
+ //楠岃瘉褰撳墠鎵樼洏鎷h揣淇℃伅鏄惁宸插畬鎴�
+ if (allot.Status != "5")
+ {
+ throw new Exception("褰撳墠鎵樼洏鎷h揣淇℃伅鏈畬鎴愶紝璇峰畬鎴愬悗鍥炲簱锛�");
+ }
+ }
+ }
+ }
+
+
+ #endregion
+ }
+
+ var allotLocate = new AllotLocation();
+
+ SysStorageLocat locate;
+
+ var sku = skuList.FirstOrDefault(m => m.SkuNo == skuNo);
+ if (sku == null)
+ {
+ throw new Exception("鐗╂枡淇℃伅涓湭鏌ヨ鍒板叆搴撳崟鏄庣粏鍖呭惈鐨勭墿鏂欎俊鎭紝涓嶅彲鍏ュ簱");
+ }
+ //鍒ゆ柇鐗╂枡鏄惁鍚湁绫诲埆淇℃伅
+ if (string.IsNullOrWhiteSpace(sku.CategoryNo))
+ {
+ throw new Exception($"鐗╂枡锛歿sku.SkuNo}鏈煡璇㈠埌绫诲埆淇℃伅");
+ }
+
+ var skuCategory = skuCategoryList.FirstOrDefault(m => m.CategoryNo == sku.CategoryNo);
+ if (skuCategory == null)
+ {
+ throw new Exception($"鏈湪绫诲埆淇℃伅涓煡璇㈠埌鐗╂枡锛歿sku.SkuNo}鍖呭惈鐨勭被鍒�");
+ }
+
+ var areaStr = skuCategory.AreaNo.Split(",");
+ var areaList = new List<string>();
+ foreach (var item in areaStr)
+ {
+ areaList.Add(item);
+ }
+
+ var laneAllot = 0; //鍌ㄤ綅璺冲贩鍒嗛厤 0:璺崇潃鍒嗛厤(涓�涓竴涓垎閰�)1:宸烽亾鎸夌収浼樺厛绾у垎閰嶏紝鍚屼紭鍏堢骇椤哄簭鍒嗛厤(涓�涓贩閬撴弧浜嗗啀鍒嗛厤涓嬩竴涓殑宸烽亾鍌ㄤ綅)
+ var funSet3 = Db.Queryable<SysFunSetting>().First(m => m.IsDel == "0" && m.FunSetName == "鍌ㄤ綅璺冲贩鍒嗛厤" && m.IsEnable == "NO");
+ if (funSet3 != null)
+ {
+ switch (funSet3.SetValue)
+ {
+ case "JumpLaneAllot":
+ laneAllot = 0;//绔嬪簱鍌ㄤ綅鍒嗛厤 宸烽亾鍚屼紭鍏堢骇宸烽亾璺崇潃鍒嗛厤(涓�涓竴涓垎閰�)
+ break;
+ case "RankLaneAllot":
+ laneAllot = 1;//绔嬪簱鍌ㄤ綅鍒嗛厤 宸烽亾鎸夌収浼樺厛绾у垎閰嶏紝鍚屼紭鍏堢骇椤哄簭鍒嗛厤(涓�涓贩閬撴弧浜嗗啀鍒嗛厤涓嬩竴涓殑宸烽亾鍌ㄤ綅)
+ break;
+ default:
+ laneAllot = 1;// 榛樿 璺崇潃鍒嗛厤
+ break;
+ }
+ }
+ var roadList = Db.Queryable<SysStorageLocat>().Where(m => m.WareHouseNo == houseNo && areaList.Contains(m.AreaNo))
+ .GroupBy(m => m.RoadwayNo).Select(m => m.RoadwayNo).ToList();
+
+ SysRoadwayUseLog useLog = Db.Ado.SqlQuerySingle<SysRoadwayUseLog>("select Top(1) * from SysRoadwayUseLog where IsDel=0 order by CreateTime desc"); //宸烽亾鏈�鍚庝竴娆′娇鐢ㄨ褰�
+
+ var bindNum = Db.Queryable<BllPalletBind>()
+ .Where(m => m.IsDel == "0" && m.Status == "0" && !string.IsNullOrWhiteSpace(m.RoadwayNo))
+ .GroupBy(m => m.PalletNo).Select(m => m.PalletNo).Count();
+
+ var roadNo = "";
+ if (laneAllot == 0)//璺冲贩閬撳钩鍧囧垎閰�
+ {
+ //濡傛灉鍚岀骇宸烽亾鏈夊鏉″垯鏌ヤ笂娆′綅缃棩蹇�
+ if (roadList.Count > 1)
+ {
+ useLog = Db.Queryable<SysRoadwayUseLog>().OrderByDescending(l => l.Id).First();
+ }
+ //鍙栧悇宸烽亾鎵�鏈夋帓绗竴涓悎閫備綅
+ foreach (var l in roadList)
+ {
+ //濡傛灉涓婃鏄綋鍓嶅贩閬撳垯璺冲嚭
+ if (useLog != null && l == useLog.RoadwayNo)
+ {
+ continue;
+ }
+
+ var locateCount = Db.Queryable<SysStorageLocat>()
+ .Where(m => m.Status == "0" && m.Flag == "0" && areaList.Contains(m.AreaNo)).Count();
+ if (locateCount- bindNum>0)
+ {
+ roadNo = l;
+ }
+ //褰撳墠宸锋湁浣嶇疆鍒欓��鍑�
+ if (roadNo != null)
+ {
+ break;
+ }
+ }
+ //濡傛灉璺冲贩閬撳苟涓旀湭鎵惧埌鍚堥�傜┖鍌ㄤ綅,鍒欒烦鍒版渶鍚庝竴娆′娇鐢ㄧ殑宸烽亾鏌ヨ
+
+ if (roadNo == null)
+ {
+ if (useLog != null)
+ {
+ roadNo = useLog.RoadwayNo;
+ }
+ }
+ }
+ else//鎸夌収宸烽亾浼樺厛绾у垎閰�
+ {
+ foreach (var item in roadList)
+ {
+ roadNo = item;
+ if (roadNo != null)
+ {
+ break;
+ }
+ }
+ }
+
+ if (string.IsNullOrWhiteSpace(roadNo))
+ {
+ throw new Exception("鏈煡璇㈠埌绌哄偍浣嶅贩閬�");
+ }
+
+ Db.BeginTran();
+ try
+ {
+ if (roadNo != null)
+ {
+ //娣诲姞宸烽亾浣跨敤璁板綍
+ var log = new SysRoadwayUseLog
+ {
+ RoadwayNo = roadNo ,
+ WareHouseNo = houseNo,
+ Row = 0,
+ Column = 0,
+ Layer = 0,
+ };
+ Db.Insertable(log).ExecuteCommand();
+ }
+
+ if (palletBindList.Count >= 1)
+ {
+ foreach (var item in palletBindList)
+ {
+ item.WareHouseNo = houseNo;
+ item.RoadwayNo = roadNo;
+ item.TaskNo = "";
+ }
+ Db.Updateable(palletBindList).ExecuteCommand();
+ }
+ Db.CommitTran();
+ comDto = new OutCommandDto()
+ {
+ PalletNo = palletNo,//鎵樼洏鍙�
+ StartRoadway = "",
+ StartLocate = "", // 璧峰浣嶇疆
+ EndLocate = "", // 鐩爣浣嶇疆
+ EndRoadway = roadNo, // 鐩爣宸烽亾
+ TaskNo = "", // 浠诲姟鍙�
+ TaskType = "0",// 浠诲姟绫诲瀷 (鍑哄簱)
+ OutMode = "", //鐩爣鍦板潃
+ Order = 1
+ };
+
+ }
+ catch (Exception ex)
+ {
+ Db.RollbackTran();
+ throw new Exception(ex.Message);
+ }
+ #endregion
+
+ return null;
+ }
+ catch (Exception e)
+ {
+ throw new Exception(e.Message);
+ }
+ }
+
//鐢宠鍌ㄤ綅
public OutCommandDto RequestLocation(string palletNo, string houseNo, string roadwayNo)
{
@@ -682,7 +990,7 @@
//楠岃瘉鏄惁涓哄钩搴撳叆搴�
if (houseNo == "W02")
{
- throw new Exception("闆剁搴撹浣跨敤PDA鎵嬫寔杩涜骞冲簱鍏ュ簱");
+ throw new Exception("骞冲簱璇蜂娇鐢≒DA鎵嬫寔杩涜骞冲簱鍏ュ簱");
}
OutCommandDto comDto;//杩斿洖wcs鐨勫叆搴撳懡浠�
@@ -864,21 +1172,21 @@
Db.BeginTran();
try
{
- if (locate != null)
- {
- //娣诲姞宸烽亾浣跨敤璁板綍
- var log = new SysRoadwayUseLog
- {
- RoadwayNo = locate.RoadwayNo,
- LocateNo = locate.LocatNo,
- WareHouseNo = locate.WareHouseNo,
- Row = locate.Row,
- Column = locate.Column,
- Layer = locate.Layer,
- Depth = locate.Depth
- };
- Db.Insertable(log).ExecuteCommand();
- }
+ //if (locate != null)
+ //{
+ // //娣诲姞宸烽亾浣跨敤璁板綍
+ // var log = new SysRoadwayUseLog
+ // {
+ // RoadwayNo = locate.RoadwayNo,
+ // LocateNo = locate.LocatNo,
+ // WareHouseNo = locate.WareHouseNo,
+ // Row = locate.Row,
+ // Column = locate.Column,
+ // Layer = locate.Layer,
+ // Depth = locate.Depth
+ // };
+ // Db.Insertable(log).ExecuteCommand();
+ //}
var taskNo = new Common().GetMaxNo("TK");
var exTask = new LogTask //鍏ュ簱浠诲姟
@@ -1150,7 +1458,7 @@
#region 搴撳瓨鏄庣粏
var sd = new DataStockDetail()
{
- LotNo = noticeDetail.LotNo,
+ LotNo = item.LotNo,
LotText = noticeDetail.LotText,
SupplierLot = noticeDetail.SupplierLot,
SkuNo = noticeDetail.SkuNo,
@@ -1250,7 +1558,7 @@
#region 搴撳瓨
var dataStock = Db.Queryable<DataStock>().First(m =>
- m.IsDel == "0" && m.SkuNo == noticeDetail.SkuNo && m.LotNo == noticeDetail.LotNo);
+ m.IsDel == "0" && m.SkuNo == noticeDetail.SkuNo && m.LotNo == item.LotNo);
if (dataStock != null)
{
dataStock.Qty += item.Qty;
@@ -1263,7 +1571,7 @@
SkuNo = noticeDetail.SkuNo,
SkuName = noticeDetail.SkuName,
Standard = noticeDetail.Standard,
- LotNo = noticeDetail.LotNo,
+ LotNo = item.LotNo,
LotText = noticeDetail.LotText,
Qty = item.Qty,
LockQty = 0,
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index 8ac6d65..a3ce8d4 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -1281,6 +1281,30 @@
}
}
+ /// <summary>
+ /// 楠岃瘉鍌ㄤ綅鍦板潃(鍦扮爜)鏄惁鍙敤
+ /// </summary>
+ /// <param name="locatNo">鍌ㄤ綅缂栫爜</param>
+ /// <returns></returns>
+ public string CheckLocatNo(string locatNo)
+ {
+ try
+ {
+ string strMsg = "";
+ var storageLocat = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.LocatNo == locatNo && w.Status == "0" && w.WareHouseNo == "W02");
+ if (storageLocat == null)
+ {
+ throw new Exception("-1:鍦扮爜(鍌ㄤ綅淇℃伅)涓嶅瓨鍦ㄦ垨闈炵┖闂茬姸鎬侊紝璇锋牳鏌�!");
+ }
+
+ return strMsg;
+ }
+ catch (Exception ex)
+ {
+ throw new Exception(ex.Message);
+ }
+ }
+
//鏍规嵁绠辩爜鑾峰彇鐗╂枡銆佹壒娆°�佹暟閲忕瓑淇℃伅
public PdaPalletNoCheckDto GetBoxInfoByBoxNo(string boxNo)
{
@@ -1687,9 +1711,24 @@
string[] LotNoList = item.LotNo.Split(';');
foreach (var item2 in LotNoList)
{
- ArrivalNoticeDetailDto entry = new ArrivalNoticeDetailDto();
- entry = item;
- entry.LotNo = item2;
+ ArrivalNoticeDetailDto entry = new ArrivalNoticeDetailDto()
+ {
+ Id = item.Id,
+ ASNNo = item.ASNNo,
+ CompleteQty = item.CompleteQty,
+ CompleteTime = item.CompleteTime,
+ CreateTime = item.CreateTime,
+ Qty = item.Qty,
+ FactQty = item.FactQty,
+ LotNo = item2,
+ Money = item.Money,
+ PackagNo = item.PackagNo,
+ PackagName = item.PackagName,
+ Status = item.Status,
+ SkuNo = item.SkuNo,
+ SkuName = item.SkuName,
+ };
+
noticeList.Add(entry);
}
@@ -1877,6 +1916,7 @@
throw new Exception("-1:褰撳墠鎵樼洏姝e湪鎵ц涓紝缁戝畾澶辫触锛岃鏍稿疄!");
}
bindId = bind.Id;
+ bind.Qty += model.SkuQty;
}
#region 绠辩爜淇℃伅
@@ -1911,6 +1951,7 @@
// 鏇存敼绠辨敮鍏崇郴琛�
decimal factQty = 0.00m;//鎵樼洏鎬绘暟閲�
+ //鎴愬搧缁勬墭
if (model.SkuQty == 0)
{
var boxGroup = boxInfoList.GroupBy(m => m.BoxNo).ToList();
@@ -1970,7 +2011,7 @@
var sqlString = string.Empty;
if (factQty == 0)
{
- sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{bind.Qty}' where id = '{model.AsnDetailId}';";
+ sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{model.SkuQty}' where id = '{model.AsnDetailId}';";
}
else
{
@@ -2062,7 +2103,7 @@
throw new Exception("璇ユ墭鐩樻湭鍦ㄥ簱澶栵紝璇锋牳鏌�!");
}
}
-
+
#endregion
#region 鍦扮爜淇℃伅(鍌ㄤ綅淇℃伅)
@@ -2076,22 +2117,6 @@
Db.BeginTran();//寮�鍚簨鍔�
if (iscount == 0)//姝e父鍏ュ簱
{
- #region 绠辩爜淇℃伅
- var boxInfoList = Db.Queryable<BllBoxInfo>().Where(w => w.IsDel == "0" && w.ASNNo == model.ASNNo).ToList();
- //楠岃瘉绠辩爜淇℃伅鏄惁瀛樺湪
- if (boxInfoList.Count <= 0)
- {
- throw new Exception("绠辩爜淇℃伅涓嶅瓨鍦紝璇锋牳鏌�!");
- }
- foreach (var item in boxInfoList)
- {
- item.Status = "2"; // 鏀瑰彉绠辨敮鍏崇郴琛ㄧ姸鎬侊細宸插叆搴�
- item.UpdateTime = serverTime;
- item.UpdateUser = model.CreateUser;
- }
- Db.Updateable(boxInfoList).ExecuteCommand();
- #endregion
-
#region 鍏ュ簱鎬诲崟淇℃伅
var notice = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.Status != "3" && a.ASNNo == model.ASNNo);
//楠岃瘉鍏ュ簱鍗曟�诲崟鏄惁鍏抽棴
@@ -2103,6 +2128,30 @@
if (notice.Status == "3")
{
throw new Exception("鍏ュ簱鍗曟�诲崟宸插叧闂紝璇锋牳鏌�!");
+ }
+ #endregion
+
+ #region 绠辩爜淇℃伅
+ var boxInfoList = Db.Queryable<BllBoxInfo>().Where(w => w.IsDel == "0" && w.ASNNo == model.ASNNo).ToList();
+ // type 0:鎴愬搧鍏ュ簱 1:閲囪喘鍏ュ簱 2:涓棿鍝佸叆搴� 3:閫�璐у叆搴� 4:杞﹂棿浣欐枡閫�鍥炲叆搴� 5:鍏跺畠鍏ュ簱 6:浠e偍鍏ュ簱 7:瀵勫瓨鍏ュ簱
+ if (notice.Type == "2" || notice.Type == "6" || notice.Type == "7")
+ {
+ // 涓嶈创鐮佺墿鏂� 鏃犻渶楠岃瘉绠辩爜淇℃伅
+ }
+ else
+ {
+ //楠岃瘉绠辩爜淇℃伅鏄惁瀛樺湪
+ if (boxInfoList.Count <= 0)
+ {
+ throw new Exception("绠辩爜淇℃伅涓嶅瓨鍦紝璇锋牳鏌�!");
+ }
+ foreach (var item in boxInfoList)
+ {
+ item.Status = "2"; // 鏀瑰彉绠辨敮鍏崇郴琛ㄧ姸鎬侊細宸插叆搴�
+ item.UpdateTime = serverTime;
+ item.UpdateUser = model.CreateUser;
+ }
+ Db.Updateable(boxInfoList).ExecuteCommand();
}
#endregion
@@ -2194,7 +2243,7 @@
ASNDetailNo = (int)bindInfo.ASNDetailNo,
WareHouseNo = "W02",
RoadwayNo = "",
- AreaNo = "",
+ AreaNo = storageLocat.AreaNo,
LocatNo = model.LocatNo,
PalletNo = model.PalletNo,
PalletNo2 = bindInfo.PalletNo2,
@@ -2219,6 +2268,7 @@
{
stId = detailModel.Id;
detailModel.LocatNo = model.LocatNo;
+ detailModel.AreaNo = storageLocat.AreaNo;
detailModel.UpdateTime = serverTime;
detailModel.UpdateUser = (int)model.CreateUser;
// 鍙樻洿鍌ㄤ綅鍦板潃
diff --git a/Wms/WMS.BLL/DataServer/StockDetailServer.cs b/Wms/WMS.BLL/DataServer/StockDetailServer.cs
index d67ddd6..8d66d0b 100644
--- a/Wms/WMS.BLL/DataServer/StockDetailServer.cs
+++ b/Wms/WMS.BLL/DataServer/StockDetailServer.cs
@@ -1,6 +1,7 @@
锘縰sing System;
using System.Collections.Generic;
using System.Text;
+using Model.ModelDto.DataDto;
using SqlSugar;
using WMS.DAL;
using WMS.Entity.Context;
@@ -33,33 +34,33 @@
/// <param name="bitBoxMark">闆剁鏍囪</param>
/// <param name="inspectStatus">璐ㄩ噺鐘舵��</param>
/// <returns></returns>
- public List<DataStockDetail> GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus)
+ public List<StockDetailDto> GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus)
{
- string str = "select Id,LotNo,LotText,SupplierLot,SkuNo,SkuName,Qty,LockQty,FrozenQty,WareHouseNo,AreaNo,LocatNo,PalletNo,PalletNo2,PalletNo3,InspectMark,BitPalletMark from DataStockDetail where IsDel = @isdel";
+ string str = "select detail.*,house.WareHouseNo + '-' + house.WareHouseName as WareHouseName,roadway.RoadwayNo + '-' + roadway.RoadwayName as RoadwayName,area.AreaNo + '-' + area.AreaName as AreaName from DataStockDetail detail left join SysStorageRoadway roadway on detail.RoadwayNo = roadway.RoadwayNo left join SysWareHouse house on detail.WareHouseNo = house.WareHouseNo left join SysStorageArea area on detail.AreaNo = area.AreaNo where detail.IsDel = @isdel";
//鍒ゆ柇鐗╂枡鍙锋槸鍚︿负绌�
if (!string.IsNullOrEmpty(skuNo))
{
- str += " and SkuNo like @skuno";
+ str += " and detail.SkuNo like @skuno";
}
//鍒ゆ柇鐗╂枡鍚嶇О鏄惁涓虹┖
if (!string.IsNullOrEmpty(skuName))
{
- str += " and SkuName like @skuname";
+ str += " and detail.SkuName like @skuname";
}
//鍒ゆ柇鎵樼洏鍙锋槸鍚︿负绌�
if (!string.IsNullOrEmpty(palletNo))
{
- str += " and PalletNo like @palletno";
+ str += " and detail.PalletNo like @palletno";
}
//鍒ゆ柇鎵规鏄惁涓虹┖
if (!string.IsNullOrEmpty(lotNo))
{
- str += " and LotNo like @lotno";
+ str += " and detail.LotNo like @lotno";
}
//鍒ゆ柇闆舵墭鏍囪鏄惁涓虹┖
if (!string.IsNullOrEmpty(bitPalletMark))
{
- str += " and BitPalletMark = @bitpalletmark";
+ str += " and detail.BitPalletMark = @bitpalletmark";
}
int i = 0;
@@ -81,7 +82,7 @@
if (!string.IsNullOrEmpty(inspectMark))
{
boxstr += " and InspectMark = @inspectmark";
- str += " and InspectMark = @inspectmark";
+ str += " and detail.InspectMark = @inspectmark";
i = 1;
}
//鍒ゆ柇闆剁鏍囪鏄惁涓虹┖
@@ -94,7 +95,7 @@
if (!string.IsNullOrEmpty(inspectStatus))
{
boxstr += " and InspectStatus = @inspectstatus";
- str += " and InspectStatus = @inspectstatus";
+ str += " and detail.InspectStatus = @inspectstatus";
i = 1;
}
//灏嗙鐮佹暟鎹繘琛屾帓搴�
@@ -140,7 +141,7 @@
//鎺掑簭
str += " order by PalletNo,SkuNo,LotNo";
- List<DataStockDetail> boxInforList = Db.Ado.SqlQuery<DataStockDetail>(str, new
+ List<StockDetailDto> boxInforList = Db.Ado.SqlQuery<StockDetailDto>(str, new
{
isdel = "0", //鏄惁鍒犻櫎
skuno = "%" + skuNo + "%", //鐗╂枡鍙�
diff --git a/Wms/WMS.BLL/DataServer/StockServer.cs b/Wms/WMS.BLL/DataServer/StockServer.cs
index 6dbea88..ac4587f 100644
--- a/Wms/WMS.BLL/DataServer/StockServer.cs
+++ b/Wms/WMS.BLL/DataServer/StockServer.cs
@@ -107,7 +107,7 @@
/// <returns></returns>
public List<StockDetailDto> GetInventoryList1(string skuNo, string skuName, string lotNo, string locatNo, string palletNo, string status, string inspectStatus)
{
- string str = "select detail.*,house.WareHouseName as WareHouseName,roadway.RoadwayName as RoadwayName from DataStockDetail detail left join SysStorageRoadway roadway on detail.RoadwayNo = roadway.RoadwayNo left join SysWareHouse house on detail.WareHouseNo = house.WareHouseNo Where detail.IsDel = @isdel";
+ string str = "select detail.*,house.WareHouseNo + '-' + house.WareHouseName as WareHouseName,roadway.RoadwayNo + '-' + roadway.RoadwayName as RoadwayName,area.AreaNo + '-' + area.AreaName as AreaName from DataStockDetail detail left join SysStorageRoadway roadway on detail.RoadwayNo = roadway.RoadwayNo left join SysWareHouse house on detail.WareHouseNo = house.WareHouseNo left join SysStorageArea area on detail.AreaNo = area.AreaNo Where detail.IsDel = @isdel";
//鍒ゆ柇鐗╂枡缂栫爜鏄惁涓虹┖
if (!string.IsNullOrEmpty(skuNo))
{
diff --git a/Wms/WMS.BLL/Logic/AllotLocation.cs b/Wms/WMS.BLL/Logic/AllotLocation.cs
index 4e7f3a8..eb574c4 100644
--- a/Wms/WMS.BLL/Logic/AllotLocation.cs
+++ b/Wms/WMS.BLL/Logic/AllotLocation.cs
@@ -63,7 +63,7 @@
//鏌ヨ璇ュ贩閬撳苟涓旀爣蹇椾负姝e父鐨勭殑鍌ㄤ綅
roadwayList.Add(roadway);
- var locate = GetLocateByRoadways(roadwayList,areaList);
+ var locate = GetLocateByRoadways(roadwayList,areaList,true);
if (locate == null)
{
throw new Exception($"{roadwayNo}宸烽亾娌℃湁鍚堥�傜殑绌哄偍浣�");
@@ -107,8 +107,9 @@
/// </summary>
/// <param name="roadways">宸烽亾闆嗗悎</param>
/// <param name="areaList">鍖哄煙闆嗗悎</param>
+ /// <param name="isRoadway">鏄惁鎸囧畾宸烽亾</param>
/// <returns></returns>
- private SysStorageLocat GetLocateByRoadways(List<SysStorageRoadway> roadways,List<string> areaList)
+ private SysStorageLocat GetLocateByRoadways(List<SysStorageRoadway> roadways,List<string> areaList,bool isRoadway = false)
{
try
{
@@ -185,11 +186,15 @@
//鍙栧悇宸烽亾鎵�鏈夋帓绗竴涓悎閫備綅
foreach (var l in roadways)
{
- //濡傛灉涓婃鏄綋鍓嶅贩閬撳垯璺冲嚭
- if (log != null && l.RoadwayNo == log.RoadwayNo)
+ if (!isRoadway)
{
- continue;
+ //濡傛灉涓婃鏄綋鍓嶅贩閬撳垯璺冲嚭
+ if (log != null && l.RoadwayNo == log.RoadwayNo)
+ {
+ continue;
+ }
}
+
//鍙栧綋鍓嶅贩鏈�浼樹綅缃�
locate = GetLocateByRoadway(l.RoadwayNo, topOrBom, leftOrRight, areaList);
//褰撳墠宸锋湁浣嶇疆鍒欓��鍑�
@@ -199,11 +204,14 @@
}
}
//濡傛灉璺冲贩閬撳苟涓旀湭鎵惧埌鍚堥�傜┖鍌ㄤ綅,鍒欒烦鍒版渶鍚庝竴娆′娇鐢ㄧ殑宸烽亾鏌ヨ
- if (locate == null)
+ if (!isRoadway)
{
- if (log != null)
+ if (locate == null)
{
- locate = GetLocateByRoadway(log.RoadwayNo, topOrBom, leftOrRight, areaList);
+ if (log != null)
+ {
+ locate = GetLocateByRoadway(log.RoadwayNo, topOrBom, leftOrRight, areaList);
+ }
}
}
}
@@ -212,6 +220,10 @@
foreach (var item in roadways)
{
locate = GetLocateByRoadway(item.RoadwayNo, topOrBom, leftOrRight, areaList);
+ if (locate != null)
+ {
+ break;
+ }
}
}
@@ -246,7 +258,7 @@
sql += "order by ";
sql += topOrBom == 0 ? "Layer desc, " : "Layer, ";
sql += leftOrRight == 0 ? "[Column], " : "[Column] desc, ";
- sql += " Row desc; ";
+ sql += " Row desc Depth desc; ";
var locateList = db.Ado.SqlQuery<SysStorageLocat>(sql);
diff --git a/Wms/WMS.IBLL/IBllAsnServer/IPalletBindServer.cs b/Wms/WMS.IBLL/IBllAsnServer/IPalletBindServer.cs
index 82c43ec..b6660a2 100644
--- a/Wms/WMS.IBLL/IBllAsnServer/IPalletBindServer.cs
+++ b/Wms/WMS.IBLL/IBllAsnServer/IPalletBindServer.cs
@@ -69,6 +69,13 @@
#endregion
/// <summary>
+ /// 鐢宠宸烽亾
+ /// </summary>
+ /// <param name="palletNo">鎵樼洏鍙�</param>
+ /// <param name="houseNo">浠撳簱鍙�</param>
+ /// <returns></returns>
+ OutCommandDto RequestRoadWay(string palletNo, string houseNo);
+ /// <summary>
/// 鐢宠绌哄偍浣�
/// </summary>
/// <param name="palletNo">鎵樼洏鍙�</param>
diff --git a/Wms/WMS.IBLL/IDataServer/IStockDetailServer.cs b/Wms/WMS.IBLL/IDataServer/IStockDetailServer.cs
index 264101e..b41ffc5 100644
--- a/Wms/WMS.IBLL/IDataServer/IStockDetailServer.cs
+++ b/Wms/WMS.IBLL/IDataServer/IStockDetailServer.cs
@@ -1,4 +1,5 @@
-锘縰sing System;
+锘縰sing Model.ModelDto.DataDto;
+using System;
using System.Collections.Generic;
using System.Text;
using WMS.Entity.DataEntity;
@@ -22,7 +23,7 @@
/// <param name="bitBoxMark">闆剁鏍囪</param>
/// <param name="inspectStatus">璐ㄩ噺鐘舵��</param>
/// <returns></returns>
- List<DataStockDetail> GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus);
+ List<StockDetailDto> GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus);
/// <summary>
/// 瀵煎嚭鎵樼洏鏄庣粏
diff --git a/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs b/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
index bf70ee5..4cfb390 100644
--- a/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
+++ b/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
@@ -55,6 +55,13 @@
//鏍规嵁鎵樼洏鍙疯幏鍙栧叆搴撳崟鍙�
string GetASNNoByPalletNo(string palletNo);
+ /// <summary>
+ /// 楠岃瘉鍌ㄤ綅鍦板潃(鍦扮爜)鏄惁鍙敤銆�
+ /// </summary>
+ /// <param name="LocatNo"></param>
+ /// <returns></returns>
+ string CheckLocatNo(string LocatNo);
+
//鏍规嵁绠辩爜鑾峰彇鐗╂枡銆佹壒娆°�佹暟閲忕瓑淇℃伅
PdaPalletNoCheckDto GetBoxInfoByBoxNo(string boxNo);
diff --git a/Wms/Wms/Controllers/PdaAsnController.cs b/Wms/Wms/Controllers/PdaAsnController.cs
index f1067ab..bedbd3d 100644
--- a/Wms/Wms/Controllers/PdaAsnController.cs
+++ b/Wms/Wms/Controllers/PdaAsnController.cs
@@ -383,6 +383,26 @@
return Ok(new { code = 1, msg = e.Message });
}
}
+
+ /// <summary>
+ /// 楠岃瘉鍌ㄤ綅(鍦扮爜)鏄惁鍙敤
+ /// </summary>
+ /// <param name="model">LocatNo鍌ㄤ綅鍦板潃</param>
+ /// <returns></returns>
+ [HttpPost]
+ public IActionResult CheckLocatNo(PalletBindVm model)
+ {
+ try
+ {
+ var result = _PdaAsnSvc.CheckLocatNo(model.LocatNo);
+
+ return Ok(new { code = 0, msg = "楠岃瘉鎴愬姛!", data = result });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { code = 1, msg = e.Message });
+ }
+ }
#endregion
#region 闆剁鍏ュ簱
diff --git a/Wms/Wms/Controllers/StatisticalController.cs b/Wms/Wms/Controllers/StatisticalController.cs
index 66dae9a..5a1516a 100644
--- a/Wms/Wms/Controllers/StatisticalController.cs
+++ b/Wms/Wms/Controllers/StatisticalController.cs
@@ -98,7 +98,7 @@
{
try
{
- List<DataStockDetail> boxInfoList = _stockDetail.GetBindList(skuNo, skuName, palletNo, lotNo, boxNo, status, inspectMark, bitPalletMark, bitBoxMark, inspectStatus);
+ List<StockDetailDto> boxInfoList = _stockDetail.GetBindList(skuNo, skuName, palletNo, lotNo, boxNo, status, inspectMark, bitPalletMark, bitBoxMark, inspectStatus);
return Ok(new { data = boxInfoList, code = 0, msg = "鑾峰彇鎵樼洏鏄庣粏鎴愬姛" });
}
catch (Exception e)
--
Gitblit v1.8.0