器具处理出库单、器具报废入库单、器具直接调拨单,列表编辑页面功能完善
| | |
| | | //#region è®¾ç½®è¡¨æ ¼é¡µå¤§å°åå§ |
| | | //#region éèå设置 |
| | | function get_HideColumn(HModName, user, option, optionPage, get_FastQuery) { |
| | | var colName = ""; |
| | | for (var i = 1; i < option.cols[0].length; i++) { |
| | | colName += option.cols[0][i]["field"] + ","; |
| | | } |
| | | |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "éèå设置" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["50%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../åºç¡èµæ/éèå设置/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | //åå§åé¡µå¤§å° |
| | | DisPlay_HideColumn_GetPageSize(HModName, user, optionPage); |
| | | //ç´æ¥æ§è¡å表çé å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery() |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region è®¾ç½®è¡¨æ ¼é¡µå¤§å°åå§ |
| | | function DisPlay_HideColumn_GetPageSize(HModName, user,optionPage) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | //#endregion |
| | | //#region æ¾ç¤ºåæ°æ® |
| | | function DisPlay_HideColumn(HModName, user, option) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "HModName": HModName, "user": user }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = []; |
| | | var newCols = [[]];//å¯¹åºæ°æ®åºå顺åºcol |
| | | newCols[0].push(option.cols[0][0]);//æ¾å
¥ç¬¬ä¸ä¸ªcheckbox |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | //åè®¾ç½®åæ°ä¸é¡µé¢åæ°æ¯å¦ä¸è´ |
| | | if (dataCol.length == option.cols[0].length - 1) { |
| | | //éå寻æ¾å设置对åºåæé¡ºåºæå
¥ |
| | | for (var j = 0; j < option.cols[0].length - 1; j++) { |
| | | for (var i = 0; i < option.cols[0].length - 1; i++) { |
| | | var dataCols = dataCol[j].split('|'); |
| | | //éæ©ä¸datacolsç¸åºåè¿è¡ä¿®æ¹ |
| | | if (option.cols[0][i + 1]["field"] == dataCols[5]) { |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å宽 |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | } |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //ç»è®¡å |
| | | if (dataCols[6] == 1) { |
| | | option.cols[0][i + 1]["totalRow"] = true; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | switch (dataCols[2]) { |
| | | case "L": |
| | | option.cols[0][i + 1]["align"] = "left"; |
| | | break; |
| | | case "M": |
| | | option.cols[0][i + 1]["align"] = "center"; |
| | | break; |
| | | case "R": |
| | | option.cols[0][i + 1]["align"] = "right"; |
| | | break; |
| | | } |
| | | //è®¾ç½®è¡¨æ ¼title屿§æ¾ç¤ºå«å |
| | | if (dataCols[4] != null && dataCols[4] != "") { |
| | | option.cols[0][i + 1]["title"] = dataCols[4]; |
| | | } |
| | | newCols[0].push(option.cols[0][i + 1]); |
| | | } |
| | | } |
| | | } |
| | | //éå循ç¯å夿坹åºåæ°æ¯å¦ä¸è´ |
| | | if (dataCol.length == newCols[0].length - 1) { |
| | | option.cols = newCols; |
| | | //åæ¶å»ç»å |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | if (option.cols[0][i]["fixed"] != null) { |
| | | option.cols[0][i]["fixed"] = null; |
| | | } |
| | | else { |
| | | break; |
| | | } |
| | | } |
| | | //å»ç»å |
| | | if (data1.data[0].HFixCols != 0) { |
| | | for (var i = 0; i < data1.data[0].HFixCols; i++) { |
| | | if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { |
| | | data1.data[0].HFixCols += 1; |
| | | } |
| | | option.cols[0][i + 1]["fixed"] = "left"; |
| | | } |
| | | } |
| | | //设置åæåº |
| | | for (var i = 1; i < option.cols[0].length; i++) { |
| | | if (data1.data[0].HSortFlag == "æ¯") { |
| | | option.cols[0][i]["sort"] = true; |
| | | } |
| | | else { |
| | | option.cols[0][i]["sort"] = false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | |
| | | get_FastQuery(); |
| | | }); |
| | | //#endregion |
| | | |
| | | //åå»è¡¨æ ¼äºä»¶ |
| | | table.on('rowDouble(mainTable)', function (obj) { |
| | | var index = parent.layer.getFrameIndex(window.name); |
| | | var data = obj.data; |
| | | //è¿åæ¹æ³ |
| | | parent.GetOrganization(data); |
| | | parent.layer.close(index); |
| | | }) |
| | | //#region åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼ |
| | |
| | | <label class="layui-form-label">å¨å
·ä»åº<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HWHName" id="HWHName" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HWHNumber" id="HWHNumber" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="WareHouse" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: checkStatus.data[0].hmainid, |
| | | HMaterCode: checkStatus.data[0].模å
·ç¼å·, |
| | | HMaterName: checkStatus.data[0].模å
·åç§°, |
| | | HMaterSpec: checkStatus.data[0].模å
·åå·, |
| | | |
| | | HDesignLife: 0, //è®¾è®¡å¯¿å½ |
| | | HLeaveLife: 0, //å©ä½å¯¿å½ |
| | | HQty: 1, //宿¶æ°é |
| | | HMoney: 0, //éé¢ |
| | | }); |
| | | OptionData = checkStatus.data[0]; //æé䏿°æ®çç¬¬ä¸æ¡èµå¼ç»OptionDataåé |
| | | 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": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HOtherOrgID": sessionStorage["OrganizationID"], "HStockOrgID": 0, "HStockOrgCode": "", "HStockOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" }; |
| | | 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].hmainid; |
| | | option.data[rowIndex + i].HMaterCode = checkStatus.data[i].模å
·ç¼å·; |
| | | option.data[rowIndex + i].HMaterName = checkStatus.data[i].模å
·åç§°; |
| | | option.data[rowIndex + i].HMaterSpec = checkStatus.data[i].模å
·åå·; |
| | | option.data[rowIndex + i].HUnitID = checkStatus.data[i].HUnitID; |
| | | option.data[rowIndex + i].HUnitCode = checkStatus.data[i].计éåä½ä»£ç ; |
| | | option.data[rowIndex + i].HUnitName = checkStatus.data[i].计éåä½; |
| | | } |
| | | table.render(option); //éæ°æ¸²æè¡¨æ ¼ä»¥æ¾ç¤ºæ´æ°åçæ°æ® |
| | | } |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: OptionData.hmainid, |
| | | HMaterCode: OptionData.模å
·ç¼å·, |
| | | HMaterName: OptionData.模å
·åç§°, |
| | | HMaterSpec: OptionData.模å
·åå·, |
| | | HUnitID: OptionData.HUnitID, |
| | | HUnitCode: OptionData.计éåä½ä»£ç , |
| | | HUnitName: OptionData.计éåä½, |
| | | HDesignLife: 0, //è®¾è®¡å¯¿å½ |
| | | HLeaveLife: 0, //å©ä½å¯¿å½ |
| | | HQty: 1, //宿¶æ°é |
| | | HMoney: 0, //éé¢ |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HUnitID: OptionData.HItemID, |
| | | HUnitCode: OptionData.计éåä½ä»£ç , |
| | | HUnitName: OptionData.计éåä½åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | var HStockStyle = $("#HStockStyle").val(); |
| | | if (HStockStyle == "è·¨ç»ç»è°æ¨") //false åç»ç» true è·¨ç»ç» { |
| | | { |
| | | if (sessionStorage["OrganizationID"] == checkStatus.data[0].HItemID) { |
| | | layer.close(layer.index); |
| | | return layer.msg('è°æ¨ç±»å为跨ç»ç»è°æ¨ï¼å½åç»ç»ï¼' + sessionStorage["Organization"] + 'è¯·éæ©å
¶ä»ç»ç»'); |
| | | } |
| | | } |
| | | else { |
| | | if (sessionStorage["OrganizationID"] != checkStatus.data[0].HItemID) { |
| | | layer.close(layer.index); |
| | | return layer.msg('è°æ¨ç±»å为åç»ç»è°æ¨ï¼è¯·éæ©å½åç»ç»ï¼' + sessionStorage["Organization"]); |
| | | } |
| | | } |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HStockOrgID: checkStatus.data[0].HItemID, |
| | | HStockOrgCode: checkStatus.data[0].ç»ç»ä»£ç , |
| | | HStockOrgName: checkStatus.data[0].ç»ç»åç§°, |
| | | }); |
| | | OptionData = checkStatus.data[0]; |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | var HStockStyle = $("#HStockStyle").val(); |
| | | if (HStockStyle == "è·¨ç»ç»è°æ¨") //false åç»ç» true è·¨ç»ç» { |
| | | { |
| | | if (sessionStorage["OrganizationID"] == OptionData.HItemID) { |
| | | layer.close(layer.index); |
| | | return layer.msg('è°æ¨ç±»å为跨ç»ç»è°æ¨ï¼å½åç»ç»ï¼' + sessionStorage["Organization"] + 'è¯·éæ©å
¶ä»ç»ç»'); |
| | | } |
| | | } |
| | | else { |
| | | if (sessionStorage["OrganizationID"] != OptionData.HItemID) { |
| | | layer.close(layer.index); |
| | | return layer.msg('è°æ¨ç±»å为åç»ç»è°æ¨ï¼è¯·éæ©å½åç»ç»ï¼' + sessionStorage["Organization"]); |
| | | } |
| | | } |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HStockOrgID: OptionData.HItemID, |
| | | HStockOrgCode: OptionData.ç»ç»ä»£ç , |
| | | HStockOrgName: OptionData.ç»ç»åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true |
| | | , content: ['../../../views/åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Warehouse.html', 'yes'] |
| | | , content: ['../../../views/åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Warehouse.html?type=Warehouse&', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HWHID: OptionData.HItemID, |
| | | HWHCode: OptionData.ä»åºä»£ç , |
| | | HWHName: OptionData.ä»åºåç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HSPID: OptionData.HMainID, |
| | | HSPCode: OptionData.ä»ä½ä»£ç , |
| | | HSPName: OptionData.ä»ä½åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true |
| | | , content: ['../../../views/åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Warehouse.html', 'yes'] |
| | | , content: ['../../../views/åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Warehouse.html?type=Warehouse&', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HSCWHID: OptionData.HItemID, |
| | | HSCWHCode: OptionData.ä»åºä»£ç , |
| | | HSCWHName: OptionData.ä»åºåç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HSCSPID: OptionData.HMainID, |
| | | HSCSPCode: OptionData.ä»ä½ä»£ç , |
| | | HSCSPName: OptionData.ä»ä½åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | |
| | | } |
| | | }) |
| | | |
| | | //åå» |
| | | $('.layui-table-box tbody td[data-field="HMaterCode"]').off('dblclick').on('dblclick', function () { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å¨å
·å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true |
| | | , content: ['../../模治å
·ç®¡ç/模治å
·ç®¡ç/Gy_MouldFileList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | OptionData = checkStatus.data[0]; //æé䏿°æ®çç¬¬ä¸æ¡èµå¼ç»OptionDataåé |
| | | 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": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HOtherOrgID": sessionStorage["OrganizationID"], "HStockOrgID": 0, "HStockOrgCode": "", "HStockOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" }; |
| | | 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].hmainid; |
| | | option.data[rowIndex + i].HMaterCode = checkStatus.data[i].模å
·ç¼å·; |
| | | option.data[rowIndex + i].HMaterName = checkStatus.data[i].模å
·åç§°; |
| | | option.data[rowIndex + i].HMaterSpec = checkStatus.data[i].模å
·åå·; |
| | | option.data[rowIndex + i].HUnitID = checkStatus.data[i].HUnitID; |
| | | option.data[rowIndex + i].HUnitCode = checkStatus.data[i].计éåä½ä»£ç ; |
| | | option.data[rowIndex + i].HUnitName = checkStatus.data[i].计éåä½; |
| | | } |
| | | table.render(option); //éæ°æ¸²æè¡¨æ ¼ä»¥æ¾ç¤ºæ´æ°åçæ°æ® |
| | | } |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: OptionData.hmainid, |
| | | HMaterCode: OptionData.模å
·ç¼å·, |
| | | HMaterName: OptionData.模å
·åç§°, |
| | | HMaterSpec: OptionData.模å
·åå·, |
| | | HUnitID: OptionData.HUnitID, |
| | | HUnitCode: OptionData.计éåä½ä»£ç , |
| | | HUnitName: OptionData.计éåä½, |
| | | HDesignLife: 0, //è®¾è®¡å¯¿å½ |
| | | HLeaveLife: 0, //å©ä½å¯¿å½ |
| | | HQty: 1, //宿¶æ°é |
| | | HMoney: 0, //éé¢ |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | obj.event = ""; |
| | | }); |
| | | |
| | | }); |
| | | //æå°Printing |
| | | form.on("submit(view)", function (data) { |
| | |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HWHName").val(checkStatus.data[0].ä»åºåç§°); |
| | | $("#HWHNumber").val(checkStatus.data[0].ä»åºä»£ç ); |
| | | $("#HWHID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | var data = table.cache["mainTable"]; |
| | | for (const row of data) { |
| | | row.HWHID = $("#HWHID").val(); |
| | | row.HWHCode = $("#HWHNumber").val(); |
| | | row.HWHName = $("#HWHName").val(); |
| | | } |
| | | option.data = data; |
| | | table.render(option); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | |
| | | function GetHWHValue(obj) //è¿åä»åº |
| | | { |
| | | $("#HWHName").val(obj[0].ä»åºåç§°); |
| | | $("#HWHNumber").val(obj[0].ä»åºä»£ç ); |
| | | $("#HWHID").val(obj[0].HItemID); |
| | | } |
| | | |
| | |
| | | $("#HDeptName").val(obj[0].é¨é¨åç§°); |
| | | $("#HDeptID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | function GetMouldFileValue(obj) //å¨å
· |
| | | { |
| | | OptionData = obj[0]; |
| | | } |
| | | function GetUnitValue(obj) //计éåä½ |
| | | { |
| | | OptionData = obj[0]; |
| | | } |
| | | function GetGyWarehouse(obj) //ä»åº |
| | | { |
| | | OptionData = obj[0]; |
| | | } |
| | | function GetGyStockPlace(obj) //ä»ä½ |
| | | { |
| | | OptionData = obj; |
| | | } |
| | | function GetOrganization(obj) //ç»ç» |
| | | { |
| | | OptionData = obj; |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../layuiadmin/soulTable.slim.js"></script> |
| | | <script src="../../../layuiadmin/PageTitle.js"></script> |
| | | |
| | | <script src="../../../layuiadmin/SetColumn.js"></script> |
| | | <script src="../../../layuiadmin/HideButton_New.js"></script> |
| | | <style type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HBeginDate" style="width:190px;"> |
| | | <input type="date" class="layui-input ForFilteringSchemes" 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="HEndDate" style="width:190px;"> |
| | | <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ç»åç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HStockOrgName" id="HStockOrgName" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HStockOrgName" id="HStockOrgName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | <!--æ¾ç¤ºå½åè¿æ»¤æ¹æ¡--> |
| | | <div class="layui-inline" style="margin-left:5px;"> |
| | | <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div> |
| | | </div> |
| | | <div class="layui-colla-content"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline"> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">é¨é¨ä¿¡æ¯</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HDept" id="HDept" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HDept" id="HDept" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç©æä»£ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HMaterNumber" id="HMaterNumber" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¨å
·ä»£ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HModelNumber" id="HModelNumber" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HModelNumber" id="HModelNumber" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ä»åº</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HWhName" id="HWhName" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HWhName" id="HWhName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">徿¥åä½</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HSupName" id="HSupName" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HSupName" id="HSupName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <div id="page" style="position: relative; bottom: 0;"></div> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit"><i class="layui-icon layui-icon-repeat"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit"><i class="layui-icon layui-icon-refresh"></i>åå®¡æ ¸</button> |
| | | <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="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | <div class="layui-btn-container" id="toolbarDemo_ButtonSet"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view" id="btn-view"><i class="layui-icon layui-icon-tips"></i>é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="btn-print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit" id="btn-audit"><i class="layui-icon layui-icon-repeat"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit" id="btn-Faudit"><i class="layui-icon layui-icon-refresh"></i>åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>æé®è®¾ç½®</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>ä¿åæ¹æ¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>è¯»åæ¹æ¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sc_MouldProdMoveBillList"; |
| | | var HBillType = "3814"; |
| | | var set_HideButton_ID = "toolbarDemo_ButtonSet";//éè¦è®¾ç½®çæé®çç¶çº§èç¹çid |
| | | |
| | | //#region ãè¿æ»¤æ¹æ¡ã |
| | | |
| | | //è¿æ»¤æ¡ä»¶çclassç±» |
| | | var HClassTag = "ForFilteringSchemes"; |
| | | //模ååç§°ï¼ä¸æçï¼ æ¯ä¸ªæ¨¡å页é¢é½éè¦ä¿®æ¹ |
| | | window.HModuleName = "å¨å
·ç´æ¥è°æ¨å"; |
| | | //æ¯å¦å·²ç»éæ©äºè¿æ»¤æ¹æ¡ï¼å
¨å±åéï¼ |
| | | window.HDefaultFilter = ""; |
| | | //éæ©çè¿æ»¤æ¹æ¡å
ç ï¼å
¨å±åéï¼ |
| | | window.HInterID_Choose = 0; |
| | | //#endregion |
| | | //#region ã卿è·å模ååç§°ã |
| | | var HModuleType = "3814"; |
| | | //éè¿åæ®ç±»åï¼ä»æ°æ®åºå¨æè·ååæ®æ¨¡åå½å,å¼ç¨jsæä»¶ PageTitle.js |
| | |
| | | |
| | | //#endregion |
| | | |
| | | //#region æåºåéæ© |
| | | table.on('sort(mainTable)', function (obj) { //注ï¼sort æ¯å·¥å
·æ¡äºä»¶åï¼test æ¯ table åå§å®¹å¨ç屿§ lay-filter="对åºçå¼" |
| | | table.reload('mainTable', { |
| | | initSort: obj //è®°å½åå§æåºï¼å¦æä¸è®¾çè¯ï¼å°æ æ³æ 记表头çæåºç¶æã layui 2.1.1 æ°å¢åæ° |
| | | , where: { //请æ±åæ°ï¼æ³¨æï¼è¿éé¢çåæ°å¯ä»»æå®ä¹ï¼å¹¶éä¸é¢åºå®çæ ¼å¼ï¼ |
| | | field: obj.field //æåºå段 卿¥å£ä½ä¸ºåæ°å段 field order |
| | | , order: obj.type //æåºæ¹å¼ 卿¥å£ä½ä¸ºåæ°å段 field order |
| | | } |
| | | }); |
| | | option.data = layui.table.cache["mainTable"]; |
| | | table.render(option); |
| | | //å·æ°æé®æ¾ç¤º |
| | | Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | optionPage.curr = 1; |
| | | //æ¸
ç©ºè¿æ»¤æ¡ä»¶ |
| | | set_ClearQuery(); |
| | | }); |
| | |
| | | |
| | | //#region æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | optionPage.curr = 1; |
| | | get_FastQuery(table, option); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region åå§åçé¢ |
| | | function set_ClearBill() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //æ¥è¯¢ |
| | | get_Display(sWhere); |
| | | get_FastQuery(); |
| | | //åå§åé¡µå¤§å° |
| | | DisPlay_HideColumn_GetPageSize(HModName, sessionStorage["HUserName"], optionPage); |
| | | //é»è®¤æ¹æ¡ |
| | | get_DefaultModule() |
| | | } |
| | | //#endregion |
| | | //#region åå§åè¡¨æ ¼æ¹æ³ |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , page: false |
| | | , totalRow: true |
| | | , cellMinWidth: 90 |
| | | , limits: [50, 500, 5000, 20000] |
| | |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 125, sort: true } |
| | | ]] |
| | | }; |
| | | optionPage = { |
| | | elem: 'page', //注æï¼è¿éç page æ¯ IDï¼ä¸ç¨å # å· |
| | | count: 10000, //æ°æ®æ»æ°ï¼ä»æå¡ç«¯å¾å° |
| | | limit: 50, |
| | | limits: [50, 500, 1000, 2000], |
| | | layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'], |
| | | jump: function (obj, first) { |
| | | //console.log(obj) |
| | | //objå
å«äºå½ååé¡µçææåæ°ï¼æ¯å¦ï¼ |
| | | //console.log(obj.curr); //å¾å°å½å页ï¼ä»¥ä¾¿åæå¡ç«¯è¯·æ±å¯¹åºé¡µçæ°æ®ã |
| | | //console.log(obj.limit); //å¾å°æ¯é¡µæ¾ç¤ºçæ¡æ° |
| | | |
| | | //馿¬¡ä¸æ§è¡ |
| | | if (!first) { |
| | | //do something |
| | | get_FastQuery(); |
| | | } |
| | | } |
| | | } |
| | | laypage.render(optionPage); |
| | | } |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | function get_Display(sWhere) { |
| | |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //å页æ¥è¯¢ |
| | | function get_DisplayPage() { |
| | | var ajaxLoad = layer.load(); |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldProdMoveBill/page', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": optionPage.curr, "size": optionPage.limit }, |
| | | success: function (data1) { |
| | | option.limit = optionPage.limit;//æ¹åè¡¨æ ¼é¡µå¤§å° |
| | | if (data1.code == 1) { |
| | | optionPage.count = data1.count;//æ¹ååè¡¨æ°æ®æ»æ° |
| | | option.data = data1.data; |
| | | laypage.render(optionPage); |
| | | //å设置 |
| | | DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option); |
| | | //è¡¨æ ¼å è½½å¿
é卿鮿¾ç¤ºå |
| | | table.render(option); |
| | | //å·æ°æé®æ¾ç¤º |
| | | Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | |
| | | break; |
| | | //éåºæé® |
| | | case 'get_Exit': Pub_Close(2); |
| | | break; |
| | | //å设置 |
| | | case 'set_HideColumn': |
| | | get_HideColumn(HModName, sessionStorage["HUserName"], option, optionPage, get_FastQuery); |
| | | break; |
| | | //æé®è®¾ç½® |
| | | case 'set_HideButton': |
| | | get_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | break; |
| | | //ä¿åæ¹æ¡ |
| | | case 'set_SaveScheme': set_SaveScheme(); |
| | | break; |
| | | //è¯»åæ¹æ¡ |
| | | case 'set_ReadScheme': set_ReadScheme(); |
| | | break; |
| | | }; |
| | | }); |
| | |
| | | //if (HSupName) { |
| | | // sWhere += " and 徿¥åä½ like '%" + HSupName + "%'"; |
| | | //} |
| | | get_Display(sWhere); |
| | | get_DisplayPage(sWhere); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | //#endregion |
| | |
| | | $("#HSupName").val(""); |
| | | $("#HStockOrgName").val(""); |
| | | sWhere = ""; |
| | | get_Display(sWhere); |
| | | get_FastQuery(); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å·æ° |
| | | function get_Refresh() { |
| | | set_ClearQuery(); |
| | | get_Display(sWhere); |
| | | //get_FastQuery(); |
| | | //get_Display(sWhere); |
| | | } |
| | | //#endregion |
| | | //#region ãè¿æ»¤æ¹æ¡ã |
| | | |
| | | //è·åå½åç¨æ·çé»è®¤è¿æ»¤æ¹æ¡ |
| | | function get_DefaultModule() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_FastICScheme/Chooselist', |
| | | type: "GET", |
| | | data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | //å½åç¨æ·è®¾ç½®æé»è®¤çè¿æ»¤æ¹æ¡ |
| | | var data = data1.data; |
| | | //å½åéæ©çè¿æ»¤æ¹æ¡ |
| | | HInterID_Choose = data[0].hmainid; |
| | | //è¿æ»¤æ¹æ¡å
ç |
| | | HInterID = data[0].hmainid |
| | | //è¿æ»¤æ¹æ¡åç§° |
| | | HDefaultFilter = data[0].æ¹æ¡åç§° |
| | | //è¿æ»¤æ¹æ¡ç夿³¨ï¼æ¹æ¡ä¿¡æ¯æè¿°ï¼ |
| | | var HRemark = data[0].夿³¨ |
| | | //æ¾ç¤ºåºå½åçé»è®¤è¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>'; |
| | | //æè¿æ»¤æ¡ä»¶å¼ååå°é¡µé¢ä¸ |
| | | for (let i = 0; i < data.length; i++) { |
| | | $("#" + data[i].è¿æ»¤å段ID).val(data[i].è¿æ»¤å¼); |
| | | if (data[i].è¿æ»¤æ ç¾ç±»å == 'SELECT') { |
| | | $("#" + data[i].è¿æ»¤å段ID).find("option[value='" + data[i].è¿æ»¤å¼ + "']").attr("selected", true); |
| | | } |
| | | } |
| | | |
| | | //var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; |
| | | //è¥æ¥æé´éä¸ä¸º ä»»æé´éï¼åç¦ç¨å¼å§æ¥æä¸ç»ææ¥æçéæ© |
| | | //if (HInitTimeCycle != -1) { |
| | | // $('#HBeginDate').prop('disabled', true); |
| | | // $('#HEndDate').prop('disabled', true); |
| | | |
| | | // $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); |
| | | // $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | // ////æ§è¡æ¥è¯¢æ¹æ³ |
| | | // //get_FastQuery(); |
| | | //} else { |
| | | // $('#HBeginDate').prop('disabled', false); |
| | | // $('#HEndDate').prop('disabled', false); |
| | | //} |
| | | |
| | | //æ§è¡æ¥è¯¢æ¹æ³ |
| | | get_FastQuery() |
| | | form.render("select"); |
| | | } else { |
| | | //å½åç¨æ·æ²¡æè®¾ç½®é»è®¤çè¿æ»¤æ¹æ¡ |
| | | //éèæ¾ç¤ºè¿æ»¤æ¹æ¡çæ ç¾ä¿¡æ¯ |
| | | document.getElementById("HFilterScheme_Now").style.display = "none"; |
| | | ////æ§è¡æ¥è¯¢æ¹æ³ |
| | | //get_FastQuery() |
| | | //form.render("select"); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ä¿åæ¹æ¡ |
| | | function set_SaveScheme() { |
| | | var index = layer.open() |
| | | //å¤æç¨æ·æ¯å¦ç¹å»äºå³ä¸è§çâåå·âå
³éå¼¹çªé¡µé¢ |
| | | var HIsClose_Manual = false; |
| | | //è·åæ¬é¡µææè¿æ»¤æ¡ä»¶å¯¹è±¡(classä¸å
å«"ForFilteringSchemes"çå
ç´ ) |
| | | var Filter = document.getElementsByClassName(HClassTag); |
| | | |
| | | var HFilterIdList = "";//è¿æ»¤æ¡ä»¶ |
| | | var HFilterIdLists = "";//æ¼æ¥å¤ä¸ªè¿æ»¤æ¡ä»¶ |
| | | var HValue = "";//è¿æ»¤å¼ |
| | | var HElement_type = "";//è¿æ»¤æ ç¾ç±»å |
| | | |
| | | for (var i = 0; i < Filter.length; i++) { |
| | | HFilterIdList = Filter[i].id; //è¿æ»¤æ¡ä»¶ID |
| | | HFilterIdLists += Filter[i].id + ","; //è¿æ»¤æ¡ä»¶ID(æ¼æ¥) |
| | | HValue += $("#" + HFilterIdList).val() + ","; //è¿æ»¤æ¡ä»¶ä¸è¾å
¥çå¼ |
| | | HElement_type += document.getElementById(HFilterIdList).tagName + ",";//éè¿æ ç¾idè·åæ ç¾ç±»å |
| | | } |
| | | |
| | | //å»é¤æ«å°¾éå· |
| | | HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); |
| | | HValue = HValue.substring(0, HValue.length - 1); |
| | | HElement_type = HElement_type.substring(0, HElement_type.length - 1); |
| | | |
| | | //å½å页é¢ä¸æ²¡æéæ©è¿æ»¤æ¹æ¡ï¼è¿å
¥æ°å¢æ¹æ³ |
| | | if (HDefaultFilter == "") { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['40%', '80%'] |
| | | , title: 'è¿æ»¤æ¹æ¡' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../ç³»ç»ç®¡ç/è¿æ»¤æ¹æ¡è®¾ç½®/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type |
| | | , cancel: function () { |
| | | // å³ä¸è§å
³éäºä»¶çé»è¾ |
| | | HIsClose_Manual = true; |
| | | } |
| | | , end: function () { |
| | | if (HIsClose_Manual != true) { |
| | | get_FastQuery(); |
| | | //æ¾ç¤ºå½åçè¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>'; |
| | | } |
| | | } |
| | | }) |
| | | layer.close(index) |
| | | } else { |
| | | //å½å页é¢å·²æè¿æ»¤æ¹æ¡ï¼ç¨æ·éæ© æ°å¢æè
ç¼è¾ |
| | | layer.confirm('å½åå·²éæ©è¿æ»¤æ¹æ¡ï¼æ¯å¦ä¿®æ¹ï¼è¯·éæ©å¯¹åºæä½', { |
| | | title: "æä½æç¤º", |
| | | icon: 0, |
| | | btn: ['æ°å¢æ¹æ¡', 'ä¿åä¿®æ¹å½åæ¹æ¡', 'åæ¶'] |
| | | }, function (index, layero) { |
| | | //æ°å¢ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['40%', '80%'] |
| | | , title: 'è¿æ»¤æ¹æ¡' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../ç³»ç»ç®¡ç/è¿æ»¤æ¹æ¡è®¾ç½®/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type |
| | | , end: function () { |
| | | get_FastQuery() |
| | | //æ¾ç¤ºå½åçè¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>'; |
| | | } |
| | | }) |
| | | layer.close(index) |
| | | }, function (index) { |
| | | //ç¼è¾ |
| | | var Filter_Edit = document.getElementsByClassName(HClassTag); //è·åæ¬é¡µææè¿æ»¤æ¡ä»¶å¯¹è±¡(classä¸å
å«"ForFilteringSchemes"çå
ç´ ) |
| | | HFilterIdList = ""; |
| | | HFilterIdLists = ""; |
| | | HValue = ""; |
| | | HElement_type = ""; |
| | | for (var i = 0; i < Filter_Edit.length; i++) { |
| | | HFilterIdList = Filter_Edit[i].id; //è¿æ»¤æ¡ä»¶ID |
| | | HFilterIdLists += Filter_Edit[i].id + ","; //è¿æ»¤æ¡ä»¶ID(æ¼æ¥) |
| | | HValue += $("#" + HFilterIdList).val() + ","; //è¿æ»¤æ¡ä»¶ä¸è¾å
¥çå¼ |
| | | HElement_type += document.getElementById(HFilterIdList).tagName + ",";//éè¿æ ç¾idè·åæ ç¾ç±»å |
| | | } |
| | | //å»é¤æ«å°¾éå· |
| | | HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); |
| | | HValue = HValue.substring(0, HValue.length - 1); |
| | | HElement_type = HElement_type.substring(0, HElement_type.length - 1); |
| | | |
| | | var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3; |
| | | |
| | | //ä¿®æ¹ |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Xt_FastICScheme/save", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "oMain": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { time: 1 * 1000, icon: 1 }); |
| | | } |
| | | else { |
| | | |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | |
| | | |
| | | } |
| | | }); |
| | | layer.close(index) |
| | | }, function (index) { |
| | | //åæ¶ |
| | | layer.alert('åæ¶') |
| | | layer.close(index) |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | //è¯»åæ¹æ¡ |
| | | function set_ReadScheme() { |
| | | var HIsClose_Manual = false; |
| | | var Filter = document.getElementsByClassName(HClassTag); //è·åæ¬é¡µææè¿æ»¤æ¡ä»¶å¯¹è±¡(classä¸å
å«"ForFilteringSchemes"çå
ç´ ) |
| | | |
| | | var HFilterIdList = ""; |
| | | var HFilterIdLists = ""; |
| | | var HValue = ""; |
| | | var HElement_type = ""; |
| | | for (var i = 0; i < Filter.length; i++) { |
| | | HFilterIdList = Filter[i].id; //è¿æ»¤æ¡ä»¶ID |
| | | HFilterIdLists += Filter[i].id + ","; //è¿æ»¤æ¡ä»¶ID(æ¼æ¥) |
| | | HValue += $("#" + HFilterIdList).val() + ","; //è¿æ»¤æ¡ä»¶ä¸è¾å
¥çå¼ |
| | | HElement_type += document.getElementById(HFilterIdList).tagName + ",";//éè¿æ ç¾idè·åæ ç¾ç±»å |
| | | } |
| | | //å»é¤æ«å°¾éå· |
| | | HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); |
| | | HValue = HValue.substring(0, HValue.length - 1); |
| | | HElement_type = HElement_type.substring(0, HElement_type.length - 1); |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'è¿æ»¤æ¹æ¡å表' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../ç³»ç»ç®¡ç/è¿æ»¤æ¹æ¡è®¾ç½®/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName |
| | | , cancel: function () { |
| | | // å³ä¸è§å
³éäºä»¶çé»è¾ |
| | | HIsClose_Manual = true; |
| | | } |
| | | , end: function () { |
| | | if (HIsClose_Manual != true) { |
| | | get_FastQuery() |
| | | form.render("select"); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | ////çå¬è¡åå»äºä»¶ |
| | |
| | | |
| | | //以䏿¯layui模å |
| | | }); |
| | | //#region ãè¿æ»¤æ¹æ¡è¿åæ°æ®ã |
| | | function HFilterScheme(obj) //è¿åè¿æ»¤æ¹æ¡ |
| | | { |
| | | var HInterID = obj[0].hmainid; |
| | | HInterID_Choose = obj[0].hmainid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_FastICScheme/Chooselist', |
| | | type: "GET", |
| | | data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": HInterID, "Type": "Select" }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = data1.data; |
| | | //èµå¼è¿æ»¤æ¹æ¡åç§° |
| | | HDefaultFilter = data[0].æ¹æ¡åç§° |
| | | var HRemark = data[0].夿³¨ |
| | | //æ¾ç¤ºå½åçè¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>'; |
| | | HInterID = data[0].hmainid |
| | | //æ ¹æ®éæ©çè¿æ»¤æ¹æ¡åå¡«æ°æ®å°åè¡¨è¿æ»¤æ¡ä»¶ |
| | | for (let i = 0; i < data.length; i++) { |
| | | $("#" + data[i].è¿æ»¤å段ID).val(data[i].è¿æ»¤å¼); |
| | | if (data[i].è¿æ»¤æ ç¾ç±»å == 'SELECT') { |
| | | $("#" + data[i].è¿æ»¤å段ID).find("option[value='" + data[i].è¿æ»¤å¼ + "']").attr("selected", true); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | |
| | |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HWHName" id="HWHName" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HWHNumber" id="HWHNumber" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="WareHouse" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HWHName").val(checkStatus.data[0].ä»åºåç§°); |
| | | $("#HWHNumber").val(checkStatus.data[0].ä»åºä»£ç ); |
| | | $("#HWHID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | var data = table.cache["mainTable"]; |
| | | for (const row of data) { |
| | | row.HWHID = $("#HWHID").val(); |
| | | row.HWHCode = $("#HWHNumber").val(); |
| | | row.HWHName = $("#HWHName").val(); |
| | | } |
| | | option.data = data; |
| | | table.render(option); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: checkStatus.data[0].hmainid, |
| | | HMaterCode: checkStatus.data[0].模å
·ç¼å·, |
| | | HMaterName: checkStatus.data[0].模å
·åç§°, |
| | | HMaterSpec: checkStatus.data[0].模å
·åå·, |
| | | |
| | | HDesignLife: 0, //è®¾è®¡å¯¿å½ |
| | | HLeaveLife: 0, //å©ä½å¯¿å½ |
| | | HQty: 1, //宿¶æ°é |
| | | HMoney: 0, //éé¢ |
| | | }); |
| | | OptionData = checkStatus.data[0]; //æé䏿°æ®çç¬¬ä¸æ¡èµå¼ç»OptionDataåé |
| | | 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": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 1, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; // å建ä¸ä¸ªæ°çå
嫿°ç» å
¶åå§å¼ä¸ºç©ºæè
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].hmainid; |
| | | option.data[rowIndex + i].HMaterCode = checkStatus.data[i].模å
·ç¼å·; |
| | | option.data[rowIndex + i].HMaterName = checkStatus.data[i].模å
·åç§°; |
| | | option.data[rowIndex + i].HMaterSpec = checkStatus.data[i].模å
·åå·; |
| | | option.data[rowIndex + i].HUnitID = checkStatus.data[i].HUnitID; |
| | | option.data[rowIndex + i].HUnitCode = checkStatus.data[i].计éåä½ä»£ç ; |
| | | option.data[rowIndex + i].HUnitName = checkStatus.data[i].计éåä½; |
| | | } |
| | | table.render(option); //éæ°æ¸²æè¡¨æ ¼ä»¥æ¾ç¤ºæ´æ°åçæ°æ® |
| | | } |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: OptionData.hmainid, |
| | | HMaterCode: OptionData.模å
·ç¼å·, |
| | | HMaterName: OptionData.模å
·åç§°, |
| | | HMaterSpec: OptionData.模å
·åå·, |
| | | HUnitID: OptionData.HUnitID, |
| | | HUnitCode: OptionData.计éåä½ä»£ç , |
| | | HUnitName: OptionData.计éåä½, |
| | | HDesignLife: 0, //è®¾è®¡å¯¿å½ |
| | | HLeaveLife: 0, //å©ä½å¯¿å½ |
| | | HQty: 1, //宿¶æ°é |
| | | HMoney: 0, //éé¢ |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HPropertyID: OptionData.HItemID, |
| | | HPropertyCode: OptionData.è¾
å©å±æ§ä»£ç , |
| | | HPropertyName: OptionData.è¾
å©å±æ§åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HSecUnitID: OptionData.HItemID, |
| | | HSecUnitCode: OptionData.计éåä½ä»£ç , |
| | | HSecUnitName: OptionData.计éåä½åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HUnitID: OptionData.HItemID, |
| | | HUnitCode: OptionData.计éåä½ä»£ç , |
| | | HUnitName: OptionData.计éåä½åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true |
| | | , content: ['../../../views/åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Warehouse.html', 'yes'], |
| | | , content: ['../../../views/åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Warehouse.html?type=Warehouse&', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HWHID: OptionData.HItemID, |
| | | HWHCode: OptionData.ä»åºä»£ç , |
| | | HWHName: OptionData.ä»åºåç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HSPID: OptionData.HMainID, |
| | | HSPCode: OptionData.ä»ä½ä»£ç , |
| | | HSPName: OptionData.ä»ä½åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | return false; |
| | | } |
| | | }) |
| | | |
| | | //åå» |
| | | $('.layui-table-box tbody td[data-field="HMaterCode"]').off('dblclick').on('dblclick', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å¨å
·å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true |
| | | , content: ['../../模治å
·ç®¡ç/模治å
·ç®¡ç/Gy_MouldFileList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | OptionData = checkStatus.data[0]; //æé䏿°æ®çç¬¬ä¸æ¡èµå¼ç»OptionDataåé |
| | | 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": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 1, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; // å建ä¸ä¸ªæ°çå
嫿°ç» å
¶åå§å¼ä¸ºç©ºæè
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].hmainid; |
| | | option.data[rowIndex + i].HMaterCode = checkStatus.data[i].模å
·ç¼å·; |
| | | option.data[rowIndex + i].HMaterName = checkStatus.data[i].模å
·åç§°; |
| | | option.data[rowIndex + i].HMaterSpec = checkStatus.data[i].模å
·åå·; |
| | | option.data[rowIndex + i].HUnitID = checkStatus.data[i].HUnitID; |
| | | option.data[rowIndex + i].HUnitCode = checkStatus.data[i].计éåä½ä»£ç ; |
| | | option.data[rowIndex + i].HUnitName = checkStatus.data[i].计éåä½; |
| | | } |
| | | table.render(option); //éæ°æ¸²æè¡¨æ ¼ä»¥æ¾ç¤ºæ´æ°åçæ°æ® |
| | | } |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: OptionData.hmainid, |
| | | HMaterCode: OptionData.模å
·ç¼å·, |
| | | HMaterName: OptionData.模å
·åç§°, |
| | | HMaterSpec: OptionData.模å
·åå·, |
| | | HUnitID: OptionData.HUnitID, |
| | | HUnitCode: OptionData.计éåä½ä»£ç , |
| | | HUnitName: OptionData.计éåä½, |
| | | HDesignLife: 0, //è®¾è®¡å¯¿å½ |
| | | HLeaveLife: 0, //å©ä½å¯¿å½ |
| | | HQty: 1, //宿¶æ°é |
| | | HMoney: 0, //éé¢ |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | obj.event = ""; |
| | | }); |
| | | } |
| | | //? |
| | | function f_alert(sMsg) { |
| | |
| | | function GetHWHValue(obj) //è¿åä»åº |
| | | { |
| | | $("#HWHName").val(obj[0].ä»åºåç§°); |
| | | $("#HWHNumber").val(obj[0].ä»åºä»£ç ); |
| | | $("#HWHID").val(obj[0].HItemID); |
| | | } |
| | | |
| | |
| | | $("#HSupName").val(obj[0].客æ·åç§°); |
| | | $("#HSupID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | function GetMouldFileValue(obj) //å¨å
· |
| | | { |
| | | OptionData = obj[0]; |
| | | } |
| | | function GetGyProperty(obj) //è¾
å©å±æ§ |
| | | { |
| | | OptionData = obj; |
| | | } |
| | | function GetUnitValue(obj) //计éåä½ |
| | | { |
| | | OptionData = obj[0]; |
| | | } |
| | | function GetGyWarehouse(obj) //ä»åº |
| | | { |
| | | OptionData = obj[0]; |
| | | } |
| | | function GetGyStockPlace(obj) //ä»ä½ |
| | | { |
| | | OptionData = obj; |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../layuiadmin/soulTable.slim.js"></script> |
| | | <script src="../../../layuiadmin/PageTitle.js"></script> |
| | | <script src="../../../layuiadmin/SetColumn.js"></script> |
| | | <script src="../../../layuiadmin/HideButton_New.js"></script> |
| | | <style type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo" 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="HBeginDate" style="width:190px;"> |
| | | <input type="date" class="layui-input ForFilteringSchemes" 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="HEndDate" style="width:190px;"> |
| | | <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ç»åç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HStockOrgName" id="HStockOrgName" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HStockOrgName" id="HStockOrgName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | <!--æ¾ç¤ºå½åè¿æ»¤æ¹æ¡--> |
| | | <div class="layui-inline" style="margin-left:5px;"> |
| | | <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div> |
| | | </div> |
| | | <div class="layui-colla-content"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline"> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">é¨é¨ä¿¡æ¯</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HDept" id="HDept" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HDept" id="HDept" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç©æä»£ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HMaterNumber" id="HMaterNumber" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¨å
·ä»£ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HModelNumber" id="HModelNumber" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HModelNumber" id="HModelNumber" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ä»åº</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HWhName" id="HWhName" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HWhName" id="HWhName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">徿¥åä½</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HSupName" id="HSupName" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HSupName" id="HSupName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;"> |
| | | <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;" class="ForFilteringSchemes"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;"> |
| | | <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;" class="ForFilteringSchemes"> |
| | | <option value="0" selected="selected"></option> |
| | | <option value="=">=</option> |
| | | <option value=">=">>=</option> |
| | |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input" value="" name="ColContent" id="ColContent"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;"> |
| | | <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;" class="ForFilteringSchemes"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" style="width:190px;"> |
| | | <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" style="width:190px;" class="ForFilteringSchemes"> |
| | | <option value="0" selected="selected"></option> |
| | | <option value="=">=</option> |
| | | <option value=">=">>=</option> |
| | |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input" value="" name="ColContent1" id="ColContent1"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;"> |
| | | <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;" class="ForFilteringSchemes"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" style="width:190px;"> |
| | | <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" style="width:190px;" class="ForFilteringSchemes"> |
| | | <option value="0" selected="selected"></option> |
| | | <option value="=">=</option> |
| | | <option value=">=">>=</option> |
| | |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input" value="" name="ColContent2" id="ColContent2"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <div id="page" style="position: relative; bottom: 0;"></div> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit"><i class="layui-icon layui-icon-repeat"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit"><i class="layui-icon layui-icon-refresh"></i>åå®¡æ ¸</button> |
| | | <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="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | <div class="layui-btn-container" id="toolbarDemo_ButtonSet"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view" id="btn-view"><i class="layui-icon layui-icon-tips"></i>é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="btn-print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit" id="btn-audit"><i class="layui-icon layui-icon-repeat"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit" id="btn-Faudit"><i class="layui-icon layui-icon-refresh"></i>åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>æé®è®¾ç½®</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>ä¿åæ¹æ¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>è¯»åæ¹æ¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | </div> |
| | | </script> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var DataList; |
| | | var optionPage = []; |
| | | var Name = "MouldScrapInHouseCellWidth"; |
| | | var HModName = "Sc_MouldScrapInBillList"; |
| | | var HBillType = "3831"; |
| | | var set_HideButton_ID = "toolbarDemo_ButtonSet";//éè¦è®¾ç½®çæé®çç¶çº§èç¹çid |
| | | |
| | | //#region ãè¿æ»¤æ¹æ¡ã |
| | | |
| | | //è¿æ»¤æ¡ä»¶çclassç±» |
| | | var HClassTag = "ForFilteringSchemes"; |
| | | //模ååç§°ï¼ä¸æçï¼ æ¯ä¸ªæ¨¡å页é¢é½éè¦ä¿®æ¹ |
| | | window.HModuleName = "å¨å
·æ¥åºå
¥åºå"; |
| | | //æ¯å¦å·²ç»éæ©äºè¿æ»¤æ¹æ¡ï¼å
¨å±åéï¼ |
| | | window.HDefaultFilter = ""; |
| | | //éæ©çè¿æ»¤æ¹æ¡å
ç ï¼å
¨å±åéï¼ |
| | | window.HInterID_Choose = 0; |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | |
| | | //#region ã卿è·å模ååç§°ã |
| | | var HModuleType = "3831"; |
| | | //éè¿åæ®ç±»åï¼ä»æ°æ®åºå¨æè·ååæ®æ¨¡åå½å,å¼ç¨jsæä»¶ PageTitle.js |
| | | var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType); |
| | | //#endregion |
| | | |
| | | //#region ã卿è·å模ååç§°ã |
| | | var HModuleType = "3831"; |
| | | //éè¿åæ®ç±»åï¼ä»æ°æ®åºå¨æè·ååæ®æ¨¡åå½å,å¼ç¨jsæä»¶ PageTitle.js |
| | | var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType); |
| | | //#endregion |
| | | set_ClearBill(); |
| | | function set_ClearBill() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_Display(sWhere); |
| | | |
| | | ColFilter(); |
| | | get_FastQuery(table, option); |
| | | //åå§åé¡µå¤§å° |
| | | DisPlay_HideColumn_GetPageSize(HModName, sessionStorage["HUserName"], optionPage); |
| | | ColFilter(); |
| | | //é»è®¤æ¹æ¡ |
| | | get_DefaultModule() |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //#region ç¹å»äºä»¶å
æ¬on formäºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //æ°å¢æé® |
| | | case 'btn-Add':set_AddNew(); |
| | |
| | | //éåº |
| | | case 'get_Exit': Pub_Close(2); |
| | | break; |
| | | //å设置 |
| | | case 'set_HideColumn': |
| | | get_HideColumn(HModName, sessionStorage["HUserName"], option, optionPage, get_FastQuery); |
| | | break; |
| | | //æé®è®¾ç½® |
| | | case 'set_HideButton': |
| | | get_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | break; |
| | | //ä¿åæ¹æ¡ |
| | | case 'set_SaveScheme': set_SaveScheme(); |
| | | break; |
| | | //è¯»åæ¹æ¡ |
| | | case 'set_ReadScheme': set_ReadScheme(); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | //#region æåºåéæ© |
| | | table.on('sort(mainTable)', function (obj) { //注ï¼sort æ¯å·¥å
·æ¡äºä»¶åï¼test æ¯ table åå§å®¹å¨ç屿§ lay-filter="对åºçå¼" |
| | | table.reload('mainTable', { |
| | | initSort: obj //è®°å½åå§æåºï¼å¦æä¸è®¾çè¯ï¼å°æ æ³æ 记表头çæåºç¶æã layui 2.1.1 æ°å¢åæ° |
| | | , where: { //请æ±åæ°ï¼æ³¨æï¼è¿éé¢çåæ°å¯ä»»æå®ä¹ï¼å¹¶éä¸é¢åºå®çæ ¼å¼ï¼ |
| | | field: obj.field //æåºå段 卿¥å£ä½ä¸ºåæ°å段 field order |
| | | , order: obj.type //æåºæ¹å¼ 卿¥å£ä½ä¸ºåæ°å段 field order |
| | | } |
| | | }); |
| | | option.data = layui.table.cache["mainTable"]; |
| | | table.render(option); |
| | | //å·æ°æé®æ¾ç¤º |
| | | Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | }); |
| | | //#endregion |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | optionPage.curr = 1; |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(table, option); |
| | | }); |
| | | form.on('submit(btnSearch)', function (data) { |
| | | optionPage.curr = 1; |
| | | get_FastQuery(table, option); |
| | | }); |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ¤é¡µé¢æææ¹æ³ |
| | | //åå§åè¡¨æ ¼ |
| | | 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', totalRowText: 'å计' } |
| | | , { field: 'hmainid', title: '忮ID', width: 200, hide: true ,sort:true} |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 200, sort: true, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 200, sort: true } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 200, sort: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 110, sort: true } |
| | | , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true, sort: true } |
| | | , { field: 'è´è´£äººä»£ç ', title: 'è´è´£äººä»£ç ', width: 200, sort: true } |
| | | , { field: 'è´è´£äººåç§°', title: 'è´è´£äººåç§°', width: 200, sort: true } |
| | | , { field: 'HWHID', title: 'HWHID', width: 200, hide: true, sort: true } |
| | | , { field: 'ä»åºä»£ç ', title: 'ä»åºä»£ç ', width: 200, sort: true } |
| | | , { field: 'ä»åºåç§°', title: 'ä»åºåç§°', width: 200, sort: true } |
| | | , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true, sort: true } |
| | | , { field: 'éªæ¶å代ç ', title: 'éªæ¶å代ç ', width: 200, sort: true } |
| | | , { field: 'éªæ¶ååç§°', title: 'éªæ¶ååç§°', width: 200, sort: true } |
| | | , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true, sort: true } |
| | | , { field: 'ä¿ç®¡å代ç ', title: 'ä¿ç®¡å代ç ', width: 200, sort: true } |
| | | , { field: 'ä¿ç®¡ååç§°', title: 'ä¿ç®¡ååç§°', width: 200, sort: true } |
| | | , { field: 'åºåç»ç»', title: 'åºåç»ç»', width: 125, sort: true } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true } |
| | | , { field: 'é¨é¨ä»£ç ', title: 'é¨é¨ä»£ç ', width: 200, sort: true } |
| | | , { field: 'é¨é¨åç§°', title: 'é¨é¨åç§°', width: 200, sort: true } |
| | | , { field: 'HSupTypeID', title: 'HSupTypeID', width: 200, hide: true, sort: true } |
| | | , { field: '徿¥ç±»ååç§°', title: '徿¥ç±»å', width: 200, sort: true } |
| | | , { field: 'HSupID', title: 'HSupID', width: 200, hide: true, sort: true } |
| | | , { field: '徿¥åä½', title: '徿¥åä½', width: 200, sort: true } |
| | | , { field: 'æè¦', title: 'æè¦', width: 200, sort: true } |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 200, sort: true } |
| | | , { field: '夿³¨', title: '夿³¨', width: 200, sort: true } |
| | | , { field: 'hsubid', title: 'hsubid', width: 200, hide: true, sort: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true, sort: true } |
| | | , { field: '模å
·ä»£ç ', title: 'å¨å
·ä»£ç ', width: 200, sort: true } |
| | | , { field: '模å
·åç§°', title: 'å¨å
·åç§°', width: 200, sort: true } |
| | | , { field: 'HPropertyID', title: 'HPropertyID', width: 200, hide: true, sort: true } |
| | | , { field: 'è¾
å©å±æ§ä»£ç ', title: 'è¾
å©å±æ§ä»£ç ', width: 200, sort: true } |
| | | , { field: 'è¾
å©å±æ§åç§°', title: 'è¾
å©å±æ§åç§°', width: 200, sort: true } |
| | | , { field: 'HSecUnitID', title: 'HSecUnitID', width: 200, hide: true, sort: true } |
| | | , { field: 'è¾
å©è®¡éåä½ä»£ç ', title: 'è¾
å©è®¡éåä½ä»£ç ', width: 200, sort: true } |
| | | , { field: 'è¾
å©è®¡éåä½åç§°', title: 'è¾
å©è®¡éåä½åç§°', width: 200, sort: true } |
| | | , { field: 'æ¢ç®ç', title: 'æ¢ç®ç', width: 200, sort: true } |
| | | , { field: 'æ¹æ¬¡', title: 'æ¹æ¬¡', width: 200, sort: true } |
| | | , { field: '宿¶æ°é', title: '宿¶æ°é', width: 200, totalRow: true, sort: true, totalRow: true } |
| | | , { field: 'åä»·', title: 'åä»·', width: 200, sort: true, totalRow: true } |
| | | , { field: 'éé¢', title: 'éé¢', width: 200, totalRow: true, sort: true, totalRow: true } |
| | | , { field: '设计寿å½', title: '设计寿å½', width: 200, sort: true, totalRow: true } |
| | | , { field: '使ç¨å¯¿å½', title: '使ç¨å¯¿å½', width: 200, sort: true, totalRow: true } |
| | | , { field: 'å©ä½å¯¿å½', title: 'å©ä½å¯¿å½', width: 200, sort: true, totalRow: true } |
| | | , { field: 'HWHID1', title: 'HWHID1', width: 200, hide: true, sort: true } |
| | | , { field: 'æ¶æä»åºä»£ç ', title: 'æ¶æä»åºä»£ç ', width: 200, sort: true } |
| | | , { field: 'æ¶æä»åºåç§°', title: 'æ¶æä»åºåç§°', width: 200, sort: true } |
| | | , { field: 'HSPID', title: 'HSPID', width: 200, hide: true, sort: true } |
| | | , { field: 'ä»ä½ä»£ç ', title: 'ä»ä½ä»£ç ', width: 200, sort: true } |
| | | , { field: 'ä»ä½åç§°', title: 'ä»ä½åç§°', width: 200, sort: true } |
| | | , { field: 'å夿³¨', title: 'å夿³¨', width: 200, sort: true } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200, sort: true } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200, sort: true } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ? '':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200, sort: true } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 200, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 200, sort: true } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200, sort: true } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 200, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'å
³èæ°é', title: 'å
³èæ°é', width: 200, sort: true } |
| | | , { field: 'è¡å
³é人', title: 'è¡å
³é人', width: 200, sort: true } |
| | | , { field: 'å
³éç±»å', title: 'å
³éç±»å', width: 200, sort: true } |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', width: 200, hide: true, sort: true } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', width: 200, hide: true, sort: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200, sort: true } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 200, sort: true } |
| | | ]; |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: true |
| | | , totalRow: true |
| | | , cellMinWidth: 120 |
| | | , totalRow: true |
| | | , limit: 50 |
| | | , height: 'full-50' |
| | | , cols: [columns] |
| | | , limits: [50, 500, 5000, 20000] |
| | | , done: function (res, curr, count) { |
| | | soulTable.render(this); |
| | | } |
| | | function set_InitGrid() { |
| | | var columns = [ |
| | | { type: 'checkbox', fixed: 'left', totalRowText: 'å计' } |
| | | , { field: 'hmainid', title: '忮ID', width: 200, hide: true ,sort:true} |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 200, sort: true, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 200, sort: true } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 200, sort: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 110, sort: true } |
| | | , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true, sort: true } |
| | | , { field: 'è´è´£äººä»£ç ', title: 'è´è´£äººä»£ç ', width: 200, sort: true } |
| | | , { field: 'è´è´£äººåç§°', title: 'è´è´£äººåç§°', width: 200, sort: true } |
| | | , { field: 'HWHID', title: 'HWHID', width: 200, hide: true, sort: true } |
| | | , { field: 'ä»åºä»£ç ', title: 'ä»åºä»£ç ', width: 200, sort: true } |
| | | , { field: 'ä»åºåç§°', title: 'ä»åºåç§°', width: 200, sort: true } |
| | | , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true, sort: true } |
| | | , { field: 'éªæ¶å代ç ', title: 'éªæ¶å代ç ', width: 200, sort: true } |
| | | , { field: 'éªæ¶ååç§°', title: 'éªæ¶ååç§°', width: 200, sort: true } |
| | | , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true, sort: true } |
| | | , { field: 'ä¿ç®¡å代ç ', title: 'ä¿ç®¡å代ç ', width: 200, sort: true } |
| | | , { field: 'ä¿ç®¡ååç§°', title: 'ä¿ç®¡ååç§°', width: 200, sort: true } |
| | | , { field: 'åºåç»ç»', title: 'åºåç»ç»', width: 125, sort: true } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true } |
| | | , { field: 'é¨é¨ä»£ç ', title: 'é¨é¨ä»£ç ', width: 200, sort: true } |
| | | , { field: 'é¨é¨åç§°', title: 'é¨é¨åç§°', width: 200, sort: true } |
| | | , { field: 'HSupTypeID', title: 'HSupTypeID', width: 200, hide: true, sort: true } |
| | | , { field: '徿¥ç±»ååç§°', title: '徿¥ç±»å', width: 200, sort: true } |
| | | , { field: 'HSupID', title: 'HSupID', width: 200, hide: true, sort: true } |
| | | , { field: '徿¥åä½', title: '徿¥åä½', width: 200, sort: true } |
| | | , { field: 'æè¦', title: 'æè¦', width: 200, sort: true } |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 200, sort: true } |
| | | , { field: '夿³¨', title: '夿³¨', width: 200, sort: true } |
| | | , { field: 'hsubid', title: 'hsubid', width: 200, hide: true, sort: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true, sort: true } |
| | | , { field: '模å
·ä»£ç ', title: 'å¨å
·ä»£ç ', width: 200, sort: true } |
| | | , { field: '模å
·åç§°', title: 'å¨å
·åç§°', width: 200, sort: true } |
| | | , { field: 'HPropertyID', title: 'HPropertyID', width: 200, hide: true, sort: true } |
| | | , { field: 'è¾
å©å±æ§ä»£ç ', title: 'è¾
å©å±æ§ä»£ç ', width: 200, sort: true } |
| | | , { field: 'è¾
å©å±æ§åç§°', title: 'è¾
å©å±æ§åç§°', width: 200, sort: true } |
| | | , { field: 'HSecUnitID', title: 'HSecUnitID', width: 200, hide: true, sort: true } |
| | | , { field: 'è¾
å©è®¡éåä½ä»£ç ', title: 'è¾
å©è®¡éåä½ä»£ç ', width: 200, sort: true } |
| | | , { field: 'è¾
å©è®¡éåä½åç§°', title: 'è¾
å©è®¡éåä½åç§°', width: 200, sort: true } |
| | | , { field: 'æ¢ç®ç', title: 'æ¢ç®ç', width: 200, sort: true } |
| | | , { field: 'æ¹æ¬¡', title: 'æ¹æ¬¡', width: 200, sort: true } |
| | | , { field: '宿¶æ°é', title: '宿¶æ°é', width: 200, totalRow: true, sort: true, totalRow: true } |
| | | , { field: 'åä»·', title: 'åä»·', width: 200, sort: true, totalRow: true } |
| | | , { field: 'éé¢', title: 'éé¢', width: 200, totalRow: true, sort: true, totalRow: true } |
| | | , { field: '设计寿å½', title: '设计寿å½', width: 200, sort: true, totalRow: true } |
| | | , { field: '使ç¨å¯¿å½', title: '使ç¨å¯¿å½', width: 200, sort: true, totalRow: true } |
| | | , { field: 'å©ä½å¯¿å½', title: 'å©ä½å¯¿å½', width: 200, sort: true, totalRow: true } |
| | | , { field: 'HWHID1', title: 'HWHID1', width: 200, hide: true, sort: true } |
| | | , { field: 'æ¶æä»åºä»£ç ', title: 'æ¶æä»åºä»£ç ', width: 200, sort: true } |
| | | , { field: 'æ¶æä»åºåç§°', title: 'æ¶æä»åºåç§°', width: 200, sort: true } |
| | | , { field: 'HSPID', title: 'HSPID', width: 200, hide: true, sort: true } |
| | | , { field: 'ä»ä½ä»£ç ', title: 'ä»ä½ä»£ç ', width: 200, sort: true } |
| | | , { field: 'ä»ä½åç§°', title: 'ä»ä½åç§°', width: 200, sort: true } |
| | | , { field: 'å夿³¨', title: 'å夿³¨', width: 200, sort: true } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200, sort: true } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200, sort: true } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ? '':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200, sort: true } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 200, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 200, sort: true } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200, sort: true } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 200, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'å
³èæ°é', title: 'å
³èæ°é', width: 200, sort: true } |
| | | , { field: 'è¡å
³é人', title: 'è¡å
³é人', width: 200, sort: true } |
| | | , { field: 'å
³éç±»å', title: 'å
³éç±»å', width: 200, sort: true } |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', width: 200, hide: true, sort: true } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', width: 200, hide: true, sort: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200, sort: true } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 200, sort: true } |
| | | ]; |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: false |
| | | , totalRow: true |
| | | , cellMinWidth: 120 |
| | | , totalRow: true |
| | | , limit: 50 |
| | | , height: 'full-50' |
| | | , cols: [columns] |
| | | , limits: [50, 500, 5000, 20000] |
| | | , done: function (res, curr, count) { |
| | | soulTable.render(this); |
| | | } |
| | | }; |
| | | //设置å宽 |
| | | //var colWidth = getColumnsWidth(); |
| | | //if (colWidth == "" || colWidth == []) { |
| | | optionPage = { |
| | | elem: 'page', //注æï¼è¿éç page æ¯ IDï¼ä¸ç¨å # å· |
| | | count: 10000, //æ°æ®æ»æ°ï¼ä»æå¡ç«¯å¾å° |
| | | limit: 50, |
| | | limits: [50, 500, 1000, 2000], |
| | | layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'], |
| | | jump: function (obj, first) { |
| | | //console.log(obj) |
| | | //objå
å«äºå½ååé¡µçææåæ°ï¼æ¯å¦ï¼ |
| | | //console.log(obj.curr); //å¾å°å½å页ï¼ä»¥ä¾¿åæå¡ç«¯è¯·æ±å¯¹åºé¡µçæ°æ®ã |
| | | //console.log(obj.limit); //å¾å°æ¯é¡µæ¾ç¤ºçæ¡æ° |
| | | |
| | | //} |
| | | //else { |
| | | // $.each(columns, function (x, m) { |
| | | // m["width"] = colWidth[x]; |
| | | // }); |
| | | //} |
| | | //馿¬¡ä¸æ§è¡ |
| | | if (!first) { |
| | | //do something |
| | | get_FastQuery(); |
| | | } |
| | | } |
| | | } |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | var wait = layer.load();//é®ç½© |
| | | var HBeginDate = $("#HBeginDate").val();//å¼å§æ¥æ |
| | | var HEndDate = $("#HEndDate").val();//ç»ææ¥æ |
| | | if (HBeginDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HBeginDate + "'"; |
| | | laypage.render(optionPage); |
| | | //设置å宽 |
| | | //var colWidth = getColumnsWidth(); |
| | | //if (colWidth == "" || colWidth == []) { |
| | | |
| | | //} |
| | | //else { |
| | | // $.each(columns, function (x, m) { |
| | | // m["width"] = colWidth[x]; |
| | | // }); |
| | | //} |
| | | } |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | var wait = layer.load();//é®ç½© |
| | | var HBeginDate = $("#HBeginDate").val();//å¼å§æ¥æ |
| | | var HEndDate = $("#HEndDate").val();//ç»ææ¥æ |
| | | if (HBeginDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HBeginDate + "'"; |
| | | } |
| | | if (HEndDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) <= '" + HEndDate + "'"; |
| | | } |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldScrapInBill/get_Display', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": sessionStorage["Organization"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | DataList = data1.data; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(wait); |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | if (HEndDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) <= '" + HEndDate + "'"; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å页æ¥è¯¢ |
| | | function get_DisplayPage() { |
| | | var ajaxLoad = layer.load(); |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldScrapInBill/get_Display', |
| | | url: GetWEBURL() + '/Sc_MouldScrapInBill/page', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": sessionStorage["Organization"] }, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": optionPage.curr, "size": optionPage.limit }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | DataList = data1.data; |
| | | option.limit = optionPage.limit;//æ¹åè¡¨æ ¼é¡µå¤§å° |
| | | if (data1.code == 1) { |
| | | optionPage.count = data1.count;//æ¹ååè¡¨æ°æ®æ»æ° |
| | | option.data = data1.data; |
| | | laypage.render(optionPage); |
| | | //å设置 |
| | | DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option); |
| | | //è¡¨æ ¼å è½½å¿
é卿鮿¾ç¤ºå |
| | | table.render(option); |
| | | layer.close(wait); |
| | | //å·æ°æé®æ¾ç¤º |
| | | Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | layer.close(ajaxLoad); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(wait); |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //æ°å¢ |
| | | function set_AddNew() { |
| | | layer.open({ |
| | |
| | | sWhere += " and 徿¥åä½ like '%" + HSupName + "%'"; |
| | | } |
| | | var index = layer.load(0); |
| | | get_Display(sWhere); |
| | | get_DisplayPage(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $("#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(""); |
| | | $("#HDept").val(""); |
| | | $("#HMaterNumber").val(""); |
| | | $("#HModelNumber").val(""); |
| | | $("#HWhName").val(""); |
| | | $("#HSupName").val(""); |
| | | $("#HStockOrgName").val(""); $("#ColContent").val(""); |
| | | $("#ColName").val("0"); |
| | | $("#Comparator").val("0"); |
| | | $("#ColContent2").val(""); |
| | | $("#ColName2").val("0"); |
| | | $("#Comparator2").val("0"); |
| | | $("#ColContent1").val(""); |
| | | $("#ColName1").val("0"); |
| | | $("#Comparator1").val("0"); |
| | | form.render('select'); |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $("#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(""); |
| | | $("#HDept").val(""); |
| | | $("#HMaterNumber").val(""); |
| | | $("#HModelNumber").val(""); |
| | | $("#HWhName").val(""); |
| | | $("#HSupName").val(""); |
| | | $("#HStockOrgName").val(""); $("#ColContent").val(""); |
| | | $("#ColName").val("0"); |
| | | $("#Comparator").val("0"); |
| | | $("#ColContent2").val(""); |
| | | $("#ColName2").val("0"); |
| | | $("#Comparator2").val("0"); |
| | | $("#ColContent1").val(""); |
| | | $("#ColName1").val("0"); |
| | | $("#Comparator1").val("0"); |
| | | form.render('select'); |
| | | sWhere = ""; |
| | | get_Display(sWhere); |
| | | get_FastQuery(table, option); |
| | | } |
| | | //#endregion |
| | | //#region åææ¾ç¤ºä¸ææ¡ |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region ãè¿æ»¤æ¹æ¡ã |
| | | |
| | | //è·åå½åç¨æ·çé»è®¤è¿æ»¤æ¹æ¡ |
| | | function get_DefaultModule() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_FastICScheme/Chooselist', |
| | | type: "GET", |
| | | data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | //å½åç¨æ·è®¾ç½®æé»è®¤çè¿æ»¤æ¹æ¡ |
| | | var data = data1.data; |
| | | //å½åéæ©çè¿æ»¤æ¹æ¡ |
| | | HInterID_Choose = data[0].hmainid; |
| | | //è¿æ»¤æ¹æ¡å
ç |
| | | HInterID = data[0].hmainid |
| | | //è¿æ»¤æ¹æ¡åç§° |
| | | HDefaultFilter = data[0].æ¹æ¡åç§° |
| | | //è¿æ»¤æ¹æ¡ç夿³¨ï¼æ¹æ¡ä¿¡æ¯æè¿°ï¼ |
| | | var HRemark = data[0].夿³¨ |
| | | //æ¾ç¤ºåºå½åçé»è®¤è¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>'; |
| | | //æè¿æ»¤æ¡ä»¶å¼ååå°é¡µé¢ä¸ |
| | | for (let i = 0; i < data.length; i++) { |
| | | $("#" + data[i].è¿æ»¤å段ID).val(data[i].è¿æ»¤å¼); |
| | | if (data[i].è¿æ»¤æ ç¾ç±»å == 'SELECT') { |
| | | $("#" + data[i].è¿æ»¤å段ID).find("option[value='" + data[i].è¿æ»¤å¼ + "']").attr("selected", true); |
| | | } |
| | | } |
| | | |
| | | //var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; |
| | | //è¥æ¥æé´éä¸ä¸º ä»»æé´éï¼åç¦ç¨å¼å§æ¥æä¸ç»ææ¥æçéæ© |
| | | //if (HInitTimeCycle != -1) { |
| | | // $('#HBeginDate').prop('disabled', true); |
| | | // $('#HEndDate').prop('disabled', true); |
| | | |
| | | // $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); |
| | | // $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | // ////æ§è¡æ¥è¯¢æ¹æ³ |
| | | // //get_FastQuery(); |
| | | //} else { |
| | | // $('#HBeginDate').prop('disabled', false); |
| | | // $('#HEndDate').prop('disabled', false); |
| | | //} |
| | | |
| | | //æ§è¡æ¥è¯¢æ¹æ³ |
| | | get_FastQuery() |
| | | form.render("select"); |
| | | } else { |
| | | //å½åç¨æ·æ²¡æè®¾ç½®é»è®¤çè¿æ»¤æ¹æ¡ |
| | | //éèæ¾ç¤ºè¿æ»¤æ¹æ¡çæ ç¾ä¿¡æ¯ |
| | | document.getElementById("HFilterScheme_Now").style.display = "none"; |
| | | ////æ§è¡æ¥è¯¢æ¹æ³ |
| | | //get_FastQuery() |
| | | //form.render("select"); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ä¿åæ¹æ¡ |
| | | function set_SaveScheme() { |
| | | var index = layer.open() |
| | | //å¤æç¨æ·æ¯å¦ç¹å»äºå³ä¸è§çâåå·âå
³éå¼¹çªé¡µé¢ |
| | | var HIsClose_Manual = false; |
| | | //è·åæ¬é¡µææè¿æ»¤æ¡ä»¶å¯¹è±¡(classä¸å
å«"ForFilteringSchemes"çå
ç´ ) |
| | | var Filter = document.getElementsByClassName(HClassTag); |
| | | |
| | | var HFilterIdList = "";//è¿æ»¤æ¡ä»¶ |
| | | var HFilterIdLists = "";//æ¼æ¥å¤ä¸ªè¿æ»¤æ¡ä»¶ |
| | | var HValue = "";//è¿æ»¤å¼ |
| | | var HElement_type = "";//è¿æ»¤æ ç¾ç±»å |
| | | |
| | | for (var i = 0; i < Filter.length; i++) { |
| | | HFilterIdList = Filter[i].id; //è¿æ»¤æ¡ä»¶ID |
| | | HFilterIdLists += Filter[i].id + ","; //è¿æ»¤æ¡ä»¶ID(æ¼æ¥) |
| | | HValue += $("#" + HFilterIdList).val() + ","; //è¿æ»¤æ¡ä»¶ä¸è¾å
¥çå¼ |
| | | HElement_type += document.getElementById(HFilterIdList).tagName + ",";//éè¿æ ç¾idè·åæ ç¾ç±»å |
| | | } |
| | | |
| | | //å»é¤æ«å°¾éå· |
| | | HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); |
| | | HValue = HValue.substring(0, HValue.length - 1); |
| | | HElement_type = HElement_type.substring(0, HElement_type.length - 1); |
| | | |
| | | //å½å页é¢ä¸æ²¡æéæ©è¿æ»¤æ¹æ¡ï¼è¿å
¥æ°å¢æ¹æ³ |
| | | if (HDefaultFilter == "") { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['40%', '80%'] |
| | | , title: 'è¿æ»¤æ¹æ¡' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../ç³»ç»ç®¡ç/è¿æ»¤æ¹æ¡è®¾ç½®/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type |
| | | , cancel: function () { |
| | | // å³ä¸è§å
³éäºä»¶çé»è¾ |
| | | HIsClose_Manual = true; |
| | | } |
| | | , end: function () { |
| | | if (HIsClose_Manual != true) { |
| | | get_FastQuery(); |
| | | //æ¾ç¤ºå½åçè¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>'; |
| | | } |
| | | } |
| | | }) |
| | | layer.close(index) |
| | | } else { |
| | | //å½å页é¢å·²æè¿æ»¤æ¹æ¡ï¼ç¨æ·éæ© æ°å¢æè
ç¼è¾ |
| | | layer.confirm('å½åå·²éæ©è¿æ»¤æ¹æ¡ï¼æ¯å¦ä¿®æ¹ï¼è¯·éæ©å¯¹åºæä½', { |
| | | title: "æä½æç¤º", |
| | | icon: 0, |
| | | btn: ['æ°å¢æ¹æ¡', 'ä¿åä¿®æ¹å½åæ¹æ¡', 'åæ¶'] |
| | | }, function (index, layero) { |
| | | //æ°å¢ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['40%', '80%'] |
| | | , title: 'è¿æ»¤æ¹æ¡' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../ç³»ç»ç®¡ç/è¿æ»¤æ¹æ¡è®¾ç½®/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type |
| | | , end: function () { |
| | | get_FastQuery() |
| | | //æ¾ç¤ºå½åçè¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>'; |
| | | } |
| | | }) |
| | | layer.close(index) |
| | | }, function (index) { |
| | | //ç¼è¾ |
| | | var Filter_Edit = document.getElementsByClassName(HClassTag); //è·åæ¬é¡µææè¿æ»¤æ¡ä»¶å¯¹è±¡(classä¸å
å«"ForFilteringSchemes"çå
ç´ ) |
| | | HFilterIdList = ""; |
| | | HFilterIdLists = ""; |
| | | HValue = ""; |
| | | HElement_type = ""; |
| | | for (var i = 0; i < Filter_Edit.length; i++) { |
| | | HFilterIdList = Filter_Edit[i].id; //è¿æ»¤æ¡ä»¶ID |
| | | HFilterIdLists += Filter_Edit[i].id + ","; //è¿æ»¤æ¡ä»¶ID(æ¼æ¥) |
| | | HValue += $("#" + HFilterIdList).val() + ","; //è¿æ»¤æ¡ä»¶ä¸è¾å
¥çå¼ |
| | | HElement_type += document.getElementById(HFilterIdList).tagName + ",";//éè¿æ ç¾idè·åæ ç¾ç±»å |
| | | } |
| | | //å»é¤æ«å°¾éå· |
| | | HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); |
| | | HValue = HValue.substring(0, HValue.length - 1); |
| | | HElement_type = HElement_type.substring(0, HElement_type.length - 1); |
| | | |
| | | var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3; |
| | | |
| | | //ä¿®æ¹ |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Xt_FastICScheme/save", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "oMain": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { time: 1 * 1000, icon: 1 }); |
| | | } |
| | | else { |
| | | |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | |
| | | |
| | | } |
| | | }); |
| | | layer.close(index) |
| | | }, function (index) { |
| | | //åæ¶ |
| | | layer.alert('åæ¶') |
| | | layer.close(index) |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | //è¯»åæ¹æ¡ |
| | | function set_ReadScheme() { |
| | | var HIsClose_Manual = false; |
| | | var Filter = document.getElementsByClassName(HClassTag); //è·åæ¬é¡µææè¿æ»¤æ¡ä»¶å¯¹è±¡(classä¸å
å«"ForFilteringSchemes"çå
ç´ ) |
| | | |
| | | var HFilterIdList = ""; |
| | | var HFilterIdLists = ""; |
| | | var HValue = ""; |
| | | var HElement_type = ""; |
| | | for (var i = 0; i < Filter.length; i++) { |
| | | HFilterIdList = Filter[i].id; //è¿æ»¤æ¡ä»¶ID |
| | | HFilterIdLists += Filter[i].id + ","; //è¿æ»¤æ¡ä»¶ID(æ¼æ¥) |
| | | HValue += $("#" + HFilterIdList).val() + ","; //è¿æ»¤æ¡ä»¶ä¸è¾å
¥çå¼ |
| | | HElement_type += document.getElementById(HFilterIdList).tagName + ",";//éè¿æ ç¾idè·åæ ç¾ç±»å |
| | | } |
| | | //å»é¤æ«å°¾éå· |
| | | HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); |
| | | HValue = HValue.substring(0, HValue.length - 1); |
| | | HElement_type = HElement_type.substring(0, HElement_type.length - 1); |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'è¿æ»¤æ¹æ¡å表' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../ç³»ç»ç®¡ç/è¿æ»¤æ¹æ¡è®¾ç½®/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName |
| | | , cancel: function () { |
| | | // å³ä¸è§å
³éäºä»¶çé»è¾ |
| | | HIsClose_Manual = true; |
| | | } |
| | | , end: function () { |
| | | if (HIsClose_Manual != true) { |
| | | get_FastQuery() |
| | | form.render("select"); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //以䏿¯layui模å |
| | | }); |
| | | //#region ãè¿æ»¤æ¹æ¡è¿åæ°æ®ã |
| | | function HFilterScheme(obj) //è¿åè¿æ»¤æ¹æ¡ |
| | | { |
| | | var HInterID = obj[0].hmainid; |
| | | HInterID_Choose = obj[0].hmainid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_FastICScheme/Chooselist', |
| | | type: "GET", |
| | | data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": HInterID, "Type": "Select" }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = data1.data; |
| | | //èµå¼è¿æ»¤æ¹æ¡åç§° |
| | | HDefaultFilter = data[0].æ¹æ¡åç§° |
| | | var HRemark = data[0].夿³¨ |
| | | //æ¾ç¤ºå½åçè¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>'; |
| | | HInterID = data[0].hmainid |
| | | //æ ¹æ®éæ©çè¿æ»¤æ¹æ¡åå¡«æ°æ®å°åè¡¨è¿æ»¤æ¡ä»¶ |
| | | for (let i = 0; i < data.length; i++) { |
| | | $("#" + data[i].è¿æ»¤å段ID).val(data[i].è¿æ»¤å¼); |
| | | if (data[i].è¿æ»¤æ ç¾ç±»å == 'SELECT') { |
| | | $("#" + data[i].è¿æ»¤å段ID).find("option[value='" + data[i].è¿æ»¤å¼ + "']").attr("selected", true); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | </script> |
| | | |
| | | </body> |
| | |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HWHName" id="HWHName" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HWHNumber" id="HWHNumber" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="WareHouse" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HWHName").val(checkStatus.data[0].ä»åºåç§°); |
| | | $("#HWHNumber").val(checkStatus.data[0].ä»åºä»£ç ); |
| | | $("#HWHID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | var data = table.cache["mainTable"]; |
| | | for (const row of data) { |
| | | row.HWHID = $("#HWHID").val(); |
| | | row.HWHCode = $("#HWHNumber").val(); |
| | | row.HWHName = $("#HWHName").val(); |
| | | } |
| | | option.data = data; |
| | | table.render(option); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: checkStatus.data[0].hmainid, |
| | | HMaterCode: checkStatus.data[0].模å
·ç¼å·, |
| | | HMaterName: checkStatus.data[0].模å
·åç§°, |
| | | HMaterSpec: checkStatus.data[0].模å
·åå·, |
| | | |
| | | HDesignLife: 0, //è®¾è®¡å¯¿å½ |
| | | HLeaveLife: 0, //å©ä½å¯¿å½ |
| | | HQty: 1, //宿¶æ°é |
| | | HMoney: 0, //éé¢ |
| | | }); |
| | | |
| | | OptionData = checkStatus.data[0]; //æé䏿°æ®çç¬¬ä¸æ¡èµå¼ç»OptionDataåé |
| | | 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": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 1, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; // å建ä¸ä¸ªæ°çå
嫿°ç» å
¶åå§å¼ä¸ºç©ºæè
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].hmainid; |
| | | option.data[rowIndex + i].HMaterCode = checkStatus.data[i].模å
·ç¼å·; |
| | | option.data[rowIndex + i].HMaterName = checkStatus.data[i].模å
·åç§°; |
| | | option.data[rowIndex + i].HMaterSpec = checkStatus.data[i].模å
·åå·; |
| | | option.data[rowIndex + i].HUnitID = checkStatus.data[i].HUnitID; |
| | | option.data[rowIndex + i].HUnitCode = checkStatus.data[i].计éåä½ä»£ç ; |
| | | option.data[rowIndex + i].HUnitName = checkStatus.data[i].计éåä½; |
| | | } |
| | | table.render(option); //éæ°æ¸²æè¡¨æ ¼ä»¥æ¾ç¤ºæ´æ°åçæ°æ® |
| | | } |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: OptionData.hmainid, |
| | | HMaterCode: OptionData.模å
·ç¼å·, |
| | | HMaterName: OptionData.模å
·åç§°, |
| | | HMaterSpec: OptionData.模å
·åå·, |
| | | HUnitID: OptionData.HUnitID, |
| | | HUnitCode: OptionData.计éåä½ä»£ç , |
| | | HUnitName: OptionData.计éåä½, |
| | | HDesignLife: 0, //è®¾è®¡å¯¿å½ |
| | | HLeaveLife: 0, //å©ä½å¯¿å½ |
| | | HQty: 1, //宿¶æ°é |
| | | HMoney: 0, //éé¢ |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HPropertyID: OptionData.HItemID, |
| | | HPropertyCode: OptionData.è¾
å©å±æ§ä»£ç , |
| | | HPropertyName: OptionData.è¾
å©å±æ§åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HSecUnitID: OptionData.HItemID, |
| | | HSecUnitCode: OptionData.计éåä½ä»£ç , |
| | | HSecUnitName: OptionData.计éåä½åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HUnitID: OptionData.HItemID, |
| | | HUnitCode: OptionData.计éåä½ä»£ç , |
| | | HUnitName: OptionData.计éåä½åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true |
| | | , content: ['../../../views/åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Warehouse.html', 'yes'], |
| | | , content: ['../../../views/åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Warehouse.html?type=Warehouse&', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HWHID: OptionData.HItemID, |
| | | HWHCode: OptionData.ä»åºä»£ç , |
| | | HWHName: OptionData.ä»åºåç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HSPID: OptionData.HMainID, |
| | | HSPCode: OptionData.ä»ä½ä»£ç , |
| | | HSPName: OptionData.ä»ä½åç§°, |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | } |
| | |
| | | return false; |
| | | } |
| | | }) |
| | | //åå» |
| | | $('.layui-table-box tbody td[data-field="HMaterCode"]').off('dblclick').on('dblclick', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å¨å
·å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true |
| | | , content: ['../../模治å
·ç®¡ç/模治å
·ç®¡ç/Gy_MouldFileList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | OptionData = checkStatus.data[0]; //æé䏿°æ®çç¬¬ä¸æ¡èµå¼ç»OptionDataåé |
| | | 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": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 1, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; // å建ä¸ä¸ªæ°çå
嫿°ç» å
¶åå§å¼ä¸ºç©ºæè
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].hmainid; |
| | | option.data[rowIndex + i].HMaterCode = checkStatus.data[i].模å
·ç¼å·; |
| | | option.data[rowIndex + i].HMaterName = checkStatus.data[i].模å
·åç§°; |
| | | option.data[rowIndex + i].HMaterSpec = checkStatus.data[i].模å
·åå·; |
| | | option.data[rowIndex + i].HUnitID = checkStatus.data[i].HUnitID; |
| | | option.data[rowIndex + i].HUnitCode = checkStatus.data[i].计éåä½ä»£ç ; |
| | | option.data[rowIndex + i].HUnitName = checkStatus.data[i].计éåä½; |
| | | } |
| | | table.render(option); //éæ°æ¸²æè¡¨æ ¼ä»¥æ¾ç¤ºæ´æ°åçæ°æ® |
| | | } |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | if (typeof (OptionData) != "undefined" && OptionData != []) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: OptionData.hmainid, |
| | | HMaterCode: OptionData.模å
·ç¼å·, |
| | | HMaterName: OptionData.模å
·åç§°, |
| | | HMaterSpec: OptionData.模å
·åå·, |
| | | HUnitID: OptionData.HUnitID, |
| | | HUnitCode: OptionData.计éåä½ä»£ç , |
| | | HUnitName: OptionData.计éåä½, |
| | | HDesignLife: 0, //è®¾è®¡å¯¿å½ |
| | | HLeaveLife: 0, //å©ä½å¯¿å½ |
| | | HQty: 1, //宿¶æ°é |
| | | HMoney: 0, //éé¢ |
| | | }); |
| | | } |
| | | OptionData = []; |
| | | } |
| | | }); |
| | | obj.event = ""; |
| | | }); |
| | | |
| | | |
| | | } |
| | | //#endregion |
| | | }); |
| | |
| | | function GetHWHValue(obj) //è¿åä»åº |
| | | { |
| | | $("#HWHName").val(obj[0].ä»åºåç§°); |
| | | $("#HWHNumber").val(obj[0].ä»åºä»£ç ); |
| | | $("#HWHID").val(obj[0].HItemID); |
| | | } |
| | | |
| | |
| | | $("#HSupName").val(obj[0].客æ·åç§°); |
| | | $("#HSupID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | function GetMouldFileValue(obj) //å¨å
· |
| | | { |
| | | OptionData = obj[0]; |
| | | } |
| | | function GetGyProperty(obj) //è¾
å©å±æ§ |
| | | { |
| | | OptionData = obj; |
| | | } |
| | | function GetUnitValue(obj) //计éåä½ |
| | | { |
| | | OptionData = obj[0]; |
| | | } |
| | | function GetGyWarehouse(obj) //ä»åº |
| | | { |
| | | OptionData = obj[0]; |
| | | } |
| | | function GetGyStockPlace(obj) //ä»ä½ |
| | | { |
| | | OptionData = obj; |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../layuiadmin/soulTable.slim.js"></script> |
| | | <script src="../../../layuiadmin/PageTitle.js"></script> |
| | | |
| | | <script src="../../../layuiadmin/SetColumn.js"></script> |
| | | <script src="../../../layuiadmin/HideButton_New.js"></script> |
| | | <style type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HBeginDate"> |
| | | <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HEndDate"> |
| | | <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ç»åç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HStockOrgName" id="HStockOrgName" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HStockOrgName" id="HStockOrgName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | <!--æ¾ç¤ºå½åè¿æ»¤æ¹æ¡--> |
| | | <div class="layui-inline" style="margin-left:5px;"> |
| | | <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div> |
| | | </div> |
| | | <div class="layui-colla-content"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline"> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">é¨é¨ä¿¡æ¯</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HDept" id="HDept" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HDept" id="HDept" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç©æä»£ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HMaterNumber" id="HMaterNumber" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¨å
·ä»£ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HModelNumber" id="HModelNumber" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HModelNumber" id="HModelNumber" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ä»åº</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HWhName" id="HWhName" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HWhName" id="HWhName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">徿¥åä½</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HSupName" id="HSupName" style="width:190px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HSupName" id="HSupName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;"> |
| | | <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;" class="ForFilteringSchemes"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;"> |
| | | <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width: 190px;" class="ForFilteringSchemes"> |
| | | <option value="0" selected="selected"></option> |
| | | <option value="=">=</option> |
| | | <option value=">=">>=</option> |
| | |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input" value="" name="ColContent" id="ColContent"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;"> |
| | | <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;" class="ForFilteringSchemes"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" style="width:190px;"> |
| | | <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" style="width:190px;" class="ForFilteringSchemes"> |
| | | <option value="0" selected="selected"></option> |
| | | <option value="=">=</option> |
| | | <option value=">=">>=</option> |
| | |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input" value="" name="ColContent1" id="ColContent1"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;"> |
| | | <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;" class="ForFilteringSchemes"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" style="width:190px;"> |
| | | <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" style="width:190px;" class="ForFilteringSchemes"> |
| | | <option value="0" selected="selected"></option> |
| | | <option value="=">=</option> |
| | | <option value=">=">>=</option> |
| | |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input" value="" name="ColContent2" id="ColContent2"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <div id="page" style="position: relative; bottom: 0;"></div> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit"><i class="layui-icon layui-icon-repeat"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit"><i class="layui-icon layui-icon-refresh"></i>åå®¡æ ¸</button> |
| | | <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="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | <div class="layui-btn-container" id="toolbarDemo_ButtonSet"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view" id="btn-view"><i class="layui-icon layui-icon-tips"></i>é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="btn-print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit" id="btn-audit"><i class="layui-icon layui-icon-repeat"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit" id="btn-Faudit"><i class="layui-icon layui-icon-refresh"></i>åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>æé®è®¾ç½®</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>ä¿åæ¹æ¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>è¯»åæ¹æ¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var optionPage = []; |
| | | var HModName = "Sc_MouldScrapOutBillList"; |
| | | var HBillType = "3832"; |
| | | var set_HideButton_ID = "toolbarDemo_ButtonSet";//éè¦è®¾ç½®çæé®çç¶çº§èç¹çid |
| | | |
| | | //#region ãè¿æ»¤æ¹æ¡ã |
| | | |
| | | //è¿æ»¤æ¡ä»¶çclassç±» |
| | | var HClassTag = "ForFilteringSchemes"; |
| | | //模ååç§°ï¼ä¸æçï¼ æ¯ä¸ªæ¨¡å页é¢é½éè¦ä¿®æ¹ |
| | | window.HModuleName = "å¨å
·å¤çåºåºå"; |
| | | //æ¯å¦å·²ç»éæ©äºè¿æ»¤æ¹æ¡ï¼å
¨å±åéï¼ |
| | | window.HDefaultFilter = ""; |
| | | //éæ©çè¿æ»¤æ¹æ¡å
ç ï¼å
¨å±åéï¼ |
| | | window.HInterID_Choose = 0; |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //#region ã卿è·å模ååç§°ã |
| | | var HModuleType = "3832"; |
| | | //éè¿åæ®ç±»åï¼ä»æ°æ®åºå¨æè·ååæ®æ¨¡åå½å,å¼ç¨jsæä»¶ PageTitle.js |
| | |
| | | //éåº |
| | | case 'get_Exit': Pub_Close(2); |
| | | break; |
| | | //å设置 |
| | | case 'set_HideColumn': |
| | | get_HideColumn(HModName, sessionStorage["HUserName"], option, optionPage, get_FastQuery); |
| | | break; |
| | | //æé®è®¾ç½® |
| | | case 'set_HideButton': |
| | | get_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | break; |
| | | //ä¿åæ¹æ¡ |
| | | case 'set_SaveScheme': set_SaveScheme(); |
| | | break; |
| | | //è¯»åæ¹æ¡ |
| | | case 'set_ReadScheme': set_ReadScheme(); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | //#region æåºåéæ© |
| | | table.on('sort(mainTable)', function (obj) { //注ï¼sort æ¯å·¥å
·æ¡äºä»¶åï¼test æ¯ table åå§å®¹å¨ç屿§ lay-filter="对åºçå¼" |
| | | table.reload('mainTable', { |
| | | initSort: obj //è®°å½åå§æåºï¼å¦æä¸è®¾çè¯ï¼å°æ æ³æ 记表头çæåºç¶æã layui 2.1.1 æ°å¢åæ° |
| | | , where: { //请æ±åæ°ï¼æ³¨æï¼è¿éé¢çåæ°å¯ä»»æå®ä¹ï¼å¹¶éä¸é¢åºå®çæ ¼å¼ï¼ |
| | | field: obj.field //æåºå段 卿¥å£ä½ä¸ºåæ°å段 field order |
| | | , order: obj.type //æåºæ¹å¼ 卿¥å£ä½ä¸ºåæ°å段 field order |
| | | } |
| | | }); |
| | | option.data = layui.table.cache["mainTable"]; |
| | | table.render(option); |
| | | //å·æ°æé®æ¾ç¤º |
| | | Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | }); |
| | | //#endregion |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) {//éæ©ä»ä½ |
| | | optionPage.curr = 1; |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | |
| | | $("#Comparator1").val("0"); |
| | | form.render('select'); |
| | | sWhere = ""; |
| | | get_Display(sWhere); |
| | | optionPage.curr = 1; |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | | //#endregion |
| | |
| | | |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //æ¥è¯¢ |
| | | get_Display(); |
| | | get_FastQuery(); |
| | | //åå§åé¡µå¤§å° |
| | | DisPlay_HideColumn_GetPageSize(HModName, sessionStorage["HUserName"], optionPage); |
| | | ColFilter(); |
| | | |
| | | //é»è®¤æ¹æ¡ |
| | | get_DefaultModule() |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | 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")); |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , page: false |
| | | , totalRow: true |
| | | , cellMinWidth: 120 |
| | | , limit: 50 |
| | |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 200, sort: true } |
| | | ]] |
| | | }; |
| | | optionPage = { |
| | | elem: 'page', //注æï¼è¿éç page æ¯ IDï¼ä¸ç¨å # å· |
| | | count: 10000, //æ°æ®æ»æ°ï¼ä»æå¡ç«¯å¾å° |
| | | limit: 50, |
| | | limits: [50, 500, 1000, 2000], |
| | | layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'], |
| | | jump: function (obj, first) { |
| | | //console.log(obj) |
| | | //objå
å«äºå½ååé¡µçææåæ°ï¼æ¯å¦ï¼ |
| | | //console.log(obj.curr); //å¾å°å½å页ï¼ä»¥ä¾¿åæå¡ç«¯è¯·æ±å¯¹åºé¡µçæ°æ®ã |
| | | //console.log(obj.limit); //å¾å°æ¯é¡µæ¾ç¤ºçæ¡æ° |
| | | |
| | | //馿¬¡ä¸æ§è¡ |
| | | if (!first) { |
| | | //do something |
| | | get_FastQuery(); |
| | | } |
| | | } |
| | | } |
| | | laypage.render(optionPage); |
| | | } |
| | | |
| | | //æ¥è¯¢ |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å页æ¥è¯¢ |
| | | function get_DisplayPage() { |
| | | var ajaxLoad = layer.load(); |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldScrapOutHouseBill/page', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": optionPage.curr, "size": optionPage.limit }, |
| | | success: function (data1) { |
| | | option.limit = optionPage.limit;//æ¹åè¡¨æ ¼é¡µå¤§å° |
| | | if (data1.code == 1) { |
| | | optionPage.count = data1.count;//æ¹ååè¡¨æ°æ®æ»æ° |
| | | option.data = data1.data; |
| | | laypage.render(optionPage); |
| | | //å设置 |
| | | DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option); |
| | | //è¡¨æ ¼å è½½å¿
é卿鮿¾ç¤ºå |
| | | table.render(option); |
| | | //å·æ°æé®æ¾ç¤º |
| | | Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | // å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HBeginDate = $("#HBeginDate").val();//å¼å§æ¥æ |
| | |
| | | if (HSupName) { |
| | | sWhere += " and 徿¥åä½ like '%" + HSupName + "%'"; |
| | | } |
| | | get_Display(sWhere); |
| | | get_DisplayPage(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | |
| | | $("#btnSearch").click(); |
| | | } |
| | | |
| | | |
| | | |
| | | ////å®¡æ ¸ |
| | | //function set_CheckBill() { |
| | | // var checkStatus = table.checkStatus('mainTable') |
| | |
| | | // } |
| | | |
| | | //} |
| | | //#region ãè¿æ»¤æ¹æ¡ã |
| | | |
| | | //è·åå½åç¨æ·çé»è®¤è¿æ»¤æ¹æ¡ |
| | | function get_DefaultModule() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_FastICScheme/Chooselist', |
| | | type: "GET", |
| | | data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | //å½åç¨æ·è®¾ç½®æé»è®¤çè¿æ»¤æ¹æ¡ |
| | | var data = data1.data; |
| | | //å½åéæ©çè¿æ»¤æ¹æ¡ |
| | | HInterID_Choose = data[0].hmainid; |
| | | //è¿æ»¤æ¹æ¡å
ç |
| | | HInterID = data[0].hmainid |
| | | //è¿æ»¤æ¹æ¡åç§° |
| | | HDefaultFilter = data[0].æ¹æ¡åç§° |
| | | //è¿æ»¤æ¹æ¡ç夿³¨ï¼æ¹æ¡ä¿¡æ¯æè¿°ï¼ |
| | | var HRemark = data[0].夿³¨ |
| | | //æ¾ç¤ºåºå½åçé»è®¤è¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>'; |
| | | //æè¿æ»¤æ¡ä»¶å¼ååå°é¡µé¢ä¸ |
| | | for (let i = 0; i < data.length; i++) { |
| | | $("#" + data[i].è¿æ»¤å段ID).val(data[i].è¿æ»¤å¼); |
| | | if (data[i].è¿æ»¤æ ç¾ç±»å == 'SELECT') { |
| | | $("#" + data[i].è¿æ»¤å段ID).find("option[value='" + data[i].è¿æ»¤å¼ + "']").attr("selected", true); |
| | | } |
| | | } |
| | | |
| | | //var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; |
| | | //è¥æ¥æé´éä¸ä¸º ä»»æé´éï¼åç¦ç¨å¼å§æ¥æä¸ç»ææ¥æçéæ© |
| | | //if (HInitTimeCycle != -1) { |
| | | // $('#HBeginDate').prop('disabled', true); |
| | | // $('#HEndDate').prop('disabled', true); |
| | | |
| | | // $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); |
| | | // $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | // ////æ§è¡æ¥è¯¢æ¹æ³ |
| | | // //get_FastQuery(); |
| | | //} else { |
| | | // $('#HBeginDate').prop('disabled', false); |
| | | // $('#HEndDate').prop('disabled', false); |
| | | //} |
| | | |
| | | //æ§è¡æ¥è¯¢æ¹æ³ |
| | | get_FastQuery() |
| | | form.render("select"); |
| | | } else { |
| | | //å½åç¨æ·æ²¡æè®¾ç½®é»è®¤çè¿æ»¤æ¹æ¡ |
| | | //éèæ¾ç¤ºè¿æ»¤æ¹æ¡çæ ç¾ä¿¡æ¯ |
| | | document.getElementById("HFilterScheme_Now").style.display = "none"; |
| | | ////æ§è¡æ¥è¯¢æ¹æ³ |
| | | //get_FastQuery() |
| | | //form.render("select"); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ä¿åæ¹æ¡ |
| | | function set_SaveScheme() { |
| | | var index = layer.open() |
| | | //å¤æç¨æ·æ¯å¦ç¹å»äºå³ä¸è§çâåå·âå
³éå¼¹çªé¡µé¢ |
| | | var HIsClose_Manual = false; |
| | | //è·åæ¬é¡µææè¿æ»¤æ¡ä»¶å¯¹è±¡(classä¸å
å«"ForFilteringSchemes"çå
ç´ ) |
| | | var Filter = document.getElementsByClassName(HClassTag); |
| | | |
| | | var HFilterIdList = "";//è¿æ»¤æ¡ä»¶ |
| | | var HFilterIdLists = "";//æ¼æ¥å¤ä¸ªè¿æ»¤æ¡ä»¶ |
| | | var HValue = "";//è¿æ»¤å¼ |
| | | var HElement_type = "";//è¿æ»¤æ ç¾ç±»å |
| | | |
| | | for (var i = 0; i < Filter.length; i++) { |
| | | HFilterIdList = Filter[i].id; //è¿æ»¤æ¡ä»¶ID |
| | | HFilterIdLists += Filter[i].id + ","; //è¿æ»¤æ¡ä»¶ID(æ¼æ¥) |
| | | HValue += $("#" + HFilterIdList).val() + ","; //è¿æ»¤æ¡ä»¶ä¸è¾å
¥çå¼ |
| | | HElement_type += document.getElementById(HFilterIdList).tagName + ",";//éè¿æ ç¾idè·åæ ç¾ç±»å |
| | | } |
| | | |
| | | //å»é¤æ«å°¾éå· |
| | | HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); |
| | | HValue = HValue.substring(0, HValue.length - 1); |
| | | HElement_type = HElement_type.substring(0, HElement_type.length - 1); |
| | | |
| | | //å½å页é¢ä¸æ²¡æéæ©è¿æ»¤æ¹æ¡ï¼è¿å
¥æ°å¢æ¹æ³ |
| | | if (HDefaultFilter == "") { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['40%', '80%'] |
| | | , title: 'è¿æ»¤æ¹æ¡' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../ç³»ç»ç®¡ç/è¿æ»¤æ¹æ¡è®¾ç½®/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type |
| | | , cancel: function () { |
| | | // å³ä¸è§å
³éäºä»¶çé»è¾ |
| | | HIsClose_Manual = true; |
| | | } |
| | | , end: function () { |
| | | if (HIsClose_Manual != true) { |
| | | get_FastQuery(); |
| | | //æ¾ç¤ºå½åçè¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>'; |
| | | } |
| | | } |
| | | }) |
| | | layer.close(index) |
| | | } else { |
| | | //å½å页é¢å·²æè¿æ»¤æ¹æ¡ï¼ç¨æ·éæ© æ°å¢æè
ç¼è¾ |
| | | layer.confirm('å½åå·²éæ©è¿æ»¤æ¹æ¡ï¼æ¯å¦ä¿®æ¹ï¼è¯·éæ©å¯¹åºæä½', { |
| | | title: "æä½æç¤º", |
| | | icon: 0, |
| | | btn: ['æ°å¢æ¹æ¡', 'ä¿åä¿®æ¹å½åæ¹æ¡', 'åæ¶'] |
| | | }, function (index, layero) { |
| | | //æ°å¢ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['40%', '80%'] |
| | | , title: 'è¿æ»¤æ¹æ¡' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../ç³»ç»ç®¡ç/è¿æ»¤æ¹æ¡è®¾ç½®/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type |
| | | , end: function () { |
| | | get_FastQuery() |
| | | //æ¾ç¤ºå½åçè¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>'; |
| | | } |
| | | }) |
| | | layer.close(index) |
| | | }, function (index) { |
| | | //ç¼è¾ |
| | | var Filter_Edit = document.getElementsByClassName(HClassTag); //è·åæ¬é¡µææè¿æ»¤æ¡ä»¶å¯¹è±¡(classä¸å
å«"ForFilteringSchemes"çå
ç´ ) |
| | | HFilterIdList = ""; |
| | | HFilterIdLists = ""; |
| | | HValue = ""; |
| | | HElement_type = ""; |
| | | for (var i = 0; i < Filter_Edit.length; i++) { |
| | | HFilterIdList = Filter_Edit[i].id; //è¿æ»¤æ¡ä»¶ID |
| | | HFilterIdLists += Filter_Edit[i].id + ","; //è¿æ»¤æ¡ä»¶ID(æ¼æ¥) |
| | | HValue += $("#" + HFilterIdList).val() + ","; //è¿æ»¤æ¡ä»¶ä¸è¾å
¥çå¼ |
| | | HElement_type += document.getElementById(HFilterIdList).tagName + ",";//éè¿æ ç¾idè·åæ ç¾ç±»å |
| | | } |
| | | //å»é¤æ«å°¾éå· |
| | | HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); |
| | | HValue = HValue.substring(0, HValue.length - 1); |
| | | HElement_type = HElement_type.substring(0, HElement_type.length - 1); |
| | | |
| | | var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3; |
| | | |
| | | //ä¿®æ¹ |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Xt_FastICScheme/save", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "oMain": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { time: 1 * 1000, icon: 1 }); |
| | | } |
| | | else { |
| | | |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | |
| | | |
| | | } |
| | | }); |
| | | layer.close(index) |
| | | }, function (index) { |
| | | //åæ¶ |
| | | layer.alert('åæ¶') |
| | | layer.close(index) |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | //è¯»åæ¹æ¡ |
| | | function set_ReadScheme() { |
| | | var HIsClose_Manual = false; |
| | | var Filter = document.getElementsByClassName(HClassTag); //è·åæ¬é¡µææè¿æ»¤æ¡ä»¶å¯¹è±¡(classä¸å
å«"ForFilteringSchemes"çå
ç´ ) |
| | | |
| | | var HFilterIdList = ""; |
| | | var HFilterIdLists = ""; |
| | | var HValue = ""; |
| | | var HElement_type = ""; |
| | | for (var i = 0; i < Filter.length; i++) { |
| | | HFilterIdList = Filter[i].id; //è¿æ»¤æ¡ä»¶ID |
| | | HFilterIdLists += Filter[i].id + ","; //è¿æ»¤æ¡ä»¶ID(æ¼æ¥) |
| | | HValue += $("#" + HFilterIdList).val() + ","; //è¿æ»¤æ¡ä»¶ä¸è¾å
¥çå¼ |
| | | HElement_type += document.getElementById(HFilterIdList).tagName + ",";//éè¿æ ç¾idè·åæ ç¾ç±»å |
| | | } |
| | | //å»é¤æ«å°¾éå· |
| | | HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); |
| | | HValue = HValue.substring(0, HValue.length - 1); |
| | | HElement_type = HElement_type.substring(0, HElement_type.length - 1); |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'è¿æ»¤æ¹æ¡å表' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../ç³»ç»ç®¡ç/è¿æ»¤æ¹æ¡è®¾ç½®/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName |
| | | , cancel: function () { |
| | | // å³ä¸è§å
³éäºä»¶çé»è¾ |
| | | HIsClose_Manual = true; |
| | | } |
| | | , end: function () { |
| | | if (HIsClose_Manual != true) { |
| | | get_FastQuery() |
| | | form.render("select"); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | | //以䏿¯layui模å |
| | | }); |
| | | //#region ãè¿æ»¤æ¹æ¡è¿åæ°æ®ã |
| | | function HFilterScheme(obj) //è¿åè¿æ»¤æ¹æ¡ |
| | | { |
| | | var HInterID = obj[0].hmainid; |
| | | HInterID_Choose = obj[0].hmainid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_FastICScheme/Chooselist', |
| | | type: "GET", |
| | | data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": HInterID, "Type": "Select" }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = data1.data; |
| | | //èµå¼è¿æ»¤æ¹æ¡åç§° |
| | | HDefaultFilter = data[0].æ¹æ¡åç§° |
| | | var HRemark = data[0].夿³¨ |
| | | //æ¾ç¤ºå½åçè¿æ»¤æ¹æ¡ |
| | | document.getElementById("HFilterScheme_Now").style.display = "block"; |
| | | document.getElementById('HFilterScheme_Now').innerHTML = "å½åè¿æ»¤æ¹æ¡ï¼" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>'; |
| | | HInterID = data[0].hmainid |
| | | //æ ¹æ®éæ©çè¿æ»¤æ¹æ¡åå¡«æ°æ®å°åè¡¨è¿æ»¤æ¡ä»¶ |
| | | for (let i = 0; i < data.length; i++) { |
| | | $("#" + data[i].è¿æ»¤å段ID).val(data[i].è¿æ»¤å¼); |
| | | if (data[i].è¿æ»¤æ ç¾ç±»å == 'SELECT') { |
| | | $("#" + data[i].è¿æ»¤å段ID).find("option[value='" + data[i].è¿æ»¤å¼ + "']").attr("selected", true); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | |
| | |
| | | , { field: 'å¾å·', title: 'å¾å·', sort: true } |
| | | , { field: 'ç产产ååå·', title: 'ç产产ååå·', sort: true } |
| | | , { field: 'HUnitID', title: 'HUnitID', hide: true, sort: true } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', sort: true } |
| | | , { field: '计éåä½', title: '计éåä½', sort: true } |
| | | , { field: 'åºåæ¥æ', title: 'åºåæ¥æ', templet: "<div>{{d.åºåæ¥æ ==null ?'':layui.util.toDateString(d.åºåæ¥æ, 'yyyy-MM-dd')}}</div>", sort: true } |
| | | , { field: 'åºåç¼å·', title: 'åºåç¼å·', sort: true } |