| | |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'form','table', 'laypage', 'layer', 'laydate'], function () { |
| | | }).use(['index', 'form', 'table', 'laypage', 'layer', 'laydate'], function () { |
| | | |
| | | var doing = true; |
| | | |
| | |
| | | // {field: 'Money',title: '金额',align: 'center',width: 65}, |
| | | { field: 'LotText', title: '批次描述', align: 'center', width: 120 }, |
| | | { field: 'PackagName', title: '包装名称', align: 'center', width: 110, }, |
| | | { field: 'IsBale', title: '是否裹包', align: 'center', width: 150 }, |
| | | { field: 'IsBelt', title: '是否打带', align: 'center', width: 150 }, |
| | | { field: 'UDF1', title: '自定义列1', align: 'center', width: 140 }, |
| | | { field: 'UDF2', title: '自定义列2', align: 'center', width: 140 }, |
| | | { field: 'UDF3', title: '自定义列3', align: 'center', width: 140 }, |
| | | { field: 'UDF4', title: '自定义列4', align: 'center', width: 140 }, |
| | | { field: 'UDF5', title: '自定义列5', align: 'center', width: 140, templet: '#templetUDF5' }, |
| | | { field: 'Lot1', title: '生产日期', align: 'center', width: 140 }, |
| | | { field: 'Lot2', title: '过期日期', align: 'center', width: 140 }, |
| | | // { field: 'IsBale', title: '是否裹包', align: 'center', width: 150 }, |
| | | // { field: 'IsBelt', title: '是否打带', align: 'center', width: 150 }, |
| | | // { field: 'UDF1', title: '自定义列1', align: 'center', width: 140 }, |
| | | // { field: 'UDF2', title: '自定义列2', align: 'center', width: 140 }, |
| | | // { field: 'UDF3', title: '自定义列3', align: 'center', width: 140 }, |
| | | // { field: 'UDF4', title: '自定义列4', align: 'center', width: 140 }, |
| | | // { field: 'UDF5', title: '自定义列5', align: 'center', width: 140, templet: '#templetUDF5' }, |
| | | { field: 'CreateUserName', title: '创建人', align: 'center', width: 100 }, |
| | | { field: 'CreateTime', title: '创建时间', align: 'center', width: 160, templet: '#templetCreateTime2' }, |
| | | { field: 'UpdateUserName', title: '修改人', align: 'center', width: 150, }, |
| | |
| | | { field: 'Standard', title: '规格', width: 160, align: 'center' }, |
| | | { field: 'LotText', title: '批次描述', align: 'center', edit: 'text', width: 160 }, |
| | | { field: 'PackagNo', title: '包装名称', width: 160, templet: "#table-content-Packlist" }, |
| | | { field: 'Lot1', title: '生产日期', align: 'center', edit: 'text', width: 140 }, |
| | | { field: 'Lot2', title: '过期日期', align: 'center', edit: 'text', width: 140 }, |
| | | |
| | | // { field: 'Price', title: '单价', align: 'center', width: 80 }, |
| | | // { field: 'Money', title: '金额', align: 'center', width: 100 }, |
| | | { field: 'UDF1', title: '自定义列1', align: 'center', edit: 'text', width: 140 }, |
| | | { field: 'UDF2', title: '自定义列2', align: 'center', edit: 'text', width: 140 }, |
| | | { field: 'UDF3', title: '自定义列3', align: 'center', edit: 'text', width: 140 }, |
| | | { field: 'UDF4', title: '自定义列4', align: 'center', edit: 'text', width: 140 }, |
| | | { field: 'UDF5', title: '自定义列5', align: 'center', width: 140, templet: '#templetUDF5' }, |
| | | // { field: 'UDF1', title: '自定义列1', align: 'center', edit: 'text', width: 140 }, |
| | | // { field: 'UDF2', title: '自定义列2', align: 'center', edit: 'text', width: 140 }, |
| | | // { field: 'UDF3', title: '自定义列3', align: 'center', edit: 'text', width: 140 }, |
| | | // { field: 'UDF4', title: '自定义列4', align: 'center', edit: 'text', width: 140 }, |
| | | // { field: 'UDF5', title: '自定义列5', align: 'center', width: 140, templet: '#templetUDF5' }, |
| | | { field: 'caozuo', title: '操作', fixed: 'right', width: 100, align: 'center', templet: '#table-content-list', "disabled": true } |
| | | ]]; |
| | | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | |
| | | IsBale: arr[i].IsBale, |
| | | IsBelt: arr[i].IsBelt, |
| | | SupplierLot: arr[i].SupplierLot, |
| | | Lot1: arr[i].Lot1, |
| | | Lot2: arr[i].Lot2, |
| | | UDF1: arr[i].UDF1, |
| | | UDF2: arr[i].UDF2, |
| | | UDF3: arr[i].UDF3, |
| | |
| | | </div> |
| | | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">客户名称</label> |
| | | <label class="layui-form-label">供应商</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="CustomerName" name="CustomerName" placeholder="客户名称" |
| | | <input type="text" id="CustomerName" name="CustomerName" placeholder="供应商" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | |
| | | { field: 'Status', title: '执行状态', align: 'center', templet: '#buttonTpl' }, |
| | | { field: 'CompleteTime', title: '完成时间', align: 'center', templet: '#templetCompleteTime' }, |
| | | { field: 'UserName', title: '制单人', align: 'center', width: 110 }, |
| | | { field: 'CreateUserName', title: '创建人', align: 'center', width: 110 }, |
| | | // { field: 'CreateUserName', title: '创建人', align: 'center', width: 110 }, |
| | | { field: 'CreateTime', title: '下发时间', align: 'center', templet: '#templetCreateTime' }, |
| | | { field: 'UpdateUserName', title: '修改人', align: 'center', width: 110 }, |
| | | { field: 'UpdateTime', title: '修改时间', align: 'center', templet: '#templetUpdateTime' }, |
| | | // { field: 'UpdateUserName', title: '修改人', align: 'center', width: 110 }, |
| | | // { field: 'UpdateTime', title: '修改时间', align: 'center', templet: '#templetUpdateTime' }, |
| | | //{ field: 'caozuo', title: '操作', fixed: 'right', width: 280, align: 'center', toolbar: '#toolbarDemo1', "disabled": true } |
| | | ]]; |
| | | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | |
| | | height: h1, |
| | | id: 'LAY-app-content-list', |
| | | where: param, |
| | | |
| | | |
| | | contentType: 'application/json', |
| | | headers: { ToKen: $.cookie('token') }, |
| | | page: true, |
| | |
| | | { field: 'OrderDetailCode', title: '采购单行号', align: 'center', width: 100 }, |
| | | { field: 'CustomerName', title: '供应商名称', align: 'center' }, |
| | | { field: 'SkuNo', title: '物料编码', align: 'center', width: 100 }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center', width: 200 }, |
| | | { field: 'Standard', title: '物料规格', align: 'center', width: 130 }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center' }, |
| | | { field: 'Standard', title: '物料规格', align: 'center' }, |
| | | { field: 'Qty', title: '数量', align: 'center', width: 70 }, |
| | | { field: 'CompleteQty', title: '完成数量', align: 'center', width: 90 }, |
| | | { field: 'CompleteTime', title: '完成时间', align: 'center', width: 160, templet: '#templetCompleteTime2' }, |
| | | //{ field: 'UnitName', title: '计量单位', align: 'center', width: 90 }, |
| | | //{ field: 'Price', title: '单价', align: 'center', width: 65 }, |
| | | //{ field: 'Money', title: '金额', align: 'center', width: 65 }, |
| | | { field: 'PackagName', title: '包装名称', align: 'center', width: 110, }, |
| | | { field: 'CreateUserName', title: '创建人', align: 'center', width: 100 }, |
| | | { field: 'CreateTime', title: '创建时间', align: 'center', width: 160, templet: '#templetCreateTime2' }, |
| | | { field: 'UpdateUserName', title: '修改人', align: 'center', width: 150, }, |
| | | { field: 'UpdateTime', title: '修改时间', align: 'center', width: 150, templet: '#templetUpdateTime3' }, |
| | | { field: 'PackagName', title: '包装名称', align: 'center' }, |
| | | // { field: 'CreateUserName', title: '创建人', align: 'center', width: 100 }, |
| | | // { field: 'CreateTime', title: '创建时间', align: 'center', width: 160, templet: '#templetCreateTime2' }, |
| | | // { field: 'UpdateUserName', title: '修改人', align: 'center', width: 150, }, |
| | | // { field: 'UpdateTime', title: '修改时间', align: 'center', width: 150, templet: '#templetUpdateTime3' }, |
| | | //{ field: 'caozuo', title: '操作', fixed: 'right', align: 'center', toolbar: '#toolbarDemoList', "disabled": true } |
| | | ]]; |
| | | var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码 |
| | |
| | | defaultToolbar: [], //'filter','print', 'exports' |
| | | headers: { ToKen: $.cookie('token') }, |
| | | page: true, |
| | | even: true, |
| | | limit: pageCnt, |
| | | limits: pageLimits, |
| | | cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | |
| | | public string AsnStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次属性1-生产日期 |
| | | /// </summary> |
| | | public string Lot1 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性2-过期日期 |
| | | /// </summary> |
| | | public string Lot2 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性3 |
| | | /// </summary> |
| | | public string Lot3 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性4 |
| | | /// </summary> |
| | | public string Lot4 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性5 |
| | | /// </summary> |
| | | public string Lot5 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性6 |
| | | /// </summary> |
| | | public string Lot6 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 自定义列1 |
| | | /// </summary> |
| | | public string UDF1 { get; set; } |
| | |
| | | public string CustomerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Desc:客户名称 |
| | | /// Desc:供应商名称 |
| | | /// Default: |
| | | /// Nullable:True |
| | | /// </summary> |
| | |
| | | public DateTime CreateTime { get; set; } |
| | | |
| | | public string CreateUserName { get; set; } |
| | | public string UserName { get; set; } |
| | | |
| | | public string UpdateTime { get; set; } |
| | | |
| | |
| | | public int? CreateUser { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次属性1-生产日期 |
| | | /// </summary> |
| | | public string Lot1 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性2-过期日期 |
| | | /// </summary> |
| | | public string Lot2 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性3 |
| | | /// </summary> |
| | | public string Lot3 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性4 |
| | | /// </summary> |
| | | public string Lot4 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性5 |
| | | /// </summary> |
| | | public string Lot5 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性6 |
| | | /// </summary> |
| | | public string Lot6 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 自定义列1 |
| | | /// </summary> |
| | | public string UDF1 { get; set; } |
| | |
| | | CompleteTime = tb1.CompleteTime, |
| | | CreateTime = tb1.CreateTime, |
| | | CreateUserName = tb3.RealName, |
| | | UserName=tb1.UserName, |
| | | UpdateTime = ((DateTime)tb1.UpdateTime).ToString("yyyy-MM-dd HH:mm:ss"), |
| | | UpdateUserName = tb4.RealName |
| | | |
| | |
| | | Status = tb1.Status, |
| | | AsnType = tb2.Type, |
| | | AsnStatus = tb2.Status, |
| | | Lot1 = tb1.Lot1, |
| | | Lot2 = tb1.Lot2, |
| | | UDF1 = tb1.UDF1, |
| | | UDF2 = tb1.UDF2, |
| | | UDF3 = tb1.UDF3, |
| | |
| | | } |
| | | } |
| | | |
| | | if (TypeLot.Contains(model.Type)) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(detailModel.Lot1)) |
| | | { |
| | | throw new Exception("生产日期不可为空!"); |
| | | } |
| | | if (string.IsNullOrWhiteSpace(detailModel.Lot2)) |
| | | { |
| | | throw new Exception("过期日期不可为空!"); |
| | | } |
| | | } |
| | | |
| | | // 判断是否已存在当前明细 |
| | | var com = dbDetailModels.Where(m => m.SkuNo == detailModel.SkuNo && m.LotNo == detailModel.LotNo && m.Id != detailModel.Id && m.IsDel == "0").Count(); |
| | | var com = dbDetailModels.Where(m => m.SkuNo == detailModel.SkuNo |
| | | && m.LotNo == detailModel.LotNo && m.Id != detailModel.Id && m.IsDel == "0").Count(); |
| | | if (com > 0) |
| | | { |
| | | strMessage = "-1:物料和批次号重复;"; |
| | |
| | | IsBelt = detailModel.IsBelt, |
| | | SupplierLot = detailModel.SupplierLot, |
| | | Status = "0", |
| | | Lot1 = detailModel.Lot1, |
| | | Lot2 = detailModel.Lot2, |
| | | UDF1 = detailModel.UDF1, |
| | | UDF2 = detailModel.UDF2, |
| | | UDF3 = detailModel.UDF3, |
| | |
| | | && it.SupplierLot == detailModel.SupplierLot |
| | | && it.IsBale == detailModel.IsBale |
| | | && it.IsBelt == detailModel.IsBelt |
| | | && it.Lot1 == detailModel.Lot1 // 生产日期 |
| | | && it.Lot2 == detailModel.Lot2 // 过期日期 |
| | | && it.UDF1 == detailModel.UDF1 |
| | | && it.UDF2 == detailModel.UDF2 |
| | | && it.UDF3 == detailModel.UDF3 |
| | |
| | | { |
| | | if (dbDetail.LotNo != detailModel.LotNo) |
| | | { |
| | | strMessage = "-1:当前单据类型不可更改批次,只可编辑数量;"; |
| | | strMessage = "-1:当前单据类型不可更改批次;"; |
| | | continue; |
| | | } |
| | | } |
| | |
| | | dbDetail.LotText = detailModel.LotText; |
| | | dbDetail.SupplierLot = detailModel.SupplierLot; |
| | | dbDetail.IsBale = detailModel.IsBale; |
| | | dbDetail.Lot1 = detailModel.Lot1; |
| | | dbDetail.Lot2 = detailModel.Lot2; |
| | | dbDetail.UDF1 = detailModel.UDF1; |
| | | dbDetail.UDF2 = detailModel.UDF2; |
| | | dbDetail.UDF3 = detailModel.UDF3; |
| | |
| | | asnModel.UpdateUser = model.CreateUser; |
| | | } |
| | | |
| | | asnDetail.IsDel = "0"; |
| | | asnDetail.IsDel = "1"; |
| | | asnDetail.UpdateTime = editDateTime; |
| | | asnDetail.UpdateUser = model.CreateUser; |
| | | |
| | |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.EndTime), tb1 => tb1.CreateTime <= Convert.ToDateTime(model.EndTime).AddDays(1)) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.SkuName), (tb1,tb2) => tb2.SkuName.Contains(model.SkuName)) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.SkuNo), (tb1,tb2) => tb2.SkuNo.Contains(model.SkuNo)) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.CustomerName), (tb1,tb2) => tb2.CustomerName.Contains(model.CustomerName)) |
| | | .Where(tb1 => tb1.IsDel == "0") |
| | | .OrderBy(tb1=>tb1.Status) |
| | | .OrderByDescending(tb1 => tb1.CreateTime) |
| | |
| | | .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id) |
| | | .LeftJoin<SysDepartment>((a, b, c) => a.DepartmentNo == c.DepartmentNo) |
| | | .LeftJoin<SysRoles>((a, b, c, d) => a.RoleNo == d.RoleNo) |
| | | .Where((a,b,c,d)=>d.IsDel == "0") |
| | | .WhereIF(!string.IsNullOrEmpty(UserName), a => a.UserName.Contains(UserName)) |
| | | .WhereIF(!string.IsNullOrEmpty(DepartmentNo), a => a.DepartmentNo == DepartmentNo) |
| | | .WhereIF(!string.IsNullOrEmpty(RoleNo), a => a.RoleNo == RoleNo) |
| | |
| | | /// <summary> |
| | | /// 修改用户密码 |
| | | /// </summary> |
| | | /// <param name="pwdOld">原密码</param> |
| | | /// <param name="pwdNew">新密码</param> |
| | | /// <param name="pwdNewTwo">确认密码</param> |
| | | /// <param name="userId">用户id</param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception">捕获异常</exception> |
| | |
| | | .Where(s => s.Id == userId) |
| | | .SetColumns(s => s.UpdateTime == DateTime.Now) |
| | | .SetColumns(s => s.UpdateUser == _userManager.UserId) |
| | | .SetColumns(s=>s.PassWord == pwdNew) |
| | | .SetColumns(s => s.SetPasswordTime == DateTime.Now) |
| | | .ExecuteCommandAsync(); |
| | | } |
| | |
| | | /// Nullable:True |
| | | /// </summary> |
| | | public string InspectStatus { get; set; } |
| | | /// <summary> |
| | | /// 批次属性1-生产日期 |
| | | /// </summary> |
| | | public string Lot1 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性2-过期日期 |
| | | /// </summary> |
| | | public string Lot2 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性3 |
| | | /// </summary> |
| | | public string Lot3 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性4 |
| | | /// </summary> |
| | | public string Lot4 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性5 |
| | | /// </summary> |
| | | public string Lot5 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性6 |
| | | /// </summary> |
| | | public string Lot6 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 自定义列1 |