| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <title>å·¥åºè¿å·¥è®°å½ç¼è¾</title> |
| | | <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> |
| | | .main-btn { /*头é¨ä¸»æé®*/ |
| | | padding: 0 2px; /*è°æ´æé®å·¦å³ç©ºé大å°*/ |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | .btn-title { |
| | | font-size: 16px; |
| | | } |
| | | /* 鲿¢ä¸ææ¡ç䏿å表被éè---å¿
须设置--- */ |
| | | .layui-table-cell { |
| | | overflow: visible !important; |
| | | } |
| | | /* 使å¾ä¸ææ¡ä¸åå
æ ¼å好åé */ |
| | | td .layui-form-select { |
| | | margin-top: -10px; |
| | | margin-left: -15px; |
| | | margin-right: -15px; |
| | | } |
| | | |
| | | .layui-form-item .layui-inline { |
| | | margin-top: 5px; |
| | | margin-bottom: 5px; |
| | | margin-right: 0px; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | width: 25%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | | <div class="layui-card" style="padding: 15px;"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" lay-filter="component-form-group" action=""> |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="btnSave" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btnSave">ä¿å</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn_print">æå°</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">éèå设置</button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-POStockInBill"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1" style="padding:1px;" class="layui-this">åºæ¬ä¿¡æ¯</li> |
| | | <li lay-id="2" style="padding:1px;">å
¶ä»ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <!--åºæ¬ä¿¡æ¯--> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">æ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="date" class="layui-input" name="HDate" id="HDate"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">è´è´£äºº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HEmpName" id="HEmpName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHEmpID" id="btnHEmpID" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">æµè½¬å¡</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HProcExchInterID" id="HProcExchInterID" value="0"> |
| | | <input type="hidden" name="HProcExchEntryID" id="HProcExchEntryID" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç产车é´</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HWorkShopName" id="HWorkShopName" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HWorkShopID" id="HWorkShopID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç©æä»£ç </label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HMaterID" id="HMaterID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç©æåç§°</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">è§æ ¼åå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HModel" id="HModel" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">计éåä½</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HUnitName" id="HUnitName" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HUnitID" id="HUnitID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">è®¢åæ°é</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HPlanQty" id="HPlanQty" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">è¿å·¥æ°é</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HQty" id="HQty" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">å¼å§å·¥åº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HProcBegName" id="HProcBegName" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HProcBegID" id="HProcBegID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç»æå·¥åº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HProcEndName" id="HProcEndName" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HProcEndID" id="HProcEndID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">å¼å§æµæ°´å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HProcExchBegNO" id="HProcExchBegNO" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç»ææµæ°´å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HProcExchEndNO" id="HProcExchEndNO" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç产ç»ç»</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HPRDORGName" id="HPRDORGName" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HPRDORGID" id="HPRDORGID" lay-verify="HPRDORGID"><!--HSTOCKORGID--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç产订å</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HICMOInterID" id="HICMOInterID" lay-verify="HICMOInterID"> |
| | | <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" lay-verify="HICMOEntryID"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">订åè·è¸ªå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">å
é¨åæ®å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HInnerBillNo" id="HInnerBillNo"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs6 layui-inline"> |
| | | <label class="layui-form-label" style="width:12.5%">夿³¨</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="请è¾å
¥å
容" onmouseover="this.title=this.value" style="width:610px;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--å
¶ä»ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <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="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly> |
| | | </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="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly> |
| | | </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="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly> |
| | | </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="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly> |
| | | </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="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly> |
| | | </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="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly> |
| | | </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="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" 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-CopyLine"><i class="layui-icon layui-icon-form"></i>å¤å¶ä¸è¡</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |
| | | <script type="text/html" id="barDemo"> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <!--è¡ä¸æéæ©(æ¯å¦å§å¤)--> |
| | | <script type="text/html" id="HSupFlag"> |
| | | <select name="HSupFlag" lay-filter="HSupFlag" id="HSupFlag{{d.LAY_TABLE_INDEX+1}}"> |
| | | <option value="false">å¦</option> |
| | | <option value="true">æ¯</option> |
| | | </select> |
| | | </script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | //#region å
Œ
±åé |
| | | |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | var option; |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | var params = get_UrlVars(); |
| | | if (typeof (params[params[0]]) == "undefined") { |
| | | var OperationType = -1;//æä½ç±»å |
| | | } else { |
| | | var OperationType = params[params[0]];//æä½ç±»å |
| | | var linterid = params[params[1]];//æºåid |
| | | var HEntryID = params[params[2]];//æºååid |
| | | } |
| | | |
| | | //å·¥åºè¿å·¥æ°å¢ |
| | | if (OperationType == 1) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3797' }, |
| | | success: function (d) { |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | } |
| | | }); |
| | | |
| | | //æ¥è¯¢å·¥åºæµè½¬å¡ |
| | | get_ProcessExchange(); |
| | | } else if (OperationType == 3) { |
| | | RoadBillMain(linterid); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //éæ©è´è´£äºº |
| | | form.on('submit(btnHEmpID)', function () { |
| | | get_btnHEmpID(); |
| | | }); |
| | | |
| | | //è¡éæ©å¤çï¼æ¯å¦å§å¤ï¼ |
| | | form.on('select(HSupFlag)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HSupFlag = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | //æ°å¢è¡è¡¨æ ¼æ°æ® |
| | | var NewRow = { |
| | | "HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "", |
| | | "HCenterID": 0, "HCenterNumber": "", "HCenterName": "", |
| | | "HDeptID": 0, "HDeptNumber": "", "HDeptName": "", |
| | | "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false", |
| | | "HQty": 0, "HRemark": "" |
| | | }; |
| | | switch (obj.event) { |
| | | case 'btn-AddLine': |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | break; |
| | | case 'btn-CopyLine': |
| | | var copydata = JSON.stringify(data); |
| | | if (data.length <= 0) { |
| | | layer.msg("è¯·éæ©éè¦å¤å¶çä¸è¡ï¼"); |
| | | } |
| | | else if (data.length > 1) { |
| | | layer.msg("åªè½éæ©å¤å¶ä¸è¡ï¼"); |
| | | } |
| | | else { |
| | | var copydata2 = copydata.substring(1, copydata.length);//å»é¤é¦è¡å符'[' |
| | | var copyrow = copydata2.substring(0, copydata2.length - 1);//å»é¤æ«å°¾å符']' |
| | | table.cache["mainTable"].push(JSON.parse(copyrow));//å°å¤å¶çè¡å¼ºè½¬æjson追å å°è¡¨æ ¼ä¸ |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | } |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | //è¡å
äºä»¶ |
| | | table.on('tool(mainTable)', function (obj) { |
| | | var data = obj.data; |
| | | var rowIndex = $(obj.tr).attr("data-index"); |
| | | if (obj.event === 'del') { |
| | | layer.confirm('ççå é¤è¡åï¼', function (index) { |
| | | if (rowIndex === '0') { |
| | | layer.msg('é¦è¡æ æ³å é¤ï¼ï¼ï¼'); |
| | | } else { |
| | | obj.del(); |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | if (event.key == "F7") { |
| | | if (obj.event == 'HProcCheck') { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å·¥åºå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_ProcList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index]; |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | obj.update({ |
| | | HProcName: checkStatus.data[0].å·¥åº |
| | | , HProcID: checkStatus.data[0].HItemID |
| | | , HProcNumber: checkStatus.data[0].å·¥åºä»£ç |
| | | }); |
| | | |
| | | layer.close(layer.index); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | }, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | if (obj.event === 'HWorkCenterCheck') {//å·¥ä½ä¸å¿ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å å·¥ä¸å¿å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_WorkCenterList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index]; |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | obj.update({ |
| | | HCenterName: checkStatus.data[0].å·¥ä½ä¸å¿ |
| | | , HCenterID: checkStatus.data[0].HItemID |
| | | , HCenterNumber: checkStatus.data[0].å·¥ä½ä¸å¿ä»£ç |
| | | }); |
| | | layer.close(layer.index); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | }, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | if (obj.event === 'HSupCheck') {//ä¾åºå |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'ä¾åºåå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../../views/åºç¡èµæ/éè´åºç¡èµæ/Gy_Supplier.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index]; |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | obj.update({ |
| | | HSupName: checkStatus.data[0].ä¾åºååç§° |
| | | , HSupID: checkStatus.data[0].HItemID |
| | | , HSupNumber: checkStatus.data[0].ä¾åºå代ç |
| | | }); |
| | | layer.close(layer.index); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | }, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | if (obj.event === 'HDeptCheck') {//é¨é¨ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'é¨é¨å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_DepartmentList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index]; |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | obj.update({ |
| | | HDeptName: checkStatus.data[0].HName |
| | | , HDeptID: checkStatus.data[0].HItemID |
| | | , HDeptNumber: checkStatus.data[0].HNumber |
| | | }); |
| | | layer.close(layer.index); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | }, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | obj.event = ""; |
| | | return false; |
| | | } |
| | | }) |
| | | //å廿¹åä¸å¯ç¼è¾å¼ |
| | | if (obj.event === 'isEditCheck') { |
| | | var flag = obj.data.isEdit; |
| | | var flagValue = obj.data.isEditValue; |
| | | if (flagValue === "false") { |
| | | flagValue = "true"; |
| | | flag = "æ¯"; |
| | | } |
| | | else if (flagValue === "true") { |
| | | flagValue = "false"; |
| | | flag = "å¦"; |
| | | } |
| | | else { |
| | | flagValue = "false"; |
| | | flag = "å¦"; |
| | | } |
| | | obj.update({ |
| | | isEdit: flag |
| | | , isEditValue: flagValue |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | //ä¿åæäº¤ |
| | | form.on('submit(btnSave)', function (data) {//æäº¤ |
| | | if (AllowLoadData(data)) { |
| | | set_AddNew(data); |
| | | } |
| | | }); |
| | | |
| | | //éåº |
| | | form.on('submit(Cancel)', function (data) { |
| | | if (OperationType != "") { |
| | | Pub_Close(1); |
| | | } |
| | | }); |
| | | |
| | | //æå° |
| | | form.on('submit(btn_print)', function (data) { |
| | | btn_print(); |
| | | }); |
| | | |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | $("#HDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//å¼å§æ¥æ |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | //表头 |
| | | columns = [ //表头 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', totalRow: true } |
| | | , { field: 'HProcNo', title: 'æµæ°´å·', edit: 'text' } |
| | | , { field: 'HProcID', title: 'å·¥åºID', hide: true } |
| | | , { field: 'HProcNumber', title: 'å·¥åºä»£ç ', edit: 'text', event: "HProcCheck" } |
| | | , { field: 'HProcName', title: 'å·¥åºåç§°' } |
| | | , { field: 'HWorkRemark', title: 'å 工说æ', edit: 'text' } |
| | | , { field: 'HCenterID', title: 'å·¥ä½ä¸å¿ID', hide: true } |
| | | , { field: 'HCenterNumber', title: 'å·¥ä½ä¸å¿ä»£ç ', edit: 'text', event: "HWorkCenterCheck" } |
| | | , { field: 'HCenterName', title: 'å·¥ä½ä¸å¿åç§°' } |
| | | , { field: 'HQty', title: 'è¿å·¥æ°é', edit: 'text' } |
| | | , { field: 'HDeptID', title: 'é¨é¨ID', hide: true } |
| | | , { field: 'HDeptNumber', title: 'é¨é¨ä»£ç ', edit: 'text', event: "HDeptCheck" } |
| | | , { field: 'HDeptName', title: 'é¨é¨' } |
| | | , { field: 'HSupID', title: 'ä¾åºåID', hide: true } |
| | | , { field: 'HSupNumber', title: 'ä¾åºå代ç ', edit: 'text', event: "HSupCheck" } |
| | | , { field: 'HSupName', title: 'ä¾åºå' } |
| | | , { field: 'HSupFlag', title: 'æ¯å¦å§å¤', templet: '#HSupFlag' } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text',width:"300" } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]; |
| | | option = { |
| | | id: 'mainTable' |
| | | , elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: false |
| | | , cellMinWidth: 120 |
| | | , height: 350 |
| | | , cols: [columns] |
| | | , limit: Number.MAX_VALUE//é»è®¤æ¾ç¤ºå
¨é¨ |
| | | , done: function (res, curr, count) { |
| | | option.data = res.data; |
| | | //廿䏿æ¡å¤±ç¦äºä»¶å¦åå¨ä¸ææ¡éè¾å
¥å¼ |
| | | $('.layui-form-select').find('input').unbind("blur"); |
| | | //è¡¨æ ¼éè½½åæ¾ä¸ææ¡éçæ°æ® |
| | | $('tr').each(function (e) { |
| | | var $cr = $(this); |
| | | var dataIndex = $cr.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TNDEX == dataIndex) { |
| | | $cr.find('input').val(value.HSupFlag); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | }; |
| | | option.data = [{ |
| | | "HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "", |
| | | "HCenterID": 0, "HCenterNumber": "", "HCenterName": "", |
| | | "HDeptID": 0, "HDeptNumber": "", "HDeptName": "", |
| | | "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false", |
| | | "HQty": 0, "HRemark": "" |
| | | }]; |
| | | table.render(option); |
| | | |
| | | } |
| | | |
| | | //è´è´£äºº |
| | | function get_btnHEmpID() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'èå表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_EmployeeList.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HEmpID").val(checkStatus.data[0].HItemID);//è´è´£äººid |
| | | $("#HEmpName").val(checkStatus.data[0].èååç§°);//è´è´£äººåç§° |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æ¥è¯¢å·¥åºæµè½¬å¡ |
| | | function get_ProcessExchange() { |
| | | var sWhere = " where hmainid=" + linterid + " and (HEntryID=" + HEntryID + " or HEntryID>" + HEntryID + ") "; |
| | | //ç¼è¾å è½½æ°æ® |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Sc_ProcExchRecordBackBill/GetProcessExchangeBillSub', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $("#HProcExchBillNo").val(result.data[0]["åæ®å·"]); |
| | | $("#HProcExchInterID").val(result.data[0]["hmainid"]); |
| | | $("#HProcExchEntryID").val(result.data[0]["hsubid"]); |
| | | $("#HWorkShopID").val(result.data[0]["HWorkShopID"]); |
| | | $("#HWorkShopName").val(result.data[0]["ç产车é´"]); |
| | | $("#HMaterNumber").val(result.data[0]["产å代ç "]); |
| | | $("#HMaterID").val(result.data[0]["HMaterID"]); |
| | | $("#HMaterName").val(result.data[0]["产ååç§°"]); |
| | | $("#HModel").val(result.data[0]["è§æ ¼åå·"]); |
| | | $("#HUnitID").val(result.data[0]["HUnitID"]); |
| | | $("#HUnitName").val(result.data[0]["åä½"]); |
| | | $("#HPlanQty").val(result.data[0]["ç产æ°é"]); |
| | | $("#HQty").val(result.data[0]["è®¡åæ°é"]); |
| | | $("#HProcBegName").val(result.data[0]["å·¥åºåç§°"]); |
| | | $("#HProcBegID").val(result.data[0]["HProcID"]); |
| | | $("#HProcEndName").val(result.data[1]["å·¥åºåç§°"]); |
| | | $("#HProcEndID").val(result.data[1]["HProcID"]); |
| | | $("#HProcExchBegNO").val(result.data[0]["æµæ°´å·"]); |
| | | $("#HProcExchEndNO").val(result.data[1]["æµæ°´å·"]); |
| | | $("#HPRDORGID").val(result.data[0]["HPRDORGID"]); |
| | | $("#HPRDORGName").val(result.data[0]["ç»ç»"]); |
| | | $("#HICMOBillNo").val(result.data[0]["ä»»å¡åå·"]); |
| | | $("#HICMOInterID").val(result.data[0]["hicmointerid"]); |
| | | $("#HICMOEntryID").val(result.data[0]["HICMOEntryID"]); |
| | | $("#HOrderProcNO").val(result.data[0]["HOrderProcNO"]); |
| | | } else { |
| | | layer.msg(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index0); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | //é空éªè¯ |
| | | function AllowLoadData(data) { |
| | | |
| | | if ($("#HEmpID").val()=="0") { |
| | | layer.msg("è¯·éæ©è´è´£äºº!"); |
| | | return false; |
| | | } |
| | | |
| | | var num = []; |
| | | var num_2 = []; |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | if (option.data[i] != "") { |
| | | if (!option.data[i].HProcNo) { |
| | | var indexRow = i + 1; |
| | | layer.msg("第" + indexRow + "è¡ï¼æµæ°´å·ä¸è½ä¸ºç©ºï¼"); |
| | | return; |
| | | } |
| | | if (option.data[i].HProcNo == 0) { |
| | | var indexRow = i + 1; |
| | | layer.msg("第" + indexRow + "è¡ï¼æµæ°´å·ä¸è½ä¸º0ï¼"); |
| | | return; |
| | | } |
| | | if (!option.data[i].HProcID) { |
| | | var indexRow = i + 1; |
| | | layer.msg("第" + indexRow + "è¡ï¼å·¥åºä¸è½ä¸ºç©ºï¼"); |
| | | return; |
| | | } |
| | | if (!option.data[i].HCenterID) { |
| | | var indexRow = i + 1; |
| | | layer.msg("第" + indexRow + "è¡ï¼å·¥ä½ä¸å¿ä¸è½ä¸ºç©ºï¼"); |
| | | return; |
| | | } |
| | | |
| | | if (parseInt(option.data[i].HQty) > parseInt($("#HQty").val())) { |
| | | var indexRow = i + 1; |
| | | layer.msg("第" + indexRow + "è¡ï¼è¿å·¥æ°éè¶
åºéè¦è¿å·¥æ°éï¼"); |
| | | return; |
| | | } |
| | | |
| | | //æµæ°´å· |
| | | if ($.inArray(option.data[i]["HProcNo"], num) == -1) { |
| | | num.push(option.data[i]["HProcNo"]); |
| | | } |
| | | else { |
| | | layer.msg("第" + (i + 1) + "è¡,æµæ°´å·:" + option.data[i]["HProcNo"] + "éå¤!"); |
| | | return false; |
| | | } |
| | | |
| | | if (parseInt(option.data[i].HProcNo) < parseInt($("#HProcExchBegNO").val())) { |
| | | var indexRow = i + 1; |
| | | layer.msg("第" + indexRow + "è¡ï¼æµæ°´å·å°äºå¼å§æµæ°´å·ï¼"); |
| | | return; |
| | | } |
| | | |
| | | if (parseInt(option.data[i].HProcNo) > parseInt($("#HProcExchEndNO").val())) { |
| | | var indexRow = i + 1; |
| | | layer.msg("第" + indexRow + "è¡ï¼æµæ°´å·å¤§äºç»ææµæ°´å·ï¼"); |
| | | return; |
| | | } |
| | | |
| | | |
| | | //å·¥åº |
| | | if ($.inArray(option.data[i]["HProcName"], num_2) == -1) { |
| | | num_2.push(option.data[i]["HProcName"]); |
| | | } |
| | | else { |
| | | layer.msg("第" + (i + 1) + "è¡,å·¥åº:" + option.data[i]["HProcName"] + "éå¤!"); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | //ä¿åHMaker |
| | | function set_AddNew(data) { |
| | | |
| | | var num_1 = []; |
| | | for (var i = 0; i < table.cache["mainTable"].length; i++) { |
| | | if (table.cache["mainTable"][i] != "") { |
| | | table.cache["mainTable"][i].LAY_TABLE_INDEX = i; |
| | | num_1.push(table.cache["mainTable"][i]) |
| | | } |
| | | } |
| | | |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(num_1); |
| | | var sMainSub = sMainStr + ';' + sSubStr +';' + OperationType + ";" + sessionStorage["HUserName"]; |
| | | |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_ProcExchRecordBackBill/Sc_ProcExchRecordBackBillAddBill", |
| | | async: true, |
| | | data: { "sMainSub": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { |
| | | $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true); |
| | | layer.close(index); |
| | | layer.msg("æäº¤æå"); |
| | | } |
| | | 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: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ç¼è¾ 页é¢èµå¼ |
| | | function RoadBillMain(linterid)//å 载表头 |
| | | { |
| | | var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and hmainid=" + linterid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_ProcExchRecordBackBill/Sc_ProcExchRecordBackBillList", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (d) { |
| | | if (d.count == 1) { |
| | | //主表 |
| | | $("#HBillNo").val(d.data[0]["åæ®å·"]); |
| | | $("#HInterID").val(d.data[0]["hmainid"]); |
| | | $("#HDate").val(Format(d.data[0]["æ¥æ"], "yyyy-MM-dd")); |
| | | $("#HEmpName").val(d.data[0]["è´è´£äºº"]); |
| | | $("#HEmpID").val(d.data[0]["HEmpID"]); |
| | | $("#HProcExchBillNo").val(d.data[0]["æµè½¬å¡å·"]); |
| | | $("#HProcExchInterID").val(d.data[0]["æµè½¬å¡ä¸»å
ç "]); |
| | | $("#HProcExchEntryID").val(d.data[0]["æµè½¬å¡åå
ç "]); |
| | | $("#HWorkShopID").val(d.data[0]["HWorkShopID"]); |
| | | $("#HWorkShopName").val(d.data[0]["ç产车é´"]); |
| | | $("#HMaterNumber").val(d.data[0]["产å代ç "]); |
| | | $("#HMaterID").val(d.data[0]["HMaterID"]); |
| | | $("#HMaterName").val(d.data[0]["产ååç§°"]); |
| | | $("#HModel").val(d.data[0]["è§æ ¼åå·"]); |
| | | $("#HUnitID").val(d.data[0]["HUnitID"]); |
| | | $("#HUnitName").val(d.data[0]["åä½"]); |
| | | $("#HPlanQty").val(d.data[0]["è®¢åæ°é"]); |
| | | $("#HQty").val(d.data[0]["è¿å·¥æ°é"]); |
| | | $("#HProcBegName").val(d.data[0]["è¿å·¥å¼å§å·¥åº"]); |
| | | $("#HProcBegID").val(d.data[0]["HProcBegID"]); |
| | | $("#HProcEndName").val(d.data[0]["è¿å·¥ç»æå·¥åº"]); |
| | | $("#HProcEndID").val(d.data[0]["HProcEndID"]); |
| | | $("#HProcExchBegNO").val(d.data[0]["è¿å·¥å¼å§æµæ°´å·"]); |
| | | $("#HProcExchEndNO").val(d.data[0]["è¿å·¥ç»ææµæ°´å·"]); |
| | | $("#HPRDORGID").val(d.data[0]["HPRDORGID"]); |
| | | $("#HPRDORGName").val(d.data[0]["ç»ç»"]); |
| | | $("#HICMOBillNo").val(d.data[0]["ç产订åå·"]); |
| | | $("#HICMOInterID").val(d.data[0]["HICMOInterID"]); |
| | | $("#HICMOEntryID").val(d.data[0]["HICMOEntryID"]); |
| | | $("#HOrderProcNO").val(d.data[0]["订åè·è¸ªå·"]); |
| | | $("#HInnerBillNo").val(d.data[0]["å
é¨åæ®å·"]); |
| | | $("#HRemark").val(d.data[0]["è¡¨å¤´å¤æ³¨"]); |
| | | $("#HMakeDate").val(d.data[0]["å¶å人"]==""?"":Format(d.data[0]["å¶åæ¥æ"], "yyyy-MM-dd")); |
| | | $("#HMaker").val(d.data[0]["å¶å人"]); |
| | | $("#HCheckDate").val(d.data[0]["å®¡æ ¸äºº"] == "" ? "" :Format(d.data[0]["å®¡æ ¸æ¥æ"], "yyyy-MM-dd")); |
| | | $("#HChecker").val(d.data[0]["å®¡æ ¸äºº"]); |
| | | $("#HCloseDate").val(d.data[0]["å
³é人"] == "" ? "" :Format(d.data[0]["å
³éæ¥æ"], "yyyy-MM-dd")); |
| | | $("#HCloseMan").val(d.data[0]["å
³é人"]); |
| | | $("#HUpDateDate").val(d.data[0]["ä¿®æ¹äºº"] == "" ? "" :Format(d.data[0]["ä¿®æ¹æ¥æ"], "yyyy-MM-dd")); |
| | | $("#HUpDater").val(d.data[0]["ä¿®æ¹äºº"]); |
| | | $("#HDeleteDate").val(d.data[0]["ä½åºäºº"] == "" ? "" :Format(d.data[0]["ä½åºæ¥æ"], "yyyy-MM-dd")); |
| | | $("#HDeleteMan").val(d.data[0]["ä½åºäºº"]); |
| | | |
| | | var rowdata = []; |
| | | for (var i = 0; i < d.data.length; i++) { |
| | | //å表 èµå¼ |
| | | rowdata.push({ |
| | | "HProcNo": d.data[i]["æµæ°´å·"], "HProcID": d.data[i]["HProcID"], "HProcNumber": d.data[i]["å·¥åºä»£ç "], "HProcName": d.data[i]["å·¥åº"], "HWorkRemark": d.data[i]["å 工说æ"], |
| | | "HCenterID": d.data[i]["HCenterID"], "HCenterNumber": d.data[i]["å·¥ä½ä¸å¿ä»£ç "], "HCenterName": d.data[i]["å·¥ä½ä¸å¿"], |
| | | "HDeptID": d.data[i]["HDeptID"], "HDeptNumber": d.data[i]["å 工车é´ä»£ç "], "HDeptName": d.data[i]["å 工车é´"], |
| | | "HSupID": d.data[i]["HSupID"], "HSupNumber": d.data[i]["ä¾åºå代ç "], "HSupName": d.data[i]["ä¾åºå"], "HSupFlag": d.data[i]["å§å¤æ è®°"] == 1 ? true : false, |
| | | "HQty": d.data[i]["åè¿å·¥æ°é"], "HRemark": d.data[i]["表ä½å¤æ³¨"] |
| | | }); |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | |
| | | for (var i = 0; i < d.data.length; i++) { |
| | | //å§å¤æ è®° |
| | | $('#HSupFlag' + (i + 1)).find("option[value='" + d.data[i].å§å¤æ è®° + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | } else { |
| | | layer.msg(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æå° |
| | | function btn_print() { |
| | | |
| | | } |
| | | |
| | | function get_UrlVars() { |
| | | var vars = [], hash; |
| | | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); |
| | | for (var i = 0; i < hashes.length; i++) { |
| | | hash = hashes[i].split('='); |
| | | vars.push(hash[0]); |
| | | vars[hash[0]] = hash[1]; |
| | | } |
| | | return vars; |
| | | } |
| | | |
| | | //#endregion |
| | | }) |
| | | </script> |