Merge branch 'master' of http://101.37.171.70:10101/r/LongShan-LayUI
| | |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Mes_OrderProcFlowAllReport.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Mes_WIPProcReport.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\ProductionPlanReportList.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Sc_EmployeePiecePayReport.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Sc_EmployeePiecePaySumReport.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Sc_EmployeePieceWorkReport.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Sc_StationInBillList.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Sc_StationOutSumReport.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Sc_WorkShopProcessWIPReport.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Sc_WorkShopProcessWIPSumReport.html" /> |
| | | <Content Include="views\车é´ç®¡ç\è½¦é´æ¶æ\JIT_SendGoodsBillList.html" /> |
| | | <Content Include="views\éè´ç®¡ç\æ¶æéç¥å\Add_Edit_Cg_POInStockBillList.html" /> |
| | | <Content Include="views\éè´ç®¡ç\éæéç¥å\Add_Edit_Cg_POInStockBackBillList.html" /> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <NameOfLastUsedPublishProfile>JFTM</NameOfLastUsedPublishProfile> |
| | | <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> |
| | | <ProjectView>ProjectFiles</ProjectView> |
| | | <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> |
| | | <UseIISExpress>true</UseIISExpress> |
| | |
| | | <dd><a lay-href="车é´ç®¡ç/æ¥è¡¨åæ/Mes_WIPProcReport.html">å·¥åºå¨å¶åæ¥è¡¨(纵å)</a></dd> |
| | | <dd><a lay-href="车é´ç®¡ç/æ¥è¡¨åæ/DefectiveDetailedYieldReport.html">ä¸è¯æç»è¯çæ¥è¡¨</a></dd> |
| | | <dd><a lay-href="车é´ç®¡ç/æ¥è¡¨åæ/Sc_StationOutSumReport.html">车é´çäº§æ±æ¥ç»è®¡è¡¨</a></dd> |
| | | <dd><a lay-href="车é´ç®¡ç/æ¥è¡¨åæ/Sc_WorkShopProcessWIPReport.html">ç产车é´å·¥åºæ¥è¡¨</a></dd> |
| | | <dd><a lay-href="车é´ç®¡ç/æ¥è¡¨åæ/Sc_WorkShopProcessWIPSumReport.html">å·¥åºå¨å¶åæ¥è¡¨</a></dd> |
| | | <dd><a lay-href="车é´ç®¡ç/æ¥è¡¨åæ/Sc_EmployeePieceWorkReport.html">å·¥åºæ±æ¥æ¥æ¥è¡¨</a></dd> |
| | | <dd><a lay-href="车é´ç®¡ç/æ¥è¡¨åæ/Sc_EmployeePiecePayReport.html">è®¡ä»¶å·¥èµæ¥è¡¨</a></dd> |
| | | <dd><a lay-href="车é´ç®¡ç/æ¥è¡¨åæ/Sc_EmployeePiecePaySumReport.html">è®¡ä»¶å·¥èµæ±æ»æ¥è¡¨</a></dd> |
| | | </dl> |
| | | </dd>--> |
| | | <!--<dd> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>è®¡ä»¶å·¥èµæ¥è¡¨</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <style type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <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-input-inline"> |
| | | <!--<input type="text" value="0" id="txtHCenterID" hidden />--> |
| | | <input type="text" class="layui-input" lay-verify="txtHDeptName" name="txtHDeptName" id="txtHDeptName" value="" style="float: left; width: 190px; background-color: #efefef4d; display: inline-block;" > |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHCenterID" id="btnHCenterID" style="width: 40px;">--> |
| | | <!--<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>--> |
| | | <!--</button>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å¼å§æ¥æ</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" style="width: 85px;">ç»ææ¥æ</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> |
| | | |
| | | <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" style="padding: 0px; margin-left: 6%;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产åç¼ç </label> |
| | | <div class="layui-input-inline"> |
| | | <!--<input type="text" value="" id="txtHMaterNumber" hidden />--> |
| | | <input type="text" class="layui-input" lay-verify="txtHMaterNumber" name="txtHMaterNumber" id="txtHMaterNumber" value="" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" > |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产ååç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHMaterName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">è§æ ¼åå·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHMaterModel"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label">ç产订å</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHICMOBillNo" style="width:190px;"> |
| | | </div> |
| | | </div>--> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å·¥åº</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHProcName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å工工å·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHEmpNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">åå·¥åç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHEmpName"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>éèå设置</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sc_EmployeePiecePayReport"; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | //#endregion |
| | | |
| | | //#region ç¹å»äºä»¶å
æ¬on formäºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //éåº |
| | | case 'btn-exit': Pub_Close(2); |
| | | break; |
| | | //éèå设置 |
| | | case 'HideColumn': |
| | | get_HideColumn(); |
| | | break; |
| | | }; |
| | | }); |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | | //ç©æ |
| | | form.on('submit(btnHMaterID)', function (data) {//éæ©ä»ä½ |
| | | get_btnHMaterID(); |
| | | }); |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | form.on('submit(btnHCenterID)', function (data) {//éæ©ä»ä½ |
| | | get_btnHCenterID(); |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | //åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åæ¥æ |
| | | //åå§åæ¶é´ |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery(); |
| | | //DisPlay_HideColumn(); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , cellMinWidth: 120 |
| | | , limit: Number.MAX_VALUE // æ°æ®è¡¨æ ¼é»è®¤å
¨é¨æ¾ç¤º |
| | | , height: 'full-70' |
| | | }; |
| | | } |
| | | |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | var wait = layer.load();//é®ç½© |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Mes_OrderProcFlowAllReport/EmployeePiecePayReport', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | var col = []; |
| | | if (data1.count == 1) { |
| | | var data = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //夿æ¯å¦æ¯çº¯è±æ |
| | | var patrn = new RegExp("[\u4E00-\u9FA5]+"); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (!patrn.test(data[i].name)) { |
| | | col.push({ field: data[i].name, title: data[i].name, hide: true }); //éèå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | case 'DateTime': |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, width: 120 }); |
| | | } |
| | | } |
| | | } |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(wait); |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HBeginDate = $("#HBeginDate").val(); |
| | | var HEndDate = $("#HEndDate").val(); |
| | | var txtHDeptName = $("#txtHDeptName").val(); |
| | | var txtHMaterNumber = $("#txtHMaterNumber").val(); |
| | | var txtHMaterName = $("#txtHMaterName").val(); |
| | | var txtHMaterModel = $("#txtHMaterModel").val(); |
| | | var txtHProcName = $("#txtHProcName").val(); |
| | | //var txtHICMOBillNo = $("#txtHICMOBillNo").val(); |
| | | var txtHEmpName = $("#txtHEmpName").val(); |
| | | var txtHEmpNumber = $("#txtHEmpNumber").val(); |
| | | |
| | | sWhere = "'" + HBeginDate + "','" + HEndDate + "','%" + txtHDeptName + "%','%" + txtHMaterNumber + "%','%" + txtHMaterName + "%','%" + txtHMaterModel + "%','%" + txtHProcName + "%','%" + txtHEmpNumber + "%','%" + txtHEmpName + "%'" |
| | | |
| | | get_Display(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#txtHDeptName").val(""); |
| | | $("#txtHMaterNumber").val(""); |
| | | $("#txtHMaterName").val(""); |
| | | $("#txtHMaterModel").val(""); |
| | | $("#txtHProcName").val(""); |
| | | $("#txtHEmpName").val(""); |
| | | $("#txtHEmpNumber").val(""); |
| | | sWhere = " "; |
| | | get_FastQuery(); |
| | | } |
| | | |
| | | //ç©æ |
| | | function get_btnHMaterID() { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'ç©æ' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_MaterialList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#textHmaterName").val(checkStatus.data[0].HName); |
| | | $("#txtHMaterNumber").val(checkStatus.data[0].HNumber); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | function get_btnHCenterID() { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'å·¥ä½ä¸å¿' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_WorkCenter.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#txtHCenterName").val(checkStatus.data[0].å·¥ä½ä¸å¿åç§°); |
| | | $("#txtHCenterID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "éèå设置" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["50%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../åºç¡èµæ/éèå设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ°æ® |
| | | function DisPlay_HideColumn() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = [];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | | for (var i = 0; i < option.cols[0].length - 2; i++) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | } |
| | | //设置å宽 |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | } |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | switch (dataCols[2]) { |
| | | case "L": |
| | | option.cols[0][i + 1]["align"] = "left"; |
| | | break; |
| | | case "M": |
| | | option.cols[0][i + 1]["align"] = "center"; |
| | | break; |
| | | case "R": |
| | | option.cols[0][i + 1]["align"] = "right"; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //åæ¶å»ç»å |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | if (option.cols[0][i]["fixed"] != null) { |
| | | option.cols[0][i]["fixed"] = null; |
| | | } |
| | | else { |
| | | break; |
| | | } |
| | | } |
| | | //å»ç»å |
| | | if (data1.data[0].HFixCols != 0) { |
| | | for (var i = 0; i < data1.data[0].HFixCols; i++) { |
| | | if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { |
| | | data1.data[0].HFixCols += 1; |
| | | } |
| | | option.cols[0][i + 1]["fixed"] = "left"; |
| | | } |
| | | } |
| | | table.render(option); |
| | | } else { |
| | | table.render(option); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //#endregion |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>è®¡ä»¶å·¥èµæ±æ»æ¥è¡¨</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <style type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <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-input-inline"> |
| | | <!--<input type="text" value="0" id="txtHCenterID" hidden />--> |
| | | <input type="text" class="layui-input" lay-verify="txtHDeptName" name="txtHDeptName" id="txtHDeptName" value="" style="float: left; width: 190px; background-color: #efefef4d; display: inline-block;" > |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHCenterID" id="btnHCenterID" style="width: 40px;">--> |
| | | <!--<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>--> |
| | | <!--</button>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å¼å§æ¥æ</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" style="width: 85px;">ç»ææ¥æ</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> |
| | | |
| | | <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" style="padding: 0px; margin-left: 6%;"> |
| | | <!--<div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产åç¼ç </label> |
| | | <div class="layui-input-inline">--> |
| | | <!--<input type="text" value="" id="txtHMaterNumber" hidden />--> |
| | | <!--<input type="text" class="layui-input" lay-verify="txtHMaterNumber" name="txtHMaterNumber" id="txtHMaterNumber" value="" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" >--> |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button>--> |
| | | <!--</div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产ååç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHMaterName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">è§æ ¼åå·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHMaterModel"> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <div class="layui-row"> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label">ç产订å</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHICMOBillNo" style="width:190px;"> |
| | | </div> |
| | | </div>--> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label">å·¥åº</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHProcName" style="width:190px;"> |
| | | </div> |
| | | </div>--> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å工工å·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHEmpNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">åå·¥åç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHEmpName"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>éèå设置</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sc_EmployeePiecePaySumReport"; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | //#endregion |
| | | |
| | | //#region ç¹å»äºä»¶å
æ¬on formäºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //éåº |
| | | case 'btn-exit': Pub_Close(2); |
| | | break; |
| | | //éèå设置 |
| | | case 'HideColumn': |
| | | get_HideColumn(); |
| | | break; |
| | | }; |
| | | }); |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | | //ç©æ |
| | | form.on('submit(btnHMaterID)', function (data) {//éæ©ä»ä½ |
| | | get_btnHMaterID(); |
| | | }); |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | form.on('submit(btnHCenterID)', function (data) {//éæ©ä»ä½ |
| | | get_btnHCenterID(); |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | //åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åæ¥æ |
| | | //åå§åæ¶é´ |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery(); |
| | | //DisPlay_HideColumn(); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , cellMinWidth: 120 |
| | | , limit: Number.MAX_VALUE // æ°æ®è¡¨æ ¼é»è®¤å
¨é¨æ¾ç¤º |
| | | , height: 'full-70' |
| | | }; |
| | | } |
| | | |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | var wait = layer.load();//é®ç½© |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Mes_OrderProcFlowAllReport/EmployeePiecePaySumReport', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | var col = []; |
| | | if (data1.count == 1) { |
| | | var data = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //夿æ¯å¦æ¯çº¯è±æ |
| | | var patrn = new RegExp("[\u4E00-\u9FA5]+"); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (!patrn.test(data[i].name)) { |
| | | col.push({ field: data[i].name, title: data[i].name, hide: true }); //éèå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | case 'DateTime': |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, width: 120 }); |
| | | } |
| | | } |
| | | } |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(wait); |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HBeginDate = $("#HBeginDate").val(); |
| | | var HEndDate = $("#HEndDate").val(); |
| | | var txtHDeptName = $("#txtHDeptName").val(); |
| | | var txtHEmpName = $("#txtHEmpName").val(); |
| | | var txtHEmpNumber = $("#txtHEmpNumber").val(); |
| | | |
| | | sWhere = "'" + HBeginDate + "','" + HEndDate + "','%" + txtHDeptName + "%','%" + txtHEmpNumber + "%','%" + txtHEmpName + "%'" |
| | | |
| | | get_Display(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#txtHDeptName").val(""); |
| | | $("#txtHEmpName").val(""); |
| | | $("#txtHEmpNumber").val(""); |
| | | sWhere = " "; |
| | | get_FastQuery(); |
| | | } |
| | | |
| | | //ç©æ |
| | | function get_btnHMaterID() { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'ç©æ' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_MaterialList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#textHmaterName").val(checkStatus.data[0].HName); |
| | | $("#txtHMaterNumber").val(checkStatus.data[0].HNumber); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | function get_btnHCenterID() { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'å·¥ä½ä¸å¿' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_WorkCenter.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#txtHCenterName").val(checkStatus.data[0].å·¥ä½ä¸å¿åç§°); |
| | | $("#txtHCenterID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "éèå设置" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["50%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../åºç¡èµæ/éèå设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ°æ® |
| | | function DisPlay_HideColumn() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = [];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | | for (var i = 0; i < option.cols[0].length - 2; i++) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | } |
| | | //设置å宽 |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | } |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | switch (dataCols[2]) { |
| | | case "L": |
| | | option.cols[0][i + 1]["align"] = "left"; |
| | | break; |
| | | case "M": |
| | | option.cols[0][i + 1]["align"] = "center"; |
| | | break; |
| | | case "R": |
| | | option.cols[0][i + 1]["align"] = "right"; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //åæ¶å»ç»å |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | if (option.cols[0][i]["fixed"] != null) { |
| | | option.cols[0][i]["fixed"] = null; |
| | | } |
| | | else { |
| | | break; |
| | | } |
| | | } |
| | | //å»ç»å |
| | | if (data1.data[0].HFixCols != 0) { |
| | | for (var i = 0; i < data1.data[0].HFixCols; i++) { |
| | | if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { |
| | | data1.data[0].HFixCols += 1; |
| | | } |
| | | option.cols[0][i + 1]["fixed"] = "left"; |
| | | } |
| | | } |
| | | table.render(option); |
| | | } else { |
| | | table.render(option); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //#endregion |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>å·¥åºæ±æ¥æ¥æ¥è¡¨</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <style type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <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-input-inline"> |
| | | <!--<input type="text" value="0" id="txtHCenterID" hidden />--> |
| | | <input type="text" class="layui-input" lay-verify="txtHDeptName" name="txtHDeptName" id="txtHDeptName" value="" style="float: left; width: 190px; background-color: #efefef4d; display: inline-block;" > |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHCenterID" id="btnHCenterID" style="width: 40px;">--> |
| | | <!--<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>--> |
| | | <!--</button>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å¼å§æ¥æ</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" style="width: 85px;">ç»ææ¥æ</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> |
| | | |
| | | <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" style="padding: 0px; margin-left: 6%;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产åç¼ç </label> |
| | | <div class="layui-input-inline"> |
| | | <!--<input type="text" value="" id="txtHMaterNumber" hidden />--> |
| | | <input type="text" class="layui-input" lay-verify="txtHMaterNumber" name="txtHMaterNumber" id="txtHMaterNumber" value="" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" > |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产ååç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHMaterName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">è§æ ¼åå·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHMaterModel"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label">ç产订å</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHICMOBillNo" style="width:190px;"> |
| | | </div> |
| | | </div>--> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å·¥åº</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHProcName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å工工å·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHEmpNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">åå·¥åç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHEmpName"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>éèå设置</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sc_EmployeePieceWorkReport"; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | //#endregion |
| | | |
| | | //#region ç¹å»äºä»¶å
æ¬on formäºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //éåº |
| | | case 'btn-exit': Pub_Close(2); |
| | | break; |
| | | //éèå设置 |
| | | case 'HideColumn': |
| | | get_HideColumn(); |
| | | break; |
| | | }; |
| | | }); |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | | //ç©æ |
| | | form.on('submit(btnHMaterID)', function (data) {//éæ©ä»ä½ |
| | | get_btnHMaterID(); |
| | | }); |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | form.on('submit(btnHCenterID)', function (data) {//éæ©ä»ä½ |
| | | get_btnHCenterID(); |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | //åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åæ¥æ |
| | | //åå§åæ¶é´ |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery(); |
| | | //DisPlay_HideColumn(); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , cellMinWidth: 120 |
| | | , limit: Number.MAX_VALUE // æ°æ®è¡¨æ ¼é»è®¤å
¨é¨æ¾ç¤º |
| | | , height: 'full-70' |
| | | }; |
| | | } |
| | | |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | var wait = layer.load();//é®ç½© |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Mes_OrderProcFlowAllReport/EmployeePieceWorkReport', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | var col = []; |
| | | if (data1.count == 1) { |
| | | var data = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //夿æ¯å¦æ¯çº¯è±æ |
| | | var patrn = new RegExp("[\u4E00-\u9FA5]+"); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (!patrn.test(data[i].name)) { |
| | | col.push({ field: data[i].name, title: data[i].name, hide: true }); //éèå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | case 'DateTime': |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, width: 120 }); |
| | | } |
| | | } |
| | | } |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(wait); |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HBeginDate = $("#HBeginDate").val(); |
| | | var HEndDate = $("#HEndDate").val(); |
| | | var txtHDeptName = $("#txtHDeptName").val(); |
| | | var txtHMaterNumber = $("#txtHMaterNumber").val(); |
| | | var txtHMaterName = $("#txtHMaterName").val(); |
| | | var txtHMaterModel = $("#txtHMaterModel").val(); |
| | | var txtHProcName = $("#txtHProcName").val(); |
| | | //var txtHICMOBillNo = $("#txtHICMOBillNo").val(); |
| | | var txtHEmpName = $("#txtHEmpName").val(); |
| | | var txtHEmpNumber = $("#txtHEmpNumber").val(); |
| | | |
| | | sWhere = "'" + HBeginDate + "','" + HEndDate + "','%" + txtHDeptName + "%','%" + txtHMaterNumber + "%','%" + txtHMaterName + "%','%" + txtHMaterModel + "%','%" + txtHProcName + "%','%" + txtHEmpNumber + "%','%" + txtHEmpName + "%'" |
| | | |
| | | get_Display(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#txtHDeptName").val(""); |
| | | $("#txtHMaterNumber").val(""); |
| | | $("#txtHMaterName").val(""); |
| | | $("#txtHMaterModel").val(""); |
| | | $("#txtHProcName").val(""); |
| | | $("#txtHEmpName").val(""); |
| | | $("#txtHEmpNumber").val(""); |
| | | sWhere = " "; |
| | | get_FastQuery(); |
| | | } |
| | | |
| | | //ç©æ |
| | | function get_btnHMaterID() { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'ç©æ' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_MaterialList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#textHmaterName").val(checkStatus.data[0].HName); |
| | | $("#txtHMaterNumber").val(checkStatus.data[0].HNumber); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | function get_btnHCenterID() { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'å·¥ä½ä¸å¿' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_WorkCenter.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#txtHCenterName").val(checkStatus.data[0].å·¥ä½ä¸å¿åç§°); |
| | | $("#txtHCenterID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "éèå设置" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["50%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../åºç¡èµæ/éèå设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ°æ® |
| | | function DisPlay_HideColumn() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = [];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | | for (var i = 0; i < option.cols[0].length - 2; i++) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | } |
| | | //设置å宽 |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | } |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | switch (dataCols[2]) { |
| | | case "L": |
| | | option.cols[0][i + 1]["align"] = "left"; |
| | | break; |
| | | case "M": |
| | | option.cols[0][i + 1]["align"] = "center"; |
| | | break; |
| | | case "R": |
| | | option.cols[0][i + 1]["align"] = "right"; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //åæ¶å»ç»å |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | if (option.cols[0][i]["fixed"] != null) { |
| | | option.cols[0][i]["fixed"] = null; |
| | | } |
| | | else { |
| | | break; |
| | | } |
| | | } |
| | | //å»ç»å |
| | | if (data1.data[0].HFixCols != 0) { |
| | | for (var i = 0; i < data1.data[0].HFixCols; i++) { |
| | | if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { |
| | | data1.data[0].HFixCols += 1; |
| | | } |
| | | option.cols[0][i + 1]["fixed"] = "left"; |
| | | } |
| | | } |
| | | table.render(option); |
| | | } else { |
| | | table.render(option); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //#endregion |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>ç产车é´å·¥åºæ¥è¡¨</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <style type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <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-input-inline"> |
| | | <!--<input type="text" value="0" id="txtHCenterID" hidden />--> |
| | | <input type="text" class="layui-input" lay-verify="txtHDeptName" name="txtHDeptName" id="txtHDeptName" value="" style="float: left; width: 190px; background-color: #efefef4d; display: inline-block;" > |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHCenterID" id="btnHCenterID" style="width: 40px;">--> |
| | | <!--<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>--> |
| | | <!--</button>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å¼å§æ¥æ</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" style="width: 85px;">ç»ææ¥æ</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> |
| | | |
| | | <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" style="padding: 0px; margin-left: 6%;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产åç¼ç </label> |
| | | <div class="layui-input-inline"> |
| | | <!--<input type="text" value="" id="txtHMaterNumber" hidden />--> |
| | | <input type="text" class="layui-input" lay-verify="txtHMaterNumber" name="txtHMaterNumber" id="txtHMaterNumber" value="" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" > |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产ååç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHMaterName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">è§æ ¼åå·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHMaterModel"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç产订å</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHICMOBillNo" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å·¥åº</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHProcName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å工工å·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHEmpNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">åå·¥åç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHEmpName"> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>éèå设置</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sc_WorkShopProcessWIPReport"; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | //#endregion |
| | | |
| | | //#region ç¹å»äºä»¶å
æ¬on formäºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //éåº |
| | | case 'btn-exit': Pub_Close(2); |
| | | break; |
| | | //éèå设置 |
| | | case 'HideColumn': |
| | | get_HideColumn(); |
| | | break; |
| | | }; |
| | | }); |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | | //ç©æ |
| | | form.on('submit(btnHMaterID)', function (data) {//éæ©ä»ä½ |
| | | get_btnHMaterID(); |
| | | }); |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | form.on('submit(btnHCenterID)', function (data) {//éæ©ä»ä½ |
| | | get_btnHCenterID(); |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | //åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åæ¥æ |
| | | //åå§åæ¶é´ |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery(); |
| | | //DisPlay_HideColumn(); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , cellMinWidth: 120 |
| | | , limit: Number.MAX_VALUE // æ°æ®è¡¨æ ¼é»è®¤å
¨é¨æ¾ç¤º |
| | | , height: 'full-70' |
| | | }; |
| | | } |
| | | |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | var wait = layer.load();//é®ç½© |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Mes_OrderProcFlowAllReport/WorkShopProcessWIPReport', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | var col = []; |
| | | if (data1.count == 1) { |
| | | var data = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //夿æ¯å¦æ¯çº¯è±æ |
| | | var patrn = new RegExp("[\u4E00-\u9FA5]+"); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (!patrn.test(data[i].name)) { |
| | | col.push({ field: data[i].name, title: data[i].name, hide: true }); //éèå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | case 'DateTime': |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, width: 120 }); |
| | | } |
| | | } |
| | | } |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(wait); |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HBeginDate = $("#HBeginDate").val(); |
| | | var HEndDate = $("#HEndDate").val(); |
| | | var txtHDeptName = $("#txtHDeptName").val(); |
| | | var txtHMaterNumber = $("#txtHMaterNumber").val(); |
| | | var txtHMaterName = $("#txtHMaterName").val(); |
| | | var txtHMaterModel = $("#txtHMaterModel").val(); |
| | | var txtHProcName = $("#txtHProcName").val(); |
| | | var txtHICMOBillNo = $("#txtHICMOBillNo").val(); |
| | | |
| | | sWhere = "'" + HBeginDate + "','" + HEndDate + "','%" + txtHDeptName + "','%" + txtHICMOBillNo +"%','%" + txtHMaterNumber + "%','%" + txtHMaterName + "%','%" + txtHMaterModel + "%','%" + txtHProcName + "%'" |
| | | |
| | | get_Display(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#txtHDeptName").val(""); |
| | | $("#txtHMaterNumber").val(""); |
| | | $("#txtHMaterName").val(""); |
| | | $("#txtHMaterModel").val(""); |
| | | $("#txtHProcName").val(""); |
| | | $("#txtHICMOBillNo").val(""); |
| | | sWhere = " "; |
| | | get_FastQuery(); |
| | | } |
| | | |
| | | //ç©æ |
| | | function get_btnHMaterID() { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'ç©æ' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_MaterialList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#textHmaterName").val(checkStatus.data[0].HName); |
| | | $("#txtHMaterNumber").val(checkStatus.data[0].HNumber); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | function get_btnHCenterID() { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'å·¥ä½ä¸å¿' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_WorkCenter.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#txtHCenterName").val(checkStatus.data[0].å·¥ä½ä¸å¿åç§°); |
| | | $("#txtHCenterID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "éèå设置" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["50%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../åºç¡èµæ/éèå设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ°æ® |
| | | function DisPlay_HideColumn() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = [];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | | for (var i = 0; i < option.cols[0].length - 2; i++) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | } |
| | | //设置å宽 |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | } |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | switch (dataCols[2]) { |
| | | case "L": |
| | | option.cols[0][i + 1]["align"] = "left"; |
| | | break; |
| | | case "M": |
| | | option.cols[0][i + 1]["align"] = "center"; |
| | | break; |
| | | case "R": |
| | | option.cols[0][i + 1]["align"] = "right"; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //åæ¶å»ç»å |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | if (option.cols[0][i]["fixed"] != null) { |
| | | option.cols[0][i]["fixed"] = null; |
| | | } |
| | | else { |
| | | break; |
| | | } |
| | | } |
| | | //å»ç»å |
| | | if (data1.data[0].HFixCols != 0) { |
| | | for (var i = 0; i < data1.data[0].HFixCols; i++) { |
| | | if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { |
| | | data1.data[0].HFixCols += 1; |
| | | } |
| | | option.cols[0][i + 1]["fixed"] = "left"; |
| | | } |
| | | } |
| | | table.render(option); |
| | | } else { |
| | | table.render(option); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //#endregion |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>å·¥åºå¨å¶åæ¥è¡¨</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <style type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <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-input-inline"> |
| | | <!--<input type="text" value="0" id="txtHCenterID" hidden />--> |
| | | <input type="text" class="layui-input" lay-verify="txtHDeptName" name="txtHDeptName" id="txtHDeptName" value="" style="float: left; width: 190px; background-color: #efefef4d; display: inline-block;" > |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHCenterID" id="btnHCenterID" style="width: 40px;">--> |
| | | <!--<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>--> |
| | | <!--</button>--> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å¼å§æ¥æ</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" style="width: 85px;">ç»ææ¥æ</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>--> |
| | | |
| | | <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" style="padding: 0px; margin-left: 6%;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产åç¼ç </label> |
| | | <div class="layui-input-inline"> |
| | | <!--<input type="text" value="" id="txtHMaterNumber" hidden />--> |
| | | <input type="text" class="layui-input" lay-verify="txtHMaterNumber" name="txtHMaterNumber" id="txtHMaterNumber" value="" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" > |
| | | <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产ååç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHMaterName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">è§æ ¼åå·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHMaterModel"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label">ç产订å</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHICMOBillNo" style="width:190px;"> |
| | | </div> |
| | | </div>--> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å·¥åº</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="txtHProcName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å工工å·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHEmpNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">åå·¥åç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="txtHEmpName"> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>éèå设置</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sc_WorkShopProcessWIPSumReport"; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | //#endregion |
| | | |
| | | //#region ç¹å»äºä»¶å
æ¬on formäºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //éåº |
| | | case 'btn-exit': Pub_Close(2); |
| | | break; |
| | | //éèå设置 |
| | | case 'HideColumn': |
| | | get_HideColumn(); |
| | | break; |
| | | }; |
| | | }); |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | | //ç©æ |
| | | form.on('submit(btnHMaterID)', function (data) {//éæ©ä»ä½ |
| | | get_btnHMaterID(); |
| | | }); |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | form.on('submit(btnHCenterID)', function (data) {//éæ©ä»ä½ |
| | | get_btnHCenterID(); |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | //åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åæ¥æ |
| | | //åå§åæ¶é´ |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery(); |
| | | //DisPlay_HideColumn(); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , cellMinWidth: 120 |
| | | , limit: Number.MAX_VALUE // æ°æ®è¡¨æ ¼é»è®¤å
¨é¨æ¾ç¤º |
| | | , height: 'full-70' |
| | | }; |
| | | } |
| | | |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | var wait = layer.load();//é®ç½© |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Mes_OrderProcFlowAllReport/WorkShopProcessWIPSumReport', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | var col = []; |
| | | if (data1.count == 1) { |
| | | var data = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //夿æ¯å¦æ¯çº¯è±æ |
| | | var patrn = new RegExp("[\u4E00-\u9FA5]+"); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (!patrn.test(data[i].name)) { |
| | | col.push({ field: data[i].name, title: data[i].name, hide: true }); //éèå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | case 'DateTime': |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, width: 120 }); |
| | | } |
| | | } |
| | | } |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(wait); |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | //var HBeginDate = $("#HBeginDate").val(); |
| | | //var HEndDate = $("#HEndDate").val(); |
| | | var txtHDeptName = $("#txtHDeptName").val(); |
| | | var txtHMaterNumber = $("#txtHMaterNumber").val(); |
| | | var txtHMaterName = $("#txtHMaterName").val(); |
| | | var txtHMaterModel = $("#txtHMaterModel").val(); |
| | | var txtHProcName = $("#txtHProcName").val(); |
| | | //var txtHICMOBillNo = $("#txtHICMOBillNo").val(); |
| | | |
| | | sWhere = "'%" + txtHDeptName + "%','%" + txtHMaterNumber + "%','%" + txtHMaterName + "%','%" + txtHMaterModel + "%','%" + txtHProcName + "%'" |
| | | |
| | | get_Display(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#txtHDeptName").val(""); |
| | | $("#txtHMaterNumber").val(""); |
| | | $("#txtHMaterName").val(""); |
| | | $("#txtHMaterModel").val(""); |
| | | $("#txtHProcName").val(""); |
| | | //$("#txtHICMOBillNo").val(""); |
| | | sWhere = " "; |
| | | get_FastQuery(); |
| | | } |
| | | |
| | | //ç©æ |
| | | function get_btnHMaterID() { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'ç©æ' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_MaterialList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#textHmaterName").val(checkStatus.data[0].HName); |
| | | $("#txtHMaterNumber").val(checkStatus.data[0].HNumber); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | function get_btnHCenterID() { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'å·¥ä½ä¸å¿' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_WorkCenter.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#txtHCenterName").val(checkStatus.data[0].å·¥ä½ä¸å¿åç§°); |
| | | $("#txtHCenterID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "éèå设置" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["50%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../åºç¡èµæ/éèå设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ°æ® |
| | | function DisPlay_HideColumn() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = [];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | | for (var i = 0; i < option.cols[0].length - 2; i++) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | } |
| | | //设置å宽 |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | } |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | switch (dataCols[2]) { |
| | | case "L": |
| | | option.cols[0][i + 1]["align"] = "left"; |
| | | break; |
| | | case "M": |
| | | option.cols[0][i + 1]["align"] = "center"; |
| | | break; |
| | | case "R": |
| | | option.cols[0][i + 1]["align"] = "right"; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //åæ¶å»ç»å |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | if (option.cols[0][i]["fixed"] != null) { |
| | | option.cols[0][i]["fixed"] = null; |
| | | } |
| | | else { |
| | | break; |
| | | } |
| | | } |
| | | //å»ç»å |
| | | if (data1.data[0].HFixCols != 0) { |
| | | for (var i = 0; i < data1.data[0].HFixCols; i++) { |
| | | if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { |
| | | data1.data[0].HFixCols += 1; |
| | | } |
| | | option.cols[0][i + 1]["fixed"] = "left"; |
| | | } |
| | | } |
| | | table.render(option); |
| | | } else { |
| | | table.render(option); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //#endregion |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |