| | |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>å¨å
·ç´æ¥è°æ¨åæ®å表</title> |
| | | <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/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../layuiadmin/layui/layui.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> |
| | | <style > |
| | | .layui-form-select .layui-input { |
| | | padding-right: 15px; |
| | | cursor: pointer; |
| | | |
| | | <style type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | |
| | | <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> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HStatus" lay-filter="HStatus" style="width:190px;"> |
| | | <option value="-1" selected="selected">å
¨é¨</option> |
| | | <option value="0">æªå®¡æ ¸</option> |
| | | <option value="1">å·²å®¡æ ¸</option> |
| | | <option value="2">å·²å
³é</option> |
| | | </select> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | <div class="layui-colla-content"> |
| | | <!--<div class="layui-colla-content"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline"> |
| | | <span>å
¶ä»æ¡ä»¶></span> |
| | | </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="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!--<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> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | var option = []; |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //#region 头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //æ°å¢æé® |
| | | case 'btn-Add': set_AddNew(); |
| | | break; |
| | | //ç¼è¾æé® |
| | | case 'btn-Edit': set_ShowBill(); |
| | | break; |
| | | //å é¤æé® |
| | | case 'btn-Delete': set_DeleteBill(); |
| | | break; |
| | | |
| | | //å·æ° |
| | | case 'get_Refresh': get_Refresh(); |
| | | break; |
| | | //éåºæé® |
| | | case 'get_Exit': Pub_Close(2); |
| | | break; |
| | | }; |
| | | //#region éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | //æ¸
ç©ºè¿æ»¤æ¡ä»¶ |
| | | set_ClearQuery(); |
| | | }); |
| | | //#endregion |
| | | |
| | |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | //æ¸
ç©ºè¿æ»¤æ¡ä»¶ |
| | | set_ClearQuery(); |
| | | }); |
| | | //#endregion |
| | | //#region åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | |
| | | get_Display(sWhere); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å·æ° |
| | | function get_Refresh() { |
| | | sWhere = ""; |
| | | get_Display(sWhere); |
| | | } |
| | | //#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")); |
| | | function set_InitGrid() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: '忮ID', hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 180 } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 190 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 160, hide: false } |
| | | , { field: 'é¨é¨ä»£ç ', title: 'é¨é¨ä»£ç ', width: 200 } |
| | | , { field: 'é¨é¨', title: 'é¨é¨', width: 200 } |
| | | , { field: 'hsecmanagerid', title: 'hsecmanagerid', width: 200, hide: true } |
| | | , { field: 'éªæ¶å代ç ', title: 'éªæ¶å代ç ', width: 200 } |
| | | , { field: 'éªæ¶å', title: 'éªæ¶å', width: 200 } |
| | | , { field: 'hkeeperid', title: 'hkeeperid', width: 200, hide: true } |
| | | , { field: 'ä¿ç®¡å代ç ', title: 'ä¿ç®¡å代ç ', width: 200 } |
| | | , { field: 'ä¿ç®¡å', title: 'ä¿ç®¡å', width: 200 } |
| | | , { field: 'hwhid', title: 'hwhid', width: 200, hide: true } |
| | | , { field: 'ä»åºä»£ç ', title: 'ä»åºä»£ç ', width: 200 } |
| | | , { field: 'ä»åº', title: 'ä»åº', width: 200 } |
| | | , { field: 'æè¦', title: 'æè¦', width: 115, hide: true } |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 200 } |
| | | , { field: 'hsubid', title: 'hsubid', width: 200, hide: true } |
| | | , { field: 'hmaterid', title: 'hmaterid', width: 200, hide: true } |
| | | , { field: '模å
·ä»£ç ', title: '模å
·ä»£ç ', width: 115 } |
| | | , { field: '模å
·åç§°', title: '模å
·åç§°', width: 200 } |
| | | , { field: 'æ¡ç ç¼å·', title: 'æ¡ç ç¼å·', width: 200 } |
| | | //, { field: '模å
·åç±»', title: '模å
·åç±»', width: 200 } |
| | | //, { field: 'æ¶æä»åºä»£ç ', title: 'æ¶æä»åºä»£ç ', width: 200 } |
| | | //, { field: 'æ¶æä»åº', title: 'æ¶æä»åº', width: 200 } |
| | | , { field: 'HSPID', title: 'ä»ä½ä»£ç ', width: 200, hide: false } |
| | | //, { field: 'ä»ä½ä»£ç ', title: 'ä»ä½ä»£ç ', width: 200 } |
| | | //, { field: 'ä»ä½', title: 'ä»ä½', width: 200 } |
| | | , { field: '设计寿å½', title: '设计寿å½', width: 200 } |
| | | , { field: '累计使ç¨å¯¿å½', title: '累计使ç¨å¯¿å½', width: 200 } |
| | | , { field: 'æ¬æ¬¡ä½¿ç¨å¯¿å½', title: 'æ¬æ¬¡ä½¿ç¨å¯¿å½', width: 200 } |
| | | , { field: 'å©ä½å¯¿å½', title: 'å©ä½å¯¿å½', width: 200 } |
| | | //, { field: 'æåç产产å', title: 'æåç产产å', width: 200 } |
| | | //, { field: 'éåºç±»å', title: 'éåºç±»å', width: 200 } |
| | | , { field: '模å
·æ°è§æ ¼', title: '模å
·æ°è§æ ¼', width: 200 } |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 200 } |
| | | , { field: 'å
³èæ°é', title: 'å
³èæ°é', width: 200 } |
| | | , { field: 'HBillType', title: 'HBillType', width: 200, hide: true } |
| | | , { field: '红èåæ è®°', title: '红èåæ è®°', width: 200 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 180, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ? '':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 180, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 200 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 200, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200 } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 200 } |
| | | ]; |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: true |
| | | //, cellMinWidth: 120 |
| | | , totalRow: true |
| | | , limit: 10 |
| | | , height: 'full-50' |
| | | , cols: [columns] |
| | | , limits: [50, 500, 1000, 5000] |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: '忮ID', hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 125, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 195 } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 110 } |
| | | , { field: 'HWHID', title: 'HWHID', width: 200, hide: true } |
| | | , { field: 'ä»åºä»£ç ', title: 'ä»åºä»£ç ', width: 125 } |
| | | , { field: 'ä»åº', title: 'ä»åº', width: 125 } |
| | | , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true } |
| | | , { field: 'é¢æäººä»£ç ', title: 'é¢æäººä»£ç ', width: 180 } |
| | | , { field: 'é¢æäºº', title: 'é¢æäºº', width: 125 } |
| | | , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true } |
| | | , { field: 'åæäººä»£ç ', title: 'åæäººä»£ç ', width: 180 } |
| | | , { field: 'åæäºº', title: 'åæäºº', width: 125 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } |
| | | , { field: 'é¨é¨ä»£ç ', title: 'é¨é¨ä»£ç ', width: 115 } |
| | | , { field: 'é¨é¨', title: 'é¨é¨', width: 125 } |
| | | , { field: 'æè¦', title: 'æè¦', width: 125 } |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 125 } |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 115 } |
| | | , { field: 'hsubid', title: 'hsubid', width: 200, hide: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true } |
| | | , { field: '模å
·ä»£ç ', title: '模å
·ä»£ç ', width: 125 } |
| | | , { field: '模å
·åç§°', title: '模å
·åç§°', width: 125 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 125 } |
| | | , { field: 'Hunitid', title: 'Hunitid', width: 200, hide: true } |
| | | //, { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 125 } |
| | | //, { field: '计éåä½', title: '计éåä½', width: 125 } |
| | | , { field: 'HWHSonID', title: 'HWHSonID', width: 200, hide: true } |
| | | , { field: 'åæä»åºä»£ç ', title: 'åæä»åºä»£ç ', width: 125 } |
| | | , { field: 'åæä»åº', title: 'åæä»åº', width: 125 } |
| | | , { field: 'HSPID', title: 'HSPID', width: 200, hide: true } |
| | | , { field: 'ä»ä½ä»£ç ', title: 'ä»ä½ä»£ç ', width: 125 } |
| | | , { field: 'ä»ä½', title: 'ä»ä½', width: 125 } |
| | | , { field: 'åºåæ°é', title: 'åºåæ°é', width: 125 } |
| | | , { field: 'å®åæ°é', title: 'å®åæ°é', width: 125 } |
| | | , { field: 'åä»·', title: 'åä»·', width: 125 } |
| | | , { field: 'éé¢', title: 'éé¢', width: 125 } |
| | | , { field: '设计寿å½', title: '设计寿å½', width: 125 } |
| | | , { field: '累积使ç¨å¯¿å½', title: '累积使ç¨å¯¿å½', width: 125 } |
| | | , { field: 'å©ä½å¯¿å½', title: 'å©ä½å¯¿å½', width: 125 } |
| | | , { field: 'å
³èæ°é', title: 'å
³èæ°é', width: 125 } |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 125 } |
| | | , { field: '红èåæ è®°', title: '红èåæ è®°', width: 125 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 125 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 125 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ? '':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 125 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 200, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 125 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 125 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 200, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'è¡å
³é人', title: 'è¡å
³é人', width: 125 } |
| | | , { field: 'å
³éç±»å', title: 'å
³éç±»å', width: 125 } |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 125 } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 125 } |
| | | ]] |
| | | }; |
| | | ////设置å宽 |
| | | //var colWidth = getColumnsWidth(); |
| | | //if (colWidth == "" || colWidth == []) { |
| | | |
| | | //} |
| | | //else { |
| | | // $.each(columns, function (x, m) { |
| | | // m["width"] = colWidth[x]; |
| | | // }); |
| | | //} |
| | | } |
| | | |
| | | ////#region è·åå宽 |
| | | //function getColumnsWidth() { |
| | | // var result = []; |
| | | // var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | // //è·åå宽 |
| | | // $.ajax({ |
| | | // url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidthList', |
| | | // async: false, |
| | | // type: "Get", |
| | | // dataType: "json", |
| | | // data: { "colNum": colNum, "Name": Name }, |
| | | // success: function (data1) { |
| | | // if (data1.code == 1) { |
| | | // result = data1.data; |
| | | // } |
| | | // else if (data1.code == -1) { |
| | | |
| | | // } |
| | | // else { |
| | | // layer.alert(data1.Message, { icon: 5 }); |
| | | // } |
| | | // }, error: function (e) { |
| | | // layer.alert(e.Message, { icon: 5 }); |
| | | // } |
| | | // }); |
| | | |
| | | // return result; |
| | | //} |
| | | ////#endregion |
| | | |
| | | //#region å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | //å è½½ç½æ ¼ |
| | | var index = layer.load(0);//é®ç½© |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldProdMoveBillList/GetMouldProdMoveBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | function get_Display(sWhere) { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldProdMoveBill/GetMouldProdMoveBill', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | //#endregion |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch (obj.event) { |
| | | case 'btn-Add': |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢å¨å
·ç´æ¥è°æ¨å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../模治å
·ä»åºç®¡ç/Sc_MouldProdMoveBill.html', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | break; |
| | | case 'btn-Edit': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | //if (AllowLoadData(sSubStr) != false) {//é空éªè¯ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾å¨å
·ç´æ¥è°æ¨å' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../模治å
·ä»åºç®¡ç/Sc_MouldProdMoveBill.html?hID=' + hID |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | |
| | | break; |
| | | case 'btn-Delete': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sc_MouldProdMoveBill/DeltetMouldProdMoveBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | break; |
| | | //å·æ° |
| | | case 'get_Refresh': get_Refresh(); |
| | | break; |
| | | //éåºæé® |
| | | case 'get_Exit': Pub_Close(2); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | ////è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | //$.ajax({ |
| | | // //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | // url: GetWEBURL() + '/Sc_MouldProdOutBill/GetMouldProdOutBill', |
| | | // type: "GET", |
| | | // data: { "sWhere": sWhere}, |
| | | // success: function (data1) { |
| | | // if (data1.count == 1) { |
| | | // option.data = data1.data; |
| | | // table.render(option); |
| | | // layer.close(index); |
| | | // } else { |
| | | // layer.close(index); |
| | | // layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | // } |
| | | // }, error: function () { |
| | | // layer.close(index); |
| | | // layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | // } |
| | | //}); |
| | | |
| | | //#region å¿«éè¿æ»¤ |
| | | function get_FastQuery(table, option) { |
| | | var Status = $("select[name='Status']").val();//ç¶æ |
| | | var HDate = $("#HBeginDate").val();//å¼å§æ¥æ |
| | | var HDate1 = $("#HEndDate").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val(); //åæ®å· |
| | | if (Status) { |
| | | switch (Status) { |
| | | case '-1': //å
¨é¨ |
| | | sWhere += ""; |
| | | break; |
| | | case '0': //æªå®¡æ ¸ |
| | | sWhere += " and å®¡æ ¸äºº=''"; |
| | | break; |
| | | case '1': //å·²å®¡æ ¸ |
| | | sWhere += " and å®¡æ ¸äºº<>''"; |
| | | break; |
| | | case '2': //å·²å
³é |
| | | sWhere += " and å
³é人<>''"; |
| | | default: |
| | | |
| | | } |
| | | } |
| | | var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | if (HDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HDate + "'"; |
| | | } |
| | |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | var index = layer.load(0); |
| | | get_Display(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | //#endregion |
| | | //#region éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $("#HDate").val("");//å¼å§æ¥æ |
| | | $("#HDate1").val("");//ç»ææ¥æ |
| | | $("#HBillNo").val("");//åæ®å· |
| | | sWhere = ""; |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $('#Status').find("option[value='-1']").attr("selected", true); |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HBillNo").val(""); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ°å¢ |
| | | function set_AddNew() { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | area: ['100%', '100%'], |
| | | title: 'å¨å
·åå¸å¼è°åºåæ®å表-æ°å¢', |
| | | shift: 0, |
| | | content: '../模治å
·ä»åºç®¡ç/Sc_Add_MouldMoveStockStepOutBill.html', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | }); |
| | | //#region å·æ° |
| | | function get_Refresh() { |
| | | set_ClearQuery(); |
| | | get_Display(sWhere); |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //ä¿®æ¹æé® |
| | | function set_ShowBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'å¨å
·åå¸å¼è°åºåæ®å表' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['Sc_Add_MouldMoveStockStepOutBill.html?HInterID=' + data[0].hinterid + '&HType=Modify', 'yes'] |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢ |
| | | location.reload(); |
| | | } |
| | | , cancel: function () { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | ////çå¬è¡åå»äºä»¶ |
| | | //table.on('rowDouble(mainTable)', function (obj) { |
| | | // layer.alert("åå»äºä»¶", { icon: 1 }); |
| | | //}); |
| | | |
| | | |
| | | //å é¤ |
| | | function set_DeleteBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | var ModRightNameDelete = 'Sc_MouldOtherInBill_Delete' |
| | | |
| | | var data = obj.data //è·å¾å½åè¡æ°æ® |
| | | , layEvent = obj.event; //è·å¾ lay-event 对åºçå¼ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sc_ICMOReportBill/DeltetICMOReportBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HItemID": checkStatus.data[0].HItemID, "User": sessionStorage["HUserName"], "ModRightNameDelete": ModRightNameDelete }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | } |
| | | else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | //#endregion |
| | | //laydate.render({ |
| | | // elem: '#HDate' |
| | | // , type: 'datetime' |
| | | // , trigger: 'click' |
| | | // , format:'yyyy-MM-dd HH:mm' |
| | | //}); |
| | | |
| | | |
| | | ////#region å®¡æ ¸ |
| | | //function set_CheckBill() { |
| | | // var checkStatus = table.checkStatus('mainTable') |
| | | // , data = checkStatus.data; |
| | | // if (checkStatus.data.length === 1) { |
| | | // var InterID = data[0].hmainid.toString(); |
| | | // //é»è¾å®¡æ ¸æ¹æ³ |
| | | // $.ajax({ |
| | | // type: "GET", |
| | | // url: GetWEBURL() + "/Sc_ICMOReportBill/AuditProcessReportList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | // data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] }, |
| | | // success: function (result) { |
| | | // if (result.count == 1) { |
| | | // layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // // å¾å°frameç´¢å¼ |
| | | // var index = layer.getFrameIndex(window.name); |
| | | // //å
³éå½åframe |
| | | // layer.close(index); |
| | | // //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | // $("#btnSearch").trigger('click'); |
| | | // }); |
| | | |
| | | // } else { |
| | | // layer.alert(result.code + result.Message, { icon: 5 }); |
| | | // } |
| | | // }, error: function () { |
| | | // layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | // } |
| | | // }); |
| | | // } |
| | | // else { |
| | | // layer.msg('è¯·éæ©ä¸è¡æ°æ®å®¡æ ¸ï¼'); |
| | | // } |
| | | //} |
| | | ////#endregion |
| | | |
| | | |
| | | ////#region åå®¡æ ¸ |
| | | //function set_AbandonCheck() { |
| | | // var checkStatus = table.checkStatus('mainTable') |
| | | // , data = checkStatus.data; |
| | | // if (checkStatus.data.length === 1) { |
| | | // var InterID = data[0].hmainid.toString(); |
| | | // //é»è¾å®¡æ ¸æ¹æ³ |
| | | // $.ajax({ |
| | | // type: "GET", |
| | | // url: GetWEBURL() + "/Sc_ICMOReportBill/AuditProcessReportList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | // data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] }, |
| | | // success: function (result) { |
| | | // if (result.count == 1) { |
| | | // layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // // å¾å°frameç´¢å¼ |
| | | // var index = layer.getFrameIndex(window.name); |
| | | // //å
³éå½åframe |
| | | // layer.close(index); |
| | | // //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | // $("#btnSearch").trigger('click'); |
| | | // }); |
| | | |
| | | // } else { |
| | | // layer.alert(result.code + result.Message, { icon: 5 }); |
| | | // } |
| | | // }, error: function () { |
| | | // layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | // } |
| | | // }); |
| | | |
| | | // } |
| | | // else { |
| | | // layer.msg('è¯·éæ©ä¸è¡æ°æ®åå®¡æ ¸ï¼'); |
| | | // } |
| | | |
| | | //} |
| | | ////#endregion |
| | | |
| | | ////#region é¢è§ |
| | | //function get_PrintReport() { |
| | | // var checkStatus = table.checkStatus('mainTable') |
| | | // , data = checkStatus.data; |
| | | // if (checkStatus.data.length === 1) { |
| | | // var InterID = data[0].hmainid.toString(); |
| | | // layer.alert("ææ¯æå°æé®ï¼åæ®ä¸»IDæ¯ï¼" + InterID); |
| | | // //window.open("../ç产工åºç®¡ç/å·¥åºæ±æ¥å/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b"); |
| | | // window.open("../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/HBarPlanPrint.html?linterid=" + InterID + "&Type=HDepartMent" + "&OpenTmp=b"); |
| | | // } |
| | | // else { |
| | | // layer.msg('è¯·éæ©ä¸è¡æ°æ®æå°ï¼'); |
| | | // } |
| | | //} |
| | | ////#endregion |
| | | |
| | | |
| | | ////#region ä¿åå宽 |
| | | //function set_SaveGridColWidth() { |
| | | // var arr = []; |
| | | // // åæ° |
| | | // var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | // for (var i = 0; i <= colNum; i++) { |
| | | // var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text(); |
| | | // var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width(); |
| | | // if (colName != "" && colName != null) { |
| | | // arr.push(colWidth == -1 ? 200 : colWidth); |
| | | // } |
| | | // } |
| | | // arr.unshift(40); //é¦ä½è¿½å |
| | | // $.ajax({ |
| | | // url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth', |
| | | // async: false, |
| | | // type: "POST", |
| | | // dataType: "json", |
| | | // data: { "myMap": JSON.stringify(arr), "Name": Name }, |
| | | // success: function (data1) { |
| | | // if (data1.count == 1) { |
| | | // layer.alert(data1.Message, { icon: 1 }); |
| | | // } else { |
| | | // layer.alert(data1.Message, { icon: 5 }); |
| | | // } |
| | | // }, error: function (e) { |
| | | // layer.alert(e.Message, { icon: 5 }); |
| | | // } |
| | | // }); |
| | | // //设置èµå¼å宽 |
| | | // var colWidth = getColumnsWidth(); |
| | | // if (colWidth == "" || colWidth == []) { |
| | | |
| | | // } |
| | | // else { |
| | | // $.each(columns, function (x, m) { |
| | | // m["width"] = colWidth[x]; |
| | | // }); |
| | | // } |
| | | // location.reload(); |
| | | //} |
| | | ////#endregion |
| | | |
| | | ////#region é»è®¤å宽 |
| | | //function set_DefaultGridColWidth() { |
| | | // var arr = []; |
| | | // // åæ° |
| | | // var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | // for (var i = 0; i <= colNum; i++) { |
| | | // var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text(); |
| | | // if (colName != "" && colName != null) { |
| | | // arr.push(200); //é»è®¤å®½åº¦200 |
| | | // } |
| | | // } |
| | | // arr.unshift(40); //é¦ä½è¿½å |
| | | // $.ajax({ |
| | | // url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth', |
| | | // async: false, |
| | | // type: "POST", |
| | | // dataType: "json", |
| | | // data: { "myMap": JSON.stringify(arr), "Name": Name }, |
| | | // success: function (data1) { |
| | | // if (data1.count == 1) { |
| | | |
| | | // } else { |
| | | // layer.alert(data1.Message, { icon: 5 }); |
| | | // } |
| | | // }, error: function (e) { |
| | | // layer.alert(e.Message, { icon: 5 }); |
| | | // } |
| | | // }); |
| | | // //设置èµå¼å宽 |
| | | // var colWidth = getColumnsWidth(); |
| | | // if (colWidth == "" || colWidth == []) { |
| | | |
| | | // } |
| | | // else { |
| | | // $.each(columns, function (x, m) { |
| | | // m["width"] = colWidth[x]; |
| | | // }); |
| | | // } |
| | | // //get_FastQuery(table, option); |
| | | // location.reload(); |
| | | //} |
| | | //#endregion |
| | | //以䏿¯layui模å |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |