| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">产åç¼ç </label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="hidden" class="layui-input" lay-verify="HMATERIALID" name="HMATERIALID" id="HMATERIALID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="text" class="layui-input" lay-verify="HMATERIALNAME" name="HMATERIALNAME" id="HMATERIALNAME" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMATERIALID" id="btnHMATERIALID" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æ¬ ææ¥æ</label> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">产åç¼ç </label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="hidden" class="layui-input" lay-verify="HMATERIALID" name="HMATERIALID" id="HMATERIALID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="text" class="layui-input" lay-verify="HMATERIALNAME" name="HMATERIALNAME" id="HMATERIALNAME" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMATERIALID" id="btnHMATERIALID" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç©æå±æ§</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HMaterClsID" id="HMaterClsID" lay-verify="HMaterClsID"> |
| | | <option value="0" selected>å
¨é¨</option> |
| | | <option value="1">å¤è´</option> |
| | | <option value="2">èªå¶</option> |
| | | <option value="3">å§å¤</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">æ¥è¯¢</button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch">éç½®</button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnExport" id="btnExport">导åº</button> |
| | |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //#endregion è¾å
¥æ¡å车çå¬ |
| | | //$('input[type="text"]').on('keydown', function (event) { |
| | | // if (event.keyCode == 13) { |
| | | // $("#btnSearch").click(); |
| | | // } |
| | | //}); |
| | | //#endregion |
| | | |
| | | //#region 产åç¼ç |
| | | form.on('submit(btnHMATERIALID)', function (data) { |
| | | btnHMATERIALID(); |
| | |
| | | var HWorkShopID = obj.data.éæ±è½¦é´ID; |
| | | var HBEGINDATE = $("#HBEGINDATE").val();//æ¬ ææ¥æ |
| | | var HENDDATE = $("#HENDDATE").val();//è³ |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: 'layui-layer-rim'//å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%'] |
| | | , title: 'ä¸å±ç¼ºææ
åµ' |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../ç产管ç/æ¬ æè¿ç®/JIT_MaterialLevelShorAnalysisDetailReport.html?type=2&HOrgID=' + HOrgID + "&HMaterID=" + HMaterID + "&HWorkShopID=" + HWorkShopID + "&HBEGINDATE=" + HBEGINDATE + "&HENDDATE=" + HENDDATE, 'yes'] |
| | | }) |
| | | window.open('../../ç产管ç/æ¬ æè¿ç®/JIT_MaterialLevelShorAnalysisDetailReport.html?type=2&HOrgID=' + HOrgID + "&HMaterID=" + HMaterID + "&HWorkShopID=" + HWorkShopID + "&HBEGINDATE=" + HBEGINDATE + "&HENDDATE=" + HENDDATE); |
| | | //layer.open({ |
| | | // type: 2 |
| | | // , skin: 'layui-layer-rim'//å ä¸è¾¹æ¡ |
| | | // , area: ['90%', '90%'] |
| | | // , title: 'ä¸å±ç¼ºææ
åµ' |
| | | // , shift: 2//å¼¹åºå¨ç» |
| | | // , shade: 0.6 //é®ç½©éæåº¦ |
| | | // //, maxmin: true //å
许å
¨å±æå°å |
| | | // , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | // , content: ['../../ç产管ç/æ¬ æè¿ç®/JIT_MaterialLevelShorAnalysisDetailReport.html?type=2&HOrgID=' + HOrgID + "&HMaterID=" + HMaterID + "&HWorkShopID=" + HWorkShopID + "&HBEGINDATE=" + HBEGINDATE + "&HENDDATE=" + HENDDATE, 'yes'] |
| | | //}) |
| | | }) |
| | | //#endregion |
| | | |
| | |
| | | }) |
| | | |
| | | //åå§åæ¥æ |
| | | $("#HBEGINDATE").val(Format(new Date(new Date()), "yyyy-MM-dd"));//æ¬ ææ¥æ |
| | | $("#HENDDATE").val(Format(new Date($("#HBEGINDATE").val()).setDate(new Date($("#HBEGINDATE").val()).getDate() + 30), "yyyy-MM-dd"));//è³ |
| | | $("#HBEGINDATE").val(Format(new Date().setDate(new Date().getDate() - 30), "yyyy-MM-dd"));//æ¬ ææ¥æ |
| | | $("#HENDDATE").val(Format(new Date().setDate(new Date().getDate() + 30), "yyyy-MM-dd"));//è³ |
| | | //ç产ç»ç»å è½½ |
| | | Organ(); |
| | | //è½¦é´ |
| | |
| | | , cols: [columns] |
| | | , done: function (res, curr, count) { |
| | | soulTable.render(this); |
| | | for (var i in res.data) { |
| | | var item = res.data[i]; |
| | | |
| | | if (item["æªå¹é
è®¢åæ°é"] > 0) { |
| | | $("tr[data-index='" + i + "']").attr({ "style": "background:red;color:black;" }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | }; |
| | | } |
| | |
| | | function get_Dept() { |
| | | //è·å车é´å |
| | | var HDeptID = '<option value="0" style="color:red;" selected>å
¨é¨è½¦é´</option>'; |
| | | var sql = "exec h_p_Gy_GetHDeptListISWorkShop " + sessionStorage["OrganizationID"] |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "/Sc_ICMOBill/GetHDeptList", |
| | | url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", |
| | | async: false, |
| | | data: { "HOrgID": sessionStorage["OrganizationID"] }, |
| | | data: { "sWhere": sql}, |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data; |
| | |
| | | } |
| | | else if ($.inArray(data[i].name, totalArray) > -1) { //计ç®å |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120, filter: true }); |
| | | } else if (data[i].name == 'æ¯å¦å¹é
å°è®¢å') { |
| | | col.push({ field: 'æ¯å¦å¹é
å°è®¢å', title: 'æ¯å¦å¹é
å°è®¢å', sort: true, filter: true, templet: function (d) { return d.æ¯å¦å¹é
å°è®¢å ? 'å¦' : 'æ¯'; } }); |
| | | } else if (data[i].name == 'æªå¹é
è®¢åæ°é') { |
| | | col.push({ |
| | | field: 'æªå¹é
è®¢åæ°é', title: 'æªå¹é
è®¢åæ°é', sort: true, filter: true, templet: function (d) { |
| | | return d.æªå¹é
è®¢åæ°é > 0 ? '<span style="color: red;">' + d.æªå¹é
è®¢åæ°é + '</span>' : d.æªå¹é
è®¢åæ°é; |
| | | } }); |
| | | } |
| | | else if (data[i].name == 'æ¯å¦å¹é
å°è¦æè®¡åä¿¡æ¯') { |
| | | col.push({ field: 'æ¯å¦å¹é
å°è¦æè®¡åä¿¡æ¯', title: 'æ¯å¦å¹é
å°è¦æè®¡åä¿¡æ¯', sort: true, filter: true, templet: function (d) { return d.æ¯å¦å¹é
å°è¦æè®¡åä¿¡æ¯ ? 'å¦' : 'æ¯'; } }); |
| | | else if (data[i].name == 'æªå¹é
è¦æè®¡åä¿¡æ¯æ°é') { |
| | | col.push({ |
| | | field: 'æªå¹é
è¦æè®¡åä¿¡æ¯æ°é', title: 'æªå¹é
è¦æè®¡åä¿¡æ¯æ°é', sort: true, filter: true, templet: function (d) { |
| | | return d.æªå¹é
è¦æè®¡åä¿¡æ¯æ°é > 0 ? '<span style="color: red;">' + d.æªå¹é
è¦æè®¡åä¿¡æ¯æ°é + '</span>' : d.æªå¹é
è¦æè®¡åä¿¡æ¯æ°é; |
| | | } |
| | | }); |
| | | } else if (isValidDate(data[i].name)) { |
| | | col.push({ field: data[i].name, title: Format(data[i].name, 'MM.dd'), width: 70, totalRow: true, filter: true }) |
| | | } |
| | |
| | | var HBEGINDATE = $("#HBEGINDATE").val();//æ¬ ææ¥æ |
| | | var HENDDATE = $("#HENDDATE").val();//è³ |
| | | var HMATERIALID = $("#HMATERIALID").val();//ç©æ/产å |
| | | var HMATERIALNAME = $("#HMATERIALNAME").val();//ç©æåç§° |
| | | var HWorkShopID = $("#HWorkShopID").val();//ç©æ/产å |
| | | var HWorkShopID2 = $("#HWorkShopID2").val();//ç©æ/产åéæ±è½¦é´ |
| | | var HMaterClsID = $("#HMaterClsID").val();//ç©æå±æ§ |
| | | if (HBEGINDATE > HENDDATE) { |
| | | return layer.msg("å¼å§æ¥æä¸è½å°äºç»ææ¥æ!"); |
| | | } |
| | |
| | | if (HWorkShopID2 != 0) { |
| | | sWhere += " and T1.HWorkShopID= " + HWorkShopID2 + " "; |
| | | } |
| | | if (HMaterClsID != 0) { |
| | | sWhere += " and T1.HMaterClsID=" + HMaterClsID + " "; |
| | | } |
| | | //if (HBEGINDATE != null && HENDDATE != null) { |
| | | // sWhere += " and HDate between ''" + HBEGINDATE + "'' and ''" + HENDDATE + "'' "; |
| | | //} |
| | | if (HMATERIALID!=0) { |
| | | sWhere += " and T1.HMaterID= " + HMATERIALID+" "; |
| | | if (HMATERIALID != 0) { |
| | | sWhere += " and T1.HMaterID= " + HMATERIALID + " "; |
| | | } else { |
| | | if (HMATERIALNAME != "") { |
| | | sWhere += " and (T2.HName like ''%" + HMATERIALNAME + "%'' or T2.HNumber like ''%" + HMATERIALNAME + "%'') "; |
| | | } |
| | | } |
| | | get_Display(sWhere); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | |
| | | $("#HMATERIALNAME").val(""); |
| | | $("#HWorkShopID").val("0"); |
| | | $("#HWorkShopID2").val("0"); |
| | | $("#HMaterClsID").val("0"); |
| | | form.render('select'); |
| | | sWhere = ""; |
| | | } |