| | |
| | | , { field: 'HNumber', title: '模å
·ä»£ç ' } |
| | | , { field: 'HName', title: '模å
·åç§°' } |
| | | , { field: 'HModel', title: '模å
·è§æ ¼' } |
| | | , { field: 'HDesignLife', title: '设计寿å½' } |
| | | , { field: 'HLeaveLife', title: 'å©ä½å¯¿å½' } |
| | | , { field: 'HUseLife', title: '使ç¨å¯¿å½' } |
| | | ]] |
| | | }; |
| | | |
| | |
| | | <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> |
| | | //è·ååæ° |
| | | //è·ååæ° |
| | | function getUrlVars() { |
| | | var vars = [], hash; |
| | | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); |
| | |
| | | HMaterCode: checkStatus.data[0].HNumber, |
| | | HMaterName: checkStatus.data[0].HName, |
| | | HMaterSpec: checkStatus.data[0].HModel, |
| | | |
| | | HDesignLife: 0, //è®¾è®¡å¯¿å½ |
| | | HLeaveLife: checkStatus.data[0].HLeaveLife, |
| | | HNewLife: checkStatus.data[0].HNewLife, |
| | | HDesignLife: checkStatus.data[0].HDesignLife, //è®¾è®¡å¯¿å½ |
| | | |
| | | }); |
| | | |
| | |
| | | |
| | | function RoadBillMain(hID)//å 载表头 |
| | | { |
| | | alert(hID); |
| | | |
| | | //æ¥è¯¢æ£éªæ¹æ¡åæ¯å¦åå¨ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "Sc_MouldLifeChangeBill/Sc_GetMouldLifeChangeBillListCheckDetai", |
| | |
| | | |
| | | |
| | | form.on('submit(Exit)', function (data) {// |
| | | var index = parent.layer.getFrameIndex(window.name); //å
å¾å°å½åiframeå±çç´¢å¼ |
| | | parent.layer.close(index); //åæ§è¡å
³é |
| | | if (OperationType == 1) { |
| | | Pub_Close(closeType);//ç´æ¥æ°å¢closeTypeå¼ä¸º2ï¼åè¡¨è°æ°å¢closeTypeå¼ä»åè¡¨ä¼ é |
| | | } |
| | | else if (OperationType == 3) { |
| | | Pub_Close(closeType); |
| | | } |
| | | else { |
| | | Pub_Close(2); |
| | | } |
| | | }); |
| | | |
| | | |
| | |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + '/Gy_Material/InitializeProdInBill', |
| | | data: { "hmainid": HInterID, "user": sessionStorage["HUserName"] }, |
| | | data: { "hmainid": HInterID, "user": sessionStorage["HUserName"], "userID": sessionStorage["OrganizationID"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | |
| | | , "HExplanation": data.ç»´ä¿®è¦æ± |
| | | , "HRemark": data.夿³¨ |
| | | , "HMainSourceBillType": data.HMainSourceBillType |
| | | , "HMainSourceBillNo": data.æºååå· |
| | | , "HMainSourceInterID": data.æºå主å
ç |
| | | , "HMainSourceEntryID": data.æºååç±»ç |
| | | , "HMainSourceBillNo": data.HMainSourceBillNo |
| | | , "HMainSourceInterID": data.HMainSourceInterID |
| | | , "HMainSourceEntryID": data.HMainSourceEntryID |
| | | |
| | | }); |
| | | |
| | |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data;; |
| | | var AddRow = table.cache['mainTable']; |
| | | var NewRow = { "HMaterID": 0, "HMaterNumber": "", "HUnitID": "0 ","HUnitNumber":"", "HQty": "0 ", "HQtyMust": "0", "HRemark": " " }; |
| | | var NewRow = { "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": "0 ", "HUnitNumber": "","HUnitName":"", "HQty": "0 ", "HQtyMust": "0", "HRemark": " " }; |
| | | switch (obj.event) { |
| | | //æ°å¢ä¸è¡ |
| | | case 'btn-AddLine': btnAddLine(NewRow); |
| | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: checkStatus.data[0].HItemID, |
| | | HMaterNumber: checkStatus.data[0].HNumber |
| | | HMaterNumber: checkStatus.data[0].HNumber, |
| | | HMaterName: checkStatus.data[0].HName |
| | | |
| | | }); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HUnitID: checkStatus.data[0].HItemID, |
| | | HUnitNumber: checkStatus.data[0].HNumber |
| | | HUnitNumber: checkStatus.data[0].HNumber, |
| | | HUnitName: checkStatus.data[0].HName |
| | | }); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | //常è§ç¨æ³ |
| | | laydate.render({ |
| | | elem: '#HDate' |
| | | |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HBeginDate' |
| | |
| | | function set_AddFNew() { |
| | | //è·åæå¤§åæ®å· |
| | | get_MAXNum(); |
| | | option.data = [{ "HMaterID": 0, "HMaterNumber": "", "HUnitID": "0 ", "HUnitNumber": "", "HQty": "0 ", "HQtyMust": "0", "HRemark": " " }]; |
| | | option.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": "0 ", "HUnitNumber": "", "HUnitName": "", "HQty": "0 ", "HQtyMust": "0", "HRemark" }]; |
| | | table.render(option); |
| | | } |
| | | |
| | |
| | | function set_EditFromGrid() { |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |
| | | set_EditGrid(linterid); //ç¼è¾è·åè¡¨ä½ |
| | | option.data = [{ "HMaterID": 0, "HMaterNumber": "", "HUnitID": "0 ", "HUnitNumber": "", "HQty": "0 ", "HQtyMust": "0", "HRemark": " " }]; |
| | | option.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": "0 ", "HUnitNumber": "", "HUnitName": "", "HQty": "0 ", "HQtyMust": "0", "HRemark"}]; |
| | | table.render(option); |
| | | } |
| | | |
| | |
| | | , "HEndDate": data.计åç»ææ¥æ |
| | | , "HExplanation": data.æè¦ |
| | | , "HRemark": data.夿³¨ |
| | | |
| | | |
| | | }); |
| | | |
| | |
| | | <div class="layui-row layui-col-space15"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card"> |
| | | <form id="form0" class="layui-form" lay-filter="component-form-group" action=""> |
| | | <form class="layui-form" lay-filter="component-form-group" id="component-form-group" action=""> |
| | | <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> |
| | |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 160 } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 160, hide: true } |
| | | , { field: '设å¤ä»£ç ', title: '设å¤ä»£ç ', width: 200 } |
| | | , { field: '设å¤åç§°', title: '设å¤åç§°', width: 200, hide: true } |
| | | , { field: '设å¤åç§°', title: '设å¤åç§°', width: 200 } |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 200, hide: true } |
| | | , { field: 'å¼å§æ¥æ', title: 'å¼å§æ¥æ', width: 200, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>"} |
| | | , { field: 'ç»ææ¥æ', title: 'ç»ææ¥æ', width: 200, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¢å ä¸è¡ |
| | | function btnAddLine(NewRow) { |
| | | var tableBak = table.cache["mainTable"]; //è·åä¹åç¼è¾è¿çè¡¨æ ¼æ°æ® |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < tableBak.length; i++) { |
| | | buttonArr.push(tableBak[i]); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | | buttonArr.push(NewRow); //å¨å°¾é¨å ä¸è¡ |
| | | table.reload("mainTable", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | } |
| | | //å¤å¶ä¸è¡ |
| | | function btnCopyLine(data) { |
| | | var copydata = JSON.stringify(data); |
| | | if (data.length <= 0) { |
| | | layer.alert("è¯·éæ©éè¦å¤å¶çä¸è¡ï¼"); |
| | | } |
| | | else if (data.length > 1) { |
| | | layer.alert("åªè½éæ©å¤å¶ä¸è¡ï¼"); |
| | | } |
| | | else { |
| | | var copydata2 = copydata.substring(1, copydata.length);//å»é¤é¦è¡å符'[' |
| | | var copyrow = copydata2.substring(0, copydata2.length - 1);//å»é¤æ«å°¾å符']' |
| | | table.cache["mainTable"].push(JSON.parse(copyrow));//å°å¤å¶çè¡å¼ºè½¬æjson追å å°è¡¨æ ¼ä¸ |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | //layer.alert(copyrow); |
| | | } |
| | | } |
| | | //ç¼è¾ |
| | | function set_EditFromGrid() { |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |