| | |
| | | { 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: '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: '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: 'caozuo', title: '操作', fixed: 'right', width: 170, align: 'center', templet: '#table-content-list', "disabled": true } |
| | | ]]; |
| | | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | |
| | | } |
| | | }) |
| | | |
| | | // var IsBaleValue = ""; |
| | | // form.on('switch(IsBaleDemo)', function (obj) { |
| | | // layer.tips(this.value + ' ' + this.name + ':' + obj.elem.checked, obj.othis); |
| | | // if (obj.elem.checked) { |
| | | // IsBaleValue = "1"; |
| | | // } else { |
| | | // IsBaleValue = "0"; |
| | | // } |
| | | // }); |
| | | |
| | | // table.on('row(LAY-app-content-list)', function (obj) { |
| | | // if (IsBaleValue != "") { |
| | | // for (var j in arr) { |
| | | // if (obj.data.SkuNo == arr[j].SkuNo) { |
| | | // arr[j].IsBale = IsBaleValue; |
| | | // IsBaleValue = "" |
| | | // break; |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // }) |
| | | |
| | | // 删除入库单明细 |
| | | table.on('tool(LAY-app-content-list)', function (obj) { |
| | | if (obj.event == 'del') { |
| | |
| | | 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, |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>选择物料信息</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <meta name="viewport" |
| | | content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> |
| | | </head> |
| | | |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">关键字</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="Msg" name="Msg" placeholder="编码/名称/规格" autocomplete="off" class="layui-input"> |
| | | <input type="text" id="Msg" name="Msg" placeholder="编码/名称/规格" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">单据类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="Type" id="Type" lay-filter="Type" disabled="disabled" |
| | | lay-search> |
| | | <select name="Type" id="Type" lay-filter="Type" disabled="disabled" lay-search> |
| | | <option value="0">成品入库</option> |
| | | <option value="1">采购入库</option> |
| | | <option value="2">中间品入库</option> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="LAY-app-contlist-search"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit |
| | | lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" data-type="setParent">确定</button> |
| | |
| | | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | |
| | | if (r != null) |
| | | { |
| | | if (r != null) { |
| | | // $("#Type").empty(); |
| | | // if (unescape(r[2]) == 0) |
| | | // { |
| | |
| | | setParent: function(){ |
| | | var checkStatus = table.checkStatus('goods-list'); |
| | | var id = '#LAY-app-content-list',goods = $('#goods-list'); |
| | | if(checkStatus.data.length == 0) |
| | | { |
| | | if (checkStatus.data.length == 0) { |
| | | parent.layer.msg('请选择待入库的物料!'); |
| | | return true; |
| | | } |
| | |
| | | default : return ""; |
| | | } |
| | | } |
| | | }, { |
| | | }, |
| | | |
| | | { |
| | | field: 'IsControlled', |
| | | title: '是否标准', |
| | | // JC08 title: '是否受控', |
| | |
| | | default : return ""; |
| | | } |
| | | }, |
| | | // JC08 |
| | | // templet: function (d) { |
| | | // switch (d.IsBale) { |
| | | // case "0" : return "受控"; |
| | | // case "1" : return "非受控"; |
| | | // default : return ""; |
| | | // } |
| | | // } |
| | | },{ |
| | | field: 'IsInspect', |
| | | title: '是否免检', |
| | |
| | | } |
| | | }, |
| | | }, { |
| | | field: 'Weight', |
| | | title: '理论重量', |
| | | width: 100 |
| | | },{ |
| | | field: 'Price', |
| | | title: '理论单价', |
| | | width: 100 |
| | | }, { |
| | | field: 'Warranty', |
| | | title: '保质期(天)', |
| | | width: 100 |
| | | },{ |
| | | field: 'GoodsRemark', |
| | | title: '备注', |
| | | width: 160 |
| | |
| | | }); |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>物料编码信息列表</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <meta name="viewport" |
| | | content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> |
| | | <script> |
| | |
| | | }); |
| | | </script> |
| | | </head> |
| | | |
| | | <body id="body"> |
| | | <div class="layui-fluid" style="padding-bottom: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC" id="top"> |
| | | <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC" |
| | | id="top"> |
| | | <div class="layui-form-item"> |
| | | <!-- 物料编码 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">物料编码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="SkuNo" name="SkuNo" placeholder="请输入物料编码" autocomplete="off" class="layui-input"> |
| | | <input type="text" id="SkuNo" name="SkuNo" placeholder="请输入物料编码" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <!-- 物料名称 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">物料名称</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" id="SkuName" name="SkuName" placeholder="请输入物料名称" autocomplete="off" class="layui-input"> |
| | | <input type="text" id="SkuName" name="SkuName" placeholder="请输入物料名称" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <div class="layui-inline"> |
| | | <!-- 物料类别 --> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">物料类别</label> |
| | | <label class="layui-form-label" style="width: 60px;">区域类别</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="CategoryNo" id="CategoryNo" lay-verify=""> |
| | | <option value=""></option> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="LAY-app-contlist-search"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit |
| | | lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list approvalBtn" style="margin-right: 10px;" data-type="add" id="approvalBtn"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list approvalBtn" |
| | | style="margin-right: 10px;" data-type="add" id="approvalBtn"> |
| | | <i class="layui-icon layuiadmin-button-btn"></i>添加 |
| | | </button> |
| | | </div> |
| | |
| | | if (res.code == 0) //成功 |
| | | { |
| | | for (var k = 0; k < res.data.length; k++) { |
| | | if (res.data[k].MenuName == "添加物料") |
| | | { |
| | | if (res.data[k].MenuName == "添加物料") { |
| | | $(function() { |
| | | $("#approvalBtn").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "删除物料") |
| | | { |
| | | if (res.data[k].MenuName == "删除物料") { |
| | | $(function() { |
| | | $(".approvalBtndel").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "编辑物料") |
| | | { |
| | | if (res.data[k].MenuName == "编辑物料") { |
| | | $(function() { |
| | | $(".approvalBtnupt").show(); |
| | | }); |
| | |
| | | LowInventory: Number(field.LowInventory), //低库存 |
| | | Demo: field.Demo |
| | | }; |
| | | if(doing) |
| | | { |
| | | if (doing) { |
| | | doing = false; |
| | | sendData(IP + "/Basis/AddMate", param, 'post',function(res) { |
| | | console.log(res); |
| | |
| | | } |
| | | var xml = ''; |
| | | function getchiled(data, mainId) { |
| | | if (data) |
| | | { |
| | | if (data) { |
| | | var list = data.filter(item => item.ParentId == mainId); |
| | | if (list) |
| | | { |
| | | for (var i = 0; i < list.length; i++) |
| | | { |
| | | if (list) { |
| | | for (var i = 0; i < list.length; i++) { |
| | | var id = list[i].Id; |
| | | //查询有无子菜单 |
| | | var count = data.filter(item => item.ParentId == id).length; |
| | | if (count > 0) |
| | | { |
| | | if (count > 0) { |
| | | xml = xml + '<dd>' + '<a href="javascript:;">' + list[i].Name + '</a>' + '<dl class="layui-nav-child">'; |
| | | getchiled(data, id); |
| | | xml = xml + '</dl></dd>'; |
| | | } |
| | | else |
| | | { |
| | | else { |
| | | xml = xml + '<dd>' + '<a lay-href="' + list[i].Url + '">' + list[i].Name + '</a>' + '</dd>'; |
| | | } |
| | | } |
| | |
| | | table.on('tool(LAY-app-content-list)', function(obj) { |
| | | var data = obj.data; |
| | | //删除 |
| | | if (obj.event === 'del') |
| | | { |
| | | if (obj.event === 'del') { |
| | | layer.confirm('确定删除选中的物料?', function(index) { |
| | | cusid = data.Id; |
| | | var arr = []; |
| | |
| | | var param = { |
| | | Ids: arr |
| | | }; |
| | | if(doing) |
| | | { |
| | | if (doing) { |
| | | doing = false; |
| | | sendData(IP + "/Basis/DelMate?Id="+data.Id+"", {} , 'get', function(res) { |
| | | console.log(res); |
| | |
| | | } |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | else { |
| | | console.log(123); |
| | | } |
| | | }); |
| | | } |
| | | //编辑 |
| | | else if (obj.event === 'edit') |
| | | { |
| | | else if (obj.event === 'edit') { |
| | | cusId = data.Id; |
| | | layer.open({ |
| | | type: 2, |
| | |
| | | LowInventory: Number(field.LowInventory), //低库存 |
| | | Demo: field.Demo |
| | | }; |
| | | if(doing) |
| | | { |
| | | if (doing) { |
| | | doing = false; |
| | | sendData(IP + "/Basis/ExitMate", param, 'post', |
| | | function(res) { |
| | |
| | | } |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | else { |
| | | console.log(123); |
| | | } |
| | | }); |
| | |
| | | }); |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="layui-inline"> |
| | | <!-- 类型 --> |
| | | <label class="layui-form-label" style="width: 60px;">物料类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="Type" id="Type" lay-verify="" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">原料</option> |
| | | <option value="1">包材</option> |
| | | <option value="2">成品</option> |
| | | <option value="3">耗材</option> |
| | | <option value="4">中间品</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline mingxi"> |
| | | <label class="layui-form-label" style="width: 60px;">货主编码</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="OwnerNo" name="OwnerNo" placeholder="货主编码" autocomplete="off" |
| | |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | | <label class="layui-form-label" style="width: 60px;">进厂编号</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="进厂编号" autocomplete="off" |
| | | class="layui-input"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">所属仓库</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="WareHouseNo" id="WareHouseNo" lay-filter="getWareHouseNo" lay-search> |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">所属区域</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="AreaNo" id="AreaNo" lay-filter="getAreaNo" lay-search> |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">质检状态</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="InspectStatus" id="InspectStatus" lay-filter="InspectStatus" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">待质检</option><!-- 待检验 --> |
| | | <option value="1">检验合格</option><!-- 合格品 --> |
| | | <option value="2">不合格</option><!-- 不合格 --> |
| | | <option value="3">放置期</option><!-- 不合格 --> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline "> |
| | | <label class="layui-form-label" style="width: 60px;">库存状态</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline " style="display: none;"> |
| | | <label class="layui-form-label" style="width: 60px;">抽检托</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="IsSamolingTray" id="IsSamolingTray" lay-filter="IsSamolingTray" |
| | | lay-search> |
| | | <option value=""></option> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | </select> |
| | | </div> |
| | | </div> --> |
| | | <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">质检状态</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="InspectStatus" id="InspectStatus" lay-filter="InspectStatus" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">待质检</option><!-- 待检验 --> |
| | | <option value="1">检验合格</option><!-- 合格品 --> |
| | | <option value="2">不合格</option><!-- 不合格 --> |
| | | <option value="3">放置期</option><!-- 不合格 --> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">开始时间</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" autocomplete="off" id="StartTime" class="layui-input" |
| | | placeholder="开始时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">结束时间</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" autocomplete="off" id="EndTime" class="layui-input" |
| | | placeholder="结束时间"> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <div class="layui-inline sousuo"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit |
| | | lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="daochu"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>导出 |
| | | <i class="layui-icon layui-icon-edit layuiadmin-button-btn"></i>导出 |
| | | </button> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <table id="LAY-app-content-list2" lay-filter="LAY-app-content-list2"></table> |
| | | <!-- #region 自定义表头 --> |
| | | <div class="headerSetIcon"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols2"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" |
| | | data-type="customCols2"> |
| | | <i class="layui-icon"></i> |
| | | </button> |
| | | </div> |
| | |
| | | <button class="layui-btn layui-btn-radius layui-btn-xs">正常</button> |
| | | {{# } else { }} |
| | | <button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">异常</button> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="SkuType"> |
| | | {{# if(d.Type=='0'){ }} |
| | | <p>原料</p> |
| | | {{# } else if(d.Type=='1') { }} |
| | | <p>包材</p> |
| | | {{# } else if(d.Type=='2') { }} |
| | | <p>成品</p> |
| | | {{# } else if(d.Type=='3') { }} |
| | | <p>耗材</p> |
| | | {{# } else if(d.Type=='4') { }} |
| | | <p>中间品</p> |
| | | {{# } }} |
| | | </script> |
| | | </div> |
| | |
| | | |
| | | // 表单需要的变量 |
| | | var infoOptions; |
| | | //#region 原始非自定义列 |
| | | //infoOptions = { |
| | | // elem: '#LAY-app-content-list', |
| | | // height: 'full-206', |
| | | // id: 'LAY-app-content-list', |
| | | // totalRow: true |
| | | // page: true, |
| | | // limit: pageCnt, |
| | | // limits: pageLimits, |
| | | // even: true, |
| | | // cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // cols: |
| | | // [[ |
| | | // { |
| | | // title: '序号', |
| | | // type: 'numbers', |
| | | // fixed: 'left' |
| | | // }, |
| | | // { |
| | | // field: 'SkuNo', |
| | | // title: '物料编码', |
| | | // align: 'center', |
| | | // totalRowText: "合计:", |
| | | // }, { |
| | | // field: 'SkuName', |
| | | // title: '物料名称', |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'Standard', |
| | | // title: '物料规格', |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'Qty', |
| | | // title: '库存数量', |
| | | // align: 'center', |
| | | // totalRow: true, |
| | | // }, { |
| | | // field: 'LockQty', |
| | | // title: '锁定数量', |
| | | // align: 'center', |
| | | // totalRow: true, |
| | | // }, { |
| | | // field: 'FrozenQty', |
| | | // title: '冻结数量', |
| | | // align: 'center', |
| | | // totalRow: true, |
| | | // } |
| | | // ]] |
| | | //}; |
| | | //#endregion |
| | | |
| | | //#region 自定义表头 |
| | | var TotalColsArr = [[ |
| | |
| | | |
| | | // 表单需要的变量 |
| | | var infoOptions2; |
| | | //#region 原始非自定义列 |
| | | //infoOptions2 = { |
| | | // elem: '#LAY-app-content-list2', |
| | | // height: 'full-206', |
| | | // id: 'LAY-app-content-list2', |
| | | // page: true, |
| | | // limit: pageCnt, |
| | | // limits: pageLimits, |
| | | // even: true, |
| | | // cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // cols: |
| | | // [[ |
| | | // { |
| | | // field: 'PalletNo', |
| | | // title: '托盘号', |
| | | // align: 'center', |
| | | // width: 110, |
| | | // }, { |
| | | // field: 'LocatNo', |
| | | // title: '储位地址', |
| | | // align: 'center', |
| | | // width: 100, |
| | | // }, { |
| | | // field: 'RoadwayName', |
| | | // title: '所属巷道', |
| | | // width: 90, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'WareHouseName', |
| | | // title: '所属仓库', |
| | | // width: 90, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'SkuNo', |
| | | // title: '物料编码', |
| | | // width: 100, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'SkuName', |
| | | // title: '物料名称', |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'Standard', |
| | | // title: '物料规格', |
| | | // width: 130, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'LotNo', |
| | | // title: '进厂编号', |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'Qty', |
| | | // title: '库存数量', |
| | | // width: 110, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'LockQty', |
| | | // title: '锁定数量', |
| | | // width: 110, |
| | | // align: 'center', |
| | | // }, |
| | | // { |
| | | // field: 'Status', |
| | | // templet: '#buttonTpl', |
| | | // title: '库存状态', |
| | | // width: 90, |
| | | // align: 'center', |
| | | // }, { |
| | | // field: 'InspectStatus', |
| | | // templet: '#buttonTp2', |
| | | // title: '质检状态', |
| | | // width: 90, |
| | | // align: 'center', |
| | | // }, |
| | | // { |
| | | // field: 'CompleteTime', |
| | | // title: '入库时间', |
| | | // align: 'center', |
| | | // width: 150, |
| | | // templet: function (d) { |
| | | // return formatDate(d.CompleteTime); |
| | | // }, |
| | | // }, |
| | | // ]] |
| | | //}; |
| | | //#endregion |
| | | |
| | | //获取明细信息 |
| | | //#region 自定义表头 |
| | |
| | | {field: 'SkuNo',title: '物料编码',width: 100,align: 'center'}, |
| | | {field: 'SkuName',title: '物料名称',align: 'center'}, |
| | | {field: 'Standard',title: '物料规格',width: 130,align: 'center'}, |
| | | { field: 'Type', title: '物料类型', width: 130, align: 'center', templet: '#SkuType' }, |
| | | {field: 'LotNo',title: '进厂编号',align: 'center'}, |
| | | {field: 'OwnerNo',title: '货主编码',align: 'center'}, |
| | | {field: 'OwnerName',title: '货主名称',align: 'center'}, |
| | |
| | | ]]; |
| | | var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | | function refreshTable2(SkuNo,SkuName,OwnerNo,OwnerName,LotNo,LocatNo,PalletNo,Status,InspectStatus) { |
| | | function refreshTable2(SkuNo, SkuName, OwnerNo, OwnerName, LotNo, LocatNo, PalletNo, Status, InspectStatus, HouseNo, AreaNo, Type) { |
| | | //#region 自定义表头 |
| | | var colsJson2 |
| | | var param1={ |
| | |
| | | LocatNo:LocatNo,//储位地址 |
| | | PalletNo:PalletNo, //托盘号 |
| | | Status:Status,//库存状态 |
| | | InspectStatus:InspectStatus //质检状态 |
| | | InspectStatus: InspectStatus, //质检状态 |
| | | HouseNo: HouseNo, |
| | | AreaNo: AreaNo, // 所属区域 |
| | | Type: Type, |
| | | }; |
| | | sendData(IP + "/Statistical/GetInventoryList1", param, 'get', function (res) { |
| | | if (res.code == 0) //成功 |
| | |
| | | //#endregion |
| | | } |
| | | |
| | | //var url = IP + "/Statistical/GetInventoryList1"; |
| | | |
| | | //接受全局变量 |
| | | let quanSkuNo = ''; |
| | | let quanLotNo=''; |
| | |
| | | var OwnerName = $("#OwnerName").val(); |
| | | var Status = $("#Status").val(); |
| | | var InspectStatus = $("#InspectStatus").val(); |
| | | var HouseNo = $("#WareHouseNo").val(); // 所属仓库 |
| | | var AreaNo = $("#AreaNo").val(); // 所属区域 |
| | | var Type = $("#Type").val(); // 物料类型 |
| | | |
| | | if (yemianid == 0) { |
| | | console.log("总单"); |
| | | refreshTable(SkuNo, SkuName,OwnerNo,OwnerName,LotNo); |
| | |
| | | quanSkuNo = ''; |
| | | quanLotNo=''; |
| | | console.log("明细"); |
| | | refreshTable2(SkuNo,SkuName,OwnerNo,OwnerName,LotNo,LocatNo,PalletNo,Status,InspectStatus); |
| | | console.log(HouseNo); |
| | | refreshTable2(SkuNo, SkuName, OwnerNo, OwnerName, LotNo, LocatNo, PalletNo, Status, InspectStatus, HouseNo, AreaNo, Type); |
| | | } |
| | | |
| | | }); |
| | |
| | | var OwnerName = $("#OwnerName").val(); |
| | | var Status = $("#Status").val(); |
| | | var InspectStatus = $("#InspectStatus").val(); |
| | | var HouseNo = $("#WareHouseNo").val(); // 所属仓库 |
| | | var AreaNo = $("#AreaNo").val(); // 所属区域 |
| | | var Type = $("#Type").val(); // 物料类型 |
| | | console.log(data.index); |
| | | yemianid = data.index |
| | | if (yemianid == 0) { |
| | |
| | | refreshTable(SkuNo, SkuName,OwnerNo,OwnerName,LotNo); |
| | | } else if (yemianid == 1) { |
| | | console.log("明细"); |
| | | refreshTable2(SkuNo,SkuName,OwnerNo,OwnerName,LotNo,LocatNo,PalletNo,Status,InspectStatus); |
| | | refreshTable2(SkuNo, SkuName, OwnerNo, OwnerName, LotNo, LocatNo, PalletNo, Status, InspectStatus, HouseNo, AreaNo, Type); |
| | | } |
| | | }); |
| | | |
| | |
| | | |
| | | }); |
| | | //#region 自定义表头 |
| | | //自定义表头 |
| | | active = { |
| | | customCols: function(){ |
| | | layer.open({ |
| | |
| | | }); |
| | | //#endregion |
| | | |
| | | // 初始绑定所属仓库 |
| | | sendData(IP + "/Sys/GetWarehouseDic", {}, 'get', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#WareHouseNo").append('<option value =' + res.data[i].WareHouseNo + '>' + res.data[i].WareHouseNo + '-' + |
| | | res.data[i].WareHouseName + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | |
| | | getAR(""); |
| | | form.on('select(getWareHouseNo)', function (data) { |
| | | console.log(data); |
| | | getAR(data.value); |
| | | }); |
| | | function getAR(val) { |
| | | //获取 巷道下拉框 |
| | | sendData(IP + "/Sys/GetStorageRoadwayByHouseNo?wareHouseNo=" + val, {}, 'get', function (res) { |
| | | $("#RoadwayNo").empty(); |
| | | $("#RoadwayNo").append('<option value =""></option>'); |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#RoadwayNo").append('<option value =' + res.data[i].RoadwayNo + '>' + res.data[i].RoadwayNo + '-' + |
| | | res.data[i].RoadwayName + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | layer.msg('获取巷道信息失败', { |
| | | icon: 2, |
| | | time: 2000 |
| | | }, function () { |
| | | form.render('select'); |
| | | }); |
| | | } |
| | | }); |
| | | //获取 区域下拉框 |
| | | sendData(IP + "/Sys/GetStorageAreaByHouseNo?wareHouseNo=" + val, {}, 'get', function (res) { |
| | | $("#AreaNo").empty(); |
| | | $("#AreaNo").append('<option value =""></option>'); |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#AreaNo").append('<option value =' + res.data[i].AreaNo + '>' + res.data[i].AreaNo + '-' + |
| | | res.data[i].AreaName + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | } else { |
| | | layer.msg('获取区域信息失败', { |
| | | icon: 2, |
| | | time: 2000 |
| | | }, function () { |
| | | |
| | | form.render('select'); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | }; |
| | | |
| | | }); |
| | | </script> |
| | | </body> |
| | |
| | | /// 储位深度 |
| | | /// </summary> |
| | | public int Dept { get; set; } |
| | | /// <summary> |
| | | /// 物料类型 |
| | | /// </summary> |
| | | public string Type { get; set; } |
| | | } |
| | | } |
| | |
| | | public int? CreateUser { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次属性1-生产日期 |
| | | /// </summary> |
| | | public string Lot1 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性2-过期日期 |
| | | /// </summary> |
| | | public string Lot2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 自定义列1 |
| | | /// </summary> |
| | | public string UDF1 { get; set; } |
| | |
| | | strMessage = "-1:原厂批号不可为空;"; |
| | | continue; |
| | | } |
| | | if (model.Type == "2") // 2:中间品入库 |
| | | { |
| | | if (string.IsNullOrWhiteSpace(detailModel.Lot1)) |
| | | { |
| | | throw new Exception("生产日期不可为空!"); |
| | | } |
| | | if (string.IsNullOrWhiteSpace(detailModel.Lot2)) |
| | | { |
| | | throw new Exception("过期日期不可为空!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | // 判断是否已存在当前明细 |
| | | string sqlCount = $"SELECT COUNT(ID) FROM BllArrivalNoticeDetail where ASNNo = '{model.ASNNo}' "; |
| | | sqlCount += $"and SkuNo ='{detailModel.SkuNo}' and LotNo = '{detailModel.LotNo}' and id != '{detailModel.Id}' and isdel = '0';"; |
| | |
| | | // 计算出总金额 |
| | | detailModel.Money = detailModel.Price * detailModel.Qty; |
| | | sqlDetailStr += "Insert into BllArrivalNoticeDetail (ASNNo,SkuNo,SkuName,Standard,"; |
| | | sqlDetailStr += "LotNo,LotText,Qty,PackagNo,Price,Money,IsBale,IsBelt,SupplierLot,Status,UDF1,UDF2,UDF3,UDF4,UDF5,CreateUser) values ( "; |
| | | sqlDetailStr += "LotNo,LotText,Qty,PackagNo,Price,Money,IsBale,IsBelt,SupplierLot,Status,Lot1,Lot2,UDF1,UDF2,UDF3,UDF4,UDF5,CreateUser) values ( "; |
| | | sqlDetailStr += $"'{model.ASNNo}','{detailModel.SkuNo}','{detailModel.SkuName}','{detailModel.Standard}', "; |
| | | sqlDetailStr += $"'{detailModel.LotNo}','{detailModel.LotText}','{detailModel.Qty}','{detailModel.PackagNo}','{detailModel.Price}', "; |
| | | sqlDetailStr += $"{detailModel.Money},'{detailModel.IsBale}','{detailModel.IsBelt}','{detailModel.SupplierLot}','0','{detailModel.UDF1}','{detailModel.UDF2}','{detailModel.UDF3}','{detailModel.UDF4}','{detailModel.UDF5}','{model.CreateUser}');"; |
| | | sqlDetailStr += $"'{detailModel.Money},'{detailModel.IsBale}','{detailModel.IsBelt}','{detailModel.SupplierLot}','0','{detailModel.Lot1}','{detailModel.Lot2}', "; |
| | | sqlDetailStr += $"'{detailModel.UDF1}','{detailModel.UDF2}','{detailModel.UDF3}','{detailModel.UDF4}','{detailModel.UDF5}','{model.CreateUser}');"; |
| | | |
| | | if (model.Type == "0")//成品入库单下发WCS信息 |
| | | { |
| | |
| | | strMessage = "-1:批次号不可为空;"; |
| | | continue; |
| | | } |
| | | |
| | | if (model.Type == "2") // 2:中间品入库 |
| | | { |
| | | if (string.IsNullOrWhiteSpace(detailModel.Lot1)) |
| | | { |
| | | throw new Exception("生产日期不可为空!"); |
| | | } |
| | | if (string.IsNullOrWhiteSpace(detailModel.Lot2)) |
| | | { |
| | | throw new Exception("过期日期不可为空!"); |
| | | } |
| | | } |
| | | |
| | | // 判断是否已存在当前明细 |
| | | string sqlCount = $"SELECT COUNT(ID) FROM BllArrivalNoticeDetail where ASNNo = '{model.ASNNo}' "; |
| | | sqlCount += $"and SkuNo ='{detailModel.SkuNo}' and LotNo = '{detailModel.LotNo}' and id != '{detailModel.Id}' and isdel = '0';"; |
| | |
| | | // 计算出总金额 |
| | | detailModel.Money = detailModel.Price * detailModel.Qty; |
| | | sqlDetailStr += "Insert into BllArrivalNoticeDetail (ASNNo,SkuNo,SkuName,Standard,"; |
| | | sqlDetailStr += "LotNo,LotText,Qty,PackagNo,Price,Money,IsBale,IsBelt,SupplierLot,Status,UDF1,UDF2,UDF3,UDF4,UDF5,CreateUser) values ( "; |
| | | sqlDetailStr += "LotNo,LotText,Qty,PackagNo,Price,Money,IsBale,IsBelt,SupplierLot,Status,Lot1,Lot2,UDF1,UDF2,UDF3,UDF4,UDF5,CreateUser) values ( "; |
| | | sqlDetailStr += $"'{model.ASNNo}','{detailModel.SkuNo}','{detailModel.SkuName}','{detailModel.Standard}', "; |
| | | sqlDetailStr += $"'{detailModel.LotNo}','{detailModel.LotText}','{detailModel.Qty}','{detailModel.PackagNo}','{detailModel.Price}', "; |
| | | sqlDetailStr += $"{detailModel.Money},'{detailModel.IsBale}','{detailModel.IsBelt}','{detailModel.SupplierLot}','0','{detailModel.UDF1}','{detailModel.UDF2}','{detailModel.UDF3}','{detailModel.UDF4}','{detailModel.UDF5}','{model.CreateUser}');"; |
| | | sqlDetailStr += $"'{detailModel.Money},'{detailModel.IsBale}','{detailModel.IsBelt}','{detailModel.SupplierLot}','0','{detailModel.Lot1}','{detailModel.Lot2}', "; |
| | | sqlDetailStr += $"'{detailModel.UDF1}','{detailModel.UDF2}','{detailModel.UDF3}','{detailModel.UDF4}','{detailModel.UDF5}','{model.CreateUser}');"; |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | && 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 |
| | |
| | | sqlDetailStr += $"Qty = '{detailModel.Qty}',LotNo = '{detailModel.LotNo}',Money='{detailModel.Money}', "; |
| | | sqlDetailStr += $"LotText = '{detailModel.LotText}',SupplierLot = '{detailModel.SupplierLot}', "; |
| | | sqlDetailStr += $"IsBale = '{detailModel.IsBale}',IsBelt = '{detailModel.IsBelt}', "; |
| | | sqlDetailStr += $" Lot1= '{detailModel.Lot1}',Lot2 = '{detailModel.Lot2}', "; |
| | | sqlDetailStr += $"UDF1 = '{detailModel.UDF1}',UDF2 = '{detailModel.UDF2}',UDF3 = '{detailModel.UDF3}',UDF4 = '{detailModel.UDF4}',UDF5 = '{detailModel.UDF5}',"; |
| | | sqlDetailStr += $"UpdateTime = GETDATE(),UpdateUser = '{model.CreateUser}' "; |
| | | sqlDetailStr += $"WHERE Id = {detailModel.Id};"; |
| | |
| | | using System.Text; |
| | | using Model.ModelDto; |
| | | using Model.ModelDto.DataDto; |
| | | using Model.ModelDto.SysDto; |
| | | using Model.ModelVm.DataVm; |
| | | using SqlSugar; |
| | | using WMS.DAL; |
| | |
| | | /// <param name="palletNo">托盘条码</param> |
| | | /// <param name="status">库存状态</param> |
| | | /// <param name="inspectStatus">质检状态</param> |
| | | /// <param name="houseNo">所属仓库</param> |
| | | /// <param name="areaNo">所属区域</param> |
| | | /// <param name="type">物料类型</param> |
| | | /// <param name="ownerNo">货主编号</param> |
| | | /// <param name="ownerName">货主名称</param> |
| | | /// <returns></returns> |
| | | public List<StockDetailDto> GetInventoryList1(string skuNo, string skuName, string lotNo, string locatNo, string palletNo, |
| | | string status, string inspectStatus, string ownerNo, string ownerName) |
| | | string status, string inspectStatus, string ownerNo, string ownerName, string houseNo, string areaNo, string type) |
| | | { |
| | | string str = "select detail.*,house.WareHouseNo + '-' + house.WareHouseName as WareHouseName," + |
| | | string str = "select detail.*,sku.Type,house.WareHouseNo + '-' + house.WareHouseName as WareHouseName," + |
| | | "roadway.RoadwayNo + '-' + roadway.RoadwayName as RoadwayName,area.AreaNo + '-' + area.AreaName as AreaName " + |
| | | "from DataStockDetail detail " + |
| | | "left join SysStorageRoadway roadway on detail.RoadwayNo = roadway.RoadwayNo " + |
| | | "left join SysWareHouse house on detail.WareHouseNo = house.WareHouseNo " + |
| | | "left join SysStorageArea area on detail.AreaNo = area.AreaNo " + |
| | | "left join SysMaterials as sku on detail.skuNo = sku.skuNo " + |
| | | "Where detail.IsDel = @isdel"; |
| | | //判断物料编码是否为空 |
| | | if (!string.IsNullOrEmpty(skuNo)) |
| | |
| | | { |
| | | str += " and detail.OwnerName like @ownerName"; |
| | | } |
| | | if (!string.IsNullOrEmpty(houseNo)) |
| | | { |
| | | str += " and house.WareHouseNo = @wareHouseNo"; |
| | | } |
| | | if (!string.IsNullOrEmpty(areaNo)) |
| | | { |
| | | str += " and area.AreaNo = @areaNo"; |
| | | } |
| | | if (!string.IsNullOrEmpty(type)) |
| | | { |
| | | str += " and sku.Type = @type"; |
| | | } |
| | | |
| | | //排序 |
| | | str += " order by detail.SkuNo,detail.PalletNo,detail.LotNo"; |
| | | List<StockDetailDto> stockDetailsList = Db.Ado.SqlQuery<StockDetailDto>(str, new |
| | |
| | | status = status, //库存状态 |
| | | inspectstatus = inspectStatus, //质检状态 |
| | | ownerNo = "%" + ownerNo + "%", //货主编码 |
| | | ownerName = "%" + ownerName + "%" //货主名称 |
| | | ownerName = "%" + ownerName + "%", //货主名称 |
| | | wareHouseNo = houseNo, |
| | | areaNo = areaNo, //所属区域 |
| | | type = type |
| | | }); |
| | | return stockDetailsList; |
| | | } |
| | |
| | | public DateTime? CompleteTime { get; set; } |
| | | |
| | | public string OrderDetailCode { get; set; } |
| | | /// <summary> |
| | | /// 批次属性1-生产日期 |
| | | /// </summary> |
| | | public string Lot1 { get; set; } |
| | | /// <summary> |
| | | /// 批次属性2-过期日期 |
| | | /// </summary> |
| | | public string Lot2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 自定义列1 |
| | |
| | | /// <param name="status">库存状态</param> |
| | | /// <param name="inspectStatus">质检状态</param> |
| | | /// <returns></returns> |
| | | List<StockDetailDto> GetInventoryList1(string skuNo, string skuName, string lotNo, string locatNo, string palletNo, string status, string inspectStatus, string ownerNo, string ownerName); |
| | | List<StockDetailDto> GetInventoryList1(string skuNo, string skuName, string lotNo, string locatNo, string palletNo, |
| | | string status, string inspectStatus, string ownerNo, string ownerName, string houseNo, string areaNo, string type); |
| | | |
| | | #endregion |
| | | |
| | |
| | | /// <param name="palletNo">托盘条码</param> |
| | | /// <param name="status">库存状态</param> |
| | | /// <param name="inspectStatus">质检状态</param> |
| | | /// <param name="HouseNo">所属仓库</param> |
| | | /// <param name="RoadwayNo">所属区域</param> |
| | | /// <param name="Type">物料类型</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult GetInventoryList1(string skuNo, string skuName, string lotNo, string locatNo, string palletNo, string status, string inspectStatus, string ownerNo, string ownerName) |
| | | public IActionResult GetInventoryList1(string skuNo, string skuName, string lotNo, string locatNo, string palletNo, |
| | | string status, string inspectStatus, string ownerNo, string ownerName,string HouseNo,string AreaNo, string Type) |
| | | { |
| | | List<StockDetailDto> stockDetailsList = _stock.GetInventoryList1(skuNo, skuName, lotNo, locatNo, palletNo, status, inspectStatus, ownerNo, ownerName); |
| | | List<StockDetailDto> stockDetailsList = _stock.GetInventoryList1(skuNo, skuName, lotNo, locatNo, palletNo, |
| | | status, inspectStatus, ownerNo, ownerName, HouseNo, AreaNo, Type); |
| | | return Ok(new |
| | | { |
| | | data = stockDetailsList, |