| | |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/PageTitle.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <style type="text/css"> |
| | | /*begin æ¤æ ·å¼ç¨äºæ¶é¤è¡å
ç´ ä¸å¸å±å®½åº¦ä¸å¤çé®é¢*/ |
| | | .layui-form-item .layui-inline { |
| | |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_DeleteBill" id="set_DeleteBill">å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="get_PrintReport" id="get_PrintReport">é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="get_PrintReport" id="get_PrintReport">æå°</button> |
| | | <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">ä¿å</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">éåº</button> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-col-xs8 layui-inline"> |
| | | <label class="layui-form-label" style="width: 6.5%;">夿³¨</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style=" width: 75%;"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style=" width: 75%;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <script> |
| | | var OptionData = []; |
| | | //#region æå 注é |
| | | //#endregion |
| | | layui.config({ |
| | |
| | | //}; |
| | | var Sctag = "0"; |
| | | var columns = ""; |
| | | var HIsCheck = false; |
| | | //#endregion |
| | | |
| | | |
| | |
| | | set_EditFromGrid(); |
| | | //get_file(); |
| | | } |
| | | else if (OperationType == 4) {//䏿¨ |
| | | setInit_PushBill(); |
| | | } |
| | | else if (OperationType == 5) {//å¤å¶ |
| | | set_EditFromGrid(); |
| | | //è·åæå¤§åæ®å· |
| | | get_MAXNum(); |
| | | //åå§åå¶å人åå¶åæ¶é´ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HUpDater").val(); |
| | | $("#HUpDateDate").val(); |
| | | $("#HChecker").val(); |
| | | $("#HCheckDate").val(); |
| | | $("#HCloseMan").val(); |
| | | $("#HCloseDate").val(); |
| | | $("#HDeleteMan").val(); |
| | | $("#HDeleteDate").val(); |
| | | //get_file(); |
| | | } |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | | } |
| | |
| | | table.on('tool(mainTable)', function (obj) { |
| | | set_GridDelete(obj); //è¡å
å é¤ |
| | | set_GridCellCheck(obj); //è¡å
å¿«æ·é®çé |
| | | |
| | | //#region ä¿®æ¹è¡ æ¶é´ |
| | | var data = obj.data; |
| | | //çäº§æ¥æ |
| | | if (obj.event == 'HProduceDate') { |
| | | var field = $(this).data('field'); |
| | | laydate.render({ |
| | | elem: this.firstChild |
| | | , show: true //ç´æ¥æ¾ç¤º |
| | | , closeStop: this |
| | | , done: function (nowDate) { |
| | | //æ¶é´éæ©å®æï¼è¡æ°æ®æ´æ° |
| | | data[field] = nowDate; |
| | | obj.update(data); |
| | | //å·æ°å¤éæ¡ |
| | | //checkRefresh(); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | }); |
| | | //#endregion |
| | | |
| | |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../åºç¡èµæ/å·¥èµåºç¡èµæ/Gy_Group.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/å·¥èµåºç¡èµæ/Gy_Group.html?type=HGroup&openType=2', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | content: ['../../PublicPage/ProductionOrder.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | option.data = [{ |
| | | "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", |
| | | "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0, |
| | | "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", |
| | | "HSourceBillType": 0, "HICMOTempID": 0 |
| | | }]; |
| | | table.render(option); |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | |
| | | if (isAllEqual(list)) //ç¸ååå· |
| | | { |
| | | //console.log(checkStatus.data); |
| | | if (checkStatus.data.length > 1) { |
| | | for (var i = 0; i < checkStatus.data.length - 1; i++) //è¡¥è¡ |
| | | { |
| | | //var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HRemark": "" }; |
| | | table.cache["mainTable"].push({ |
| | | "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", |
| | | "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0, "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", |
| | | "HSourceBillType": 0, "HICMOTempID": 0 |
| | | }); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | } |
| | | var optionData = []; |
| | | for (var i = 0; i < checkStatus.data.length; i++) //è¡¥è¡ |
| | | { |
| | | var NewRow = { |
| | | "HMaterID": checkStatus.data[0].HMaterID, "HMaterCode": checkStatus.data[0].HMaterCode, "HMaterName": checkStatus.data[0].HMaterName, "HMaterSpec": checkStatus.data[0].HMaterSpec, "HUnitID": checkStatus.data[0].HUnitID, "HUnitCode": checkStatus.data[0].HUnitCode, "HUnitName": checkStatus.data[0].HUnitName, |
| | | "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0, |
| | | "HICMOBillNo": checkStatus.data[0].åæ®å·, "HICMOInterID": checkStatus.data[0].hmainid, "HICMOEntryID": checkStatus.data[0].HEntryID, "HRemark": "", "HSourceInterID": checkStatus.data[0].hmainid, "HSourceEntryID": checkStatus.data[0].HEntryID, "HSourceBillNo": checkStatus.data[0].åæ®å·, |
| | | "HSourceBillType": 3710 |
| | | }; |
| | | optionData.push(NewRow); |
| | | } |
| | | option.data = checkStatus.data; |
| | | table.render(option); |
| | | //for (var i = 0; i < checkStatus.data.length; i++) { |
| | | // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterID"] .layui-table-cell').text(checkStatus.data[i].HMaterID); |
| | | // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterCode"] .layui-table-cell').text(checkStatus.data[i].HMaterCode); |
| | | // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterName"] .layui-table-cell').text(checkStatus.data[i].HMaterName); |
| | | // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterSpec"] .layui-table-cell').text(checkStatus.data[i].HMaterSpec); |
| | | // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HUnitID"] .layui-table-cell').text(checkStatus.data[i].HUnitID); |
| | | // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HUnitCode"] .layui-table-cell').text(checkStatus.data[i].HUnitCode); |
| | | // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HUnitName"] .layui-table-cell').text(checkStatus.data[i].HUnitName); |
| | | //} |
| | | |
| | | table.reload("mainTable", { |
| | | data: optionData //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | else { |
| | |
| | | //#region æäº¤ä¿å |
| | | form.on('submit(Saver)', function (data) {//ä¿å |
| | | var refSav = ""; |
| | | if (OperationType == 1 || OperationType == 2) { |
| | | if (OperationType == 1 || OperationType == 2 || OperationType == 4 || OperationType == 5) { |
| | | refSav = "Add"; |
| | | } |
| | | if (OperationType == 3) { |
| | |
| | | var row = []; |
| | | for (var i = 0; i < table.cache['mainTable'].length; i++) { |
| | | if (table.cache['mainTable'][i] != "") { |
| | | if (table.cache["mainTable"][i].HMaterName.indexOf("\"") != -1 || table.cache["mainTable"][i].HMaterName.indexOf(";") != -1) { |
| | | table.cache["mainTable"][i].HMaterName = table.cache["mainTable"][i].HMaterName.replaceAll("\"", "â").replaceAll(";", "ï¼") |
| | | } |
| | | if (table.cache["mainTable"][i].HMaterSpec.indexOf("\"") != -1 || table.cache["mainTable"][i].HMaterSpec.indexOf(";") != -1) { |
| | | table.cache["mainTable"][i].HMaterSpec = table.cache["mainTable"][i].HMaterSpec.replaceAll("\"", "â").replaceAll(";", "ï¼") |
| | | } |
| | | |
| | | row.push(table.cache['mainTable'][i]) |
| | | } |
| | | } |
| | |
| | | //#region å é¤ |
| | | form.on('submit(set_DeleteBill)', function (data) { |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region æå° |
| | | form.on('submit(get_PrintReport)', function (data) { |
| | | if (HIsCheck == true) { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | | , title: 'æå°æ¨¡çéæ©' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + $("#HInterID").val().toString() + '&MyMsg=' + $("#HInterID").val().toString() + '&Type=HICMOReport2', 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·å®¡æ ¸åæ®æååæå°ï¼'); |
| | | } |
| | | }); |
| | | //#endregion |
| | | |
| | |
| | | data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | HIsCheck = true; |
| | | layer.msg(result.Message, { time: 1 * 10000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Material.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Material.html?openType=2', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: checkStatus.data[0].HItemID, |
| | | HMaterCode: checkStatus.data[0].ç©æä»£ç , |
| | | HMaterName: checkStatus.data[0].ç©æåç§°, |
| | | HMaterSpec: checkStatus.data[0].è§æ ¼åå·, |
| | | }); |
| | | |
| | | //éä¸å¤è¡æ¶ |
| | | if (checkStatus.data.length > 1) { |
| | | var rowIndex = $(obj.tr).attr("data-index") * 1; //attr("data-index")ç¨äºè·å该trå
ç´ ä¸data-index屿§çå¼*1转æ¢ç±»åç¶åèµå¼ç»rowIndex |
| | | for (var i = 0; i < checkStatus.data.length; i++) { //夿éä¸çæ°æ®çé¿åº¦ ç¨äºéåcheckStatus.dataæ°ç»ä¸çæ¯ä¸ªå
ç´ |
| | | if (rowIndex + i >= option.data.length) { //夿rowIndex + içç´¢å¼è¶
åºäºoption.dataæ°ç»çé¿åº¦ï¼è¯´æoption.dataæ°ç»éè¦æ©å±ä»¥å
嫿´å¤è¡ |
| | | var NewRow = { |
| | | "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", |
| | | "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0, |
| | | "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", |
| | | "HSourceBillType": 0 |
| | | }; |
| | | |
| | | table.cache["mainTable"].push(NewRow); //å建æ°çå
嫿°ç» ä¼ å
¥table.cache["mainTable"]æ°ç» |
| | | option.data = table.cache["mainTable"]; //æä¼ å
¥ table.cache["mainTable"]æ°ç»çå¼èµå¼ç»option.data ç屿§ |
| | | |
| | | table.render(option);//渲æçé¢ |
| | | } |
| | | option.data[rowIndex + i].HMaterID = checkStatus.data[i].HItemID; //å°option.dataæ°ç»ä¸å¯¹åºè¡çHMaterID屿§æ´æ°ä¸ºä»resultData对象ä¸è·åçç©æID |
| | | option.data[rowIndex + i].HMaterCode = checkStatus.data[i].ç©æä»£ç ; //å°option.dataæ°ç»ä¸å¯¹åºè¡ç ç©æä»£ç 屿§æ´æ°ä¸ºä»resultData对象ä¸è·åçç©æID |
| | | option.data[rowIndex + i].HMaterName = checkStatus.data[i].ç©æåç§°; //å°option.dataæ°ç»ä¸å¯¹åºè¡ç ç©æåç§° 屿§æ´æ°ä¸ºä»resultData对象ä¸è·åçç©æID |
| | | option.data[rowIndex + i].HMaterSpec = checkStatus.data[i].è§æ ¼åå·; //å°option.dataæ°ç»ä¸å¯¹åºè¡ç è§æ ¼åå· å±æ§æ´æ°ä¸ºä»resultData对象ä¸è·åçç©æID |
| | | option.data[rowIndex + i].HUnitID = checkStatus.data[i].HUnitID; //å°option.dataæ°ç»ä¸å¯¹åºè¡ç HUnitID 屿§æ´æ°ä¸ºä»resultData对象ä¸è·åçç©æID |
| | | option.data[rowIndex + i].HUnitCode = checkStatus.data[i].计éåä½ä»£ç ; |
| | | option.data[rowIndex + i].HUnitName = checkStatus.data[i].计éåä½åç§°; //å°option.dataæ°ç»ä¸å¯¹åºè¡ç 计éåä½ å±æ§æ´æ°ä¸ºä»resultData对象ä¸è·åçç©æID æ´æ°è®¡éåä½å±æ§ |
| | | } |
| | | table.render(option); //éæ°æ¸²æè¡¨æ ¼ä»¥æ¾ç¤ºæ´æ°åçæ°æ® |
| | | } else { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: checkStatus.data[0].HItemID, |
| | | HMaterCode: checkStatus.data[0].ç©æä»£ç , |
| | | HMaterName: checkStatus.data[0].ç©æåç§°, |
| | | HMaterSpec: checkStatus.data[0].è§æ ¼åå·, |
| | | HUnitID: checkStatus.data[0].HUnitID, |
| | | HUnitCode: checkStatus.data[0].计éåä½ä»£ç , |
| | | HUnitName: checkStatus.data[0].计éåä½åç§°, |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | }, end: function () { |
| | | if (OptionData != "" && OptionData != []) { |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | obj.update({ |
| | | HMaterID: OptionData.HItemID, |
| | | HMaterCode: OptionData.ç©æä»£ç , |
| | | HMaterName: OptionData.ç©æåç§°, |
| | | HMaterSpec: OptionData.è§æ ¼åå·, |
| | | HUnitID: OptionData.HUnitID, |
| | | HUnitCode: OptionData.计éåä½ä»£ç , |
| | | HUnitName: OptionData.计éåä½åç§°, |
| | | }); |
| | | OptionData = []; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Unit.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Unit.html?Type=HUnitList', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, end: function () { |
| | | if (OptionData != "" && OptionData != []) { |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | obj.update({ |
| | | HUnitID: OptionData.HItemID, |
| | | HUnitCode: OptionData.计éåä½ä»£ç , |
| | | HUnitName: OptionData.计éåä½åç§° |
| | | }); |
| | | OptionData = []; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../åºç¡èµæ/ç产åºç¡èµæ/Gy_Source.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/ç产åºç¡èµæ/Gy_Source.html?Htype=&openType=2', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, end: function () { |
| | | if (OptionData.length > 0) { |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | obj.update({ |
| | | HSourceID: OptionData[0][0].HItemID, |
| | | HSourceCode: OptionData[0][0].çäº§èµæºä»£ç , |
| | | HSourceName: OptionData[0][0].çäº§èµæºåç§° |
| | | }); |
| | | OptionData = []; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_EmployeeList.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_EmployeeList.html?type=HManager', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, end: function () { |
| | | if (OptionData.length > 0) { |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | obj.update({ |
| | | HWorkerid: OptionData[0].HItemID, |
| | | HWorkerCode: OptionData[0].èå代ç , |
| | | HWorkerName: OptionData[0].èååç§° |
| | | }); |
| | | OptionData = []; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe", width: 100 } |
| | | , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HMaterCode', title: 'ç©æä»£ç ', edit: 'text', event: 'HMaterCode', width: 100 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', edit: 'text', width: 100 } |
| | | , { field: 'HMaterSpec', title: 'è§æ ¼åå·', edit: 'text', width: 100 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', style: 'background-color:#efefef4d;', width: 100 } |
| | | , { field: 'HMaterSpec', title: 'è§æ ¼åå·', style: 'background-color:#efefef4d;', width: 100 } |
| | | , { field: 'HUnitID', title: 'HUnitID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HUnitCode', title: 'åä½ä»£ç ', edit: 'text', event: 'HUnitCode', width: 100 } |
| | | , { field: 'HUnitName', title: 'åä½åç§°', edit: 'text', width: 100 } |
| | | , { field: 'HUnitName', title: 'åä½åç§°', style: 'background-color:#efefef4d;', width: 100 } |
| | | , { field: 'HSourceID', title: 'HSourceID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HSourceCode', title: 'èµæºä»£ç ', edit: 'text', event: 'HSourceCode', width: 100 } |
| | | , { field: 'HSourceName', title: 'èµæºåç§°', edit: 'text', width: 100 } |
| | | , { field: 'HSourceName', title: 'èµæºåç§°', style: 'background-color:#efefef4d;', width: 100 } |
| | | , { field: 'HWorkerid', title: 'HWorkerid', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HWorkerCode', title: 'æä½å代ç ', edit: 'text', event: 'HWorkerCode', width: 100 } |
| | | , { field: 'HWorkerName', title: 'æä½ååç§°', edit: 'text', width: 100 } |
| | | , { field: 'HWorkerName', title: 'æä½ååç§°', style: 'background-color:#efefef4d;', width: 100 } |
| | | , { field: 'HQty', title: 'ç产æ°é', edit: 'text', width: 100, totalRow: true } |
| | | , { field: 'HBadQty', title: 'ä¸è¯æ°é', edit: 'text', width: 100, totalRow: true } |
| | | , { field: 'HICMOBillNo', title: 'ç产订å', edit: 'text', width: 100 } |
| | | , { field: 'HICMOInterID', title: 'ç产订åå
ç ', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HICMOEntryID', title: 'ç产订ååå
ç ', edit: 'text', width: 100, hide: true } |
| | | |
| | | , { field: 'HICMOBillNo', title: 'ç产订å', style: 'background-color:#efefef4d;', width: 100 } |
| | | , { field: 'HICMOInterID', title: 'ç产订åå
ç ', style: 'background-color:#efefef4d;', width: 100, hide: true } |
| | | , { field: 'HICMOEntryID', title: 'ç产订ååå
ç ', style: 'background-color:#efefef4d;', width: 100, hide: true } |
| | | , { field: 'HPRODUCEDATE', title: 'çäº§æ¥æ', event: 'HProduceDate', width: 100 } |
| | | |
| | | , { field: 'HSourceInterID', title: 'æºåå
ç ', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HSourceEntryID', title: 'æºååå
ç ', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HSourceBillNo', title: 'æºååå·', edit: 'text', width: 100, hide: true } |
| | |
| | | "HSourceName": data[i].çäº§èµæºåç§°, "HWorkerid": data[i].æä½åID, "HWorkerCode": data[i].æä½å代ç , |
| | | "HWorkerName": data[i].æä½ååç§°, "HQty": data[i].产é, "HBadQty": data[i].ä¸è¯æ°é == '' ? 0 : data[i].ä¸è¯æ°é, "HICMOBillNo": data[i].ç产订åå·, |
| | | "HICMOInterID": data[i].HICMOInterID, "HICMOEntryID": data[i].HICMOEntryID, "HRemark": "", "HSourceInterID": data[i].HICMOInterID, "HSourceEntryID": data[i].HICMOEntryID, "HSourceBillNo": data[i].ç产订åå·, |
| | | "HSourceBillType": 3710, "HICMOTempID": data[i].HICMOTempID |
| | | "HSourceBillType": 3710, "HICMOTempID": data[i].HICMOTempID,"HPRODUCEDATE": data[i].çäº§æ¥æ |
| | | }); |
| | | } |
| | | |
| | |
| | | function set_EditFromGrid() { |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |
| | | set_EditGrid(linterid); //ç¼è¾è·åè¡¨ä½ |
| | | option.data = [{ |
| | | "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", |
| | | "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0, |
| | | "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", |
| | | "HSourceBillType": 0, "HICMOTempID": 0 |
| | | }]; |
| | | //option.data = [{ |
| | | // "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", |
| | | // "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0, |
| | | // "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", |
| | | // "HSourceBillType": 0, "HICMOTempID": 0 |
| | | //}]; |
| | | table.render(option); |
| | | } |
| | | //#endregion |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + "Sc_ICMOReportBill/Sc_GetICMOReportBillListCheckDetai", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HID": linterid |
| | | }, |
| | |
| | | $("#HEmpID").val(data.HEmpID); |
| | | $("#HEmpName").val(data.ç»è®¡å); |
| | | $("#HMainSourceBillNo").val(data.HMainSourceBillNo); |
| | | $("#HMainSourceInterID").val(data.HMainSourceInterID); |
| | | $("#HMainSourceEntryID").val(data.HMainSourceEntryID); |
| | | $("#HMainSourceInterID").val(data.HMainSourceInterID == null ? 0 : data.HMainSourceInterID); |
| | | $("#HMainSourceEntryID").val(data.HMainSourceEntryID == null ? 0 : data.HMainSourceEntryID); |
| | | $("#HExplanation").val(""); |
| | | $("#HRemark").val(data.è¡¨å¤´å¤æ³¨); |
| | | PicUpload(); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Sc_ICMOReportBill/Sc_ICMOReportBillListProjectDetai', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sqlWhere": "and hmainid=" + linterid }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,ç产æ°éä¸è½ä¸ºç©ºæ0æè
å°äº0!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | //if (sSubStr[i].HPRODUCEDATE == "" || sSubStr[i].HPRODUCEDATE == null || sSubStr[i].HPRODUCEDATE == "undefined") { |
| | | // layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,çäº§æ¥æä¸å
许为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return Result = false; |
| | | //} |
| | | } |
| | | } |
| | | else { |
| | |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'èåå表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_EmployeeList.html', 'yes'] |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_EmployeeList.html?type=HEmp', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'é¨é¨å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_DepartmentList.html', 'yes'] |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_DepartmentList.html?openType=2&HOrgName=' + sessionStorage["Organization"], 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | |
| | | } |
| | | } |
| | | |
| | | //#region 䏿¨é¡µé¢åå§å |
| | | function setInit_PushBill() { |
| | | //çæåæ®å·åå
ç |
| | | get_MAXNum(); |
| | | |
| | | //åå§åæ¥æãå¶å人ãå¶åæ¥æ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); |
| | | $("#HGroupID").val(sessionStorage["HGroupID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºçç»ID |
| | | $("#HGroupName").val(sessionStorage["HGroup"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºçç» |
| | | $("#HEmpID").val(sessionStorage["HEmpID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºæä½åID |
| | | $("#HEmpName").val(sessionStorage["HEmpName"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºæä½å |
| | | |
| | | var temp = HSouceBillType; |
| | | |
| | | if (temp == "3710") { |
| | | //è·å |
| | | var data = getUrlVars_JSON().data; |
| | | var dataArray = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | var temp = getPushSource_ICMOBillInit(data[i].hmainid, data[i].hsubid); |
| | | if (temp != "none") { |
| | | dataArray.push(temp); |
| | | } else { |
| | | return; |
| | | } |
| | | } |
| | | |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HMainSourceInterID": "0" |
| | | , "HMainSourceEntryID": "0" |
| | | , "HMainSourceBillNo": "" |
| | | , "HMainSourceBillType": temp |
| | | , "HDeptID": dataArray[0].HDeptID |
| | | , "HDeptName": dataArray[0].çäº§è½¦é´ |
| | | , "HMainSourceBillType": 2 |
| | | }); |
| | | $('#XDHList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HMainSourceBillNo').addClass("layui-btn-disabled").attr("disabled", true); |
| | | document.getElementById('HMainSourceBillNo').style.backgroundColor = '#efefef4d' |
| | | |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | for (var i = 0; i < dataArray.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | "HMaterID": dataArray[i].HMaterID |
| | | , "HMaterCode": dataArray[i].产å代ç |
| | | , "HMaterName": dataArray[i].产ååç§° |
| | | , "HMaterSpec": dataArray[i].è§æ ¼åå· |
| | | , "HUnitID": dataArray[i].HUnitID |
| | | , "HUnitCode": dataArray[i].计éåä½ä»£ç |
| | | , "HUnitName": dataArray[i].计éåä½ |
| | | , "HSourceID": sessionStorage["HSourceID"] == "" ? 0 : sessionStorage["HSourceID"] |
| | | , "HSourceCode": "" |
| | | , "HSourceName": sessionStorage["HSource"] |
| | | , "HWorkerid": sessionStorage["HEmpID"] == "" ? 0 : sessionStorage["HEmpID"] |
| | | , "HWorkerCode": sessionStorage["HEmpNumber"] |
| | | , "HWorkerName": sessionStorage["HEmpName"] |
| | | , "HQty": dataArray[i].æªå
³èæ°é |
| | | , "HBadQty": 0 |
| | | , "HICMOBillNo": dataArray[i].åæ®å· |
| | | , "HICMOInterID": dataArray[i].hmainid |
| | | , "HICMOEntryID": dataArray[i].HEntryID |
| | | , "HSourceInterID": dataArray[i].hmainid |
| | | , "HSourceEntryID": dataArray[i].HEntryID |
| | | , "HSourceBillNo": dataArray[i].åæ®å· |
| | | , "HSourceBillType": dataArray[i].åæ®ç±»å |
| | | , 'HICMOTempID': "0" |
| | | , 'HRemark': "" |
| | | , 'HPRODUCEDATE': dataArray[i].çäº§æ¥æ |
| | | } |
| | | ); |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | } |
| | | else { |
| | | return layer.msg('å½å䏿¯æè¯¥æºå䏿¨ï¼ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ ¹æ®ä¸»å
ç ä¸åå
ç è·åæºåçäº§è®¢åæ°æ® |
| | | function getPushSource_ICMOBillInit(HSourceInterID, HSourceEntryID) { |
| | | var res = "none"; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_ICMOBill/loadSc_ICMOBill_Push", |
| | | async: false, |
| | | type: "GET", |
| | | data: { |
| | | "HInterID": HSourceInterID |
| | | , "HSubID": HSourceEntryID |
| | | }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | res = result.data[0]; |
| | | } else { |
| | | res = result.data; |
| | | //layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | res = "none"; |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | return res; |
| | | } |
| | | //#endregion |
| | | |
| | | //#region è·ååæ°_ä¼ éçJSONæ ¼å¼åæ° |
| | | function getUrlVars_JSON() { |
| | | var datajson; |
| | | var str = window.location.search; //è·å龿¥ä¸ä¼ éçåæ° |
| | | var arr = str.substring(str.lastIndexOf("=") + 1); |
| | | datajson = $.parseJSON(decodeURI(arr)); |
| | | return datajson; |
| | | } |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | |
| | | /*window.location.href = url;*/ |
| | | window.open(url) |
| | | } |
| | | |
| | | //çäº§è½¦é´ |
| | | function GetHDeptNameValue(obj) { |
| | | $("#HDeptName").val(obj[0].é¨é¨åç§°); |
| | | $("#HDeptID").val(obj[0].HItemID); |
| | | $("#HDeptNumber").val(obj[0].é¨é¨ä»£ç ); |
| | | } |
| | | //ç产çç» |
| | | function GetHGroupValue(obj) { |
| | | $("#HGroupName").val(obj[0].çç»åç§°); |
| | | $("#HGroupID").val(obj[0].HItemID); |
| | | } |
| | | //ç»è®¡å |
| | | function GetHEmpValue(obj) { |
| | | $("#HEmpName").val(obj[0].èååç§°); |
| | | $("#HEmpID").val(obj[0].HItemID); |
| | | } |
| | | //ç©æ |
| | | function GetGyMaterial(obj) { |
| | | OptionData = obj; |
| | | } |
| | | //åä½ |
| | | function GetHUnitListValue(obj) { |
| | | OptionData = obj; |
| | | } |
| | | //çäº§èµæº |
| | | function GetGySource(obj) { |
| | | OptionData[0] = obj; |
| | | } |
| | | //æä½å |
| | | function GetHManagerValue(obj) { |
| | | OptionData = obj; |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |