| | |
| | | <i class="layui-icon layui-icon-add layuiadmin-button-btn"></i>添加 |
| | | </button> |
| | | </div> |
| | | <div class="layui-inline" id="divFinish" style="display: none; padding-top: 10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">账号</label> |
| | | <div class="layui-input-inline" style="width: 220px;"> |
| | | <input type="text" id="admin" name="admin" placeholder="账号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline DivLoadingArea" style="margin-top: 10px;"> |
| | | <label class="layui-form-label">密码</label> |
| | | <div class="layui-input-inline" style="width: 220px;"> |
| | | <input type="text" id="password" name="password" placeholder="密码" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div id="center"></div> |
| | |
| | | { |
| | | field: 'InspectNo',title: '检验号',align: 'center' |
| | | }, |
| | | { |
| | | field: 'Status',title: '状态',align: 'center',templet: '#IsStatus', |
| | | }, |
| | | |
| | | { |
| | | field: 'SkuNo',title: '物料编码',align: 'center' |
| | | }, |
| | |
| | | }); |
| | | }) |
| | | |
| | | |
| | | table.on('tool(LAY-app-content-list)', function (obj) { |
| | | var data = obj.data; |
| | | switch(obj.event) |
| | | { |
| | | case "edit" : |
| | | layer.open({ |
| | | type: 1, |
| | | title: '复核确认', |
| | | content: $('#divFinish'), |
| | | maxmin: true, |
| | | area: ['350px','215px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function(index, layero) { |
| | | var pa = $('#PickingArea').val(); |
| | | console.log(pa) |
| | | if (doing== true) { |
| | | doing= false; |
| | | |
| | | if($('#admin').val()==''){ |
| | | layer.msg("请输入账号", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | doing= true; |
| | | return; |
| | | } |
| | | if($("#password").val() == '') |
| | | { |
| | | layer.msg("请输入密码", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | doing= true; |
| | | return; |
| | | } |
| | | |
| | | var param = { |
| | | Id:data.Id, |
| | | UserNo:$('#admin').val(), |
| | | Password:$('#password').val(), |
| | | }; |
| | | console.log(param); |
| | | sendData(IP + "/BllQuality/InsertFuHe", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | refreshTable |
| | | ( |
| | | // $("#ASNNo").val(), |
| | | $("#LotNo").val(), |
| | | $("#SkuNo").val(), |
| | | $("#SkuName").val(), |
| | | $("#InsertQuality").val(), |
| | | ); |
| | | $('#admin').val(""); |
| | | $('#password').val(""); |
| | | doing = true |
| | | }); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | doing = true ; |
| | | $('#admin').val(""); |
| | | $('#password').val("") |
| | | }); |
| | | } |
| | | layer.close(index); |
| | | }); |
| | | |
| | | |
| | | }else{ |
| | | layer.msg("请勿重复点击", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | break; |
| | | |
| | | default:break; |
| | | } |
| | | }); |
| | | |
| | | |
| | | var element = layui.element; |
| | | var houseId = 0; |
| | | var param = { |
| | |
| | | <input type="text" name="SkuNo" placeholder="请输入物料号" lay-verify="required" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">审核状态</label> |
| | | <div class="layui-input-block" style="width: 70%;"> |
| | | <select name="IsQualified" id="IsQualified" lay-verify=""> |
| | |
| | | <option value="1" selected>合格</option> |
| | | </select> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <div class="layui-form-item layui-hide"> |
| | | <input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" id="layuiadmin-app-form-submit" value="确认添加"> |
| | | </div> |
| | |
| | | using Model.ModelDto.BllQualityDto; |
| | | using Model.ModelVm; |
| | | using SqlSugar; |
| | | using Utility.Tools; |
| | | using WMS.DAL; |
| | | using WMS.Entity.BllAsnEntity; |
| | | using WMS.Entity.BllQualityEntity; |
| | |
| | | return isquality; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 质检复核信息 |
| | | /// </summary> |
| | | /// <param name="model">质检信息实体模型</param> |
| | | /// <param name="id"></param> |
| | | /// <param name="userNo"></param> |
| | | /// <param name="password"></param> |
| | | /// <param name="userId"></param> |
| | | /// <returns></returns> |
| | | public int FinshQuality(int id,string type,int userId) |
| | | /// <exception cref="Exception"></exception> |
| | | public int FinshQuality(int id,string userNo, string password, int userId) |
| | | { |
| | | //验证质检号是否为空 |
| | | if (string.IsNullOrEmpty(type)) |
| | | var loginPwd = Md5Tools.CalcMd5(password); |
| | | var date = Db.Queryable<SysUserInfor>().First(m => m.IsDel == "0" && m.UserName == userNo && m.PassWord == loginPwd); |
| | | |
| | | if (date == null) //账号密码是否正确 |
| | | { |
| | | throw new Exception("状态不能为空!"); |
| | | throw new Exception("账号密码不正确或没有此账号"); |
| | | } |
| | | if (date.Status != "0") //当前账号是否正常启用 |
| | | { |
| | | throw new Exception("当前账号非启用状态"); |
| | | } |
| | | |
| | | var model = Db.Queryable<BllQualityInspect>().First(m=>m.IsDel == "0" && m.Id == id); |
| | | if (model == null) |
| | | { |
| | | throw new Exception("未查询到质检信息"); |
| | | } |
| | | if (date.Id == model.CreateUser) |
| | | { |
| | | throw new Exception("复核失败,复核人员和关闭订单人员不能相同!"); |
| | | } |
| | | int isTui = 0; |
| | | //验证入库单号是否为空 |
| | |
| | | |
| | | |
| | | |
| | | model.Status = type; //规格 |
| | | model.IsQualified = type; |
| | | model.Status = "1"; //规格 |
| | | model.UpdateTime = DateTime.Now; |
| | | model.UpdateUser = userId; |
| | | //model.SupplierLot = arrivalDetail.SupplierLot; //供货批次 |
| | | |
| | | //查找库存明细信息 |
| | |
| | | { |
| | | 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 (type == "1") |
| | | if (model.IsQualified == "1") |
| | | { |
| | | //合格 相同批次库存信息全部改为合格状态 且合格数量增加为同批次同单号该物料全部数量之和 |
| | | model.PassQty += item.Qty; |
| | |
| | | public string ASNNo {get;set;} |
| | | |
| | | /// <summary> |
| | | /// Desc:状态 0 等待审核 1 审核通过 2审核不通过 |
| | | /// Desc:状态 0 等待复核 1 复核完成 |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// 复核质检结果 |
| | | /// </summary> |
| | | /// <param name="id">ID</param> |
| | | /// <param name="type">类型 1 通过 2 不通过</param> |
| | | /// <param name="userId">操作人</param> |
| | | /// <param name="id"></param> |
| | | /// <param name="userNo"></param> |
| | | /// <param name="password"></param> |
| | | /// <param name="userId"></param> |
| | | /// <returns></returns> |
| | | int FinshQuality(int id, string type, int userId); |
| | | int FinshQuality(int id, string userNo, string password, int userId); |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using WMS.Entity.BllQualityEntity; |
| | | using WMS.IBLL.IBllQualityServer; |
| | | using Model.ModelVm; |
| | | |
| | | namespace Wms.Controllers |
| | | { |
| | |
| | | model.CreateUser = int.Parse(userId); |
| | | _qualityServer.InsertQuality(model); |
| | | |
| | | return Ok(new { code = 0, count = 0, msg = "物料质检信息操作成功", data = "" }); |
| | | return Ok(new { code = 0, count = 0, msg = "物料质检信息添加成功", data = "" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | /// <param name="model">质检信息实体模型</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult InsertFuHe(BllQualityInspect model) |
| | | public IActionResult InsertFuHe(FinshVm model) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | model.CreateUser = int.Parse(userId); |
| | | _qualityServer.InsertQuality(model); |
| | | _qualityServer.FinshQuality(model.Id,model.UserNo,model.Password, int.Parse(userId)); |
| | | |
| | | return Ok(new { code = 0, count = 0, msg = "物料质检信息操作成功", data = "" }); |
| | | } |