From a92c6b71bdb19a677e2aafed0b58b248ad9bc761 Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期三, 19 一月 2022 00:46:35 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI --- WebTM/views/车间管理/报表分析/Sc_StationInBillList.html | 38 WebTM/views/模治具管理/模治具管理/Sc_MouldOtherInBillList.html | 4 WebTM/views/模治具管理/模治具仓库管理/Sc_MouldProdOutBillEdit.html | 19 WebTM/views/模治具管理/模治具仓库管理/Sc_MouldProdOutBillList.html | 8 WebTM/views/Baseset/基础资料/Gy_LineCenter.html | 102 +++ WebTM/views/设备管理/Sb_EqpMaintenanceBillList_PDA.html | 485 ++++++++++++++--- WebTM/views/index_Mobile.html | 4 WebTM/views/领料发货/领料出库/Kf_MateOutBill_Fast.html | 5 WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html | 8 WebTM/views/设备管理/Sb_EqpMaintenanceBillList_PDAEdit.html | 245 +++++++++ WebTM/views/模治具管理/器具维修派工单/Sc_MouldRepairSendWorkBillEdit.html | 14 WebTM/views/计划管理/工艺路线/Gy_RoutingBill.html | 634 ++++++++++++++++++++--- WebTM/views/模治具管理/模治具仓库管理/Sc_MouldProdBackBillList.html | 8 WebTM/views/模治具管理/模治具仓库管理/Sc_MouldScrapOutBillList.html | 7 WebTM/WebTM.csproj | 2 15 files changed, 1,355 insertions(+), 228 deletions(-) diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj index b617e96..1ed5a49 100644 --- a/WebTM/WebTM.csproj +++ b/WebTM/WebTM.csproj @@ -86,6 +86,7 @@ <Content Include="layuiadmin\PubCustom.js" /> <Content Include="layuiadmin\PubJs\PubCheck.js" /> <Content Include="views\Baseset\HBarPlanPrint.html" /> + <Content Include="views\Baseset\鍩虹璧勬枡\Gy_LineCenter.html" /> <Content Include="views\Baseset\鍩虹璧勬枡\Gy_QCCheckProjectListView.html" /> <Content Include="views\Baseset\鍩虹璧勬枡\Gy_RoutingGroup.html" /> <Content Include="views\Baseset\鍩虹璧勬枡\Sc_ICMOBillListView2.html" /> @@ -821,6 +822,7 @@ <Content Include="views\璁惧绠$悊\Sb_EqpConkBookBillList.html" /> <Content Include="views\璁惧绠$悊\Sb_EqpMaintenanceBillList.html" /> <Content Include="views\璁惧绠$悊\Sb_EqpMaintenanceBillList_PDA.html" /> + <Content Include="views\璁惧绠$悊\Sb_EqpMaintenanceBillList_PDAEdit.html" /> <Content Include="views\璁惧绠$悊\Sb_EqpRepairCheckBillList.html" /> <Content Include="views\璁惧绠$悊\Sb_EquipDocCheckItemBillList_PDAEdit.html" /> <Content Include="views\璁惧绠$悊\Sb_EquipDotCheckBillEdit.html" /> diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_LineCenter.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_LineCenter.html" new file mode 100644 index 0000000..20fbff0 --- /dev/null +++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_LineCenter.html" @@ -0,0 +1,102 @@ +锘�<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> +<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.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> + <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> +</head> +<body> + <div class="layui-fluid"> + <div class="layui-card"> + <!--<div class="layui-card-header"></div>--> + <div class="layui-card-body" style="padding: 15px;"> + <form class="layui-form" action="" lay-filter="component-form-group"> + <div class="layui-form-item"> + <div class="layui-inline"> + <label class="layui-form-label">杩囨护鍒�</label> + <div class="layui-input-inline"> + <input type="text" name="Value" id="Value" lay-verify="Value" autocomplete="off" placeholder="璇疯緭鍏ヨ繃婊ゅ垪" class="layui-input"> + </div> + <button type="button" lay-submit="" class="layui-btn" lay-filter="HQuery">蹇�熸煡璇�</button> + <button type="button" lay-submit="" class="layui-btn" lay-filter="FH">杩斿洖</button> + </div> + </div> + </form> + </div> + </div> + </div> + <table class="layui-hide" id="mainTable"></table> + <script src="../../../layuiadmin/layui/layui.js"></script> + <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> + <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> + <script src="../../../layuiadmin/Scripts/webConfig.js"></script> + <script> + layui.use(['table', 'form', 'layer'], function () { + var table = layui.table + , form = layui.form + , layer = layui.layer; + + form.on('submit(HQuery)', function () {//閫夋嫨鍗曚綅 + //var sMainStr = JSON.stringify(table.cache['mainTable']); + RoadQuery($('#Value').val()); + }); + form.on('submit(FH)', function () {//閫夋嫨鍗曚綅 + //var sMainStr = JSON.stringify(table.cache['mainTable']); + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + parent.GetHReasonValue(data); + var index = parent.layer.getFrameIndex(window.name); + parent.layer.close(index); + }); + RoadQuery($('#Value').val()); + table.render({ + elem: '#mainTable' + // , url: '/demo/table/user/' + , data: [] + , cellMinWidth: 80 //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 + , cols: [[ + { type: 'radio' } + , { field: 'HItemID', width: 150, title: '浜х嚎涓績ID', hide: true } + , { field: 'HNumber', width: 150, title: '浜х嚎涓績浠g爜' } + , { field: 'HName', width: 150, title: '浜х嚎涓績鍚嶇О', sort: true } + ]] + , page: true + }); + ///鍔犺浇鏄剧ず鏁版嵁 + function RoadQuery(Where) { + var Value = Where; + if (Value == null) { + Value = ''; + } + $.ajax({ + type: "get", + url: GetWEBURL() + "/Web/Gy_LineCenter_Json", + async: true, + data: { "BadReason": Value }, + //data: { "Value": Value }, + success: function (result) { + ajaxReturnData = JSON.parse(JSON.stringify(result)).data; + table.reload('mainTable', { + data: ajaxReturnData + , height: 'full-10' + , loading: false + , done: function (index, res) { + + } + }); + }, + error: function (result) { + console.log(result); + //layer.msg('鑾峰彇閲囪喘璁㈠崟鍑虹幇寮傚父', { icon: 2, time: 2000 }); + } + }); + }; + }); + </script> + +</body> +</html> diff --git a/WebTM/views/index_Mobile.html b/WebTM/views/index_Mobile.html index ad46816..d73fbd0 100644 --- a/WebTM/views/index_Mobile.html +++ b/WebTM/views/index_Mobile.html @@ -417,9 +417,9 @@ </a> </dd> <dd> - <a lay-href="" style="color: aqua;"> + <a lay-href="璁惧绠$悊/Sb_EqpMaintenanceBillList_PDA.html" style="color: aqua;"> <img src="../layuiadmin/myicon/鍗曟嵁褰曞埗.svg" alt="鍗曟嵁褰曞埗" style="width:25px;height:25px;margin-right: 5px;" /> - 璁惧缁翠慨璁板綍鍗昻ull + 璁惧缁翠慨璁板綍鍗� </a> </dd> </dl> diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillEdit.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillEdit.html" index f4035ee..2bef85f 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillEdit.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillEdit.html" @@ -328,12 +328,12 @@ , cols: [[ //琛ㄥご { type: 'checkbox', totalRowText: '鍚堣琛�' } , { type: 'numbers', title: '搴忓彿', totalRow: true } - , { field: '瀛愮淮淇」鐩�', title: '缁翠慨椤圭洰', edit: 'text', event: "HRepairID"} - , { field: 'HRepairID', title: '缁翠慨椤圭洰id', hide: true} + , { field: '瀛愮淮淇」鐩�', title: '缁翠慨椤圭洰', edit: 'text', event: "HRepairID" } + , { field: 'HRepairID', title: '缁翠慨椤圭洰id', hide: true } , { field: '瀛愮淮淇」鐩唬鐮�', title: '缁翠慨椤圭洰浠g爜' } , { field: 'HRepairExplanation', title: '缁翠慨瑕佹眰', edit: 'text' } - , { field: '瀛愯礋璐d汉浠g爜', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: "HManagerID"}//, hide: true - , { field: 'HManagerID', title: 'id', width: 115, hide: true}//, hide: true + , { field: '瀛愯礋璐d汉浠g爜', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: "HManagerID" }//, hide: true + , { field: 'HManagerID', title: 'id', width: 115, hide: true }//, hide: true , { field: '瀛愯礋璐d汉', title: '璐熻矗浜�', width: 115 } , { field: 'HMoney', title: '缁翠慨璐圭敤', edit: 'text' } , { field: 'HRemark', title: '澶囨敞', edit: 'text' } @@ -341,7 +341,7 @@ ]] }; //鍒濆琛ㄦ牸鏁版嵁 - var rowdata = [{ "瀛愮淮淇」鐩�":"","HRepairID": 0, "瀛愮淮淇」鐩唬鐮�": "", "HRepairExplanation": "", "瀛愯礋璐d汉浠g爜": "", "HManagerID": 0, "瀛愯礋璐d汉": "", "HMoney": 0, "HRemark": "" }]; + var rowdata = [{ "瀛愮淮淇」鐩�": "", "HRepairID": 0, "瀛愮淮淇」鐩唬鐮�": "", "HRepairExplanation": "", "瀛愯礋璐d汉浠g爜": "", "HManagerID": 0, "瀛愯礋璐d汉": "", "HMoney": 0, "HRemark": "" }]; option.data = rowdata; table.render(option); @@ -398,7 +398,7 @@ var checkStatus = table.checkStatus('mainTable') , data = checkStatus.data; //鏂板琛岃〃鏍兼暟鎹� - var NewRow = { "瀛愮淮淇」鐩�": "","HRepairID": 0, "瀛愮淮淇」鐩唬鐮�": "", "HRepairExplanation": "", "瀛愯礋璐d汉浠g爜": "", "HManagerID": 0, "瀛愯礋璐d汉": "", "HMoney": 0, "HRemark": "" }; + var NewRow = { "瀛愮淮淇」鐩�": "", "HRepairID": 0, "瀛愮淮淇」鐩唬鐮�": "", "HRepairExplanation": "", "瀛愯礋璐d汉浠g爜": "", "HManagerID": 0, "瀛愯礋璐d汉": "", "HMoney": 0, "HRemark": "" }; switch (obj.event) { case 'btn-AddLine': table.cache["mainTable"].push(NewRow); @@ -716,7 +716,7 @@ obj.event = ""; return false; } - + }) } //淇濆瓨鏁版嵁 diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdBackBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdBackBillList.html" index 875ec0f..0ce9d92 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdBackBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdBackBillList.html" @@ -154,6 +154,10 @@ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 195 } , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 110 } , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 110 } + , { field: 'HSupTypeID', title: 'HSupTypeID', width: 200, hide: true } + , { field: '寰�鏉ョ被鍨嬪悕绉�', title: '寰�鏉ョ被鍨�', width: 200 } + , { field: 'HSupID', title: 'HSupID', width: 200, hide: true } + , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200 } , { field: 'HWHID', title: 'HWHID', width: 200, hide: true } , { field: '浠撳簱浠g爜', title: '浠撳簱浠g爜', width: 125 } , { field: '浠撳簱', title: '浠撳簱', width: 125 } @@ -166,10 +170,6 @@ , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 115 } , { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 125 } - , { field: 'HSupTypeID', title: 'HSupTypeID', width: 200, hide: true } - , { field: '寰�鏉ョ被鍨嬪悕绉�', title: '寰�鏉ョ被鍨�', width: 200 } - , { field: 'HSupID', title: 'HSupID', width: 200, hide: true } - , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200 } , { field: '鎽樿', title: '鎽樿', width: 125 } , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 125 } //, { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 115 } diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBillEdit.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBillEdit.html" index c7bd061..024bd50 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBillEdit.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBillEdit.html" @@ -238,6 +238,25 @@ //#endregion + //鍒ゆ柇鐢ㄦ埛鏄惁鏈夋煡璇㈡潈闄� + //$.ajax({ + // url: GetWEBURL() + "/Sc_MouldProdOutBill/QueryUserRight", + // type: "GET", + // data: { "UserName": sessionStorage["HUserName"] }, + // success: function (result) { + // if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + + // }); + + // } else { + // layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' }); + // } + // }, error: function () { + // layer.alert("鍙戠敓閿欒!", { icon: 5 }); + // } + //}); + // + //#region 杩涘叆椤甸潰鏃㈠姞杞� //鍒濆鍖栬〃鍗曟彃浠� set_InitFrom(); diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBillList.html" index 15dc7e3..02115a8 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdOutBillList.html" @@ -155,6 +155,10 @@ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 195 } , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 110 } , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 110 } + , { field: 'HSupTypeID', title: 'HSupTypeID', width: 200, hide: true } + , { field: '寰�鏉ョ被鍨嬪悕绉�', title: '寰�鏉ョ被鍨�', width: 200 } + , { field: 'HSupID', title: 'HSupID', width: 200, hide: true } + , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200 } , { field: 'HWHID', title: 'HWHID', width: 200, hide: true } , { field: '浠撳簱浠g爜', title: '浠撳簱浠g爜', width: 125 } , { field: '浠撳簱', title: '浠撳簱', width: 125 } @@ -167,10 +171,6 @@ , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 115 } , { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 125 } - , { field: 'HSupTypeID', title: 'HSupTypeID', width: 200, hide: true } - , { field: '寰�鏉ョ被鍨嬪悕绉�', title: '寰�鏉ョ被鍨�', width: 200 } - , { field: 'HSupID', title: 'HSupID', width: 200, hide: true } - , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200 } , { field: '鎽樿', title: '鎽樿', width: 125 } , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 125 } , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 115 } diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBillList.html" index 3b61034..e742f82 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBillList.html" @@ -217,7 +217,10 @@ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 } , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160 } , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 110 } + , { field: 'HSupTypeID', title: 'HSupTypeID', width: 200, hide: true } + , { field: '寰�鏉ョ被鍨嬪悕绉�', title: '寰�鏉ョ被鍨�', width: 200 } , { field: 'HSupID', title: 'HSupID', width: 200, hide: true } + , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200 } , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true } , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 200 } , { field: '璐熻矗浜哄悕绉�', title: '璐熻矗浜哄悕绉�', width: 200 } @@ -230,10 +233,6 @@ , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 115 } , { field: '閮ㄩ棬鍚嶇О', title: '閮ㄩ棬鍚嶇О', width: 200 } - , { field: 'HSupTypeID', title: 'HSupTypeID', width: 200, hide: true } - , { field: '寰�鏉ョ被鍨嬪悕绉�', title: '寰�鏉ョ被鍨�', width: 200 } - , { field: 'HSupID', title: 'HSupID', width: 200, hide: true } - , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200 } , { field: '鎽樿', title: '鎽樿', width: 200 } , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 115 } , { field: '澶囨敞', title: '澶囨敞', width: 200 } diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldOtherInBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldOtherInBillList.html" index 86b6e7c..8f8bee6 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldOtherInBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldOtherInBillList.html" @@ -153,6 +153,10 @@ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 125, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" } , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 195 } , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 110 } + , { field: 'HSupTypeID', title: 'HSupTypeID', width: 200, hide: true } + , { field: '寰�鏉ョ被鍨嬪悕绉�', title: '寰�鏉ョ被鍨�', width: 200 } + , { field: 'HSupID', title: 'HSupID', width: 200, hide: true } + , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200 } , { field: 'HWHID', title: 'HWHID', width: 200, hide: true } , { field: '浠撳簱浠g爜', title: '浠撳簱浠g爜', width: 125 } , { field: '浠撳簱', title: '浠撳簱', width: 125 } diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html" index 1f74f3f..de102f8 100644 --- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html" +++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html" @@ -9,6 +9,11 @@ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> + <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> .main-btn { /*澶撮儴涓绘寜閽�*/ padding: 0 2px; /*璋冩暣鎸夐挳宸﹀彸绌洪殭澶у皬*/ @@ -19,12 +24,28 @@ .btn-title { font-size: 16px; } - /*.table-select { + /* 闃叉涓嬫媺妗嗙殑涓嬫媺鍒楄〃琚殣钘�---蹇呴』璁剧疆--- */ + .layui-table-cell { + overflow: visible !important; + } + /* 浣垮緱涓嬫媺妗嗕笌鍗曞厓鏍煎垰濂藉悎閫� */ + td .layui-form-select { margin-top: -10px; margin-left: -15px; margin-right: -15px; - }*/ + } + + .layui-form-item .layui-inline { + margin-top: 5px; + margin-bottom: 5px; + margin-right: 0px; + } + + .layui-form-label { + width: 25%; + } </style> + </head> <body> <div class="layui-fluid" style="padding: 0;"> @@ -75,6 +96,12 @@ <input type="text" class="layui-input" lay-verify="HName" name="HName" id="HName"> </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" lay-verify="HPicNumVer" name="HPicNumVer" id="HPicNumVer"> + </div> + </div> </div> <div class="layui-row"> <div class="layui-inline"> @@ -87,18 +114,24 @@ </div> </div> <div class="layui-inline"> - <label class="layui-form-label" style="width: 85px;">浜у搧鍚嶇О</label> + <label class="layui-form-label" style="width: 75px;">浜у搧鍚嶇О</label> <div class="layui-input-block" style="margin-left: 120px;"> - <input type="text" class="layui-input" name="HMaterName" lay-verify="HMaterName" id="HMaterName" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="HMaterName" lay-verify="HMaterName" id="HMaterName" style="background-color:#efefef4d;width:90%" readonly> <input type="hidden" name="HMaterID" id="HMaterID" lay-verify="HMaterID" value="0"> </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="HMaterModel" id="HMaterModel" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 65px;">瑙勬牸鍨嬪彿</label> + <div class="layui-input-block" style="margin-left: 105px;"> + <input type="text" class="layui-input" name="HMaterModel" id="HMaterModel" onmouseover="this.title=this.value" readonly> </div> - </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="HPicNumAssemble" id="HPicNumAssemble" onmouseover="this.title=this.value"> + </div> + </div> </div> <div class="layui-row"> <div class="layui-inline"> @@ -114,7 +147,7 @@ <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="HRoutingGroupID" name="HRoutingGroupID" id="HRoutingGroupID" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> + <input type="hidden" class="layui-input" lay-verify="HRoutingGroupID" name="HRoutingGroupID" id="HRoutingGroupID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> <input type="text" class="layui-input" lay-verify="HRoutingGroupIDName" name="HRoutingGroupIDName" id="HRoutingGroupIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnRoutingGroup" id="btnRoutingGroup" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;"> <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i> @@ -123,11 +156,17 @@ </div> <div class="layui-inline"> <label class="layui-form-label">鏃堕棿鍗曚綅</label> - <div class="layui-input-block" style="margin-left: 120px;width: 182px;"> + <div class="layui-input-block" style="margin-left: 120px;width: 172px;"> <select name="HMainTimeUnit" lay-verify="HMainTimeUnit" id="HMainTimeUnit"> <option value="灏忔椂">灏忔椂</option> <option value="澶�">澶�</option> </select> + </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="HMaterTexture" lay-verify="HMaterTexture" id="HMaterTexture" value="" onmouseover="this.title=this.value"> </div> </div> </div> @@ -162,6 +201,12 @@ </button> </div> </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 65px;">鎴愬搧缂栧彿</label> + <div class="layui-input-block" style="margin-left: 100px;"> + <input type="text" class="layui-input" name="HProductNum" lay-verify="HProductNum" id="HProductNum" value="" onmouseover="this.title=this.value"> + </div> + </div> </div> <div class="layui-row"> <div class="layui-inline"> @@ -181,6 +226,12 @@ <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="HMainPrice" id="HMainPrice" lay-verify="HMainPrice" value="0"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 65px;">鐗堟湰</label> + <div class="layui-input-block" style="margin-left: 105px;"> + <input type="text" class="layui-input" name="HVerNum" lay-verify="HVerNum" id="HVerNum" value="" onmouseover="this.title=this.value"> </div> </div> </div> @@ -311,6 +362,7 @@ </div> </div> </div> + <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <script type="text/html" id="toolbarDemo"> <div class="layui-btn-container"> @@ -327,17 +379,50 @@ <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>--> <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> </script> - <script type="text/html" id="HSupColor"> - {{# if(d.HSupFlag === "true"){ }} - <span style="color: white;background-color:#5FB878;">{{ d.HSupFlag }}</span> - {{# } else { }} - <span style="color: white;background-color:red;">{{ d.HSupFlag }}</span> - {{# } }} + + <!--琛屼笅鎷夐�夋嫨(宸ュ簭绫诲瀷)--> + <script type="text/html" id="HProcType"> + <select name="HProcType" lay-filter="HProcType" id="HProcType{{d.LAY_TABLE_INDEX+1}}"> + <option value="涓诲伐搴�">涓诲伐搴�</option> + <option value="杈呭姪宸ュ簭">杈呭姪宸ュ簭</option> + </select> </script> - <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 type="text/html" id="HSupFlag"> + <div class="layui-input-block" style="margin-left: 20px;"> + <input type="checkbox" name="HSupFlag" lay-filter="HSupFlag" id="HSupFlag{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> + </div> + </script> + + <!--澶嶉�夋 涓嬮亾娴佽浆宸ュ簭--> + <script type="text/html" id="HNextProcFlag"> + <div class="layui-input-block" style="margin-left: 20px;"> + <input type="checkbox" name="HNextProcFlag" lay-filter="HNextProcFlag" id="HNextProcFlag{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> + </div> + </script> + + <!--澶嶉�夋 娴佽浆宸ュ簭--> + <script type="text/html" id="HFlowProc"> + <div class="layui-input-block" style="margin-left: 20px;"> + <input type="checkbox" name="HFlowProc" lay-filter="HFlowProc" id="HFlowProc{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> + </div> + </script> + + <!--澶嶉�夋 鏍囧噯瀹氶--> + <script type="text/html" id="HStdFlag"> + <div class="layui-input-block" style="margin-left: 20px;"> + <input type="checkbox" name="HStdFlag" lay-filter="HStdFlag" id="HStdFlag{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> + </div> + </script> + + <!--澶嶉�夋 鑷姩绉昏浆--> + <script type="text/html" id="HAutoTrunFlag"> + <div class="layui-input-block" style="margin-left: 20px;"> + <input type="checkbox" name="HAutoTrunFlag" lay-filter="HAutoTrunFlag" id="HAutoTrunFlag{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> + </div> + </script> + <script> layui.config({ @@ -361,7 +446,17 @@ //鍒濆琛ㄦ牸鏁版嵁 var rowdata = [{ - "HProcNo": "", "HProcID": "0", "HSupID": "0", "HSupFlag": "false", "HWorkQty": 0, "HPassRate": 0, "HRemark": "" + "HProcNo": "", "HProcID_S": 0, "HProcType": "涓诲伐搴�", "HCenterID_S": 0, "HCenterID_SName": "" + , "HWorkQty_S": 0, "HSubStdEmpQty_S": 0, "HMouldNo": "", "HChangeMould": 0, "HPackStd": "" + , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "宸ュ簭": "" + , "HProcID": 0, "宸ヤ綔涓績浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績": "", "HSupID": 0 + , "渚涘簲鍟嗕唬鐮�": "", "渚涘簲鍟�": "", "HSupFlag": false, "HTimeUnit": "", "HUnitTime": 0 + , "HWorkQty": 0, "HPassRate": 0, "HOverRate": 0, "HReadyTime": 0, "HQueueTime": 0 + , "HMoveTime": 0, "HNextProcFlag": false, "HFlowProc": false, "HSubStdEmpQty": 0, "HSubCanUseSourceQty": 0 + , "HFixPrice": 0, "HProcPrice": 0, "HBadPrice": 0, "HWasterPrice": 0, "HStdFlag": false + , "HBeginDayQty": 0, "HBeginFixQty": 0, "HFixWorkDays": 0, "HTrunWorkDays": 0, "HReadyTimes": 0 + , "HICMOReadyTimes": 0, "HAutoTrunFlag": false, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": "" + , "HProcWorkNum": "" }]; //#endregion @@ -386,6 +481,8 @@ //鍒ゆ柇鏄惁鏂板 if (linterid == null || linterid == 0) { + linteridSub = -1; + OperationType = 1; $.ajax({ url: GetWEBURL() + "/Web/GetMAXNum", type: "GET", @@ -408,28 +505,83 @@ elem: '#mainTable' , toolbar: '#toolbarDemo' , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲� - , cellMinWidth: 90 + , cellMinWidth: 120 + , height: 400 , cols: [[ //琛ㄥご { type: 'checkbox', totalRowText: '鍚堣琛�' } , { type: 'numbers', title: '搴忓彿', totalRow: true } , { field: 'HProcNo', title: '娴佹按鍙�', edit: 'text' } - , { field: '宸ュ簭', title: '宸ュ簭', edit: 'text' } - , { field: 'HProcID', title: '宸ュ簭ID' }//, hide: true - , { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', edit: 'text', width: 115 } - , { field: '宸ヤ綔涓績', title: '宸ヤ綔涓績', edit: 'text' } - , { field: 'HSupID', title: '渚涘簲鍟咺D' } - , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', edit: 'text', width: 110 } - , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', edit: 'text' } - , { field: 'HSupFlag', title: '澶栧崗鏍囪', templet: '#HSupColor', event: "HSupFlagEvent" } - , { field: 'HWorkQty', title: '鍔犲伐鏁伴噺', edit: 'text' } - , { field: 'HPassRate', title: '鑹巼', edit: 'text' } - , { field: 'HRemark', title: '澶囨敞', edit: 'text' } + , { field: 'HProcID_S', title: '宸ユ', edit: 'text' } + , { field: 'HProcType', title: '宸ュ簭绫诲瀷', templet: '#HProcType' }//閫夋嫨 + , { field: 'HCenterID_SName', title: '浜х嚎涓績', edit: 'text', event: "CheckHCenterID_S" }//f7 + , { field: 'HCenterID_S', title: '浜х嚎涓績id', hide: true }//hide: true + , { field: 'HWorkQty_S', title: '浜х嚎浜ц兘', edit: 'text' } + , { field: 'HSubStdEmpQty_S', title: '浜х嚎浜烘暟', edit: 'text' } + , { field: 'HMouldNo', title: '妯″叿缂栧彿', edit: 'text' } + , { field: 'HChangeMould', title: '鎹㈡ā鏃堕棿', edit: 'text' } + , { field: 'HPackStd', title: '鍛ㄨ浆绠辨爣鍑�', edit: 'text' } + , { field: 'HPack', title: '鍛ㄨ浆绠�', edit: 'text' } + , { field: 'HPutArea', title: '鏆傛斁鍖�', edit: 'text' } + , { field: 'HMyWorkDays', title: '鐢熶骇鍛ㄦ湡', edit: 'text' } + , { field: 'HMyFixWorkDays', title: '鍥哄畾鐢熶骇澶╂暟', edit: 'text' } + , { field: '宸ュ簭', title: '宸ュ簭', edit: 'text', event: "CheckHProcID" }//f7 + , { field: 'HProcID', title: '宸ュ簭ID', hide: true }//, hide: true + , { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜' }//涓嶅~ + , { field: 'HCenterID', title: '宸ヤ綔涓績id', hide: true }//, hide: true + , { field: '宸ヤ綔涓績', title: '宸ヤ綔涓績', edit: 'text', event: "CheckHCenterID" }//f7 + , { field: 'HSupID', title: '渚涘簲鍟咺D', hide: true } + , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�' } + , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', edit: 'text', width: 110, event: "CheckHSupID" }//f7 + , { field: 'HSupFlag', title: '澶栧崗鏍囪', templet: "#HSupFlag" }//checkbox + , { field: 'HTimeUnit', title: '鏃堕棿鍗曚綅', edit: 'text' } + , { field: 'HUnitTime', title: '杩愯鏃堕棿', edit: 'text' } + , { field: 'HWorkQty', title: '鍔犲伐鏁伴噺', edit: 'text' }//榛樿 + , { field: 'HPassRate', title: '鑹巼', edit: 'text' }//榛樿 + , { field: 'HOverRate', title: '瓒呴姣斾緥', edit: 'text' } + , { field: 'HReadyTime', title: '鍑嗗鏃堕棿', edit: 'text' } + , { field: 'HQueueTime', title: '鎺掗槦鏃堕棿', edit: 'text' } + , { field: 'HMoveTime', title: '杞Щ鏃堕棿', edit: 'text' } + , { field: 'HNextProcFlag', title: '涓嬮亾娴佽浆宸ュ簭', templet: "#HNextProcFlag" }//chenbox + , { field: 'HFlowProc', title: '娴佽浆宸ュ簭', templet: "#HFlowProc" }//chenbox + , { field: 'HSubStdEmpQty', title: '鏍囧噯浜烘暟', edit: 'text' } + , { field: 'HSubCanUseSourceQty', title: '鍙搷浣滆澶囨暟', edit: 'text' } + , { field: 'HFixPrice', title: '鐝骇瀹氶', edit: 'text' }//榛樿 + , { field: 'HProcPrice', title: '宸ュ簭宸ヤ环', edit: 'text' }//榛樿 + , { field: 'HBadPrice', title: '涓嶅悎鏍煎崟浠�', edit: 'text' }//榛樿 + , { field: 'HWasterPrice', title: '鎶ュ簾鍗曚环', edit: 'text' }//榛樿 + , { field: 'HStdFlag', title: '鏍囧噯瀹氶', templet: "#HStdFlag" }//chenbox + , { field: 'HBeginDayQty', title: '寮�宸ヤ綑閲忥紙澶╂暟锛�', edit: 'text' } + , { field: 'HBeginFixQty', title: '寮�宸ヤ綑閲忥紙鍥烘暟锛�', edit: 'text' } + , { field: 'HFixWorkDays', title: '涓婇亾鍥哄畾澶╂暟', edit: 'text' } + , { field: 'HTrunWorkDays', title: '涓婇亾寰幆鍛ㄦ湡', edit: 'text' } + , { field: 'HReadyTimes', title: '鏈亾鍑嗗鏃堕棿', edit: 'text' } + , { field: 'HICMOReadyTimes', title: '鎹㈠崟鍑嗗鏃堕棿', edit: 'text' } + , { field: 'HAutoTrunFlag', title: '鑷姩绉昏浆', templet: "#HAutoTrunFlag" }//chenbox + , { field: 'HTechnologyParameter', title: '宸ヨ壓鍙傛暟', edit: 'text' } + , { field: 'HPicNum', title: '鍥剧焊缂栧彿', edit: 'text' } + , { field: 'HProcCheckNote', title: '鏈伐搴忕‘璁よ褰�', edit: 'text' } + , { field: 'HProcWorkNum', title: '绋嬪簭鍙�', edit: 'text' } , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } ]] //, done: function (res, curr, count) { - // $(".layui-table-body, .layui-table-box, .layui-table-cell").css('overflow', 'visible'); + // option.data = res.data; + // //鍘绘帀涓嬫媺妗嗗け鐒︿簨浠跺惁鍒欏湪涓嬫媺妗嗛噷杈撳叆鍊� + // $('.layui-form-select').find('input').unbind("blur"); + // //琛ㄦ牸閲嶈浇鍥炴樉涓嬫媺妗嗛噷鐨勬暟鎹� + // $('tr').each(function (e) { + + // var $cr = $(this); + // var dataIndex = $cr.attr("data-index"); + // $.each(option.data, function (index, value) { + // //alert(value) + // if (value.LAY_TNDEX == dataIndex) { + // $cr.find('input').val(value.HProcType); + // } + // }); + // }); //} - }; + } + //鍒濆鍔犺浇琛ㄦ牸 option.data = rowdata; table.render(option); @@ -468,15 +620,86 @@ get_checkRoutingGroup(); }); - + //鏄惁榛樿宸ヨ壓 form.on('checkbox(checkboxHStandard)', function (data) { $("#HStandard").val(data.elem.checked); }); - //鏄惁鍚敤 - //form.on('checkbox(checkboxHUseFlag)', function (data) { - // $("#HUseFlag").val(data.elem.checked); - //}); + + //#region 澶嶉�夋 + //濮斿鍗忓姪 + form.on('checkbox(HSupFlag)', function (data) { + //鑾峰彇涓嬫媺妗嗛�変腑鐨勫�� + var elem = data.othis.parents('tr'); + var dataindex = elem.attr("data-index"); + $.each(option.data, function (index, value) { + if (value.LAY_TABLE_INDEX == dataindex) { + value.HSupFlag = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨 + } + }); + }); + + //涓嬮亾娴佽浆宸ュ簭 + form.on('checkbox(HNextProcFlag)', function (data) { + //鑾峰彇涓嬫媺妗嗛�変腑鐨勫�� + var elem = data.othis.parents('tr'); + var dataindex = elem.attr("data-index"); + $.each(option.data, function (index, value) { + if (value.LAY_TABLE_INDEX == dataindex) { + value.HNextProcFlag = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨 + } + }); + }); + + //娴佽浆宸ュ簭 + form.on('checkbox(HFlowProc)', function (data) { + //鑾峰彇涓嬫媺妗嗛�変腑鐨勫�� + var elem = data.othis.parents('tr'); + var dataindex = elem.attr("data-index"); + $.each(option.data, function (index, value) { + if (value.LAY_TABLE_INDEX == dataindex) { + value.HFlowProc = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨 + } + }); + }); + + //鏍囧噯瀹氶 + form.on('checkbox(HStdFlag)', function (data) { + //鑾峰彇涓嬫媺妗嗛�変腑鐨勫�� + var elem = data.othis.parents('tr'); + var dataindex = elem.attr("data-index"); + $.each(option.data, function (index, value) { + if (value.LAY_TABLE_INDEX == dataindex) { + value.HStdFlag = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨 + } + }); + }); + + //鑷姩绉昏浆 + form.on('checkbox(HAutoTrunFlag)', function (data) { + //鑾峰彇涓嬫媺妗嗛�変腑鐨勫�� + var elem = data.othis.parents('tr'); + var dataindex = elem.attr("data-index"); + $.each(option.data, function (index, value) { + if (value.LAY_TABLE_INDEX == dataindex) { + value.HAutoTrunFlag = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨 + } + }); + }); + //#endregion + + //琛岄�夋嫨澶勭悊锛堝伐搴忕被鍨嬶級 + form.on('select(HProcType)', function (data) { + //鑾峰彇涓嬫媺妗嗛�変腑鐨勫�� + var elem = data.othis.parents('tr'); + var dataindex = elem.attr("data-index"); + $.each(option.data, function (index, value) { + if (value.LAY_TABLE_INDEX == dataindex) { + value.HProcType = data.value;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨 + } + }); + }); + //澶村伐鍏锋爮浜嬩欢 table.on('toolbar(mainTable)', function (obj) { @@ -484,15 +707,51 @@ , data = checkStatus.data; //鏂板琛岃〃鏍兼暟鎹� var NewRow = { - //"HProcNo": "", "宸ュ簭": "", "HProcID": "0", "宸ヤ綔涓績浠g爜": "", "宸ヤ綔涓績": "", "HSupID": "0", "渚涘簲鍟嗕唬鐮�": "" - //, "渚涘簲鍟�": "", "HSupFlag": "false", "HWorkQty": "", "HPassRate": "", "HRemark": "" - "HProcNo": "", "HProcID": "0", "HSupID": "0", "HSupFlag": "false", "HWorkQty": 0, "HPassRate": 0, "HRemark": "" + "HProcNo": "", "HProcID_S": 0, "HProcType": "涓诲伐搴�", "HCenterID_S": 0, "HCenterID_SName": "" + , "HWorkQty_S": 0, "HSubStdEmpQty_S": 0, "HMouldNo": "", "HChangeMould": 0, "HPackStd": "" + , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "宸ュ簭": "" + , "HProcID": 0, "宸ヤ綔涓績浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績": "", "HSupID": 0 + , "渚涘簲鍟嗕唬鐮�": "", "渚涘簲鍟�": "", "HSupFlag": false, "HTimeUnit": "", "HUnitTime": 0 + , "HWorkQty": 0, "HPassRate": 0, "HOverRate": 0, "HReadyTime": 0, "HQueueTime": 0 + , "HMoveTime": 0, "HNextProcFlag": false, "HFlowProc": false, "HSubStdEmpQty": 0, "HSubCanUseSourceQty": 0 + , "HFixPrice": 0, "HProcPrice": 0, "HBadPrice": 0, "HWasterPrice": 0, "HStdFlag": false + , "HBeginDayQty": 0, "HBeginFixQty": 0, "HFixWorkDays": 0, "HTrunWorkDays": 0, "HReadyTimes": 0 + , "HICMOReadyTimes": 0, "HAutoTrunFlag": false, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": "" + , "HProcWorkNum": "" }; switch (obj.event) { case 'btn-AddLine': table.cache["mainTable"].push(NewRow); option.data = table.cache["mainTable"]; + table.render(option); + + for (var i = 1; i <= option.data.length; i++) { + console.log(option.data[i - 1].HSupFlag) + $('#HProcType' + i + '').find("option[value='" + option.data[i - 1].HProcType + "']").attr("selected", true); + //濮斿鍗忓姪 + if (option.data[i - 1].HSupFlag) { + $('#HSupFlag' + i + '').attr("checked", true); + } + //涓嬮亾娴佽浆宸ュ簭 + if (option.data[i - 1].HNextProcFlag) { + $('#HNextProcFlag' + i + '').attr("checked", true); + } + //娴佽浆宸ュ簭 + if (option.data[i - 1].HFlowProc) { + $('#HFlowProc' + i + '').attr("checked", true); + } + //鏍囧噯瀹氶 + if (option.data[i - 1].HStdFlag) { + $('#HStdFlag' + i + '').attr("checked", true); + } + //鑷姩绉昏浆 + if (option.data[i - 1].HAutoTrunFlag) { + $('#HAutoTrunFlag' + i + '').attr("checked", true); + } + } + form.render('select'); + form.render('checkbox'); break; case 'btn-CopyLine': var copydata = JSON.stringify(data); @@ -508,7 +767,31 @@ table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂 option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓� table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓� - //layer.alert(copyrow); + for (var i = 1; i <= option.data.length; i++) { + $('#HProcType' + i + '').find("option[value='" + option.data[i - 1].HProcType + "']").attr("selected", true); + //濮斿鍗忓姪 + if (option.data[i - 1].HSupFlag) { + $('#HSupFlag' + i + '').attr("checked", true); + } + //涓嬮亾娴佽浆宸ュ簭 + if (option.data[i - 1].HNextProcFlag) { + $('#HNextProcFlag' + i + '').attr("checked", true); + } + //娴佽浆宸ュ簭 + if (option.data[i - 1].HFlowProc) { + $('#HFlowProc' + i + '').attr("checked", true); + } + //鏍囧噯瀹氶 + if (option.data[i - 1].HStdFlag) { + $('#HStdFlag' + i + '').attr("checked", true); + } + //鑷姩绉昏浆 + if (option.data[i - 1].HAutoTrunFlag) { + $('#HAutoTrunFlag' + i + '').attr("checked", true); + } + } + form.render('select'); + form.render('checkbox'); } break; } @@ -516,37 +799,9 @@ //琛屽唴浜嬩欢 table.on('tool(mainTable)', function (obj) { - var data = obj.data; - var rowIndex = $(obj.tr).attr("data-index"); - if (obj.event === 'del') { - layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) { - console.log("绱㈠紩涓�:" + rowIndex); - if (rowIndex === '0') { - layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�'); - } else { - obj.del(); - option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓� - table.reload(option); - layer.close(index); - } - }); - } - //鍗曞嚮鏀瑰彉澶栧崗鏍囪鍊� - if (obj.event === 'HSupFlagEvent') { - var flag = obj.data.HSupFlag; - if (flag === "false") { - flag = "true"; - } - else if (flag === "true") { - flag = "false"; - } - else { - flag = "true"; - } - obj.update({ - HSupFlag: flag - }); - } + set_GridDelete(obj); //琛屽唴鍒犻櫎 + set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫� + }); $('#HName').on('keydown', function (event) {//宸ヨ壓璺嚎鍚嶇О @@ -557,9 +812,9 @@ //淇濆瓨鎻愪氦 form.on('submit(btnSave)', function (data) {//鎻愪氦 - if (AllowLoadData(data)) { - set_AddNew(data); - } + //if (AllowLoadData(data)) { + set_AddNew(data); + //} }); //閫夋嫨涓嶈壇鍘熷洜 @@ -673,7 +928,8 @@ //window.close();//鍏抽棴褰撳墠椤� }) - form.on('submit(Saver)', function (data) {//淇濆瓨 + + form.on('submit(Saver)', function (data) { //淇濆瓨 //debugger; var sMainStr = JSON.stringify(data.field); var sSubStr = JSON.stringify(table.cache['mainTable']); @@ -718,6 +974,8 @@ }); + + //#endregion //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶 @@ -742,6 +1000,7 @@ $("#HMaterID").val(checkStatus.data[0].HItemID);//鐗╂枡id $("#HMaterName").val(checkStatus.data[0].HName);//鐗╂枡鍚嶇О $("#HMaterNumber").val(checkStatus.data[0].HNumber);//鐗╂枡浠g爜 + $("#HMaterModel").val(checkStatus.data[0].HModel);//瑙勬牸鍨嬪彿 layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� } @@ -852,14 +1111,14 @@ , btn2: function (index, layero) { } }) } - + //宸ヨ壓璺嚎澶х被閫夋嫨椤甸潰 function get_checkRoutingGroup() { layer.open({ type: 2//寮圭獥绫诲瀷 , skin: 'layui-layer-rim' //鍔犱笂杈规 , area: ['90%', '90%']//澶у皬 - , title: '宸ヤ綔涓績琛�'//鏍囬 + , title: '宸ヨ壓璺嚎澶х被鍒楄〃'//鏍囬 , shift: 2//寮瑰嚭鍔ㄧ敾 , content: ['../../Baseset/鍩虹璧勬枡/Gy_RoutingGroup.html', 'yes'] , btn: ['纭畾', '鍙栨秷'] @@ -888,6 +1147,158 @@ vars[hash[0]] = hash[1]; } return vars; + } + + //琛屽唴鍒犻櫎 + function set_GridDelete(obj) { + var data = obj.data; + var rowIndex = $(obj.tr).attr("data-index"); + if (obj.event === 'del') { + layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) { + console.log("绱㈠紩涓�:" + rowIndex); + if (rowIndex === '0') { + layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�'); + } else { + obj.del(); + option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓� + table.reload(option); + layer.close(index); + } + }); + } + } + + //琛屽唴鍒犻櫎蹇嵎閿� + function set_GridCellCheck(obj) { + $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { + if (event.key == "F7") { + //浜х嚎涓績 + if (obj.event == "CheckHCenterID_S") { + //鎵撳紑缁翠慨椤圭洰灏忕獥浣� + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "浜х嚎涓績鍒楄〃" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["90%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ["../../Baseset/鍩虹璧勬枡/Gy_LineCenter.html", "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("璇烽�夋嫨涓�鏉℃暟鎹�"); + } + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + obj.update({ + "HCenterID_SName": checkStatus.data[0].HName + , "HCenterID_S": checkStatus.data[0].HItemID + }) + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + //宸ュ簭 + if (obj.event == "CheckHProcID") { + //鎵撳紑浜哄憳琛� 灏忕獥浣� + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "宸ュ簭鍒楄〃" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["90%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ["../../Baseset/鍩虹璧勬枡/Gy_ProcList.html", "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("璇烽�夋嫨涓�鏉℃暟鎹�"); + } + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + obj.update({ + "宸ュ簭": checkStatus.data[0].宸ュ簭 + , "HProcID": checkStatus.data[0].HItemID + }) + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + //宸ヤ綔涓績 + if (obj.event == "CheckHCenterID") { + //鎵撳紑浜哄憳琛� 灏忕獥浣� + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "浜哄憳鍒楄〃" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["90%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ["../../Baseset/鍩虹璧勬枡/Gy_WorkCenterList.html", "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("璇烽�夋嫨涓�鏉℃暟鎹�"); + } + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + obj.update({ + "宸ヤ綔涓績": checkStatus.data[0].宸ヤ綔涓績 + , "HCenterID": checkStatus.data[0].HItemID + , "宸ヤ綔涓績浠g爜": checkStatus.data[0].宸ヤ綔涓績浠g爜 + }) + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + //渚涘簲鍟� + if (obj.event == "CheckHSupID") { + //鎵撳紑浜哄憳琛� 灏忕獥浣� + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "渚涘簲鍟嗗垪琛�" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["90%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ["../../Baseset/鍩虹璧勬枡/Gy_SupplierList.html", "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("璇烽�夋嫨涓�鏉℃暟鎹�"); + } + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + obj.update({ + "渚涘簲鍟�": checkStatus.data[0].HName + , "HSupID": checkStatus.data[0].HItemID + , "渚涘簲鍟嗕唬鐮�": checkStatus.data[0].HNumber + }) + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + obj.event = ""; + return false; + } + + }) } //缂栬緫 椤甸潰璧嬪�� @@ -919,8 +1330,8 @@ , "HUnitName": d.data[0].璁¢噺鍗曚綅 , "HUnitID": d.data[0].hunitid , "HMainTimeUnit": d.data[0].杩愯鏃堕棿鍗曚綅 - , "HMainProcIDName": d.data[0].宸ュ簭 - , "HMainProcID": d.data[0].hprocid + , "HMainProcIDName": d.data[0].宸ュ簭鍚嶇О + , "HMainProcID": d.data[0].HMainProcID , "HMainCenterIDName": d.data[0].宸ヤ綔 , "HMainCenterID": d.data[0].HMainCenterID , "HGroupIDName": d.data[0].鐝粍 @@ -933,29 +1344,70 @@ , "HDelSourceRate": d.data[0].鍑忚祫婧愬噺閲� , "HRemark": d.data[0].琛ㄥご澶囨敞 , "HStandard": d.data[0].榛樿宸ヨ壓 == 1 ? true : false + , "HMaterModel": d.data[0].瑙勬牸鍨嬪彿 + , "HPicNumVer": d.data[0].鍥惧彿鐗堟湰 + , "HPicNumAssemble": d.data[0].鎬昏鍥惧彿 + , "HMaterTexture": d.data[0].鏉愯川 + , "HProductNum": d.data[0].鎴愬搧缂栧彿 + , "HVerNum": d.data[0].鐗堟湰 }); //瀛愯〃 璧嬪�� var rowdata = [{ - "HProcNo": d.data[0].宸ュ簭鍙�, "HProcID": d.data[0].hprocid, "HSupID": d.data[0].HSupID, "HSupFlag": d.data[0].濮斿鏍囪 == 1 ? true : false, "HWorkQty": d.data[0].鍔犲伐鏁伴噺, "HPassRate": d.data[0].鑹巼, "HRemark": d.data[0].琛ㄤ綋澶囨敞 + "HProcNo": d.data[0].宸ュ簭鍙�, "HProcID_S": d.data[0].宸ユ, "HProcType": d.data[0].宸ュ簭绫诲瀷, "HCenterID_S": d.data[0].HCenterID_S, "HCenterID_SName": d.data[0].浜х嚎涓績 + , "HWorkQty_S": d.data[0].浜х嚎浜ц兘, "HSubStdEmpQty_S": d.data[0].浜х嚎浜烘暟, "HMouldNo": d.data[0].妯″叿缂栧彿, "HChangeMould": d.data[0].鎹㈡ā鏃堕棿, "HPackStd": d.data[0].鍛ㄨ浆绠辨爣鍑� + , "HPack": d.data[0].鍛ㄨ浆绠�, "HPutArea": d.data[0].鏆傛斁鍖�, "HMyWorkDays": d.data[0].鐢熶骇鍛ㄦ湡, "HMyFixWorkDays": d.data[0].鍥哄畾鐢熶骇澶╂暟, "宸ュ簭": d.data[0].宸ュ簭 + , "HProcID": d.data[0].hprocid, "宸ヤ綔涓績浠g爜": d.data[0].宸ヤ綔涓績浠g爜, "HCenterID": d.data[0].HCenterID, "宸ヤ綔涓績": d.data[0].宸ヤ綔涓績鍚嶇О, "HSupID": d.data[0].HSupID + , "渚涘簲鍟嗕唬鐮�": d.data[0].渚涘簲鍟嗕唬鐮�, "渚涘簲鍟�": d.data[0].渚涘簲鍟�, "HSupFlag": d.data[0].濮斿鏍囪 == 0 ? false : true, "HTimeUnit": d.data[0].鏃堕棿鍗曚綅, "HUnitTime": d.data[0].杩愯鏃堕棿 + , "HWorkQty": d.data[0].鍔犲伐鏁伴噺, "HPassRate": d.data[0].鑹巼, "HOverRate": d.data[0].瓒呴姣斾緥, "HReadyTime": d.data[0].鍑嗗鏃堕棿, "HQueueTime": d.data[0].鎺掗槦鏃堕棿 + , "HMoveTime": d.data[0].杞Щ鏃堕棿, "HNextProcFlag": d.data[0].HNextProcFlag == 0 ? false : true, "HFlowProc": d.data[0].娴佽浆宸ュ簭 == 0 ? false : true, "HSubStdEmpQty": d.data[0].鏍囧噯浜烘暟, "HSubCanUseSourceQty": d.data[0].鍙搷浣滆澶囨暟 + , "HFixPrice": d.data[0].鐝骇瀹氶, "HProcPrice": d.data[0].鍔犲伐鍗曚环, "HBadPrice": d.data[0].涓嶅悎鏍煎崟浠�, "HWasterPrice": d.data[0].鎶ュ簾鍗曚环, "HStdFlag": d.data[0].鏍囧噯瀹氶 + , "HBeginDayQty": d.data[0].寮�宸ヤ綑閲忓ぉ鏁�, "HBeginFixQty": d.data[0].寮�宸ヤ綑閲忓浐鏁�, "HFixWorkDays": d.data[0].涓婇亾鍥哄畾澶╂暟, "HTrunWorkDays": d.data[0].涓婇亾寰幆鍛ㄦ湡, "HReadyTimes": d.data[0].鏈亾鍑嗗鏃堕棿 + , "HICMOReadyTimes": d.data[0].鎹㈠崟鍑嗗鏃堕棿, "HAutoTrunFlag": d.data[0].鑷姩绉昏浆, "HTechnologyParameter": d.data[0].宸ヨ壓鍙傛暟, "HPicNum": d.data[0].鍥剧焊缂栧彿, "HProcCheckNote": d.data[0].鏈伐搴忕‘璁よ褰� + , "HProcWorkNum": d.data[0].绋嬪簭鍙� }]; option.data = rowdata; table.render(option); + if (d.data[0].濮斿鏍囪) { + $('#HSupFlag1').attr("checked", true); + } + if (d.data[0].HNextProcFlag) { + $('#HNextProcFlag1').attr("checked", true); + } + if (d.data[0].娴佽浆宸ュ簭) { + $('#HFlowProc1').attr("checked", true); + } + if (d.data[0].鏍囧噯瀹氶) { + $('#HStdFlag1').attr("checked", true); + } + if (d.data[0].鑷姩绉昏浆) { + $('#HAutoTrunFlag1').attr("checked", true); + } + form.render('checkbox'); + $('#HProcType1').find("option[value='" + d.data[0].宸ュ簭绫诲瀷+ "']").attr("selected", true); + form.render('select'); } }) } //淇濆瓨HMaker function set_AddNew(data) { + var num = []; + for (var i = 0; i < table.cache["mainTable"].length; i++) { + if (table.cache["mainTable"][i] != "") { + table.cache["mainTable"][i].LAY_TABLE_INDEX = i; + num.push(table.cache["mainTable"][i]) + } + } + data.field.HPRDORGID = sessionStorage["OrganizationID"];//缁勭粐 var sMainStr = JSON.stringify(data.field); - var sSubStr = JSON.stringify(table.cache['mainTable']); + var sSubStr = JSON.stringify(num); var hentryid = linteridSub;//瀛愯〃 鎺掑簭id var sMainSub = sMainStr + ';' + sSubStr + ';' + hentryid + ';' + OperationType; var index = layer.load(); - $.ajax({ type: "POST", url: GetWEBURL() + "/Gy_RoutingBill/AddBill", @@ -994,7 +1446,11 @@ } //闈炵┖楠岃瘉 function AllowLoadData(data) { - + + if ($("#HMaterNumber").val() == "") { + layer.msg("浜у搧浠g爜娌℃湁閫夋嫨"); + return false; + } if ($("#HUnitName").val() == "") { layer.msg("璁¢噺鍗曚綅娌℃湁閫夋嫨"); return false; @@ -1015,7 +1471,7 @@ layer.msg("璇峰嬀閫夐粯璁ゅ伐鑹�"); return false; } - + return true; //if ($("#HBillNo").val() == '') { // layer.msg("閿欒鐨勫崟鎹彿", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html" index 4a851bd..4897ea7 100644 --- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html" +++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html" @@ -277,6 +277,10 @@ , title: '宸ヨ壓璺嚎-鏂板' , shift: 0//寮瑰嚭鍔ㄧ敾 , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=1&linterid=&HSouceBillType=&linteridSub=-1' + , end: function () { + //鍒锋柊椤甸潰, + location.reload(); + } }) } //#endregion @@ -296,6 +300,10 @@ , title: '宸ヨ壓璺嚎-缂栬緫' , shift: 0//寮瑰嚭鍔ㄧ敾 , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=&linteridSub=' + linteridSub + , end: function () { + //鍒锋柊椤甸潰, + location.reload(); + } }) } else { layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒'); diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpMaintenanceBillList_PDA.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpMaintenanceBillList_PDA.html" index 801ffb1..3ae5aab 100644 --- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpMaintenanceBillList_PDA.html" +++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpMaintenanceBillList_PDA.html" @@ -79,22 +79,23 @@ <div class="layui-card" style="padding: 15px;background-color: #efefef;"> <div class="layui-card-body" style="padding: 1px;"> <form class="layui-form" action="" lay-filter="formData" id="formData" style="background-color:white;"> - <div class="maintitle">璁惧鐐规璁板綍鍗�</div> - <div class="layui-form-item" style="padding-top: 10px;"> - <div class="layui-row"> - <label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>璁惧鏉$爜</label> - <div class="layui-input-block" style="margin-left: 100px;width:46%;"> - <input type="text" name="HBarCode" id="HBarCode" lay-verify="required" placeholder="璇烽敭鍏ュ悗鍥炶溅" autocomplete="off" class="layui-input"> - </div> - </div> - </div> - <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> + <div class="maintitle">璁惧淇濆吇璁板綍鍗�</div> + <div class="layui-tab layui-tab-card" lay-filter="TabTest"> <ul class="layui-tab-title"> <li class="layui-this">鍩烘湰淇℃伅</li> <li>鍏朵粬淇℃伅</li> + <li>鏄庣粏淇℃伅</li> </ul> <div class="layui-tab-content"> <div class="layui-tab-item layui-show"> + <div class="layui-form-item" style="padding-top: 10px;"> + <div class="layui-row"> + <label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>璁惧鏉$爜</label> + <div class="layui-input-block" style="margin-left: 100px;width:46%;"> + <input type="text" name="HBarCode" id="HBarCode" lay-verify="required" placeholder="璇烽敭鍏ュ悗鍥炶溅" autocomplete="off" class="layui-input"> + </div> + </div> + </div> <div class="layui-form-item" style="padding-top: 10px;"> <div class="layui-row"> <div class="layui-inline"> @@ -157,7 +158,7 @@ <div class="layui-input-block"> <input type="text" name="HRepair" id="HRepair" class="layui-input" style="width:80%;"> <input type="hidden" name="HRepairID" id="HRepairID" class="layui-input"> - <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="HDotCheckItemList" style="width:40px;"> + <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="HRepairList" style="width:40px;"> <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> </button> </div> @@ -168,6 +169,18 @@ <textarea name="HRepairExplanation" id="HRepairExplanation" placeholder="璇疯緭鍏ュ唴瀹�" class="layui-textarea"></textarea> </div> </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 75px;padding: 9px 5px;">鏁呴殰鐧昏鍗�</label> + <div class="layui-input-block"> + <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" style="width:80%;"> + <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="" style="float:left;width:150px;"> + <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" class="layui-input" value="" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn layui-btn-primary" 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> <div class="layui-row"> <div class="layui-inline"> @@ -197,14 +210,6 @@ <label class="layui-form-label" style="width: 75px;">璁惧鍨嬪彿:</label> <div class="layui-input-block" style="margin-left: 85px;"> <input type="text" name="HBarModel" id="HBarModel" class="layui-input" style="background-color:#efefef4d;" readonly> - </div> - </div> - </div> - <div class="layui-row"> - <div class="layui-inline"> - <label class="layui-form-label" style="width: 75px;">鏁伴噺:</label> - <div class="layui-input-block" style="margin-left: 85px;"> - <input type="text" name="HQty" id="HQty" class="layui-input" style="background-color:#efefef4d;" readonly> </div> </div> </div> @@ -268,9 +273,23 @@ </div> </div> </div> + <div class="layui-tab-item"> + <table class="" 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-Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> + </div> + </script> + <script type="text/html" id="xuhao"> + {{d.LAY_TABLE_INDEX+1}} + </script> + <script type="text/html" id="barDemo"> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> + </script> + </div> </div> </div> - <div class="layer-footer" style="text-align: center;"> <button type="button" lay-submit="" class="layui-btn buttom_box_little" lay-filter="Saver" id="Saver">鎻愪氦</button> @@ -301,7 +320,7 @@ ,laydate = layui.laydate , element = layui.element; - //鏃ユ湡鏃堕棿閫夋嫨鍣� + //#region 鏃ユ湡鏃堕棿閫夋嫨鍣� laydate.render({ elem: '#HRepairBeginDate' , type: 'datetime' @@ -330,10 +349,43 @@ elem: '#HDeleteDate' , type: 'datetime' }); + //鍒濆鍖栬〃鏍� + set_InitGrid(); + //鑾峰彇鏈�澶у崟鎹彿 + $.ajax({ + url: GetWEBURL() + "/Web/GetMAXNum", + type: "GET", + data: { "HBillType": '3910' }, + success: function (d) { + //console.log(d.data); + $("#HInterID").val("0"); + $("#HBillNo").val(d.data[0].HBillNo); + } + }); + //#endregion + + //澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(mainTable)', function (obj) { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": ""}; + switch (obj.event) { + //鏂板涓�琛� + case 'btn-AddLine': btnAddLine(NewRow); + break; + case 'btn-Edit': btnEditLine(obj); + break; + } + }); + //琛屽唴浜嬩欢 + table.on('tool(mainTable)', function (obj) { + set_GridDelete(obj); //琛屽唴鍒犻櫎 + set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫� + }); + //杩涘叆椤甸潰榛樿鍏夋爣鍦ㄦ潯褰㈢爜涓� $("#HBarCode").focus(); - //鍒濆鍩烘湰淇℃伅璧嬪�� $("#HRepairBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //鐐规寮�濮嬫椂闂� $("#HRepairEndDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //鐐规缁撴潫鏃堕棿 @@ -350,17 +402,7 @@ //妯℃不鍏锋潯鐮佹槸鍚︽壂鎻忔爣璁� var HProcExchBillNoFlag = false; - //鑾峰彇鏈�澶у崟鎹彿 - $.ajax({ - url: GetWEBURL() + "/Web/GetMAXNum", - type: "GET", - data: { "HBillType": '3910' }, - success: function (d) { - //console.log(d.data); - $("#HInterID").val("0"); - $("#HBillNo").val(d.data[0].HBillNo); - } - }); + //鏉″舰鐮佸洖杞︽柟娉� @@ -418,41 +460,35 @@ //var tableData = data.field; data.field.HMaker = sessionStorage["HUserName"];//鍒跺崟浜� var oMain = JSON.stringify(data.field); - //var oMain = data.field; - var index = layer.load(); - $.ajax({ - type: "POST", - url: GetWEBURL() + "/Sb_PDA_EqpRepairWorkBill/SaveGetEqpRepairWorkBillList", - //url:"http://localhost:12761/Cj_StationEntrustOutBill/AddBill", - async: true, - data: { "msg": oMain }, - dataType: "json", - success: function (data) { - if (data.count == 1) { - //layer.confirm(data.Message, { - // icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板'], - // btn2: function () { - // //parent.layui.admin.events.closeThisTabs();鍏抽棴椤电 - // //window.close();//鍏抽棴椤甸潰锛屾祻瑙堝櫒鏈夋晥锛孭DA鏃犳晥 - // parent.location.href = "../../../views/index.html" - // }//鍏抽棴 - //}, function () { window.location.reload(); });//鏂板 + var sSubStr = JSON.stringify(table.cache['mainTable']); + var sMainSub = oMain + ';' + sSubStr; + if (AllowLoadData(sSubStr)) { + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Sb_PDA_EqpRepairWorkBill/SaveGetEqpRepairWorkBillList", + async: true, + data: { "msg": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { + layer.msg("鎻愪氦鎴愬姛"); + $('#Saver').removeClass("buttom_box_little"); + $('#Saver').addClass("layui-btn-disabled").attr("disabled", true); + } + else { + layer.close(index); + layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + } + }, + error: function (err) { layer.close(index); - layer.msg("鎻愪氦鎴愬姛"); - $('#Saver').removeClass("buttom_box_little"); - $('#Saver').addClass("layui-btn-disabled").attr("disabled", true); + layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); } - else { - layer.close(index); - layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); - } - }, - error: function (err) { - layer.close(index); - layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); - } - }); + }); + } }); + + //鏂板 form.on('submit(Add)', function (data) { $('#Saver').addClass("buttom_box_little"); @@ -463,7 +499,8 @@ // 娓呯┖琛ㄥ崟 锛堚�渇ormData鈥濇槸琛ㄥ崟鐨刬d锛� $("#formData")[0].reset(); layui.form.render(); - + option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "" }]; + table.render(option); $("#HBarCode").focus(); //鑾峰彇鏈�澶у崟鎹彿 @@ -483,6 +520,7 @@ $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //鍒涘缓鏃ユ湡 $("#HMaker").val(sessionStorage["HUserName"]); //鍒涘缓浜� }) + //閮ㄩ棬寮圭獥 form.on('submit(Department)', function () { //椤甸潰灞�-鑷畾涔� @@ -494,89 +532,328 @@ shift: 2, area: ['80%', '80%'], maxmin: true, - content: ['../Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes'], - cancel: function (index, layero) { + content: ['../../views/PublicPage/DeptInformation.html', 'yes'], + btn: ['纭畾', '鍙栨秷'] + , btn1: function (index, layero) { + //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟 + var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test" + if (checkStatus.data.length === 0) { + return layer.msg('璇烽�夋嫨鏁版嵁'); + } + $("#HDeptName").val(checkStatus.data[0].HName); + $("#HDeptID").val(checkStatus.data[0].HItemID); + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { + //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟 + //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 + }, + end: function () { + + }, + success: function (layero, index) { + } }); }); //缁翠慨浜哄脊绐� form.on('submit(HEmp)', function () { - IsSet = 0; //缁翠慨浜�0锛岃礋璐d汉1 - //椤甸潰灞�-鑷畾涔� layer.open({ type: 2, skin: 'layui-layer-rim', //鍔犱笂杈规 - title: '缁翠慨浜哄垪琛�', + title: '浜哄憳鍒楄〃', closeBtn: 1, shift: 2, area: ['80%', '80%'], maxmin: true, - content: ['../Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HWorker', 'yes'], - cancel: function (index, layero) { + content: ['../PublicPage/UserInformation.html', 'yes'], + btn: ['纭畾', '鍙栨秷'] + , btn1: function (index, layero) { + + //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟 + var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test" + if (checkStatus.data.length === 0) { + return layer.msg('璇烽�夋嫨鏁版嵁'); + } + $("#HEmpName").val(checkStatus.data[0].HName); + $("#HEmpID").val(checkStatus.data[0].HItemID); + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { + //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟 + //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 + }, + end: function () { + + }, + success: function (layero, index) { + } }); }); - //鐐规椤圭洰寮圭獥 - form.on('submit(HDotCheckItemList)', function () { - //椤甸潰灞�-鑷畾涔� + //缁翠慨椤圭洰寮圭獥 + form.on('submit(HRepairList)', function () { layer.open({ type: 2, skin: 'layui-layer-rim', //鍔犱笂杈规 - title: '鐐规椤圭洰鍒楄〃', + title: '缁翠慨椤圭洰鍒楄〃', closeBtn: 1, shift: 2, area: ['80%', '80%'], maxmin: true, - content: ['../Baseset/鍩虹璧勬枡/Gy_CheckItemList.html', 'yes'], - cancel: function (index, layero) { + content: ['../PublicPage/RepairItemInformation.html', 'yes'], + btn: ['纭畾', '鍙栨秷'] + , btn1: function (index, layero) { + + //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟 + var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test" + if (checkStatus.data.length === 0) { + return layer.msg('璇烽�夋嫨鏁版嵁'); + } + $("#HRepair").val(checkStatus.data[0].HName); + $("#HRepairID").val(checkStatus.data[0].HItemID); + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { + //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟 + //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 + }, + end: function () { + + }, + success: function (layero, index) { + } }); }); //璐熻矗浜哄脊绐� form.on('submit(HManager)', function () { - IsSet = 1; //缁翠慨浜�0锛岃礋璐d汉1 //椤甸潰灞�-鑷畾涔� layer.open({ type: 2, skin: 'layui-layer-rim', //鍔犱笂杈规 - title: '璐熻矗浜哄垪琛�', + title: '浜哄憳鍒楄〃', closeBtn: 1, shift: 2, area: ['80%', '80%'], maxmin: true, - content: ['../Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HWorker', 'yes'], - cancel: function (index, layero) { + content: ['../PublicPage/UserInformation.html', 'yes'], + btn: ['纭畾', '鍙栨秷'] + , btn1: function (index, layero) { + + //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟 + var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test" + if (checkStatus.data.length === 0) { + return layer.msg('璇烽�夋嫨鏁版嵁'); + } + $("#HManagerName").val(checkStatus.data[0].HName); + $("#HManagerID").val(checkStatus.data[0].HItemID); + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { + //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟 + //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 + }, + end: function () { + + }, + success: function (layero, index) { + } }); }); + //琛ㄥご淇℃伅閫夋嫨鍗曟嵁寮圭獥 + form.on('submit(XDHList)', function () { + //椤甸潰灞�-鑷畾涔� + layer.open({ + type: 2, + skin: 'layui-layer-rim', //鍔犱笂杈规 + title: '璁惧缁翠慨鐧昏鍗�', + shift: 2, + area: ['90%', '90%'], + content: ['../璁惧绠$悊/Sb_EqpConkBookBillList.html', 'yes'], + btn: ['纭畾', '鍙栨秷'] + , btn1: function (index, layero) { + var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test" + if (checkStatus.data.length === 0) { + return layer.msg('璇烽�夋嫨鍗曟嵁鏁版嵁'); + } + $("#HMainSourceBillNo").val(checkStatus.data[0].鍗曟嵁鍙�); + $("#HMainSourceInterID").val(checkStatus.data[0].hmainid); + $("#HMainSourceEntryID").val(checkStatus.data[0].hsubid); + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { + //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟 + //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 + }, + end: function () { + + }, + success: function (layero, index) { + //layer.full(index); + } + }); + }); + + + //浠ヤ笅涓烘椤甸潰鎵�鏈夋柟娉� + //鍒濆鍖栬〃鏍� + function set_InitGrid() { + //琛ㄥご + columns = [ + { type: 'checkbox', fixed: 'left' } + , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" } + , { field: 'HRepairID', title: 'HRepairID', edit: 'text', event: "", hide: true } + , { field: 'HRepairCode', title: '缁翠慨椤圭洰浠g爜', edit: 'text', event: "", event: "HRepairCode" } + , { field: 'HRepairName', title: '缁翠慨椤圭洰', edit: 'text', event: "" } + , { field: 'HManagerID', title: 'HManagerID', edit: 'text', hide: true } + , { field: 'HManagerCode', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: "HManagerCode" } + , { field: 'HManagerName', title: '璐熻矗浜�', edit: 'text' } + , { field: 'HRepairExplanation', title: '缁翠慨瑕佹眰', edit: 'text' } + , { field: 'HRemark', title: '澶囨敞', event: "", edit: 'text' } + , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 150 } + ]; + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , page: true + , cellMinWidth: 120 + , totalRow: true + , limit: 10 + , height: 'full-50' + , cols: [columns] + , limits: [50, 500, 1000, 5000] + , done: function (res, curr, count) { + + } + }; + option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "" }]; + table.render(option); + } + //澧炲姞涓�琛� + function btnAddLine(NewRow) { + var tableBak = table.cache["mainTable"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁 + buttonArr = [];//娓呯┖鏁扮粍 + for (var i = 0; i < tableBak.length; i++) { + buttonArr.push(tableBak[i]); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍 + } + buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛� + table.reload("mainTable", { + data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍� + }) + } + //缂栬緫涓�琛� + function btnEditLine() { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + layer.open({ + type: 2 + , area: ['80%', '80%'] + , title: '缂栬緫PDA璁惧缁翠慨' + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: '../璁惧绠$悊/Sb_EqpMaintenanceBillList_PDAEdit.html?OperationType=3&linterid=&HSouceBillType=' + , resize: false + , btn: ['纭畾', '鍙栨秷'] + , yes: function (index, layero) { + + //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟 + var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰 + var HRepairID = parent.layer.getChildFrame('#HRepairID').val(); + var HRepairCode = parent.layer.getChildFrame('#HRepairCode').val(); + var HRepairName = parent.layer.getChildFrame('#HRepairName').val(); + var HManagerID = parent.layer.getChildFrame('#HManagerID').val(); + var HManagerCode = parent.layer.getChildFrame('#HManagerCode').val(); + var HManagerName = parent.layer.getChildFrame('#HManagerName').val(); + var HRepairExplanation = parent.layer.getChildFrame('#HRepairExplanation').val(); + if (HRepairID == "") { + return layer.msg('璇烽�夋嫨缁翠慨椤圭洰'); + } + if (HManagerID == "") { + return layer.msg('璇烽�夋嫨璐熻矗浜�'); + } + buttonArr = [];//娓呯┖鏁扮粍 + var checkrow = { + "HRepairID": HRepairID, "HRepairCode": HRepairCode, "HRepairName": HRepairName, + "HManagerID": HManagerID, "HManagerCode": HManagerCode, "HManagerName": HManagerName, + "HRepairExplanation": HRepairExplanation + }; + buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍 + table.reload("mainTable", { + data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍� + }) + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , end: function () { + + } + , cancel: function () { + + } + }) + } else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒'); + } + } + // 琛ㄦ牸琛屽唴浜嬩欢鍒犻櫎 + function set_GridDelete(obj) { + var data = obj.data; + var rowIndex = $(obj.tr).attr("data-index"); + if (obj.event === 'del') { + layer.confirm('鐪熺殑鍒犻櫎琛屼箞', function (index) { + console.log("绱㈠紩涓�:" + rowIndex); + if (rowIndex === '0') { + layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�'); + } else { + //obj.del(); + //layer.close(index); + var oldData = table.cache["mainTable"]; + oldData.splice(obj.tr.data('index'), 1); + table.reload('mainTable', { data: oldData }); + layer.close(index); + } + }); + } + } + //闈炵┖楠岃瘉 + function AllowLoadData(sSubStr) { + if (typeof (sSubStr) == "undefined" || sSubStr == "" || sSubStr == "[]") { + layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return false; + } + if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") { + sSubStr = JSON.parse(sSubStr); + for (var i = 0; i < sSubStr.length; i++) { + if (sSubStr[i].HManagerCode == "") { + layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璐熻矗浜轰唬鐮佷俊鎭负绌�!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return false; + } + if (sSubStr[i].HRepairCode == "") { + layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,缁翠慨椤圭洰浠g爜淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return false; + } + else { + return true; + } + } + } + } + //浠ヤ笂涓簂ayui妯″潡 }); - //杩斿洖閮ㄩ棬 - function GetHDeptNameValue(obj) { - $("#HDeptName").val(obj[0].HName); - $("#HDeptID").val(obj[0].HItemID); - } - //杩斿洖缁翠慨浜恒�佽礋璐d汉 - function GetHWorkerValue(obj) { - if (IsSet == 0) { - $("#HEmpName").val(obj[0].HName); - $("#HEmpID").val(obj[0].HItemID); - } - if (IsSet == 1) { - $("#HManagerName").val(obj[0].HName); - $("#HManagerID").val(obj[0].HItemID); - } - } - //杩斿洖缁翠慨椤圭洰 - function GetHCheckNameValue(obj) { - $("#HRepair").val(obj[0].HName); - $("#HRepairID").val(obj[0].HItemID); - } </script> </body> </html> diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpMaintenanceBillList_PDAEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpMaintenanceBillList_PDAEdit.html" new file mode 100644 index 0000000..2a9f3d8 --- /dev/null +++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpMaintenanceBillList_PDAEdit.html" @@ -0,0 +1,245 @@ +锘�<!DOCTYPE html> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>缂栬緫PDA璁惧缁翠慨璁板綍</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"> + <!--寮曠敤layui鏍峰紡鏂囦欢--> + <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> + <!--寮曠敤layui js鏂囦欢--> + <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/zgqCustom/zgqCustom.js"></script> + <!--鑷畾涔夋牱寮�--> + <style> + .maintitle { + background-color: #1492ff; + color: #fff; + padding: 5px 10px; + border: none; + border-radius: 4px; + } + + .title { + border-left: 4px solid #1492ff; + padding-left: 6px; + margin: 20px 10px 4px; + font-size: 16px; + color: #333; + } + + .buttom_box_little { + width: 60px; + height: 36px; + color: #fff; + background-color: #1492ff; + border-radius: 4px; + border: none; + margin: 10px; + } + + .layui-input { + width: 93%; + } + + .layui-inline, img { + display: block; + vertical-align: middle + } + + .layui-input, .layui-textarea { + display: inline-block; + width: 100%; + padding-left: 10px; + } + + .laydate-time-list ol { + overflow-x: hidden !important; + overflow-y: auto !important; + } + + .layui-form-label { + padding: 9px 5px; + width: 85px; + } + + .layui-input-block { + margin-left: 85px; + min-height: 36px; + } + </style> +</head> +<body> + <div class="layui-fluid" style="padding: 0;"> + <div class="layui-card" style="padding: 15px;background-color: #efefef;"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="formData" id="formData" style="background-color:white;"> + <div class="maintitle">缂栬緫PDA璁惧缁翠慨璁板綍</div> + <div class="layui-tab layui-tab-card" lay-filter="TabTest"> + <div class="layui-tab-content"> + <div class="layui-tab-item layui-show"> + <div class="layui-form-item" style="padding-top: 10px;"> + <div class="layui-row"> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 75px;padding: 9px 5px;">缁翠慨椤圭洰:</label> + <div class="layui-input-block"> + <input type="text" name="HRepairName" id="HRepairName" class="layui-input" style="width:80%;"> + <input type="hidden" name="HRepairID" id="HRepairID" class="layui-input"> + <input type="hidden" name="HRepairCode" id="HRepairCode" class="layui-input"> + <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="HRepairList" 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-inline"> + <label class="layui-form-label" style="width: 75px;padding: 9px 5px;">璐熻矗浜�:</label> + <div class="layui-input-block"> + <input type="text" name="HManagerName" id="HManagerName" class="layui-input" style="width:80%;"> + <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input"> + <input type="hidden" name="HManagerCode" id="HManagerCode" class="layui-input"> + <button type="button" lay-submit="" class="layui-btn layui-btn-primary" 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-inline"> + <label class="layui-form-label" style="width: 75px;padding: 9px 5px;">缁翠慨瑕佹眰:</label> + <div class="layui-input-inline"> + <textarea placeholder="璇疯緭鍏ョ淮淇姹�" class="layui-textarea" name="HRepairExplanation" id="HRepairExplanation"></textarea> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + + </form> + </div> + </div> + </div> + + <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> + <script> + //鑾峰彇鍙傛暟 + var params = get_UrlVars(); + if (typeof (params[params[0]]) == "undefined") { + var OperationType = 1;//鎿嶄綔绫诲瀷 + } else { + var OperationType = params[params[0]];//鎿嶄綔绫诲瀷 + var linterid = params[params[1]];//婧愬崟id + var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷 + } + + + layui.config({ + base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['index', 'form', 'laydate', 'table', 'element'], function () { + //#region 鍏叡鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , laydate = layui.laydate + , element = layui.element; + //鏌ヨ鏉′欢 + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //琛ㄥご淇℃伅缁翠慨椤圭洰 + form.on('submit(HRepairList)', function () { + //椤甸潰灞�-鑷畾涔� + layer.open({ + type: 2, + skin: 'layui-layer-rim', //鍔犱笂杈规 + title: '缁翠慨椤圭洰鍒楄〃', + closeBtn: 1, + shift: 2, + area: ['80%', '80%'], + maxmin: true, + content: ['../PublicPage/RepairItemInformation.html', 'yes'], + btn: ['纭畾', '鍙栨秷'] + , btn1: function (index, layero) { + + //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟 + var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test" + if (checkStatus.data.length === 0) { + return layer.msg('璇烽�夋嫨鏁版嵁'); + } + $("#HRepairName").val(checkStatus.data[0].HName); + $("#HRepairID").val(checkStatus.data[0].HItemID); + $("#HRepairCode").val(checkStatus.data[0].HNumber); + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { + //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟 + //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 + }, + end: function () { + + }, + success: function (layero, index) { + + } + }); + }); + //琛ㄥご淇℃伅璐d换浜� + form.on('submit(HManagerList)', function () { + //椤甸潰灞�-鑷畾涔� + layer.open({ + type: 2, + skin: 'layui-layer-rim', //鍔犱笂杈规 + title: '璐d换浜哄垪琛�', + closeBtn: 1, + shift: 2, + area: ['90%', '90%'], + maxmin: true, + content: ['../PublicPage/UserInformation.html', 'yes'], + btn: ['纭畾', '鍙栨秷'] + , btn1: function (index, layero) { + + //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟 + var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test" + if (checkStatus.data.length === 0) { + return layer.msg('璇烽�夋嫨鏁版嵁'); + } + $("#HManagerName").val(checkStatus.data[0].HName); + $("#HManagerID").val(checkStatus.data[0].HItemID); + $("#HManagerCode").val(checkStatus.data[0].HNumber); + + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { + //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟 + //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 + }, + end: function () { + + } + }); + }); + //#endregion + + }); + </script> +</body> +</html> \ No newline at end of file diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_StationInBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_StationInBillList.html" index 239c42f..85684f9 100644 --- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_StationInBillList.html" +++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_StationInBillList.html" @@ -35,6 +35,12 @@ </div> </div> <div class="layui-inline"> + <label class="layui-form-label">宸ュ簭鍚�</label> + <div class="layui-input-block"> + <input type="date" class="layui-input" id="HName" style="width:190px;"> + </div> + </div> + <div class="layui-inline"> <label class="layui-form-label">娴佽浆鍗″彿</label> <div class="layui-input-block"> <input type="text" class="layui-input" id="HProcExchBillNo" style="width:190px;"> @@ -164,6 +170,7 @@ , { field: '娴佽浆鍗″彿', title: '娴佽浆鍗″彿', width: 160 } , { field: '杩涘嚭绔欐墍鐢ㄦ椂闂�', title: '杩涘嚭绔欐墍鐢ㄦ椂闂�', width: 160 } , { field: '宸ユ椂', title: '宸ユ椂', width: 160 } + , { field: '宸ュ簭鍚�', title: '宸ュ簭鍚�', width: 160 } , { field: '涓嶈壇鏁伴噺', title: '涓嶈壇鏁伴噺', width: 160 } , { field: '鎶ュ簾鏁伴噺', title: '鎶ュ簾鏁伴噺', width: 160 } , { field: '杩涚珯鏁伴噺', title: '杩涚珯鏁伴噺', width: 160 } @@ -307,20 +314,21 @@ type: "GET", url: GetWEBURL() + "/Sc_PackUnionBill/Sc_StationInBillSetExcel", success: function (result) { - if (result.count == 1) { - layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { - // 寰楀埌frame绱㈠紩 - var index = layer.getFrameIndex(window.name); - //鍏抽棴褰撳墠frame - layer.close(index); - //淇敼涓哄姛鍚庡埛鏂扮晫闈� - window.location.reload(); - }); + window.location.reload(); + //if (result.count == 1) { + // layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { + // // 寰楀埌frame绱㈠紩 + // var index = layer.getFrameIndex(window.name); + // //鍏抽棴褰撳墠frame + // layer.close(index); + // //淇敼涓哄姛鍚庡埛鏂扮晫闈� + // window.location.reload(); + // }); - } else { - layer.alert(result.code + result.Message, { icon: 5 }); - } - layer.close(wait); + //} else { + // layer.alert(result.code + result.Message, { icon: 5 }); + //} + //layer.close(wait); }, error: function () { layer.close(wait); layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); @@ -449,6 +457,7 @@ var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡 var HICMOBillNo = $("#HICMOBillNo").val(); //鍗曟嵁鍙� var HProcExchBillNo = $("#HProcExchBillNo").val(); + var HName = $("#HName").val(); if (HBeginDate) { sWhere += " and CONVERT(varchar(100),杩涚珯鏃堕棿, 23) >= '" + HBeginDate + "'"; @@ -462,6 +471,9 @@ if (HProcExchBillNo) { sWhere += " and 娴佽浆鍗″彿 like '%" + HProcExchBillNo + "%'"; } + if (HName) { + sWhere += " and 宸ュ簭鍚� like '%" + HName + "%'"; + } get_Display(sWhere); //璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 sWhere = " where 1 = 1 "; diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html" index 4fe96fa..2003514 100644 --- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html" +++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html" @@ -913,7 +913,10 @@ - + if (HPPQty == "") + { + HPPQty = 0; + } -- Gitblit v1.9.1