| | |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | | } |
| | | |
| | | .layui-table-cell { |
| | | height: auto; |
| | | white-space: normal; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | <form class="layui-form" action="" lay-filter="component-form-group"> |
| | | <div class="layui-collapse"> |
| | | <div class="layui-colla-item"> |
| | | <div class="layui-colla-title layui-inline"> |
| | | <div class="layui-inline"> |
| | | <span>æ´å¤</span> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label">åæ®ç±»å</label> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æ¡ç ç¼å·</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HBillType" id="HBillType"> |
| | | <option value="">ææ</option> |
| | | <option value="ZHXJ">䏿¶æ¾è´§å</option> |
| | | <option value="ZHSJ">䏿¶å½è¿å</option> |
| | | </select> |
| | | <input type="text" class="layui-input" name="HBarCode" id="HBarCode"> |
| | | </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="HBillNo" id="HBillNo"> |
| | | <input type="text" class="layui-input" name="HMaterName" id="HMaterName"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¶å人</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy"> |
| | | </div> |
| | | </div>--> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button>--> |
| | | <!--<div class="layui-colla-content"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline"> |
| | | <span>å
¶ä»æ¡ä»¶></span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¶é´</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¶é´</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate"> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | |
| | | <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-confirm" id="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" id="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-generate"><i class="layui-icon layui-icon-file"></i>çæéè´§å</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></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-Delete"><i class="layui-icon layui-icon-delete"></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> |
| | |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | set_ClearBill(); |
| | | |
| | | var option = { |
| | | elem: '#mainTable' |
| | | //, toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | { field: 'hmainid', title: '忮ID', hide: true } |
| | | , { field: 'æ¡ç ç±»å', title: 'æ¡ç ç±»å', width: 160 } |
| | | , { field: 'æ¡ç ç¼å·', title: 'æ¡ç ç¼å·', width: 160 } |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 200 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 200 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 200 } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 200 } |
| | | , { field: '计éåä½', title: '计éåä½', width: 200 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } |
| | | , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200 } |
| | | , { field: 'è¾
å©å±æ§ä»£ç ', title: 'è¾
å©å±æ§ä»£ç ', width: 160 } |
| | | , { field: 'è¾
å©å±æ§', title: 'è¾
å©å±æ§', width: 160 } |
| | | , { field: 'æ¹å·', title: 'æ¹å·', width: 160 } |
| | | , { field: 'æ°é', title: 'æ°é', width: 200 } |
| | | , { field: '计åè·è¸ªå·', title: '计åè·è¸ªå·', width: 200 } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200 } |
| | | , { field: 'HSupID', title: 'HSupID', width: 200, hide: true } |
| | | , { field: 'ä¾åºå代ç ', title: 'ä¾åºå代ç ', width: 200 } |
| | | , { field: 'ä¾åºå', title: 'ä¾åºå', width: 200 } |
| | | , { field: 'è¿ææ¥æ', title: 'è¿ææ¥æ', width: 200 } |
| | | , { field: 'è¿ææ¥æå¨', title: 'è¿ææ¥æå¨', width: 115 } |
| | | , { field: '客æ·åå·', title: '客æ·åå·', width: 115 } |
| | | , { field: '徿¥åä½', title: '徿¥åä½', width: 200 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } |
| | | , { field: '车é´', title: '车é´', width: 115 } |
| | | , { field: '计åå®å·¥æ¥æ', title: '计åå®å·¥æ¥æ', width: 200 } |
| | | , { field: 'æå·', title: 'æå·', width: 200 } |
| | | , { field: 'æ»ææ°', title: 'æ»ææ°', width: 200 } |
| | | , { field: '夿³¨', title: '夿³¨', width: 200 } |
| | | , { field: 'å¶ä½äºº', title: 'å¶ä½äºº', width: 115 } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 200 } |
| | | , { field: 'æå°æ¬¡æ°', title: 'æå°æ¬¡æ°', width: 200 } |
| | | , { field: 'ä½åºæ è®°', title: 'ä½åºæ è®°', width: 200 } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 115 } |
| | | , { field: 'ç产å
¥åºæ¥æ', title: 'ç产å
¥åºæ¥æ', width: 200 } |
| | | , { field: 'éå®åºåºæ¥æ', title: 'éå®åºåºæ¥æ', width: 200 } |
| | | ]] |
| | | }; |
| | | |
| | | var index = layer.load(0); |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL() + '/Gy_BarCodeBillList/GetBarCodeBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | //#region éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | $("#HBarCode").val(""); |
| | | $("#HMaterName").val(""); |
| | | sWhere = ""; |
| | | get_Display(sWhere); |
| | | }); |
| | | //#endregion |
| | | |
| | | //éç½®æé® |
| | | //form.on('submit(btnReSearch)', function (data) { |
| | | // $("#HBillType").val("");//åæ®ç±»å |
| | | // $("#HBillNo").val("");//åæ®å· |
| | | // $("#HSourceBillNo").val("");//æºåå· |
| | | // $("#HCreateBy").val("");//å¶å人 |
| | | // $("#BenginHCreateDate").val("");//å¼å§å¶åæ¶é´ |
| | | // $("#EndHCreateDate").val("");//ç»æå¶åæ¶é´ |
| | | // $("#btnSearch").click(); |
| | | //}); |
| | | //#region æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | var HBarCode = $("#HBarCode").val();//å¼å§æ¥æ |
| | | var HMaterName = $("#HMaterName").val();//ç»ææ¥æ |
| | | if (HBarCode) { |
| | | sWhere += " and æ¡ç ç¼å· like '" + HBarCode + "'"; |
| | | } |
| | | if (HMaterName) { |
| | | sWhere += " and ç©æåç§° like'" + HMaterName + "'"; |
| | | } |
| | | get_Display(sWhere); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | }); |
| | | //#endregion |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) {//éæ©ä»ä½ |
| | | //var HBillType = $("#HBillType").val();//åæ®ç±»å |
| | | //var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | //var HCreateBy = $("#HCreateBy").val();//å¶å人 |
| | | //var BenginHCreateDate = $("#BenginHCreateDate").val();//å¼å§å¶åæ¶é´ |
| | | //var EndHCreateDate = $("#EndHCreateDate").val();//ç»æå¶åæ¶é´ |
| | | //if (HBillNo) { |
| | | // sWhere += " and HBillNo like '%" + HBillNo + "%'"; |
| | | //} |
| | | //if (HCreateBy) { |
| | | // sWhere += " and HCreateBy like '%" + HCreateBy + "%'"; |
| | | //} |
| | | //if (BenginHCreateDate) { |
| | | // sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'"; |
| | | //} |
| | | //if (EndHCreateDate) { |
| | | // sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'"; |
| | | //} |
| | | var index = layer.load(0); |
| | | //#region åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //æ¥è¯¢ |
| | | get_Display(sWhere); |
| | | } |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , limit: 50 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | ,{ field: 'hmainid', title: '忮ID', hide: true } |
| | | , { field: 'æ¡ç ç±»å', title: 'æ¡ç ç±»å', width: 160 } |
| | | , { field: 'æ¡ç ç¼å·', title: 'æ¡ç ç¼å·', width: 160 } |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 200 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 250 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 250 } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 200 } |
| | | , { field: '计éåä½', title: '计éåä½', width: 200 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } |
| | | , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200 } |
| | | , { field: 'è¾
å©å±æ§ä»£ç ', title: 'è¾
å©å±æ§ä»£ç ', width: 160 } |
| | | , { field: 'è¾
å©å±æ§', title: 'è¾
å©å±æ§', width: 160 } |
| | | , { field: 'æ¹å·', title: 'æ¹å·', width: 160 } |
| | | , { field: 'æ°é', title: 'æ°é', width: 200 } |
| | | , { field: '计åè·è¸ªå·', title: '计åè·è¸ªå·', width: 200 } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200 } |
| | | , { field: 'HSupID', title: 'HSupID', width: 200, hide: true } |
| | | , { field: 'ä¾åºå代ç ', title: 'ä¾åºå代ç ', width: 200 } |
| | | , { field: 'ä¾åºå', title: 'ä¾åºå', width: 200 } |
| | | , { field: 'è¿ææ¥æ', title: 'è¿ææ¥æ', width: 200 } |
| | | , { field: 'è¿ææ¥æå¨', title: 'è¿ææ¥æå¨', width: 115 } |
| | | , { field: '客æ·åå·', title: '客æ·åå·', width: 115 } |
| | | , { field: '徿¥åä½', title: '徿¥åä½', width: 200 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } |
| | | , { field: '车é´', title: '车é´', width: 115 } |
| | | , { field: '计åå®å·¥æ¥æ', title: '计åå®å·¥æ¥æ', width: 200 } |
| | | , { field: 'æå·', title: 'æå·', width: 200 } |
| | | , { field: 'æ»ææ°', title: 'æ»ææ°', width: 200 } |
| | | , { field: '夿³¨', title: '夿³¨', width: 200 } |
| | | , { field: 'å¶ä½äºº', title: 'å¶ä½äºº', width: 115 } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 200 } |
| | | , { field: 'æå°æ¬¡æ°', title: 'æå°æ¬¡æ°', width: 200 } |
| | | , { field: 'ä½åºæ è®°', title: 'ä½åºæ è®°', width: 200 } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 115 } |
| | | , { field: 'ç产å
¥åºæ¥æ', title: 'ç产å
¥åºæ¥æ', width: 200 } |
| | | , { field: 'éå®åºåºæ¥æ', title: 'éå®åºåºæ¥æ', width: 200 } |
| | | ]] |
| | | }; |
| | | |
| | | } |
| | | |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | function get_Display(sWhere) { |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL1() + '/Gy_BarCodeBillList/GetBarCodeBillList', |
| | | url: GetWEBURL() + '/Gy_BarCodeBillList/GetBarCodeBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere}, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | //$("#HBillType").val("");//åæ®ç±»å |
| | | //$("#HBillNo").val("");//åæ®å· |
| | | //$("#HSourceBillNo").val("");//æºåå· |
| | | //$("#HCreateBy").val("");//å¶å人 |
| | | //$("#BenginHCreateDate").val("");//å¼å§å¶åæ¶é´ |
| | | //$("#EndHCreateDate").val("");//ç»æå¶åæ¶é´ |
| | | } |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch (obj.event) { |
| | | 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() + "Gy_MaterialController/DeltetBarCodeBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "user": 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); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | break; |
| | | case 'btn-view': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length>0) { |
| | | var rows = ''; |
| | | for (var i = 0; i < data.length; i++) { |
| | | rows += data[i].HItemID.toString() + ','; |
| | | } |
| | | rows = rows.substring(rows.length - 1, 0); |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | | , title: 'æå°æ¨¡çéæ©' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + rows + '&MyMsg=' + rows + '&Type=HGy_BarCodeBill', 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©æ°æ®æå°ï¼'); |
| | | } |
| | | break; |
| | | case 'btn-print': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length>0) { |
| | | var rows = ''; |
| | | for (var i = 0; i < data.length; i++) { |
| | | rows += data[i].HItemID.toString() + ','; |
| | | } |
| | | rows = rows.substring(rows.length - 1, 0); |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | | , title: 'æå°æ¨¡çéæ©' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + rows + '&MyMsg=' + rows + '&Type=HGy_BarCodeBill', 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©æ°æ®æå°ï¼'); |
| | | } |
| | | break; |
| | | //å·æ° |
| | | case 'btn-reload': |
| | | $("#HBarCode").val(""); |
| | | $("#HMaterName").val(""); |
| | | sWhere = ""; |
| | | get_Display(sWhere); |
| | | break; |
| | | //éåºæé® |
| | | case 'btn-exit': Pub_Close(2); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | //çå¬è¡åå»äºä»¶ |
| | | table.on('rowDouble(mainTable)', function (obj) { |
| | | layer.alert("åå»äºä»¶", { icon: 1 }); |
| | | }); |
| | | |
| | | |
| | | //laydate.render({ |
| | | // elem: '#HDate' |
| | | // , type: 'datetime' |
| | | // , trigger: 'click' |
| | | // , format:'yyyy-MM-dd HH:mm' |
| | | //}); |
| | | |
| | | |
| | | |
| | | //以䏿¯layui模å |
| | | }); |