| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">éå®è®¢åç±»å</label> |
| | | <label class="layui-form-label" style="width: 60px;">éå®è®¢åç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HMainSourceBillSubType" id="HMainSourceBillSubType" lay-filter="HMainSourceBillSubType" disabled="disabled" style="width: 180px; "> |
| | | <option style="color:blue;" selected="selected" value=""></option> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç©æç¼ç *</label> |
| | | <div class="layui-input-block" style="margin-left: 71px;"> |
| | | <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" style="width: 60%;display: inline-block;"> |
| | | <input type="hidden" name="HMaterID" id="HMaterID" lay-verify="HMaterID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMater" id="btnHMater" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å¹
宽</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HWidth" lay-verify="HWidth" id="HWidth" style="background-color:#efefef4d;display: inline-block;" readonly> |
| | | <input type="text" class="layui-input" name="HWidth" lay-verify="HWidth" id="HWidth" value="0" style="background-color:#efefef4d;display: inline-block;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å
é</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HWeight" lay-verify="HWeight" id="HWeight" style="background-color:#efefef4d;display: inline-block;" readonly> |
| | | <input type="text" class="layui-input" name="HWeight" lay-verify="HWeight" id="HWeight" value="0" style="background-color:#efefef4d;display: inline-block;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <label class="layui-form-label" style="width: 85px;">ç产å
é</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HWeight_New" lay-verify="HWeight_New" id="HWeight_New" style="display: inline-block;" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 50px;">è¾
æ°é2</label> |
| | | <div class="layui-input-inline" style="margin-left: 1px;"> |
| | | <input type="text" class="layui-input" name="HAuxQty2" lay-verify="HAuxQty2" style="width:70px" id="HAuxQty2" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="margin-left:-140px;"> |
| | | <label class="layui-form-label" style="width: 30px;">è¾
å©åä½2</label> |
| | | <div class="layui-input-inline" style="margin-left: 1px;margin-top:10px;"> |
| | | <input type="text" class="layui-input" lay-verify="HAuxUnitName2" name="HAuxUnitName2" id="HAuxUnitName2" style="background-color:#efefef4d;width: 30%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HAuxUnit2" id="HAuxUnit2" lay-verify="HAuxUnit2" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHAuxUnit2" id="btnHAuxUnit2" style="padding: 0 10px;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <script> |
| | | //#region ææ¬æ¡è¾å
¥æç´¢ç¸å
³æ°æ®-åé |
| | | var childPage = null; //è·ååçªå£å¯¹è±¡ï¼ç¨äºæä½åçªå£çåéåæ¹æ³ |
| | | var currRowIndex = 0; //ç¨äºå®ä½åçªå£å½åéä¸çè¡ |
| | | var childData = null; //ç¨äºè·ååçªå£è¿åçæ°æ® |
| | | //#endregion |
| | | |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | //#region 表头åºç¡èµæéæ©å¼¹çª |
| | | //#region ææ¬æ¡çå¬ |
| | | $(document).ready(function () { |
| | | //#region æ ¹æ®ç©æä»£ç è·åç©æåºç¡èµæçéå¼¹çª |
| | | //æ ¹æ®å
ç´ ID对å
ç´ è¿è¡çå¬============================================================================= |
| | | $("#HMaterNumber").on('keydown', function (data) { |
| | | //================================================================================================ |
| | | var errKeys = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter"]; |
| | | if ($.inArray(event.key, errKeys) == -1) { //妿æä¸çé®ä½ä¸æ¯ æ¹åé®ï¼åå·æ°å¼¹çªä¸çæ°æ® |
| | | if (childPage == null) { //夿å½ååçªå£æ¯å¦å·²ç»æå¼ï¼è¥æªæå¡ï¼åæå¼é¡µé¢ï¼å¹¶è·ååçªå£ç对象 |
| | | var offset = $(this).offset(); //è·å触åäºä»¶çå
ç´ çä½ç½®ï¼ç¨äºå®ä½åçªå£æå¼çä½ç½® |
| | | var innerHeight = window.innerHeight; |
| | | var top = offset.top + 0.05 * innerHeight; |
| | | var left = offset.left; |
| | | if (top + 0.05 * innerHeight + 0.3 * innerHeight > innerHeight) { |
| | | top = top - 0.3 * innerHeight - 0.05 * innerHeight; |
| | | } |
| | | layer.open({ |
| | | type: 2 //å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['25%', '30%'] //å¤§å° |
| | | , shadeClose: true //ç¹å»é®ç½©æ¶å
³éå¼¹çª |
| | | , offset: [top, left] |
| | | , title: false //䏿¾ç¤ºæ 颿 |
| | | //, title: '项ç®è´¹ç¨å表' //æ é¢ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , closeBtn: 0 //ç¦ç¨å
³éæé® |
| | | , content: ["../../åºç¡èµæ/éç¨åºç¡èµæ/Gy_CommonBaseData.html?OperationType=2", "yes"] |
| | | , success: function (layero, index) { |
| | | setTimeout(function () { |
| | | //ä¿®æ¹ï¼æ ¹æ®ææ¬æ¡æ°æ®ï¼ç¼åæ¥è¯¢è¯å¥================================================================================================ |
| | | var value = $("#HMaterNumber").val().replace(/'/g, ""); //è·åææ¬æ¡ææ°å¼ |
| | | currRowIndex = 0; |
| | | var tableView = "h_v_Gy_MaterialList"; |
| | | var childSWhere = "select top(10) HItemID,ç©æä»£ç ,ç©æåç§°,è§æ ¼åå·,HUnitID,计éåä½åç§°,å¹
宽,å
é,æè²è¦æ±,夿³¨ from " + tableView + " where 1=1 and ç»ç»åç§° = '" + sessionStorage["Organization"] + "' and (ç©æä»£ç like '%" + value + "%' or ç©æåç§° like '%" + value + "%') order by ç©æä»£ç desc"; |
| | | childPage.getData(childSWhere, tableView); |
| | | //=================================================================================================================================== |
| | | }, 200); |
| | | } |
| | | , end: function () { |
| | | childPage = null; |
| | | currRowIndex = 0; |
| | | if (childData != null) { |
| | | //æ ¹æ®å¼¹çªè¿åæ°æ®è®¾ç½®ææ¬æ¡æ°æ®================================================================================================= |
| | | //è·åæ°æ® |
| | | $("#HMaterID").val(childData.HItemID); |
| | | $("#HMaterNumber").val(childData.ç©æä»£ç ); |
| | | $("#HMaterName").val(childData.ç©æåç§°); |
| | | $("#HModel").val(childData.è§æ ¼åå·); |
| | | $("#HUnitID").val(childData.HUnitID);//计éåä½id |
| | | $("#HUnitName").val(childData.计éåä½åç§°);//计éåä½åç§° |
| | | $("#HWidth").val(childData.å¹
宽);//å¹
宽 |
| | | $("#HWeight").val(childData.å
é);//å
é |
| | | $("#HColorRemark").val(childData.æè²è¦æ±);//æè²è¦æ± |
| | | $("#HRemark").val(childData.夿³¨);//夿³¨ |
| | | //=============================================================================================================================== |
| | | |
| | | childData = null; |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | setTimeout(function () { |
| | | //ä¿®æ¹ï¼æ ¹æ®ææ¬æ¡æ°æ®ï¼ç¼åæ¥è¯¢è¯å¥================================================================================================ |
| | | var value = $("#HMaterNumber").val().replace(/'/g, ""); //è·åææ¬æ¡ææ°å¼ |
| | | currRowIndex = 0; |
| | | var tableView = "h_v_Gy_MaterialList"; |
| | | var childSWhere = "select top(10) HItemID,ç©æä»£ç ,ç©æåç§°,è§æ ¼åå·,HUnitID,计éåä½åç§°,å¹
宽,å
é,æè²è¦æ±,夿³¨ from " + tableView + " where 1=1 and ç»ç»åç§° = '" + sessionStorage["Organization"] + "' and (ç©æä»£ç like '%" + value + "%' or ç©æåç§° like '%" + value + "%') order by ç©æä»£ç desc"; |
| | | childPage.getData(childSWhere, tableView); |
| | | //================================================================================================================================= |
| | | }, 200); |
| | | } |
| | | } else { //妿æä¸çé®ä½æ¯ æ¹åé®ï¼åè°æ´çªå£ä¸ éä¸è¡ çä½ç½® |
| | | if (event.key == "ArrowUp") { |
| | | currRowIndex--; |
| | | childPage.setSelectedRow(currRowIndex); |
| | | } else if (event.key == "ArrowDown") { |
| | | currRowIndex++; |
| | | childPage.setSelectedRow(currRowIndex); |
| | | } else if (event.key == "Enter") { |
| | | //æå¨å¤±ç¦ |
| | | var element = document.getElementById("HMaterNumber"); |
| | | element.blur(); |
| | | |
| | | childPage.getSelectedData(currRowIndex); |
| | | |
| | | if (childData != null) { |
| | | //æ ¹æ®å¼¹çªè¿åæ°æ®è®¾ç½®ææ¬æ¡æ°æ®================================================================================================= |
| | | //è·åæ°æ® |
| | | $("#HMaterID").val(childData.HItemID); |
| | | $("#HMaterNumber").val(childData.ç©æä»£ç ); |
| | | $("#HMaterName").val(childData.ç©æåç§°); |
| | | $("#HModel").val(childData.è§æ ¼åå·); |
| | | $("#HUnitID").val(childData.HUnitID);//计éåä½id |
| | | $("#HUnitName").val(childData.计éåä½åç§°);//计éåä½åç§° |
| | | $("#HWidth").val(childData.å¹
宽);//å¹
宽 |
| | | $("#HWeight").val(childData.å
é);//å
é |
| | | $("#HColorRemark").val(childData.æè²è¦æ±);//æè²è¦æ± |
| | | $("#HRemark").val(childData.夿³¨);//夿³¨ |
| | | //=============================================================================================================================== |
| | | |
| | | childData = null; |
| | | } |
| | | |
| | | |
| | | childPage = null; |
| | | currRowIndex = 0; |
| | | childData = null; |
| | | } |
| | | } |
| | | }); |
| | | //#endregion |
| | | }); |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | //éæ©éå®è®¢åå·æé® |
| | | form.on('submit(btnHSeOrder)', function () { |
| | |
| | | //éæ©è¾
å©åä½æé® |
| | | form.on('submit(btnHAuxUnit)', function () { |
| | | get_btnHAuxUnit(); |
| | | }); |
| | | |
| | | //éæ©è¾
å©åä½2æé® |
| | | form.on('submit(btnHAuxUnit2)', function () { |
| | | get_btnHAuxUnit2(); |
| | | }); |
| | | |
| | | //éæ©BOMæé® |
| | |
| | | }) |
| | | } |
| | | |
| | | //è¾
å©åä½2 |
| | | function get_btnHAuxUnit2() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: "计éåä½å表" //æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Unit.html?type=AuxiliaryUnit2', '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('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HAuxUnit2").val(checkStatus.data[0].HItemID); |
| | | $("#HAuxUnitName2").val(checkStatus.data[0].计éåä½åç§°); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //BOM |
| | | function get_btnBom() { |
| | | layer.open({ |
| | |
| | | , "HAuxQty": d.data[0].HAuxQty |
| | | , "HAuxUnit": d.data[0].HAuxUnit |
| | | , "HAuxUnitName": d.data[0].HAuxUnitName |
| | | |
| | | , "HAuxQty2": d.data[0].HAuxQty2 |
| | | , "HAuxUnit2": d.data[0].HAuxUnit2 |
| | | , "HAuxUnitName2": d.data[0].HAuxUnitName2 |
| | | |
| | | , "HWidth": d.data[0].HWidth |
| | | , "HWeight": d.data[0].HWeight |
| | | , "HColorRemark": d.data[0].æè²è¦æ± |
| | |
| | | $("#HAuxUnit").val(obj[0].HItemID); |
| | | $("#HAuxUnitName").val(obj[0].计éåä½åç§°); |
| | | } |
| | | |
| | | //è¾
å©è®¡éåä½2 |
| | | function GetAuxiliaryUnit2Value(obj) { |
| | | $("#HAuxUnit2").val(obj[0].HItemID); |
| | | $("#HAuxUnitName2").val(obj[0].计éåä½åç§°); |
| | | } |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | function GetWorkCenterValue(obj) { |
| | | $("#HCenterID").val(obj[0].HItemID); |