| | |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../layuiadmin/PageTitle.js"></script> |
| | | <style> |
| | | .main-btn { /*头é¨ä¸»æé®*/ |
| | | padding: 0 2px; /*è°æ´æé®å·¦å³ç©ºé大å°*/ |
| | |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="btnSave" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btnSave">ä¿å</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" id="set_CheckBill" lay-filter="set_CheckBill">å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn-print">æå°</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn_print">æå°</button>--> |
| | | <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">éèå设置</button>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-POStockInBill"> |
| | | <h1 style="text-align:center;"><b>å·¥åºè¿å·¥ç³è¯·</b></h1> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1" style="padding:1px;" class="layui-this">åºæ¬ä¿¡æ¯</li> |
| | | <li lay-id="2" style="padding:1px;">å
¶ä»ä¿¡æ¯</li> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">è´è´£äºº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HEmpName" id="HEmpName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHEmpID" id="btnHEmpID" 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-xs3 layui-inline"> |
| | | <label class="layui-form-label">æµè½¬å¡</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;" readonly> |
| | |
| | | <input type="hidden" name="HProcExchEntryID" id="HProcExchEntryID" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 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="HWorkShopName" id="HWorkShopName" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HWorkShopID" id="HWorkShopID" value="0"> |
| | | <select name="HBillOperationType" id="HBillOperationType" lay-filter="HBillOperationType" style="width: 120px; " disabled> |
| | | <option style="color:blue;" value="1">å¢å </option> |
| | | <option style="color:blue;" value="2">å é¤</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç©æä»£ç </label> |
| | | <div class="layui-input-inline"> |
| | |
| | | <input type="text" class="layui-input" name="HModel" id="HModel" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">计éåä½</label> |
| | | <div class="layui-input-inline"> |
| | |
| | | <input type="hidden" name="HUnitID" id="HUnitID" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">è®¢åæ°é</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HPlanQty" id="HPlanQty" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HPlanQty" id="HPlanQty" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">è¿å·¥æ°é</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HQty" id="HQty" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HQty" id="HQty" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">å¼å§å·¥åº</label> |
| | | <div class="layui-input-inline"> |
| | |
| | | <input type="hidden" name="HProcEndID" id="HProcEndID" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">å¼å§æµæ°´å·</label> |
| | | <div class="layui-input-inline"> |
| | |
| | | <input type="text" class="layui-input" name="HProcExchEndNO" id="HProcExchEndNO" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç产ç»ç»</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HPRDORGName" id="HPRDORGName" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HPRDORGID" id="HPRDORGID" lay-verify="HPRDORGID"><!--HSTOCKORGID--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç产订å</label> |
| | | <div class="layui-input-inline"> |
| | |
| | | <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" lay-verify="HICMOEntryID"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">订åè·è¸ªå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">å
é¨åæ®å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HInnerBillNo" id="HInnerBillNo"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs6 layui-inline"> |
| | | <label class="layui-form-label" style="width:12.5%">夿³¨</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="请è¾å
¥å
容" onmouseover="this.title=this.value" style="width:610px;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç产ç»ç»</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HPRDORGName" id="HPRDORGName" style="background-color: #efefef4d; width: 610px; " readonly> |
| | | <input type="hidden" name="HPRDORGID" id="HPRDORGID" lay-verify="HPRDORGID"><!--HSTOCKORGID--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <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;"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">è´è´£äºº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HEmpName" id="HEmpName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHEmpID" id="btnHEmpID" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 83px;">ç产车é´</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HWorkShopName" id="HWorkShopName" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HWorkShopID" id="HWorkShopID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 78px;">订åè·è¸ªå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 78px;">å
é¨åæ®å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HInnerBillNo" id="HInnerBillNo"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <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-Up"><i class="layui-icon layui-icon-form"></i>ä¸ç§»</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Under"><i class="layui-icon layui-icon-form"></i>ä¸ç§»</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //#region ã卿è·å模ååç§°ã |
| | | var HModuleType = "3796"; |
| | | //éè¿åæ®ç±»åï¼ä»æ°æ®åºå¨æè·ååæ®æ¨¡åå½å,å¼ç¨jsæä»¶ PageTitle.js |
| | | var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType); |
| | | $("h1").html('<b>' + HPageTitle + '</b>'); |
| | | //#endregion |
| | | |
| | | |
| | | var params = get_UrlVars(); |
| | |
| | | var OperationType = params[params[0]];//æä½ç±»å |
| | | var linterid = params[params[1]];//æºåid |
| | | var HEntryID = params[params[2]];//æµæ°´å· |
| | | var HBillOperationType_temp = params[params[3]]; //æä½ç±»å[å¢å ãå é¤] |
| | | } |
| | | |
| | | //å·¥åºè¿å·¥æ°å¢ |
| | |
| | | } |
| | | }); |
| | | |
| | | //æ¥è¯¢å·¥åºæµè½¬å¡ |
| | | get_ProcessExchange(); |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | $("#HBillOperationType").val(HBillOperationType_temp); |
| | | form.render("select"); |
| | | |
| | | if (HBillOperationType_temp == "1") { //æä½ç±»åï¼å¢å |
| | | //æ¥è¯¢å·¥åºæµè½¬å¡ |
| | | get_ProcessExchange(); |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | } else if (HBillOperationType_temp == "2") { //æä½ç±»åï¼å é¤ |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | //æ¥è¯¢å·¥åºæµè½¬å¡_å é¤ |
| | | get_ProcessExchange_Delete(); |
| | | } |
| | | } else if (OperationType == 3) { |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | |
| | | "HCenterID": 0, "HCenterNumber": "", "HCenterName": "", |
| | | "HDeptID": 0, "HDeptNumber": "", "HDeptName": "", |
| | | "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false", |
| | | "HQty": $("#HQty").val(), "HRemark": "" |
| | | "HQty": $("#HQty").val(), "HRemark": "","HSourceInterID": "0","HSourceEntryID": "0" |
| | | }; |
| | | switch (obj.event) { |
| | | case 'btn-AddLine': |
| | | if (HBillOperationType_temp == "2") { |
| | | layer.msg("æä½ç±»å为å 餿¶ï¼ä¸è½è¿è¡ å¢å ä¸è¡ æä½ï¼"); |
| | | return; |
| | | } |
| | | |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | |
| | | form.render('select'); |
| | | break; |
| | | case 'btn-CopyLine': |
| | | if (HBillOperationType_temp == "2") { |
| | | layer.msg("æä½ç±»å为å 餿¶ï¼ä¸è½è¿è¡å¤å¶æä½ï¼"); |
| | | return; |
| | | } |
| | | |
| | | var copydata = JSON.stringify(data); |
| | | if (data.length <= 0) { |
| | | layer.msg("è¯·éæ©éè¦å¤å¶çä¸è¡ï¼"); |
| | |
| | | $('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | } |
| | | break; |
| | | //ä¸ç§» |
| | | case 'btn-Up': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (data.length == 1) { |
| | | var tables = []; |
| | | //è·åè¡¨æ ¼çå
¨é¨è¡ |
| | | var rowList = table.cache['mainTable']; |
| | | for (var i = 0; i < rowList.length; i++) { //éåè¡¨æ ¼çè¡ |
| | | if (rowList[i].LAY_CHECKED == true) { //è·åéä¸è¡çä½ç½® |
| | | //妿æ¯ç¬¬ä¸è¡ä¸ç§»ï¼å失败并æé |
| | | if (i == 0) { |
| | | layer.msg("第ä¸è¡æ°æ®æ æ³ä¸ç§»ï¼"); |
| | | return; |
| | | } |
| | | |
| | | //ä¸ä¸ä¸è¡äº¤æ¢HProcNoæµæ°´å· |
| | | var temp = data[0].HProcNo; |
| | | data[0].HProcNo = option.data[i - 1].HProcNo; |
| | | option.data[i - 1].HProcNo = temp; |
| | | |
| | | tables.push(option.data[i - 1]); |
| | | data[0].LAY_CHECKED = true; |
| | | option.data[i - 1] = data[0]; |
| | | option.data[i] = tables[0]; |
| | | table.render(option); |
| | | break; |
| | | } |
| | | } |
| | | } else { |
| | | layer.msg("è¯·éæ©ä¸è¡æ°æ®ï¼"); |
| | | } |
| | | break; |
| | | //ä¸ç§» |
| | | case 'btn-Under': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (data.length == 1) { |
| | | var tables = []; |
| | | //è·åè¡¨æ ¼çå
¨é¨è¡ |
| | | var rowList = table.cache['mainTable']; |
| | | for (var i = 0; i < rowList.length; i++) { //éåè¡¨æ ¼çè¡ |
| | | if (rowList[i].LAY_CHECKED == true) { //è·åéä¸è¡çä½ç½® |
| | | //å¦ææ¯æåä¸è¡ä¸ç§»ï¼å失败并æé |
| | | if (i == option.data.length - 1) { |
| | | layer.msg("æåä¸è¡æ°æ®æ æ³ä¸ç§»ï¼"); |
| | | return; |
| | | } |
| | | |
| | | var temp = data[0].HProcNo; |
| | | data[0].HProcNo = option.data[i + 1].HProcNo; |
| | | option.data[i + 1].HProcNo = temp; |
| | | |
| | | tables.push(option.data[i + 1]); |
| | | data[0].LAY_CHECKED = true; |
| | | option.data[i + 1] = data[0]; |
| | | option.data[i] = tables[0]; |
| | | table.render(option); |
| | | |
| | | break; |
| | | } |
| | | } |
| | | } else { |
| | | layer.msg("è¯·éæ©ä¸è¡æ°æ®ï¼"); |
| | | } |
| | | break; |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_ProcList.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/ç产åºç¡èµæ/Gy_Process.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index]; |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | if (checkStatus.data.length == 0) { |
| | | return layer.msg("请è³å°éæ©ä¸æ¡æ°æ®!"); |
| | | } |
| | | obj.update({ |
| | | HProcName: checkStatus.data[0].å·¥åº |
| | | , HProcID: checkStatus.data[0].HItemID |
| | | , HProcNumber: checkStatus.data[0].å·¥åºä»£ç |
| | | |
| | | //è·åå·¥åºä»£ç |
| | | var ProcessNumber = []; |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | ProcessNumber.push("'" + checkStatus.data[i]["å·¥åºä»£ç "] + "'"); |
| | | } |
| | | |
| | | //è·åå½åä½ç½®æå¨è¡æ° |
| | | var NowNum = 0; |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | if (obj.data["HProcNo"] == option.data[i]["HProcNo"]) { |
| | | NowNum = i + 1; |
| | | } |
| | | } |
| | | |
| | | //æ¥è¯¢å·¥ä½ä¸å¿çæ°æ® |
| | | var WorkCente = []; |
| | | var sWhere = "select isnull(a.HItemID,'') HCenterID, isnull(a.HNumber,'') å·¥ä½ä¸å¿ä»£ç , isnull(a.HName,'') å·¥ä½ä¸å¿åç§° ,p.HItemID HProcID,p.HName å·¥åºåç§°,p.HNumber å·¥åºä»£ç from Gy_Process p left join Gy_WorkCenter a on p.HWorkCenterID=a.HItemID where p.HNumber in (" + ProcessNumber.toString() + ") order by p.HNumber "; |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | WorkCente = data.data; |
| | | } |
| | | else { |
| | | layer.msg(data.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | layer.msg("é误:" + err, { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | |
| | | //å¤æéæ©çæ°æ®æ»æ° æ¯å¦å¤§äºè¡¨æ ¼ç°æçæ°æ® |
| | | if (ProcessNumber.length > option.data.length - (NowNum - 1)) { |
| | | //è·åè¡¨æ ¼å©ä½è¡æ°é |
| | | var num = ProcessNumber.length - option.data.length + (NowNum - 1); |
| | | //循ç¯èµå¼ å¨å·²æçè¡¨æ ¼èµå¼ |
| | | var j = 0; |
| | | for (var i = (NowNum - 1); i < option.data.length; i++) { |
| | | option.data[i]["HProcName"] = WorkCente[j]["å·¥åºåç§°"]; |
| | | option.data[i]["HProcNumber"] = WorkCente[j]["å·¥åºä»£ç "]; |
| | | option.data[i]["HProcID"] = WorkCente[j]["HProcID"]; |
| | | option.data[i]["HCenterName"] = WorkCente[j]["å·¥ä½ä¸å¿åç§°"]; |
| | | option.data[i]["HCenterID"] = WorkCente[j]["HCenterID"]; |
| | | option.data[i]["HCenterNumber"] = WorkCente[j]["å·¥ä½ä¸å¿ä»£ç "]; |
| | | j++; |
| | | } |
| | | |
| | | //å¨ä¸æ¹æ·»å æ°çè¡¨æ ¼æ°æ® |
| | | for (var i = 0; i < num; i++) { |
| | | option.data.push({ |
| | | "HProcNo": parseInt($("#HProcExchBegNO").val()) + table.cache["mainTable"].length + 1 + i, "HProcID": WorkCente[j]["HProcID"], "HProcNumber": WorkCente[j]["å·¥åºä»£ç "], "HProcName": WorkCente[j]["å·¥åºåç§°"], "HWorkRemark": "", |
| | | "HCenterID": WorkCente[j]["HCenterID"], "HCenterNumber": WorkCente[j]["å·¥ä½ä¸å¿ä»£ç "], "HCenterName": WorkCente[j]["å·¥ä½ä¸å¿åç§°"], |
| | | "HDeptID": 0, "HDeptNumber": "", "HDeptName": "", |
| | | "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false", |
| | | "HQty": $("#HQty").val(), "HRemark": "" |
| | | }) |
| | | j++; |
| | | } |
| | | } else { |
| | | //循ç¯èµå¼ å¨å·²æçè¡¨æ ¼èµå¼ |
| | | var j = 0; |
| | | for (var i = (NowNum - 1); i < (NowNum - 1) + ProcessNumber.length; i++) { |
| | | option.data[i]["HProcName"] = WorkCente[j]["å·¥åºåç§°"]; |
| | | option.data[i]["HProcNumber"] = WorkCente[j]["å·¥åºä»£ç "]; |
| | | option.data[i]["HProcID"] = WorkCente[j]["HProcID"]; |
| | | option.data[i]["HCenterName"] = WorkCente[j]["å·¥ä½ä¸å¿åç§°"]; |
| | | option.data[i]["HCenterID"] = WorkCente[j]["HCenterID"]; |
| | | option.data[i]["HCenterNumber"] = WorkCente[j]["å·¥ä½ä¸å¿ä»£ç "]; |
| | | j++; |
| | | } |
| | | } |
| | | |
| | | table.render(option); |
| | | //obj.update({ |
| | | // HProcName: checkStatus.data[0].å·¥åº |
| | | // , HProcID: checkStatus.data[0].HItemID |
| | | // , HProcNumber: checkStatus.data[0].å·¥åºä»£ç |
| | | //}); |
| | | |
| | | layer.close(layer.index); |
| | | } |
| | |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å å·¥ä¸å¿å表', |
| | | title: 'å·¥ä¸å¿å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | |
| | | } |
| | | }); |
| | | |
| | | //å®¡æ ¸ |
| | | form.on('submit(set_CheckBill)', function (data) { |
| | | set_CheckBill(); |
| | | }); |
| | | |
| | | |
| | | //#region æå°æé® |
| | | form.on('submit(btn-print)', function (data) { |
| | | get_PrintReport(); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | |
| | | , { field: 'HProcID', title: 'å·¥åºID', hide: true } |
| | | , { field: 'HProcNumber', title: 'å·¥åºä»£ç ', edit: 'text', event: "HProcCheck" } |
| | | , { field: 'HProcName', title: 'å·¥åºåç§°' } |
| | | , { field: 'HWorkRemark', title: 'å 工说æ', edit: 'text' } |
| | | , { field: 'HCenterID', title: 'å·¥ä½ä¸å¿ID', hide: true } |
| | | , { field: 'HCenterNumber', title: 'å·¥ä½ä¸å¿ä»£ç ', edit: 'text', event: "HWorkCenterCheck" } |
| | | , { field: 'HCenterName', title: 'å·¥ä½ä¸å¿åç§°' } |
| | | , { field: 'HQty', title: 'è¿å·¥æ°é', edit: 'text' } |
| | | , { field: 'HDeptID', title: 'é¨é¨ID', hide: true } |
| | | , { field: 'HDeptNumber', title: 'é¨é¨ä»£ç ', edit: 'text', event: "HDeptCheck" } |
| | | , { field: 'HDeptName', title: 'é¨é¨' } |
| | | , { field: 'HWorkRemark', title: 'å·¥èºåæ°', edit: 'text' } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text', width: "300" } |
| | | , { field: 'HSupID', title: 'ä¾åºåID', hide: true } |
| | | , { field: 'HSupNumber', title: 'ä¾åºå代ç ', edit: 'text', event: "HSupCheck" } |
| | | , { field: 'HSupName', title: 'ä¾åºå' } |
| | | , { field: 'HSupFlag', title: 'æ¯å¦å§å¤', templet: '#HSupFlag' } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text',width:"300" } |
| | | |
| | | , { field: 'HSourceInterID', title: 'æºåå
ç ', hide: true } |
| | | , { field: 'HSourceEntryID', title: 'æºååå
ç ', hide: true } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]; |
| | | option = { |
| | |
| | | } |
| | | }; |
| | | option.data = [{ |
| | | "HProcNo": parseInt($("#HProcExchBegNO").val()) + 1, "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "", |
| | | "HCenterID": 0, "HCenterNumber": "", "HCenterName": "", |
| | | "HDeptID": 0, "HDeptNumber": "", "HDeptName": "", |
| | | "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false", |
| | | "HQty": $("#HQty").val(), "HRemark": "" |
| | | "HProcNo": parseInt($("#HProcExchBegNO").val()) + 1 |
| | | , "HProcID": 0 |
| | | , "HProcNumber": "" |
| | | , "HProcName": "" |
| | | , "HWorkRemark": "" |
| | | , "HCenterID": 0 |
| | | , "HCenterNumber": "" |
| | | , "HCenterName": "" |
| | | , "HDeptID": 0 |
| | | , "HDeptNumber": "" |
| | | , "HDeptName": "" |
| | | , "HSupID": 0 |
| | | , "HSupNumber": "" |
| | | , "HSupName": "" |
| | | , "HSupFlag": "false" |
| | | , "HQty": $("#HQty").val() |
| | | , "HRemark": "" |
| | | , "HSourceInterID": "0" |
| | | , "HSourceEntryID": "0" |
| | | }]; |
| | | table.render(option); |
| | | |
| | |
| | | $("#HQty").val(result.data[0]["è®¡åæ°é"]); |
| | | $("#HProcBegName").val(result.data[0]["å·¥åºåç§°"]); |
| | | $("#HProcBegID").val(result.data[0]["HProcID"]); |
| | | $("#HProcEndName").val(result.data[1]["å·¥åºåç§°"]); |
| | | $("#HProcEndID").val(result.data[1]["HProcID"]); |
| | | $("#HProcEndName").val(result.data.length == 1 ? "" :result.data[1]["å·¥åºåç§°"]); |
| | | $("#HProcEndID").val(result.data.length==1?"0": result.data[1]["HProcID"]); |
| | | $("#HProcExchBegNO").val(result.data[0]["æµæ°´å·"]); |
| | | $("#HProcExchEndNO").val(result.data[1]["æµæ°´å·"]); |
| | | $("#HProcExchEndNO").val(result.data.length == 1 ? "9999" :result.data[1]["æµæ°´å·"]); |
| | | $("#HPRDORGID").val(result.data[0]["HPRDORGID"]); |
| | | $("#HPRDORGName").val(result.data[0]["ç»ç»"]); |
| | | $("#HICMOBillNo").val(result.data[0]["ä»»å¡åå·"]); |
| | |
| | | |
| | | } |
| | | |
| | | //æ¥è¯¢å·¥åºæµè½¬å¡--å é¤æä½ |
| | | function get_ProcessExchange_Delete() { |
| | | var sWhere = " where hmainid=" + linterid + " and hsubid in " + HEntryID + " "; |
| | | //ç¼è¾å è½½æ°æ® |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Sc_ProcExchWorkBackBill/GetProcessExchangeBillSub', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $("#HProcExchBillNo").val(result.data[0]["åæ®å·"]); |
| | | $("#HProcExchInterID").val(result.data[0]["hmainid"]); |
| | | $("#HProcExchEntryID").val(result.data[0]["hsubid"]); |
| | | $("#HWorkShopID").val(result.data[0]["HWorkShopID"]); |
| | | $("#HWorkShopName").val(result.data[0]["ç产车é´"]); |
| | | $("#HMaterNumber").val(result.data[0]["产å代ç "]); |
| | | $("#HMaterID").val(result.data[0]["HMaterID"]); |
| | | $("#HMaterName").val(result.data[0]["产ååç§°"]); |
| | | $("#HModel").val(result.data[0]["è§æ ¼åå·"]); |
| | | $("#HUnitID").val(result.data[0]["HUnitID"]); |
| | | $("#HUnitName").val(result.data[0]["åä½"]); |
| | | $("#HPlanQty").val(result.data[0]["ç产æ°é"]); |
| | | $("#HQty").val(result.data[0]["è®¡åæ°é"]); |
| | | $("#HProcBegName").val(""); |
| | | $("#HProcBegID").val("0"); |
| | | $("#HProcEndName").val(""); |
| | | $("#HProcEndID").val("0"); |
| | | $("#HProcExchBegNO").val("0"); |
| | | $("#HProcExchEndNO").val("1000"); |
| | | $("#HPRDORGID").val(result.data[0]["HPRDORGID"]); |
| | | $("#HPRDORGName").val(result.data[0]["ç»ç»"]); |
| | | $("#HICMOBillNo").val(result.data[0]["ä»»å¡åå·"]); |
| | | $("#HICMOInterID").val(result.data[0]["hicmointerid"]); |
| | | $("#HICMOEntryID").val(result.data[0]["HICMOEntryID"]); |
| | | $("#HOrderProcNO").val(result.data[0]["HOrderProcNO"]); |
| | | |
| | | var d = result; |
| | | var rowdata = []; |
| | | for (var i = 0; i < d.data.length; i++) { |
| | | //å表 èµå¼ |
| | | rowdata.push({ |
| | | "HProcNo": d.data[i]["æµæ°´å·"], "HProcID": d.data[i]["HProcID"], "HProcNumber": d.data[i]["å·¥åºä»£ç "], "HProcName": d.data[i]["å·¥åºåç§°"], "HWorkRemark":"", |
| | | "HCenterID": d.data[i]["HCenterID"], "HCenterNumber": d.data[i]["å·¥ä½ä¸å¿ä»£ç "], "HCenterName": d.data[i]["å·¥ä½ä¸å¿"], |
| | | "HDeptID": d.data[i]["HDeptID"], "HDeptNumber": d.data[i]["å 工车é´ä»£ç "], "HDeptName": d.data[i]["å 工车é´"], |
| | | "HSupID": d.data[i]["HSupID"], "HSupNumber": d.data[i]["ä¾åºå代ç "], "HSupName": d.data[i]["ä¾åºå"], "HSupFlag": d.data[i]["å§å¤æ è®°"] == false, |
| | | "HQty": d.data[i]["è®¡åæ°é"], "HRemark": "", "HSourceInterID": d.data[i]["hmainid"], "HSourceEntryID": d.data[i]["hsubid"] |
| | | }); |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | |
| | | for (var i = 0; i < d.data.length; i++) { |
| | | //å§å¤æ è®° |
| | | $('#HSupFlag' + (i + 1)).find("option[value='" + d.data[i].å§å¤æ è®° + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | } else { |
| | | layer.msg(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index0); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | //å®¡æ ¸ |
| | | function set_CheckBill() { |
| | | var hmainid = $("#HInterID").val(); |
| | | layer.confirm("确认è¦å®¡æ ¸åï¼å®¡æ ¸åä¸è½æ¢å¤", { title: "å®¡æ ¸ç¡®è®¤" }, function (index) { |
| | | var wait = layer.load(); |
| | | //é»è¾å 餿¹æ³ |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_ProcExchWorkBackBill/set_CheckBill', |
| | | type: "GET", |
| | | data: { "HInterID": hmainid, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | //å
³éå½åframe |
| | | layer.close(wait); |
| | | layer.msg(result.Message); |
| | | $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | //#region æå° |
| | | function get_PrintReport() { |
| | | //#region å¤æåæ®ç¶æ |
| | | var HBillData = ""; |
| | | var HBillData = getBillStatus_ProcExchWorkBackBill(); //è·ååæ®æ°æ® |
| | | if (HBillData != "none") { |
| | | if (HBillData.length == 0) { |
| | | layer.alert("æå°å¤±è´¥!æªæ¥è¯¢å°åæ®ä¿¡æ¯!", { icon: 5 }); |
| | | return; |
| | | } else if (HBillData[0]["ç¶æ"] != "å·²å®¡æ ¸") { |
| | | layer.alert("æå°å¤±è´¥!åæ®ç¶ææªä¸º'å·²å®¡æ ¸'ç¶æ!", { icon: 5 }); |
| | | return; |
| | | } |
| | | } else { |
| | | return; |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //æå°æºå-å·¥åºæµè½¬å¡ |
| | | var HSourceInterID = $("#HProcExchInterID").val(); //æºå-å·¥åºæµè½¬å¡ 主å
ç |
| | | //夿å¨å
·æ¸
åæ¥è¯¢å表æ¯å¦ææ°æ® 0没æ 1æ |
| | | var QJQD = 0; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_ProcessExchangeBillList/QJQD', |
| | | type: "GET", |
| | | data: { "HProcExchHinteID": HSourceInterID}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | if (data1.data.length == 0) { |
| | | QJQD = 0; |
| | | } else { |
| | | QJQD = 1; |
| | | } |
| | | } else { |
| | | //layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | //layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | var HSourceInterID = $("#HProcExchInterID").val(); |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'æå°æ¨¡çéæ©' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + HSourceInterID + "|" + QJQD + '&MyMsg=' + HSourceInterID + '&Type=HProcessExchange', 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //é空éªè¯ |
| | | function AllowLoadData(data) { |
| | | |
| | | if ($("#HEmpID").val()=="0") { |
| | | layer.msg("è¯·éæ©è´è´£äºº!"); |
| | | if ($("#HBillNo").val()=="") { |
| | | layer.msg("åæ®å·ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HProcExchBillNo").val() == "") { |
| | | layer.msg("æµè½¬å¡ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HBillOperationType").val() == "") { |
| | | layer.msg("æä½ç±»åä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HMaterNumber").val() == "") { |
| | | layer.msg("ç©æä»£ç ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HMaterName").val() == "") { |
| | | layer.msg("ç©æåç§°ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HModel").val() == "") { |
| | | layer.msg("è§æ ¼åå·ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HUnitName").val() == "") { |
| | | layer.msg("计éåä½ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HPlanQty").val() == "0") { |
| | | layer.msg("è®¢åæ°éä¸è½ä¸º0!"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HQty").val() == "0") { |
| | | layer.msg("è¿å·¥æ°éä¸è½ä¸º0!"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HBillOperationType").val() != "2") { |
| | | if ($("#HProcBegName").val() == "") { |
| | | layer.msg("å¼å§å·¥åºä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //if ($("#HProcEndName").val() == "") { |
| | | // layer.msg("ç»æå·¥åºä¸è½ä¸ºç©º!"); |
| | | // return false; |
| | | //} |
| | | |
| | | |
| | | if ($("#HBillOperationType").val() != "2") { |
| | | if ($("#HProcExchBegNO").val() == "") { |
| | | layer.msg("å¼å§æµæ°´å·ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //if ($("#HProcExchEndNO").val() == "") { |
| | | // layer.msg("ç»ææµæ°´å·ä¸è½ä¸ºç©º!"); |
| | | // return false; |
| | | //} |
| | | |
| | | if ($("#HPRDORGName").val() == "") { |
| | | layer.msg("ç产ç»ç»ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HICMOBillNo").val() == "") { |
| | | layer.msg("ç产订åä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | |
| | | //if ($("#HEmpID").val()=="0") { |
| | | // layer.msg("è¯·éæ©è´è´£äºº!"); |
| | | // return false; |
| | | //} |
| | | |
| | | var num = []; |
| | | var num_2 = []; |
| | |
| | | layer.msg("第" + (i + 1) + "è¡:ä¾åºåä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | } else { |
| | | if (option.data[i]["HCenterID"] == "0") { |
| | | layer.msg("第" + (i + 1) + "è¡:å·¥ä½ä¸å¿ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | } |
| | | //else { |
| | | // if (option.data[i]["HCenterID"] == "0") { |
| | | // layer.msg("第" + (i + 1) + "è¡:å·¥ä½ä¸å¿ä¸è½ä¸ºç©º!"); |
| | | // return false; |
| | | // } |
| | | //} |
| | | |
| | | if (parseInt(option.data[i].HQty) > parseInt($("#HQty").val())) { |
| | | var indexRow = i + 1; |
| | |
| | | { |
| | | var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and hmainid=" + linterid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_ProcExchWorkBackBill/Sc_ProcExchWorkBackBillList", |
| | | url: GetWEBURL() + "/Sc_ProcExchWorkBackBill/Sc_ProcExchWorkBackBillList_Edit", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | |
| | | $("#HProcExchBillNo").val(d.data[0]["æµè½¬å¡å·"]); |
| | | $("#HProcExchInterID").val(d.data[0]["æµè½¬å¡ä¸»å
ç "]); |
| | | $("#HProcExchEntryID").val(d.data[0]["æµè½¬å¡åå
ç "]); |
| | | $("#HBillOperationType").val(d.data[0]["æä½ç±»å"]); |
| | | $("#HWorkShopID").val(d.data[0]["HWorkShopID"]); |
| | | $("#HWorkShopName").val(d.data[0]["ç产车é´"]); |
| | | $("#HMaterNumber").val(d.data[0]["产å代ç "]); |
| | |
| | | "HCenterID": d.data[i]["HCenterID"], "HCenterNumber": d.data[i]["å·¥ä½ä¸å¿ä»£ç "], "HCenterName": d.data[i]["å·¥ä½ä¸å¿"], |
| | | "HDeptID": d.data[i]["HDeptID"], "HDeptNumber": d.data[i]["å 工车é´ä»£ç "], "HDeptName": d.data[i]["å 工车é´"], |
| | | "HSupID": d.data[i]["HSupID"], "HSupNumber": d.data[i]["ä¾åºå代ç "], "HSupName": d.data[i]["ä¾åºå"], "HSupFlag": d.data[i]["å§å¤æ è®°"] == 1 ? true : false, |
| | | "HQty": d.data[i]["åè¿å·¥æ°é"], "HRemark": d.data[i]["表ä½å¤æ³¨"] |
| | | "HQty": d.data[i]["åè¿å·¥æ°é"], "HRemark": d.data[i]["表ä½å¤æ³¨"], "HSourceInterID": d.data[i]["HSourceInterID"], "HSourceEntryID": d.data[i]["HSourceEntryID"] |
| | | }); |
| | | } |
| | | option.data = rowdata; |
| | |
| | | return vars; |
| | | } |
| | | |
| | | |
| | | //#region è·ååæ®ç¶æ |
| | | function getBillStatus_ProcExchWorkBackBill() { |
| | | var HBillData = "none"; |
| | | var sWhere = " and hmainid = " + $("#HInterID").val(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_ProcExchWorkBackBill/Sc_ProcExchWorkBackBillList', |
| | | async: false, |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | HBillData = data1.data; |
| | | } else { |
| | | layer.alert(data1.code + "åæ®ç¶æå¤æå¤±è´¥ï¼", { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | return HBillData; |
| | | } |
| | | //#endregion |
| | | //#endregion |
| | | }) |
| | | </script> |