Merge branch 'master' into wxw
| | |
| | | layer.open({ |
| | | type: 2, |
| | | title: '生成标签', |
| | | content: 'LabelPrintSelect.html', |
| | | content: 'LabelPrintSelect.html?Id='+id, |
| | | maxmin: true, |
| | | area: ['480px', '615px'], |
| | | btn: ['确定','取消'], |
| | |
| | | <body> |
| | | <div style="width:100%;"> |
| | | <div class="layui-form hideCls" lay-filter="layuiadmin-app-form-list" id="print" style="width: 100%;height:100%;"> |
| | | <div style="display: flex;align-items: center;height: 260px;margin-left: 10px;"> |
| | | <div style="display: flex;align-items: center;justify-content: center; height: 260px;"> |
| | | <table border="1" id="table" style="width: 90%; height:240px; text-align: center;border-collapse: collapse;table-layout: fixed;"> |
| | | <tr> |
| | | <td colspan="2"> |
| | |
| | | //$("#button").show(); |
| | | $("#print2").addClass("hideCls"); |
| | | |
| | | $("#LabelStream").val(""); |
| | | $("#EndBoxCode").val(""); |
| | | $("#LabelStream2").val(""); |
| | | $("#EndBoxCode2").val(""); |
| | | // $("#LabelStream").val(""); |
| | | // $("#EndBoxCode").val(""); |
| | | // $("#LabelStream2").val(""); |
| | | // $("#EndBoxCode2").val(""); |
| | | |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | |
| | | synData(IP + "/BllAsn/AddLabelBox", param , 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | parent.location.reload(); |
| | |
| | | , format: 'yyyy-MM-dd' //可任意组合 |
| | | }); |
| | | |
| | | var id = getQueryString('Id'); |
| | | |
| | | var param = { |
| | | id: parseInt(id), |
| | | }; |
| | | |
| | | synData(IP + "/BllAsn/GetAsnDetailQtyList", param , 'get', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | $("#arriveQty").val(res.data); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | // form.on('select(levelFil)', function(data){ |
| | | // console.log($("#type").val()); |
| | | // var type = $("#type").val(); |
| | |
| | | // } |
| | | // }); |
| | | |
| | | // 获取传递参数 |
| | | function getQueryString(name) { |
| | | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r != null) return unescape(r[2]); |
| | | return null; |
| | | } |
| | | |
| | | }) |
| | | </script> |
| | |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | //获取入库单明细剩余打印数量 |
| | | public string GetAsnDetailQtyList(int id) |
| | | { |
| | | try |
| | | { |
| | | var detail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == id); |
| | | if (detail == null) |
| | | { |
| | | throw new Exception("未查询到入库单明细"); |
| | | } |
| | | |
| | | var labelQty = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.ASNDetailNo == id).Sum(m=>m.Qty); |
| | | var qty = detail.Qty-labelQty; |
| | | |
| | | return qty.ToString(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | | |
| | | //获取物料信息(添加入库单明细使用) |
| | | public List<MaterialsDto> GetMaterialsList(GetMaterialsVm model) |
| | | { |
| | |
| | | |
| | | #endregion |
| | | var modelList = new List<BllBoxInfo>(); |
| | | |
| | | var addLotNo = ""; |
| | | |
| | | if (packLevel == 1) |
| | | { |
| | | #region 一级包装 |
| | |
| | | } |
| | | } |
| | | |
| | | addLotNo = maxLotNoStr; |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | for (int i = 1; i <= labelNum; i++) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | addLotNo = maxCodestr2; |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | for (int i = 1; i <= labelNum2; i++)//箱码标签 |
| | | { |
| | |
| | | |
| | | #endregion |
| | | } |
| | | |
| | | if (string.IsNullOrWhiteSpace(asnList.LotNo)) |
| | | { |
| | | asnList.LotNo = addLotNo; |
| | | Db.Updateable(asnList).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | if (!asnList.LotNo.Contains(addLotNo)) |
| | | { |
| | | asnList.LotNo += ";" + addLotNo; |
| | | Db.Updateable(asnList).ExecuteCommand(); |
| | | } |
| | | } |
| | | |
| | | return modelList; |
| | | |
| | | |
| | |
| | | List<ArrivalNoticeDetailDto> GetArrivalNoticeDetailList(ArrivalNoticeDetailVm model, out int count); |
| | | |
| | | /// <summary> |
| | | /// 获取入库单明细剩余打印数量 |
| | | /// </summary> |
| | | /// <param name="id">id</param> |
| | | /// <returns></returns> |
| | | string GetAsnDetailQtyList(int id); |
| | | |
| | | /// <summary> |
| | | /// 获取物料信息(添加入库单明细使用) |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取入库单明细剩余打印数量 |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult GetAsnDetailQtyList(int id) |
| | | { |
| | | try |
| | | { |
| | | var models = _arrivalNoticeSvc.GetAsnDetailQtyList(id); |
| | | |
| | | return Ok(new { code = 0, msg = "入库单明细信息", data = models }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | [HttpPost] |
| | | public IActionResult GetMaterialsList(GetMaterialsVm model) |
| | | { |