| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" id="BT_HBardcodeType">æ¡ç ç±»å</label> |
| | | <div class="layui-input-block"> |
| | | <!--<input type="text" class="layui-input" name="tmlx" id="tmlx">--> |
| | | <select name=" tmlx" id="tmlx"> |
| | | <option value="">å
¨é¨</option> |
| | | <option value="æµè½¬å¡å·">æµè½¬å¡å·</option> |
| | | <option value="ééæ¡ç ">ééæ¡ç </option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç»ç»åç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> |
| | | <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" class="ForFilteringSchemes"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <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-row" style="margin-top: 5px; margin-left: 4%;"> |
| | | <div class="layui-inline"> |
| | | <span id="BT_QTTJ">å
¶ä»æ¡ä»¶></span> |
| | | <label class="layui-form-label" id="BT_HBillNo">ç产任å¡å</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" id="BT_HBillNo">ç产任å¡å</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" id="BT_HMaker">å¶å人</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaker" id="HMaker"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" id="BT_HICMOBillNo">æ¡ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" id="BT_HInitTimeCycle">æ¥æé´é</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="padding: 10px 0; margin-left: 4%;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" id="BT_HBeginDate">æ¥æ</label> |
| | | <label class="layui-form-label" id="BT_HMaker">å¶å人</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaker" id="HMaker"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" id="BT_HICMOBillNo">æ¡ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top: 5px; margin-left: 4%;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" id="BT_HInitTimeCycle">æ¥æé´é</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" id="BT_HBeginDate">å¼å§æ¥æ</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 75px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">-</label> |
| | | <label class="layui-form-label">ç»ææ¥æ</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 75px;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-row" style="margin-top: 5px; margin-left: 4%;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" id="BT_ColName">è¿æ»¤</label> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!--<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="text" class="layui-input" name="hname" id="hname"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产å代ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="hnumber" id="hnumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è§æ ¼åå·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="hmodel" id="hmodel"> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | <table class="layui-form-item" id="mainTable" lay-filter="mainTable"></table> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--<script src="../../../layuiadmin/layui/layui.js"></script>--> |
| | | |
| | | |
| | | <script> |
| | | layui.config({ |
| | |
| | | , util = layui.util; |
| | | //var sWhere = " 产å代ç = 'BX0002'"; |
| | | var sWhere = ""; |
| | | var HModName = "MES_ProductionLinePackagingList"; |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | form.render('select'); |
| | | |
| | | var option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | ,height: 'full-50' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , cols: [[ |
| | | {type:'radio'} |
| | | { type: 'radio' } |
| | | , { field: 'HInterID', title: 'ID', sort: true, width: 100 } |
| | | , { field: '项ç®å·', title: '项ç®å·', sort: true, width: 100 } |
| | | ,{ field: 'å¯ä¸æ¡ç ', title: 'å¯ä¸æ¡ç ', sort: true, width: 170 } |
| | | , { field: 'å¯ä¸æ¡ç ', title: 'å¯ä¸æ¡ç ', sort: true, width: 170 } |
| | | //, { field: 'æ«ç æ¥æ', title: 'æ«ç æ¥æ', sort: true, width: 200, templet: "<div>{{layui.util.toDateString(this.æ«ç æ¥æ, 'yyyy-MM-dd')}}</div> " } |
| | | , { |
| | | field: 'æ«ç æ¥æ', title: 'å
è£
æ¥æ', sort: true, width: 110, templet: function (d) { |
| | |
| | | } |
| | | }; |
| | | |
| | | table.render(option); |
| | | |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | layer.load(3); |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL1() + '/LEMS/MES_ProductionLinePackagingList_Json', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | if ($("#HInitTimeCycle").val() == 0 && $("#HInitTimeCycle").val() == "") { |
| | | setSelect_HInitTimeCycle(); |
| | | } |
| | | set_ClearBill(); |
| | | |
| | | if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { |
| | | ColFilter(); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } else { |
| | | layer.closeAll("loading"); |
| | | layer.alert(get_MessageError(data1.code + data1.Message, sessionStorage["HTranSlate"]), { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert(get_MessageError("[0000-1-002]æ¥å£è¯·æ±å¤±è´¥!", sessionStorage["HTranSlate"]), { icon: 5 }); |
| | | } |
| | | }); |
| | | var HModName = "MES_ProductionLinePackagingList"; |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | form.render('select'); |
| | | |
| | | |
| | | //æ¥æé´é䏿å表çå¬ |
| | | form.on('select(HInitTimeCycle)', function (data) { |
| | | var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; |
| | | //è¥æ¥æé´éä¸ä¸º ä»»æé´éï¼åç¦ç¨å¼å§æ¥æä¸ç»ææ¥æçéæ© |
| | | if (HInitTimeCycle != -1) { |
| | | $('#HBeginDate').prop('disabled', true); |
| | | $('#HEndDate').prop('disabled', true); |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åç»ç» |
| | | Organ(); |
| | | //æ¥è¯¢ |
| | | get_FastQuery(); |
| | | } |
| | | |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | |
| | | //æ§è¡æ¥è¯¢æ¹æ³ |
| | | $("#btnSearch").click; |
| | | } else { |
| | | $('#HBeginDate').prop('disabled', false); |
| | | $('#HEndDate').prop('disabled', false); |
| | | } |
| | | }); |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));//å¼å§æ¥æ |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//ç»ææ¥æ |
| | | $("#HBarCode_Pack").val("");//å¯ä¸æ¡ç |
| | | $("#HICMOBillNo").val("");//æ¡ç |
| | | $("#tmlx").val("");//æ¡ç ç±»å |
| | | $("#HBillNo").val("");//ç产任å¡ååå· |
| | | $("#HMaker").val("");//æ°éå¶å人 |
| | | $("#åæ®å·").val("");//åæ®å· |
| | | $("#ColContent").val(""); |
| | | $("#ColName").val("0"); |
| | | $("#Comparator").val("0"); |
| | | $("#ColContent1").val(""); |
| | | $("#ColName1").val("0"); |
| | | $("#Comparator1").val("0"); |
| | | $("#ColContent2").val(""); |
| | | $("#ColName2").val("0"); |
| | | $("#Comparator2").val("0"); |
| | | |
| | | form.render('select'); |
| | | $("#btnSearch").click(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) {//éæ©ä»ä½ |
| | | //å¿«éæ¥è¯¢ |
| | | function get_FastQuery() { |
| | | var HBarCode_Pack = $("#HBarCode_Pack").val();//å¯ä¸æ¡ç |
| | | var HICMOBillNo = $("#HICMOBillNo").val();//æ¡ç |
| | | var tmlx = $("#tmlx").val();//æ¡ç ç±»å |
| | |
| | | var åæ®å· = $("#åæ®å·").val();//æ°éå¶å人 |
| | | var HBeginDate = $("#HBeginDate").val();//å¼å§æ¥æ |
| | | var HEndDate = $("#HEndDate").val();//ç»ææ¥æ |
| | | |
| | | var ColName = $("#ColName").val();//å¤éæ¡ |
| | | var Comparator = $("#Comparator").val() |
| | | var ColContent = $("#ColContent").val(); |
| | | |
| | | var ColName1 = $("#ColName1").val();//å¤éæ¡ |
| | | var Comparator1 = $("#Comparator1").val() |
| | | var ColContent1 = $("#ColContent1").val(); |
| | | var ColName2 = $("#ColName2").val();//å¤éæ¡ |
| | | var Comparator2 = $("#Comparator2").val() |
| | | var ColContent2 = $("#ColContent2").val(); |
| | | |
| | | if (ColName != 0 && Comparator != 0) { |
| | | var com = ""; |
| | | switch (Comparator) { |
| | |
| | | break; |
| | | } |
| | | sWhere += " and " + ColName + " " + com; |
| | | } if (ColName1 != 0 && Comparator1 != 0) { |
| | | } |
| | | if (ColName1 != 0 && Comparator1 != 0) { |
| | | var com1 = ""; |
| | | switch (Comparator1) { |
| | | case "7": |
| | |
| | | if (HEndDate != "") { |
| | | sWhere += " and å¶åæ¥æ <= '" + HEndDate + "'"; |
| | | } |
| | | sWhere += getOrgIDByUser();//ç¨æ·å
³èç»ç»æ¥è¯¢è¿æ»¤ |
| | | |
| | | |
| | | get_Display(sWhere); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | |
| | | function get_Display(sWhere) { |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL1() + '/LEMS/MES_ProductionLinePackagingList_Json', |
| | | type: "GET", |
| | | async: false, |
| | |
| | | layer.alert(get_MessageError("[0000-1-002]æ¥å£è¯·æ±å¤±è´¥!", sessionStorage["HTranSlate"]), { icon: 5 }); |
| | | } |
| | | }); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | } |
| | | |
| | | |
| | | |
| | | //æ¥æé´é䏿å表çå¬ |
| | | form.on('select(HInitTimeCycle)', function (data) { |
| | | var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; |
| | | //è¥æ¥æé´éä¸ä¸º ä»»æé´éï¼åç¦ç¨å¼å§æ¥æä¸ç»ææ¥æçéæ© |
| | | if (HInitTimeCycle != -1) { |
| | | $('#HBeginDate').prop('disabled', true); |
| | | $('#HEndDate').prop('disabled', true); |
| | | |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | |
| | | //æ§è¡æ¥è¯¢æ¹æ³ |
| | | $("#btnSearch").click; |
| | | } else { |
| | | $('#HBeginDate').prop('disabled', false); |
| | | $('#HEndDate').prop('disabled', false); |
| | | } |
| | | }); |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | $("#HOrgID").val(sessionStorage["Organization"]) |
| | | var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));//å¼å§æ¥æ |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//ç»ææ¥æ |
| | | $("#HBarCode_Pack").val("");//å¯ä¸æ¡ç |
| | | $("#HICMOBillNo").val("");//æ¡ç |
| | | $("#tmlx").val("");//æ¡ç ç±»å |
| | | $("#HBillNo").val("");//ç产任å¡ååå· |
| | | $("#HMaker").val("");//æ°éå¶å人 |
| | | $("#åæ®å·").val("");//åæ®å· |
| | | $("#ColContent").val(""); |
| | | $("#ColName").val("0"); |
| | | $("#Comparator").val("0"); |
| | | $("#ColContent1").val(""); |
| | | $("#ColName1").val("0"); |
| | | $("#Comparator1").val("0"); |
| | | $("#ColContent2").val(""); |
| | | $("#ColName2").val("0"); |
| | | $("#Comparator2").val("0"); |
| | | |
| | | form.render('select'); |
| | | $("#btnSearch").click(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) {//éæ©ä»ä½ |
| | | get_FastQuery(); |
| | | |
| | | }); |
| | | //è·åéä¸è¡æ°æ® |
| | | table.on('row(mainTable)', function (obj) { |
| | |
| | | obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click'); |
| | | }); |
| | | |
| | | //æå° |
| | | //#region æå° |
| | | //form.on('submit(Print)', function (obj) {//éåº |
| | | // var checkStatus = table.checkStatus("mainTable"); //è·åéä¸è¡ç¶æ |
| | | // var linterid = checkStatus.data[0].HInterID; |
| | |
| | | // }) |
| | | |
| | | //}); |
| | | //#endregion |
| | | |
| | | //ç½æ çæä¿å |
| | | form.on('submit(WhiteSave)', function (obj) {//éåº |
| | |
| | | layer.msg(get_MessageError('[0000-1-020]è¯·éæ©ä¸è¡æ°æ®æ´æ°ï¼', sessionStorage["HTranSlate"])); |
| | | } |
| | | }); |
| | | |
| | | |
| | | //#region åå§æ¥æé´é 䏿å表 |
| | | function setSelect_HInitTimeCycle() { |
| | | var valueList = [0, 1, 2, 3, 4, 5, 6, 29]; //valuelistæ°ç»å
å«ä¸æ¶é´ç¸å
³çæ´æ°å¼ |
| | |
| | | $("#HInitTimeCycle").val("29"); //使ç¨jQueryçval()æ¹æ³å°ä¸æå表çéä¸å¼è®¾ç½®ä¸º"29 ï¼ä¸æ¾ç¤ºãè¿ä¸æå¤©ã |
| | | } |
| | | //#endregion |
| | | |
| | | //#region åææ¾ç¤ºä¸ææ¡ |
| | | function ColFilter() { |
| | | var Organization = '<option value="0" selected="selected" ></option>'; |
| | |
| | | form.render('select'); |
| | | } |
| | | //#endregion |
| | | //laydate.render({ |
| | | // elem: '#HDate' |
| | | // , type: 'datetime' |
| | | // , trigger: 'click' |
| | | // , format:'yyyy-MM-dd HH:mm' |
| | | //}); |
| | | |
| | | //è·åç»ç» |
| | | function Organ() { |
| | | //è·åç»å½é¡µç»ç»å |
| | | $.ajax({ |
| | | type: "get", |
| | | async: false, |
| | | url: GetWEBURlLanguage() + "/Web/GetOrganizations", |
| | | success: function (result) { |
| | | var Organization = ""; |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data; |
| | | for (var i = 0; i < data.length; i++) { |
| | | Organization += '<option style="color:blue;" value="' + data[i].Name + '">' + data[i].Name + '</option>'; |
| | | } |
| | | $("#HOrgID").append(Organization); |
| | | $("#HOrgID").val(sessionStorage["Organization"]) |
| | | form.render('select'); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //#region æ ¹æ®ç¨æ·è·åç¨æ·å
³èç»ç»çè¿æ»¤æ¡ä»¶ |
| | | function getOrgIDByUser() { |
| | | var res = ""; |
| | | $.ajax({ |
| | | type: "GET", |
| | | async: false, |
| | | url: GetWEBURlLanguage() + "/Xt_User/getOrgIDListByUser", //æ¹æ³æå¨é¡µé¢åæ¹æ³å ä¼ å ç»ç»å¿
é¡»æ¯åè¡¨å¤´é¨æ¥è¯¢çç»ç» ä¸è½ä½¿ç¨ç¨æ·é»è®¤ |
| | | data: { "UserID": sessionStorage["Czybm"], "UserName": sessionStorage["HUserName"], HOrgID: $("#HOrgID").val() }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | if (result.data[0].sWhere == "1") { |
| | | res = " and ç产ç»ç» = '" + $("#HOrgID").val() + "'"; |
| | | } else { |
| | | res = result.data[0].sWhere; |
| | | } |
| | | } |
| | | }, error: function (err) { |
| | | res = " and 1 = 0"; |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | return res; |
| | | } |
| | | //#endregion |
| | | |
| | | //以䏿¯layui模å |
| | | }); |