| | |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <style type="text/css"> |
| | | |
| | | /*begin æ¤æ ·å¼ç¨äºæ¶é¤è¡å
ç´ ä¸å¸å±å®½åº¦ä¸å¤çé®é¢*/ |
| | | .layui-form-item .layui-inline { |
| | | margin-top: 5px; |
| | |
| | | <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" action="" lay-filter="formData" style="background-color:white;"> |
| | | <form class="layui-form" action="" lay-filter="component-form-group" style="background-color:white;"> |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_AddNew" id="set_AddNew">æ°å¢</button> |
| | |
| | | <label class="layui-form-label">éåå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <div class="layui-tab layui-tab-card"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">çäº§æ±æ¥å</li> |
| | | <li>äº§éæ±æ¥åæç»</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <!--çäº§æ±æ¥åæç»--> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <!--äº§éæ±æ¥å--> |
| | | <table class="layui-hide" id="mainTable_prodReport" lay-filter="mainTable_prodReport"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine" id="btn-AddLine"><i class="layui-icon layui-icon-form"></i>å¢å ä¸è¡</button> |
| | |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element', 'upload'], function () { |
| | | |
| | | //#region å
¬ç¨åé |
| | | |
| | | //#region å
¬ç¨åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | var option; |
| | | var option_prodReport; |
| | | var sBillType = "3711"; |
| | | var TabRow = { |
| | | "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", |
| | | "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HRemark": "" |
| | | }; |
| | | //var TabRow = { |
| | | // "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", |
| | | // "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0,"HBadQty":0, "HRemark": "" |
| | | //}; |
| | | var Sctag = "0"; |
| | | var columns = ""; |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | get_LoginIs(); |
| | |
| | | } |
| | | //夿æä½ç±»å |
| | | if (OperationType == 1) {//æ æºåæ°å¢ |
| | | $("#HDeptID").val(sessionStorage["HDeptID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºé¨é¨ID |
| | | $("#HDeptName").val(sessionStorage["HDept"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºé¨é¨ |
| | | $("#HGroupID").val(sessionStorage["HGroupID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºçç»ID |
| | | $("#HGroupName").val(sessionStorage["HGroup"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºçç» |
| | | $("#HEmpID").val(sessionStorage["HEmpID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºæä½åID |
| | | $("#HEmpName").val(sessionStorage["HEmpName"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºæä½å |
| | | set_AddFNew(); |
| | | } |
| | | else if (OperationType == 2) {//ææºåæ°å¢ |
| | | $("#HDeptID").val(sessionStorage["HDeptID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºé¨é¨ID |
| | | $("#HDeptName").val(sessionStorage["HDept"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºé¨é¨ |
| | | $("#HGroupID").val(sessionStorage["HGroupID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºçç»ID |
| | | $("#HGroupName").val(sessionStorage["HGroup"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºçç» |
| | | $("#HEmpID").val(sessionStorage["HEmpID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºæä½åID |
| | | $("#HEmpName").val(sessionStorage["HEmpName"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºæä½å |
| | | set_AddNew(); |
| | | } |
| | | else if (OperationType == 3) {//ç¼è¾ |
| | | set_EditFromGrid(); |
| | | get_file(); |
| | | //get_file(); |
| | | } |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | | } |
| | | |
| | | |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //#region 头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data;; |
| | | var AddRow = table.cache['mainTable']; |
| | | var NewRow = TabRow; |
| | | 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 |
| | | }; |
| | | |
| | | switch (obj.event) { |
| | | //æ°å¢ä¸è¡ |
| | | case 'btn-AddLine': btnAddLine(NewRow); |
| | |
| | | content: ['../../PublicPage/ProductionOrder.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | option.data = [TabRow]; |
| | | 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 |
| | | }]; |
| | | table.render(option); |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | |
| | | } |
| | | if (isAllEqual(list)) //ç¸ååå· |
| | | { |
| | | console.log(checkStatus.data); |
| | | //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(TabRow); |
| | | 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 |
| | | }); |
| | | option.data = table.cache["mainTable"]; |
| | | 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); |
| | | } |
| | | 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); |
| | | //} |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | else { |
| | |
| | | //#region æäº¤ä¿å |
| | | form.on('submit(Saver)', function (data) {//ä¿å |
| | | var refSav = ""; |
| | | if (linterid == "" || linterid == null) { |
| | | if (OperationType == 1 || OperationType == 2) { |
| | | refSav = "Add"; |
| | | } |
| | | if (linterid != "" && linterid != null) { |
| | | if (OperationType == 3) { |
| | | refSav = "Update"; |
| | | } |
| | | data.field.HMaker = sessionStorage["HUserName"];//å¶å人 |
| | | //çéå é¤ä¹åä¸ä¸ºç©ºçæ°æ®ç» |
| | | var row = []; |
| | | for (var i = 0; i < table.cache['mainTable'].length; i++) { |
| | | if (table.cache['mainTable'][i] != "") { |
| | | row.push(table.cache['mainTable'][i]) |
| | | } |
| | | } |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(table.cache['mainTable']); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + refSav; |
| | | var sSubStr = JSON.stringify(row); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + refSav + ";" + sessionStorage["HUserName"]; |
| | | if (!AllowLoadData(sSubStr))//æ°æ®éªè¯ |
| | | { |
| | | return false; |
| | |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true); |
| | | var index = parent.layer.getFrameIndex(window.name); //å
å¾å°å½åiframeå±çç´¢å¼ |
| | | parent.layer.close(index); //åæ§è¡å
³é           |
| | | $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);//ä¿åæé®ç¦ç¨ |
| | | $('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false);//å®¡æ ¸æé®å¯ç¨ |
| | | //var index = parent.layer.getFrameIndex(window.name); //å
å¾å°å½åiframeå±çç´¢å¼ |
| | | //parent.layer.close(index); //åæ§è¡å
³é           |
| | | }); |
| | | } |
| | | else { |
| | |
| | | |
| | | //#region å®¡æ ¸ |
| | | form.on('submit(set_CheckBill)', function (data) { |
| | | |
| | | set_CheckBill() |
| | | }); |
| | | //#endregion |
| | | |
| | |
| | | }); |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ¬é¡µé¢ææè¢«è°ç¨çæ¹æ³ |
| | | //#region æ¬é¡µé¢ææè¢«è°ç¨çæ¹æ³ |
| | | |
| | | //#region åå§å表å |
| | | function set_InitFrom() { |
| | |
| | | |
| | | //#region è¡¨æ ¼å¢å è¡äºä»¶ |
| | | function btnAddLine(NewRow) { |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | var tableBak = table.cache["mainTable"]; //è·åä¹åç¼è¾è¿çè¡¨æ ¼æ°æ® |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < tableBak.length; i++) { |
| | | buttonArr.push(tableBak[i]); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | | buttonArr.push(NewRow); //å¨å°¾é¨å ä¸è¡ |
| | | table.reload("mainTable", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å®¡æ ¸ |
| | | function set_CheckBill() { |
| | | var InterID = $("#HInterID").val(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_ICMOReportBill/AuditProcessReportList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 10000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | $("#btnSearch").trigger('click'); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | , { field: 'HWorkerCode', title: 'æä½å代ç ', edit: 'text', event: 'HWorkerCode', width: 100 } |
| | | , { field: 'HWorkerName', title: 'æä½ååç§°', edit: 'text', width: 100 } |
| | | , { field: 'HQty', title: 'ç产æ°é', edit: 'text', width: 100 } |
| | | , { field: 'HBadQty', title: 'ä¸è¯æ°é', edit: 'text', width: 100 } |
| | | , { 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: '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 } |
| | | , { field: 'HSourceBillType', title: 'æºåç±»å', edit: 'text', width: 100, hide: true } |
| | | |
| | | , { field: 'HRemark', title: '表ä½å¤æ³¨', edit: 'text', width: 100 } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 150 } |
| | | ]; |
| | |
| | | , cellMinWidth: 120 |
| | | , height: 500 |
| | | , cols: [columns] |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | }; |
| | | |
| | | columns_prodReport = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { 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: '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: '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: 'HQty', title: 'ç产æ°é', edit: 'text', width: 100 } |
| | | , { field: 'HBadQty', title: 'ä¸è¯æ°é', edit: 'text', width: 100 } |
| | | , { field: 'HICMOBillNo', title: 'ç产订å', edit: 'text', width: 100 } |
| | | , { field: 'HRemark', title: '表ä½å¤æ³¨', edit: 'text', width: 100 } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 150 } |
| | | ]; |
| | | option_prodReport = { |
| | | id: 'mainTable_prodReport' |
| | | , elem: '#mainTable_prodReport' |
| | | , page: true |
| | | , limit: 1000 |
| | | , limits: [500, 1000, 1500, 2000, 3000] |
| | | , cellMinWidth: 120 |
| | | , height: 500 |
| | | , cols: [columns_prodReport] |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | |
| | | success: function (d) { |
| | | //console.log(d.data); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HInterID").val(0); |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | |
| | | $('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#set_DeleteBill').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#get_PrintReport').addClass("layui-btn-disabled").attr("disabled", true); |
| | | option.data = [TabRow]; |
| | | 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 |
| | | }]; |
| | | table.render(option); |
| | | } |
| | | //#endregion |
| | |
| | | function set_AddNew() { |
| | | //è·åæå¤§åæ®å· |
| | | get_MAXNum(); |
| | | option.data = [TabRow]; |
| | | table.render(option); |
| | | if (linterid.length > 0 && HSouceBillType == 3724) { |
| | | var arr = []; |
| | | var arr_detail = []; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "Sc_ICMOReportBill/GetProdReportBillList", |
| | | type: "GET", |
| | | data: { |
| | | "HInterID": linterid, |
| | | "user": sessionStorage["HUserName"] |
| | | }, |
| | | async: false, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data.h_p_Sc_ICMOBillWorkQtyStatus_TmpList1; //æ±æ»ä¿¡æ¯ |
| | | var data_detail = result.data.h_p_Sc_ICMOBillWorkQtyStatus_TmpList; //æç»ä¿¡æ¯ |
| | | |
| | | for (let i = 0; i < data.length; i++) { |
| | | arr.push({ |
| | | "HMaterID": data[i].ç©æID, "HMaterCode": data[i].ç©æä»£ç , "HMaterName": data[i].ç©æåç§°, "HMaterSpec": data[i].è§æ ¼åå·, |
| | | "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HSourceID": data[i].çäº§èµæºID, "HSourceCode": data[i].çäº§èµæºä»£ç , |
| | | "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 |
| | | }); |
| | | } |
| | | |
| | | for (let j = 0; j < data_detail.length; j++) { |
| | | arr_detail.push({ |
| | | "HMaterID": data_detail[j].ç©æID, "HMaterCode": data_detail[j].ç©æä»£ç , "HMaterName": data_detail[j].ç©æåç§°, |
| | | "HMaterSpec": data_detail[j].è§æ ¼åå·, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HSourceID": data_detail[j].çäº§èµæºID, |
| | | "HSourceCode": data_detail[j].çäº§èµæºä»£ç , "HSourceName": data_detail[j].çäº§èµæºåç§°, "HWorkerid": data_detail[j].æä½åID, |
| | | "HWorkerCode": data_detail[j].æä½å代ç , "HWorkerName": data_detail[j].æä½ååç§°, "HQty": data_detail[j].产é, |
| | | "HBadQty": data_detail[j].ä¸è¯æ°é, "HICMOBillNo": data_detail[j].ç产订åå·, "HRemark": "" |
| | | }) |
| | | } |
| | | } else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | option.data = arr; |
| | | console.log(option.data); |
| | | table.render(option); |
| | | |
| | | option_prodReport.data = arr_detail; |
| | | table.render(option_prodReport); |
| | | } else { |
| | | 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 |
| | | }]; |
| | | table.render(option); |
| | | } |
| | | |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | function set_EditFromGrid() { |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |
| | | set_EditGrid(linterid); //ç¼è¾è·åè¡¨ä½ |
| | | option.data = [TabRow]; |
| | | 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 |
| | | }]; |
| | | table.render(option); |
| | | } |
| | | //#endregion |
| | |
| | | $("#HInnerBillNo").val(data.å
é¨åæ®å·); |
| | | $("#HDeptID").val(data.HDeptID); |
| | | $("#HDeptName").val(data.é¨é¨); |
| | | $("#HDeptNumber").val(data.é¨é¨ä»£ç ); |
| | | $("#HGroupID").val(data.HGroupID); |
| | | $("#HGroupName").val(data.çç»); |
| | | $("#HEmpID").val(data.HEmpID); |
| | |
| | | $("#HExplanation").val(""); |
| | | $("#HRemark").val(data.è¡¨å¤´å¤æ³¨); |
| | | PicUpload(); |
| | | get_file(); |
| | | } else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'èåå表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | ,content: ['../../PublicPage/UserInformation.html', 'yes'] |
| | | , content: ['../../PublicPage/UserInformation.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | |
| | | |
| | | //è·åç¼è¾æ¶,å·²ä¸ä¼ çæä»¶å表 |
| | | function get_file() { |
| | | var HBillNo = $("#HBillNo").val() |
| | | if (HBillNo != null || HBillNo != undefined) { |
| | | var ProImgByList = $('#ProImgByList') |
| | | $.ajax({ |
| | |
| | | , '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete" type="button" id="deltefile" onclick="javascript:toManager(this)"><i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>å é¤</button>' |
| | | , '</td>' |
| | | , '</tr>'].join('')); |
| | | |
| | | $('#ProImgByList').append(tr); |
| | | } |
| | | } else { |
| | |
| | | } |
| | | |
| | | |
| | | //å 餿件 |
| | | function toManager(r) { |
| | | //å¾å°å½åæå¨è¡ |
| | | var rows = r.parentNode.parentNode.rowIndex; |
| | | //å¾å°æå¨è¡ç第ä¸åçå
容:主é®ID |
| | | var HItemID = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(0)").html(); |
| | | //å¾å°æå¨è¡ç第äºåçå
容:åæ®å· |
| | | var HSourceBillNo = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(1)").html(); |
| | | //å¾å°æå¨è¡ç第ä¸åçå
容:æä»¶åç§° |
| | | var HFileName = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(2)").html(); |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | |
| | | //å é¤å·²ä¸ä¼ æä»¶ |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cj_StationOutBill/DeleteFilelist', |
| | | type: "GET", |
| | | data: { "HItemID": HItemID, "HSourceBillNo": HSourceBillNo, "HFileName": HFileName }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.alert(data1.Message, { icon: 1 }); |
| | | $("#ProImgByList tr").eq((rows - 1)).remove(); |
| | | } |
| | | else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //ä¸è½½æä»¶ |
| | | function dowload(r) { |
| | | //å¾å°å½åæå¨è¡ |
| | | var rows = r.parentNode.parentNode.rowIndex; |
| | | //å¾å°æå¨è¡ç第äºåçå
容:æä»¶å°å |
| | | var url = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(5)").html(); |
| | | /*window.location.href = url;*/ |
| | | window.open(url) |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | }); |
| | | |
| | | |
| | | //å 餿件 |
| | | function toManager(r) { |
| | | //å¾å°å½åæå¨è¡ |
| | | var rows = r.parentNode.parentNode.rowIndex; |
| | | //å¾å°æå¨è¡ç第ä¸åçå
容:主é®ID |
| | | var HItemID = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(0)").html(); |
| | | //å¾å°æå¨è¡ç第äºåçå
容:åæ®å· |
| | | var HSourceBillNo = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(1)").html(); |
| | | //å¾å°æå¨è¡ç第ä¸åçå
容:æä»¶åç§° |
| | | var HFileName = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(2)").html(); |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | |
| | | //å é¤å·²ä¸ä¼ æä»¶ |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cj_StationOutBill/DeleteFilelist', |
| | | type: "GET", |
| | | data: { "HItemID": HItemID, "HSourceBillNo": HSourceBillNo, "HFileName": HFileName }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.alert(data1.Message, { icon: 1 }); |
| | | $("#ProImgByList tr").eq((rows - 1)).remove(); |
| | | } |
| | | else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | //ä¸è½½æä»¶ |
| | | function dowload(r) { |
| | | //å¾å°å½åæå¨è¡ |
| | | var rows = r.parentNode.parentNode.rowIndex; |
| | | //å¾å°æå¨è¡ç第äºåçå
容:æä»¶å°å |
| | | var url = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(5)").html(); |
| | | /*window.location.href = url;*/ |
| | | window.open(url) |
| | | } |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |