| | |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">è´è´£äºº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | |
| | | <div class="layui-col-xs7 layui-inline"> |
| | | <label class="layui-form-label">æè¦</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off"> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">è´è´£äºº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs7 layui-inline"> |
| | | <label class="layui-form-label">夿³¨</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç»ç»</label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> |
| | | <select name="HOrgID" id="HOrgID" lay-verify="HOrgID"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | |
| | | <div class="layui-col-xs7 layui-inline"> |
| | | <label class="layui-form-label">æè¦</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <!--å¶åä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <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="HMaker" id="HMaker" style="background-color:#efefef4d;" 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="HChecker" id="HChecker" style="background-color:#efefef4d;" 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="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs7 layui-inline"> |
| | | <label class="layui-form-label">夿³¨</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="HUpDater" id="HUpDater" style="background-color:#efefef4d;" 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="HDeleteMan " id="HDeleteMan " style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" 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="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" 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="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" 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="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç»ç»</label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> |
| | | <select name="HOrgID" id="HOrgID" lay-verify="HOrgID"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <!--å¶åä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <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="HMaker" id="HMaker" style="background-color:#efefef4d;" 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="HChecker" id="HChecker" style="background-color:#efefef4d;" 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="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" 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="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" 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="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="HUpDater" id="HUpDater" style="background-color:#efefef4d;" 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="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" 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="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>å¢å ä¸è¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>å¤å¶ä¸è¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Inventory" id="get_Inventory"><i class="layui-icon layui-icon-form"></i>åºåæ¥è¯¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>åºå
¥åºè®°å½æ¥è¯¢</button> |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="xuhao"> |
| | |
| | | |
| | | var allVal; |
| | | //#endregion |
| | | |
| | | var HModName = "Kf_POStockInBackBill_Add_Up" |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | |
| | | "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | }; |
| | | switch (obj.event) { |
| | | //åºåæ¥è¯¢ |
| | | case 'get_Inventory': get_Inventory(); |
| | | break; |
| | | //åºå
¥åºè®°å½æ¥è¯¢ |
| | | case 'get_InOutSum': get_InOutSum(); |
| | | break; |
| | | case 'btn-AddLine': |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | |
| | | //checkRefresh(); |
| | | } |
| | | break; |
| | | ////å设置 |
| | | //case 'set_HideColumn': |
| | | // get_HideColumn(); |
| | | // break; |
| | | //å设置 |
| | | case 'set_HideColumn': |
| | | get_HideColumn(); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | |
| | | //æ°å¼æ ¼å¼æ ¡éªå·¥å
· |
| | | var ref = /^\d+(\.\d+)?$/; //éè´æ°æ£åè¡¨è¾¾å¼ |
| | | var temp = ""; |
| | | |
| | | console.log(obj) |
| | | var Dec = getDecByMaterID(obj.data.HMaterID) //è·å精度 |
| | | var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"]; //æ°é精度 |
| | | var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"]; //å价精度 |
| | | var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"]; //éé¢ç²¾åº¦ |
| | | // åå
æ ¼ç¼è¾ä¹åçå¼ |
| | | var oldText = $(this).prev().text(); |
| | | var value = obj.value //å¾å°ä¿®æ¹åçå¼ |
| | |
| | | var HQty = value * 1; //æ°é |
| | | var HPrice = obj.data.HPrice * 1; //åä»· |
| | | var HMoney = HQty * HPrice; //éé¢=æ°é*åä»· |
| | | |
| | | HQty = Number(HQty.toFixed(HQtyDec)); |
| | | HPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | |
| | | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | |
| | | , HPrice: HPrice |
| | | , HMoney: HMoney |
| | | }); |
| | | /* table.render(option);*/ |
| | | table.render(option); |
| | | break; |
| | | case "HPrice": //åä»· |
| | | //æ°æ®æ ¼å¼æ ¡éª |
| | |
| | | var HQty = obj.data.HQty * 1; //æ°é |
| | | var HPrice = value * 1; |
| | | var HMoney = HQty * HPrice; //éé¢=æ°é*åä»· |
| | | |
| | | HQty = Number(HQty.toFixed(HQtyDec)); |
| | | HPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | |
| | | , HPrice: HPrice |
| | | , HMoney: HMoney |
| | | }); |
| | | table.render(option) |
| | | break; |
| | | case "HMoney": //éé¢ |
| | | //æ°æ®æ ¼å¼æ ¡éª |
| | |
| | | obj.update({ |
| | | HMoney: oldText |
| | | }); |
| | | /* table.render(option);*/ |
| | | table.render(option); |
| | | |
| | | layer.msg("éé¢è¯·è¾å
¥å¤§äº0çæ°å!"); |
| | | return; |
| | |
| | | //æ°æ®æ ¡éªåæ ¼ï¼éç®è®°å½ |
| | | var HQty = obj.data.HQty * 1; //æ°é |
| | | var HMoney = value * 1; |
| | | var HPrice = (HMoney / HQty).toFixed(2); //åä»·=éé¢/æ°é |
| | | |
| | | var HPrice = Number((HMoney / HQty).toFixed(2)); //åä»·=éé¢/æ°é |
| | | HQty = Number(HQty.toFixed(HQtyDec)); |
| | | HPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | |
| | | , HPrice: HPrice |
| | | , HMoney: HMoney |
| | | }); |
| | | break; |
| | | table.render(option); |
| | | break; |
| | | |
| | | default: |
| | | } |
| | | }); |
| | |
| | | |
| | | |
| | | //#region æ¬é¡µé¢ææè¢«è°ç¨çæ¹æ³ |
| | | |
| | | //#region åºåæ¥è¯¢ |
| | | function get_Inventory() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1 && data[0].HMaterID != 0) { |
| | | var HMaterID = data[0].HMaterID.toString(); |
| | | //å¼¹çªæ¹æ³ |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'åºåæ¥è¯¢å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../ä»å管ç/æ¡ç æ¥è¡¨/Kf_ICinventoryQueryReport.html?Type=1&HMaterID=' + HMaterID, 'yes'] |
| | | , btn: ['åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æç©ææ°æ®æ¥è¯¢ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | //#region åºå
¥åºè®°å½æ¥è¯¢ |
| | | function get_InOutSum() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1 && data[0].HMaterID != 0) { |
| | | var HMaterID = data[0].HMaterID.toString(); |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'åºå
¥åºè®°å½å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../ä»å管ç/æ¡ç æ¥è¡¨/Kf_StockInOutSumQueryReport.html?Type=1&HMaterID=' + HMaterID, 'yes'] |
| | | , btn: ['åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æç©ææ°æ®æ¥è¯¢ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | //#region 夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | function get_LoginIs() { |
| | | if (sessionStorage.login != "login") { |
| | |
| | | , totalRow: true |
| | | , cols: [[ //å表 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', width: 100} |
| | | , { type: 'HSourceBillNo', title: 'æºåå·', width: 100, hide: true }//æºåå· |
| | | , { type: 'numbers', field: 'åºå·', title: 'åºå·', width: 100} |
| | | , { field: 'HSourceBillNo', title: 'æºåå·', width: 100, hide: true }//æºåå· |
| | | , { field: 'HSourceBillType', title: 'æºåç±»å', width: 100, hide: true }//æºåç±»å |
| | | , { type: 'HSourceInterID', title: 'æºå主å
ç ', width: 100, hide: true }//æºå主å
ç |
| | | , { field: 'HSourceInterID', title: 'æºå主å
ç ', width: 100, hide: true }//æºå主å
ç |
| | | , { field: 'HSourceEntryID', title: 'æºååå
ç ', width: 100, hide: true }//æºååå
ç |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 150, edit: 'text', event: "HMaterID" }//f7 |
| | |
| | | |
| | | option.data = []; |
| | | table.render(option); |
| | | DisPlay_HideColumn(); |
| | | } |
| | | |
| | | //#region å 载表头 |
| | |
| | | , "HMaker": data.å¶å人 |
| | | , "HChecker": data.å®¡æ ¸äºº |
| | | , "HCloseMan": data.å
³é人 |
| | | , "HMakeDate": data.å¶åæ¥æ |
| | | , "HCheckDate": data.å®¡æ ¸æ¥æ |
| | | , "HCloseDate": data.å
³éæ¥æ |
| | | , "HUpDateDate": data.ä¿®æ¹æ¥æ |
| | | , "HDeleteDate": data.ä½åºæ¥æ |
| | | , "HMakeDate": data.å¶åæ¥æ == null ? "" : Pub_Format(data.å¶åæ¥æ, "yyyy-MM-dd hh:mm:ss") |
| | | , "HCheckDate": data.å®¡æ ¸æ¥æ == null ? "" : Pub_Format(data.å®¡æ ¸æ¥æ, "yyyy-MM-dd hh:mm:ss") |
| | | , "HCloseDate": data.å
³éæ¥æ == null ? "" : Pub_Format(data.å
³éæ¥æ, "yyyy-MM-dd hh:mm:ss") |
| | | , "HUpDateDate": data.ä¿®æ¹æ¥æ == null ? "" : Pub_Format(data.ä¿®æ¹æ¥æ, "yyyy-MM-dd hh:mm:ss") |
| | | , "HDeleteDate": data.ä½åºæ¥æ == null ? "" : Pub_Format(data.ä½åºæ¥æ, "yyyy-MM-dd hh:mm:ss") |
| | | |
| | | }); |
| | | //å表 èµå¼ |
| | |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //#region æ ¹æ®ç©æIDè·å精度 |
| | | function getDecByMaterID(HMaterID) { |
| | | var resultData = {}; |
| | | $.ajax({ // 弿¥è¯·æ± |
| | | url: GetWEBURL() + "Gy_Material/getDecByID", //请æ±å°å |
| | | async: false, //æ¯å¦å¼å¯å¼æ¥ |
| | | type: "GET", //请æ±ç±»å |
| | | data: { //å®ä¹åéå°æå¡å¨çæ°æ® |
| | | "HMaterID": HMaterID // å°hmateridä½ä¸ºè¯·æ±åæ°åé |
| | | }, |
| | | success: function (result) { // å½è¯·æ±æåæ¶ï¼æ§è¡è¿ä¸ªå½æ° |
| | | if (result.code == 1) { // 妿æå¡å¨è¿åçæ°æ®ä¸ç`codeåæ®µçäº1ï¼è¿å¯è½è¡¨ç¤ºå®¡æ ¸æä½æåæ§è¡ |
| | | var data = result.data; //声ædataåéï¼å¹¶å°å
¶èµå¼ä¸ºresult对象ä¸çdata屿§ |
| | | resultData = data[0]; //å°dataæ°ç»ï¼æç±»æ°ç»å¯¹è±¡ï¼ç第ä¸ä¸ªå
ç´ èµå¼ç»åéresultData |
| | | } |
| | | //else { |
| | | // layer.alert(result.Message, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); //result.msgå¯¹è±¡ï¼æç¤ºå¼¹çª ç±»å为5ï¼ æé®ï¼åæé®çå称为éåº æ¶é´ 为100ç§ï¼ä»¥ååç§»éï¼`offset: 't' |
| | | //} |
| | | }, error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); //æç¤ºå¼¹çª åçé误 ï¼è¦ç¤ºæ å¿ä¸º5ç |
| | | } |
| | | }); |
| | | return resultData; |
| | | } |
| | | //#endregion |
| | | |
| | | //#region åå®¡æ ¸/å®¡æ ¸æ°æ® |
| | | function set_CheckBill(num) { |
| | |
| | | //if (checkStatus.data.length != 1) { |
| | | // return layer.msg("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | //} |
| | | OptionData = checkStatus.data[0]; //æé䏿°æ®çç¬¬ä¸æ¡èµå¼ç»OptionDataåé |
| | | if (checkStatus.data.length > 1) { |
| | | var rowIndex = $(obj.tr).attr("data-index") * 1; |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | if (rowIndex + i >= option.data.length) { |
| | | var NewRow = { |
| | | "HMaterID": 0, "ç©æä»£ç ": "", "ç©æåç§°": "", "è§æ ¼åå·": "", "HUnitID": 0, "计éåä½": "", "HQty": "", "HRemark": "", |
| | | "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "æ¶æä»åº": "", |
| | | "HSPID": 0, "ä»ä½åç§°": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0, |
| | | "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", |
| | | "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | }; |
| | | |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | |
| | | var rowIndex = $(obj.tr).attr("data-index") * 1; |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | if (rowIndex + i >= option.data.length) { |
| | | var NewRow = { |
| | | "HMaterID": 0, "ç©æä»£ç ": "", "ç©æåç§°": "", "è§æ ¼åå·": "", "HUnitID": 0, "计éåä½": "", "HQty": "", "HRemark": "", |
| | | "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "æ¶æä»åº": "", |
| | | "HSPID": 0, "ä»ä½åç§°": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0, |
| | | "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", |
| | | "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | }; |
| | | table.render(option); |
| | | } |
| | | |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | |
| | | table.render(option); |
| | | var HMaterID = checkStatus.data[i].HItemID; |
| | | var resultData = getMaterialByMaterID(HMaterID); |
| | | option.data[rowIndex + i].HMaterID = resultData.HMaterID; |
| | | option.data[rowIndex + i].ç©æä»£ç = resultData.HMaterNumber; |
| | | option.data[rowIndex + i].ç©æåç§° = resultData.HMaterName; |
| | | option.data[rowIndex + i].è§æ ¼åå· = resultData.HMaterModel; |
| | | option.data[rowIndex + i].HUnitID = resultData.HUnitID; |
| | | option.data[rowIndex + i].计éåä½ = resultData.HUnitName; |
| | | ////æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | //obj.update({ |
| | | // "HMaterID": checkStatus.data[0].HItemID |
| | | // , "ç©æä»£ç ": checkStatus.data[0].HNumber |
| | | // , "ç©æåç§°": checkStatus.data[0].HName |
| | | // , "è§æ ¼åå·": checkStatus.data[0].HModel |
| | | // , "HUnitID": checkStatus.data[0].HUnitID |
| | | // , "计éåä½": checkStatus.data[0].HUnitName |
| | | //}) |
| | | //layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | |
| | | |
| | | |
| | | var HMaterID = checkStatus.data[i].HItemID; |
| | | var resultData = getMaterialByMaterID(HMaterID); |
| | | option.data[rowIndex + i].HMaterID = resultData.HMaterID; |
| | | option.data[rowIndex + i].ç©æä»£ç = resultData.HMaterNumber; |
| | | option.data[rowIndex + i].ç©æåç§° = resultData.HMaterName; |
| | | option.data[rowIndex + i].è§æ ¼åå· = resultData.HMaterModel; |
| | | option.data[rowIndex + i].HUnitID = resultData.HUnitID; |
| | | option.data[rowIndex + i].计éåä½ = resultData.HUnitName; |
| | | ////æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | //obj.update({ |
| | | // "HMaterID": checkStatus.data[0].HItemID |
| | | // , "ç©æä»£ç ": checkStatus.data[0].HNumber |
| | | // , "ç©æåç§°": checkStatus.data[0].HName |
| | | // , "è§æ ¼åå·": checkStatus.data[0].HModel |
| | | // , "HUnitID": checkStatus.data[0].HUnitID |
| | | // , "计éåä½": checkStatus.data[0].HUnitName |
| | | //}) |
| | | //layer.close(index);//å
³éå¼¹çª |
| | | table.render(option); |
| | | } |
| | | table.render(option); |
| | | layer.closeAll(); |
| | | //layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | obj.update({ |
| | | "HMaterID" :OptionData.HMaterID |
| | | ,"ç©æä»£ç " : OptionData.ç©æä»£ç |
| | | , "ç©æåç§°" :OptionData.ç©æåç§° |
| | | ,"è§æ ¼åå·" : OptionData.è§æ ¼åå· |
| | | ,"HUnitID" :OptionData.HUnitID |
| | | ,"计éåä½" : OptionData.计éåä½åç§° |
| | | }) |
| | | obj.update({ |
| | | "HMaterID": OptionData.HItemID |
| | | , "ç©æä»£ç ": OptionData.ç©æä»£ç |
| | | , "ç©æåç§°": OptionData.ç©æåç§° |
| | | , "è§æ ¼åå·": OptionData.è§æ ¼åå· |
| | | , "HUnitID": OptionData.HUnitID |
| | | , "计éåä½": OptionData.计éåä½åç§° |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | |
| | | } |
| | | }) |
| | | } |
| | | obj.event = ""; |
| | | return false; |
| | | } |
| | | }) |
| | | |
| | | //åå» |
| | | $('.layui-table-box tbody td[data-field="ç©æä»£ç "]').off('dblclick').on('dblclick', function () { |
| | | var HOrgID = $("#HOrgID").val(); |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "ç©æå表" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["90%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Material.html?openType=2&HOrgID=' + HOrgID, 'yes'] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //æé®ä¸ çåè° |
| | | var iframeWindow = window["layui-layer-iframe" + index];//è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//è·åéä¸çæ°æ® |
| | | |
| | | //if (checkStatus.data.length != 1) { |
| | | // return layer.msg("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | //} |
| | | OptionData = checkStatus.data[0]; //æé䏿°æ®çç¬¬ä¸æ¡èµå¼ç»OptionDataåé |
| | | if (checkStatus.data.length > 1) { |
| | | var rowIndex = $(obj.tr).attr("data-index") * 1; |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | if (rowIndex + i >= option.data.length) { |
| | | var NewRow = { |
| | | "HMaterID": 0, "ç©æä»£ç ": "", "ç©æåç§°": "", "è§æ ¼åå·": "", "HUnitID": 0, "计éåä½": "", "HQty": "", "HRemark": "", |
| | | "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "æ¶æä»åº": "", |
| | | "HSPID": 0, "ä»ä½åç§°": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0, |
| | | "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", |
| | | "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | }; |
| | | |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | |
| | | table.render(option); |
| | | } |
| | | |
| | | var HMaterID = checkStatus.data[i].HItemID; |
| | | var resultData = getMaterialByMaterID(HMaterID); |
| | | option.data[rowIndex + i].HMaterID = resultData.HMaterID; |
| | | option.data[rowIndex + i].ç©æä»£ç = resultData.HMaterNumber; |
| | | option.data[rowIndex + i].ç©æåç§° = resultData.HMaterName; |
| | | option.data[rowIndex + i].è§æ ¼åå· = resultData.HMaterModel; |
| | | option.data[rowIndex + i].HUnitID = resultData.HUnitID; |
| | | option.data[rowIndex + i].计éåä½ = resultData.HUnitName; |
| | | ////æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | //obj.update({ |
| | | // "HMaterID": checkStatus.data[0].HItemID |
| | | // , "ç©æä»£ç ": checkStatus.data[0].HNumber |
| | | // , "ç©æåç§°": checkStatus.data[0].HName |
| | | // , "è§æ ¼åå·": checkStatus.data[0].HModel |
| | | // , "HUnitID": checkStatus.data[0].HUnitID |
| | | // , "计éåä½": checkStatus.data[0].HUnitName |
| | | //}) |
| | | //layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | table.render(option); |
| | | } |
| | | layer.closeAll(); |
| | | //layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | obj.update({ |
| | | "HMaterID": OptionData.HItemID |
| | | , "ç©æä»£ç ": OptionData.ç©æä»£ç |
| | | , "ç©æåç§°": OptionData.ç©æåç§° |
| | | , "è§æ ¼åå·": OptionData.è§æ ¼åå· |
| | | , "HUnitID": OptionData.HUnitID |
| | | , "计éåä½": OptionData.计éåä½åç§° |
| | | }) |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | //è¡å
äºä»¶ |
| | |
| | | }) |
| | | switch (type) { |
| | | case '1105': |
| | | return { url: "../../éè´ç®¡ç/æ¶æéç¥å/Cg_POInStockBackBillList.html", name: data[0]["HName"] }; |
| | | return { url: "../../éè´ç®¡ç/éæéç¥å/Cg_POInStockBackBillList.html", name: data[0]["HName"] }; |
| | | break; |
| | | } |
| | | |
| | |
| | | var HOrgID = $("#HOrgID").val(); |
| | | var url = ""; |
| | | if ($("#HSourceBillType").val() == "1105") { |
| | | url = "../../éè´ç®¡ç/æ¶æéç¥å/Cg_POInStockBackBillList.html?openType=2&HOrgID=" + HOrgID; |
| | | url = "../../éè´ç®¡ç/éæéç¥å/Cg_POInStockBackBillList.html?openType=2&HOrgID=" + HOrgID; |
| | | } else { |
| | | return layer.msg('å½å䏿¯æè¯¥æºåéæ©ï¼ï¼'); |
| | | } |
| | |
| | | } |
| | | //#endregion |
| | | //#endregion |
| | | //#region å设置 |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["field"] + ","; |
| | | } |
| | | |
| | | var colTitleName = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colTitleName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | 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.html?HModName=' + HModName + '&colName=' + colName + '&colTitleName = ' + colTitleName, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ°æ® |
| | | function DisPlay_HideColumn() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = [];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | | for (var i = 0; i < option.cols[0].length - 2; i++) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | 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[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | } |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | 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]; |
| | | } |
| | | } |
| | | //åæ¶å»ç»å |
| | | 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"; |
| | | } |
| | | } |
| | | table.render(option); |
| | | } else { |
| | | table.render(option); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //以䏿¯layui模å |
| | | }); |