| | |
| | | <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/soulTable.slim.js"></script> |
| | | <style> |
| | | .layui-row .layui-btn layui-btn-normal { |
| | | margin: 0px 10px; |
| | |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cx" id="Cx">æ¥è¯¢</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Jlps" id="Jlps">æ£æé
é</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_DeleteBill" id="set_DeleteBill">å é¤</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">éèå设置</button> |
| | | </div> |
| | | <div class="layui-collapse"> |
| | | <div class="layui-colla-item"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç©æä»£ç </label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" lay-verify="MaterialNumber" name="MaterialNumber" id="MaterialNumber" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnMaterial" id="btnMaterial" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <label class="layui-form-label">æ£æç¶æ</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;width: 184px;"> |
| | | <select name="HJLStatus" lay-verify="HJLStatus" id="HJLStatus"> |
| | | <option value="å
¨é¨">å
¨é¨</option> |
| | | <option value="å·²æ£æ">å·²æ£æ</option> |
| | | <option value="æªæ£æ" selected="selected">æªæ£æ</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç©æåç§°</label> |
| | | <label class="layui-form-label" style="width: 85px;">æ£ææ¥æ</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="MaterialName" lay-verify="MaterialName" id="MaterialName" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="MaterialID" id="MaterialID" lay-verify="MaterialID" value="0"> |
| | | <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 80px;"> |
| | | </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" name="MaterialModel" id="MaterialModel" onmouseover="this.title=this.value" readonly> |
| | | <label class="layui-form-label" style="width: 85px;">â</label> |
| | | <div class="layui-input-block" style="margin-left: 118px;"> |
| | | <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 80px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-colla-content" style="padding: 0px; margin-left: 5%;"> |
| | | <div class="layui-row" style="margin-top:10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç©æä»£ç </label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" lay-verify="MaterialNumber" name="MaterialNumber" id="MaterialNumber" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnMaterial" id="btnMaterial" 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 class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="MaterialName" lay-verify="MaterialName" id="MaterialName" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="MaterialID" id="MaterialID" lay-verify="MaterialID" value="0"> |
| | | </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" name="MaterialModel" id="MaterialModel" onmouseover="this.title=this.value" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">工段</label> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 80px;">å½åç»ç»</label> |
| | | <div class="layui-input-block" style="margin-left: 110px; width: 185px;"> |
| | | <select name="Organization" id="Organization" lay-verify="Organization"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:10px;"> |
| | | <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: 80px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">â</label> |
| | | <div class="layui-input-block" style="margin-left: 118px;"> |
| | | <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 80px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">é¨é¨</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" name="HDeptName" lay-verify="HDeptName" id="HDeptName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | |
| | | </div> |
| | | <div class="layui-row" style="margin-top:10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æ£æç¶æ</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;width: 184px;"> |
| | | <select name="HJLStatus" lay-verify="HJLStatus" id="HJLStatus"> |
| | | <option value="å
¨é¨">å
¨é¨</option> |
| | | <option value="å·²æ£æ">å·²æ£æ</option> |
| | | <option value="æªæ£æ">æªæ£æ</option> |
| | | <label class="layui-form-label" style="width: 80px;">å½åç»ç»</label> |
| | | <div class="layui-input-block" style="margin-left: 110px; width: 185px;"> |
| | | <select name="Organization" id="Organization" lay-verify="Organization"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | }).use(['index', 'form', 'laydate', 'table', 'element','soulTable'], function () { |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , soulTable = layui.soulTable |
| | | , element = layui.element; |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "JIT_ComplementGoods"; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | |
| | | set_Xc(); |
| | | }) |
| | | |
| | | //éèå设置 |
| | | form.on('submit(HideColumn)', function () { |
| | | get_HideColumn(); |
| | | }) |
| | | |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | |
| | | //æ¶é´åå§å |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | DisPlay_HideColumn(); |
| | | } |
| | | //è·åç»ç» |
| | | function Organ() { |
| | |
| | | Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; |
| | | } |
| | | $("#Organization").append(Organization); |
| | | $("#Organization").val(sessionStorage["OrganizationID"]); |
| | | form.render('select'); |
| | | } |
| | | layer.closeAll("loading"); |
| | |
| | | option = { |
| | | elem: '#mainTable' |
| | | //, toolbar: '#toolbarDemo' |
| | | , height: 'full-190' |
| | | , height: 'full-120' |
| | | , page: true |
| | | , totalRow: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , done: function (res, curr, count) { |
| | | soulTable.render(this); |
| | | } |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'æ£æåæ¥æ', title: 'æ£æåæ¥æ', width: 150, templet: "<div>{{d.æ£æåæ¥æ ==null ?'':layui.util.toDateString(d.æ£æåæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'æ£æé
éåå·', title: 'ç产订åå·', width: 170 } |
| | | , { field: 'é
é人', title: 'é
é人', width: 170 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 260, } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 160, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 160 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 160 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 160 } |
| | | , { field: 'æ£ææ°é', title: 'æ£ææ°é', width: 160 } |
| | | , { field: 'å·²è°æ¨æ°é', title: 'å·²è°æ¨æ°é', width: 160 } |
| | | , { field: '计éåä½', title: '计éåä½', width: 160 } |
| | | , { field: '车é´', title: '车é´', width: 160 } |
| | | , { field: '工段', title: '工段', width: 160 } |
| | | , { field: '夿³¨', title: '夿³¨', width: 160 } |
| | | , { field: 'è°åºä»åº', title: 'è°åºä»åº', width: 160 } |
| | | , { field: 'è°åºä»ä½', title: 'è°åºä»ä½', width: 160 } |
| | | , { field: 'æ£æåæ¥æ', title: 'æ£æåæ¥æ', width: 150, templet: "<div>{{d.æ£æåæ¥æ ==null ?'':layui.util.toDateString(d.æ£æåæ¥æ, 'yyyy-MM-dd')}}</div>" ,sort:true} |
| | | , { field: 'æ£æé
éåå·', title: 'ç产订åå·', width: 170 ,sort:true} |
| | | , { field: 'é
é人', title: 'é
é人', width: 170, sort: true} |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 260, sort: true} |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 160, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd')}}</div>", sort: true} |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true, sort: true} |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 160, sort: true} |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 160, sort: true} |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 160, sort: true} |
| | | , { field: 'æ£ææ°é', title: 'æ£ææ°é', totalRow: true,width: 160, sort: true} |
| | | , { field: 'å·²è°æ¨æ°é', title: 'å·²è°æ¨æ°é', totalRow: true, width: 160, sort: true} |
| | | , { field: '计éåä½', title: '计éåä½', width: 160, sort: true} |
| | | , { field: '车é´', title: '车é´', width: 160, sort: true} |
| | | , { field: '工段', title: '工段', width: 160, sort: true} |
| | | , { field: '夿³¨', title: '夿³¨', width: 160, sort: true} |
| | | , { field: 'è°åºä»åº', title: 'è°åºä»åº', width: 160, sort: true} |
| | | , { field: 'è°åºä»ä½', title: 'è°åºä»ä½', width: 160, sort: true} |
| | | ]] |
| | | }; |
| | | } |
| | |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | //layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | |
| | | var HDeptName = $("#HDeptName").val(); //é¨é¨ |
| | | var HJLStatus = $("#HJLStatus").val(); //æ£æç¶æ |
| | | var user = sessionStorage["HUserName"]; //å¶å人 |
| | | |
| | | sWhere = { |
| | | MaterialNumber: MaterialNumber, |
| | | MaterialName: MaterialName, |
| | |
| | | HEndDate: HEndDate, |
| | | HDeptName: HDeptName, |
| | | HJLStatus: HJLStatus, |
| | | user: user |
| | | user: user, |
| | | }; |
| | | get_Display(JSON.stringify(sWhere)); |
| | | sWhere = ""; |
| | |
| | | } |
| | | } |
| | | |
| | | //éèå设置 |
| | | 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 = ["HMaterID"];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | 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]["field"], 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 |
| | | |
| | | }); |