| | |
| | | <label class="layui-form-label" style="width: 60px;">托盘号</label> |
| | | <div class="layui-input-inline" style="margin-right: 0;"> |
| | | <div class="layui-input-inline" style="margin-right: 0;"> |
| | | <input type="text" id="PalletNo" name="PalletNo" placeholder="托盘号" |
| | | autocomplete="off" class="layui-input"> |
| | | <input type="text" id="PalletNo" name="PalletNo" placeholder="托盘号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | { field: 'SkuName', title: '物料名称', align: 'center'}, |
| | | { field: 'LotNo', title: '批次号', align: 'center', width: 155}, |
| | | |
| | | { field: 'LocatName', title: '储位地址', align: 'center', width: 90 }, |
| | | { field: 'LocatNo', title: '储位地址', align: 'center', width: 90 }, |
| | | { field: 'RoadwayName', title: '所属巷道', align: 'center', width: 90 }, |
| | | { field: 'WareHouseName', title: '所属仓库', align: 'center', width: 90 }, |
| | | |
| | |
| | | } |
| | | else if (model.Type == "0")//物料托 |
| | | { |
| | | if (model.Detail.Count(m => m.OrderCode != detail.OrderDetailCode) > 0) |
| | | { |
| | | throw new Exception($"托盘绑定明细中,含有箱码生产工单不一致"); |
| | | } |
| | | // 使用场景不明确 |
| | | //if (model.Detail.Count(m => m.OrderCode != detail.OrderDetailCode) > 0) |
| | | //{ |
| | | // throw new Exception($"托盘绑定明细中,含有箱码生产工单不一致"); |
| | | //} |
| | | if (model.Detail.Count(m => m.SkuNo != model.SkuNo || m.LotNo != model.LotNo) > 0) |
| | | { |
| | | throw new Exception($"托盘绑定明细中,含有箱码物料或批次不一致"); |
| | |
| | | outDtoList.Add(locatEntry2); |
| | | |
| | | // 正式运行程序放开 |
| | | var jsonData = JsonConvert.SerializeObject(outDtoList); |
| | | string response = ""; |
| | | //var jsonData = JsonConvert.SerializeObject(outDtoList); |
| | | //string response = ""; |
| | | |
| | | try |
| | | { |
| | | response = HttpHelper.DoPost(url, jsonData, "下发给WCS同步储位信息", "WCS"); |
| | | //解析返回数据 |
| | | var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response); |
| | | if (wcsModel.StatusCode == -1) |
| | | { |
| | | throw new Exception(wcsModel.Msg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | //try |
| | | //{ |
| | | // response = HttpHelper.DoPost(url, jsonData, "下发给WCS同步储位信息", "WCS"); |
| | | // //解析返回数据 |
| | | // var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response); |
| | | // if (wcsModel.StatusCode == -1) |
| | | // { |
| | | // throw new Exception(wcsModel.Msg); |
| | | // } |
| | | //} |
| | | //catch (Exception ex) |
| | | //{ |
| | | // throw new Exception(ex.Message); |
| | | //} |
| | | } |
| | | |
| | | Db.CommitTran(); |
| | |
| | | if (i > 0) |
| | | { |
| | | // 正式运行程序放开 |
| | | var jsonData = JsonConvert.SerializeObject(outDtoList); |
| | | string response = ""; |
| | | //var jsonData = JsonConvert.SerializeObject(outDtoList); |
| | | //string response = ""; |
| | | |
| | | try |
| | | { |
| | | response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS"); |
| | | //解析返回数据 |
| | | var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response); |
| | | if (wcsModel.StatusCode == -1) |
| | | { |
| | | throw new Exception(wcsModel.Msg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | //try |
| | | //{ |
| | | // response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS"); |
| | | // //解析返回数据 |
| | | // var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response); |
| | | // if (wcsModel.StatusCode == -1) |
| | | // { |
| | | // throw new Exception(wcsModel.Msg); |
| | | // } |
| | | //} |
| | | //catch (Exception ex) |
| | | //{ |
| | | // throw new Exception(ex.Message); |
| | | //} |
| | | } |
| | | Db.CommitTran(); |
| | | return i > 0; |