From 727ee25aeb5fcaf84e2cf009b2eacd3a86bcb3ca Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 28 十一月 2024 12:55:23 +0800
Subject: [PATCH] 新增 环境检测方案,环境检测单
---
WebTM/views/模治具管理/模治具管理/Gy_BarCodeBillList.html | 258 ++++++++++++++++++++++++++++++++++++--------------
1 files changed, 184 insertions(+), 74 deletions(-)
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
index 958fbf0..8e4f235 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
@@ -171,10 +171,12 @@
<input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
</div>
</div>
- </div>
+ </div>
</div>
</div>
<table class="" id="mainTable" lay-filter="mainTable"></table>
+
+ <div id="page" style="position:relative;bottom:0;"></div>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
@@ -184,7 +186,7 @@
<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_Drop" id="set_Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button>
<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_DeDrop" id="set_DeDrop"><i class="layui-icon layui-icon-radio"></i>鍙嶄綔搴�</button>
<button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Delete" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></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="" 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_export" id="get_export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
<button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-exit" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
@@ -217,6 +219,7 @@
var sWhere = "";
var option = [];
var ins;
+
var titleData = ["鍗曟嵁ID", "HMaterID", "HDeptID", "HSupID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
var page = 1;//鍒嗛〉鏁版嵁
var size = 50;
@@ -298,7 +301,7 @@
rows = rows.substring(rows.length - 1, 0);
layer.open({
type: 2
- , area: ['50%', '50%']
+ , area: ['40%', '80%']
, title: '鎵撳嵃妯$増閫夋嫨'
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
@@ -318,7 +321,7 @@
$("#HSourceBillNo").val("");
$("#HMaterNumber").val("");
sWhere = "";
- get_Display(sWhere);
+ get_DisplayPage(sWhere);
break;
//浣滃簾鎸夐挳
@@ -534,11 +537,8 @@
option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
- , height: 'full-50'
- , page: true
- , totalRow: true
- , cellMinWidth: 90
- , limits: [50, 500, 5000, 20000]
+ , height: 'full-150'
+ , page: false
, limit: 50
, done: function (res, curr, count) {
soulTable.render(this);
@@ -607,7 +607,8 @@
//do something
page = obj.curr;
size = obj.limit;
- get_FastQuery();
+ // 鍋囪鎸夐挳鏈変竴涓狪D涓�"myButton"
+ $("#btnSearch").trigger("click");
}
}
}
@@ -839,6 +840,11 @@
if ($("#ColName option").length < 1) {
ColFilter();
}
+
+ //鍒锋柊鎸夐挳鏄剧ず
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "鏉$爜涓绘。";
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
//layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
} else {
option.data = [[]]
@@ -857,8 +863,8 @@
//闅愯棌鍒楄缃�
function get_HideColumn() {
var colName = "";
- for (var i = 1; i < option.cols[0].length - 1; i++) {
- colName += option.cols[0][i]["title"] + ",";
+ for (var i = 1; i < option.cols[0].length; i++) {
+ colName += option.cols[0][i]["field"] + ",";
}
colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
@@ -870,7 +876,7 @@
, shift: 2 //寮瑰嚭鍔ㄧ敾
, area: ["50%", "90%"] //绐椾綋澶у皬
, maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
- , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName, "yes"]
, btn: ["纭畾", "鍙栨秷"]
, btn1: function (index, laero) {
//鍒锋柊琛ㄦ牸鏁版嵁
@@ -882,93 +888,197 @@
}
//鏄剧ず鍒楁暟鎹�
+ //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 = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+
+
+ // dataCol = data1.data[0].HGridString.split(',');
+
+ // for (var i = 0; i < option.cols[0].length - 2; 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 = "鏉$爜涓绘。";
+ // Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
+ // }, error: function () {
+ // layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ // }
+ // })
+ //}
+
+ //#region 鏄剧ず鍒楁暟鎹�
function DisPlay_HideColumn() {
$.ajax({
url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
type: "GET",
+ async: false,
data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.data.length != 0) {
-
var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-
-
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
dataCol = data1.data[0].HGridString.split(',');
-
- for (var i = 0; i < option.cols[0].length - 2; 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;
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ 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 (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ 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;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ }
}
- option.cols[0][i + 1]["fixed"] = "left";
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ 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 = "鏉$爜涓绘。";
Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
-
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
})
}
+ //#endregion
//#region 瀵煎嚭Execel
function get_Export() {
--
Gitblit v1.9.1