| | |
| | | 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: '状态', title: '状态', width: 100, sort: true, fixed: true } |
| | | , { field: '单据号', title: '单据号', width: 200, sort: true, fixed: true } |
| | | , { field: '源单单号', title: '源单单号', width: 150 } |
| | | , { field: '计划跟踪单号', title: '计划跟踪单号', width: 100 } |
| | | , { field: '物料代码', title: '物料代码', width: 200 } |
| | | , { field: '物料', title: '物料名称', width: 200 } |
| | | , { field: '规格型号', title: '规格型号', width: 200 } |
| | | , { field: '计量单位', title: '计量单位', width: 80, sort: true } |
| | | , { field: '数量', title: '数量', width: 130 } |
| | | , { field: '合格数量', title: '合格数量', width: 130 } |
| | | , { field: '不合格数量', title: '不合格数量', width: 130 } |
| | | , { field: '日期', title: '日期', width: 150 } |
| | | ]] |
| | | , page: true //是否显示分页 |
| | | , limits: [10, 20, 50, 100] |
| | | , limit: 50 //每页默认显示的数量 |
| | | , cellMinWidth: 100 |
| | | , cols: [[ |
| | | { checkbox: true, fixed: true } |
| | | , { field: '状态', title: '状态', width: 100, sort: true, fixed: true } |
| | | , { field: '单据号', title: '单据号', width: 200, sort: true, fixed: true } |
| | | , { field: '源单单号', title: '源单单号', width: 150 } |
| | | , { field: '计划跟踪单号', title: '计划跟踪单号', width: 100 } |
| | | , { field: '物料代码', title: '物料代码', width: 200 } |
| | | , { field: '物料', title: '物料名称', width: 200 } |
| | | , { field: '规格型号', title: '规格型号', width: 200 } |
| | | , { field: '计量单位', title: '计量单位', width: 80, sort: true } |
| | | , { field: '数量', title: '数量', width: 130 } |
| | | , { field: '合格数量', title: '合格数量', width: 130 } |
| | | , { field: '不合格数量', title: '不合格数量', width: 130 } |
| | | , { field: '日期', title: '日期', width: 150 } |
| | | ]] |
| | | , page: true //是否显示分页 |
| | | , limits: [10, 20, 50, 100, 500, 1000, 5000, 10000] |
| | | , 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 'btn-reload': |
| | | _cur_page = $(".layui-laypage-em").next().html(); |
| | | RoadHBillNo(sql); |
| | |
| | | |
| | | case 'btn-details': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | , data = checkStatus.data; |
| | | |
| | | var linterid = data[0].hmainid.toString(); |
| | | //if (AllowLoadData(sSubStr) != false) {//非空验证 |
| | |
| | | break; |
| | | case 'btn-print': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | , data = checkStatus.data; |
| | | window.open("../../views/SRM/HBarPlanPrint.html?linterid=" + data[0].hmainid + "&Type=HPOInStockBill"); |
| | | break; |
| | | case 'btn-generate': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | , data = checkStatus.data; |
| | | 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].hmainid, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | $(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | , 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].hmainid, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | $(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | break; |
| | | case 'btn-exit': |
| | | case 'btn-exit': |
| | | parent.layui.admin.events.closeThisTabs(); |
| | | break; |
| | | }; |
| | |
| | | where = sqlWhere; |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL()+"GetPOInStockBackBillList", |
| | | url: GetWEBURL() + "GetPOInStockBackBillList", |
| | | async: true, |
| | | data: { "HSupNo": sessionStorage["HUserName"], "sqlWhere": sqlWhere }, |
| | | success: function (result) { |
| | |
| | | page: { |
| | | curr: 1 //重新从第 1 页开始 |
| | | } |
| | | , where: { |
| | | key: { |
| | | id: demoReload.val() |
| | | } |
| | | } |
| | | , where: { |
| | | key: { |
| | | id: demoReload.val() |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | f_Query: function () { //查询 |
| | |
| | | , { 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) {
|