| | |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <label class="layui-form-label">åæ®å·<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">æ¥æ</label> |
| | | <label class="layui-form-label">æ¥æ<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" style="background-color:#efefef4d;"> |
| | | <input type="date" class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">å
é¨åæ®å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off"> |
| | | <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete=" off" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä¾åºå</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä¸å¡å</label> |
| | | <label class="layui-form-label">ä¸å¡å<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;display:none;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä»åº</label> |
| | | <label class="layui-form-label">é¨é¨<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;display:none;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä¾åºå<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;display:none;"> |
| | | <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-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä»åº<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | |
| | | </button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">éªæ¶å</label> |
| | | <label class="layui-form-label">éæå<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSecManagerName" id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | |
| | | </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="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </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="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" 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-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">æºåç±»å</label> |
| | | </div> |
| | | <div class="layui-row" style="display:none;"> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none;"> |
| | | <label class="layui-form-label">ä¿ç®¡å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType"> |
| | | <!--å¨ææ¸²ææºåç±»å--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">éåå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="" id="" class="layui-input" value="" style="float:left;width:150px;"> |
| | | |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;"> |
| | | <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none;"> |
| | | <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;"> |
| | |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none;"> |
| | | <label class="layui-form-label">æºåç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType"> |
| | | <!--å¨ææ¸²ææºåç±»å--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none;"> |
| | | <label class="layui-form-label">éåå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="" id="" class="layui-input" value="" style="float:left;width:150px;"> |
| | | |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs7 layui-inline"> |
| | | <label class="layui-form-label">æè¦</label> |
| | | <div class="layui-input-block"> |
| | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <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="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> |
| | | <!-- <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"> |
| | |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | get_LoginIs(); |
| | | //è·åç»ç» |
| | | Organ() ; |
| | | Organ(); |
| | | |
| | | //#region ã卿è·å模ååç§°ã |
| | | var HModuleType = "1239"; |
| | |
| | | |
| | | //è·åæºåç±»å |
| | | HSourceBillType(); |
| | | |
| | | //è·å页é¢è·³è½¬åæ° |
| | | |
| | | //è·å页é¢è·³è½¬åæ° |
| | | var params = get_UrlVars(); |
| | | if (typeof (params[params[0]]) == "undefined") { |
| | | OperationType = 1;//æä½ç±»å |
| | |
| | | var HSouceBillType = params[params[2]];//æºåç±»å |
| | | } |
| | | |
| | | // åå§åç |
| | | // åå§åç |
| | | set_InitGrid(); |
| | | |
| | | //#region è·åæå¤§åæ®å· |
| | | //#region è·åæå¤§åæ®å· |
| | | function get_MAXNum() { |
| | | $("#HInterID").val("0"); |
| | | $("#HBillNo").val(""); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json", |
| | | type: "GET", |
| | | data: { "HBillType": '1103' }, |
| | | data: { "HBillType": '1239' }, |
| | | success: function (d) { |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region 夿æä½ç±»åå¹¶åå§åçé¢ |
| | | //#region 夿æä½ç±»åå¹¶åå§åçé¢ |
| | | if (OperationType == 1) { //æ æºåæ°å¢ |
| | | /* $("#HItemID").val(0);*/ |
| | | /* $("#HItemID").val(0);*/ |
| | | |
| | | //çæåæ®å·åå
ç |
| | | get_MAXNum(); |
| | |
| | | |
| | | |
| | | |
| | | //夿æ¯å¦æ°å¢ |
| | | if (linterid == null || linterid == 0) { |
| | | //è·åæå¤§åæ®å· new |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HInterID").val("0"); |
| | | $("#HBillNo").val(""); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '1239' }, |
| | | success: function (d) { |
| | | //console.log(d.data); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HSSDate").val(Format(new Date(), "yyyy-MM-dd")); //ç»ç®æ¹å¼ |
| | | } |
| | | }); |
| | | } else {//å¦æä¿®æ¹åèµ°ä¸é¢ new |
| | | $("#HInterID").val(linterid); |
| | | RoadBillMain(linterid); |
| | | } |
| | | ////夿æ¯å¦æ°å¢ |
| | | //if (linterid == null || linterid == 0) { |
| | | // //è·åæå¤§åæ®å· new |
| | | // $("#HMaker").val(sessionStorage["HUserName"]); |
| | | // $("#HInterID").val("0"); |
| | | // $("#HBillNo").val(""); |
| | | // $.ajax({ |
| | | // url: GetWEBURL() + "/Web/GetMAXNum", |
| | | // type: "GET", |
| | | // data: { "HBillType": '1239' }, |
| | | // success: function (d) { |
| | | // //console.log(d.data); |
| | | // $("#HBillNo").val(d.data[0].HBillNo); |
| | | // $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | // $("#HInterID").val(d.data[0].HInterID); |
| | | // $("#HSSDate").val(Format(new Date(), "yyyy-MM-dd")); //ç»ç®æ¹å¼ |
| | | // } |
| | | // }); |
| | | //} else {//å¦æä¿®æ¹åèµ°ä¸é¢ new |
| | | // $("#HInterID").val(linterid); |
| | | // RoadBillMain(linterid); |
| | | //} |
| | | //#endregion |
| | | //#endregion |
| | | //è·åç»ç» |
| | | //è·åç»ç» |
| | | function Organ() { |
| | | //è·åç»å½é¡µç»ç»å |
| | | $.ajax({ |
| | |
| | | }) |
| | | } |
| | | var rowdata = [{ |
| | | "HMaterID": 0, "ç©æä»£ç ": "", "ç©æåç§°": "", "è§æ ¼åå·": "", "HUnitID": 0, "计éåä½": "", "HQty": "", "HRemark": "", |
| | | "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "æ¶æä»åº": "", |
| | | "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, |
| | |
| | | //æ°å¢è¡è¡¨æ ¼æ°æ® |
| | | var NewRow = { |
| | | "HMaterID": 0, "ç©æä»£ç ": "", "ç©æåç§°": "", "è§æ ¼åå·": "", "HUnitID": 0, "计éåä½": "", "HQty": "", "HRemark": "", |
| | | "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "æ¶æä»åº": "", |
| | | "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, |
| | |
| | | |
| | | layer.msg("æ°é请è¾å
¥å¤§äº0çæ°å!"); |
| | | return; |
| | | } else if (value * 1 > obj.data.HQtyMust * 1) { |
| | | //æ¢å¤æ°æ®å°ç¼è¾å |
| | | obj.update({ |
| | | HQty: oldText |
| | | }); |
| | | table.render(option); |
| | | |
| | | layer.msg("å®éæ°éä¸è½å¤§äºåºéæ°é!"); |
| | | return; |
| | | } |
| | | |
| | | |
| | |
| | | , HPrice: HPrice |
| | | , HMoney: HMoney |
| | | }); |
| | | table.render(option); |
| | | table.render(option); |
| | | break; |
| | | case "HPrice": //åä»· |
| | | //æ°æ®æ ¼å¼æ ¡éª |
| | |
| | | obj.update({ |
| | | HMoney: oldText |
| | | }); |
| | | table.render(option); |
| | | table.render(option); |
| | | |
| | | layer.msg("éé¢è¯·è¾å
¥å¤§äº0çæ°å!"); |
| | | return; |
| | |
| | | }); |
| | | table.render(option); |
| | | break; |
| | | |
| | | |
| | | default: |
| | | } |
| | | }); |
| | |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | |
| | | //æ¥ææ ¼å¼å |
| | | function formatDate(date) { |
| | | var d = new Date(date), |
| | |
| | | , totalRow: true |
| | | , cols: [[ //å表 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', field: 'åºå·', title: 'åºå·', width: 100} |
| | | , { type: 'numbers', field: 'åºå·', title: 'åºå·', width: 100 } |
| | | , { field: 'HSourceBillNo', title: 'æºåå·', width: 100, hide: true }//æºåå· |
| | | , { field: 'HSourceBillType', 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 |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 150, event: "HMaterID" }//f7 |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 150, style: 'background-color:#efefef4d;' } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100, style: 'background-color:#efefef4d;'} |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true } |
| | | , { field: '计éåä½', title: '计éåä½', width: 100, edit: 'text', event: "HUnitID" }//f7 |
| | | , { field: 'HQty', title: '宿¶æ°é', width: 150, edit: 'text', totalRow: true} |
| | | , { field: 'HQtyMust', title: 'åºæ¶æ°é', width: 150, edit: 'text', totalRow: true} |
| | | , { field: 'HPrice', title: 'åä»·', width: 100, edit: 'text' } |
| | | , { field: 'HMoney', title: 'éé¢', width: 100, edit: 'text', totalRow: true } |
| | | , { field: 'HOrderPrice', title: 'éè´éé¢', width: 100, edit: 'text', totalRow: true} |
| | | , { field: '计éåä½', title: '计éåä½', width: 100, event: "HUnitID" }//f7 |
| | | , { field: 'HQty', title: 'å®éæ°é', width: 150, edit: 'text', totalRow: true } |
| | | , { field: 'HQtyMust', title: 'åºéæ°é', width: 150, totalRow: true } |
| | | , { field: 'HPrice', title: 'åä»·', width: 100 } |
| | | , { field: 'HMoney', title: 'éé¢', width: 100, totalRow: true } |
| | | , { field: 'HOrderPrice', title: 'éè´éé¢', width: 100, totalRow: true } |
| | | , { field: 'HWHID ', title: 'HWHID ', width: 100, hide: true } |
| | | , { field: 'æ¶æä»åº', title: 'æ¶æä»åº', width: 100, edit: 'text', event: "HWHID" }//f7 |
| | | , { field: 'åæä»åº', title: 'åæä»åº', width: 100, edit: 'text', event: "HWHID" }//f7 |
| | | , { field: 'HSPID', title: 'HSPID', width: 100, hide: true } |
| | | , { field: 'ä»ä½åç§°', title: 'ä»ä½åç§°', width: 100, edit: 'text', event: "HSPID" }//f7 |
| | | , { field: 'HBatchNo', title: 'æ¹æ¬¡', width: 150, edit: 'text' } |
| | |
| | | , "HMaker": data.å¶å人 |
| | | , "HChecker": data.å®¡æ ¸äºº |
| | | , "HCloseMan": data.å
³é人 |
| | | , "HUpDater": 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") |
| | |
| | | rowdata.push( |
| | | { |
| | | "HMaterID": subdata[i].HMaterID, "ç©æä»£ç ": subdata[i].ç©æä»£ç , "ç©æåç§°": subdata[i].ç©æåç§°, "è§æ ¼åå·": subdata[i].è§æ ¼åå·, "HUnitID": subdata[i].HUnitID, "计éåä½": subdata[i].计éåä½, |
| | | "HQty": subdata[i].宿¶æ°é, "HQtyMust": subdata[i].åºæ¶æ°é,"HRemark": subdata[i].表ä½å¤æ³¨, "HPrice": subdata[i].åä»·, "HMoney": subdata[i].éé¢, "HOrderPrice": subdata[i].éè´éé¢, "HWHID": subdata[i].HWHID, "æ¶æä»åº": subdata[i].æ¶æä»åº, "HSPID": subdata[i].HSPID, "ä»ä½åç§°": subdata[i].ä»ä½åç§°, |
| | | "HQty": subdata[i].宿¶æ°é, "HQtyMust": subdata[i].åºæ¶æ°é, "HRemark": subdata[i].表ä½å¤æ³¨, "HPrice": subdata[i].åä»·, "HMoney": subdata[i].éé¢, "HOrderPrice": subdata[i].éè´éé¢, "HWHID": subdata[i].HWHID, "åæä»åº": subdata[i].æ¶æä»åº, "HSPID": subdata[i].HSPID, "ä»ä½åç§°": subdata[i].ä»ä½åç§°, |
| | | "HBatchNo": subdata[i].æ¹æ¬¡, |
| | | "HSourceBillNo": subdata[i].æºååå·, //æºåå· |
| | | "HSourceBillType": subdata[i].æºåç±»å, //æºåç±»å |
| | |
| | | } |
| | | }); |
| | | |
| | | //#region ä¿åæé® |
| | | //#region ä¿åæé® |
| | | form.on('submit(Saver)', function (data) { |
| | | //#region 夿æºåç¶æ |
| | | if (OperationType == 1 || OperationType == 4) { |
| | | |
| | | |
| | | if ($("#HSourceBillType").val() == "1105") { |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | var HSourceBillData = ""; |
| | |
| | | return; |
| | | } |
| | | } |
| | | } else if ($("#HSourceBillType").val() == "1201") { |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | var HSourceBillData = ""; |
| | | var HSourceBillData = getPushSource_POStockInBillInit(option.data[i].HSourceInterID, option.data[i].HSourceEntryID); //è·åæºåæ°æ® |
| | | if (HSourceBillData != "none") { |
| | | if (HSourceBillData == null) { |
| | | layer.alert("ä¿å失败!第" + (i + 1) + "è¡ï¼æªæ¥è¯¢å°æºååæ®!", { icon: 5 }); |
| | | return; |
| | | } |
| | | //else if (HSourceBillData.ç¶æ != "å·²å®¡æ ¸") { |
| | | // var err = "ä¿å失败!åå ï¼ç¬¬" + (i + 1) + "è¡-æºååæ®ç¶æä¸ºâ" + HSourceBillData.ç¶æ + "âï¼ä¸å
许ä¿åï¼"; |
| | | // layer.alert(err, { icon: 5 }); |
| | | // return; |
| | | //} else if (HSourceBillData.è¡ç¶æ == "å·²å
³é") { |
| | | // layer.alert("ä¿å失败!第" + (i + 1) + "è¡ï¼è¯¥è¡è®°å½è¡ç¶æä¸º'å·²å
³é'ç¶æ!", { icon: 5 }); |
| | | // return; |
| | | //} |
| | | } else { |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | else { |
| | | return layer.msg('å½å䏿¯æè¯¥æºåï¼ï¼'); |
| | |
| | | //#endregion |
| | | |
| | | //if (AllowLoadData(data)) { |
| | | set_SaveBill(data); |
| | | set_SaveBill(data); |
| | | //} |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region è·ååæ°_ä¼ éçJSONæ ¼å¼åæ° |
| | | |
| | | //#region è·ååæ°_ä¼ éçJSONæ ¼å¼åæ° |
| | | function getUrlVars_JSON() { |
| | | var datajson; |
| | | var str = window.location.search; //è·å龿¥ä¸ä¼ éçåæ° |
| | | var arr = str.substring(str.lastIndexOf("=")+1); |
| | | var arr = str.substring(str.lastIndexOf("=") + 1); |
| | | datajson = $.parseJSON(decodeURI(arr)); |
| | | return datajson; |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region 䏿¨é¡µé¢åå§å |
| | | //#region 䏿¨é¡µé¢åå§å |
| | | function setInit_PushBill() { |
| | | //çæåæ®å·åå
ç |
| | | //çæåæ®å·åå
ç |
| | | get_MAXNum(); |
| | | |
| | | //åå§åæ¥æãå¶å人ãå¶åæ¥æ |
| | |
| | | //ç¦ç¨ç»ç»é项 |
| | | $("#HOrgID").attr("disabled", true); |
| | | |
| | | //è·å |
| | | var data = getUrlVars_JSON().data; |
| | | var dataArray = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | var temp = getPushSource_POInStockBackInit(data[i].hmainid, data[i].hsubid); |
| | | if (temp != "none") { |
| | | dataArray.push(temp); |
| | | } else { |
| | | return; |
| | | } |
| | | if (HSouceBillType == "1105") { |
| | | setInit_PushBill_ByPOInStockBackBill(); |
| | | } else if (HSouceBillType == "1201") { |
| | | setInit_PushBill_ByPOStockInBillInit(); |
| | | } |
| | | } |
| | | |
| | | |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HMainSourceInterID": "0" |
| | | , "HMainSourceEntryID": "0" |
| | | , "HMainSourceBillNo": "" |
| | | , "HMainSourceBillType": $("#BillType").val() |
| | | |
| | | , "HDeptID": dataArray[0].HDeptID |
| | | , "HDeptName": dataArray[0].é¨é¨ |
| | | , "HManagerID": dataArray[0].HManagerID |
| | | , "HManagerName": dataArray[0].主管 |
| | | , "HWHID": dataArray[0].主表ä»åºID == null ? 0 : dataArray[0].主表ä»åºID |
| | | , "HWHName": dataArray[0].主表ä»åº |
| | | , "HEmpID": dataArray[0].HEmpID |
| | | , "HEmpName": dataArray[0].ä¸å¡å |
| | | , "HSupID": dataArray[0].HSupID |
| | | , "HSupName": dataArray[0].ä¾åºå |
| | | //, "HSecManagerID": dataArray[0].HSecManagerID |
| | | //, "HSecManagerName": dataArray[0].éªæ¶å |
| | | //, "HKeeperID": dataArray[0].HKeeperID |
| | | //, "HKeeperName": dataArray[0].ä¿ç®¡å |
| | | , "HCurID": dataArray[0].HCurID |
| | | , "HCurName": dataArray[0].å¸å« |
| | | , "HExRate": dataArray[0].æ±ç |
| | | , "HAddress": data.交货å°ç¹ |
| | | , "HRemark": data.è¡¨å¤´å¤æ³¨ |
| | | , "HInnerBillNo": data.å
é¨åæ®å· |
| | | }); |
| | | |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | for (var i = 0; i < dataArray.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | "HMaterID": dataArray[i].HMaterID |
| | | , "ç©æä»£ç ": dataArray[i].ç©æä»£ç |
| | | , "ç©æåç§°": dataArray[i].ç©æåç§° |
| | | , "è§æ ¼åå·": dataArray[i].è§æ ¼åå· |
| | | , "HUnitID": dataArray[i].HUnitID |
| | | , "计éåä½": dataArray[i].计éåä½ |
| | | , "HWHID": dataArray[i].HWHID |
| | | , "æ¶æä»åº": dataArray[i].æ¶æä»åº |
| | | , "HSPID": dataArray[i].HSPID |
| | | , "ä»ä½åç§°": dataArray[i].ä»ä½åç§° |
| | | , "HSecUnitID": dataArray[i].HSecUnitID |
| | | , "è¾
å©åä½": dataArray[i].è¾
å©åä½ |
| | | , "HQty": dealDoubleToFixed(dataArray[i].æ°é, 1) |
| | | , "HQtyMust": dealDoubleToFixed(dataArray[i].æ°é, 1) |
| | | , "HPrice": dealDoubleToFixed(dataArray[i].åä»·, 3) |
| | | , 'HDiscountRate': dataArray[i].ææ£ç // |
| | | , 'HRelTaxPrice': "0" |
| | | , "HTaxRate": dataArray[i].ç¨ç |
| | | , 'HTaxMoney': dataArray[i].ç¨é¢ // |
| | | , "HMoney": dealDoubleToFixed(dataArray[i].éé¢, 2) |
| | | , "HRemark": dataArray[i].表ä½å¤æ³¨ |
| | | |
| | | , "HSourceInterID": dataArray[i].hmainid |
| | | , "HSourceEntryID": dataArray[i].hsubid |
| | | , "HSourceBillNo": dataArray[i].åæ®å· |
| | | , "HSourceBillType": dataArray[i].HBillType |
| | | , "HRelationQty": "0" |
| | | , "HRelationMoney": "0" |
| | | |
| | | , 'HPOOrderInterID': "0" |
| | | , 'HPOOrderEntryID': "0" |
| | | , 'HPOOrderBillNo': "" |
| | | |
| | | , 'HSeOrderTaxPrice': dealDoubleToFixed(dataArray[i].å«ç¨åä»·, 3) |
| | | , "HSeOrderInterID": dataArray[i].hmainid |
| | | , "HSeOrderEntryID": dataArray[i].hsubid |
| | | , "HSeOrderBillNo": dataArray[i].åæ®å· |
| | | } |
| | | ); |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //#region ä¿åæ¹æ³ |
| | |
| | | // layer.msg("è¯·éæ©ä¿ç®¡åï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | | //} |
| | | //if ($("#HSecManagerID").val() == 0) { |
| | | // layer.msg("è¯·éæ©éªæ¶åï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | | //} |
| | | if ($("#HSecManagerID").val() == 0) { |
| | | layer.msg("è¯·éæ©éæåï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | |
| | | |
| | | var num = []; |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region åå®¡æ ¸/å®¡æ ¸æ°æ® |
| | | //#region åå®¡æ ¸/å®¡æ ¸æ°æ® |
| | | function set_CheckBill(num) { |
| | | var InterID = $("#HInterID").val(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | |
| | | if (rowIndex + i >= option.data.length) { |
| | | var NewRow = { |
| | | "HMaterID": 0, "ç©æä»£ç ": "", "ç©æåç§°": "", "è§æ ¼åå·": "", "HUnitID": 0, "计éåä½": "", "HQty": "", "HRemark": "", |
| | | "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "æ¶æä»åº": "", |
| | | "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, |
| | |
| | | }) |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , end: function () { |
| | | obj.update({ |
| | | "HUnitID": OptionData.HItemID |
| | | , "计éåä½": OptionData.计éåä½åç§° |
| | | }) |
| | | } |
| | | , end: function () { |
| | | obj.update({ |
| | | "HUnitID": OptionData.HItemID |
| | | , "计éåä½": OptionData.计éåä½åç§° |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | //æ¶æä»åº |
| | |
| | | } |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | obj.update({ |
| | | "æ¶æä»åº": checkStatus.data[0].ä»åºåç§° |
| | | "åæä»åº": checkStatus.data[0].ä»åºåç§° |
| | | , "HWHID": checkStatus.data[0].HItemID |
| | | }) |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , end: function () { |
| | | obj.update({ |
| | | "HWHID": OptionData.HItemID |
| | | , "æ¶æä»åº": OptionData.ä»åºåç§° |
| | | }) |
| | | } |
| | | , end: function () { |
| | | obj.update({ |
| | | "HWHID": OptionData.HItemID |
| | | , "åæä»åº": OptionData.ä»åºåç§° |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | //ä»ä½ |
| | |
| | | }) |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , end: function () { |
| | | obj.update({ |
| | | "HSPID": OptionData.HMainID |
| | | , "ä»ä½åç§°": OptionData.ä»ä½åç§° |
| | | }) |
| | | } |
| | | , end: function () { |
| | | obj.update({ |
| | | "HSPID": OptionData.HMainID |
| | | , "ä»ä½åç§°": OptionData.ä»ä½åç§° |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | obj.event = ""; |
| | |
| | | if (rowIndex + i >= option.data.length) { |
| | | var NewRow = { |
| | | "HMaterID": 0, "ç©æä»£ç ": "", "ç©æåç§°": "", "è§æ ¼åå·": "", "HUnitID": 0, "计éåä½": "", "HQty": "", "HRemark": "", |
| | | "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "æ¶æä»åº": "", |
| | | "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, |
| | |
| | | for (var i = 0; i < ProcessNumber.length; i++) { |
| | | option.data.push({ |
| | | "HMaterID": checkStatus.data[j].HMaterID, "ç©æä»£ç ": checkStatus.data[j].ç©æä»£ç , "ç©æåç§°": checkStatus.data[j].ç©æåç§°, "è§æ ¼åå·": checkStatus.data[j].è§æ ¼åå·, |
| | | "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, |
| | | "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, |
| | | "HQty": checkStatus.data[j].æ°é - checkStatus.data[j].å
³èæ°é, "HQtyMust": checkStatus.data[j].æ°é - checkStatus.data[j].å
³èæ°é, "HPrice": checkStatus.data[j].åä»·, |
| | | "HMoney": (checkStatus.data[j].æ°é - checkStatus.data[j].å
³èæ°é) * Number(checkStatus.data[j].åä»·), "HTaxRate": checkStatus.data[j].ç¨ç, "HTaxMoney": checkStatus.data[j].ç¨é¢, "HWHID": checkStatus.data[j].HWHID, |
| | | "æ¶æä»åº": checkStatus.data[j].æ¶æä»åº,"HSPID": checkStatus.data[j].HSPID,"ä»ä½åç§°": checkStatus.data[j].ä»ä½åç§°,"HSecUnitID": checkStatus.data[j].HSecUnitID,"è¾
å©åä½": checkStatus.data[j].è¾
å©åä½, |
| | | "åæä»åº": checkStatus.data[j].æ¶æä»åº, "HSPID": checkStatus.data[j].HSPID, "ä»ä½åç§°": checkStatus.data[j].ä»ä½åç§°, "HSecUnitID": checkStatus.data[j].HSecUnitID, "è¾
å©åä½": checkStatus.data[j].è¾
å©åä½, |
| | | "HSourceBillNo": checkStatus.data[j].åæ®å·, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid |
| | | }) |
| | | j++; |
| | |
| | | }); |
| | | }); |
| | | |
| | | //夿æéçä¸è¡¨æ ¼æ¯å¦æé夿°æ® |
| | | //夿æéçä¸è¡¨æ ¼æ¯å¦æé夿°æ® |
| | | function checkDuplicateData(data) { |
| | | const duplicates = []; |
| | | |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region è·åæºåç±»å |
| | | |
| | | //#region è·åæºåç±»å |
| | | function HSourceBillType() { |
| | | var HName = 'éè´éæå'; |
| | | //è·åç»å½é¡µç»ç»å |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ ¹æ®ä¸»å
ç ä¸åå
ç è·åæºåéæéç¥åæ°æ® |
| | | //#region 䏿¨é¡µé¢åå§å-éæéç¥å |
| | | function setInit_PushBill_ByPOInStockBackBill() { |
| | | //è·å |
| | | var data = getUrlVars_JSON().data; |
| | | var dataArray = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | var temp = getPushSource_POInStockBackInit(data[i].hmainid, data[i].hsubid); |
| | | if (temp != "none") { |
| | | dataArray.push(temp); |
| | | } else { |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HMainSourceInterID": "0" |
| | | , "HMainSourceEntryID": "0" |
| | | , "HMainSourceBillNo": "" |
| | | , "HMainSourceBillType": $("#BillType").val() |
| | | |
| | | , "HDeptID": dataArray[0].HDeptID |
| | | , "HDeptName": dataArray[0].é¨é¨ |
| | | , "HManagerID": dataArray[0].HManagerID |
| | | , "HManagerName": dataArray[0].主管 |
| | | , "HWHID": dataArray[0].主表ä»åºID == null ? 0 : dataArray[0].主表ä»åºID |
| | | , "HWHName": dataArray[0].主表ä»åº |
| | | , "HEmpID": dataArray[0].HEmpID |
| | | , "HEmpName": dataArray[0].ä¸å¡å |
| | | , "HSupID": dataArray[0].HSupID |
| | | , "HSupName": dataArray[0].ä¾åºå |
| | | //, "HSecManagerID": dataArray[0].HSecManagerID |
| | | //, "HSecManagerName": dataArray[0].éªæ¶å |
| | | //, "HKeeperID": dataArray[0].HKeeperID |
| | | //, "HKeeperName": dataArray[0].ä¿ç®¡å |
| | | , "HCurID": dataArray[0].HCurID |
| | | , "HCurName": dataArray[0].å¸å« |
| | | , "HExRate": dataArray[0].æ±ç |
| | | , "HAddress": data.交货å°ç¹ |
| | | , "HRemark": data.è¡¨å¤´å¤æ³¨ |
| | | , "HInnerBillNo": data.å
é¨åæ®å· |
| | | }); |
| | | |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | for (var i = 0; i < dataArray.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | "HMaterID": dataArray[i].HMaterID |
| | | , "ç©æä»£ç ": dataArray[i].ç©æä»£ç |
| | | , "ç©æåç§°": dataArray[i].ç©æåç§° |
| | | , "è§æ ¼åå·": dataArray[i].è§æ ¼åå· |
| | | , "HUnitID": dataArray[i].HUnitID |
| | | , "计éåä½": dataArray[i].计éåä½ |
| | | , "HWHID": dataArray[i].HWHID |
| | | , "åæä»åº": dataArray[i].æ¶æä»åº |
| | | , "HSPID": dataArray[i].HSPID |
| | | , "ä»ä½åç§°": dataArray[i].ä»ä½åç§° |
| | | , "HSecUnitID": dataArray[i].HSecUnitID |
| | | , "è¾
å©åä½": dataArray[i].è¾
å©åä½ |
| | | , "HQty": dealDoubleToFixed(dataArray[i].æ°é, 1) |
| | | , "HQtyMust": dealDoubleToFixed(dataArray[i].æ°é, 1) |
| | | , "HPrice": dealDoubleToFixed(dataArray[i].åä»·, 3) |
| | | , 'HDiscountRate': dataArray[i].ææ£ç // |
| | | , 'HRelTaxPrice': "0" |
| | | , "HTaxRate": dataArray[i].ç¨ç |
| | | , 'HTaxMoney': dataArray[i].ç¨é¢ // |
| | | , "HMoney": dealDoubleToFixed(dataArray[i].éé¢, 2) |
| | | , "HRemark": dataArray[i].表ä½å¤æ³¨ |
| | | |
| | | , "HSourceInterID": dataArray[i].hmainid |
| | | , "HSourceEntryID": dataArray[i].hsubid |
| | | , "HSourceBillNo": dataArray[i].åæ®å· |
| | | , "HSourceBillType": dataArray[i].HBillType |
| | | , "HRelationQty": "0" |
| | | , "HRelationMoney": "0" |
| | | |
| | | , 'HPOOrderInterID': "0" |
| | | , 'HPOOrderEntryID': "0" |
| | | , 'HPOOrderBillNo': "" |
| | | |
| | | , 'HSeOrderTaxPrice': dealDoubleToFixed(dataArray[i].å«ç¨åä»·, 3) |
| | | , "HSeOrderInterID": dataArray[i].hmainid |
| | | , "HSeOrderEntryID": dataArray[i].hsubid |
| | | , "HSeOrderBillNo": dataArray[i].åæ®å· |
| | | } |
| | | ); |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ ¹æ®ä¸»å
ç ä¸åå
ç è·åæºåéæéç¥åæ°æ® |
| | | function getPushSource_POInStockBackInit(HSourceInterID, HSourceEntryID) { |
| | | var res = "none"; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Cg_POInStockBackBill/loadCg_POInStockBackBill_Push", |
| | | async: false, |
| | | type: "GET", |
| | | data: { |
| | | "HInterID": HSourceInterID |
| | | , "HSubID": HSourceEntryID |
| | | }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | res = result.data[0]; |
| | | } else { |
| | | res = result.data; |
| | | //layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | res = "none"; |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | return res; |
| | | } |
| | | //#endregion |
| | | |
| | | //#region 䏿¨é¡µé¢åå§å-éè´å
¥åºå |
| | | function setInit_PushBill_ByPOStockInBillInit() { |
| | | //è·å |
| | | var data = getUrlVars_JSON().data; |
| | | var dataArray = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | var temp = getPushSource_POStockInBillInit(data[i].hmainid, data[i].hsubid); |
| | | if (temp != "none") { |
| | | dataArray.push(temp); |
| | | } else { |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HInnerBillNo": dataArray[0].å
é¨åæ®å· |
| | | , "HSupID": dataArray[0].HSupID |
| | | , "HSupName": dataArray[0].ä¾åºå |
| | | , "HEmpID": dataArray[0].HEmpID |
| | | , "HEmpName": dataArray[0].ä¸å¡å |
| | | , "HWHID": dataArray[0].主表ä»åºID |
| | | , "HWHName": dataArray[0].主表ä»åº |
| | | //, "HSecManagerID": data.HSecManagerID |
| | | //, "HSecManagerName": data.éªæ¶å |
| | | , "HKeeperID": dataArray[0].HKeeperID |
| | | , "HKeeperName": dataArray[0].ä¿ç®¡å |
| | | , "HDeptName": dataArray[0].é¨é¨ |
| | | , "HDeptID": dataArray[0].HDeptID |
| | | //, "HSourceBillType": data.æºåç±»å |
| | | , "HManagerID": dataArray[0].HManagerID |
| | | , "HManagerName": dataArray[0].è´è´£äºº |
| | | , "HExRate": dataArray[0].æ±ç |
| | | //, "Box2": "" |
| | | //, "HExplanation": data.æè¦ |
| | | //, "HRemark": data.è¡¨å¤´å¤æ³¨ |
| | | |
| | | , "HSourceBillType": HSouceBillType |
| | | }); |
| | | |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | for (var i = 0; i < dataArray.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | "HMaterID": dataArray[i].HMaterID |
| | | , "ç©æä»£ç ": dataArray[i].ç©æä»£ç |
| | | , "ç©æåç§°": dataArray[i].ç©æåç§° |
| | | , "è§æ ¼åå·": dataArray[i].è§æ ¼åå· |
| | | , "HUnitID": dataArray[i].HUnitID |
| | | , "计éåä½": dataArray[i].计éåä½ |
| | | |
| | | |
| | | , "HWHID": dataArray[i].HWHID |
| | | , "åæä»åº": dataArray[i].æ¶æä»åº |
| | | , "HSPID": dataArray[i].HSPID |
| | | , "ä»ä½åç§°": dataArray[i].ä»ä½åç§° |
| | | //, "HSecUnitID": dataArray[i].HSecUnitID |
| | | //, "è¾
å©åä½": dataArray[i].è¾
å©åä½ |
| | | |
| | | |
| | | , "HQty": dealDoubleToFixed(dataArray[i].宿¶æ°é, 1) - dealDoubleToFixed(dataArray[i].å
³èæ°é, 1) |
| | | , "HQtyMust": dealDoubleToFixed(dataArray[i].宿¶æ°é, 1) - dealDoubleToFixed(dataArray[i].å
³èæ°é, 1) |
| | | |
| | | |
| | | , "HPrice": dealDoubleToFixed(dataArray[i].åä»·, 3) |
| | | , "HMoney": dealDoubleToFixed(dataArray[i].éé¢, 2) |
| | | , "HOrderPrice": dataArray[i].éè´éé¢ |
| | | , "HRemark": dataArray[i].表ä½å¤æ³¨ |
| | | , "HBatchNo": dataArray[i].æ¹æ¬¡ |
| | | |
| | | , "HSourceInterID": dataArray[i].hmainid |
| | | , "HSourceEntryID": dataArray[i].hsubid |
| | | , "HSourceBillNo": dataArray[i].åæ®å· |
| | | , "HSourceBillType": dataArray[i].HBillType |
| | | , "HRelationQty": "0" |
| | | , "HRelationMoney": "0" |
| | | } |
| | | ); |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ ¹æ®ä¸»å
ç ä¸åå
ç è·åæºåéè´å
¥åºåæ°æ® |
| | | function getPushSource_POStockInBillInit(HSourceInterID, HSourceEntryID) { |
| | | var res = "none"; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Kf_POStockInBill/loadKf_POStockInBillEdit_Push", |
| | | async: false, |
| | | type: "GET", |
| | | data: { |
| | |
| | | } |
| | | |
| | | |
| | | //åå»è¿åç©æ |
| | | function GetGyMaterial(data) { |
| | | OptionData = data |
| | | } |
| | | //åå»è¿å计éåä½ |
| | | function GetGyUnit(data) { |
| | | OptionData = data |
| | | } |
| | | //åå»è¿åç©æ |
| | | function GetGyMaterial(data) { |
| | | OptionData = data |
| | | } |
| | | //åå»è¿å计éåä½ |
| | | function GetGyUnit(data) { |
| | | OptionData = data |
| | | } |
| | | |
| | | //åå»è¿åæ¶æä»åº |
| | | function GetGyWarehouse(data) { |
| | | OptionData = data |
| | | } |
| | | //åå»è¿åæ¶æä»åº |
| | | function GetGyWarehouse(data) { |
| | | OptionData = data |
| | | } |
| | | |
| | | |
| | | //åå»è¿åæ¶æä»ä½ |
| | | function GetGyStockPlace(data) { |
| | | OptionData = data |
| | | } |
| | | function GetGyStockPlace(data) { |
| | | OptionData = data |
| | | } |
| | | |
| | | //#region å¤çå°æ°æ¾ç¤ºä½æ°ï¼dataï¼éè¦å¤ççæ°æ®ï¼numï¼æ°æ®çç±»å(å¦1:æ°éï¼2:éé¢ï¼3:åä»·)ï¼ |
| | | //#region å¤çå°æ°æ¾ç¤ºä½æ°ï¼dataï¼éè¦å¤ççæ°æ®ï¼numï¼æ°æ®çç±»å(å¦1:æ°éï¼2:éé¢ï¼3:åä»·)ï¼ |
| | | function dealDoubleToFixed(data, num) { |
| | | //ç¨äºè®¾ç½®å°æ°ä½æ° |
| | | var dotLength = 0; |
| | |
| | | } |
| | | } |
| | | } |
| | | //#endregion |
| | | //#endregion |
| | | </script> |
| | | </body> |
| | | </html> |