yuyou_x
2024-03-21 48bd39835e87024ad51346fb45fe29f5e138c085
Merge branch 'yyk'
3个文件已修改
86 ■■■■ 已修改文件
Pda/View/AsnSetting/productEnterQuantity.html 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Model/ModelVm/PdaVm/PdaAsnVm.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/View/AsnSetting/productEnterQuantity.html
@@ -621,7 +621,7 @@
                    form.render('select');
                    var param = {
                        Type: "2,5,6,7"
                        Type: "1,2,3,4,5,6,7"
                    };
                    sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) {
                        if (res.code == 0) { //成功
@@ -732,8 +732,10 @@
                        BoxNo: $("#BOXCODE").val(),
                        IsContinue: isContinue,
                        TailBoxNo: $("#BOXCODE2").val(),
                        Origin: "PDA"
                        Origin: "PDA",
                        TableType: xianshiyemian,
                    }
                    console.log(param)
                    //组盘
                    sendData(IP + "/PdaAsn/BindPallet", param, 'post', function (res) {
                        if (res.code == 0) { //成功 
@@ -786,7 +788,8 @@
                        LotNo: $("#goodSelect1").find("option:selected").text(),  //物料批次
                        SkuQty: parseInt($("#SkuQty").val()), //物料数量
                        Demo: $("#NoticeDemo").val(), //物料数量
                        Origin: "PDA"
                        Origin: "PDA",
                        TableType: xianshiyemian,
                    }
                    console.log(param)
@@ -905,6 +908,13 @@
                        console.log("出库口:" + JSON.stringify(res))
                        if (res.code == 0) { //成功
                            asnDetails = res.data;
                            if (asnDetails.length <= 0) {
                                layer.msg('当前单据下不存在贴标物料', {
                                    icon: 2,
                                    time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                });
                                return;
                            }
                            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) {
@@ -968,6 +978,14 @@
                        console.log("出库口:" + JSON.stringify(res))
                        if (res.code == 0) { //成功
                            asnDetails = res.data;
                            // console.log(asnDetails.length)
                            if (asnDetails.length <= 0) {
                                layer.msg('当前单据下不存在不贴标物料', {
                                    icon: 2,
                                    time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                });
                                return;
                            }
                            for (var i = 0; i < res.data.length; i++) {
                                if (skuNo != '' && skuNo == res.data[i].SkuNo) {
Wms/Model/ModelVm/PdaVm/PdaAsnVm.cs
@@ -74,5 +74,7 @@
        /// Desc:备注
        /// </summary>
        public string Demo { get; set; }
        public int TableType { get; set; }
    }
}
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -69,7 +69,17 @@
                sqlString = $"select * from BllArrivalNoticeDetail where ASNNo = '{model.ASNNo}' and isdel='0' order by CreateTime;";
                var modelList = Db.Ado.SqlQuery<ArrivalNoticeDetailDto>(sqlString);
                return modelList;
                List<ArrivalNoticeDetailDto> list = new List<ArrivalNoticeDetailDto>();
                foreach (var item in modelList)
                {
                    string str = BySkuNoGetPackInfo(item.SkuNo);
                    if (str == "不存在")
                    {
                        list.Add(item);
                    }
                }
                return list;
            }
            catch (Exception ex)
            {
@@ -1752,11 +1762,44 @@
                        }
                    }
                }
                return noticeList;
                List<ArrivalNoticeDetailDto> list = new List<ArrivalNoticeDetailDto>();
                foreach (var item in noticeList)
                {
                    string str = BySkuNoGetPackInfo(item.SkuNo);
                    if (str == "存在")
                    {
                        list.Add(item);
                    }
                }
                return list;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        //根据物料获取是否存在包装信息
        public string BySkuNoGetPackInfo(string skuNo)
        {
            try
            {
                //获取物料信息
                var sku = Db.Queryable<SysMaterials>().First(a => a.IsDel == "0" && a.SkuNo == skuNo);
                //判断物料信息是否为空
                if (!string.IsNullOrWhiteSpace(sku.PackagNo))
                {
                    return "存在";
                }
                else
                {
                    return "不存在";
                }
            }
            catch (Exception ex)
            {
                return ex.Message;
            }
        }
@@ -1816,7 +1859,7 @@
                    }
                }
                //判断物料数量是否为0 为0判断箱码信息 不为0继续
                if (model.SkuQty == 0)
                if (model.TableType == 0)
                {
                    if (string.IsNullOrEmpty(model.BoxNo))
                    {
@@ -1832,6 +1875,7 @@
                    }
                }
                int isTextTable = model.TableType;
                int isDeposit = 0;
                //判断总单单据是否为寄存单据
                if (notice.Type == "7")
@@ -1909,7 +1953,7 @@
                var bNum = 0;//箱码物品数量 
                //判断是否为寄存物料
                if (isDeposit == 0)
                if (isDeposit == 0 && isTextTable == 0)
                {
                    if (pack == null)
                    {
@@ -1988,7 +2032,7 @@
                        Demo = model.Demo,
                    };
                    if (model.SkuQty > pNum && isDeposit == 0)
                    if (model.TableType == 0 && isDeposit == 0 && isTextTable == 0)
                    {
                        throw new Exception($"绑定失败,{model.PalletNo}托盘绑定数量大于该物品托盘包装数量!");
                    }
@@ -2038,7 +2082,7 @@
                // 更改箱支关系表
                decimal factQty = 0.00m;//托盘总数量
                //成品组托
                if (model.SkuQty == 0)
                if (isTextTable == 0)
                {
                    var boxGroup = boxInfoList.GroupBy(m => m.BoxNo).ToList();
                    foreach (var g in boxGroup)
@@ -2078,7 +2122,7 @@
                    // 更新托盘绑定表
                    bind.Qty += factQty;
                }
                if (bind.FullQty < bind.Qty && isDeposit == 0)
                if (bind.FullQty < bind.Qty && isDeposit == 0 && isTextTable == 0)
                {
                    throw new Exception("托盘绑定数量已超出该物料包装数量");
                }
@@ -2087,7 +2131,7 @@
                {
                    bind.BitPalletMark = "0";
                }
                if (bind.Qty > pNum && isDeposit == 0)
                if (bind.Qty > pNum && isDeposit == 0 && isTextTable == 0)
                {
                    throw new Exception($"绑定失败,{bind.PalletNo}托盘绑定数量大于该物品托盘包装数量!");
                }