| | |
| | | </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="HClStatus" name="HClStatus" lay-filter=""> |
| | | <option value="">全部</option> |
| | | <option value="审核">审核</option> |
| | | <option value="未关闭" selected="">未关闭</option> |
| | | <option value="已关闭">已关闭</option> |
| | | </select> |
| | |
| | | |
| | | |
| | | |
| | | </form> |
| | | </form> |
| | | <!--</div>--> |
| | | </div> |
| | | |
| | |
| | | <div class="layui-btn-container"> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>预览</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>刷新</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>审核</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm"><i class="layui-icon layui-icon-ok-circle"></i>确认</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back"><i class="layui-icon layui-icon-close-fill"></i>驳回</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back"><i class="layui-icon layui-icon-close-fill"></i>驳回</button>--> |
| | | <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> |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--<script src="../../layuiadmin/layui/lay/modules/mobile/jquery-3.3.1.min.js"></script>--> |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../CreateControl.js"></script> |
| | |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'form', 'laydate', 'code', 'table', 'element', 'layer'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , laydate = layui.laydate |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element; |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , laydate = layui.laydate |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element; |
| | | //常规用法 |
| | | laydate.render({ |
| | | elem: '#HDate1' |
| | |
| | | , toolbar: '#toolbarDemo' //开启头部工具栏,并为其绑定左侧模板 |
| | | , defaultToolbar: ['filter', 'exports', 'print'] |
| | | // , where: { msg: "", NowPage: 1, OnePage: 10 } |
| | | , 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: '状态', width: 100, sort: true, fixed: true } |
| | | , { field: '单据号', title: '单据号', width: 180, sort: true, fixed: true } |
| | | , { field: '送货单号', title: '送货单号', width: 180, sort: true, fixed: true } |
| | | , { field: '物流单号', title: '物流单号', width: 180, sort: true, fixed: true } |
| | | , { field: '物料代码', title: '物料代码', width: 180, sort: true } |
| | | , { field: '物料名称', title: '物料名称', width: 180, sort: true } |
| | | , { field: '规格型号', title: '规格型号', width: 180, sort: true } |
| | | , { field: '计量单位', title: '计量单位', width: 80, sort: true } |
| | | , { field: '数量', title: '订货数量', width: 100, sort: true } |
| | | , { field: '未生成条码数量', title: '未生成条码数量', width: 100, sort: true } |
| | | , { field: '合格数量', title: '合格数量', width: 100, sort: true } |
| | | , { field: '不合格数量', title: '不合格数量', width: 100, sort: true } |
| | | , { field: '含税单价', title: '含税单价', width: 100, sort: true } |
| | | , { field: '金额', title: '金额', width: 100, 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 } |
| | | , { field: '源单主内码', title: '源单主ID', width: 100, hide: true } |
| | | , { field: '源单子内码', title: '源单子ID', width: 100, hide: true } |
| | | , { field: '源单单号', title: '源单单号', width: 180 } |
| | | , { field: '源单类型', title: '源单类型', width: 80 } |
| | | , { 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 } |
| | | ]] |
| | | , page: true //是否显示分页 |
| | | , limits: [10, 20, 50, 100] |
| | | , limit: 50 //每页默认显示的数量 |
| | | , 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: '状态', width: 100, sort: true, fixed: true } |
| | | , { field: '单据状态', title: '单据状态', sort: true, fixed: true } |
| | | , { field: '单据号', title: '单据号', width: 180, sort: true, fixed: true } |
| | | , { field: '送货单号', title: '送货单号', width: 180, sort: true, fixed: true } |
| | | , { field: '物流单号', title: '物流单号', width: 180, sort: true, fixed: true } |
| | | , { field: '物料代码', title: '物料代码', width: 180, sort: true } |
| | | , { field: '物料名称', title: '物料名称', width: 180, sort: true } |
| | | , { field: '规格型号', title: '规格型号', width: 180, sort: true } |
| | | , { field: '计量单位', title: '计量单位', width: 80, sort: true } |
| | | , { field: '数量', title: '订货数量', width: 100, sort: true } |
| | | , { field: '未生成条码数量', title: '未生成条码数量', width: 100, sort: true } |
| | | , { field: '合格数量', title: '合格数量', width: 100, sort: true } |
| | | , { field: '不合格数量', title: '不合格数量', width: 100, sort: true } |
| | | , { field: '含税单价', title: '含税单价', width: 100, sort: true } |
| | | , { field: '金额', title: '金额', width: 100, 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 } |
| | | , { field: '源单主内码', title: '源单主ID', width: 100, hide: true } |
| | | , { field: '源单子内码', title: '源单子ID', width: 100, hide: true } |
| | | , { field: '源单单号', title: '源单单号', width: 180 } |
| | | , { field: '源单类型', title: '源单类型', width: 80 } |
| | | , { 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 } |
| | | ]] |
| | | , page: true //是否显示分页 |
| | | , limits: [10, 20, 50, 100] |
| | | , limit: 50 //每页默认显示的数量 |
| | | //, height: 500 |
| | | , done: function (res, curr, count) { |
| | | _cur_page = curr; |
| | | layer.closeAll("loading"); |
| | | } |
| | | , done: function (res, curr, count) { |
| | | _cur_page = curr; |
| | | layer.closeAll("loading"); |
| | | } |
| | | |
| | | }); |
| | | |
| | |
| | | var data = checkStatus.data; |
| | | layer.alert(JSON.stringify(data)); |
| | | break; |
| | | //case 'getCheckLength': |
| | | // var data = checkStatus.data; |
| | | // layer.msg('选中了:' + data.length + ' 个'); |
| | | // break; |
| | | //case 'isAll': |
| | | // layer.msg(checkStatus.isAll ? '全选' : '未全选'); |
| | | // break; |
| | | //case 'getCheckLength': |
| | | // var data = checkStatus.data; |
| | | // layer.msg('选中了:' + data.length + ' 个'); |
| | | // break; |
| | | //case 'isAll': |
| | | // layer.msg(checkStatus.isAll ? '全选' : '未全选'); |
| | | // break; |
| | | //审核 |
| | | case 'btn-Audit': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | var InterID = ""; |
| | | if (checkStatus.data.length > 0) { |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | InterID += data[i].hmainid.toString() + ","; |
| | | } |
| | | InterID = InterID.substring(0, InterID.length - 1); |
| | | //逻辑审核方法 |
| | | $.ajax({ |
| | | type: "GET", |
| | | // var WEBURL = ""; //章紫柔本地配置 |
| | | //url: "http://localhost:8082/LuBaoAPI//AuditPOInStockBill", //方法所在页面和方法名 |
| | | url: GetWEBURL() + "/AuditPOInStockBill", |
| | | data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] }, |
| | | 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); |
| | | //修改为功后刷新界面 |
| | | $("#btnSearch").trigger('click'); |
| | | }); |
| | | |
| | | //自定义头工具栏右侧图标 - 提示 |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("接口请求失败!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg('请选择数据!'); |
| | | } |
| | | //自定义头工具栏右侧图标 - 提示 |
| | | case 'btn-reload': |
| | | _cur_page = $(".layui-laypage-em").next().html(); |
| | | RoadHBillNo(sql); |
| | | // }); |
| | | break; |
| | | |
| | | |
| | | case 'btn-details': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | |
| | | , shade: 0.6 //遮罩透明度 |
| | | , maxmin: true //允许全屏最小化 |
| | | , anim: 0 //0-6的动画形式,-1不开启 |
| | | , content: '../../../src/views/SRM/SRM_POInStockBill.html?linterid=' + linterid +'&type =changebg' |
| | | , content: '../../../src/views/SRM/SRM_POInStockBill.html?linterid=' + linterid + '&type =changebg' |
| | | , resize: false |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | break; |
| | | |
| | | |
| | | case 'btn-print': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | , data = checkStatus.data; |
| | | if (data.length == 0) { |
| | | layer.msg("请选择数据", { icon: 5 }); |
| | | return; |
| | | } |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (data[i].单据状态 != "审核") { |
| | | layer.msg("选中行未审核", { icon: 5 }); |
| | | return; |
| | | } |
| | | } |
| | | layer.open({ |
| | | type: 2 |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | | , title: '打印模版选择' |
| | | , shade: 0.6 //遮罩透明度 |
| | |
| | | break; |
| | | case 'btn-generate': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | , data = checkStatus.data; |
| | | if (data[0].未生成条码数量 <= 0) { |
| | | layer.msg("选中行已生成条码!", { icon: 5 }); |
| | | } |
| | | else |
| | | { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: '条码生成' |
| | | , shade: 0.6 //遮罩透明度 |
| | | , maxmin: false //允许全屏最小化 |
| | | , anim: 0 //0-6的动画形式,-1不开启 |
| | | , content: ['../../views/SRM/SRM_BarCodeBill.html?linterid=' + data[0].hmainid + '&lentryid=' + data[0].hsubid, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | $(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | else { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: '条码生成' |
| | | , shade: 0.6 //遮罩透明度 |
| | | , maxmin: false //允许全屏最小化 |
| | | , anim: 0 //0-6的动画形式,-1不开启 |
| | | , content: ['../../views/SRM/SRM_BarCodeBill.html?linterid=' + data[0].hmainid + '&lentryid=' + data[0].hsubid, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | $(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | } |
| | | break; |
| | | case 'btn-exit': |
| | | //var index = parent.layer.getFrameIndex(window.name); |
| | | //element.tabDelete('layadmin-layout-tabs', this); |
| | | //element.tabDelete('layadmin-layout-tabs', this); |
| | | parent.layui.admin.events.closeThisTabs(); |
| | | //parent.layer.close(index); |
| | | break; |
| | |
| | | where = sqlWhere; |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL()+"/GetPOInStockBill", |
| | | 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 "; |
| | | if ($("#HStatus").val() != "") |
| | | if ($("#HStatus").val() == "未生成条码") |
| | | { |
| | | if ($("#HStatus").val() == "未生成条码") { |
| | | sqlWhere += " and 未生成条码数量 > 0"; |
| | | } |
| | | else |
| | | { |
| | | else { |
| | | sqlWhere += " and 状态 like ^^%" + $("#HStatus").val() + "%^^"; |
| | | } |
| | | |
| | |
| | | if ($("#HModel").val() != "") |
| | | sqlWhere += " and 规格型号 like ^^%" + $("#HModel").val() + "%^^"; |
| | | if ($("#HClStatus").val() != "") |
| | | sqlWhere += " and 关闭状态 like ^^%" + $("#HClStatus").val() + "%^^"; |
| | | sqlWhere += " and 单据状态 like ^^%" + $("#HClStatus").val() + "%^^"; |
| | | if ($("#HPURCHASEORGID").val() != "") |
| | | sqlWhere += " and 采购组织 like ^^%" + $("#HPURCHASEORGID").val() + "%^^"; |
| | | if ($("#HDate1").val() != "") { |
| | |
| | | if ($("#HDate2").val() != "") { |
| | | sqlWhere += " and 日期 <= ^^" + $("#HDate2").val() + "^^"; |
| | | } |
| | | |
| | | |
| | | sql = sqlWhere; |
| | | //从第一页开始 |
| | | _cur_page = 1; |
| | |
| | | // // AjaxReportRun(Report, "../../views/WarM/xmlK3_POInStockBill.aspx?linterid=" + data[0].hmainid, Report.PrintPreview(true)); |
| | | //}, |
| | | f_HBarCode: function () {//生成条码 |
| | | // var checkStatus = table.checkStatus('test-table-reload') |
| | | //, data = checkStatus.data; |
| | | // layer.open({ |
| | | // type: 2 |
| | | // , area: ['100%', '100%'] |
| | | // , title: '送货单' |
| | | // , shade: 0.6 //遮罩透明度 |
| | | // , maxmin: false //允许全屏最小化 |
| | | // , anim: 0 //0-6的动画形式,-1不开启 |
| | | // , content: ['../../views/WarM/Web_BarCodeBill.html?linterid=' + data[0].hmainid + '&lentryid=' + data[0].hmainid, 'yes'] |
| | | // // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + JSON.stringify(data), 'yes'] |
| | | // // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + rows, 'yes'] |
| | | // , resize: false |
| | | // , cancel: function () { |
| | | // $(".layui-btn").removeClass("layui-btn-disabled"); |
| | | // } |
| | | // }) |
| | | // var checkStatus = table.checkStatus('test-table-reload') |
| | | //, data = checkStatus.data; |
| | | // layer.open({ |
| | | // type: 2 |
| | | // , area: ['100%', '100%'] |
| | | // , title: '送货单' |
| | | // , shade: 0.6 //遮罩透明度 |
| | | // , maxmin: false //允许全屏最小化 |
| | | // , anim: 0 //0-6的动画形式,-1不开启 |
| | | // , content: ['../../views/WarM/Web_BarCodeBill.html?linterid=' + data[0].hmainid + '&lentryid=' + data[0].hmainid, 'yes'] |
| | | // // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + JSON.stringify(data), 'yes'] |
| | | // // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + rows, 'yes'] |
| | | // , resize: false |
| | | // , cancel: function () { |
| | | // $(".layui-btn").removeClass("layui-btn-disabled"); |
| | | // } |
| | | // }) |
| | | } |
| | | }; |
| | | $('.test-table-reload-btn .layui-btn').on('click', function () { |