| | |
| | | <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"> |
| | | |
| | | <style type="text/css"> |
| | | .layui-input-block { |
| | | width: 200px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">源单单号</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNoFrom" id="HBillNoFrom"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">送货单号</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HInnerBillNo" id="HInnerBillNo"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产品名称</label> |
| | | <label class="layui-form-label">物料名称</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HName" id="HName"> |
| | | </div> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">开始日期</label> |
| | | <div class="layui-input-block"> |
| | |
| | | <input type="text" class="layui-input" name="HDate2" id="HDate2"> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label">状态</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HStatus" id="HStatus" lay-filter=""> |
| | | <option value="">全部</option> |
| | | <option value="未打印" selected="">未打印</option> |
| | | <option value="已打印">已打印</option> |
| | | </select> |
| | | </div> |
| | | </div>--> |
| | | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">采购组织</label> |
| | | <label class="layui-form-label">订货数量</label> |
| | | <div class="layui-input-block"> |
| | | <select id="HPURCHASEORGID" name="HPURCHASEORGID" lay-filter=""> |
| | | <option value="">组织1</option> |
| | | <option value="">组织2</option> |
| | | <input type="text" class="layui-input" name="HQty" id="HQty"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">变更状态</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HBGStatus" id="HBGStatus" lay-filter=""> |
| | | <option value="">全部</option> |
| | | <option value="未变更" selected="">未变更</option> |
| | | <option value="已变更">已变更</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | </button> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </form> |
| | | <!--</div>--> |
| | | </div> |
| | | |
| | | |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>详情</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-changebg"><i class="layui-icon layui-icon-form"></i>变更</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>打印送货单</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>生成条码</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>删除</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>生成条码</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button> |
| | | |
| | | </div> |
| | |
| | | break; |
| | | case "UnBarCode": |
| | | options[4].selected = true; |
| | | sql += " and 状态 like ^^%未生成条码%^^"; |
| | | sql += " and 条码打印状态 like ^^%未生成条码%^^"; |
| | | break; |
| | | } |
| | | //CreateReport("Report"); //打印 |
| | |
| | | , cellMinWidth: 100 |
| | | , cols: [[ |
| | | { checkbox: true/*, fixed: true*/ } |
| | | |
| | | , { field: 'sorderid', title: '序号', width: 80/*, fixed: true*/ } |
| | | , { field: 'hmainid', title: 'hmainid', sort: true/*, fixed: true*/, hide: true } |
| | | , { field: 'hsubid', title: 'hsubid', sort: true/*, fixed: true*/, hide: true } |
| | |
| | | , { field: '单据状态', title: '单据状态', sort: true/*, fixed: true*/ } |
| | | , { field: '单据号', title: '单据号', width: 150, sort: true/*, fixed: true*/ } |
| | | , { field: '送货单号', title: '送货单号', width: 150, sort: true/*, fixed: true*/ } |
| | | , { field: '物流单号', title: '物流单号', width: 150, sort: true/*, fixed: true*/ } |
| | | , { field: '物料编码', title: '物料编码', width: 120, sort: true } |
| | | , { field: 'F_xbkf_Combo', title: '自定义标识', width: 120 } |
| | | , { field: '源单单号', title: '源单单号', width: 180 } |
| | | , { field: '包装标识', title: '包装标识', width: 180 } |
| | | //, { field: '物流单号', title: '物流单号', width: 150, sort: true/*, fixed: true*/ } |
| | | //, { field: '物料编码', title: '物料编码', width: 120, sort: true } |
| | | , { field: '物料代码', title: '物料代码', width: 120, sort: true } |
| | | , { field: '物料名称', title: '物料名称', width: 120, sort: true } |
| | | , { field: '规格型号', title: '规格型号', width: 120, sort: true } |
| | |
| | | , { field: '金额', title: '金额', width: 100, sort: true, hide: true } |
| | | , { field: '日期', title: '日期', width: 150, sort: true } |
| | | , { field: '批次', title: '批次', width: 150, sort: true } |
| | | , { field: '生产日期', title: '生产日期', width: 150, sort: true } |
| | | , { field: '预计到货日期', title: '预计到货日期', width: 150, sort: true } |
| | | , { field: '生产日期', title: '生产日期', width: 150, sort: true, hide: true } |
| | | , { field: '预计到货日期', title: '预计到货日期', width: 150, sort: true, hide: true } |
| | | , { field: '源单主内码', title: '源单主ID', width: 100, hide: true } |
| | | , { field: '源单子内码', title: '源单子ID', width: 100, hide: true } |
| | | , { field: '源单单号', title: '源单单号', width: 180 } |
| | | , { field: '源单类型', title: '源单类型', width: 80 } |
| | | , { field: 'FSHDD', title: '送货地点', width: 120 } |
| | | , { field: '源单类型', title: '源单类型', width: 80, hide: true } |
| | | , { field: '采购订单号', title: '采购订单号', width: 180, sort: true, hide: true } |
| | | , { field: '委外订单号', title: '委外订单号', width: 180, sort: true, hide: true } |
| | | , { field: '变更状态', title: '变更状态', sort: true } |
| | | , { field: '收料组织', title: '收料组织', sort: true } |
| | | , { field: '采购组织', title: '采购组织', sort: true } |
| | | , { field: '需求组织', title: '需求组织', sort: true } |
| | | , { field: '收料组织', title: '收料组织', sort: true, hide: true } |
| | | , { field: '采购组织', title: '采购组织', sort: true, hide: true } |
| | | , { field: '需求组织', title: '需求组织', sort: true, hide: true } |
| | | ]] |
| | | , page: true //是否显示分页 |
| | | , limits: [10, 20, 50, 100] |
| | | , limits: [10, 20, 50, 100, 500, 1000, 5000, 10000] |
| | | , limit: 50 //每页默认显示的数量 |
| | | //, height: 500 |
| | | , done: function (res, curr, count) { |
| | |
| | | // var WEBURL = ""; //章紫柔本地配置 |
| | | //url: "http://localhost:8082/LuBaoAPI//AuditPOInStockBill", //方法所在页面和方法名 |
| | | url: GetWEBURL() + "/AuditPOInStockBill", |
| | | data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"], "HBillNo": "" }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.alert(result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("接口请求失败!", { icon: 5 }); |
| | |
| | | } |
| | | }) |
| | | break; |
| | | case 'btn-Delete': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //逻辑删除方法 |
| | | layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/DeltetPOInStockBill", //方法所在页面和方法名 |
| | | data: { "HInterID": InterID, "HUserName": sessionStorage["HUserName"], "HBillNo": data[0].单据号.toString() }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // 得到frame索引 |
| | | var index = layer.getFrameIndex(window.name); |
| | | //关闭当前frame |
| | | layer.close(index); |
| | | //修改为功后刷新界面 |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("接口请求失败!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('请选择一行数据删除!'); |
| | | } |
| | | break; |
| | | case 'btn-print': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | |
| | | function RoadHBillNo(sqlWhere) { |
| | | where = sqlWhere; |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "/GetPOInStockBill", |
| | | type: "post", |
| | | url: GetWEBURL() + "GetPOInStockBill", |
| | | async: true, |
| | | data: { "HSupNo": sessionStorage["HUserName"], "sqlWhere": sqlWhere }, |
| | | success: function (result) { |
| | |
| | | }); |
| | | }; |
| | | form.on('submit(f_Query)', function (data) {//查询 |
| | | var sqlWhere = " and 1=1 "; |
| | | var sqlWhere = ""; |
| | | if ($("#HStatus").val() != "") |
| | | if ($("#HStatus").val() == "未生成条码") { |
| | | sqlWhere += " and 未生成条码数量 > 0"; |
| | |
| | | else { |
| | | sqlWhere += " and 状态 like ^^%" + $("#HStatus").val() + "%^^"; |
| | | } |
| | | |
| | | if ($("#HBGStatus").val() != "") { |
| | | sqlWhere += " and 变更状态 like ^^%" + $("#HBGStatus").val() + "%^^"; |
| | | } |
| | | if ($("#HBillNo").val() != "") |
| | | sqlWhere += " and 单据号 like ^^%" + $("#HBillNo").val() + "%^^"; |
| | | if ($("#HBillNoFrom").val() != "") |
| | | sqlWhere += " and 源单单号 like ^^%" + $("#HBillNoFrom").val() + "%^^"; |
| | | if ($("#HInnerBillNo").val() != "") |
| | | sqlWhere += " and 送货单号 like ^^%" + $("#HInnerBillNo").val() + "%^^"; |
| | | //if ($("#HShortNumber").val() != "") |
| | | // sqlWhere += " and 物料编码 like ^^%" + $("#HShortNumber").val() + "%^^"; |
| | | if ($("#HNumber").val() != "") |
| | | sqlWhere += " and 物料代码 like ^^%" + $("#HNumber").val() + "%^^"; |
| | | if ($("#HName").val() != "") |
| | |
| | | sqlWhere += " and 规格型号 like ^^%" + $("#HModel").val() + "%^^"; |
| | | if ($("#HClStatus").val() != "") |
| | | sqlWhere += " and 单据状态 like ^^%" + $("#HClStatus").val() + "%^^"; |
| | | if ($("#HPURCHASEORGID").val() != "") |
| | | sqlWhere += " and 采购组织 like ^^%" + $("#HPURCHASEORGID").val() + "%^^"; |
| | | //if ($("#HPURCHASEORGID").val() != "") |
| | | // sqlWhere += " and 采购组织 like ^^%" + $("#HPURCHASEORGID").val() + "%^^"; |
| | | if ($("#HDate1").val() != "") { |
| | | sqlWhere += " and 日期 >= ^^" + $("#HDate1").val() + "^^"; |
| | | } |
| | | if ($("#HDate2").val() != "") { |
| | | sqlWhere += " and 日期 <= ^^" + $("#HDate2").val() + "^^"; |
| | | } |
| | | if ($("#HQty").val() != "") { |
| | | sqlWhere += " and 数量 = ^^" + $("#HQty").val() + "^^"; |
| | | } |
| | | |
| | | sql = sqlWhere; |
| | | //从第一页开始 |