From b31f32fbfb25c77567e3853e05ca114dd2a00fbe Mon Sep 17 00:00:00 2001
From: chengsc <Demo@DESKTOP-CPA90BF>
Date: 星期一, 14 十月 2024 18:58:22 +0800
Subject: [PATCH] 修改问题
---
HTML/views/ASNSetting/LabelBoxBuDa.html | 52 +++---
Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs | 139 +++++++++++++------
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs | 6
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs | 12 +
Wms/Wms/Controllers/BllAsnController.cs | 28 +++
Wms/Model/ModelVm/BllAsnVm/BoxInfoVm.cs | 10 +
Wms/WMS.IBLL/IBllAsnServer/IBllBoxInfoServer.cs | 8 +
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs | 2
HTML/views/ASNSetting/LabelBox.html | 111 +++++++++------
9 files changed, 246 insertions(+), 122 deletions(-)
diff --git a/HTML/views/ASNSetting/LabelBox.html b/HTML/views/ASNSetting/LabelBox.html
index 86b5a37..90e09ef 100644
--- a/HTML/views/ASNSetting/LabelBox.html
+++ b/HTML/views/ASNSetting/LabelBox.html
@@ -128,7 +128,7 @@
<i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>鍒犻櫎鏍囩
</button>
</div>
- <!-- 纭鍑哄簱鍙e脊绐� -->
+ <!-- 鍒犻櫎鏍囩椤甸潰寮圭獥 -->
<div class="layui-inline" id="divDelLotNo" style="display: none; padding-top: 10px;">
<div class="layui-inline">
<label class="layui-form-label">鍏ュ簱鍗曟嵁</label>
@@ -146,6 +146,16 @@
</div>
</div>
+ </div>
+ <!-- 缂栬緫鏍囩椤甸潰寮圭獥 -->
+ <div class="layui-inline" id="divEditQty" style="display: none; padding-top: 10px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">鏁伴噺</label>
+ <div class="layui-input-inline" style="width: 220px;">
+ <input type="text" id="LabelQty" name="LabelQty" placeholder="鏁伴噺" autocomplete="off" class="layui-input">
+
+ </div>
+ </div>
</div>
</div>
</div>
@@ -250,9 +260,9 @@
<script type="text/html" id="toolbarDemoList">
{{# function GetBtn2(d){
var html = '';
- if(d.Origin == "WMS鐢熸垚" || d.Status == "0"){
- 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.Origin == "WMS鐢熸垚" && d.Status == "0"){
+ html = `<a class="layui-btn layui-btn-normal layui-btn-xs editClass" lay-event="edit">
+ <i class="layui-icon layui-icon-delete"></i>缂栬緫</a>`;
}
return html;
@@ -391,45 +401,56 @@
});
});
+ //鏄庣粏琛ㄦ搷浣滄爮浜嬩欢
+ table.on('tool(Box-list)', function (obj) {
+ var data = obj.data;
+ var id = data.Id;
+ switch(obj.event)
+ {
+ case "edit" :
+ layer.open({
+ type: 1,
+ title: '缂栬緫鏍囩',
+ content: $('#divEditQty'),
+ maxmin: false,
+ area: ['350px','180px'],
+ btn: ['纭畾', '鍙栨秷'],
+ yes: function(index, layero) {
+ var param = {
+ Id: id,
+ Qty: $('#LabelQty').val(),
+ };
+
+ sendData(IP + "/BllAsn/EditLabelQty", param, 'post', function(res) {
+ if (res.code == 0) { //鎴愬姛
+ bindTable();
+ layer.msg(res.msg, {
+ icon: 1,
+ time: 1500 //1绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function() {
+ $('#LabelQty').val("");
+ });
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function() {
+ bindTable();
+ $('#LabelQty').val("");
+ });
+ }
+ layer.close(index);
+ });
+ }
+ });
- // // 鍒犻櫎绠辨敮淇℃伅
- // table.on('tool(Box-list)', function (obj) {
- // var data = obj.data;
- // switch (obj.event) {
- // case "del":
- // layer.confirm('纭畾鍒犻櫎绠辨敮鏄庣粏鍚楋紵', function (index) {
- // // 浠g爜鍖哄煙
- // var param = {
- // Id: data.Id,
- // Status: "0",
- // };
- // console.log(param);
- // sendData(IP + "/BllAsn/DelBllBoxInfo", param, 'post', function (res) {
- // if (res.code == 0) { //鎴愬姛
- // layer.msg(res.msg, {
- // icon: 1,
- // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- // }, function () {
- // bindTable();
- // doing = true
- // });
- // } else { //涓嶆垚鍔�
- // layer.msg(res.msg, {
- // icon: 2,
- // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- // }, function () { doing = true });
- // }
- // });
- // });
-
- // break;
- // default: break;
- // }
- // });
-
- //#region 浜嬩欢鏂规硶
+ break;
+ default:break;
+ }
+ });
+
+
// 鏌ヨ褰曞叆鐨勭鏀叧绯�
- //#region 鑷畾涔夎〃澶�
var TotalColsArr = [[
{ field: 'ASNNo', title: '鍏ュ簱鍗曞彿', align: 'center',fixed: 'left', width: 180, "disabled": true },
@@ -459,7 +480,7 @@
{ field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 100 },
{ field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', width: 160, templet: '#templetCreateTime' },
- //{ field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 100, align: 'center', toolbar: '#toolbarDemoList', "disabled": true }
+ { field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 100, align: 'center', toolbar: '#toolbarDemoList', "disabled": true }
]];
//url缂栫爜
var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
@@ -522,6 +543,7 @@
$(function () {
$(".buDaLabelClass").hide();
$(".delLabelClass").hide();
+ $(".editClass").hide();
});
sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
if (res.code == 0) { //鎴愬姛
@@ -536,6 +558,11 @@
$(".delLabelClass").show();
});
}
+ if (res.data[k].MenuName == "缂栬緫鏍囩") {
+ $(function () {
+ $(".editClass").show();
+ });
+ }
}
} else { //涓嶆垚鍔�
layer.msg('鑾峰彇鏉冮檺淇℃伅澶辫触', {
diff --git a/HTML/views/ASNSetting/LabelBoxBuDa.html b/HTML/views/ASNSetting/LabelBoxBuDa.html
index 976df1c..681705f 100644
--- a/HTML/views/ASNSetting/LabelBoxBuDa.html
+++ b/HTML/views/ASNSetting/LabelBoxBuDa.html
@@ -41,7 +41,7 @@
display: block;
}
.font-size12{
- font-size: 12px;
+ font-size: 10px;
}
.font-size10{
font-size: 10px;
@@ -52,11 +52,11 @@
<body>
<div style="width:100%;">
<div class="layui-form hideCls" lay-filter="layuiadmin-app-form-list" id="print" style="width: 100%;height:100%;">
- <div style="display: flex;align-items: center;justify-content: center; height: 260px;">
- <table border="1" id="table" style="width: 90%; height:240px; text-align: center;border-collapse: collapse;table-layout: fixed;">
+ <div style="display: flex;align-items: center;justify-content: center; height: 190px;">
+ <table border="1" id="table" style="width: 90%; height:170px; text-align: center;border-collapse: collapse;table-layout: fixed;">
<tr>
<td colspan="2">
- <img src="../../img/LiNuo.jpg" style="width: 80%; height: 15px;" />
+ <img src="../../img/LiNuo.jpg" style="width: 80%; height: 13px;" />
</td>
<td colspan="2" style="padding: 1px 0px;" class="font-size12">SMP-ST002-R08-01</td>
</tr>
@@ -67,12 +67,12 @@
<td class="font-size12">鍝佸悕</td>
<td colspan="3" id="SkuName" class="font-size10"></td>
</tr>
- <tr>
+ <!-- <tr>
<td class="font-size12">瑙勬牸/鍨嬪彿</td>
<td id="Standard" class="font-size10"></td>
<td class="font-size12">鍖呰瑙勬牸</td>
<td id="PackageStandard" class="font-size10"></td>
- </tr>
+ </tr> -->
<tr>
<td class="font-size12">杩涘巶缂栧彿</td>
<td id="LotNo" class="font-size10"></td>
@@ -85,15 +85,15 @@
<td class="font-size12">鏁� 閲�</td>
<td id="Qty" class="font-size10"></td>
</tr>
- <tr>
+ <!-- <tr>
<td class="font-size12">鏈夋晥鏈熻嚦</td>
<td id="ExpirationTime" class="font-size10"></td>
<td class="font-size12">鍌ㄥ瓨鏈熻嚦</td>
<td id="StoreTime" class="font-size10"></td>
- </tr>
+ </tr> -->
<tr>
- <td colspan="4" style="padding: 5px 0px;">
- <img id="imgBar" style="width: 90%; height: 25px;" />
+ <td colspan="4" style="padding: 2px 0px;">
+ <img id="imgBar" style="width: 90%; height: 20px;" />
</td>
</tr>
@@ -241,11 +241,11 @@
$("#SkuName" + z.toString()).html( res.data[z].SkuName);
- $("#PackageStandard").attr("id", "PackageStandard" + z.toString());
- $("#PackageStandard" + z.toString()).html(res.data[z].PackageStandard);
+ //$("#PackageStandard").attr("id", "PackageStandard" + z.toString());
+ //$("#PackageStandard" + z.toString()).html(res.data[z].PackageStandard);
- $("#Standard").attr("id", "Standard" + z.toString());
- $("#Standard" + z.toString()).html(res.data[z].Standard);
+ //$("#Standard").attr("id", "Standard" + z.toString());
+ //$("#Standard" + z.toString()).html(res.data[z].Standard);
$("#Qty").attr("id", "Qty" + z.toString());
$("#Qty" + z.toString()).html( res.data[z].Qty);
@@ -259,12 +259,12 @@
$("#SupplierLot").attr("id", "SupplierLot" + z.toString());
$("#SupplierLot" + z.toString()).html( res.data[z].SupplierLot);
- $("#ExpirationTime").attr("id", "ExpirationTime" + z.toString());
- $("#ExpirationTime" + z.toString()).html( formatDate2(res.data[z].ExpirationTime));
+ //$("#ExpirationTime").attr("id", "ExpirationTime" + z.toString());
+ //$("#ExpirationTime" + z.toString()).html( formatDate2(res.data[z].ExpirationTime));
- $("#StoreTime").attr("id", "StoreTime" + z.toString());
- $("#StoreTime" + z.toString()).html(formatDate2(res.data[z].StoreTime));
+ //$("#StoreTime").attr("id", "StoreTime" + z.toString());
+ //$("#StoreTime" + z.toString()).html(formatDate2(res.data[z].StoreTime));
$("#imgBar").attr("id", "imgBar" + z.toString());
$("#imgBar" + z.toString()).attr("src", res.data[z].ImgStr);
@@ -279,14 +279,14 @@
$("#SkuName" + z.toString()).attr("id", "SkuName");
$("#SkuName").html("");
- $("#PackageStandard" + z.toString()).attr("id", "PackageStandard");
- $("#PackageStandard").html("");
+ //$("#PackageStandard" + z.toString()).attr("id", "PackageStandard");
+ //$("#PackageStandard").html("");
$("#Qty" + z.toString()).attr("id", "Qty");
$("#Qty").html("");
- $("#Standard" + z.toString()).attr("id", "Standard");
- $("#Standard").html("");
+ //$("#Standard" + z.toString()).attr("id", "Standard");
+ //$("#Standard").html("");
$("#LotNo" + z.toString()).attr("id", "LotNo");
$("#LotNo").html("");
@@ -294,11 +294,11 @@
$("#SupplierLot" + z.toString()).attr("id", "SupplierLot");
$("#SupplierLot").html("");
- $("#StoreTime" + z.toString()).attr("id", "StoreTime");
- $("#StoreTime").html("");
+ //$("#StoreTime" + z.toString()).attr("id", "StoreTime");
+ //$("#StoreTime").html("");
- $("#ExpirationTime" + z.toString()).attr("id", "ExpirationTime");
- $("#ExpirationTime").html("");
+ //$("#ExpirationTime" + z.toString()).attr("id", "ExpirationTime");
+ //$("#ExpirationTime").html("");
$("#imgBar" + z.toString()).attr("id", "imgBar");
$("#imgBar").attr("src", "");
diff --git a/Wms/Model/ModelVm/BllAsnVm/BoxInfoVm.cs b/Wms/Model/ModelVm/BllAsnVm/BoxInfoVm.cs
index 8e89c84..ebdbe26 100644
--- a/Wms/Model/ModelVm/BllAsnVm/BoxInfoVm.cs
+++ b/Wms/Model/ModelVm/BllAsnVm/BoxInfoVm.cs
@@ -222,4 +222,14 @@
}
+ /// <summary>
+ /// 琛ユ墦鐗╂枡鏍囩Vm
+ /// </summary>
+ public class EditLabelQtyVm
+ {
+ public int Id { get; set; }
+ public string Qty { get; set; }
+
+ }
+
}
diff --git a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
index b91e930..28d189c 100644
--- a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -193,7 +193,7 @@
skuType = "(0,1,3)";
break;
case "6"://浠e偍鍏ュ簱
- skuType = "(2)";
+ skuType = "(0,1,2,3,4)";
IsPack = 2; //涓嶈创
break;
case "7"://瀵勫瓨鍏ュ簱
@@ -326,11 +326,15 @@
continue;
}
}
- if (detailModel.LotNo.Length!= 10)
+ if (model.Type != "7")
{
- strMessage = "-1:杩涘巶缂栧彿浣嶆暟闀垮害鏈夎;";
- continue;
+ if (detailModel.LotNo.Length != 10)
+ {
+ strMessage = "-1:杩涘巶缂栧彿浣嶆暟闀垮害鏈夎;";
+ continue;
+ }
}
+
if (model.Type == "1" && string.IsNullOrWhiteSpace(detailModel.SupplierLot)) //閲囪喘鍒拌揣鍗曞師鍘傛壒鍙凤紙渚涜揣鎵规锛変笉鑳戒负绌�
{
strMessage = "-1:鍘熷巶鎵瑰彿涓嶅彲涓虹┖;";
diff --git a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
index de6e0ad..3448fe9 100644
--- a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
@@ -710,11 +710,11 @@
}
else
{
- var labelCount = label.Where(m => m.ASNDetailNo == imId).ToList();
- if (labelCount.Count <= 0)
- {
- throw new Exception("褰撳墠鍗曟嵁鏄庣粏杩樻湭鐢熸垚鏍囩锛岃閫夋嫨閲嶇疆鎵规閫夐」涓衡�樻槸鈥欙紱");
- }
+ //var labelCount = label.Where(m => m.ASNDetailNo == imId).ToList();
+ //if (labelCount.Count <= 0)
+ //{
+ // throw new Exception("褰撳墠鍗曟嵁鏄庣粏杩樻湭鐢熸垚鏍囩锛岃閫夋嫨閲嶇疆鎵规閫夐」涓衡�樻槸鈥欙紱");
+ //}
//maxLotNoStr = labelCount.Max(a => a.LotNo);
maxLotNoStr = asnList.LotNo;
//if (string.IsNullOrWhiteSpace(maxLotNoStr))
@@ -881,11 +881,11 @@
}
else
{
- var labelCount = label.Where(m => m.ASNDetailNo == imId).ToList();
- if (labelCount.Count <= 0)
- {
- throw new Exception("褰撳墠鍗曟嵁鏄庣粏杩樻湭鐢熸垚鏍囩锛岃閫夋嫨閲嶇疆鎵规閫夐」涓衡�樻槸鈥欙紱");
- }
+ //var labelCount = label.Where(m => m.ASNDetailNo == imId).ToList();
+ //if (labelCount.Count <= 0)
+ //{
+ // throw new Exception("褰撳墠鍗曟嵁鏄庣粏杩樻湭鐢熸垚鏍囩锛岃閫夋嫨閲嶇疆鎵规閫夐」涓衡�樻槸鈥欙紱");
+ //}
//maxCodestr2 = labelCount.Max(a => a.LotNo); ;
maxCodestr2 = asnList.LotNo;
@@ -1698,17 +1698,17 @@
throw new Exception("褰撳墠鍗曟嵁鎵规鐨勬爣绛惧凡鏈夊凡浣跨敤锛屼笉鑳藉垹闄�");
}
- foreach (var item in asnList)
- {
- if (string.IsNullOrWhiteSpace(item.LotNo))
- {
- continue;
- }
+ //foreach (var item in asnList)
+ //{
+ // if (string.IsNullOrWhiteSpace(item.LotNo))
+ // {
+ // continue;
+ // }
- item.LotNo = "";
- Db.Updateable(item).ExecuteCommand();
+ // item.LotNo = "";
+ // Db.Updateable(item).ExecuteCommand();
- }
+ //}
Db.Deleteable(labelList).ExecuteCommand();
}
else //鍒犻櫎鍥哄畾鎵规鏍囩
@@ -1719,37 +1719,37 @@
throw new Exception("褰撳墠鍗曟嵁鎵规鐨勬爣绛惧凡鏈夊凡浣跨敤锛屼笉鑳藉垹闄�");
}
- foreach (var item in asnList)
- {
- if (string.IsNullOrWhiteSpace(item.LotNo) || item.LotNo!=lotNo)
- {
- continue;
- }
+ //foreach (var item in asnList)
+ //{
+ // if (string.IsNullOrWhiteSpace(item.LotNo) || item.LotNo!=lotNo)
+ // {
+ // continue;
+ // }
- var strList = item.LotNo.Split(";");
- var updateLotNo = "";
- foreach (var str in strList)
- {
- if (string.IsNullOrWhiteSpace(str) || str == lotNo)
- {
- continue;
- }
+ // var strList = item.LotNo.Split(";");
+ // var updateLotNo = "";
+ // foreach (var str in strList)
+ // {
+ // if (string.IsNullOrWhiteSpace(str) || str == lotNo)
+ // {
+ // continue;
+ // }
- if (string.IsNullOrWhiteSpace(updateLotNo))
- {
- updateLotNo = str;
- }
- else
- {
- updateLotNo += ";" + str;
- }
+ // if (string.IsNullOrWhiteSpace(updateLotNo))
+ // {
+ // updateLotNo = str;
+ // }
+ // else
+ // {
+ // updateLotNo += ";" + str;
+ // }
- }
+ // }
- item.LotNo = updateLotNo;
- Db.Updateable(item).ExecuteCommand();
+ // item.LotNo = updateLotNo;
+ // Db.Updateable(item).ExecuteCommand();
- }
+ //}
Db.Deleteable(labelList).ExecuteCommand();
}
@@ -1771,5 +1771,54 @@
}
}
+
+ //缂栬緫鏍囩鏁伴噺
+ public void EditLabelQty(int id, string qty, int userId)
+ {
+ try
+ {
+ if (string.IsNullOrWhiteSpace(qty))
+ {
+ throw new Exception("缂栬緫鏁伴噺涓嶅彲涓虹┖");
+ }
+ var qtyData = 0m;
+ var isOk = decimal.TryParse(qty, out qtyData);
+ var boxInfo = Db.Queryable<BllBoxInfo>().First(m => m.IsDel == "0" && m.Id == id);
+ if (boxInfo == null)
+ {
+ throw new Exception("鏈煡璇㈠埌璇ユ爣绛句俊鎭�");
+ }
+
+ if (isOk)
+ {
+ if (qtyData <= 0)
+ {
+ throw new Exception("鏁伴噺涓嶈兘灏忎簬绛変簬0");
+ }
+ boxInfo.Qty = qtyData;
+
+ Db.Updateable(boxInfo).ExecuteCommand();
+ }
+ else
+ {
+ throw new Exception("鏁伴噺杞崲澶辫触");
+ }
+
+ var msg = $"缂栬緫浜嗙鍙凤細{boxInfo.BoxNo}";
+ if (!string.IsNullOrWhiteSpace(boxInfo.BoxNo3))
+ {
+ msg += $"銆佹敮鍙凤細{boxInfo.BoxNo3}";
+ }
+ msg += "鐨勬爣绛炬暟閲忎俊鎭�";
+
+ new OperationASNServer().AddLogOperationAsn("鍏ュ簱浣滀笟", "鐗╂枡鏍囩", boxInfo.BoxNo, "缂栬緫", msg, userId);
+ }
+ catch (Exception e)
+ {
+ throw new Exception(e.Message);
+ }
+ }
+
+
}
}
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index d8ef676..c905806 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -2536,7 +2536,7 @@
PackagNo = sku.PackagNo,
IsBale = bindInfo.IsBale,
IsBelt = bindInfo.IsBelt,
-
+ Demo = bindInfo.Demo,
CreateUser = (int)model.CreateUser,
CreateTime = serverTime
};
diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index e02d6f0..b50ab13 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -441,8 +441,8 @@
inspectStatus = "0,1";
break;
case "6"://浠e偍鍑哄簱
- skuType = "(0,1,2,3)";
- inspectStatus = "0,1";
+ skuType = "(0,1,2,3,4)";
+ inspectStatus = "0,1,2";
break;
case "8"://瀵勫瓨鍑哄簱
skuType = "(0,1,2,3)";
@@ -475,7 +475,7 @@
.AndIF(!string.IsNullOrWhiteSpace(inspectStatus), it => inspectStatus.Contains(it.InspectStatus))
.And(m => skuList.Contains(m.SkuNo))
.AndIF(type == "6", m => m.OwnerNo == ownerNo)//浠e偍鍑哄簱闇�瑕佸叧鑱旇揣涓�
- .AndIF(type == "2", m=> string.IsNullOrWhiteSpace(m.OwnerNo))
+ .AndIF(type != "6", m=> string.IsNullOrWhiteSpace(m.OwnerNo))
.AndIF(!string.IsNullOrWhiteSpace(msg), it => (it.SkuNo.Contains(msg) || it.SkuName.Contains(msg) || it.LotNo.Contains(msg)))
.And(it => (it.Qty - it.LockQty - it.FrozenQty) > 0)
.And(it => (it.Status == "0" || it.Status == "1"))
diff --git a/Wms/WMS.IBLL/IBllAsnServer/IBllBoxInfoServer.cs b/Wms/WMS.IBLL/IBllAsnServer/IBllBoxInfoServer.cs
index 9a2bcc2..dc0a44e 100644
--- a/Wms/WMS.IBLL/IBllAsnServer/IBllBoxInfoServer.cs
+++ b/Wms/WMS.IBLL/IBllAsnServer/IBllBoxInfoServer.cs
@@ -85,5 +85,13 @@
/// <param name="userId">鎿嶄綔浜篒D</param>
void DelLabelByAsnNo(string asnNo, string lotNo,int userId);
+ /// <summary>
+ /// 缂栬緫鏍囩鏁伴噺
+ /// </summary>
+ /// <param name="id">ID</param>
+ /// <param name="qty">鏁伴噺</param>
+ /// <param name="userId">鎿嶄綔浜�</param>
+ void EditLabelQty(int id, string qty, int userId);
+
}
}
diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs
index a999bec..17f36a3 100644
--- a/Wms/Wms/Controllers/BllAsnController.cs
+++ b/Wms/Wms/Controllers/BllAsnController.cs
@@ -995,7 +995,33 @@
return Ok(new { code = 1, count = 0, msg = e.Message });
}
}
-
+
+
+ //缂栬緫鏍囩鏁伴噺
+ [HttpPost]
+ public IActionResult EditLabelQty(EditLabelQtyVm model)
+ {
+ try
+ {
+ //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴稩D
+ var claimsIdentity = this.User.Identity as ClaimsIdentity;
+ if (claimsIdentity == null)
+ {
+ return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+ }
+ var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
+ if (string.IsNullOrWhiteSpace(userId))
+ {
+ return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+ }
+ _BoxInfoSvc.EditLabelQty(model.Id, model.Qty, int.Parse(userId));
+ return Ok(new { code = 0, msg = "缂栬緫鎴愬姛", data = "" });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { code = 1, count = 0, msg = e.Message });
+ }
+ }
#endregion
}
--
Gitblit v1.8.0