From ebbd3bfcdba808848b635078fa152754169967be Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期五, 21 六月 2024 15:15:48 +0800 Subject: [PATCH] 添加导入功能 --- WebTM/views/基础资料/基础资料/Gy_RepairCheck_Excel.html | 228 +++++++ WebTM/views/基础资料/生产基础资料/Gy_Process.html | 15 WebTM/views/基础资料/生产基础资料/Gy_Process_Excel.html | 243 ++++++++ WebTM/views/基础资料/基础资料/Gy_DotCheckEdit.html | 1 WebTM/views/基础资料/基础资料/Gy_RepairList.html | 16 WebTM/views/基础资料/基础资料/Gy_DotCheck_Excel.html | 231 +++++++ WebTM/views/基础资料/基础资料/Gy_MaintainList.html | 16 WebTM/views/基础资料/基础资料/Gy_Maintain_Excel.html | 228 +++++++ WebTM/views/设备管理/设备规程单/Sb_EquipDotCheckRule_Excel.html | 243 ++++++++ WebTM/views/基础资料/基础资料/Gy_MaintainEdit.html | 1 WebTM/views/设备管理/设备规程单/Sb_EquipDotCheckRuleList.html | 16 WebTM/views/基础资料/基础资料/Gy_RepairCheckEdit.html | 1 WebTM/views/基础资料/基础资料/Gy_Repair_Excel.html | 228 +++++++ WebTM/views/基础资料/基础资料/Gy_DotCheckList.html | 16 WebTM/views/基础资料/公用基础资料/Gy_WorkCenter_Excel.html | 233 +++++++ WebTM/views/基础资料/基础资料/Gy_RepairCheckList.html | 16 WebTM/WebTM.csproj | 7 WebTM/views/基础资料/公用基础资料/Gy_WorkCenter.html | 15 18 files changed, 1,749 insertions(+), 5 deletions(-) diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj index d55e02e..6c2f102 100644 --- a/WebTM/WebTM.csproj +++ b/WebTM/WebTM.csproj @@ -330,11 +330,17 @@ <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_CheckNoteItem.html" /> <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_MaintainLev.html" /> <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_PreventErrMould.html" /> + <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_WorkCenter_Excel.html" /> <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Xs_SeOrderBill_StockInCodeNote.aspx" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DotCheckItemMethodEdit.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DotCheckItemClassEdit.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DotCheckItemMethodList.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DotCheckItemClassList.html" /> + <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RepairCheck_Excel.html" /> + <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_Repair_Excel.html" /> + <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_Maintain_Excel.html" /> + <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DotCheck_Excel.html" /> + <Content Include="views\鍩虹璧勬枡\鐢熶骇鍩虹璧勬枡\Gy_Process_Excel.html" /> <Content Include="views\妯℃不鍏风鐞哱妯″叿鍏朵粬鍏ュ簱鍗昞Sc_MouldOtherInBillList_PDA.html" /> <Content Include="views\妯℃不鍏风鐞哱妯″叿鍏朵粬鍏ュ簱鍗昞Sc_MouldOtherInBill_PDA_old.html" /> <Content Include="views\妯℃不鍏风鐞哱妯″叿鍏朵粬鍑哄簱鍗昞Sc_MouldOtherOutBillList_PDA.html" /> @@ -367,6 +373,7 @@ <Content Include="views\璁惧绠$悊\璁惧鍋滄満鍗昞Sb_EquipStopBill_PDA.html" /> <Content Include="views\璁惧绠$悊\璁惧寮�鏈哄崟\Sb_EquipBeginBillList_PDA.html" /> <Content Include="views\璁惧绠$悊\璁惧寮�鏈哄崟\Sb_EquipBeginBill_PDA.html" /> + <Content Include="views\璁惧绠$悊\璁惧瑙勭▼鍗昞Sb_EquipDotCheckRule_Excel.html" /> <Content Include="views\璐ㄩ噺绠$悊\宸ヤ綔鑱旂郴鍗昞OA_WorkLinkSelfQuery.html" /> <Content Include="views\璐ㄩ噺绠$悊\宸ヤ綔鑱旂郴鍗昞OA_Add_Edit_WorkLinkBill.html" /> <Content Include="views\璐ㄩ噺绠$悊\宸ヤ綔鑱旂郴鍗昞OA_WorkLinkBillList.html" /> diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkCenter.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkCenter.html" index 2e83948..c5f6fcf 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkCenter.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkCenter.html" @@ -90,6 +90,7 @@ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Stop"><i class="layui-icon layui-icon-radio"></i>绂佺敤</button> @@ -157,6 +158,9 @@ break; //鍒犻櫎 case 'set_DeleteBill': set_DeleteBill(); + break; + //瀵煎叆 + case 'set_SouceExcel': set_SouceExcel(); break; //娴忚 case 'get_PrintReport': get_PrintReport(); @@ -370,7 +374,16 @@ } }) } - + //瀵煎叆 + function set_SouceExcel() { + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '宸ヤ綔涓績璧勬簮瀵煎叆' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../鍏敤鍩虹璧勬枡/Gy_WorkCenter_Excel.html?OperationType=dao&HSouceBillType=' + }) + } //#region 鏌ヨ function get_Display(sWhere) { diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkCenter_Excel.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkCenter_Excel.html" new file mode 100644 index 0000000..6d62d15 --- /dev/null +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkCenter_Excel.html" @@ -0,0 +1,233 @@ +锘�<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <title>宸ヤ綔涓績瀵煎叆</title> + <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> +</head> +<body> + <div class="layui-fluid" style="padding: 0;"> + <div class="layui-card" style="padding: 2px;background-color: #efefef;"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> + <div style="padding: 10px; "> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button> + </div> + <div class="layui-tab" lay-filter="tab-POStockInBill"> + <div class="layui-tab-content"> + <!--鍩烘湰淇℃伅--> + <div class="layui-tab-item layui-show"> + <div class="layui-form-item" style="padding-top: 10px;"> + + </div> + </div> + </div> + </div> + + <table class="" id="mainTable" lay-filter="mainTable"></table> + <script type="text/html" id="toolbarDemo"> + <div class="layui-btn-container"> + </div> + </script> + </form> + </div> + </div> + </div> +</body> +</html> +<script type="text/html" id="barDemo"> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> +</script> +<script> + + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + , util = layui.util + , tree = layui.tree + , util = layui.util + , upload = layui.upload + + + var option = []; + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + //鍒濆鍖栫晫闈� + set_ClearBill(); + + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //鏂囦欢涓婁紶 + upload.render({ + elem: '#UpLoad', + url: GetWEBURL() + '/Gy_WorkCenter/Gy_WorkCenter_Excel', + contentType: 'application/json', + exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨� + done: function (data1) { + if (data1.count == 1) { + option.data = data1.data; + table.render(option); + } else { + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, + error: function (err) { + debugger + layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 }); + } + }); + + //琛屽唴浜嬩欢 + table.on('tool(mainTable)', function (obj) { + set_GridDelete(obj); //琛屽唴鍒犻櫎 + }); + + //瀵煎叆 淇濆瓨鏁版嵁 + form.on('submit(btnSave)', function (data) { + if (table.cache["mainTable"] != null) { + set_AddNew(data); + } + else { + layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!"); + } + }) + + //閫�鍑� + form.on('submit(Cancel)', function () { + Pub_Close(1); + }) + + + //#endregion + + //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶 + + //#region 鍒濆鍖栫晫闈� + function set_ClearBill() { + //鍒濆鍖栬〃鏍� + set_InitGrid(); + } + //#endregion + + + //鍒濆鍖栬〃鏍� + function set_InitGrid() { + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , height: 'full-120' + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + , loading: false + , cols: [[ + { type: 'checkbox', fixed: 'left' } + , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true } + , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 } + , { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', width: 120 } + , { field: '宸ヤ綔涓績鍚嶇О', title: '宸ヤ綔涓績鍚嶇О', width: 120 } + , { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', width: 120 } + , { field: 'HDeptID', title: 'HDeptID', width: 120, hide: true } + , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 120 } + , { field: '閮ㄩ棬鍚嶇О', title: '閮ㄩ棬鍚嶇О', width: 120 } + , { field: '宸ヤ綔鏃堕棿', title: '宸ヤ綔鏃堕棿', width: 120 } + , { field: '璁惧鏁伴噺', title: '璁惧鏁伴噺', width: 120 } + , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } + ]] + }; + + //娓叉煋椤甸潰 + table.render(option); + //DisPlay_HideColumn(); + } + + //琛屽唴鍒犻櫎 + 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 { + var oldData = option.data; + oldData.splice(obj.tr.data('index'), 1) + option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓� + table.render(option); + layer.close(index); + } + }); + } + } + + //瀵煎叆(淇濆瓨) + function set_AddNew(data) { + var num = []; + for (var i = 0; i < option.data.length; i++) { + if (option.data[i] != "") { + num.push(option.data[i]) + } + } + + var sSubStr = JSON.stringify(num); + var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"]; + var index = layer.load(); + + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Gy_WorkCenter/Gy_WorkCenter_btnSave", + async: true, + data: { "sMainSub": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { + layer.close(index); + layer.msg(data.Message); + option.data = null; + table.cache["mainTable"] = null; + table.render(option); + } + 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: "娓╅Θ鎻愮ず" }); + } + }); + } + + //#endregion + + }); + +</script> \ No newline at end of file diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckEdit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckEdit.html" index 4edd8fd..809fe86 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckEdit.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckEdit.html" @@ -99,7 +99,6 @@ var OperationType = 1;//鎿嶄綔绫诲瀷 var closeType = 2; //鍏抽棴绫诲瀷 } else { - debugger; var OperationType = params[params[0]];//鎿嶄綔绫诲瀷 var linterid = params[params[1]];//婧愬崟id var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷 diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckList.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckList.html" index 3e54945..8d2a44b 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckList.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckList.html" @@ -87,6 +87,7 @@ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button> <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>--> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> @@ -147,6 +148,9 @@ break; //鍒犻櫎 case 'set_DeleteBill': set_DeleteBill(); + break; + //瀵煎叆 + case 'set_SouceExcel': set_SouceExcel(); break; //鍒锋柊 case 'get_Refresh': set_ClearQuery(); @@ -389,6 +393,18 @@ //#endregion //#region 宸ュ叿鏍忎簨浠� + //瀵煎叆 + function set_SouceExcel() { + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '鐢熶骇璧勬簮瀵煎叆' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../鍩虹璧勬枡/Gy_DotCheck_Excel.html?OperationType=dao&HSouceBillType=' + }) + } + + //鏂板 function set_AddNew() { //椤甸潰灞�-鑷畾涔� diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheck_Excel.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheck_Excel.html" new file mode 100644 index 0000000..5b27c45 --- /dev/null +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheck_Excel.html" @@ -0,0 +1,231 @@ +锘�<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <title>鐢熶骇璧勬簮瀵煎叆</title> + <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> +</head> +<body> + <div class="layui-fluid" style="padding: 0;"> + <div class="layui-card" style="padding: 2px;background-color: #efefef;"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> + <div style="padding: 10px; "> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button> + </div> + <div class="layui-tab" lay-filter="tab-POStockInBill"> + <div class="layui-tab-content"> + <!--鍩烘湰淇℃伅--> + <div class="layui-tab-item layui-show"> + <div class="layui-form-item" style="padding-top: 10px;"> + + </div> + </div> + </div> + </div> + + <table class="" id="mainTable" lay-filter="mainTable"></table> + <script type="text/html" id="toolbarDemo"> + <div class="layui-btn-container"> + </div> + </script> + </form> + </div> + </div> + </div> +</body> +</html> +<script type="text/html" id="barDemo"> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> +</script> +<script> + + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + , util = layui.util + , tree = layui.tree + , util = layui.util + , upload = layui.upload + + + var option = []; + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + //鍒濆鍖栫晫闈� + set_ClearBill(); + + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //鏂囦欢涓婁紶 + upload.render({ + elem: '#UpLoad', + url: GetWEBURL() + '/Gy_DotCheck/Gy_DotCheck_Excel', + contentType: 'application/json', + exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨� + done: function (data1) { + if (data1.count == 1) { + option.data = data1.data; + table.render(option); + } else { + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, + error: function (err) { + debugger + layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 }); + } + }); + + //琛屽唴浜嬩欢 + table.on('tool(mainTable)', function (obj) { + set_GridDelete(obj); //琛屽唴鍒犻櫎 + }); + + //瀵煎叆 淇濆瓨鏁版嵁 + form.on('submit(btnSave)', function (data) { + if (table.cache["mainTable"] != null) { + set_AddNew(data); + } + else { + layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!"); + } + }) + + //閫�鍑� + form.on('submit(Cancel)', function () { + Pub_Close(1); + }) + + + //#endregion + + //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶 + + //#region 鍒濆鍖栫晫闈� + function set_ClearBill() { + //鍒濆鍖栬〃鏍� + set_InitGrid(); + } + //#endregion + + + //鍒濆鍖栬〃鏍� + function set_InitGrid() { + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , height: 'full-120' + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + , loading: false + , cols: [[ + { type: 'checkbox', fixed: 'left' } + , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true } + , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 } + , { field: '缁勭粐鍚嶇О', title: '缁勭粐', width: 120 } + , { field: '鐐规椤圭洰鍚嶇О', title: '鐐规椤圭洰鍚嶇О', width: 120 } + , { field: '鐐规椤圭洰浠g爜', title: '鐐规椤圭洰浠g爜', width: 120 } + , { field: 'HDotCheckItemClassID', title: 'HDotCheckItemClassID', width: 120, hide: true } + , { field: '鐐规椤圭洰鍒嗙被浠g爜', title: '鐐规椤圭洰鍒嗙被浠g爜', width: 120 } + , { field: '鐐规椤圭洰鍒嗙被鍚嶇О', title: '鐐规椤圭洰鍒嗙被鍚嶇О', width: 120 } + , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } + ]] + }; + + //娓叉煋椤甸潰 + table.render(option); + //DisPlay_HideColumn(); + } + + //琛屽唴鍒犻櫎 + 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 { + var oldData = option.data; + oldData.splice(obj.tr.data('index'), 1) + option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓� + table.render(option); + layer.close(index); + } + }); + } + } + + //瀵煎叆(淇濆瓨) + function set_AddNew(data) { + var num = []; + for (var i = 0; i < option.data.length; i++) { + if (option.data[i] != "") { + num.push(option.data[i]) + } + } + + var sSubStr = JSON.stringify(num); + var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"]; + var index = layer.load(); + + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Gy_DotCheck/Gy_DotCheck_btnSave", + async: true, + data: { "sMainSub": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { + layer.close(index); + layer.msg(data.Message); + option.data = null; + table.cache["mainTable"] = null; + table.render(option); + } + 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: "娓╅Θ鎻愮ず" }); + } + }); + } + + //#endregion + + }); + +</script> \ No newline at end of file diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainEdit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainEdit.html" index a170f6c..6bef0f8 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainEdit.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainEdit.html" @@ -90,7 +90,6 @@ var OperationType = 1;//鎿嶄綔绫诲瀷 var closeType = 2; //鍏抽棴绫诲瀷 } else { - debugger; var OperationType = params[params[0]];//鎿嶄綔绫诲瀷 var linterid = params[params[1]];//婧愬崟id var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷 diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainList.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainList.html" index 99c8bda..b81de60 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainList.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainList.html" @@ -87,6 +87,7 @@ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>瀹℃牳</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="btn-Audit"><i class="layui-icon layui-icon-radio"></i>鍙嶅鏍�</button> @@ -149,6 +150,9 @@ break; //鍒犻櫎 case 'set_DeleteBill': set_DeleteBill(); + break; + //瀵煎叆 + case 'set_SouceExcel': set_SouceExcel(); break; //鍒锋柊 case 'get_Refresh': get_Refresh(); @@ -367,6 +371,18 @@ //#endregion //#region 宸ュ叿鏍忎簨浠� + + //瀵煎叆 + function set_SouceExcel() { + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '淇濆吇椤圭洰璧勬簮瀵煎叆' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../鍩虹璧勬枡/Gy_Maintain_Excel.html?OperationType=dao&HSouceBillType=' + }) + } + //鏂板 function set_AddNew() { //椤甸潰灞�-鑷畾涔� diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Maintain_Excel.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Maintain_Excel.html" new file mode 100644 index 0000000..b663da1 --- /dev/null +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Maintain_Excel.html" @@ -0,0 +1,228 @@ +锘�<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <title>鐢熶骇璧勬簮瀵煎叆</title> + <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> +</head> +<body> + <div class="layui-fluid" style="padding: 0;"> + <div class="layui-card" style="padding: 2px;background-color: #efefef;"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> + <div style="padding: 10px; "> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button> + </div> + <div class="layui-tab" lay-filter="tab-POStockInBill"> + <div class="layui-tab-content"> + <!--鍩烘湰淇℃伅--> + <div class="layui-tab-item layui-show"> + <div class="layui-form-item" style="padding-top: 10px;"> + + </div> + </div> + </div> + </div> + + <table class="" id="mainTable" lay-filter="mainTable"></table> + <script type="text/html" id="toolbarDemo"> + <div class="layui-btn-container"> + </div> + </script> + </form> + </div> + </div> + </div> +</body> +</html> +<script type="text/html" id="barDemo"> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> +</script> +<script> + + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + , util = layui.util + , tree = layui.tree + , util = layui.util + , upload = layui.upload + + + var option = []; + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + //鍒濆鍖栫晫闈� + set_ClearBill(); + + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //鏂囦欢涓婁紶 + upload.render({ + elem: '#UpLoad', + url: GetWEBURL() + '/Gy_Maintain/Gy_Maintain_Excel', + contentType: 'application/json', + exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨� + done: function (data1) { + if (data1.count == 1) { + option.data = data1.data; + table.render(option); + } else { + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, + error: function (err) { + debugger + layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 }); + } + }); + + //琛屽唴浜嬩欢 + table.on('tool(mainTable)', function (obj) { + set_GridDelete(obj); //琛屽唴鍒犻櫎 + }); + + //瀵煎叆 淇濆瓨鏁版嵁 + form.on('submit(btnSave)', function (data) { + if (table.cache["mainTable"] != null) { + set_AddNew(data); + } + else { + layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!"); + } + }) + + //閫�鍑� + form.on('submit(Cancel)', function () { + Pub_Close(1); + }) + + + //#endregion + + //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶 + + //#region 鍒濆鍖栫晫闈� + function set_ClearBill() { + //鍒濆鍖栬〃鏍� + set_InitGrid(); + } + //#endregion + + + //鍒濆鍖栬〃鏍� + function set_InitGrid() { + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , height: 'full-120' + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + , loading: false + , cols: [[ + { type: 'checkbox', fixed: 'left' } + , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true } + , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 } + , { field: '缁勭粐鍚嶇О', title: '缁勭粐', width: 120 } + , { field: '淇濆吇椤圭洰鍚嶇О', title: '淇濆吇椤圭洰鍚嶇О', width: 120 } + , { field: '淇濆吇椤圭洰浠g爜', title: '淇濆吇椤圭洰浠g爜', width: 120 } + , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } + ]] + }; + + //娓叉煋椤甸潰 + table.render(option); + //DisPlay_HideColumn(); + } + + //琛屽唴鍒犻櫎 + 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 { + var oldData = option.data; + oldData.splice(obj.tr.data('index'), 1) + option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓� + table.render(option); + layer.close(index); + } + }); + } + } + + //瀵煎叆(淇濆瓨) + function set_AddNew(data) { + var num = []; + for (var i = 0; i < option.data.length; i++) { + if (option.data[i] != "") { + num.push(option.data[i]) + } + } + + var sSubStr = JSON.stringify(num); + var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"]; + var index = layer.load(); + + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Gy_Maintain/Gy_Maintain_btnSave", + async: true, + data: { "sMainSub": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { + layer.close(index); + layer.msg(data.Message); + option.data = null; + table.cache["mainTable"] = null; + table.render(option); + } + 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: "娓╅Θ鎻愮ず" }); + } + }); + } + + //#endregion + + }); + +</script> \ No newline at end of file diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckEdit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckEdit.html" index 2df1a59..576f820 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckEdit.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckEdit.html" @@ -90,7 +90,6 @@ var OperationType = 1;//鎿嶄綔绫诲瀷 var closeType = 2; //鍏抽棴绫诲瀷 } else { - debugger; var OperationType = params[params[0]];//鎿嶄綔绫诲瀷 var linterid = params[params[1]];//婧愬崟id var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷 diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckList.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckList.html" index 3298ae3..aa7833d 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckList.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckList.html" @@ -87,6 +87,7 @@ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> @@ -147,6 +148,9 @@ break; //鍒犻櫎 case 'set_DeleteBill': set_DeleteBill(); + break; + //瀵煎叆 + case 'set_SouceExcel': set_SouceExcel(); break; //鍒锋柊 case 'get_Refresh': get_Refresh(); @@ -225,6 +229,18 @@ //]] }; } + + //瀵煎叆 + function set_SouceExcel() { + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '缁翠慨妫�楠岄」鐩鍏�' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../鍩虹璧勬枡/Gy_RepairCheck_Excel.html?OperationType=dao&HSouceBillType=' + }) + } + //鏌ヨ function get_Display(sWhere) { var ajaxLoad = layer.load(); diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheck_Excel.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheck_Excel.html" new file mode 100644 index 0000000..36efdc8 --- /dev/null +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheck_Excel.html" @@ -0,0 +1,228 @@ +锘�<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <title>缁翠慨妫�楠岄」鐩鍏�</title> + <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> +</head> +<body> + <div class="layui-fluid" style="padding: 0;"> + <div class="layui-card" style="padding: 2px;background-color: #efefef;"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> + <div style="padding: 10px; "> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button> + </div> + <div class="layui-tab" lay-filter="tab-POStockInBill"> + <div class="layui-tab-content"> + <!--鍩烘湰淇℃伅--> + <div class="layui-tab-item layui-show"> + <div class="layui-form-item" style="padding-top: 10px;"> + + </div> + </div> + </div> + </div> + + <table class="" id="mainTable" lay-filter="mainTable"></table> + <script type="text/html" id="toolbarDemo"> + <div class="layui-btn-container"> + </div> + </script> + </form> + </div> + </div> + </div> +</body> +</html> +<script type="text/html" id="barDemo"> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> +</script> +<script> + + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + , util = layui.util + , tree = layui.tree + , util = layui.util + , upload = layui.upload + + + var option = []; + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + //鍒濆鍖栫晫闈� + set_ClearBill(); + + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //鏂囦欢涓婁紶 + upload.render({ + elem: '#UpLoad', + url: GetWEBURL() + '/Gy_RepairCheck/Gy_RepairCheck_Excel', + contentType: 'application/json', + exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨� + done: function (data1) { + if (data1.count == 1) { + option.data = data1.data; + table.render(option); + } else { + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, + error: function (err) { + debugger + layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 }); + } + }); + + //琛屽唴浜嬩欢 + table.on('tool(mainTable)', function (obj) { + set_GridDelete(obj); //琛屽唴鍒犻櫎 + }); + + //瀵煎叆 淇濆瓨鏁版嵁 + form.on('submit(btnSave)', function (data) { + if (table.cache["mainTable"] != null) { + set_AddNew(data); + } + else { + layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!"); + } + }) + + //閫�鍑� + form.on('submit(Cancel)', function () { + Pub_Close(1); + }) + + + //#endregion + + //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶 + + //#region 鍒濆鍖栫晫闈� + function set_ClearBill() { + //鍒濆鍖栬〃鏍� + set_InitGrid(); + } + //#endregion + + + //鍒濆鍖栬〃鏍� + function set_InitGrid() { + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , height: 'full-120' + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + , loading: false + , cols: [[ + { type: 'checkbox', fixed: 'left' } + , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true } + , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 } + , { field: '缁勭粐鍚嶇О', title: '缁勭粐', width: 120 } + , { field: '缁翠慨楠屾敹椤圭洰鍚嶇О', title: '缁翠慨楠屾敹椤圭洰鍚嶇О', width: 120 } + , { field: '缁翠慨楠屾敹椤圭洰浠g爜', title: '缁翠慨楠屾敹椤圭洰浠g爜', width: 120 } + , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } + ]] + }; + + //娓叉煋椤甸潰 + table.render(option); + //DisPlay_HideColumn(); + } + + //琛屽唴鍒犻櫎 + 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 { + var oldData = option.data; + oldData.splice(obj.tr.data('index'), 1) + option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓� + table.render(option); + layer.close(index); + } + }); + } + } + + //瀵煎叆(淇濆瓨) + function set_AddNew(data) { + var num = []; + for (var i = 0; i < option.data.length; i++) { + if (option.data[i] != "") { + num.push(option.data[i]) + } + } + + var sSubStr = JSON.stringify(num); + var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"]; + var index = layer.load(); + + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Gy_RepairCheck/Gy_RepairCheck_btnSave", + async: true, + data: { "sMainSub": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { + layer.close(index); + layer.msg(data.Message); + option.data = null; + table.cache["mainTable"] = null; + table.render(option); + } + 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: "娓╅Θ鎻愮ず" }); + } + }); + } + + //#endregion + + }); + +</script> \ No newline at end of file diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairList.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairList.html" index ff172b3..d3a0488 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairList.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairList.html" @@ -87,6 +87,7 @@ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>瀹℃牳</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="btn-Audit"><i class="layui-icon layui-icon-radio"></i>鍙嶅鏍�</button> @@ -152,6 +153,9 @@ break; //鍒犻櫎 case 'set_DeleteBill': set_DeleteBill(); + break; + //瀵煎叆 + case 'set_SouceExcel': set_SouceExcel(); break; //鍒锋柊 case 'get_Refresh': get_Refresh(); @@ -253,6 +257,18 @@ //]] }; } + + //瀵煎叆 + function set_SouceExcel() { + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '缁翠慨椤圭洰瀵煎叆' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../鍩虹璧勬枡/Gy_Repair_Excel.html?OperationType=dao&HSouceBillType=' + }) + } + //鏌ヨ function get_Display(sWhere) { var ajaxLoad = layer.load(); diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Repair_Excel.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Repair_Excel.html" new file mode 100644 index 0000000..8e68116 --- /dev/null +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Repair_Excel.html" @@ -0,0 +1,228 @@ +锘�<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <title>缁翠慨椤圭洰瀵煎叆</title> + <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> +</head> +<body> + <div class="layui-fluid" style="padding: 0;"> + <div class="layui-card" style="padding: 2px;background-color: #efefef;"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> + <div style="padding: 10px; "> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button> + </div> + <div class="layui-tab" lay-filter="tab-POStockInBill"> + <div class="layui-tab-content"> + <!--鍩烘湰淇℃伅--> + <div class="layui-tab-item layui-show"> + <div class="layui-form-item" style="padding-top: 10px;"> + + </div> + </div> + </div> + </div> + + <table class="" id="mainTable" lay-filter="mainTable"></table> + <script type="text/html" id="toolbarDemo"> + <div class="layui-btn-container"> + </div> + </script> + </form> + </div> + </div> + </div> +</body> +</html> +<script type="text/html" id="barDemo"> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> +</script> +<script> + + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + , util = layui.util + , tree = layui.tree + , util = layui.util + , upload = layui.upload + + + var option = []; + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + //鍒濆鍖栫晫闈� + set_ClearBill(); + + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //鏂囦欢涓婁紶 + upload.render({ + elem: '#UpLoad', + url: GetWEBURL() + '/Gy_Repair/Gy_Repair_Excel', + contentType: 'application/json', + exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨� + done: function (data1) { + if (data1.count == 1) { + option.data = data1.data; + table.render(option); + } else { + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, + error: function (err) { + debugger + layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 }); + } + }); + + //琛屽唴浜嬩欢 + table.on('tool(mainTable)', function (obj) { + set_GridDelete(obj); //琛屽唴鍒犻櫎 + }); + + //瀵煎叆 淇濆瓨鏁版嵁 + form.on('submit(btnSave)', function (data) { + if (table.cache["mainTable"] != null) { + set_AddNew(data); + } + else { + layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!"); + } + }) + + //閫�鍑� + form.on('submit(Cancel)', function () { + Pub_Close(1); + }) + + + //#endregion + + //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶 + + //#region 鍒濆鍖栫晫闈� + function set_ClearBill() { + //鍒濆鍖栬〃鏍� + set_InitGrid(); + } + //#endregion + + + //鍒濆鍖栬〃鏍� + function set_InitGrid() { + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , height: 'full-120' + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + , loading: false + , cols: [[ + { type: 'checkbox', fixed: 'left' } + , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true } + , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 } + , { field: '缁勭粐鍚嶇О', title: '缁勭粐', width: 120 } + , { field: '缁翠慨椤圭洰鍚嶇О', title: '鐢熶骇璧勬簮鍚嶇О', width: 120 } + , { field: '缁翠慨椤圭洰浠g爜', title: '鐢熶骇璧勬簮浠g爜', width: 120 } + , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } + ]] + }; + + //娓叉煋椤甸潰 + table.render(option); + //DisPlay_HideColumn(); + } + + //琛屽唴鍒犻櫎 + 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 { + var oldData = option.data; + oldData.splice(obj.tr.data('index'), 1) + option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓� + table.render(option); + layer.close(index); + } + }); + } + } + + //瀵煎叆(淇濆瓨) + function set_AddNew(data) { + var num = []; + for (var i = 0; i < option.data.length; i++) { + if (option.data[i] != "") { + num.push(option.data[i]) + } + } + + var sSubStr = JSON.stringify(num); + var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"]; + var index = layer.load(); + + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Gy_Repair/Gy_Repair_btnSave", + async: true, + data: { "sMainSub": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { + layer.close(index); + layer.msg(data.Message); + option.data = null; + table.cache["mainTable"] = null; + table.render(option); + } + 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: "娓╅Θ鎻愮ず" }); + } + }); + } + + //#endregion + + }); + +</script> \ No newline at end of file diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Process.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Process.html" index 6509043..99c11b3 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Process.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Process.html" @@ -94,6 +94,7 @@ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button> @@ -155,6 +156,9 @@ break; //鍒犻櫎 case 'set_DeleteBill': set_DeleteBill(); + break; + //瀵煎叆 + case 'set_SouceExcel': set_SouceExcel(); break; //鍒锋柊 case 'get_Refresh': get_Refresh(); @@ -323,7 +327,16 @@ } }) } - + //瀵煎叆 + function set_SouceExcel() { + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '宸ュ簭璧勬枡瀵煎叆' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../鐢熶骇鍩虹璧勬枡/Gy_Process_Excel.html?OperationType=dao&HSouceBillType=' + }) + } //#region 鏌ヨ function get_Display(sWhere) { diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Process_Excel.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Process_Excel.html" new file mode 100644 index 0000000..4a48f30 --- /dev/null +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Process_Excel.html" @@ -0,0 +1,243 @@ +锘�<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <title>宸ュ簭瀵煎叆</title> + <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> +</head> +<body> + <div class="layui-fluid" style="padding: 0;"> + <div class="layui-card" style="padding: 2px;background-color: #efefef;"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="formData" style="background-color:white;" > + <div style="padding: 10px; "> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button> + </div> + <div class="layui-tab" lay-filter="tab-POStockInBill"> + <div class="layui-tab-content"> + <!--鍩烘湰淇℃伅--> + <div class="layui-tab-item layui-show"> + <div class="layui-form-item" style="padding-top: 10px;"> + + </div> + </div> + </div> + </div> + + <table class="" id="mainTable" lay-filter="mainTable"></table> + <script type="text/html" id="toolbarDemo"> + <div class="layui-btn-container"> + </div> + </script> + </form> + </div> + </div> + </div> +</body> +</html> +<script type="text/html" id="barDemo"> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> +</script> +<script> + + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + , util = layui.util + , tree = layui.tree + , util = layui.util + , upload = layui.upload + + + var option = []; + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + //鍒濆鍖栫晫闈� + set_ClearBill(); + + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //鏂囦欢涓婁紶 + upload.render({ + elem: '#UpLoad', + url: GetWEBURL() + '/Gy_Process/Gy_Process_Excel', + contentType: 'application/json', + exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨� + done: function (data1) { + if (data1.count == 1) { + option.data = data1.data; + table.render(option); + } else { + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, + error: function (err) { + debugger + layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 }); + } + }); + + //琛屽唴浜嬩欢 + table.on('tool(mainTable)', function (obj) { + set_GridDelete(obj); //琛屽唴鍒犻櫎 + }); + + //瀵煎叆 淇濆瓨鏁版嵁 + form.on('submit(btnSave)', function (data) { + if (table.cache["mainTable"] != null) { + set_AddNew(data); + } + else { + layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!"); + } + }) + + //閫�鍑� + form.on('submit(Cancel)', function () { + Pub_Close(1); + }) + + + //#endregion + + //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶 + + //#region 鍒濆鍖栫晫闈� + function set_ClearBill() { + //鍒濆鍖栬〃鏍� + set_InitGrid(); + } + //#endregion + + + //鍒濆鍖栬〃鏍� + function set_InitGrid() { + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , height: 'full-120' + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + , loading: false + , cols: [[ + { type: 'checkbox', fixed: 'left' } + , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true } + , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 } + , { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', width: 120 } + , { field: '宸ュ簭鍚嶇О', title: '宸ュ簭鍚嶇О', width: 120 } + , { field: '宸ュ簭浠g爜', title: '宸ュ簭浠g爜', width: 120 } + , { field: 'HDeptID', title: 'HDeptID', width: 120, hide: true } + , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 120 } + , { field: '閮ㄩ棬鍚嶇О', title: '閮ㄩ棬鍚嶇О', width: 120 } + , { field: 'HWorkCenterID', title: 'HWorkCenterID', width: 120, hide: true } + , { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', width: 120 } + , { field: '宸ヤ綔涓績鍚嶇О', title: '宸ヤ綔涓績鍚嶇О', width: 120 } + , { field: 'HQCSchemeID_Fst', title: 'HQCSchemeID_Fst', width: 120, hide: true } + , { field: '棣栦欢璐ㄦ鏂规鍗曟嵁鍙�', title: '棣栦欢璐ㄦ鏂规鍗曟嵁鍙�', width: 120 } + , { field: '棣栦欢璐ㄦ鏂规鍚嶇О', title: '棣栦欢璐ㄦ鏂规鍚嶇О', width: 120 } + , { field: 'HQCSchemeID_Proc', title: 'HQCSchemeID_Proc', width: 120, hide: true } + , { field: '宸ュ簭璐ㄦ鏂规鍗曟嵁鍙�', title: '宸ュ簭璐ㄦ鏂规鍗曟嵁鍙�', width: 120 } + , { field: '宸ュ簭璐ㄦ鏂规鍚嶇О', title: '宸ュ簭璐ㄦ鏂规鍚嶇О', width: 120 } + , { field: 'HQCSchemeID_Patrol', title: 'HQCSchemeID_Patrol', width: 120, hide: true } + , { field: '宸℃璐ㄦ鏂规鍗曟嵁鍙�', title: '宸℃璐ㄦ鏂规鍗曟嵁鍙�', width: 120 } + , { field: '宸℃璐ㄦ鏂规鍚嶇О', title: '宸℃璐ㄦ鏂规鍚嶇О', width: 120 } + , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } + ]] + }; + + //娓叉煋椤甸潰 + table.render(option); + //DisPlay_HideColumn(); + } + + //琛屽唴鍒犻櫎 + 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 { + var oldData = option.data; + oldData.splice(obj.tr.data('index'), 1) + option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓� + table.render(option); + layer.close(index); + } + }); + } + } + + //瀵煎叆(淇濆瓨) + function set_AddNew(data) { + var num = []; + for (var i = 0; i < option.data.length; i++) { + if (option.data[i] != "") { + num.push(option.data[i]) + } + } + + var sSubStr = JSON.stringify(num); + var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"]; + var index = layer.load(); + + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Gy_Process/Gy_Process_btnSave", + async: true, + data: { "sMainSub": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { + layer.close(index); + layer.msg(data.Message); + option.data = null; + table.cache["mainTable"] = null; + table.render(option); + } + 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: "娓╅Θ鎻愮ず" }); + } + }); + } + + //#endregion + + }); + +</script> \ No newline at end of file diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipDotCheckRuleList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipDotCheckRuleList.html" index 3808aa5..52c44b1 100644 --- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipDotCheckRuleList.html" +++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipDotCheckRuleList.html" @@ -102,6 +102,7 @@ <button type="button" class="layui-btn layui-btn-sm" lay-event="btnAdd"><i class="layui-icon layui-icon-add-1"></i>鏂板</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btnModify"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btndelete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>鍙嶅鏍�</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>鍏抽棴</button> @@ -183,6 +184,9 @@ break; //鍒犻櫎鎸夐挳 case 'btndelete': set_DeleteBill(); + break; + //瀵煎叆 + case 'set_SouceExcel': set_SouceExcel(); break; //瀹℃牳 case 'set_CheckBill': set_CheckBill(1); @@ -440,6 +444,18 @@ get_Display(sWhere); sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 } + + //瀵煎叆 + function set_SouceExcel() { + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '鐐规瑙勭▼瀵煎叆' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../璁惧瑙勭▼鍗�/Sb_EquipDotCheckRule_Excel.html?OperationType=dao&HSouceBillType=' + }) + } + //鏂板 function set_AddNew() { //椤甸潰灞�-鑷畾涔� diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipDotCheckRule_Excel.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipDotCheckRule_Excel.html" new file mode 100644 index 0000000..bc3b1c9 --- /dev/null +++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\350\247\204\347\250\213\345\215\225/Sb_EquipDotCheckRule_Excel.html" @@ -0,0 +1,243 @@ +锘�<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <title>鐢熶骇璧勬簮瀵煎叆</title> + <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> +</head> +<body> + <div class="layui-fluid" style="padding: 0;"> + <div class="layui-card" style="padding: 2px;background-color: #efefef;"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> + <div style="padding: 10px; "> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button> + </div> + <div class="layui-tab" lay-filter="tab-POStockInBill"> + <div class="layui-tab-content"> + <!--鍩烘湰淇℃伅--> + <div class="layui-tab-item layui-show"> + <div class="layui-form-item" style="padding-top: 10px;"> + + </div> + </div> + </div> + </div> + + <table class="" id="mainTable" lay-filter="mainTable"></table> + <script type="text/html" id="toolbarDemo"> + <div class="layui-btn-container"> + </div> + </script> + </form> + </div> + </div> + </div> +</body> +</html> +<script type="text/html" id="barDemo"> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> +</script> +<script> + + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + , util = layui.util + , tree = layui.tree + , util = layui.util + , upload = layui.upload + + + var option = []; + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + //鍒濆鍖栫晫闈� + set_ClearBill(); + + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //鏂囦欢涓婁紶 + upload.render({ + elem: '#UpLoad', + url: GetWEBURL() + '/Sb_EquipDotCheckRuleBill/Sb_EquipDotCheckRuleBill_Excel', + contentType: 'application/json', + exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨� + done: function (data1) { + if (data1.count == 1) { + option.data = data1.data; + table.render(option); + } else { + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, + error: function (err) { + debugger + layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 }); + } + }); + + //琛屽唴浜嬩欢 + table.on('tool(mainTable)', function (obj) { + set_GridDelete(obj); //琛屽唴鍒犻櫎 + }); + + //瀵煎叆 淇濆瓨鏁版嵁 + form.on('submit(btnSave)', function (data) { + if (table.cache["mainTable"] != null) { + set_AddNew(data); + } + else { + layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!"); + } + }) + + //閫�鍑� + form.on('submit(Cancel)', function () { + Pub_Close(1); + }) + + + //#endregion + + //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶 + + //#region 鍒濆鍖栫晫闈� + function set_ClearBill() { + //鍒濆鍖栬〃鏍� + set_InitGrid(); + } + //#endregion + + + //鍒濆鍖栬〃鏍� + function set_InitGrid() { + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , height: 'full-120' + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + , loading: false + , cols: [[ + { type: 'checkbox', fixed: 'left' } + , { field: 'HInterID', title: 'HInterID', width: 120, hide: true } + , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 120 } + , { field: '鐐规瑙勭▼鍚嶇О', title: '鐐规瑙勭▼鍚嶇О', width: 120 } + , { field: '鍛ㄦ湡鍗曚綅', title: '鍛ㄦ湡鍗曚綅', width: 120 } + , { field: '鐐规鍛ㄦ湡', title: '鐐规鍛ㄦ湡', width: 120 } + , { field: '鎽樿', title: '鎽樿', width: 120} + , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 120 } + , { field: 'HDotCheckItemID', title: 'HDotCheckItemID', width: 120, hide: true } + , { field: 'HDotCheckItemClassID', title: 'HDotCheckItemClassID', width: 120, hide: true } + , { field: '鐐规椤圭洰浠g爜', title: '鐐规椤圭洰浠g爜', width: 120 } + , { field: '鐐规椤圭洰鍚嶇О', title: '鐐规椤圭洰鍚嶇О', width: 120 } + , { field: 'HDotCheckItemMethodID', title: 'HDotCheckItemMethodID', width: 120, hide: true } + , { field: '鐐规鏂规硶浠g爜', title: '鐐规鏂规硶浠g爜', width: 120 } + , { field: '鐐规鏂规硶鍚嶇О', title: '鐐规鏂规硶鍚嶇О', width: 120 } + , { field: '鐐规閮ㄤ綅', title: '鐐规閮ㄤ綅', width: 120 } + , { field: '鍏蜂綋瑕佹眰', title: '鍏蜂綋瑕佹眰', width: 120 } + , { field: 'HEmpID', title: 'HEmpID', width: 120, hide: true } + , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 120 } + , { field: '璐熻矗浜哄悕绉�', title: '璐熻矗浜�', width: 120 } + , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 120 } + , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } + ]] + }; + + //娓叉煋椤甸潰 + table.render(option); + //DisPlay_HideColumn(); + } + + //琛屽唴鍒犻櫎 + 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 { + var oldData = option.data; + oldData.splice(obj.tr.data('index'), 1) + option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓� + table.render(option); + layer.close(index); + } + }); + } + } + + //瀵煎叆(淇濆瓨) + function set_AddNew(data) { + var num = []; + for (var i = 0; i < option.data.length; i++) { + if (option.data[i] != "") { + num.push(option.data[i]) + } + } + + var sSubStr = JSON.stringify(num); + var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"]; + var index = layer.load(); + + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Sb_EquipDotCheckRuleBill/Sb_EquipDotCheckRuleBill_btnSave", + async: true, + data: { "sMainSub": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { + layer.close(index); + layer.msg(data.Message); + option.data = null; + table.cache["mainTable"] = null; + table.render(option); + } + 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: "娓╅Θ鎻愮ず" }); + } + }); + } + + //#endregion + + }); + +</script> \ No newline at end of file -- Gitblit v1.9.1