| | |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <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/zgqCustom/zgqCustom.js"></script> |
| | | <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> |
| | | <script src="../../../layuiadmin/PageTitle.js"></script> |
| | | <style type="text/css"> |
| | | .layui-form-item .layui-inline { |
| | | margin-right: 0; |
| | | } |
| | | |
| | | html { |
| | | background-color: white; |
| | | color: white; |
| | | } |
| | | |
| | | .layui-table-cell { |
| | | <script src="../../../layuiadmin/grwebapp.js"></script> |
| | | <script src="../../CreateControl.js"></script> |
| | | <style> |
| | | td:has(select) .layui-table-cell { |
| | | overflow: visible !important; |
| | | padding: 0; |
| | | } |
| | | |
| | | /* 使å¾ä¸ææ¡ä¸åå
æ ¼å好åé */ |
| | | td .layui-form-select { |
| | | margin-top: -10px; |
| | | margin-left: -15px; |
| | | margin-right: -15px; |
| | | /* 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%; |
| | | } |
| | | |
| | | .layui-table th, .layui-table td { |
| | | white-space: nowrap; /* 䏿¢è¡ */ |
| | | text-overflow: ellipsis; /* æ¾ç¤ºçç¥å· */ |
| | | } |
| | | </style> |
| | | </head> |
| | |
| | | <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=""> |
| | | <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">ä¿å</button> |
| | | <button type="button" id="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_PrintReport" disabled>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">éåº</button> |
| | | <button type="button" id="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_Print" disabled>æå°</button> |
| | | <!--<button type="button" id="batchPrint-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_BatchPrint" disabled>æ¹éæå°</button>--> |
| | | <button type="button" id="batchPrint-btn1" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_BatchPrint_CMR_ZS" disabled>æ³¨å¡æ¹éæå°</button> |
| | | <button type="button" id="batchPrint-btn2" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_BatchPrint_CMR_JR" disabled>å·ç»æ¹éæå°</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit" style="margin-left:50px !important;">éåº</button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-BatchSplit"> |
| | | <h1 style="text-align: center; padding: 10px 0;"><b>æµè½¬å¡æ¹éæå</b></h1> |
| | | </div> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable" style="margin-top:5px;"></table> |
| | | <script type="text/html" id="xuhao"> |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | <div class="layui-tab" lay-filter="tab-BatchSplit"> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <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-CopyLine"><i class="layui-icon layui-icon-form"></i>å¤å¶ä¸è¡</button> |
| | | </div> |
| | | </script> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!--éæ©æ¡--> |
| | | <script type="text/html" id="HMouldNum-select"> |
| | | <select name="HMouldNum" lay-filter="HMouldNum" id="HMouldNum{{d.LAY_TABLE_INDEX+1}}"> |
| | | <option value="0#" selected>0#</option> |
| | | <option value="1#">1#</option> |
| | | <option value="2#" >2#</option> |
| | | <option value="3#">3#</option> |
| | | <option value="4#">4#</option> |
| | | <option value="5#">5#</option> |
| | | <option value="6#">6#</option> |
| | | <option value="7#">7#</option> |
| | | <option value="8#">8#</option> |
| | | <option value="9#">9#</option> |
| | | <option value="10#">10#</option> |
| | | </select> |
| | | </script> |
| | | |
| | | <script type="text/html" id="barDemo"> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | |
| | | <script> |
| | | //#region æå 注é |
| | | //#endregion |
| | |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | //#region å
¬ç¨åé |
| | | |
| | | //#region å
Œ
±åé |
| | | |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element; |
| | | var sWhere = ""; |
| | | |
| | | var option; |
| | | //#endregion |
| | | |
| | | |
| | |
| | | |
| | | //夿æä½ç±»å |
| | | if (OperationType == 1) {//æ æºåæ°å¢ |
| | | |
| | | |
| | | } |
| | | else if (OperationType == 2) {//ææºåæ°å¢ |
| | | get_Display_BatchSplit(linterid) |
| | | } |
| | | else if (OperationType == 3) {//ç¼è¾ |
| | | |
| | | } |
| | | |
| | | } |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //#region 头é¨å·¥å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | |
| | | data[0].HProQty = 0; |
| | | data[0].HSheetQty = Number(data[0].HSheetQty) + Number(1); |
| | | |
| | | switch (obj.event) { |
| | | case 'btn-CopyLine': |
| | | if (data.length <= 0) { |
| | | layer.msg("è¯·éæ©éè¦å¤å¶çä¸è¡ï¼"); |
| | | } |
| | | else if (data.length > 1) { |
| | | layer.msg("åªè½éæ©å¤å¶ä¸è¡ï¼"); |
| | | } |
| | | else { |
| | | //è·åæ°æµè½¬å¡åå·ï¼å
ç |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum_ProcExchange", |
| | | type: "GET", |
| | | data: { "HBillType": '3772' }, |
| | | async: false, |
| | | success: function (d) { |
| | | data[0].HInterID = d.data[0].HInterID; |
| | | data[0].HBillNo = data[0].HBillNo.substring(0, 13) + '-' + String(Number(data[0].HSheetQty)).padStart(2, '0'); |
| | | } |
| | | }); |
| | | var copydata = JSON.stringify(data); |
| | | |
| | | var copydata2 = copydata.substring(1, copydata.length);//å»é¤é¦è¡å符'[' |
| | | var copyrow = copydata2.substring(0, copydata2.length - 1);//å»é¤æ«å°¾å符']' |
| | | var HArrIndex = -1; |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | if (option.data[i].HICMOInterID == data[0].HICMOInterID && option.data[i].HICMOEntryID == data[0].HICMOEntryID) { |
| | | HArrIndex = i; |
| | | option.data[i].HSheetQty = Number(option.data[i].HSheetQty) + Number(1); |
| | | } |
| | | $('#HMouldNum' + i + '').find("option[value='" + option.data[i].HMouldNum + "']").attr("selected", true); |
| | | } |
| | | if (HArrIndex != -1) { |
| | | option.data.splice(HArrIndex + 1, 0, JSON.parse(copyrow)) |
| | | } |
| | | |
| | | //table.cache["mainTable"].push(JSON.parse(copyrow));//å°å¤å¶çè¡å¼ºè½¬æjson追å å°è¡¨æ ¼ä¸ |
| | | //option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | form.render('select'); |
| | | } |
| | | break; |
| | | } |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | //è¡å
äºä»¶ |
| | | table.on('tool(mainTable)', function (obj) { |
| | | set_GridCellCheck(obj); //è¡å
å¿«æ·é®çé |
| | | set_GridDelete(obj); //è¡å
å é¤ |
| | | |
| | | var data = obj.data; //è·åå½åè¡çæ°æ® //å°obj.data å符串类å èµå¼ç»data |
| | | if (obj.event == 'HDate') { //夿æ¥åå°çæ°æ®å段 idæ¯å¦ä¸º Hdata |
| | | var field = $(this).data('field');//è·åæ¥æåæ®µ |
| | | laydate.render({ |
| | | elem: this.firstChild //å°æ¥æéæ©å¨ç»å®å°è§¦åäºä»¶çå
ç´ ç第ä¸ä¸ªåå
ç´ |
| | | , show: true //ç´æ¥æ¾ç¤º æ¥æéæ©å¨ï¼è䏿¯çå¾
ç¨æ·ç¹å» |
| | | , closeStop: this // 夿ç¹å»æ¥æéæ©å¨å¤é¨æ¶æ¯å¦å
³é |
| | | , done: function (nowDate) { //彿¥æéæ©å®ææ¶æ§è¡çåè°å½æ° |
| | | //æ¶é´éæ©å®æï¼è¡æ°æ®æ´æ° |
| | | data[field] = nowDate; //data对象ä¸çæ¥æåæ®µ |
| | | obj.update(data); //æ´æ°åè°æ°æ® |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | //çå¬åå
æ ¼ç¼è¾ åå
æ ¼ç¼è¾å åæ´ |
| | | table.on('edit(mainTable)', function (obj) { |
| | | var oldText = $(this).prev().text(); |
| | | var value = obj.value //å¾å°ä¿®æ¹åçå¼ |
| | | , data = obj.data //å¾å°æå¨è¡ææé®å¼ |
| | | , field = obj.field; //å¾å°å段 |
| | | |
| | | switch (field) { |
| | | case "HProQty": |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HProQty: value |
| | | }); |
| | | break; |
| | | default: |
| | | } |
| | | var HICMOQty_useable = data.HUsableQty;//订åå©ä½å¯ç¨æ°é |
| | | var HQty = 0; |
| | | for (let i = 0; i < option.data.length; i++) { |
| | | if (option.data[i].HICMOInterID == data.HICMOInterID && option.data[i].HICMOEntryID == data.HICMOEntryID) { |
| | | HQty = Number(HQty) + Number(option.data[i].HProQty) |
| | | } |
| | | } |
| | | if (HQty > HICMOQty_useable) { |
| | | layer.alert("ç产订åï¼" + data.HICMOBillNo + ",æ¬æ¬¡çææµè½¬å¡æ»æ°:<span style='color: red;'>" + HQty + "</span>,大äºè®¢åå©ä½å¯çææµè½¬å¡æ°:<span style='color: blue;'>" + HICMOQty_useable + "</span>ï¼è¯·éæ°è¾å
¥ï¼"); |
| | | obj.update({ |
| | | HProQty: oldText |
| | | }); |
| | | } |
| | | table.render(option); |
| | | }); |
| | | |
| | | //#region è¡¨æ ¼è¡éæ©å¤ç |
| | | form.on('select(HMouldNum)', 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.HMouldNum = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //ä¿åæé® |
| | | form.on('submit(Saver)', function (data) { |
| | | if (AllowLoadData(data)) { |
| | | set_SaveBill(data); |
| | | } |
| | | }); |
| | | |
| | | //æå° |
| | | form.on('submit(get_Print)', function () { |
| | | get_Print(); |
| | | }) |
| | | |
| | | //æ¹éæå° |
| | | form.on('submit(get_BatchPrint)', function () { |
| | | get_BatchPrint(); |
| | | }) |
| | | //æ¯è«å° æ³¨å¡æ¹éæå° |
| | | form.on('submit(get_BatchPrint_CMR_ZS)', function () { |
| | | get_BatchPrint1(1); |
| | | }) |
| | | //æ¯è«å° å·ç»ç»è£
æ¹éæå° |
| | | form.on('submit(get_BatchPrint_CMR_JR)', function () { |
| | | get_BatchPrint1(2); |
| | | }) |
| | | |
| | | //éåºæé® |
| | | form.on('submit(Exit)', function () { |
| | | if (params[1] != null) { |
| | |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | //, toolbar: '#toolbarDemo' |
| | | , toolbar: '#toolbarDemo' |
| | | , limit: 500 |
| | | , height: 500 |
| | | , loading: false |
| | | , cols: [[ //å表 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', width: 100, totalRow: true } |
| | | , { field: 'HICMOInterID', title: 'ç产订åå
ç ', width: 100, hide: true }//ç产订åå
ç |
| | | , { field: 'HICMOEntryID', title: 'ç产订ååå
ç ', width: 100, hide: true }//ç产订ååå
ç |
| | | , { field: 'HICMOBillNo', title: 'ç产订å', width: 120 }//ç产订åå· |
| | | , { field: 'HICMOBillNo', title: 'ç产订åå
ç ', width: 120 }//ç产订åå· |
| | | , { field: 'HWorkShopID', title: 'ç产车é´', width: 100, hide: true }//ç产车é´å
ç |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 150 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 150 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100, hide: true} |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100, hide: true } |
| | | , { field: 'HQty', title: 'è®¢åæ»æ°', width: 110 } |
| | | , { field: 'HFinishQty', title: 'å·²çææµè½¬å¡æ°', width: 130 } |
| | | , { field: 'HUsableQty', title: 'å©ä½å¯ç¨æ°é', width: 130 } |
| | | , { field: 'HProQty', title: 'æµè½¬å¡æ°é', width: 110 } |
| | | , { field: 'HLotcardQty', title: 'åå¼ æµè½¬å¡æ°', width: 130 } |
| | | , { field: 'HProQty', title: 'æµè½¬å¡æ°é', width: 110, edit: 'text' } |
| | | , { field: 'HBatchNo', title: 'æ¹æ¬¡å·', width: 110, edit: 'text' } |
| | | , { field: 'HProjectNum', title: '项ç®ç¼å·', width: 110, edit: 'text' } |
| | | , { field: 'HMateOutBatchNo', title: 'åææ¹æ¬¡', width: 110, edit: 'text' } |
| | | , { field: 'HMouldNum', title: '模穴å·', width: 110, templet: '#HMouldNum-select' } |
| | | , { field: 'HGroupNumber', title: 'çç»', width: 110, edit: 'text' } |
| | | , { field: 'HBatchManager', title: 'å¯ç¨æ¹æ¬¡', width: 110, hide: true } |
| | | , { field: 'HRoutingInterID', title: 'å·¥èºè·¯çº¿å
ç ', width: 150, hide: true } |
| | | , { field: 'HRoutingName', title: 'å·¥èºè·¯çº¿', width: 170 } |
| | | , { field: 'HRoutingName', title: 'å·¥èºè·¯çº¿', width: 170, edit: 'text', event: "HRoutingName" } |
| | | , { field: 'HSheetQty', title: 'æåæµè½¬å¡å¼ æ°', width: 130 } |
| | | , { field: 'HDate', title: 'æµè½¬å¡æ¥æ', width: 120, event: 'HDate' } |
| | | , { field: 'HInterID', title: 'æµè½¬å¡å
ç ', width: 130, hide: true } |
| | | , { field: 'HBillNo', title: 'æµè½¬å¡å·', width: 170 } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 70 } |
| | | ]] |
| | | } |
| | | |
| | | //åå§è¡¨æ ¼æ°æ® |
| | | var rowdata = [{ |
| | | "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HMaterID": 0, "ç©æä»£ç ": "" |
| | | , "ç©æåç§°": "", "è§æ ¼åå·": "", "HQty": 0, "HFinishQty": 0, "HUsableQty": 0 |
| | | "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HWorkShopID": 0, "HMaterID": 0, "ç©æä»£ç ": "" |
| | | , "ç©æåç§°": "", "è§æ ¼åå·": "", "HQty": 0, "HFinishQty": 0, "HUsableQty": 0, "HLotcardQty": 0 |
| | | , "HProQty": 0, "HRoutingInterID": 0, "HRoutingName": "", "HSheetQty": 0 |
| | | , "HInterID": 0, "HBillNo": "", "HBatchNo": "", "HProjectNum": "", "HMateOutBatchNo": "", "HMouldNum": "0#", "HBatchManager": "", "HGroupNumber": "" |
| | | }]; |
| | | |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HMouldNum' + i + '').find("option[value='" + option.data[i - 1].HMouldNum + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | } |
| | | |
| | | //æ¹éæåç产订åçææµè½¬å¡ |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + "Sc_ProcessExchangeBill/BatchSpilt", |
| | | type: "GET", |
| | | data: { "HInterID": linterid, "user": sessionStorage["HUserName"]}, |
| | | data: { "HInterID": linterid, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | //ç½æ ¼æ°æ®èµå¼ |
| | | var subdata = result.data |
| | | var rowdata = []; |
| | | var HInterID = 0; |
| | | var HBillNo = ""; |
| | | var HSourceInterID = 0; |
| | | var HSourceEntryID = 0; |
| | | var k = 01; |
| | | for (var i = 0; i < subdata.length; i++) { |
| | | |
| | | //馿¬¡è¿å
¥ï¼è·åæµè½¬å¡åå· |
| | | if (i == 0) { |
| | | //è·åæµè½¬å¡åå·ï¼å
ç |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNumPDA", |
| | | type: "GET", |
| | | data: { "HBillType": '3772' }, |
| | | async: false, |
| | | success: function (d) { |
| | | HInterID = d.data[0].HInterID; |
| | | HBillNo = d.data[0].HBillNo; |
| | | } |
| | | }); |
| | | |
| | | HBillNo = HBillNo + '-' + String(k).padStart(2, '0'); |
| | | HSourceInterID = subdata[i].HICMOInterID; |
| | | HSourceEntryID = subdata[i].HICMOEntryID; |
| | | } |
| | | else if (HSourceInterID == subdata[i].HICMOInterID && HSourceEntryID == subdata[i].HICMOEntryID) { |
| | | //è·åæµè½¬å¡åå·ï¼å
ç |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum_ProcExchange", |
| | | type: "GET", |
| | | data: { "HBillType": '3772' }, |
| | | async: false, |
| | | success: function (d) { |
| | | HInterID = d.data[0].HInterID; |
| | | } |
| | | }); |
| | | HBillNo = HBillNo.substring(0, 13); |
| | | k = Number(k) + Number(1); |
| | | HBillNo = HBillNo + '-' + String(k).padStart(2, '0'); |
| | | } else if (HSourceInterID != subdata[i].HICMOInterID || HSourceEntryID != subdata[i].HICMOEntryID) { |
| | | //è·åæµè½¬å¡åå·ï¼å
ç |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNumPDA", |
| | | type: "GET", |
| | | data: { "HBillType": '3772' }, |
| | | async: false, |
| | | success: function (d) { |
| | | HInterID = d.data[0].HInterID; |
| | | HBillNo = d.data[0].HBillNo; |
| | | } |
| | | }); |
| | | HBillNo = HBillNo.substring(0, 13); |
| | | k = 01; |
| | | HBillNo = HBillNo + '-' + String(k).padStart(2, '0'); |
| | | HSourceInterID = subdata[i].HICMOInterID; |
| | | HSourceEntryID = subdata[i].HICMOEntryID; |
| | | } |
| | | |
| | | |
| | | rowdata.push( |
| | | { |
| | | "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HMaterID": 0, "ç©æä»£ç ": "" |
| | | , "ç©æåç§°": "", "è§æ ¼åå·": "", "HQty": 0, "HFinishQty": 0, "HUsableQty": 0 |
| | | , "HProQty": 0, "HRoutingInterID": 0, "HRoutingName": "", "HSheetQty": 0 |
| | | "HICMOInterID": subdata[i].HICMOInterID, "HICMOEntryID": subdata[i].HICMOEntryID, "HICMOBillNo": subdata[i].HICMOBillNo |
| | | , "HWorkShopID": subdata[i].HWorkShopID, "HMaterID": subdata[i].HMaterID, "ç©æä»£ç ": subdata[i].ç©æä»£ç |
| | | , "ç©æåç§°": subdata[i].ç©æåç§° |
| | | , "è§æ ¼åå·": subdata[i].è§æ ¼åå·, "HQty": subdata[i].HQty, "HFinishQty": subdata[i].HFinishQty |
| | | , "HUsableQty": subdata[i].HUsableQty, "HLotcardQty": subdata[i].HLotcardQty, "HProQty": subdata[i].HProQty |
| | | , "HRoutingInterID": subdata[i].HRoutingInterID, "HRoutingName": subdata[i].HRoutingName, "HSheetQty": subdata[i].HSheetQty |
| | | , "HDate": formatDate(subdata[i].HDate), "HInterID": HInterID, "HBillNo": HBillNo, "HBatchNo": subdata[i].HBatchNo |
| | | , "HBatchManager": subdata[i].æ¯å¦å¯ç¨æ¹æ¬¡, "HGroupNumber": "", "HProjectNum": "", "HMateOutBatchNo": "", "HMouldNum": "0#" |
| | | } |
| | | ) |
| | | } |
| | | var HInterID = 0; |
| | | var HEntryID = 0; |
| | | var HRowBackgroundColor = "#E0F5F7"; |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , cols: [[ //å表 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', width: 100, totalRow: true } |
| | | , { field: 'HICMOInterID', title: 'ç产订åå
ç ', width: 100, hide: true }//ç产订åå
ç |
| | | , { field: 'HICMOEntryID', title: 'ç产订ååå
ç ', width: 100, hide: true }//ç产订ååå
ç |
| | | , { field: 'HICMOBillNo', title: 'ç产订å', width: 120 }//ç产订åå· |
| | | , { field: 'HWorkShopID', title: 'ç产车é´å
ç ', width: 100, hide: true }//ç产车é´å
ç |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 150 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 150 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100, hide: true } |
| | | , { field: 'HQty', title: 'è®¢åæ»æ°', width: 110 } |
| | | , { field: 'HFinishQty', title: 'å·²çææµè½¬å¡æ°', width: 130 } |
| | | , { field: 'HUsableQty', title: 'å©ä½å¯ç¨æ°é', width: 130 } |
| | | , { field: 'HLotcardQty', title: 'åå¼ æµè½¬å¡æ°', width: 130 } |
| | | , { field: 'HProQty', title: 'æµè½¬å¡æ°é', width: 110, edit: 'text' } |
| | | , { field: 'HBatchNo', title: 'æ¹æ¬¡å·', width: 110, edit: 'text' } |
| | | , { field: 'HProjectNum', title: '项ç®ç¼å·', width: 110, edit: 'text' } |
| | | , { field: 'HMateOutBatchNo', title: 'åææ¹æ¬¡', width: 110, edit: 'text' } |
| | | , { field: 'HMouldNum', title: '模穴å·', width: 110, templet: '#HMouldNum-select' } |
| | | , { field: 'HGroupNumber', title: 'çç»', width: 110, edit: 'text' } |
| | | , { field: 'HBatchManager', title: 'å¯ç¨æ¹æ¬¡', width: 110, hide: true } |
| | | , { field: 'HRoutingInterID', title: 'å·¥èºè·¯çº¿å
ç ', width: 150, hide: true } |
| | | , { field: 'HRoutingName', title: 'å·¥èºè·¯çº¿', width: 170, edit: 'text', event: "HRoutingName" } |
| | | , { field: 'HSheetQty', title: 'æåæµè½¬å¡å¼ æ°', width: 130 } |
| | | , { field: 'HDate', title: 'æµè½¬å¡æ¥æ', width: 120, event: 'HDate' } |
| | | , { field: 'HInterID', title: 'æµè½¬å¡å
ç ', width: 130, hide: true } |
| | | , { field: 'HBillNo', title: 'æµè½¬å¡å·', width: 170 } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 70 } |
| | | ]] |
| | | , data: rowdata |
| | | , height: 'full-120' |
| | | , page: true |
| | | , limits: [50, 200, 500, 5000, 50000] |
| | | , limit: 200 |
| | | , cellMinWidth: 90 |
| | | , done: function (res, curr, count) { |
| | | var that = this.elem.next(); |
| | | res.data.forEach(function (item, index) { |
| | | if (HInterID == 0 && HEntryID == 0) { |
| | | HInterID = item.HICMOInterID |
| | | HEntryID = item.HICMOEntryID |
| | | var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']").css("background-color", HRowBackgroundColor) |
| | | } else if (HInterID == item.HICMOInterID && HEntryID == item.HICMOEntryID) { |
| | | var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']").css("background-color", HRowBackgroundColor) |
| | | } else if ((HInterID != item.HICMOInterID || HEntryID != item.HICMOEntryID) && HInterID != 0) { |
| | | if (HRowBackgroundColor == "#E0F5F7") { |
| | | HRowBackgroundColor = "#E8E5FA" |
| | | } else { |
| | | HRowBackgroundColor = "#E0F5F7" |
| | | } |
| | | HInterID = item.HICMOInterID |
| | | HEntryID = item.HICMOEntryID |
| | | var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']").css("background-color", HRowBackgroundColor) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HMouldNum' + i).find("option[value='" + option.data[i - 1].HMouldNum + "']").attr("selected", true).trigger("change"); |
| | | |
| | | } |
| | | form.render('select'); |
| | | |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | layer.alert(result.Message, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //#region ä¿åæ¹æ³ |
| | | function set_SaveBill(data) { |
| | | $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);//ä¿åæé®ç¦ç¨ |
| | | |
| | | var sSubTable = []; |
| | | for (var i = 0; i < table.cache["mainTable"].length; i++) { |
| | | if (table.cache["mainTable"][i] != "") { |
| | | table.cache["mainTable"][i].LAY_TABLE_INDEX = i; |
| | | sSubTable.push(table.cache["mainTable"][i]) |
| | | } |
| | | if (table.cache["mainTable"][i].ç©æåç§°.indexOf("\"") != -1 || table.cache["mainTable"][i].ç©æåç§°.indexOf(";") != -1) { |
| | | table.cache["mainTable"][i].ç©æåç§° = table.cache["mainTable"][i].ç©æåç§°.replace("\"", "â").replace(";", "ï¼") |
| | | } |
| | | if (table.cache["mainTable"][i].è§æ ¼åå·.indexOf("\"") != -1 || table.cache["mainTable"][i].è§æ ¼åå·.indexOf(";") != -1) { |
| | | table.cache["mainTable"][i].è§æ ¼åå· = table.cache["mainTable"][i].è§æ ¼åå·.replace("\"", "â").replace(";", "ï¼") |
| | | } |
| | | } |
| | | var sSubStr = JSON.stringify(sSubTable); |
| | | var sMainSub = sSubStr + ";" + sessionStorage["HUserName"]; |
| | | var index = layer.load(); |
| | | |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_ProcessExchangeBill/AddBill_BatchSplit", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "sMainSub": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { icon: 1 }); |
| | | $('#print-btn').removeClass("layui-btn-disabled").attr("disabled", false);//æå°æé®å¯ç¨ |
| | | $('#batchPrint-btn').removeClass("layui-btn-disabled").attr("disabled", false);//æ¹éæå°æé®å¯ç¨ |
| | | $('#batchPrint-btn1').removeClass("layui-btn-disabled").attr("disabled", false);//æ¹éæå°æé®å¯ç¨ |
| | | $('#batchPrint-btn2').removeClass("layui-btn-disabled").attr("disabled", false);//æ¹éæå°æé®å¯ç¨ |
| | | layer.close(index); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | $('#add-btn').removeClass("layui-btn-disabled").attr("disabled", false);//ä¿åæé®å¯ç¨ |
| | | layer.close(index); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert("é误:" + err, { icon: 5 }); |
| | | $('#add-btn').removeClass("layui-btn-disabled").attr("disabled", false);//ä¿åæé®å¯ç¨ |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //è¡å
F7äºä»¶ |
| | | function set_GridCellCheck(obj) { |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | if (event.key == "F7") { |
| | | //å·¥èºè·¯çº¿ |
| | | if (obj.event == "HRoutingName") { |
| | | //æå¼ç»´ä¿®é¡¹ç®å°çªä½ |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "å·¥èºè·¯çº¿å表" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["90%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../计å管ç/å·¥èºè·¯çº¿/Gy_RoutingBillList.html?HMaterID=' + obj.data.HMaterID + '&HProID=' + 0, 'yes'] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //æé®ä¸ çåè° |
| | | var iframeWindow = window["layui-layer-iframe" + index];//è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//è·åéä¸çæ°æ® |
| | | |
| | | if (checkStatus.data.length != 1) { |
| | | return layer.msg("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | } |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | obj.update({ |
| | | "HRoutingInterID": checkStatus.data[0].hmainid |
| | | , "HRoutingName": checkStatus.data[0].å·¥èºåç§° |
| | | }) |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | |
| | | obj.event = ""; |
| | | return false; |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | | //æå° |
| | | function get_Print() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length >= 1) { |
| | | var HInterID_Arr = []; |
| | | |
| | | for (var i = 0; i < data.length; i++) { |
| | | HInterID_Arr.push(data[i].HInterID.toString()); |
| | | } |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['40%', '80%'] |
| | | , title: 'æå°æ¨¡çéæ©' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + HInterID_Arr.toString() + "|" + 0 + '&MyMsg=' + HInterID_Arr.toString() + '&Type=HProcessExchange', 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©è¦æå°çæµè½¬å¡ï¼'); |
| | | } |
| | | } |
| | | |
| | | |
| | | //æ¹éæå° |
| | | var time; |
| | | var num = 0; |
| | | function get_BatchPrint() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | |
| | | if (checkStatus.data.length > 0) { |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("ç¡®è®¤è¦æ¹éæå°å?", { title: "确认" }, function (index) { |
| | | time = setInterval(function () { |
| | | dy_PL(data); |
| | | }, 2500); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | |
| | | function dy_PL(rest) { |
| | | var HInterID = rest[num].HInterID.toString(); |
| | | var sWhere = "select cast( b.æµæ°´å· as float) æµæ°´å·,ç产订åå·,a.éå®è®¢åå·,a.ç产æ°é,a.æµè½¬å¡æ°é,a.产å代ç ,a.åæ®å·,case when ISNULL(a.çäº§è§æ ¼,'')='' then a.产åè§æ ¼ else a.çäº§è§æ ¼ end 产åè§æ ¼,a.产ååç§°,a.æ¥æ,a.åæ®å·,b.å·¥åºä»£ç ,b.å·¥åºåç§°,a.æ¹å·,b.å·¥èºå·¥ä½ä¸å¿,b.å·¥èºå·¥èºåæ°,a.ç产车é´,b.工段åç§°,b.çäº§è®¢åæ°é from h_v_Sc_ProcessExchangeBillQuery a left join h_v_Sc_ProcessExchangeBillQuerySub b on a.hmainid=b.hmainid where b.hmainid in(" + HInterID + ") and b.å·¥åºä»£ç != '9999' order by cast(b.æµæ°´å· as int)" |
| | | |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | |
| | | if (data.data.length != 0) { |
| | | var dataPrint = []; |
| | | for (var i = 0; i < data.data.length; i++) { |
| | | data.data[i]["æµæ°´å·"] = data.data[i]["æµæ°´å·"].toFixed(1); |
| | | dataPrint.push(data.data[i]) |
| | | } |
| | | |
| | | var Customer = { |
| | | "Table": dataPrint |
| | | } |
| | | |
| | | var args = { |
| | | type: "print",//æå°æ¨¡å¼ |
| | | //type: "preview",//é¢è§æ¨¡å¼ |
| | | showOptionDlg: false, //妿䏿¾ç¤ºæå°å¯¹è¯æ¡èç´æ¥æå°ï¼å°æ¤è¡æ³¨é廿å³å¯ |
| | | report: urlAddRandomNo("../../grf/æµè½¬å¡JSON.grf"), |
| | | data: Customer |
| | | }; |
| | | |
| | | console.log(data.data[0].åæ®å·); |
| | | //var args = { |
| | | // report: urlAddRandomNo("../../grf/cs10.grf"), |
| | | // data: Customer |
| | | //}; |
| | | webapp_ws_ajax_run(args); |
| | | |
| | | if (rest.length <= num + 1) { |
| | | num = 0; |
| | | clearInterval(time); |
| | | } else { |
| | | num++; |
| | | } |
| | | |
| | | var sql = "update a set HPrintDate = getdate() from Sc_ProcessExchangeBillMain a with(nolock) where HInterID = " + HInterID + " and HPrintDate is null"; |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_SOPBillList/UpDelSQL", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "sWhere": sql }, |
| | | success: function (result) { |
| | | if (result.data.code != 1) { |
| | | layer.alert("æ´æ°æå°æ¥æå¼å¸¸ï¼" + result.data.Message); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | layer.msg("æ¥æ æ°æ®!"); |
| | | } |
| | | |
| | | } |
| | | else { |
| | | layer.msg(data.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | layer.msg("é误:" + err, { icon: 5 }); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | function get_BatchPrint1(tyep) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | |
| | | if (checkStatus.data.length > 0) { |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("ç¡®è®¤è¦æ¹éæå°å?", { title: "确认" }, function (index) { |
| | | time = setInterval(function () { |
| | | dy_PL1(data, tyep); |
| | | }, 2500); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | |
| | | function dy_PL1(rest, tyep) { |
| | | var HInterID = rest[num].HInterID.toString(); |
| | | var sWhere = "select a.HBillNo æµè½¬å¡ç¼å· ,a.HMateOutBatchNo åææ¹æ¬¡,a.HICMOBillNo ä»»å¡åå·,m2.HNumber 产å代ç ,CAST(a.HQty AS dec(18, 0)) æµè½¬å¡æ°é,a.HProjectNum 项ç®å·,m2.HName 产ååç§°,CAST(a.HPlanQty AS dec(18, 0)) ç产æ°é,m2.HModel 产åè§æ ¼,ltrim(b.HProcNo) æµæ°´å· ,p.HName å·¥åºåç§°,c.HName çäº§èµæº,convert(varchar(16),getdate(),20) æ£æµæ¶é´ from Sc_ProcessExchangeBillMain a inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID left join Gy_Material m2 on a.HMaterID2=m2.hitemid left join Gy_Process p on b.HProcID=p.hitemid left join Gy_Source s on b.HSourceID=s.HItemID left join(select b1.HInterID,s.HName from Sc_ProcessExchangeBillSub b1 left join Gy_Process p on b1.HProcID=p.hitemid left join Gy_Source s on b1.HSourceID=s.HItemID where p.HName='注å¡å®å') c on a.HInterID=c.HInterID where b.HInterID in(" + Request.Params["linterid"] + ") order by cast(b.HProcNo as int)" |
| | | |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | |
| | | if (data.data.length != 0) { |
| | | var dataPrint = []; |
| | | for (var i = 0; i < data.data.length; i++) { |
| | | data.data[i]["æµæ°´å·"] = data.data[i]["æµæ°´å·"].toFixed(1); |
| | | dataPrint.push(data.data[i]) |
| | | } |
| | | |
| | | var Customer = { |
| | | "Table": dataPrint |
| | | } |
| | | var report1 = ""; |
| | | if (tyep==1) { |
| | | report1 = urlAddRandomNo("../../grf/è´¨éæµè½¬å¡cmr.grf"); |
| | | } else if (tyep==2) { |
| | | report1 = urlAddRandomNo("../../grf/å·ç»è´¨éæµè½¬å¡.grf"); |
| | | } |
| | | var args = { |
| | | type: "print", |
| | | showOptionDlg: false, //妿䏿¾ç¤ºæå°å¯¹è¯æ¡èç´æ¥æå°ï¼å°æ¤è¡æ³¨é廿å³å¯ |
| | | report: report1, |
| | | data: Customer |
| | | }; |
| | | |
| | | console.log(data.data[0].åæ®å·); |
| | | |
| | | webapp_ws_ajax_run(args); |
| | | |
| | | if (rest.length <= num + 1) { |
| | | num = 0; |
| | | clearInterval(time); |
| | | } else { |
| | | num++; |
| | | } |
| | | |
| | | } else { |
| | | layer.msg("æ¥æ æ°æ®!"); |
| | | } |
| | | |
| | | } |
| | | else { |
| | | layer.msg(data.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | layer.msg("é误:" + err, { icon: 5 }); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | |
| | | //è¡¨æ ¼è¡å
äºä»¶å é¤ |
| | | function set_GridDelete(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 { |
| | | var oldData = table.cache["mainTable"]; |
| | | oldData.splice(obj.tr.data('index'), 1) |
| | | option.data = oldData;//å°æ°æ®ç»å®å°dataä¸ |
| | | |
| | | for (var i = 0; i < oldData.length; i++) { |
| | | if (option.data[i].HICMOInterID == data.HICMOInterID && option.data[i].HICMOEntryID == data.HICMOEntryID) { |
| | | option.data[i].HSheetQty = Number(option.data[i].HSheetQty) - Number(1); |
| | | } |
| | | $('#HMouldNum' + i).find("option[value='" + oldData[i].HMouldNum + "']").attr("selected", true); |
| | | } |
| | | |
| | | table.render(option); |
| | | form.render('select'); |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //#region æ°æ®æ ¡éª |
| | | function AllowLoadData(data) { |
| | | var sSubStr = JSON.stringify(table.cache['mainTable']); |
| | | |
| | | if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") { |
| | | sSubStr = JSON.parse(sSubStr); |
| | | for (var i = 0; i < sSubStr.length; i++) { |
| | | if (sSubStr[i].HProQty == 0 || sSubStr[i].HProQty == undefined || sSubStr[i].HProQty == null) { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,æµè½¬å¡æ°é为0!", { icon: 5, btn: ['确认'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (sSubStr[i].HRoutingInterID == 0 || sSubStr[i].HRoutingInterID == undefined || sSubStr[i].HRoutingInterID == null) { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,å·¥èºè·¯çº¿æªéæ©!", { icon: 5, btn: ['确认'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (sSubStr[i].HICMOInterID == 0 || sSubStr[i].HICMOInterID == undefined || sSubStr[i].HICMOInterID == null) { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,ç产订å主å
ç è·åå¼å¸¸ï¼è¯·è系管çåå¤ç!", { icon: 5, btn: ['确认'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (sSubStr[i].HICMOEntryID == 0 || sSubStr[i].HICMOEntryID == undefined || sSubStr[i].HICMOEntryID == null) { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,ç产订å主å
ç è·åå¼å¸¸ï¼è¯·è系管çåå¤ç!", { icon: 5, btn: ['确认'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (sSubStr[i].HBatchManager == "æ¯" && sSubStr[i].HBatchNo == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,ç©æå¯ç¨æ¹æ¬¡ç®¡çï¼è¯·è¾å
¥æ¹å·ä¿¡æ¯!", { icon: 5, btn: ['确认'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | | |