From a9995918abe04b09d16f150b9aa817b650cf446d Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期二, 02 四月 2024 15:31:17 +0800 Subject: [PATCH] 基础资料列表里,代码 和 名称 的框里, 输入文字后,点击回车, 调用 查询按钮,进行查询(客户不需要再点击查询) (物料列表,货币列表,客户列表,供应商列表,仓库列表,职员列表,部门列表,点检项目,维修项目,保养项目,工序列表,生产资源列表,生产班组列表,工作中心列表,岗位列表) --- WebTM/views/基础资料/公用基础资料/Gy_Warehouse.html | 14 WebTM/views/基础资料/公用基础资料/Gy_DepartmentList.html | 15 WebTM/views/基础资料/生产基础资料/Gy_Process.html | 14 WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html | 8 WebTM/views/基础资料/基础资料/Gy_RepairList.html | 14 WebTM/views/基础资料/生产基础资料/Gy_Source.html | 14 WebTM/views/基础资料/公用基础资料/Gy_EmployeeList.html | 16 WebTM/views/基础资料/基础资料/Gy_MaintainList.html | 15 WebTM/views/基础资料/生产基础资料/Gy_Post.html | 15 WebTM/views/基础资料/公用基础资料/Gy_Material.html | 17 WebTM/views/基础资料/工资基础资料/Gy_Group.html | 14 WebTM/views/基础资料/采购基础资料/Gy_Supplier.html | 14 WebTM/views/基础资料/销售基础资料/Gy_Customer.html | 14 WebTM/views/基础资料/基础资料/Gy_DotCheckList.html | 15 WebTM/views/模治具管理/上模单/Sc_MouldLowerBillList.html | 645 ++++++++++++++++++++++-- WebTM/views/模治具管理/上模单/Sc_MouldUpperBillList.html | 647 ++++++++++++++++++++++-- WebTM/views/基础资料/公用基础资料/Gy_Currency.html | 15 WebTM/views/基础资料/公用基础资料/Gy_WorkCenter.html | 14 18 files changed, 1,397 insertions(+), 123 deletions(-) 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_Currency.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_Currency.html" index 1e4ee36..9fd3cfd 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_Currency.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_Currency.html" @@ -386,6 +386,20 @@ }); //#endregion + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + //#region 蹇�熻繃婊� function get_FastQuery() { var HNumber = $("#HNumber").val(); @@ -421,6 +435,7 @@ sWhere += " and 璐у竵鍚嶇О like '%" + HName + "%'"; } get_Display(sWhere); + sWhere = ""; } //#endregion 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_DepartmentList.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_DepartmentList.html" index e474254..2534c0f 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_DepartmentList.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_DepartmentList.html" @@ -217,6 +217,20 @@ }); //#endregion + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + //#region 閲嶇疆鎸夐挳 form.on('submit(btnReSearch)', function (data) { set_ClearQuery(); @@ -390,6 +404,7 @@ sWhere += " and 閮ㄩ棬鍚嶇О like '%" + HName + "%'"; } get_Display(sWhere); + sWhere = ""; } //#endregion 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_EmployeeList.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_EmployeeList.html" index 45956d2..d54ba32 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_EmployeeList.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_EmployeeList.html" @@ -246,7 +246,21 @@ parent.layer.close(index); }); //#endregion - + + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + //#region 閲嶇疆杩囨护鏉′欢 function set_ClearQuery() { 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_Material.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_Material.html" index 4aadec8..e002504 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_Material.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_Material.html" @@ -241,6 +241,21 @@ }); //#endregion + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //#region 閲嶆柊鍚屾鎸夐挳 form.on('submit(btnResCnz)', function (data) { set_ResCnz(); @@ -884,7 +899,7 @@ , title: "楂樼骇杩囨护" //鏍囬 , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 , shift: 2 //寮瑰嚭鍔ㄧ敾 - , area: ["50%", "80%"] //绐椾綋澶у皬 + , area: ["50%", "70%"] //绐椾綋澶у皬 , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� , content: [contentUrl, "yes"] , btn: ["纭畾", "鍙栨秷"] 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_Warehouse.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_Warehouse.html" index 460ec1e..779f274 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_Warehouse.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_Warehouse.html" @@ -208,6 +208,20 @@ }); //#endregion + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + //#region 閲嶆柊鍚屾鎸夐挳 form.on('submit(btnResCnz)', function (data) { set_ResCnz(); 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 eb1e011..cbcde6b 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" @@ -219,6 +219,20 @@ }); //#endregion + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + ////#region 淇敼鎸夐挳 //form.on('submit(btnModify)', function (data) { // if (TagId != "") { 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 7781d56..1fd24e7 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" @@ -201,6 +201,21 @@ get_FastQuery(); }); //#endregion + + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + //鍒濆鍖栬〃鏍� function set_ClearBill() { 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 733ba14..2f19707 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" @@ -182,6 +182,21 @@ get_FastQuery(); }); //#endregion + + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + //鍒濆鍖栬〃鏍� function set_ClearBill() { 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 84da238..6c7904c 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" @@ -183,6 +183,20 @@ }); //#endregion + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + //#region 鍙屽嚮杩斿洖鏁版嵁 table.on('rowDouble(mainTable)', function (obj) { var data = []; diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Group.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Group.html" index 877e6eb..9b4c1c8 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Group.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Group.html" @@ -216,6 +216,20 @@ }); //#endregion + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + //#endregion //#region 鏈〉闈㈣璋冪敤鐨勬墍鏈夋柟娉� 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_Post.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_Post.html" index 677ddb6..86d8880 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_Post.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_Post.html" @@ -181,6 +181,21 @@ form.on('submit(btnSearch)', function (data) { get_FastQuery(); }); + + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + // 閲嶇疆鎸夐挳 form.on('submit(btnReSearch)', function (data) { set_ClearQuery(); 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 3a42be8..3b4c626 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" @@ -216,6 +216,20 @@ }); //#endregion + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + //#endregion //#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉� 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_Source.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_Source.html" index cf6e86e..8c79c98 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_Source.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_Source.html" @@ -228,6 +228,20 @@ }); //#endregion + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(2); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(2); + } + }); + //#region 閲嶇疆鎸夐挳 form.on('submit(btnReSearch)', function (data) { set_ClearQuery(); diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html" index 751b7c5..fd06c13 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html" @@ -220,6 +220,20 @@ }); //#endregion + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + //#region 姝ら〉闈㈡墍鏈夋柟娉� //鍒濆鍖栭〉闈� function set_ClearBill() { diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" index e13f717..1fd831c 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" @@ -221,6 +221,20 @@ }); //#endregion + //浠g爜鍥炶溅鏂规硶 + $('#HNumber').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + + //鍚嶇О鍥炶溅鏂规硶 + $('#HName').on('keydown', function (event) { + if (event.keyCode == 13) { + get_FastQuery(); + } + }); + //#region 閲嶇疆鎸夐挳 form.on('submit(btnReSearch)', function (data) { set_ClearQuery(); diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillList.html" index ab0b918..734f226 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillList.html" @@ -13,6 +13,7 @@ <script src="../../../layuiadmin/soulTable.slim.js"></script> <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> <script src="../../../layuiadmin/PageTitle.js"></script> + <script src="../../../layuiadmin/HideButton.js"></script> </head> <body> <div class="layui-fluid"> @@ -20,16 +21,6 @@ <div class="layui-card" style="padding: 1px"> <div class="layui-card-body" style="padding: 1px;"> <form class="layui-form" action="" lay-filter="component-form-group"> - <div style="padding: 10px; "> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="ExcelImport" id="ExcelImport">棰勮</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AddNew" id="set_AddNew">鏂板</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_ShowBill" id="set_ShowBill">缂栬緫</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="get_Refresh" id="get_Refresh">鍒锋柊</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_DeleteBill" id="set_DeleteBill">鍒犻櫎</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">鍙嶅鏍�</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="get_Exit" id="get_Exit">閫�鍑�</button> - </div> <div class="layui-collapse"> <div class="layui-colla-item"> <div class="layui-colla-title layui-inline"> @@ -40,36 +31,40 @@ <div class="layui-inline"> <label class="layui-form-label" style="width: 85px;">鍗曟嵁鏃ユ湡</label> <div class="layui-input-inline"> - <input type="date" class="layui-input" name="HBeginDate" id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> + <input type="date" class="layui-input ForFilteringSchemes" name="HBeginDate" id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> </div> </div> <div class="layui-inline"> <label class="layui-form-label" style="width: 85px;">----</label> <div class="layui-input-inline"> - <input type="date" class="layui-input" name="HEndDate" id="HEndDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> + <input type="date" class="layui-input ForFilteringSchemes" name="HEndDate" id="HEndDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">鍗曟嵁鍙�:</label> <div class="layui-input-inline"> - <input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" autocomplete="off"> + <input class="layui-input ForFilteringSchemes" name="HBillNo" lay-verify="HBillNo" id="HBillNo" autocomplete="off"> </div> </div> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">鏌ヨ</button> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" style="display:none;" lay-filter="btnSearch" id="btnSearch">鏌ヨ</button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" style="display:none;" lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button> + <!--鏄剧ず褰撳墠杩囨护鏂规--> + <div class="layui-inline" style="margin-left:5px;"> + <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div> + </div> <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;"> <!--鍏朵粬鏉′欢--> <div class="layui-row" style="margin-top:5px"> <div class="layui-inline"> <label class="layui-form-label">杩囨护</label> <div class="layui-input-block"> - <select name="ColName" id="ColName" lay-search="" lay-filter="ColName" style="width:190px;"> + <select name="ColName" id="ColName" class="ForFilteringSchemes" lay-filter="ColName" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> - <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;"> + <select name="Comparator" id="Comparator" class="ForFilteringSchemes" lay-filter="Comparator" style="width:190px;"> <option value="0" selected="selected"></option> <option value="=">=</option> <option value=">=">>=</option> @@ -84,13 +79,33 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input" value="" name="ColContent" id="ColContent"> + <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent"> </div> </div> </div> </div> </div> <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" style="display:none;" id="set_AddNew" lay-event="set_AddNew"><i class="layui-icon layui-icon-form"></i>鏂板</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_ShowBill" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_DeleteBill" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-form"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_HideColumn" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill" id="set_CheckBill"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck" id="set_AbandonCheck"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Close" id="btn-Close"><i class="layui-icon layui-icon-radio"></i>鍏抽棴</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-DeClose" id="btn-DeClose"><i class="layui-icon layui-icon-radio"></i>鍙嶅叧闂�</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Drop" id="btn-Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-DeDrop" id="btn-DeDrop"><i class="layui-icon layui-icon-radio"></i>鍙嶄綔搴�</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>淇濆瓨鏂规</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_QueryCondition" id="set_QueryCondition"><i class="layui-icon layui-icon-set"></i>楂樼骇杩囨护</button> + </div> + </script> </form> </div> </div> @@ -102,6 +117,7 @@ var treeCkData = { id: 0 }; var TagId = ""; var TagParentId = ""; + var GetDataCols = ""; layui.config({ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ @@ -134,47 +150,92 @@ var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType); //#endregion + //杩囨护鏉′欢鐨刢lass绫� + var HClassTag = "ForFilteringSchemes"; + //妯″潡鍚嶇О锛堜腑鏂囩増锛� 姣忎釜妯″潡椤甸潰閮介渶瑕佷慨鏀� + window.HModuleName = "涓嬫ā鍗�"; + //鏄惁宸茬粡閫夋嫨浜嗚繃婊ゆ柟妗堬紙鍏ㄥ眬鍙橀噺锛� + window.HDefaultFilter = ""; + //閫夋嫨鐨勮繃婊ゆ柟妗堝唴鐮侊紙鍏ㄥ眬鍙橀噺锛� + window.HInterID_Choose = 0; + //鍒濆鍖栫晫闈� set_ClearBill(); //#endregion //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + //澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(mainTable)', function (obj) { + switch (obj.event) { + //鏂板 + case 'set_AddNew': + set_AddNew(); + break; + //缂栬緫 + case 'set_ShowBill': + set_ShowBill(); + break; + //鍒犻櫎 + case 'set_DeleteBill': + set_DeleteBill(); + break; + //瀹℃牳 + case 'set_CheckBill': + set_CheckBill(1); + break; + //鍙嶅鏍� + case 'set_AbandonCheck': + set_CheckBill(2); + break; + //鍒楄缃� + case 'set_HideColumn': + get_HideColumn(); + break; + //鎸夐挳璁剧疆 + case 'set_HideButton': + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + var HBillType = "3847"; + get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); + break; + //鍒锋柊 + case 'get_Refresh': get_Refresh(); + break; + //閫�鍑烘寜閽� + case 'get_Exit': Pub_Close(2); + break; + //鍏抽棴鎸夐挳 锛�1:鍏抽棴銆�2:鍙嶅叧闂級 + case 'btn-Close': + set_CloseBill(1); + break; + //鍙嶅叧闂寜閽� + case 'btn-DeClose': + set_CloseBill(2); + break; + //浣滃簾鎸夐挳 锛�1:浣滃簾銆�2:鍙嶄綔搴燂級 + case 'btn-Drop': + set_DropBill(1); + break; + //鍙嶄綔搴熸寜閽� + case 'btn-DeDrop': + set_DropBill(2); + break; + //淇濆瓨鏂规 + case 'set_SaveScheme': set_SaveScheme(); + break; + //璇诲彇鏂规 + case 'set_ReadScheme': set_ReadScheme(); + break; + //楂樼骇杩囨护 + case 'set_QueryCondition': + set_QueryCondition(); + break; + }; + }); + //鏌ヨ form.on('submit(btnSearch)', function (data) { get_FastQuery(); - }); - - //鍒锋柊 - form.on('submit(get_Refresh)', function (data) { - get_Refresh(); - }); - - //瀹℃牳 - form.on('submit(set_CheckBill)', function (data) { - set_CheckBill(1); - }); - - - //鍙嶅鏍� - form.on('submit(set_AbandonCheck)', function (data) { - set_CheckBill(2) - }); - - - //鏂板 - form.on('submit(set_AddNew)', function (data) { - set_AddNew(); - }); - - //缂栬緫 - form.on('submit(set_ShowBill)', function (data) { - set_ShowBill(); - }); - - //鍒犻櫎 - form.on('submit(set_DeleteBill)', function (data) { - set_DeleteBill(); }); // 閲嶇疆鎸夐挳 @@ -182,10 +243,6 @@ set_ClearQuery(); }); - //閫�鍑� - form.on('submit(get_Exit)', function (data) { - Pub_Close(2); - }); //#endregion @@ -193,9 +250,11 @@ //鍒濆鍖栨煡璇� function set_ClearBill() { + //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规 + get_DefaultModule(); $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); - get_FastQuery(); + //get_FastQuery(); } //蹇�熻繃婊� @@ -236,9 +295,13 @@ if (HBeginDate != "" && HEndDate != "") { sWhere += "and 鏃ユ湡 between '" + HBeginDate + "' and '" + HEndDate+"'"; } + if (GetDataCols != "") { + sWhere += GetDataCols; + } get_Display(sWhere); sWhere = ""//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 + GetDataCols = ""; } //鏌ヨ @@ -281,7 +344,7 @@ //鍔ㄦ�佹樉绀哄垪鍚� option = { elem: '#mainTable' - //, toolbar: '#toolbarDemo' + , toolbar: '#toolbarDemo' , cols: [col] , data: data1.data , height: 'full-110' @@ -292,13 +355,19 @@ } table.render(option); - ////鍒锋柊琛ㄦ牸鏁版嵁 - //DisPlay_HideColumn(); + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); layer.close(ajaxLoad); if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { ColFilter(); } + + //鍒锋柊鎸夐挳鏄剧ず + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + var HBillType = "3847"; + Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); + } else { layer.close(ajaxLoad); layer.alert(data1.code + data1.Message, { icon: 5 }); @@ -423,6 +492,76 @@ } } + //鍙嶅叧闂�/鍏抽棴鏁版嵁 + function set_CloseBill(num) { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + var InterID = data[0].hmainid.toString(); + //閫昏緫瀹℃牳鏂规硶 + $.ajax({ + type: "GET", + url: GetWEBURL() + "/Sc_MouldUpperBill/CloseSc_MouldLowerBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] }, + 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); + //淇敼涓哄姛鍚庡埛鏂扮晫闈� + $("#f_Query").trigger('click'); + }); + + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒'); + } + } + + // 鍙嶄綔搴�/浣滃簾鏁版嵁 + function set_DropBill(num) { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + var InterID = data[0].hmainid.toString(); + //閫昏緫瀹℃牳鏂规硶 + $.ajax({ + type: "GET", + url: GetWEBURL() + "/Sc_MouldUpperBill/DropSc_MouldLowerBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] }, + 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); + //淇敼涓哄姛鍚庡埛鏂扮晫闈� + $("#f_Query").trigger('click'); + }); + + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒'); + } + } + //鍒锋柊 function get_Refresh() { get_FastQuery(); @@ -441,6 +580,393 @@ get_FastQuery(); } + //闅愯棌鍒楄缃� + function get_HideColumn() { + var colName = ""; + var contentUrl = ""; + for (var i = 1; i < option.cols[0].length - 1; i++) { + colName += option.cols[0][i]["title"] + ","; + } + var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞 + var urlLen = urlStr.split('/'); + for (var i = 0; i < urlLen.length - 4; i++) { + contentUrl += "../"; + } + colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 + + contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName; + + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "闅愯棌鍒楄缃�" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: [contentUrl, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + //鍒锋柊椤甸潰, + location.reload(); + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + + //鏄剧ず鍒楁暟鎹� + function DisPlay_HideColumn() { + $.ajax({ + url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + type: "GET", + data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, + success: function (data1) { + if (data1.data.length != 0) { + + + var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁 + var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞� + + dataCol = data1.data[0].HGridString.split(','); + + for (var i = 0; i < option.cols[0].length - 2; i++) { + if (dataCol[i]) { + var dataCols = dataCol[i].split('|'); + } + //闅愯棌鍒� + if (dataCols[1] == 1) { + option.cols[0][i + 1]["hide"] = true; + } + //璁剧疆鍒楀 + if (dataCols[3] > 0) { + option.cols[0][i + 1]["width"] = dataCols[3]; + } + //璁剧疆鍐呭瀛椾綋澶у皬 + if (data1.data[0].HFontSize != 0) { + option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; + } else { + option.cols[0][i + 1]["style"] = "font-size:100%"; + } + //璁剧疆鍒楀 + //if (data1.data[0].HColumnWidth != 0) { + // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; + //} else { + // option.cols[0][i + 1]["width"] = ""; + //} + //鏄剧ず鍒� + if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { + option.cols[0][i + 1]["hide"] = false; + } + //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + switch (dataCols[2]) { + case "L": + option.cols[0][i + 1]["align"] = "left"; + break; + case "M": + option.cols[0][i + 1]["align"] = "center"; + break; + case "R": + option.cols[0][i + 1]["align"] = "right"; + break; + } + } + + //鍙栨秷鍐荤粨鍒� + for (var i = 1; i < option.cols[0].length - 1; i++) { + if (option.cols[0][i]["fixed"] != null) { + option.cols[0][i]["fixed"] = null; + } + else { + break; + } + } + //鍐荤粨鍒� + if (data1.data[0].HFixCols != 0) { + for (var i = 0; i < data1.data[0].HFixCols; i++) { + if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { + data1.data[0].HFixCols += 1; + } + option.cols[0][i + 1]["fixed"] = "left"; + } + } + table.render(option); + } else { + table.render(option); + } + + //鍒锋柊鎸夐挳鏄剧ず + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + var HBillType = "3847"; + Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }) + } + + //鑾峰彇褰撳墠鐢ㄦ埛鐨勯粯璁よ繃婊ゆ柟妗� + function get_DefaultModule() { + $.ajax({ + url: GetWEBURL() + '/Xt_FastICScheme/Chooselist', + type: "GET", + data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" }, + success: function (data1) { + if (data1.count == 1) { + //褰撳墠鐢ㄦ埛璁剧疆鏈夐粯璁ょ殑杩囨护鏂规 + var data = data1.data; + //褰撳墠閫夋嫨鐨勮繃婊ゆ柟妗� + HInterID_Choose = data[0].hmainid; + //杩囨护鏂规鍐呯爜 + HInterID = data[0].hmainid + //杩囨护鏂规鍚嶇О + HDefaultFilter = data[0].鏂规鍚嶇О + //杩囨护鏂规鐨勫娉紙鏂规淇℃伅鎻忚堪锛� + var HRemark = data[0].澶囨敞 + //鏄剧ず鍑哄綋鍓嶇殑榛樿杩囨护鏂规 + document.getElementById("HFilterScheme_Now").style.display = "block"; + document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>'; + //鎶婅繃婊ゆ潯浠跺�煎洖鍐欏埌椤甸潰涓� + for (let i = 0; i < data.length; i++) { + $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�); + if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') { + $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true); + } + } + //鎵ц鏌ヨ鏂规硶 + get_FastQuery() + form.render("select"); + } else { + //褰撳墠鐢ㄦ埛娌℃湁璁剧疆榛樿鐨勮繃婊ゆ柟妗� + //闅愯棌鏄剧ず杩囨护鏂规鐨勬爣绛句俊鎭� + document.getElementById("HFilterScheme_Now").style.display = "none"; + //鎵ц鏌ヨ鏂规硶 + get_FastQuery() + form.render("select"); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + + //淇濆瓨鏂规 + function set_SaveScheme() { + var index = layer.open() + //鍒ゆ柇鐢ㄦ埛鏄惁鐐瑰嚮浜嗗彸涓婅鐨勨�滃弶鍙封�濆叧闂脊绐楅〉闈� + var HIsClose_Manual = false; + //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�) + var Filter = document.getElementsByClassName(HClassTag); + + var HFilterIdList = "";//杩囨护鏉′欢 + var HFilterIdLists = "";//鎷兼帴澶氫釜杩囨护鏉′欢 + var HValue = "";//杩囨护鍊� + var HElement_type = "";//杩囨护鏍囩绫诲瀷 + + for (var i = 0; i < Filter.length; i++) { + HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID + HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴) + HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊� + HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷 + } + + //鍘婚櫎鏈熬閫楀彿 + HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); + HValue = HValue.substring(0, HValue.length - 1); + HElement_type = HElement_type.substring(0, HElement_type.length - 1); + + //褰撳墠椤甸潰涓婃病鏈夐�夋嫨杩囨护鏂规锛岃繘鍏ユ柊澧炴柟娉� + if (HDefaultFilter == "") { + layer.open({ + type: 2 + , area: ['40%', '80%'] + , title: '杩囨护鏂规' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + , cancel: function () { + // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫 + HIsClose_Manual = true; + } + , end: function () { + if (HIsClose_Manual != true) { + get_FastQuery(); + //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗� + document.getElementById("HFilterScheme_Now").style.display = "block"; + document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>'; + } + } + }) + layer.close(index) + } else { + //褰撳墠椤甸潰宸叉湁杩囨护鏂规锛岀敤鎴烽�夋嫨 鏂板鎴栬�呯紪杈� + layer.confirm('褰撳墠宸查�夋嫨杩囨护鏂规锛屾槸鍚︿慨鏀癸紵璇烽�夋嫨瀵瑰簲鎿嶄綔', { + title: "鎿嶄綔鎻愮ず", + icon: 0, + btn: ['鏂板鏂规', '淇濆瓨淇敼褰撳墠鏂规', '鍙栨秷'] + }, function (index, layero) { + //鏂板 + layer.open({ + type: 2 + , area: ['40%', '80%'] + , title: '杩囨护鏂规' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + , end: function () { + get_FastQuery() + //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗� + document.getElementById("HFilterScheme_Now").style.display = "block"; + document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>'; + } + }) + layer.close(index) + }, function (index) { + //缂栬緫 + var Filter_Edit = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�) + HFilterIdList = ""; + HFilterIdLists = ""; + HValue = ""; + HElement_type = ""; + for (var i = 0; i < Filter_Edit.length; i++) { + HFilterIdList = Filter_Edit[i].id; //杩囨护鏉′欢ID + HFilterIdLists += Filter_Edit[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴) + HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊� + HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷 + } + //鍘婚櫎鏈熬閫楀彿 + HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); + HValue = HValue.substring(0, HValue.length - 1); + HElement_type = HElement_type.substring(0, HElement_type.length - 1); + + var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3; + + //淇敼 + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Xt_FastICScheme/save", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + async: true, + data: { "oMain": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + layer.msg(data.Message, { time: 1 * 1000, icon: 1 }); + } + else { + + } + layer.closeAll("loading"); + }, + error: function (err) { + + + } + }); + layer.close(index) + }, function (index) { + //鍙栨秷 + layer.alert('鍙栨秷') + layer.close(index) + }); + } + + } + + //璇诲彇鏂规 + function set_ReadScheme() { + var HIsClose_Manual = false; + var Filter = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�) + + var HFilterIdList = ""; + var HFilterIdLists = ""; + var HValue = ""; + var HElement_type = ""; + for (var i = 0; i < Filter.length; i++) { + HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID + HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴) + HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊� + HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷 + } + //鍘婚櫎鏈熬閫楀彿 + HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); + HValue = HValue.substring(0, HValue.length - 1); + HElement_type = HElement_type.substring(0, HElement_type.length - 1); + + layer.open({ + type: 2 + , area: ['80%', '80%'] + , title: '杩囨护鏂规鍒楄〃' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName + , cancel: function () { + // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫 + HIsClose_Manual = true; + } + , end: function () { + if (HIsClose_Manual != true) { + get_FastQuery() + form.render("select"); + } + } + }) + } + + //楂樼骇杩囨护 + function set_QueryCondition() { + var colName = ""; + var contentUrl = ""; + for (var i = 0; i < option.cols[0].length; i++) { + if (option.cols[0][i]["field"] != undefined && option.cols[0][i]["hide"] != true) { + colName += option.cols[0][i]["title"] + ","; + } + } + var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞 + var urlLen = urlStr.split('/'); + for (var i = 0; i < urlLen.length - 4; i++) { + contentUrl += "../"; + } + colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 + + var HModBillName = "h_v_Qj_Sc_MouldLowerBillList";//绛変簬璇ュ垪琛ㄧ殑瑙嗗浘 + + contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_QueryCondition.html?HModName=' + HModBillName + '&colName=' + colName; + + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "楂樼骇杩囨护" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "70%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: [contentUrl, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.cache["mainTable"];//鑾峰彇閫変腑鐨勬暟鎹� + if (checkStatus.length == 0) { + return layer.msg("璇疯緭鍏ヨ繃婊ゆ潯浠�!"); + } + var myIframe = window[laero.find('iframe')[0]['name']]; + GetDataCols += "and ("; + for (var i = 0; i < checkStatus.length; i++) { + GetDataCols += myIframe.get_FastQuery(checkStatus[i]); //get_FastQuery()涓哄瓙椤甸潰鐨勬柟娉� + if ((i + 1) < checkStatus.length) { + GetDataCols += " " + checkStatus[i]["HRelationCol"] + " "; + } + } + GetDataCols += ")"; + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + , end: function () { + if (GetDataCols != "") { + get_FastQuery(); + } + } + }) + } + //鍒楁槑鏄剧ず涓嬫媺妗� function ColFilter() { var Organization = '<option value="0" selected="selected" ></option>'; @@ -457,4 +983,7 @@ //#endregion //浠ヤ笂鏄痩ayui妯″潡 }); + function GetDataCol(data) { + GetDataCols = data; + } </script> \ No newline at end of file diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillList.html" index b35feea..eb15e60 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillList.html" @@ -13,6 +13,7 @@ <script src="../../../layuiadmin/soulTable.slim.js"></script> <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> <script src="../../../layuiadmin/PageTitle.js"></script> + <script src="../../../layuiadmin/HideButton.js"></script> </head> <body> <div class="layui-fluid"> @@ -20,16 +21,6 @@ <div class="layui-card" style="padding: 1px"> <div class="layui-card-body" style="padding: 1px;"> <form class="layui-form" action="" lay-filter="component-form-group"> - <div style="padding: 10px; "> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="ExcelImport" id="ExcelImport">棰勮</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AddNew" id="set_AddNew">鏂板</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_ShowBill" id="set_ShowBill">缂栬緫</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="get_Refresh" id="get_Refresh">鍒锋柊</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_DeleteBill" id="set_DeleteBill">鍒犻櫎</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">鍙嶅鏍�</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="get_Exit" id="get_Exit">閫�鍑�</button> - </div> <div class="layui-collapse"> <div class="layui-colla-item"> <div class="layui-colla-title layui-inline"> @@ -40,36 +31,40 @@ <div class="layui-inline"> <label class="layui-form-label" style="width: 85px;">鍗曟嵁鏃ユ湡</label> <div class="layui-input-inline"> - <input type="date" class="layui-input" name="HBeginDate" id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> + <input type="date" class="layui-input ForFilteringSchemes" name="HBeginDate" id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> </div> </div> <div class="layui-inline"> <label class="layui-form-label" style="width: 85px;">----</label> <div class="layui-input-inline"> - <input type="date" class="layui-input" name="HEndDate" id="HEndDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> + <input type="date" class="layui-input ForFilteringSchemes" name="HEndDate" id="HEndDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">鍗曟嵁鍙�:</label> <div class="layui-input-inline"> - <input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" autocomplete="off"> + <input class="layui-input ForFilteringSchemes" name="HBillNo" lay-verify="HBillNo" id="HBillNo" autocomplete="off"> </div> </div> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">鏌ヨ</button> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" style="display:none;" lay-filter="btnSearch" id="btnSearch">鏌ヨ</button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" style="display:none;" lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button> + <!--鏄剧ず褰撳墠杩囨护鏂规--> + <div class="layui-inline" style="margin-left:5px;"> + <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div> + </div> <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;"> <!--鍏朵粬鏉′欢--> <div class="layui-row" style="margin-top:5px"> <div class="layui-inline"> <label class="layui-form-label">杩囨护</label> <div class="layui-input-block"> - <select name="ColName" id="ColName" lay-search="" lay-filter="ColName" style="width:190px;"> + <select name="ColName" id="ColName" class="ForFilteringSchemes" lay-filter="ColName" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> - <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;"> + <select name="Comparator" id="Comparator" class="ForFilteringSchemes" lay-filter="Comparator" style="width:190px;"> <option value="0" selected="selected"></option> <option value="=">=</option> <option value=">=">>=</option> @@ -84,13 +79,33 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input" value="" name="ColContent" id="ColContent"> + <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent"> </div> </div> </div> </div> </div> <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" style="display:none;" id="set_AddNew" lay-event="set_AddNew"><i class="layui-icon layui-icon-form"></i>鏂板</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_ShowBill" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_DeleteBill" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-form"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_HideColumn" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill" id="set_CheckBill"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck" id="set_AbandonCheck"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Close" id="btn-Close"><i class="layui-icon layui-icon-radio"></i>鍏抽棴</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-DeClose" id="btn-DeClose"><i class="layui-icon layui-icon-radio"></i>鍙嶅叧闂�</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Drop" id="btn-Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-DeDrop" id="btn-DeDrop"><i class="layui-icon layui-icon-radio"></i>鍙嶄綔搴�</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>淇濆瓨鏂规</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_QueryCondition" id="set_QueryCondition"><i class="layui-icon layui-icon-set"></i>楂樼骇杩囨护</button> + </div> + </script> </form> </div> </div> @@ -102,6 +117,7 @@ var treeCkData = { id: 0 }; var TagId = ""; var TagParentId = ""; + var GetDataCols = ""; layui.config({ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ @@ -134,58 +150,99 @@ var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType); //#endregion + //杩囨护鏉′欢鐨刢lass绫� + var HClassTag = "ForFilteringSchemes"; + //妯″潡鍚嶇О锛堜腑鏂囩増锛� 姣忎釜妯″潡椤甸潰閮介渶瑕佷慨鏀� + window.HModuleName = "涓婃ā鍗�"; + //鏄惁宸茬粡閫夋嫨浜嗚繃婊ゆ柟妗堬紙鍏ㄥ眬鍙橀噺锛� + window.HDefaultFilter = ""; + //閫夋嫨鐨勮繃婊ゆ柟妗堝唴鐮侊紙鍏ㄥ眬鍙橀噺锛� + window.HInterID_Choose = 0; + //鍒濆鍖栫晫闈� set_ClearBill(); //#endregion //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + //澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(mainTable)', function (obj) { + switch (obj.event) { + //鏂板 + case 'set_AddNew': + set_AddNew(); + break; + //缂栬緫 + case 'set_ShowBill': + set_ShowBill(); + break; + //鍒犻櫎 + case 'set_DeleteBill': + set_DeleteBill(); + break; + //瀹℃牳 + case 'set_CheckBill': + set_CheckBill(1); + break; + //鍙嶅鏍� + case 'set_AbandonCheck': + set_CheckBill(2); + break; + //鍒楄缃� + case 'set_HideColumn': + get_HideColumn(); + break; + //鎸夐挳璁剧疆 + case 'set_HideButton': + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + var HBillType = "3846"; + get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); + break; + //鍒锋柊 + case 'get_Refresh': get_Refresh(); + break; + //閫�鍑烘寜閽� + case 'get_Exit': Pub_Close(2); + break; + //鍏抽棴鎸夐挳 锛�1:鍏抽棴銆�2:鍙嶅叧闂級 + case 'btn-Close': + set_CloseBill(1); + break; + //鍙嶅叧闂寜閽� + case 'btn-DeClose': + set_CloseBill(2); + break; + //浣滃簾鎸夐挳 锛�1:浣滃簾銆�2:鍙嶄綔搴燂級 + case 'btn-Drop': + set_DropBill(1); + break; + //鍙嶄綔搴熸寜閽� + case 'btn-DeDrop': + set_DropBill(2); + break; + //淇濆瓨鏂规 + case 'set_SaveScheme': set_SaveScheme(); + break; + //璇诲彇鏂规 + case 'set_ReadScheme': set_ReadScheme(); + break; + //楂樼骇杩囨护 + case 'set_QueryCondition': + set_QueryCondition(); + break; + }; + }); + //鏌ヨ form.on('submit(btnSearch)', function (data) { get_FastQuery(); }); - - //鍒锋柊 - form.on('submit(get_Refresh)', function (data) { - get_Refresh(); - }); - - //瀹℃牳 - form.on('submit(set_CheckBill)', function (data) { - set_CheckBill(1); - }); - - - //鍙嶅鏍� - form.on('submit(set_AbandonCheck)', function (data) { - set_CheckBill(2) - }); - - - //鏂板 - form.on('submit(set_AddNew)', function (data) { - set_AddNew(); - }); - - //缂栬緫 - form.on('submit(set_ShowBill)', function (data) { - set_ShowBill(); - }); - - //鍒犻櫎 - form.on('submit(set_DeleteBill)', function (data) { - set_DeleteBill(); - }); - + // 閲嶇疆鎸夐挳 form.on('submit(btnReSearch)', function (data) { set_ClearQuery(); }); - //閫�鍑� - form.on('submit(get_Exit)', function (data) { - Pub_Close(2); - }); //#endregion @@ -193,9 +250,11 @@ //鍒濆鍖栨煡璇� function set_ClearBill() { + //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规 + get_DefaultModule(); $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); - get_FastQuery(); + //get_FastQuery(); } //蹇�熻繃婊� @@ -236,9 +295,13 @@ if (HBeginDate != "" && HEndDate != "") { sWhere += "and 鏃ユ湡 between '" + HBeginDate + "' and '" + HEndDate+"'"; } + if (GetDataCols != "") { + sWhere += GetDataCols; + } get_Display(sWhere); sWhere = ""//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 + GetDataCols = ""; } //鏌ヨ @@ -281,7 +344,7 @@ //鍔ㄦ�佹樉绀哄垪鍚� option = { elem: '#mainTable' - //, toolbar: '#toolbarDemo' + , toolbar: '#toolbarDemo' , cols: [col] , data: data1.data , height: 'full-110' @@ -292,13 +355,19 @@ } table.render(option); - ////鍒锋柊琛ㄦ牸鏁版嵁 - //DisPlay_HideColumn(); + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); layer.close(ajaxLoad); if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { ColFilter(); } + + //鍒锋柊鎸夐挳鏄剧ず + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + var HBillType = "3846"; + Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); + } else { layer.close(ajaxLoad); layer.alert(data1.code + data1.Message, { icon: 5 }); @@ -423,6 +492,76 @@ } } + //鍙嶅叧闂�/鍏抽棴鏁版嵁 + function set_CloseBill(num) { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + var InterID = data[0].hmainid.toString(); + //閫昏緫瀹℃牳鏂规硶 + $.ajax({ + type: "GET", + url: GetWEBURL() + "/Sc_MouldUpperBill/CloseSc_MouldUpperBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] }, + 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); + //淇敼涓哄姛鍚庡埛鏂扮晫闈� + $("#f_Query").trigger('click'); + }); + + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒'); + } + } + + // 鍙嶄綔搴�/浣滃簾鏁版嵁 + function set_DropBill(num) { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + var InterID = data[0].hmainid.toString(); + //閫昏緫瀹℃牳鏂规硶 + $.ajax({ + type: "GET", + url: GetWEBURL() + "/Sc_MouldUpperBill/DropSc_MouldUpperBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] }, + 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); + //淇敼涓哄姛鍚庡埛鏂扮晫闈� + $("#f_Query").trigger('click'); + }); + + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒'); + } + } + //鍒锋柊 function get_Refresh() { get_FastQuery(); @@ -441,6 +580,393 @@ get_FastQuery(); } + //闅愯棌鍒楄缃� + function get_HideColumn() { + var colName = ""; + var contentUrl = ""; + for (var i = 1; i < option.cols[0].length - 1; i++) { + colName += option.cols[0][i]["title"] + ","; + } + var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞 + var urlLen = urlStr.split('/'); + for (var i = 0; i < urlLen.length - 4; i++) { + contentUrl += "../"; + } + colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 + + contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName; + + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "闅愯棌鍒楄缃�" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: [contentUrl, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + //鍒锋柊椤甸潰, + location.reload(); + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + + //鏄剧ず鍒楁暟鎹� + function DisPlay_HideColumn() { + $.ajax({ + url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + type: "GET", + data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, + success: function (data1) { + if (data1.data.length != 0) { + + + var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁 + var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞� + + dataCol = data1.data[0].HGridString.split(','); + + for (var i = 0; i < option.cols[0].length - 2; i++) { + if (dataCol[i]) { + var dataCols = dataCol[i].split('|'); + } + //闅愯棌鍒� + if (dataCols[1] == 1) { + option.cols[0][i + 1]["hide"] = true; + } + //璁剧疆鍒楀 + if (dataCols[3] > 0) { + option.cols[0][i + 1]["width"] = dataCols[3]; + } + //璁剧疆鍐呭瀛椾綋澶у皬 + if (data1.data[0].HFontSize != 0) { + option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; + } else { + option.cols[0][i + 1]["style"] = "font-size:100%"; + } + //璁剧疆鍒楀 + //if (data1.data[0].HColumnWidth != 0) { + // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; + //} else { + // option.cols[0][i + 1]["width"] = ""; + //} + //鏄剧ず鍒� + if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { + option.cols[0][i + 1]["hide"] = false; + } + //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + switch (dataCols[2]) { + case "L": + option.cols[0][i + 1]["align"] = "left"; + break; + case "M": + option.cols[0][i + 1]["align"] = "center"; + break; + case "R": + option.cols[0][i + 1]["align"] = "right"; + break; + } + } + + //鍙栨秷鍐荤粨鍒� + for (var i = 1; i < option.cols[0].length - 1; i++) { + if (option.cols[0][i]["fixed"] != null) { + option.cols[0][i]["fixed"] = null; + } + else { + break; + } + } + //鍐荤粨鍒� + if (data1.data[0].HFixCols != 0) { + for (var i = 0; i < data1.data[0].HFixCols; i++) { + if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { + data1.data[0].HFixCols += 1; + } + option.cols[0][i + 1]["fixed"] = "left"; + } + } + table.render(option); + } else { + table.render(option); + } + + //鍒锋柊鎸夐挳鏄剧ず + var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞� + var HBillType = "3846"; + Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }) + } + + //鑾峰彇褰撳墠鐢ㄦ埛鐨勯粯璁よ繃婊ゆ柟妗� + function get_DefaultModule() { + $.ajax({ + url: GetWEBURL() + '/Xt_FastICScheme/Chooselist', + type: "GET", + data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" }, + success: function (data1) { + if (data1.count == 1) { + //褰撳墠鐢ㄦ埛璁剧疆鏈夐粯璁ょ殑杩囨护鏂规 + var data = data1.data; + //褰撳墠閫夋嫨鐨勮繃婊ゆ柟妗� + HInterID_Choose = data[0].hmainid; + //杩囨护鏂规鍐呯爜 + HInterID = data[0].hmainid + //杩囨护鏂规鍚嶇О + HDefaultFilter = data[0].鏂规鍚嶇О + //杩囨护鏂规鐨勫娉紙鏂规淇℃伅鎻忚堪锛� + var HRemark = data[0].澶囨敞 + //鏄剧ず鍑哄綋鍓嶇殑榛樿杩囨护鏂规 + document.getElementById("HFilterScheme_Now").style.display = "block"; + document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>'; + //鎶婅繃婊ゆ潯浠跺�煎洖鍐欏埌椤甸潰涓� + for (let i = 0; i < data.length; i++) { + $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�); + if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') { + $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true); + } + } + //鎵ц鏌ヨ鏂规硶 + get_FastQuery() + form.render("select"); + } else { + //褰撳墠鐢ㄦ埛娌℃湁璁剧疆榛樿鐨勮繃婊ゆ柟妗� + //闅愯棌鏄剧ず杩囨护鏂规鐨勬爣绛句俊鎭� + document.getElementById("HFilterScheme_Now").style.display = "none"; + //鎵ц鏌ヨ鏂规硶 + get_FastQuery() + form.render("select"); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + + //淇濆瓨鏂规 + function set_SaveScheme() { + var index = layer.open() + //鍒ゆ柇鐢ㄦ埛鏄惁鐐瑰嚮浜嗗彸涓婅鐨勨�滃弶鍙封�濆叧闂脊绐楅〉闈� + var HIsClose_Manual = false; + //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�) + var Filter = document.getElementsByClassName(HClassTag); + + var HFilterIdList = "";//杩囨护鏉′欢 + var HFilterIdLists = "";//鎷兼帴澶氫釜杩囨护鏉′欢 + var HValue = "";//杩囨护鍊� + var HElement_type = "";//杩囨护鏍囩绫诲瀷 + + for (var i = 0; i < Filter.length; i++) { + HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID + HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴) + HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊� + HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷 + } + + //鍘婚櫎鏈熬閫楀彿 + HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); + HValue = HValue.substring(0, HValue.length - 1); + HElement_type = HElement_type.substring(0, HElement_type.length - 1); + + //褰撳墠椤甸潰涓婃病鏈夐�夋嫨杩囨护鏂规锛岃繘鍏ユ柊澧炴柟娉� + if (HDefaultFilter == "") { + layer.open({ + type: 2 + , area: ['40%', '80%'] + , title: '杩囨护鏂规' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + , cancel: function () { + // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫 + HIsClose_Manual = true; + } + , end: function () { + if (HIsClose_Manual != true) { + get_FastQuery(); + //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗� + document.getElementById("HFilterScheme_Now").style.display = "block"; + document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>'; + } + } + }) + layer.close(index) + } else { + //褰撳墠椤甸潰宸叉湁杩囨护鏂规锛岀敤鎴烽�夋嫨 鏂板鎴栬�呯紪杈� + layer.confirm('褰撳墠宸查�夋嫨杩囨护鏂规锛屾槸鍚︿慨鏀癸紵璇烽�夋嫨瀵瑰簲鎿嶄綔', { + title: "鎿嶄綔鎻愮ず", + icon: 0, + btn: ['鏂板鏂规', '淇濆瓨淇敼褰撳墠鏂规', '鍙栨秷'] + }, function (index, layero) { + //鏂板 + layer.open({ + type: 2 + , area: ['40%', '80%'] + , title: '杩囨护鏂规' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + , end: function () { + get_FastQuery() + //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗� + document.getElementById("HFilterScheme_Now").style.display = "block"; + document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>'; + } + }) + layer.close(index) + }, function (index) { + //缂栬緫 + var Filter_Edit = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�) + HFilterIdList = ""; + HFilterIdLists = ""; + HValue = ""; + HElement_type = ""; + for (var i = 0; i < Filter_Edit.length; i++) { + HFilterIdList = Filter_Edit[i].id; //杩囨护鏉′欢ID + HFilterIdLists += Filter_Edit[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴) + HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊� + HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷 + } + //鍘婚櫎鏈熬閫楀彿 + HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); + HValue = HValue.substring(0, HValue.length - 1); + HElement_type = HElement_type.substring(0, HElement_type.length - 1); + + var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3; + + //淇敼 + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Xt_FastICScheme/save", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + async: true, + data: { "oMain": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + layer.msg(data.Message, { time: 1 * 1000, icon: 1 }); + } + else { + + } + layer.closeAll("loading"); + }, + error: function (err) { + + + } + }); + layer.close(index) + }, function (index) { + //鍙栨秷 + layer.alert('鍙栨秷') + layer.close(index) + }); + } + + } + + //璇诲彇鏂规 + function set_ReadScheme() { + var HIsClose_Manual = false; + var Filter = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�) + + var HFilterIdList = ""; + var HFilterIdLists = ""; + var HValue = ""; + var HElement_type = ""; + for (var i = 0; i < Filter.length; i++) { + HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID + HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴) + HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊� + HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷 + } + //鍘婚櫎鏈熬閫楀彿 + HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1); + HValue = HValue.substring(0, HValue.length - 1); + HElement_type = HElement_type.substring(0, HElement_type.length - 1); + + layer.open({ + type: 2 + , area: ['80%', '80%'] + , title: '杩囨护鏂规鍒楄〃' + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName + , cancel: function () { + // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫 + HIsClose_Manual = true; + } + , end: function () { + if (HIsClose_Manual != true) { + get_FastQuery() + form.render("select"); + } + } + }) + } + + //楂樼骇杩囨护 + function set_QueryCondition() { + var colName = ""; + var contentUrl = ""; + for (var i = 0; i < option.cols[0].length; i++) { + if (option.cols[0][i]["field"] != undefined && option.cols[0][i]["hide"] != true) { + colName += option.cols[0][i]["title"] + ","; + } + } + var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞 + var urlLen = urlStr.split('/'); + for (var i = 0; i < urlLen.length - 4; i++) { + contentUrl += "../"; + } + colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 + + var HModBillName = "h_v_Qj_Sc_MouldUpperBillList";//绛変簬璇ュ垪琛ㄧ殑瑙嗗浘 + + contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_QueryCondition.html?HModName=' + HModBillName + '&colName=' + colName; + + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "楂樼骇杩囨护" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "70%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: [contentUrl, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.cache["mainTable"];//鑾峰彇閫変腑鐨勬暟鎹� + if (checkStatus.length == 0) { + return layer.msg("璇疯緭鍏ヨ繃婊ゆ潯浠�!"); + } + var myIframe = window[laero.find('iframe')[0]['name']]; + GetDataCols += "and ("; + for (var i = 0; i < checkStatus.length; i++) { + GetDataCols += myIframe.get_FastQuery(checkStatus[i]); //get_FastQuery()涓哄瓙椤甸潰鐨勬柟娉� + if ((i + 1) < checkStatus.length) { + GetDataCols += " " + checkStatus[i]["HRelationCol"] + " "; + } + } + GetDataCols += ")"; + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + , end: function () { + if (GetDataCols != "") { + get_FastQuery(); + } + } + }) + } + //鍒楁槑鏄剧ず涓嬫媺妗� function ColFilter() { var Organization = '<option value="0" selected="selected" ></option>'; @@ -457,4 +983,7 @@ //#endregion //浠ヤ笂鏄痩ayui妯″潡 }); + function GetDataCol(data) { + GetDataCols = data; + } </script> \ No newline at end of file diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html" index bd2b603..c83d2d1 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html" @@ -2566,7 +2566,7 @@ if (checkStatus.data.length != 1) { return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�"); } - OptionData = checkStatus.data[0]; + OptionData[0] = checkStatus.data[0]; //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� obj.update({ "HSourceID": checkStatus.data[0].HItemID @@ -2576,8 +2576,8 @@ } , end: function () { obj.update({ - "HSourceID": OptionData.HItemID - , "鐢熶骇璧勬簮": OptionData.鐢熶骇璧勬簮鍚嶇О + "HSourceID": OptionData[0].HItemID + , "鐢熶骇璧勬簮": OptionData[0].鐢熶骇璧勬簮鍚嶇О }) } }) @@ -3164,6 +3164,6 @@ //鍙屽嚮杩斿洖鐢熶骇璧勬簮 function GetGySource(data) { - OptionData = data + OptionData[0] = data } </script> \ No newline at end of file -- Gitblit v1.9.1