| | |
| | | form.render('select'); |
| | | |
| | | var param = { |
| | | Type: "0,1,3" |
| | | Type: "0" |
| | | }; |
| | | sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#bar").append('<option value =' + res.data[i].ASNNo + '>' + res.data[i] |
| | | .ASNNo + |
| | | '</option>'); |
| | | $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | |
| | |
| | | form.render('select'); |
| | | |
| | | var param = { |
| | | Type: "1,2,3,4,5,6,7" |
| | | Type: "1" |
| | | }; |
| | | sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | console.log(res.data); |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#bar1").append('<option value =' + res.data[i].ASNNo + '>' + res.data[i] |
| | | .ASNNo + |
| | | '</option>'); |
| | | $("#bar1").append('<option value =' + res.data[i] + '>' + res.data[i] +'</option>'); |
| | | } |
| | | form.render('select'); |
| | | |
| | |
| | | } |
| | | |
| | | Expression<Func<SysMaterials, bool>> item = Expressionable.Create<SysMaterials>() |
| | | .AndIF(model.Type != "7", it => skuType.Contains(it.Type)) |
| | | .AndIF(model.Type != "7", it => skuType.Contains(it.Type) && it.SkuNo != "100088") |
| | | .AndIF(model.Type == "7", it => it.SkuNo == "100088") |
| | | .AndIF(IsPack == 1, it => it.PackagNo != "") |
| | | .AndIF(IsPack == 2, it => it.PackagNo == "") |
| | |
| | | private static readonly SqlSugarScope Db = DataContext.Db; |
| | | |
| | | // 获取单据列表 |
| | | public List<ArrivalNoticeDto> GetArrivalNotices(ArrivalNoticeVm model) |
| | | public List<string> GetArrivalNotices(ArrivalNoticeVm model) |
| | | { |
| | | string sqlString = string.Empty; |
| | | try |
| | | { |
| | | // 未关单的单据 |
| | | sqlString = $"select * from BllArrivalNotice where Type in ({model.Type}) and Status != '3' and Status != '4' and IsDel='0' order by CreateTime;"; |
| | | var modelList = Db.Ado.SqlQuery<ArrivalNoticeDto>(sqlString); |
| | | //sqlString = $"select * from BllArrivalNotice where Type in ({model.Type}) and Status != '3' and Status != '4' and IsDel='0' order by CreateTime;"; |
| | | //var modelList = Db.Ado.SqlQuery<ArrivalNoticeDto>(sqlString); |
| | | |
| | | return modelList; |
| | | //model.Type:单据类型 在这里代表前端页签类型:即标签页签:贴标物料; 数量页签:不贴表物料,原因:懒得加参数 |
| | | var data = Db.Queryable<BllArrivalNotice>().Where(m => m.IsDel == "0" && m.Status != "3" && m.Status != "4").Select(m=>m.ASNNo).ToList(); |
| | | var list = new List<string>(); |
| | | if (model.Type == "0")//0贴标 |
| | | { |
| | | list = Db.Queryable<BllArrivalNoticeDetail>().Where(m =>m.IsDel == "0" && data.Contains(m.ASNNo) && !string.IsNullOrWhiteSpace(m.PackagNo)).Select(m => m.ASNNo).Distinct().ToList(); |
| | | } |
| | | else if(model.Type == "1")//1不贴标 |
| | | { |
| | | list = Db.Queryable<BllArrivalNoticeDetail>().Where(m => m.IsDel == "0" && data.Contains(m.ASNNo) && string.IsNullOrWhiteSpace(m.PackagNo)).Select(m=>m.ASNNo).Distinct().ToList(); |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("页签类型参数错误"); |
| | | } |
| | | |
| | | |
| | | return list; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | public interface IPdaAsnServer |
| | | { |
| | | // 获取单据列表 |
| | | List<ArrivalNoticeDto> GetArrivalNotices(ArrivalNoticeVm model); |
| | | List<string> GetArrivalNotices(ArrivalNoticeVm model); |
| | | |
| | | // 根据单据号获取单据明细列表 |
| | | List<ArrivalNoticeDetailDto> GetArrivalNoticeDetails(ArrivalNoticeVm model); |