| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>ææè¿ç®</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | |
| | | <style type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="component-form-group"> |
| | | <div class="layui-collapse"> |
| | | <h1 style="text-align: center; padding: 30px 0;"><b>ææè¿ç®</b></h1> |
| | | <div class="layui-colla-item" style="padding-top:20px;"> |
| | | <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="HProdORGID" id="HProdORGID" lay-verify="HProdORGID"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">ç产车é´</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="hidden" class="layui-input" lay-verify="HWorkShopID" name="HWorkShopID" id="HWorkShopID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="text" class="layui-input" lay-verify="HWorkShopIDName" name="HWorkShopIDName" id="HWorkShopIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHWorkShopID" id="btnHWorkShopID" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnTLYS" id="btnTLYS">ææè¿ç®</button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btn_Cancel" id="btn_Cancel" style="padding:0 20px">éåº</button> |
| | | </div> |
| | | <div class="layui-colla-item" style="height:600px;margin-top:20px;"> |
| | | <font size="5" color="blue" id="HRemark"></font> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script type="text/javascript"> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element', 'tableSelect'], function () { |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , tableSelect = layui.tableSelect; |
| | | var HModName = "JIT_PickUpCalculate_BaoGong"; |
| | | var HMaker = sessionStorage["HUserName"] |
| | | var HStockOrgID = sessionStorage["OrganizationID"] //ç»ç»ID |
| | | //#endregion |
| | | |
| | | //#region 夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | if (sessionStorage.login != "login") { |
| | | layer.confirm("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼", { |
| | | icon: 4, skin: 'layui-layer-lan', title: "温馨æç¤º", closeBtn: 0, btn: ['éæ°ç»å½'] |
| | | }, function () { window.location.href = "../../user/login.html"; }); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region åå§åçé¢ |
| | | set_ClearBill(); |
| | | //#endregion |
| | | |
| | | //#region éæ©çäº§è½¦é´ |
| | | //#region çå¬çäº§è½¦é´ |
| | | form.on('submit(btnHWorkShopID)', function (data) { |
| | | btnHWorkShopID(); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region éæ©çäº§è½¦é´ |
| | | function btnHWorkShopID() { |
| | | var HOrgName = $(".layui-form-select input").val(); |
| | | layer.open({ |
| | | type: 2 //ç±»å |
| | | , skin: 'layui-layer-rim'//å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'ç产车é´å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_DepartmentList.html?Type=2&HOrgName=' + HOrgName, 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HWorkShopID").val(checkStatus.data[0].HItemID);//车é´id |
| | | $("#HWorkShopIDName").val(checkStatus.data[0].é¨é¨åç§°);//车é´åç§° |
| | | /*get_WriteConfigFile();*/ |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | //#region ææè¿ç® |
| | | //#region å¼å§ææè¿ç® |
| | | form.on('submit(btnTLYS)', function (data) { |
| | | if (set_ModCheck("Sc_WorkBillSortBill_tlys") == true) { |
| | | layer.confirm('ä½ ç¡®å®è¦æ§è¡æä½åï¼', { |
| | | btn: ['ç¡®å®', 'åæ¶'] //æé® |
| | | , btn1: function (index, layero) { |
| | | get_btnTLYS(); |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region ææè¿ç® |
| | | function get_btnTLYS() { |
| | | if ($("#HWorkShopID").val() == 0) { |
| | | return layer.msg("ç产车é´ä¸è½ä¸ºç©º!"); |
| | | } |
| | | sWhere = { |
| | | HProdORGID: $("#HProdORGID").val() |
| | | , HWorkShopID: $("#HWorkShopID").val() |
| | | } |
| | | var HTLType = ""; |
| | | sWhere = JSON.stringify(sWhere); |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_TLYS', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["Czybm"], "HTLType": HTLType }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | get_FastQuery(2); |
| | | layer.msg(data1.Message); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | //#region éåº |
| | | form.on('submit(btn_Cancel)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | Pub_Close(2); |
| | | }); |
| | | }) |
| | | //#endregion |
| | | |
| | | //#region æéå¤å® |
| | | function set_ModCheck(ModRightNameCheck) { |
| | | var Permission = false; |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | Permission = true; |
| | | } else { |
| | | layer.alert("å½åæ¨¡åæ²¡ææ¥è¯¢æé!", { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | return Permission; |
| | | } |
| | | //#endregion |
| | | |
| | | //#region è·åç»ç» |
| | | function Organ() { |
| | | //è·åç»å½é¡µç»ç»å |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "/Web/GetOrganizations", |
| | | success: function (result) { |
| | | var Organization = ""; |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data; |
| | | for (var i = 0; i < data.length; i++) { |
| | | Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; |
| | | } |
| | | $("#HProdORGID").append(Organization); |
| | | $("#HProdORGID").val(sessionStorage["OrganizationID"]) |
| | | form.render('select'); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region 页é¢åå§å |
| | | function set_ClearBill() { |
| | | //é¨é¨è¾å
¥æ¡ |
| | | tableSelect.render({ |
| | | elem: '#HWorkShopIDName',//è¾å
¥æ¡doméæ© |
| | | searchKey: 'é¨é¨åç§°,HItemID',//æ¥è¯¢çåå |
| | | sWhere: '',//tableæç´¢sWhereæ¡ä»¶ //é»è®¤çé项 |
| | | ajaxSelect: function (sWhere) { |
| | | var data = ''; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_Department/list', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": HMaker, "Organization": sessionStorage["Organization"] }, |
| | | async: false, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | data = data1.data |
| | | } |
| | | }, |
| | | error: function () { |
| | | layer.alert('è·åå表失败ï¼', { icon: 15, title: 'éä¿¡é误' }); |
| | | } |
| | | }); |
| | | return data; |
| | | },//设置å端å页æ¶å¯ä»¥è®¾ç½®ç |
| | | table: { |
| | | //url: GetWEBURL() + 'Gy_Supplier/page', |
| | | //where: { user: 'ç¿æ¶æ¶', Organization: 'æµæ±æºäºè¿æ' }, |
| | | cols: [[ |
| | | { type: 'radio', fixed: 'left' },//éè¦å è¿ä¸ªfixed屿§ä¸ç¶ç¹å»checkboxä¼è§¦åè¡ç¹å»å¯¼è´æ æ³æ£ç¡®ç¹å» |
| | | { field: 'HItemID', title: 'HItemID' }, |
| | | { field: 'é¨é¨åç§°', title: 'é¨é¨åç§°' }, |
| | | ]], |
| | | page: true, |
| | | limit: 5, |
| | | limits: [5] |
| | | }, |
| | | done: function (elem, data) { |
| | | if (data != []) { |
| | | $("#HWorkShopIDName").val(data.data[0]['é¨é¨åç§°']); |
| | | $("#HWorkShopID").val(data.data[0]['HItemID']); |
| | | } |
| | | |
| | | } |
| | | }) |
| | | Organ(); |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | }); |
| | | function GetHDeptNameValue(obj) //è¿åéè´é¨é¨ |
| | | { |
| | | $("#HWorkShopID").val(obj[0].HItemID);//车é´id |
| | | $("#HWorkShopIDName").val(obj[0].é¨é¨åç§°);//车é´åç§° |
| | | } |
| | | //以ä¸ä¸ºlayui模å |
| | | //æ¤å¤æ¹æ³æ¶åå°è¢«å¤é¨é¡µé¢parent.æ¹æ³åè°ç¨çå¿
é¡»æ¾å¨Layuiæ¹æ³å¤é¨ |
| | | </script> |
| | | </body> |
| | | </html> |