| | |
| | | html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel2"> |
| | | <i class="layui-icon layui-icon-edit"></i>生成标签</a>`; |
| | | } |
| | | if(d.AsnType == "5"&& (d.Status == "0" || d.Status == "1") && (d.PackagNo != ""|| d.PackagNo!=null)){ |
| | | html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel"> |
| | | <i class="layui-icon layui-icon-edit"></i>生成标签</a>`; |
| | | } |
| | | return html; |
| | | } |
| | | }} |
| | |
| | | {field: 'FrozenQty', title: '冻结数量', align: 'center'}, |
| | | {field: 'InspectMark', title: '抽检标记', align: 'center', templet: '#InspectMarkStatus'}, |
| | | {field: 'BitPalletMark', title: '零托标记', align: 'center', templet: '#BitPalletMarkStatus'}, |
| | | {field: 'Demo', title: '寄存备注', align: 'center'}, |
| | | ]]; |
| | | var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | |
| | | function checkBoxInfo() { |
| | | var param = { |
| | | "BoxNo": $("#BOXCODE").val(), |
| | | "AsnNo":$("#bar").val(), |
| | | } |
| | | sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | |
| | | LotNo = maxCodestr2, |
| | | Standard = asnList.Standard, |
| | | PackageStandard = packStr, |
| | | SupplierLot = asnList.SupplierLot, |
| | | SupplierLot = supplierLot, |
| | | InspectMark = "0", |
| | | BitBoxMark = bNum > boxQty ? "1" : "0", |
| | | InspectStatus = "0", |
| | |
| | | { |
| | | throw new Exception("请扫描外箱条码!"); |
| | | } |
| | | if (!string.IsNullOrWhiteSpace(model.ASNNo)) |
| | | { |
| | | var asnData = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == model.ASNNo); |
| | | if (asnData != null && (asnData.Type == "0" || asnData.Type == "3")) |
| | | { |
| | | var count = Db.Queryable<BllBoxInfo>().Count(m => m.IsDel == "0" && m.Status == "0" && m.BoxNo == model.BoxNo); |
| | | if (count == 0) |
| | | { |
| | | GetBoxInfoByFuMa(model.BoxNo, ""); //从赋码系统获取箱码信息 |
| | | } |
| | | } |
| | | |
| | | } |
| | | string sqlString = $@"SELECT |
| | | ASNNo, |
| | | BoxNo, |
| | |
| | | AND BoxNo = '{model.BoxNo}' |
| | | GROUP BY ASNNo,BoxNo,SkuNo,SkuName,LotNo; "; |
| | | var models = Db.Ado.SqlQuery<BoxInfoDto>(sqlString); |
| | | if (models == null) |
| | | if (models.Count == 0) |
| | | { |
| | | throw new Exception("箱码信息不存在!"); |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using Model.ModelDto.BllQualityDto; |
| | | using Model.ModelVm; |
| | |
| | | { |
| | | throw new Exception("批次号不可为空,请核查!"); |
| | | } |
| | | //int isTui = 0; |
| | | int isTui = 0; |
| | | //验证入库单号是否为空 |
| | | if (!string.IsNullOrEmpty(model.ASNNo)) |
| | | { |
| | |
| | | { |
| | | throw new Exception("输入的批次或物料信息与入库单据不符,请核查!"); |
| | | } |
| | | //isTui = 1; |
| | | isTui = 1; |
| | | } |
| | | |
| | | //查找质检信息中是否存在同批次质检录入记录 |
| | |
| | | |
| | | //查找库存明细信息 |
| | | List<DataStockDetail> detail = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.SkuNo == model.SkuNo && m.LotNo == model.LotNo).ToList(); |
| | | if (isTui == 1) |
| | | { |
| | | detail = detail.Where(m=> m.ASNNo == model.ASNNo).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(); |
| | | List<DataBoxInfo> box = Db.Queryable<DataBoxInfo>().Where(a => a.IsDel == "0" && a.StockDetailId == item.Id && a.SkuNo == model.SkuNo && a.LotNo == model.LotNo).ToList(); |
| | | //判断合格状态是否合格 |
| | | if (model.IsQualified == "1") |
| | | { |
| | |
| | | item.InspectStatus = "1"; //1合格 |
| | | foreach (var b1 in box) |
| | | { |
| | | b1.InspectMark = "1"; //1合格 |
| | | b1.InspectStatus = "1"; //1合格 |
| | | } |
| | | } |
| | | else //不合格 |
| | |
| | | item.InspectStatus = "2"; //2不合格 |
| | | foreach (var b1 in box) |
| | | { |
| | | b1.InspectMark = "2"; //2不合格 |
| | | b1.InspectStatus = "2"; //2不合格 |
| | | } |
| | | } |
| | | Db.Updateable(box).ExecuteCommand(); |
| | |
| | | { |
| | | var total = 0; |
| | | var detailInfo = Db.Queryable<BllCompleteDetail>().Where(w => w.ExportAllotId == id).ToList(); |
| | | var num = detailInfo.Count(w=> string.IsNullOrEmpty(w.BoxNo) && !string.IsNullOrEmpty(w.BoxNo3)); |
| | | var num = detailInfo.Count(w=> string.IsNullOrEmpty(w.BoxNo) && string.IsNullOrEmpty(w.BoxNo3)); |
| | | if (detailInfo.Count>0 && num == 0) //箱码和支码都为空的数量等与0 证明是箱码拣货 |
| | | { |
| | | Expression<Func<BllCompleteDetail, bool>> item = Expressionable.Create<BllCompleteDetail>() |
| | |
| | | .AndIF(!string.IsNullOrWhiteSpace(inspectStatus), it => inspectStatus.Contains(it.InspectStatus)) |
| | | .And(m => skuList.Contains(m.SkuNo)) |
| | | .AndIF(type == "6", m => m.OwnerNo == ownerNo)//代储出库需要关联货主 |
| | | .AndIF(type == "2", 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")) |
| | |
| | | [ |
| | | { |
| | | "OrderCode": "", //明细生产单据号 |
| | | "BoxNo": "B2408190001000005", //箱号 |
| | | "BoxNo": "B2408190001000001", //箱号 |
| | | "BoxNo2": "", //盒号 |
| | | "BoxNo3": "Z24081900010009", //支号 |
| | | "BoxNo3": "Z24081900010001", //支号 |
| | | "Qty": 1, //数量 |
| | | "FullQty": 2, //满箱数量 |
| | | "SkuNo": "00001", //物料编码 |
| | | "SkuName": "测试物料1", //物料名称 |
| | | "LotNo": "CPPC240818001", //批次 |
| | | "LotText": "", //批次描述 |
| | | "SupplierLot":"GH240818001", |
| | | "ProductionTime": "2024-08-19T02:16:45.301Z", //生产日期 |
| | | "ExpirationTime": "2025-08-19T02:16:45.301Z", //过期日期 |
| | | "InspectMark": "0", //检验/抽检 标记 0否 1是 |
| | |
| | | }, |
| | | { |
| | | "OrderCode": "", //明细生产单据号 |
| | | "BoxNo": "B2408190001000005", //箱号 |
| | | "BoxNo": "B2408190001000001", //箱号 |
| | | "BoxNo2": "", //盒号 |
| | | "BoxNo3": "Z24081900010010", //支号 |
| | | "BoxNo3": "Z24081900010002", //支号 |
| | | "Qty": 1, //数量 |
| | | "FullQty": 2, //满箱数量 |
| | | "SkuNo": "00001", //物料编码 |
| | | "SkuName": "测试物料1", //物料名称 |
| | | "LotNo": "CPPC240818001", //批次 |
| | | "LotText": "", //批次描述 |
| | | "SupplierLot":"GH240818001", |
| | | "ProductionTime": "2024-08-19T02:16:45.301Z", //生产日期 |
| | | "ExpirationTime": "2025-08-19T02:16:45.301Z", //过期日期 |
| | | "InspectMark": "0", //检验/抽检 标记 0否 1是 |