| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <html> |
| | | <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"> |
| | | <!--å¼ç¨layuiæ ·å¼æä»¶--> |
| | | <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> |
| | | <!--å¼ç¨layui jsæä»¶--> |
| | | <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> |
| | | /* .maintitle { |
| | | background-color: #1492ff; |
| | | color: #fff; |
| | | padding: 5px 10px; |
| | | border: none; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .title { |
| | | border-left: 4px solid #1492ff; |
| | | padding-left: 6px; |
| | | margin: 20px 10px 4px; |
| | | font-size: 16px; |
| | | color: #333; |
| | | } |
| | | |
| | | .buttom_box_little { |
| | | width: 60px; |
| | | height: 36px; |
| | | color: #fff; |
| | | background-color: #1492ff; |
| | | border-radius: 4px; |
| | | border: none; |
| | | margin: 10px; |
| | | } |
| | | |
| | | .layui-input { |
| | | width: 93%; |
| | | } |
| | | |
| | | .layui-inline, img { |
| | | display: block; |
| | | vertical-align: middle |
| | | } |
| | | |
| | | .layui-input, .layui-textarea { |
| | | display: inline-block; |
| | | width: 100%; |
| | | padding-left: 10px; |
| | | } |
| | | |
| | | .laydate-time-list ol { |
| | | overflow-x: hidden !important; |
| | | overflow-y: auto !important; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | padding: 9px 5px; |
| | | width: 85px; |
| | | } |
| | | |
| | | .layui-input-block { |
| | | margin-left: 85px; |
| | | min-height: 36px; |
| | | }*/ |
| | | |
| | | .layui-form-label { |
| | | font-size: 14px; |
| | | width: 85px; |
| | | text-align: inherit; |
| | | } |
| | | /*å
¨å±è®¾ç½®è¾å
¥æ¡é«åº¦*/ |
| | | .layui-input { |
| | | height: 30px; |
| | | } |
| | | /*设置表头è¾å
¥æ¡*/ |
| | | .t1_input { |
| | | padding: 1%; |
| | | } |
| | | /*æ¬ç«ä¿¡æ¯td*/ |
| | | .bz_td { |
| | | display: -webkit-box; /*设置æé®ä¸æ¢è¡*/ |
| | | padding: 1%; /*设置è¾å
¥æ¡è¾¹è·*/ |
| | | } |
| | | /*设置æ¬ç«ä¿¡æ¯æé®é«åº¦*/ |
| | | .bz_btu { |
| | | height: 30px; |
| | | width: 60px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | th { |
| | | width: 70px; |
| | | text-align: center; |
| | | <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" style="padding: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="formData" id="formData" style="background-color:white;"> |
| | | <div style="background-color:#0085E8;"> |
| | | <span style="color: white;"><i class="layui-icon layui-icon-form"></i>设å¤ç¹æ£è®°å½å</span> |
| | | </div> |
| | | <div class="layui-form-item" style="margin: 1% 2%;text-align: right;"> |
| | | <button type="button" lay-submit="" lay-filter="Add" class="layui-btn layui-btn-radius">æ°å¢</button> |
| | | <!--<button type="button" lay-submit="" lay-filter="" class="layui-btn layui-btn-radius">æ¸
空</button>--> |
| | | <button type="button" lay-submit="" lay-filter="Saver" class="layui-btn layui-btn-radius">ä¿å</button> |
| | | <button type="button" lay-submit="" lay-filter="Cancel" class="layui-btn layui-btn-radius layui-btn-danger">éåº</button> |
| | | </div> |
| | | <div class="layui-tab layui-tab-card" lay-filter="TabTest"> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>è®¾å¤æ¡ç </th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBarCode" class="layui-input" id="HBarCode" placeholder="请è¾å
¥è®¾å¤æ¡ç åå车" style="border-radius: 50px;"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu layui-btn-radius" lay-filter="QueDin" style="line-height: 30px;">ç¡®å®</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ç¹æ£å¼å§</th> |
| | | <td class="bz_td"> |
| | | <input type="datetime" name="HBeginDate" class="layui-input" id="HBeginDate" placeholder="è¯·éæ©æ¥æ" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ç¹æ£ç»æ</th> |
| | | <td class="bz_td"> |
| | | <input type="datetime" name="HEndDate" class="layui-input" id="HEndDate" placeholder="è¯·éæ©æ¥æ" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>æ°é</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HQty" class="layui-input" id="HQty" value="0" placeholder="请è¾å
¥æ°é" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åæ®å·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBillNo" class="layui-input" id="HBillNo" placeholder="请è¾å
¥åæ®å·" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åæ®æ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="datetime" name="HDate" class="layui-input" id="HDate" placeholder="è¯·éæ©æ¥æ" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>é¨é¨</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeptName" class="layui-input" id="HDeptName" placeholder="éæ©é¨é¨" style="background-color:#efefef4d;"> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="Department" id="Department" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>设å¤åç§°</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBarName" class="layui-input" id="HBarName" placeholder="请è¾å
¥è®¾å¤åç§°" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HEquipID" id="HEquipID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>设å¤è§æ ¼</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBarSpec" class="layui-input" id="HBarSpec" placeholder="请è¾å
¥è®¾å¤è§æ ¼" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>设å¤åå·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBarModel" class="layui-input" id="HBarModel" placeholder="请è¾å
¥è®¾å¤åå·" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>å建人</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaker" class="layui-input" id="HMaker" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åå»ºæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMakeDate" class="layui-input" id="HMakeDate" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä¿®æ¹äºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HUpDater" class="layui-input" id="HUpDater" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä¿®æ¹æ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HUpDateDate" class="layui-input" id="HUpDateDate" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å®¡æ ¸äºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HChecker" class="layui-input" id="HChecker" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å®¡æ ¸æ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCheckDate" class="layui-input" id="HCheckDate" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä½åºäºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeleteMan" class="layui-input" id="HDeleteMan" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä½åºæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeleteDate" class="layui-input" id="HDeleteDate" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <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> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">设å¤ç¹æ£è§ç¨</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="hidden" name="HEquipDotCheckRuleInterID" id="HEquipDotCheckRuleInterID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="text" name="HEquipDotCheckRuleInterNo" id="HEquipDotCheckRuleInterNo" class="layui-input" value="" style="float:left;width:150px;" readonly="readonly"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="HEquipDotCheckRuleInterist" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | <label class="layui-form-label" style="width: 30px;">æ¥æ</label> |
| | | <input type="date" class="layui-input" id="HBeginDate" style="width:110px;" placeholder="yyyy-MM-dd"> |
| | | </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-AddLine"><i class="layui-icon layui-icon-form"></i>å¢è¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="xuhao"> |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | <script type="text/html" id="barDemo"> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width:5px">-</label> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="date" class="layui-input" id="HEndDate" style="width:110px;" placeholder="yyyy-MM-dd"> |
| | | </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> |
| | | </div> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">åºæ¬ä¿¡æ¯</li> |
| | | <li>å
¶ä»ä¿¡æ¯</li> |
| | | <li>æç»ä¿¡æ¯</li> |
| | | </ul> |
| | | </div> |
| | | <!--éèåæ®µ--> |
| | | <input type="hidden" name="lngBillKey" id="lngBillKey"> |
| | | <input type="hidden" name="lngBillSubKey" id="lngBillSubKey"> |
| | | </form> |
| | | <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="btnDel"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>éåº</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | 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 |
| | | , element = layui.element; |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sb_EquipDotCheckBillList_PDA"; |
| | | |
| | | //#region åå§åé¡µé¢ |
| | | laydate.render({ |
| | | elem: '#HBeginDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HEndDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HMakeDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HUpDateDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HCheckDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HDeleteDate' |
| | | , type: 'datetime' |
| | | }); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //è·åæå¤§åæ®å· |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3903' }, |
| | | success: function (d) { |
| | | //console.log(d.data); |
| | | $("#HInterID").val("0"); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | } |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | |
| | | //#region åå§åçé¢ |
| | | |
| | | set_ClearBill(); |
| | | |
| | | //#endregion |
| | | |
| | | //#region ç¹å»äºä»¶å
æ¬on formäºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | var NewRow = { "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "" }; |
| | | switch (obj.event) { |
| | | //æ°å¢ä¸è¡ |
| | | case 'btn-AddLine': btnAddLine(NewRow); |
| | | //å®¡æ ¸ |
| | | case 'btnCheck': btnCheck(1); |
| | | break; |
| | | case 'btn-Edit': btnEditLine(obj); |
| | | //åå®¡æ ¸ |
| | | case 'btnAdutCheck': btnCheck(2); |
| | | break; |
| | | //å é¤ |
| | | case 'btnDel': btnDel(); |
| | | break; |
| | | //éåº |
| | | 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(); |
| | | }); |
| | | |
| | | //è¡çå¬äºä»¶-åå» |
| | | table.on('row(mainTable)', function (obj) { |
| | | var flag = !obj.tr.find(':checkbox:first').prop('checked'); |
| | | obj.tr.find(':checkbox').prop('checked', flag); |
| | | if (flag) { |
| | | obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //设置å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//æ¹åå½åtrèæ¯é¢è²ååä½é¢è² |
| | | } else { |
| | | obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//åæ¶å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:" });//åæ¶å½åtré¢è² |
| | | } |
| | | }); |
| | | //è¡å
äºä»¶ |
| | | table.on('tool(mainTable)', function (obj) { |
| | | set_GridDelete(obj); //è¡å
å é¤ |
| | | set_GridCellCheck(obj); //è¡å
å¿«æ·é®çé |
| | | }); |
| | | |
| | | //è¿å
¥é¡µé¢é»è®¤å
æ 卿¡å½¢ç ä¸ |
| | | $("#HBarCode").focus(); |
| | | |
| | | //åå§åºæ¬ä¿¡æ¯èµå¼ |
| | | $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //ç¹æ£å¼å§æ¶é´ |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //ç¹æ£ç»ææ¶é´ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åæ®æ¥æ |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åå»ºæ¥æ |
| | | |
| | | $("#HDeptID").val(sessionStorage["HDeptID"]); //é¨é¨ID |
| | | $("#HDeptName").val(sessionStorage["HDept"]); //é¨é¨ |
| | | $("#HManagerID").val(sessionStorage["HBillerID"]); //è´è´£äººID |
| | | $("#HManagerName").val(sessionStorage["HUserName"]); //è´è´£äºº |
| | | $("#HMaker").val(sessionStorage["HUserName"]); //å建人 |
| | | //模治å
·æ¡ç æ¯å¦æ«ææ è®° |
| | | var HProcExchBillNoFlag = false; |
| | | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | $('#HBarCode').on('keydown', function (event) { |
| | | if (event.keyCode == 13) { |
| | | GetMeesageByBarCode(); |
| | | } |
| | | }); |
| | | //ç¡®å® |
| | | form.on('submit(QueDin)', function (data) { |
| | | GetMeesageByBarCode(); |
| | | }); |
| | | |
| | | //éåº-å
³é页颿¹æ³ |
| | | $('#Cancel').on('click', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | parent.layui.admin.events.closeThisTabs(); //å
³éé¡µç¾ |
| | | }); |
| | | }) |
| | | |
| | | //æäº¤ |
| | | form.on('submit(Saver)', function (data) {//æäº¤ |
| | | data.field.HMaker = sessionStorage["HUserName"];//å¶å人 |
| | | var oMain = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(table.cache['mainTable']); |
| | | var sMainSub = oMain + ';' + sSubStr; |
| | | if (AllowLoadData(sSubStr)) { |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sb_PDA_EquipDotCheckBill/SaveGetEquipDotCheckBillList", |
| | | async: true, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { |
| | | layer.msg("æäº¤æå"); |
| | | $('#Saver').removeClass("buttom_box_little"); |
| | | $('#Saver').addClass("layui-btn-disabled").attr("disabled", true); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.close(index); |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | |
| | | //æ°å¢ |
| | | form.on('submit(Add)', function (data) { |
| | | $('#Saver').addClass("buttom_box_little"); |
| | | $('#Saver').addClass("layui-btn-disabled").attr("disabled", false); |
| | | $("#HBarCode").removeAttr("readonly");//æ¡å½¢ç æ¸
é¤åªè¯» |
| | | $("#HBarCode").removeAttr("background-color");//æ¡å½¢ç æ¸
é¤èæ¯è² |
| | | |
| | | // æ¸
空表å ï¼âformDataâæ¯è¡¨åçidï¼ |
| | | $("#formData")[0].reset(); |
| | | layui.form.render(); |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": ""}]; |
| | | table.render(option); |
| | | |
| | | $("#HBarCode").focus(); |
| | | //è·åæå¤§åæ®å· |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3903' }, |
| | | success: function (d) { |
| | | //console.log(d.data); |
| | | $("#HInterID").val("0"); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | //mainTable ä¸ºè¡¨æ ¼ID æ³¨ææ¤å¤å¦æID䏿£ç¡®å°å¯¼è´ä½ å¨çå¬å¤éæ¡æ¶è·åä¸å°ä½ éæ©çæ°æ®ï¼åé¢çåªæ¯æ·»å æå é¤é䏿ªé䏿 ·å¼ä»¥åè®¾ç½®èæ¯è²ï¼åä½é¢è² |
| | | layui.each(table.cache.mainTable, function (i, l) { |
| | | if (obj.tr.index() == l.LAY_TABLE_INDEX) { |
| | | l.LAY_CHECKED = flag; |
| | | } |
| | | }); |
| | | $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //ç¹æ£å¼å§æ¶é´ |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //ç¹æ£ç»ææ¶é´ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åæ®æ¥æ |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åå»ºæ¥æ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); //å建人 |
| | | }) |
| | | |
| | | //#region éåºæé® |
| | | form.on('submit(Cancel)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | Pub_Close(2); |
| | | }); |
| | | }) |
| | | }); |
| | | //#endregion |
| | | |
| | | //é¨é¨å¼¹çª |
| | | form.on('submit(Department)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'é¨é¨å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../views/PublicPage/DeptInformation.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HDeptName").val(checkStatus.data[0].HName); |
| | | $("#HDeptID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | //åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åæ¶é´ |
| | | $("#HBeginDate").val(Format(new Date() - 1000 * 60 * 60 * 24 * 30, "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery(); |
| | | DisPlay_HideColumn(); |
| | | } |
| | | |
| | | //表头信æ¯è®¾å¤ä¿å
»è§ç¨ |
| | | form.on('submit(HEquipDotCheckRuleInterist)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: '设å¤ç¹æ£è§ç¨å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../设å¤ç®¡ç/设å¤è§ç¨å/Sb_EquipDotCheckRuleList.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HEquipDotCheckRuleInterNo").val(checkStatus.data[0].åæ®å·); |
| | | $("#HEquipDotCheckRuleInterID").val(checkStatus.data[0].hmainid); |
| | | get_DocCheckItem2(); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | //åææ¾ç¤ºä¸ææ¡ |
| | | function ColFilter() { |
| | | var Organization = '<option value="0" selected="selected" ></option>'; |
| | | for (var i = 1; i < option.cols[0].length; i++) { |
| | | if (option.cols[0][i].hide != true) { |
| | | Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>'; |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | }, |
| | | success: function (layero, index) { |
| | | } |
| | | }); |
| | | }); |
| | | function get_DocCheckItem2() { |
| | | } |
| | | $("#ColName").empty(); |
| | | $("#ColName").append(Organization); |
| | | form.render('select'); |
| | | } |
| | | |
| | | |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | //卿å-ç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetDotCheckRuleItemByDotCheckRuleID", |
| | | url: GetWEBURL() + "/Web/GetEquipmentBillsList", |
| | | type: "GET", |
| | | data: { "HDotCheckRuleInterID": $("#HEquipDotCheckRuleInterID").val() }, |
| | | success: function (result) { |
| | | if (result != null) { |
| | | if (result.count == 1) { |
| | | var BYData = result;// |
| | | var rowdate1 = layui.table.cache["mainTable"]; |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": ""}]; |
| | | table.render(option); |
| | | async: false, |
| | | data: { "sWhere": sWhere, "Type": "DJ" }, |
| | | success: function (data1) { |
| | | |
| | | if (BYData.data.length != 0) //è¡¨ä½æ°æ®ä¸ºç©ºæ¶ |
| | | { |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < BYData.data.length; i++) { |
| | | var checkrow = { |
| | | "HDotCheckItemID": BYData.data[i].HDotCheckItemID, "HDotCheckCode": BYData.data[i].HDotCheckCode, "HDotCheckItem": BYData.data[i].HDotCheckItem, |
| | | "HDotCheckPart": BYData.data[i].HDotCheckPart, "HClaim": rowdate1[i].HClaim, "HManagerID": BYData.data[i].HManagerID, "HManagerCode": BYData.data[i].HManagerCode, |
| | | "HManagerName": BYData.data[i].HManagerName |
| | | }; |
| | | buttonArr.push(checkrow); //å°ä¹åçæ°æ®åå¨ |
| | | if (data1.count == 1) { |
| | | |
| | | var data = []; |
| | | var col = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, "") > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true }); |
| | | } |
| | | table.reload("mainTable", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | } |
| | | } |
| | | else { |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "" }]; |
| | | table.render(option); |
| | | layer.alert("è¯¥è®¾å¤ææ é»è®¤ç¹æ£è®°å½", { icon: 5 }); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | //表头 |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe" } |
| | | , { field: 'HDotCheckItemID', title: 'ç¹æ£é¡¹ç®ID', edit: 'text', hide: true } |
| | | , { field: 'HDotCheckCode', title: 'ç¹æ£é¡¹ç®ä»£ç ', edit: 'text', event: "HDotCheckCode" } |
| | | , { field: 'HDotCheckItem', title: 'ç¹æ£é¡¹ç®', edit: 'text', event: "" } |
| | | , { field: 'HDotCheckPart', title: 'ç¹æ£é¨ä½', edit: 'text', event: "" } |
| | | , { field: 'HClaim', title: 'å
·ä½è¦æ±', edit: 'text' } |
| | | , { field: 'HManagerID', title: 'è´è´£äººä»£ç ', edit: 'text', hide: true } |
| | | , { field: 'HManagerCode', title: 'è´è´£äººä»£ç ', edit: 'text', event: 'HManagerCode' } |
| | | , { field: 'HManagerName', title: 'è´è´£äººåç§°', edit: 'text' } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 150 } |
| | | ]; |
| | | option = { |
| | | id: 'mainTable' |
| | | , elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: true |
| | | , cellMinWidth: 120 |
| | | , height: 500 |
| | | , cols: [columns] |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | }; |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": ""}]; |
| | | table.render(option); |
| | | } |
| | | //å¢å ä¸è¡ |
| | | function btnAddLine(NewRow) { |
| | | var tableBak = table.cache["mainTable"]; //è·åä¹åç¼è¾è¿çè¡¨æ ¼æ°æ® |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < tableBak.length; i++) { |
| | | buttonArr.push(tableBak[i]); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | | buttonArr.push(NewRow); //å¨å°¾é¨å ä¸è¡ |
| | | table.reload("mainTable", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | } |
| | | //ç¼è¾ä¸è¡ |
| | | function btnEditLine() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'ç¼è¾PDA设å¤ç¹æ£' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../设å¤ç®¡ç/Sb_EquipDocCheckItemBillList_PDAEdit.html?OperationType=3&linterid=&HSouceBillType=' |
| | | , resize: false |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , yes: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var HDotCheckItemID = parent.layer.getChildFrame('#HDotCheckItemID').val(); |
| | | var HDotCheckCode = parent.layer.getChildFrame('#HDotCheckCode').val(); |
| | | var HDotCheckItem = parent.layer.getChildFrame('#HDotCheckItem').val(); |
| | | var HDotCheckPart = parent.layer.getChildFrame('#HDotCheckPart').val(); |
| | | var HClaim = parent.layer.getChildFrame('#HClaim').val(); |
| | | var HManagerID = parent.layer.getChildFrame('#HManagerID').val(); |
| | | var HManagerCode = parent.layer.getChildFrame('#HManagerCode').val(); |
| | | var HManagerName = parent.layer.getChildFrame('#HManagerName').val(); |
| | | if (HDotCheckItemID == "") { |
| | | return layer.msg('è¯·éæ©ç¹æ£é¡¹ç®'); |
| | | } |
| | | if (HManagerID == "") { |
| | | return layer.msg('è¯·éæ©è´£ä»»äºº'); |
| | | } |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | var checkrow = { |
| | | "HDotCheckItemID": HDotCheckItemID, "HDotCheckCode": HDotCheckCode, "HDotCheckItem": HDotCheckItem, |
| | | "HDotCheckPart": HDotCheckPart, "HClaim": HClaim, "HManagerID": HManagerID, "HManagerCode":HManagerCode, |
| | | "HManagerName":HManagerName |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , cellMinWidth: 120 |
| | | , page: true |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , height: 'full-70' |
| | | , totalRow: false //å¼å¯å计 |
| | | , cols: [col] |
| | | , data: data1.data |
| | | }; |
| | | buttonArr.push(checkrow); //å°ä¹åçæ°æ®åå¨ |
| | | table.reload("mainTable", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , end: function () { |
| | | table.render(option); |
| | | |
| | | } |
| | | , cancel: function () { |
| | | |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | // è¡¨æ ¼è¡å
äºä»¶å é¤ |
| | | function set_GridDelete(obj) { |
| | | var data = obj.data; |
| | | var rowIndex = $(obj.tr).attr("data-index"); |
| | | if (obj.event === 'del') { |
| | | layer.confirm('ççå é¤è¡ä¹', function (index) { |
| | | console.log("ç´¢å¼ä¸º:" + rowIndex); |
| | | if (rowIndex === '0') { |
| | | layer.msg('é¦è¡æ æ³å é¤ï¼ï¼ï¼'); |
| | | } else { |
| | | //obj.del(); |
| | | //layer.close(index); |
| | | var oldData = table.cache["mainTable"]; |
| | | oldData.splice(obj.tr.data('index'), 1); |
| | | table.reload('mainTable', { data: oldData }); |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | //æ°æ®éªè¯ |
| | | function AllowLoadData(sSubStr) { |
| | | if ($("#HEquipName").val() == '') { |
| | | layer.msg("è®¾å¤æ²¡æéæ©", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | //å¤æç©ææç»é¡¹ |
| | | if (typeof (sSubStr) == "undefined" || sSubStr == "" || sSubStr == "[]") { |
| | | layer.msg("没æç©ææç»è®°å½", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") { |
| | | sSubStr = JSON.parse(sSubStr); |
| | | for (var i = 0; i < sSubStr.length; i++) { |
| | | if (sSubStr[i].HDotCheckCode == "" || sSubStr[i].HDotCheckItemID == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,ç¹æ£é¡¹ç®ä»£ç ä¿¡æ¯ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | if (sSubStr[i].HManagerCode == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,è´è´£äººä»£ç ä¿¡æ¯ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | else { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | else { |
| | | return true; |
| | | } |
| | | } |
| | | //æ«æ¡ç |
| | | function GetMeesageByBarCode(obj) { //è¿åå·¥ä½ä¸å¿ |
| | | var HBarCode = $('#HBarCode').val();//æ¡å½¢ç ï¼æµè½¬å¡å·ï¼ï¼æ°æ®åºä¸ä¸ºåæ®å·ï¼ |
| | | if (!HBarCode) { |
| | | layer.msg("æ¡å½¢ç ä¸è½ä¸ºç©ºï¼") |
| | | return; |
| | | } |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown", |
| | | type: "GET", |
| | | data: { "HBarCode": HBarCode }, |
| | | success: function (result) { |
| | | if (result.data.length == 1) { |
| | | var data = result.data[0]; |
| | | $("#HEquipID").val(data.HItemID); |
| | | $("#HBarName").val(data.HName); |
| | | $("#HBarSpec").val(data.HModel); |
| | | $("#HBarModel").val(data.HModel2); |
| | | $("#HQty").val(1); |
| | | $("#HBarCode").attr("readonly", "readonly");//æ¡å½¢ç åªè¯» |
| | | $("#HBarCode").css("background-color", "#efefef4d"); |
| | | HProcExchBillNoFlag = true; |
| | | get_DocCheckItem(); |
| | | layer.close(index); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg("æªæ¥æ¾å°æ°æ®", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { |
| | | ColFilter(); |
| | | } |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.close(index); |
| | | layer.msg("æ¥å£è¯·æ±å¤±è´¥ï¼" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | } |
| | | function get_DocCheckItem() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetDotCheckRuleItemByEquipProjectID", |
| | | type: "GET", |
| | | data: { "EquipProjectID": $("#HEquipID").val() }, |
| | | success: function (result) { |
| | | if (result != null) { |
| | | if (result.count == 1) { |
| | | var BYData = result;// |
| | | var rowdate1 = layui.table.cache["mainTable"]; |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "" }]; |
| | | table.render(option); |
| | | |
| | | if (BYData.data.length != 0) //è¡¨ä½æ°æ®ä¸ºç©ºæ¶ |
| | | { |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < BYData.data.length; i++) { |
| | | var checkrow = { |
| | | "HDotCheckItemID": BYData.data[i].HDotCheckItemID, "HDotCheckCode": BYData.data[i].HDotCheckCode, "HDotCheckItem": BYData.data[i].HDotCheckItem, |
| | | "HDotCheckPart": BYData.data[i].HDotCheckPart, "HClaim": rowdate1[i].HClaim, "HManagerID": BYData.data[i].HManagerID, "HManagerCode": BYData.data[i].HManagerCode, |
| | | "HManagerName": BYData.data[i].HManagerName |
| | | }; |
| | | buttonArr.push(checkrow); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | | table.reload("mainTable", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | } |
| | | } |
| | | else { |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "" }]; |
| | | table.render(option); |
| | | layer.alert("è¯¥è®¾å¤ææ é»è®¤ç¹æ£è®°å½", { icon: 5 }); |
| | | } |
| | | } |
| | | layer.msg('é误' + err, { |
| | | icon: 5, |
| | | time: 20000 |
| | | }, function () { |
| | | //do something |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | //以ä¸ä¸ºlayui模å |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HBeginDate = $("#HBeginDate").val();//ä¸è¾¾æ¥æ å¼å§æ¥æ |
| | | var HEndDate = $("#HEndDate").val();//ç»ææ¥æ |
| | | |
| | | |
| | | if (HBeginDate != "" && HEndDate != "") { |
| | | sWhere += " and æ¥æ between '" + HBeginDate + "' and '" + HEndDate + "' "; |
| | | } |
| | | |
| | | get_Display(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | //åå§åæ¶é´ |
| | | $("#HBeginDate").val(Format(new Date() - 1000 * 60 * 60 * 24 * 30, "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HMaterNumber").val(""); |
| | | $("#HBillNo").val(""); |
| | | $("#HProductName").val(""); |
| | | $("#HProductModel").val(""); |
| | | $("#ColContent").val(""); |
| | | $("#ColName").val("0"); |
| | | $("#Comparator").val("0"); |
| | | ColFilter(); |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //å é¤ |
| | | function btnDel() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hmainid = data[0].hmainid; |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | var wait = layer.load(); |
| | | //é»è¾å 餿¹æ³ |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/ProcessCheck/DelProcessCheckBill', |
| | | type: "GET", |
| | | data: { "lngBillKey": hmainid, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | console.log('gouba' + result); |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(wait); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | get_FastQuery(); |
| | | }); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | |
| | | } |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | | for (var i = 1; i < option.cols[0].length; 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 = ["hmainid","HMaterID"];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | | for (var i = 0; i < option.cols[0].length - 1; i++) { |
| | | if (dataCol[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> |
| | | </html> |