wxw
3 天以前 8fe902a40979521bee9f2a39a911f9bc1026e0db
Merge branch 'wxw'
5个文件已修改
108 ■■■■■ 已修改文件
HTML/views/QualityControl/QualityInformationFrom.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/View/AsnSetting/productEnterQuantity.html 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/QualityControl/QualityInformationFrom.html
@@ -30,8 +30,7 @@
        <div class="layui-form-item">
            <label class="layui-form-label">批次号</label>
            <div class="layui-input-block" style="width: 70%;">
                <input type="text" name="LotNo" placeholder="请输入批次号" lay-verify="required" autocomplete="off"
                    class="layui-input">
                <input type="text" name="LotNo" placeholder="请输入批次号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
Pda/View/AsnSetting/productEnterQuantity.html
@@ -737,7 +737,7 @@
                                            '</option>');
                                    } else {
                                        $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i]
                                            .SkuName + "-" + res.data[i].LotNo +
                                            .SkuName + "=>" + res.data[i].LotNo +
                                            '</option>');
                                    }
                                } else {
@@ -748,7 +748,7 @@
                                                '</option>');
                                        } else {
                                            $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i]
                                                .SkuName + "-" + res.data[i].LotNo +
                                                .SkuName + "=>" + res.data[i].LotNo +
                                                '</option>');
                                        }
@@ -759,7 +759,7 @@
                                                '</option>');
                                        } else {
                                            $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i]
                                                .SkuName + "-" + res.data[i].LotNo +
                                                .SkuName + "=>" + res.data[i].LotNo +
                                                '</option>');
                                        }
                                    }
@@ -811,7 +811,7 @@
                                            .SkuName);
                                    }
                                    if (res.data[i].LotNo != null) {
                                        $("#goodSelect1").append("-" + res.data[i].LotNo +
                                        $("#goodSelect1").append("=>" + res.data[i].LotNo +
                                            '</option>');
                                    }
                                } else {
@@ -821,7 +821,7 @@
                                            '</option>');
                                    } else {
                                        $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
                                            .SkuName + "-" + res.data[i].LotNo +
                                            .SkuName + "=>" + res.data[i].LotNo +
                                            '</option>');
                                    }
                                }
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -405,18 +405,18 @@
                        }
                        string lot1 = detailModel.Lot1;
                        string lot2 = detailModel.Lot2;
                        if (sku.IsPasteCode == "0")
                        if (sku.IsInspect == "0")//是否免检,0:否 1:是
                        {
                            //不贴标物料 生产日期、有效期不能为空
                            //不免检物料 生产日期、有效期不能为空
                            DateTime lot12;
                            DateTime lot22;
                            if (!DateTime.TryParse(detailModel.Lot1, out lot12))
                            {
                                throw new Exception("非贴标物料生产日期转换失败");
                                throw new Exception("不免检物料生产日期转换失败");
                            }
                            if (!DateTime.TryParse(detailModel.Lot2, out lot22))
                            {
                                throw new Exception("非贴标物料过期日期转换失败");
                                throw new Exception("不免检物料过期日期转换失败");
                            }
                            lot1 = lot12.ToString();
                            lot2 = lot22.ToString();
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -77,10 +77,10 @@
                else
                {
                    //从物料名称-批次中取出批次
                    int indexOfDash = model.LotNo.IndexOf("-");
                    int indexOfDash = model.LotNo.IndexOf("=>");
                    if (indexOfDash != -1)
                    {
                        model.LotNo = model.LotNo.Substring(indexOfDash + 1);
                        model.LotNo = model.LotNo.Substring(indexOfDash + 2);
                    }
                    else
                    {
@@ -1136,10 +1136,10 @@
                else
                {
                    //从物料名称-批次中取出批次
                    int indexOfDash = model.LotNo.IndexOf("-");
                    int indexOfDash = model.LotNo.IndexOf("=>");
                    if (indexOfDash != -1)
                    {
                        model.LotNo = model.LotNo.Substring(indexOfDash + 1);
                        model.LotNo = model.LotNo.Substring(indexOfDash + 2);
                    }
                    else
                    {
Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
@@ -112,51 +112,59 @@
                throw new Exception("物料信息为空,请核查!");
            }
            //验证批次号是否为空
            if (string.IsNullOrEmpty(model.LotNo))
            if (string.IsNullOrEmpty(model.LotNo) && string.IsNullOrEmpty(model.ASNNo))
            {
                throw new Exception("批次号不可为空,请核查!");
                throw new Exception("请输入批次号或入库单号!");
            }
            //验证入库单号是否为空
            if (string.IsNullOrEmpty(model.ASNNo))
            {
                throw new Exception("入库单号不可为空!");
            //if (string.IsNullOrEmpty(model.ASNNo))
            //{
            //    throw new Exception("入库单号不可为空!");
                //查询是否为退货入库单据
                //var Arrival = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.Type == "3");
                //if (Arrival == null)
                //{
                //    throw new Exception("只有入库单据为退货入库单可输入 入库单号,请核查!");
                //}
            //查询是否为退货入库单据
            //var Arrival = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.Type == "3");
            //if (Arrival == null)
            //{
            //    throw new Exception("只有入库单据为退货入库单可输入 入库单号,请核查!");
            //}
                ////获取入库单明细
                //var ArrivalDetail = Db.Queryable<BllArrivalNoticeDetail>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.LotNo.Contains(model.LotNo) && a.SkuNo == model.SkuNo);
                //if (ArrivalDetail == null)
                //{
                //    throw new Exception("输入的批次或物料信息与入库单据不符,请核查!");
                //}
                //isTui = 1;
            }
            ////获取入库单明细
            //var ArrivalDetail = Db.Queryable<BllArrivalNoticeDetail>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.LotNo.Contains(model.LotNo) && a.SkuNo == model.SkuNo);
            //if (ArrivalDetail == null)
            //{
            //    throw new Exception("输入的批次或物料信息与入库单据不符,请核查!");
            //}
            //isTui = 1;
            //}
            //查找质检信息中是否存在同批次质检录入记录
            //BllQualityInspect quality = Db.Queryable<BllQualityInspect>().First(m => m.IsDel == "0" && m.SkuNo == model.SkuNo && m.LotNo == model.LotNo);
            //if (quality != null)
            //{
                ////判断是否为退货入库单
                //if (isTui == 1)
                //{
                //    if (quality.ASNNo == model.ASNNo)
                //    {
                //        throw new Exception("当前退货入库单已创建质检信息,请勿重复创建!");
                //    }
                //}
            ////判断是否为退货入库单
            //if (isTui == 1)
            //{
            //    if (quality.ASNNo == model.ASNNo)
            //    {
            //        throw new Exception("当前退货入库单已创建质检信息,请勿重复创建!");
            //    }
            //}
            //    throw new Exception("当前物料和批次已进行质检,请核查!");
            //}
            ////查找同批次 同单据 入库单信息、
            BllArrivalNoticeDetail arrivalDetail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0"
            && m.ASNNo == model.ASNNo && m.LotNo == model.LotNo && m.SkuNo == model.SkuNo);
            string sqlStr = $@"select * from BllArrivalNoticeDetail where IsDel='0' and SkuNo='{model.SkuNo}' ";
            if (!string.IsNullOrEmpty(model.ASNNo))
            {
                sqlStr += $" and ASNNo='{model.ASNNo}' ";
            }
            if (!string.IsNullOrEmpty(model.LotNo))
            {
                sqlStr += $" and LotNo='{model.LotNo}' ";
            }
            BllArrivalNoticeDetail arrivalDetail = Db.SqlQueryable<BllArrivalNoticeDetail>(sqlStr).First();
            if (arrivalDetail == null)
            {
                throw new Exception("未找到入库单信息!");
@@ -170,10 +178,19 @@
            model.PassQty = 0; //合格数量
            model.FailQty = 0; //不合格数量
            model.Standard = sku.Standard; //规格
            //model.SupplierLot = arrivalDetail.SupplierLot; //供货批次
                                           //model.SupplierLot = arrivalDetail.SupplierLot; //供货批次
            //查找库存明细信息
            List<DataStockDetail> detail = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.SkuNo == model.SkuNo && m.LotNo == model.LotNo).ToList();
            string sqlStr2 = $@"select * from DataStockDetail where IsDel='0' and SkuNo='{model.SkuNo}' ";
            if (!string.IsNullOrEmpty(model.ASNNo))
            {
                sqlStr2 += $" and ASNNo='{model.ASNNo}' ";
            }
            if (!string.IsNullOrEmpty(model.LotNo))
            {
                sqlStr2 += $" and LotNo='{model.LotNo}' ";
            }
            List<DataStockDetail> detail = Db.SqlQueryable<DataStockDetail>(sqlStr2).ToList();
            foreach (var item in detail)
            {
                List<BllBoxInfo> box = Db.Queryable<BllBoxInfo>().Where(a => a.IsDel == "0" && a.SkuNo == model.SkuNo && a.LotNo == model.LotNo).ToList();