制作通用的单据编辑样例模块(生产汇报单列表/编辑),以方便其他开发人员可以借鉴。
| | |
| | | //var WEBURL = "http://101.37.171.70/API/"; //å
¬å¸æå¡å¨ |
| | | //var WEBURL = "http://localhost:8080/API/"; //颿忬å°é
ç½® |
| | | //var WEBURL = "http://localhost:8082/lubao"; //颿忬å°é
ç½® |
| | | //var WEBURL = "http://localhost:8082/LuBaoAPI/"; //æ¨é²æ¬å°é
ç½® |
| | | var WEBURL = "http://localhost:8082/LuBaoAPI/"; //æ¨é²æ¬å°é
ç½® |
| | | //var WEBURL = "http://10.1.4.154/API/"; //æ±ä¸°å®¢æ· |
| | | //var WEBURL = "http://10.1.4.155/API/"; //æ±ä¸°å®¢æ·NEW |
| | | var WEBURL = "http://47.96.97.237/API/"; //æºäºæå¡å¨ |
| | | //var WEBURL = "http://47.96.97.237/API/"; //æºäºæå¡å¨ |
| | | //var WEBURL = "http://183.129.128.86:9090/API/"; //å¯è´å¥ç¹å®¢æ·æå¡å¨ |
| | | return WEBURL |
| | | } |
| | |
| | | $("#HMainSourceBillType").val(""); |
| | | $('#HMainSourceBillNo').attr("disabled", false); |
| | | $('#XDHList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | Type = 1; |
| | | } |
| | | else { |
| | | $('#HMainSourceBillNo').attr("disabled", true); |
| | | $('#XDHList').removeClass("layui-btn-disabled").attr("disabled", false); |
| | | Type = 2; |
| | | } |
| | | }); |
| | | |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æºåç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HSourceBillType" lay-filter="HSourceBillType" id="HSourceBillType"> |
| | | <option value="0" selected="selected">ç产任å¡å</option> |
| | | <option value="1">æå·¥å½å
¥</option> |
| | | <select name="HMainSourceBillType" lay-filter="HMainSourceBillType" id="HMainSourceBillType"> |
| | | <option value="2">ç产任å¡å</option> |
| | | <option value="1" selected="selected">æå·¥å½å
¥</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">éåå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSourceBillNo" id="HSourceBillNo" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSourceInterID" id="HSourceInterID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSourceEntryID" id="HSourceEntryID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <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;"> |
| | | <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> |
| | |
| | | |
| | | var params = getUrlVars(); |
| | | var hID = params[params[0]];//ç¼è¾æ¥ç |
| | | var Type = params[params[1]] == undefined ? "1" : params[params[1]];//åæ®ç¼è¾ç¶æï¼ 1.æ æºåæ°å¢Â  2.ææºåæ°å¢Â  3.ç¼è¾Â 4.æµè§Â 5.åæ´ |
| | | |
| | | var Sctag = "0"; |
| | | |
| | | layui.config({ |
| | |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | |
| | | |
| | | |
| | | //常è§ç¨æ³ |
| | | laydate.render({ |
| | | elem: '#HDate' |
| | | //å
Œ
±åé |
| | | var option = []; |
| | | |
| | | }); |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | //if (sessionStorage.login != "login") { |
| | | // layer.confirm("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼", { |
| | | // icon: 4, skin: 'layui-layer-lan', title: "温馨æç¤º", closeBtn: 0, btn: ['éæ°ç»å½'] |
| | | // }, function () { window.location.href = "../../user/login.html"; }); |
| | | //} |
| | | //var tableReload = table.reload; |
| | | var option = { |
| | | id:'mainTable' |
| | | ,elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 500 |
| | | //,url: '/demo/table/user/' //æ°æ®æ¥å£ |
| | | , page: true //å¼å¯å页 |
| | | , cols: [[ //表头 |
| | | { 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: '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: '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: 'HRemark', title: '表ä½å¤æ³¨', edit: 'text', width: 100 } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 150 } |
| | | ]] |
| | | , limit: 500 //æ¯é¡µé»è®¤æ¾ç¤ºçæ°é |
| | | }; |
| | | |
| | | |
| | | //夿æ¯å¦æ°å¢ |
| | | if (hID == null || hID == 0) { |
| | | //åå§å è½½è¡¨æ ¼{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": " ", "HSQProcName": " ","HProcID":0, "HZRProcName": " ", "HMRBChecker": " ", "HRemark": " ", "HPSProcName": " ", "HCloseMan": " " } |
| | | option.data = [TabRow]; |
| | | table.render(option); |
| | | } |
| | | else { |
| | | $("#HInterID").val(hID);//ä¿®æ¹æ¶ä¸»è¡¨ID |
| | | //ç¼è¾å è½½æ°æ® |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Sc_ICMOReportBill/Sc_ICMOReportBillListProjectDetai', |
| | | type: "GET", |
| | | data: { "sqlWhere": "and hmainid=" + hID }, |
| | | success: function (result) { |
| | | //console.log(result); |
| | | //console.log('gouba' + result); |
| | | if (result.count == 1) { |
| | | option.data = result.data; |
| | | table.render(option); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index0); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | //åå§å表åæä»¶ |
| | | set_InitFrom(); |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | var rowid = 0; |
| | | var rows = 0; |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var rowid = 0; |
| | | var rows = 0; |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data;; |
| | | var AddRow = table.cache['mainTable']; |
| | | var NewRow = TabRow; |
| | | switch (obj.event) { |
| | | case 'btn-AddLine': |
| | | //table.cache["mainTable"].push(AddRow[rows]); |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | rows++; |
| | | layer.msg('å¢å ä¸è¡æé®ï¼') |
| | | case 'btn-AddLine': btnAddLine(NewRow); |
| | | break; |
| | | case 'btn-CopyLine': |
| | | 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); |
| | | } |
| | | case 'btn-CopyLine': btnCopyLine(data); |
| | | |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | //è¡å
äºä»¶ |
| | | table.on('tool(mainTable)', function (obj) { |
| | | set_GridDelete(obj); //è¡å
å é¤ |
| | | set_GridCellCheck(obj); //è¡å
å¿«æ·é®çé |
| | | }); |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | |
| | | //å¤ææ¯æºåæ°å¢ãæ æºåæ°å¢ãç¼è¾ |
| | | set_Type(Type); |
| | | |
| | | //夿æ¯å¦æºåæ°å¢ãæè
ç¼è¾ |
| | | set_CheckSelect(); |
| | | |
| | | |
| | | //åå§å表å |
| | | function set_InitFrom() { |
| | | laydate.render({ |
| | | elem: '#HDate' |
| | | |
| | | }); |
| | | } |
| | | |
| | | //è¡¨æ ¼å¢å è¡äºä»¶ |
| | | function btnAddLine(NewRow) { |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | rows++; |
| | | layer.msg('å¢å ä¸è¡æé®ï¼') |
| | | } |
| | | |
| | | //è¡¨æ ¼å¤å¶è¡äºä»¶ |
| | | 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);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | } |
| | | } |
| | | |
| | | //è¡¨æ ¼è¡å
äºä»¶å é¤ |
| | | function set_GridDelete(obj) { |
| | | var data = obj.data; |
| | | var rowIndex = $(obj.tr).attr("data-index"); |
| | | if (obj.event === 'del') { |
| | |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.reload(option); |
| | | layer.close(index); |
| | | //obj.del(); |
| | | //layer.close(index); |
| | | |
| | | //var oldData = table.cache["mainTable"]; |
| | | //oldData.splice(obj.tr.data('index'), 1); |
| | | //table.reload('mainTable', { data: oldData }); |
| | | //layer.close(index); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //è¡¨æ ¼è¡å
äºä»¶å¿«æ·é®çé |
| | | function set_GridCellCheck(obj) { |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | if (event.key == "F7") { |
| | | if (obj.event === 'HMaterCode') //ç©æä¿¡æ¯ |
| | |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }); |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | var columns = [ |
| | | { 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: '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: '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: 'HRemark', title: '表ä½å¤æ³¨', edit: 'text', width: 100 } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 150 } |
| | | ]; |
| | | option = { |
| | | id: 'mainTable' |
| | | , elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: false |
| | | , cellMinWidth: 120 |
| | | , height: 500 |
| | | , cols: [columns] |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | }; |
| | | } |
| | | |
| | | //è·åæå¤§åæ®å· |
| | | function set_MAXNum() { |
| | | var date = new Date(); |
| | | var day = date.getDate(); |
| | | var month = date.getMonth() + 1; |
| | | var year = date.getFullYear(); |
| | | var shijian = year + "-" + month + "-" + day; |
| | | |
| | | //è·åæå¤§åæ®å· new |
| | | $("#HInterID").val("0"); |
| | | $("#HBillNo").val(""); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3711' }, |
| | | success: function (d) { |
| | | //console.log(d.data); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HDate").val(shijian); |
| | | $("#HInterID").val(0); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¤ææ¯æºåæ°å¢ãæ æºåæ°å¢ãç¼è¾ |
| | | function set_Type(Type) { |
| | | console.log(Type); |
| | | switch (Type) { |
| | | //æ æºåæ°å¢ |
| | | case '1': set_AddFNew(); |
| | | break; |
| | | //ææºåæ°å¢Â  |
| | | case '2': set_AddNew(); |
| | | break; |
| | | //ç¼è¾Â |
| | | case '3': set_EditFromGrid(); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | function RoadBillMain(hID)//å 载表头 |
| | | //æ æºåæ°å¢ |
| | | function set_AddFNew() |
| | | { |
| | | |
| | | |
| | | //è·åæå¤§åæ®å· |
| | | set_MAXNum(); |
| | | $('#HMainSourceBillNo').attr("disabled", false); |
| | | $('#XDHList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | option.data = [TabRow]; |
| | | table.render(option); |
| | | } |
| | | |
| | | //ææºåæ°å¢ |
| | | function set_AddNew() { |
| | | //è·åæå¤§åæ®å· |
| | | set_MAXNum(); |
| | | option.data = [TabRow]; |
| | | table.render(option); |
| | | } |
| | | |
| | | //ç¼è¾è·å表头ãè·åè¡¨ä½ |
| | | function set_EditFromGrid() { |
| | | set_EditForm(hID); //ç¼è¾è·å表头 |
| | | set_EditGrid(hID); //ç¼è¾è·åè¡¨ä½ |
| | | option.data = [TabRow]; |
| | | table.render(option); |
| | | } |
| | | |
| | | //ç¼è¾è·å表头 |
| | | function set_EditForm(hID) { |
| | | |
| | | //æ¥è¯¢æ£éªæ¹æ¡åæ¯å¦åå¨ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "Sc_ICMOReportBill/Sc_GetICMOReportBillListCheckDetai", |
| | |
| | | , "HGroupName": data.çç» //çç»åç§° |
| | | , "HEmpID": data.HEmpID //ç»è®¡åID |
| | | , "HEmpName": data.ç»è®¡å //ç»è®¡ååç§° |
| | | , "HSourceBillType": "" //æºåç±»å |
| | | , "XDH": "" //éåå· |
| | | , "HMainSourceBillNo": data.HMainSourceBillNo |
| | | , "HMainSourceInterID": data.HMainSourceInterID |
| | | , "HMainSourceEntryID": data.HMainSourceEntryID |
| | | , "HExplanation": "" //æè¦ |
| | | , "HRemark": data.è¡¨å¤´å¤æ³¨ //夿³¨ |
| | | }); |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | var date = new Date(); |
| | | var day = date.getDate(); |
| | | var month = date.getMonth() + 1; |
| | | var year = date.getFullYear(); |
| | | var shijian = year + "-" + month + "-" + day; |
| | | |
| | | //夿æ¯å¦æ°å¢ |
| | | if (hID == null || hID == 0) { |
| | | //è·åæå¤§åæ®å· new |
| | | $("#HInterID").val("0"); |
| | | $("#HBillNo").val(""); |
| | | //ç¼è¾è·åè¡¨ä½ |
| | | function set_EditGrid(hID) { |
| | | $("#HInterID").val(hID);//ä¿®æ¹æ¶ä¸»è¡¨ID |
| | | //ç¼è¾å è½½æ°æ® |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | url: GetWEBURL() + 'Sc_ICMOReportBill/Sc_ICMOReportBillListProjectDetai', |
| | | type: "GET", |
| | | data: { "HBillType": '3711' }, |
| | | success: function (d) { |
| | | //console.log(d.data); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HDate").val(shijian); |
| | | $("#HInterID").val(0); |
| | | data: { "sqlWhere": "and hmainid=" + hID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | option.data = result.data; |
| | | table.render(option); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index0); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | else {//å¦æä¿®æ¹åèµ°ä¸é¢ new |
| | | RoadBillMain(hID); |
| | | /* RoadBillSub(linterid);*/ |
| | | } |
| | | |
| | | //è·å䏿éä¸å¼ |
| | | form.on('select(HSourceBillType)', function (data) { |
| | | Sctag = data.value; |
| | | form.render('select'); |
| | | if (Sctag != "0") { |
| | | $('#XDHList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | } |
| | | else { |
| | | $('#XDHList').removeClass("layui-btn-disabled").attr("disabled", false); |
| | | } |
| | | }); |
| | | |
| | | //çè§ä¸ææ¡æ¯å¦æºå |
| | | function set_CheckSelect() { |
| | | //è·å䏿éä¸å¼ |
| | | form.on('select(HMainSourceBillType)', function (data) { |
| | | Sctag = data.value; |
| | | form.render('select'); |
| | | switch (Sctag) { |
| | | //æ æºåæ°å¢ |
| | | case '1': |
| | | $("#HMainSourceInterID").val("0"); |
| | | $("#HMainSourceEntryID").val("0"); |
| | | $('#HMainSourceBillNo').attr("disabled", false); |
| | | $('#XDHList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | Type = 1; |
| | | break; |
| | | //ææºåæ°å¢Â  |
| | | case '2': |
| | | $("#HMainSourceInterID").val("0"); |
| | | $("#HMainSourceEntryID").val("0"); |
| | | $('#HMainSourceBillNo').attr("disabled", true); |
| | | $('#XDHList').removeClass("layui-btn-disabled").attr("disabled", false); |
| | | Type = 2; |
| | | break; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | //表头信æ¯è½¦é´å¼¹çª |
| | |
| | | //var rowIndex = $("#mainTable").find("tbody tr").attr('data-index');//å½åè¡çç´¢å¼ |
| | | //$(".layui-table-view .layui-table tbody tr[data-index=" + 1+ "]").remove(); |
| | | |
| | | $("#HSourceBillNo").val(checkStatus.data[0].åæ®å·); |
| | | $("#HSourceInterID").val(checkStatus.data[0].hmainid); |
| | | $("#HSourceEntryID").val(checkStatus.data[0].HEntryID); |
| | | $("#HMainSourceBillNo").val(checkStatus.data[0].åæ®å·); |
| | | $("#HMainSourceInterID").val(checkStatus.data[0].hmainid); |
| | | $("#HMainSourceEntryID").val(checkStatus.data[0].HEntryID); |
| | | var list = []; |
| | | for (var i = 0; i <checkStatus.data.length; i++) { |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | list.push(checkStatus.data[i].åæ®å·) |
| | | } |
| | | if (isAllEqual(list)) //ç¸ååå· |
| | | { |
| | | if (checkStatus.data.length>1) |
| | | { |
| | | for (var i = 0; i < checkStatus.data.length-1; i++) //è¡¥è¡ |
| | | 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); |
| | |
| | | } |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | else |
| | | { |
| | | else { |
| | | layer.msg("è¯·éæ©ç¸ååå·!", { time: 1 * 2000, icon: 5 }); |
| | | } |
| | | |
| | | |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | |
| | | }); |
| | | |
| | | |
| | | |
| | | //éåº |
| | | form.on('submit(Exit)', function (data) {// |
| | | var index = parent.layer.getFrameIndex(window.name); //å
å¾å°å½åiframeå±çç´¢å¼ |
| | | parent.layer.close(index); //åæ§è¡å
³é |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | form.on('submit(Cancel)', function () { |
| | | //sessionStorage["SourceFlag"] = false; |
| | | parent.location.href = "../../../views/index.html" |
| | | //window.close();//å
³éå½å页 |
| | | }) |
| | | |
| | | //ç¼è¾è·åè¡¨ä½æ¶æ¶é´æ ¼å¼ç«æ£æ¹å¼ |
| | | function formatDate(date) { |
| | | var d = new Date(date), |
| | | month = '' + (d.getMonth() + 1), |
| | |
| | | return [year, month, day].join('-'); |
| | | } |
| | | |
| | | //æäº¤ä¿å |
| | | form.on('submit(Saver)', function (data) {//ä¿å |
| | | var refSav = ""; |
| | | if (hID == "" || hID == null) { |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | $.ajax( |
| | | { |
| | | type: "POST", |
| | |
| | | }); |
| | | } |
| | | else { |
| | | |
| | | f_alert(data.Message); |
| | | console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable)); |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | |
| | | f_alert("é误:" + err); |
| | | console.log("Reason" + sMainStr); |
| | | layer.alert(err.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | function f_alert(sMsg) { |
| | | layer.alert(sMsg, { icon: 5 }); |
| | | |
| | | } |
| | | |
| | | //çå¬æäº¤ |
| | | form.verify({ |
| | | numberOrEmpty: function (value, item) { |
| | | // if (value != '') { |
| | | if (!/^\d+$/.test(value)) { |
| | | return 'ä¸è½ä¸ºç©ºææ°åæè
0'; |
| | | } |
| | | //} |
| | | } |
| | | }); |
| | | |
| | | |
| | | }) |
| | | }); |
| | | //夿æ°ç»ä¸ç弿¯å¦ç¸å |
| | | |
| | | |
| | | //夿æºåå¸¦åæ°æ®æ°ç»ä¸ç弿¯å¦ç¸å |
| | | function isAllEqual(array) { |
| | | if (array.length > 0) { |
| | | return !array.some(function (value, index) { |
| | |
| | | } |
| | | } |
| | | |
| | | //å®ä¹å
¨å±åé |
| | | var HReasonName, ReasonID, EmpName, SQProcName, |
| | | ProcID, ZRProcName, QRName |
| | | ; |
| | | function GetHReasonValue(obj) //è¿åä¸è¯åå |
| | | { |
| | | HReasonName = obj[0].HName; |
| | | ReasonID = obj[0].HItemID; |
| | | } |
| | | //è¿åç©æ |
| | | function GetHMaterNameValue(obj) { //è¿åç©æ |
| | | $("#HMater").val(obj[0].HName); |
| | | $("#HMaterID").val(obj[0].HItemID); |
| | | $("#HMaterNumber").val(obj[0].HNumber); |
| | | } |
| | | //è¿åå·¥åº |
| | | function GetHProcValue(obj) { //è¿åå·¥åº |
| | | $("#HProcName").val(obj[0].å·¥åº); |
| | | $("#HProcID").val(obj[0].HItemID); |
| | | $("#HProcNumber").val(obj[0].å·¥åºä»£ç ); |
| | | } |
| | | function GetHDeptNameValue(obj) { //è¿åé¨é¨ |
| | | $("#HDepName").val(obj[0].HName); |
| | | $("#HDeptID").val(obj[0].HItemID); |
| | | $("#HDeptNumber").val(obj[0].HNumber); |
| | | } |
| | | //è¿ååä½ |
| | | function GetHUnitNameValue(obj) { |
| | | $("#HUName").val(obj[0].HName); |
| | | $("#HUnitID").val(obj[0].HItemID); |
| | | $("#HUnitNumber").val(obj[0].HNumber); |
| | | } |
| | | |
| | | function GetHKeeperValue(obj) { //è¿å责任人 |
| | | EmpName = obj[0].HName; |
| | | // $("#HEmpName").val(obj[0].HName); |
| | | //$("#HItemID").val(obj[0].HItemID); |
| | | } |
| | | //function GetHProcValue(obj) { //è¿åç³è¯·å·¥åº |
| | | // SQProcName = obj[0].å·¥åº; |
| | | // ProcID = obj[0].HItemID; |
| | | // //$("#HSQProcName").val(obj[0].å·¥åº); |
| | | // //$("#HProcID").val(obj[0].HItemID); |
| | | //} |
| | | function GetHZRValue(obj) { //è¿åè´£ä»»å·¥åº |
| | | ZRProcName = obj[0].å·¥åº; |
| | | //$("#HZRProcName").val(obj[0].å·¥åº); |
| | | //$("#HItemID").val(obj[0].HItemID); |
| | | } |
| | | //HWorker |
| | | function GetHWorkerValue(obj) { //è¿åä¸è¯ç¡®è®¤äºº |
| | | QRName = obj[0].HName; |
| | | //$("#HQRName").val(obj[0].HName); |
| | | //$("#HItemID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | function AllowLoadData(sSubStr) { //é空éªè¯ |
| | | var Result = true; |
| | | if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null) { |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <title>çäº§æ±æ¥åå表</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>çäº§æ±æ¥åå表</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | |
| | | } |
| | | </style> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç¶æ</label> |
| | | <div class="layui-input-block" > |
| | | <div class="layui-input-block"> |
| | | <select name="Status" lay-filter="Status" style="width:190px;"> |
| | | <option value="-1" selected="selected">å
¨é¨</option> |
| | | <option value="0">æªå®¡æ ¸</option> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate" style="width:190px;"> |
| | | <input type="date" class="layui-input" id="HBeginDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate1" style="width:190px;"> |
| | | <input type="date" class="layui-input" id="HEndDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Print"><i class="layui-icon layui-icon-circle"></i>é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Cell"><i class="layui-icon layui-icon-ok"></i>ä¿åå宽</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-RefreshCell"><i class="layui-icon layui-icon-refresh"></i>é»è®¤å宽</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload" style="display:none;"><i class="layui-icon layui-icon-refresh"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm" style="display:none;"><i class="layui-icon layui-icon-ok-circle"></i>确认</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back" style="display:none;"><i class="layui-icon layui-icon-close-fill"></i>驳å</button> |
| | |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | var sWhere = ""; |
| | | , laydate = layui.laydate |
| | | |
| | | var option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | ,height: 'full-50' |
| | | , page: true |
| | | ,cellMinWidth: 90 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: 'hmainid', sort: true, hide: true, width: 200} |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 160,templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>"} |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 200} |
| | | , { field: 'çç»ä»£ç ', title: 'çç»ä»£ç ', width: 200 } |
| | | , { field: 'çç»', title: 'çç»', width: 200 } |
| | | , { field: 'æä½å', title: 'æä½å', width: 200} |
| | | , { field: 'çäº§èµæºä»£ç ', title: 'çäº§èµæºä»£ç ', width: 200 } |
| | | , { field: 'çäº§èµæº', title: 'çäº§èµæº', width: 200} |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 200 } |
| | | , { field: 'hsubid', title: 'hsubid', hide: true, width: 200} |
| | | , { field: 'hmaterid', title: 'hmaterid', hide: true, width: 200} |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 200} |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 200} |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 200} |
| | | , { field: 'hunitid', title: 'hunitid', hide: true, width: 200} |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 200} |
| | | , { field: '计éåä½', title: '计éåä½', width: 200} |
| | | , { field: 'ç产æ°é', title: 'ç产æ°é', width: 200} |
| | | , { field: 'ç产任å¡åå·', title: 'ç产任å¡åå·', width: 200} |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 200} |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200} |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ? '':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 200, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 200 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 200, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'HICMOInterID', title: 'HICMOInterID', hide: true, width: 200} |
| | | , { field: 'HEmpID', title: 'HEmpID', hide: true, width: 200} |
| | | , { field: 'HEmpName', title: 'HEmpName', hide: true, width: 200} |
| | | , { field: 'HSourceID', title: 'HSourceID', hide: true, width: 200} |
| | | , { field: 'HSourceName', title: 'HSourceName', hide: true, width: 200} |
| | | , { field: 'HGroupID', title: 'HGroupID', hide: true, width: 200} |
| | | , { field: 'HGroupName', title: 'HGroupName', hide: true, width: 200} |
| | | , { field: 'HEmpNumber', title: 'HEmpNumber', hide: true, width: 200} |
| | | ]] |
| | | }; |
| | | //å
Œ
±åé |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var DataList; |
| | | var Name = "ICMReportCellWidth"; |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_Display(sWhere); |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch (obj.event) { |
| | | case 'btn-Add': |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢çäº§æ±æ¥å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../çäº§æ±æ¥å/Sc_Add_ICMOReportBillList.html', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | //æ°å¢æé® |
| | | case 'btn-Add': set_AddNew(); |
| | | break; |
| | | case 'btn-Edit': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | //if (AllowLoadData(sSubStr) != false) {//é空éªè¯ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾çäº§æ±æ¥å' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../çäº§æ±æ¥å/Sc_Add_ICMOReportBillList.html?hID=' + hID |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | |
| | | //ç¼è¾æé® |
| | | case 'btn-Edit': set_ShowBill(); |
| | | break; |
| | | case 'btn-Delete': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sc_ICMOReportBill/DeltetICMOReportBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | //å é¤æé® |
| | | case 'btn-Delete': set_DeleteBill(); |
| | | break; |
| | | |
| | | case 'btn-Audit': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.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 * 1000, 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 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å®¡æ ¸ï¼'); |
| | | } |
| | | //å®¡æ ¸æé® |
| | | case 'btn-Audit': set_CheckBill(); |
| | | break; |
| | | case 'btn-DeAudit': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_ICMOReportBill/AuditProcessReportList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, 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 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®åå®¡æ ¸ï¼'); |
| | | } |
| | | //åå®¡æ ¸æé® |
| | | case 'btn-DeAudit': set_AbandonCheck(); |
| | | break; |
| | | //é¢è§æé® |
| | | case 'btn-Print': get_PrintReport(); |
| | | break; |
| | | //ä¿åå宽æé® |
| | | case 'btn-Cell': set_SaveGridColWidth(); |
| | | break; |
| | | //é»è®¤å宽æé® |
| | | case 'btn-RefreshCell': set_DefaultGridColWidth(); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | var index = layer.load(0, { shade: false }); |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL() + '/Sc_ICMOReportBill/list', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(table, option); |
| | | }); |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | $('#Status').find("option[value='-1']").attr("selected", true); |
| | | $("#HDate").val("");//å¼å§æ¥æ |
| | | $("#HDate1").val("");//ç»ææ¥æ |
| | | $("#HBillNo").val(""); |
| | | $("#Dept").val(""); |
| | | $("#Part").val(""); |
| | | $("#btnSearch").click(); |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | //è·åå宽 |
| | | function getColumnsWidth() { |
| | | var result = []; |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | //è·åå宽 |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidthList', |
| | | async: false, |
| | | type: "Get", |
| | | dataType: "json", |
| | | data: { "colNum": colNum, "Name": Name }, |
| | | success: function (data1) { |
| | | if (data1.code == 1) { |
| | | result = data1.data; |
| | | } |
| | | else if (data1.code == -1) { |
| | | |
| | | } |
| | | else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | //å è½½ç½æ ¼ |
| | | var wait = layer.load();//é®ç½© |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_ICMOReportBill/list', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(wait); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery(table, option) { |
| | | var Status = $("select[name='Status']").val();//ç¶æ |
| | | var HDate = $("#HDate").val();//å¼å§æ¥æ |
| | | var HDate1 = $("#HDate1").val();//ç»ææ¥æ |
| | | var HDate = $("#HBeginDate").val();//å¼å§æ¥æ |
| | | var HDate1 = $("#HEndDate").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val(); //åæ®å· |
| | | var Dept = $("#Dept").val(); //é¨é¨ä¿¡æ¯ |
| | | var Part = $("#Part").val(); //ç©æä¿¡æ¯ |
| | |
| | | if (Part) { |
| | | sWhere += " and concat(ç©æä»£ç ,ç©æåç§°,è§æ ¼åå·) like '%" + Part + "%'"; |
| | | } |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL() + '/Sc_ICMOReportBill/list', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | } else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | |
| | | var index = layer.load(0); |
| | | get_Display(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $('#Status').find("option[value='-1']").attr("selected", true); |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HBillNo").val(""); |
| | | $("#Dept").val(""); |
| | | $("#Part").val(""); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | var columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: 'hmainid', sort: true, hide: true, width: 200 } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 160, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 200 } |
| | | , { field: 'çç»ä»£ç ', title: 'çç»ä»£ç ', width: 200 } |
| | | , { field: 'çç»', title: 'çç»', width: 200 } |
| | | , { field: 'æä½å', title: 'æä½å', width: 200 } |
| | | , { field: 'çäº§èµæºä»£ç ', title: 'çäº§èµæºä»£ç ', width: 200 } |
| | | , { field: 'çäº§èµæº', title: 'çäº§èµæº', width: 200 } |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 200 } |
| | | , { field: 'hsubid', title: 'hsubid', hide: true, width: 200 } |
| | | , { field: 'hmaterid', title: 'hmaterid', hide: true, width: 200 } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 200 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 200 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 200 } |
| | | , { field: 'hunitid', title: 'hunitid', hide: true, width: 200 } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 200 } |
| | | , { field: '计éåä½', title: '计éåä½', width: 200 } |
| | | , { field: 'ç产æ°é', title: 'ç产æ°é', width: 200 } |
| | | , { field: 'ç产任å¡åå·', title: 'ç产任å¡åå·', width: 200 } |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 200 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ? '':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 200, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 200 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 200, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'HICMOInterID', title: 'HICMOInterID', hide: true, width: 200 } |
| | | , { field: 'HEmpID', title: 'HEmpID', hide: true, width: 200 } |
| | | , { field: 'HEmpName', title: 'HEmpName', hide: true, width: 200 } |
| | | , { field: 'HSourceID', title: 'HSourceID', hide: true, width: 200 } |
| | | , { field: 'HSourceName', title: 'HSourceName', hide: true, width: 200 } |
| | | , { field: 'HGroupID', title: 'HGroupID', hide: true, width: 200 } |
| | | , { field: 'HGroupName', title: 'HGroupName', hide: true, width: 200 } |
| | | , { field: 'HEmpNumber', title: 'HEmpNumber', hide: true, width: 200 } |
| | | ]; |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: true |
| | | , cellMinWidth: 120 |
| | | , totalRow: true |
| | | , limit: 10 |
| | | , height: 'full-50' |
| | | , cols: [columns] |
| | | , limits: [50, 500, 1000, 5000] |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | }; |
| | | //设置å宽 |
| | | var colWidth = getColumnsWidth(); |
| | | if (colWidth == "" || colWidth == []) { |
| | | |
| | | } |
| | | else { |
| | | $.each(columns, function (x, m) { |
| | | m["width"] = colWidth[x]; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //æ°å¢ |
| | | function set_AddNew() { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢çäº§æ±æ¥å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../çäº§æ±æ¥å/Sc_Add_ICMOReportBillList.html?hID=&Type=1', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | |
| | | //ç¼è¾ |
| | | function set_ShowBill() |
| | | { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | //if (AllowLoadData(sSubStr) != false) {//é空éªè¯ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾çäº§æ±æ¥å' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../çäº§æ±æ¥å/Sc_Add_ICMOReportBillList.html?hID=' + hID + '&Type=3' |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | //å é¤ |
| | | function set_DeleteBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sc_ICMOReportBill/DeltetICMOReportBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | } |
| | | |
| | | //å®¡æ ¸ |
| | | function set_CheckBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.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 * 1000, 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 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å®¡æ ¸ï¼'); |
| | | } |
| | | } |
| | | |
| | | //åå®¡æ ¸ |
| | | function set_AbandonCheck() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_ICMOReportBill/AuditProcessReportList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, 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 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®åå®¡æ ¸ï¼'); |
| | | } |
| | | |
| | | } |
| | | |
| | | //é¢è§ |
| | | function get_PrintReport() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | layer.alert("ææ¯æå°æé®ï¼åæ®ä¸»IDæ¯ï¼" + InterID); |
| | | //window.open("../ç产工åºç®¡ç/å·¥åºæ±æ¥å/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b"); |
| | | window.open("../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/HBarPlanPrint.html?linterid=" + InterID + "&Type=HDepartMent" + "&OpenTmp=b"); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | |
| | | //ä¿åå宽 |
| | | function set_SaveGridColWidth() { |
| | | var arr = []; |
| | | // åæ° |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | for (var i = 0; i <= colNum; i++) { |
| | | var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text(); |
| | | var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width(); |
| | | if (colName != "" && colName != null) { |
| | | arr.push(colWidth == -1 ? 200 : colWidth); |
| | | } |
| | | } |
| | | arr.unshift(40); //é¦ä½è¿½å |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth', |
| | | async: false, |
| | | type: "POST", |
| | | dataType: "json", |
| | | data: { "myMap": JSON.stringify(arr), "Name": Name }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.alert(data1.Message, { icon: 1 }); |
| | | } else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | //设置èµå¼å宽 |
| | | var colWidth = getColumnsWidth(); |
| | | if (colWidth == "" || colWidth == []) { |
| | | |
| | | } |
| | | else { |
| | | $.each(columns, function (x, m) { |
| | | m["width"] = colWidth[x]; |
| | | }); |
| | | } |
| | | get_FastQuery(table, option); |
| | | } |
| | | |
| | | //é»è®¤å宽 |
| | | function set_DefaultGridColWidth() { |
| | | var arr = []; |
| | | // åæ° |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | for (var i = 0; i <= colNum; i++) { |
| | | var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text(); |
| | | if (colName != "" && colName != null) { |
| | | arr.push(200); //é»è®¤å®½åº¦200 |
| | | } |
| | | } |
| | | arr.unshift(40); //é¦ä½è¿½å |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth', |
| | | async: false, |
| | | type: "POST", |
| | | dataType: "json", |
| | | data: { "myMap": JSON.stringify(arr), "Name": Name }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.alert(data1.Message, { icon: 1 }); |
| | | |
| | | } else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | //设置èµå¼å宽 |
| | | var colWidth = getColumnsWidth(); |
| | | if (colWidth == "" || colWidth == []) { |
| | | |
| | | } |
| | | else { |
| | | $.each(columns, function (x, m) { |
| | | m["width"] = colWidth[x]; |
| | | }); |
| | | } |
| | | get_FastQuery(table, option); |
| | | } |
| | | |
| | | |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | $('#Status').find("option[value='-1']").attr("selected", true); |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HBillNo").val(""); |
| | | $("#Dept").val(""); |
| | | $("#Part").val(""); |
| | | $("#btnSearch").click(); |
| | | }); |
| | | |
| | | |
| | | //laydate.render({ |
| | | // elem: '#HDate' |
| | | // , type: 'datetime' |
| | | // , trigger: 'click' |
| | | // , format:'yyyy-MM-dd HH:mm' |
| | | //}); |
| | | |
| | | |
| | | //以䏿¯layui模å |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script> |