From 9cf675865b67bc94ee6c97c2fb61b9ef2e825f6a Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期五, 22 十二月 2023 13:47:17 +0800
Subject: [PATCH] 逆向追溯查询报表 质量追溯查询报表
---
WebTM/views/车间管理/单品过站/BadQueryReport.html | 341 +++++++++++++++++++---
WebTM/views/车间管理/单品过站/RetrospectiveQueryReport.html | 507 ++++++++++++++++++++++++++++++--
WebTM/views/index.html | 4
3 files changed, 761 insertions(+), 91 deletions(-)
diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index 6ac0d5b..c88803f 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -606,8 +606,8 @@
<dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/Cj_ProcessItemBGA.html">宸ュ簭鍗曞搧杩斾慨鍙�</a></dd>
<!--<dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/Cj_ProcessItemBGA_PJGH.html">宸ュ簭鍗曞搧杩斾慨鍙�(閰嶄欢鏇存崲)</a></dd>-->
<dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/Sc_SourceLineRepairBillList.html">杩斾慨璁板綍鍒楄〃</a></dd>
- <dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/RetrospectiveQueryReport.html">鍚堟牸杩芥函鏌ヨ鎶ヨ〃</a></dd>
- <dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/BadQueryReport.html">涓嶈壇杩芥函鏌ヨ鎶ヨ〃</a></dd>
+ <dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/RetrospectiveQueryReport.html">璐ㄩ噺杩芥函鏌ヨ</a></dd>
+ <dd><a lay-href="杞﹂棿绠$悊/鍗曞搧杩囩珯/BadQueryReport.html">閫嗗悜杩芥函鏌ヨ鎶ヨ〃</a></dd>
</dl>
</dd>
</dl>
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/BadQueryReport.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/BadQueryReport.html"
index 768eeff..f01ef59 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/BadQueryReport.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/BadQueryReport.html"
@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
- <title>涓嶈壇杩芥函鏌ヨ鎶ヨ〃</title>
+ <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/layui/layui.js"></script>
@@ -26,21 +26,27 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">鐢熶骇璁㈠崟鍙�</label>
+ <label class="layui-form-label">鐗╂枡缂栫爜</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" value="">
+ <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" value="">
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label" style="width: 76px;">浜у搧鏉$爜</label>
+ <label class="layui-form-label">鐗╂枡鍚嶇О</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="HBardCode" id="HBardCode" value="">
+ <input type="text" class="layui-input" name="HMaterName" id="HMaterName" value="" style="background-color: #efefef4d;" readonly>
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">娴佽浆鍗″彿</label>
+ <label class="layui-form-label" style="width: 76px;">瑙勬牸鍨嬪彿</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" value="">
+ <input type="text" class="layui-input" name="HMaterModel" id="HMaterModel" value="" style="background-color: #efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鎵规鍙�</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HBatchNo" id="HBatchNo">
</div>
</div>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
@@ -81,10 +87,41 @@
</div>
</div>
</div>
- <table class="" id="mainTable" lay-filter="mainTable"></table>
- <script type="text/html" id="toolbarDemo">
+ <div class="layui-tab layui-tab-card">
+ <ul class="layui-tab-title">
+ <li class="layui-this">娴佽浆鍗℃竻鍗�</li>
+ <li>浜у搧鐮佺粦瀹氭竻鍗�</li>
+ <li>鍑哄叆搴撹褰�</li>
+ <!--<li>鐩稿叧搴撳瓨娓呭崟</li>-->
+ </ul>
+ <div class="layui-tab-content">
+ <div class="layui-tab-item layui-show">
+ <!--娴佽浆鍗℃竻鍗�-->
+ <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+ </div>
+ <div class="layui-tab-item">
+ <!--浜у搧鐮佺粦瀹氭竻鍗�-->
+ <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
+ </div>
+ <div class="layui-tab-item">
+ <!--鍑哄叆搴撹褰�-->
+ <table class="layui-hide" id="mainTable3" lay-filter="mainTable3"></table>
+ </div>
+ <div class="layui-tab-item">
+ <!--鐩稿叧搴撳瓨娓呭崟-->
+ <table class="layui-hide" id="mainTable4" lay-filter="mainTable4"></table>
+ </div>
+ </div>
+ </div>
+
+ <script type="text/html" id="toolbarDemo1">
<div class="layui-btn-container">
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+ </div>
+ </script>
+ <script type="text/html" id="toolbarDemo5">
+ <div class="layui-btn-container">
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn5"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
</div>
</script>
</form>
@@ -112,8 +149,14 @@
, laydate = layui.laydate
, soulTable = layui.soulTable
var sWhere = "";
- var option = [];
- var HModName = "BadQueryReport";
+ var option1 = [];
+ var option2 = [];
+ var option3 = [];
+ var option4 = [];
+ var option5 = [];
+ var option6 = [];
+ var option7 = [];
+ var HModName = "RetrospectiveQueryReport";
var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID"];//瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
//#endregion
@@ -130,7 +173,7 @@
//#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
// 澶村伐鍏锋爮浜嬩欢
- table.on('toolbar(mainTable)', function (obj) {
+ table.on('toolbar(mainTable1)', function (obj) {
switch (obj.event) {
//鍒楄缃�
case 'set_HideColumn': get_HideColumn();
@@ -152,15 +195,15 @@
//鏌ヨ
get_FastQuery();
}
-
- // 鏌ヨ
- function get_Display(sWhere) {
+ // 娴佽浆鍗℃竻鍗�
+ function get_Display1(sWhere) {
var ajaxLoad = layer.load();
$.ajax({
- url: GetWEBURL() + '/Cj_SingleStation/BadQueryReport',
+ url: GetWEBURL() + '/Cj_SingleStation/Sc_ProcessExchangeBillMainList',
type: "GET",
- data: { "HBardCode": $("#HBardCode").val(), "HProcExchBillNo": $("#HProcExchBillNo").val(), "HICMOBillNo": $("#HICMOBillNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ async: false,
+ data: { "HMaterNumber": $("#HMaterNumber").val(), "HBatchNo": $("#HBatchNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.count == 1) {
var data = [];
@@ -189,9 +232,9 @@
}
//鍔ㄦ�佹樉绀哄垪鍚�
- option = {
- elem: '#mainTable'
- , toolbar: '#toolbarDemo'
+ option1 = {
+ elem: '#mainTable1'
+ , toolbar: '#toolbarDemo1'
, cols: [col]
, data: data1.data
, height: 800
@@ -204,7 +247,12 @@
soulTable.render(this);
}
}
- table.render(option);
+ table.render(option1);
+ if ($("#HBardCode").val() != "" && data1.data.length != 0) {
+ $("#HICMOBillNo").val(data1.data[0]["鐢熶骇璁㈠崟鍙�"]);
+ $("#HProcExchBillNo").val(data1.data[0]["娴佽浆鍗�"]);
+ }
+
//鍒锋柊琛ㄦ牸鏁版嵁
DisPlay_HideColumn();
@@ -225,8 +273,203 @@
});
}
+ // 浜у搧鐮佺粦瀹氭竻鍗�
+ function get_Display2(sWhere) {
+
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Cj_SingleStation/HBardcodeList',
+ type: "GET",
+ async: false,
+ data: { "HMaterNumber": $("#HMaterNumber").val(), "HBatchNo": $("#HBatchNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+ if ($.inArray(data[i].name, titleData) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 180 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+ }
+ }
+ }
+
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option2 = {
+ elem: '#mainTable2'
+ , toolbar: '#toolbarDemo1'
+ , cols: [col]
+ , data: data1.data
+ , height: 800
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ table.render(option2);
+ if ($("#HBardCode").val() != "" && data1.data.length != 0) {
+ $("#HICMOBillNo").val(data1.data[0]["鐢熶骇璁㈠崟鍙�"]);
+ $("#HProcExchBillNo").val(data1.data[0]["娴佽浆鍗�"]);
+ }
+
+
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+
+ if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+ ColFilter();
+ }
+
+ layer.close(ajaxLoad);
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //鍑哄叆搴撹褰�
+ function get_Display3(sWhere) {
+
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Cj_SingleStation/BardCodeOutInList',
+ type: "GET",
+ async: false,
+ data: { "HMaterNumber": $("#HMaterNumber").val(), "HBatchNo": $("#HBatchNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+ if ($.inArray(data[i].name, titleData) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 180 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+ }
+ }
+ }
+
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option3 = {
+ elem: '#mainTable3'
+ , toolbar: '#toolbarDemo3'
+ , cols: [col]
+ , data: data1.data
+ , height: 800
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ table.render(option3);
+ layer.close(ajaxLoad);
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //鐩稿叧搴撳瓨娓呭崟
+ function get_Display4(sWhere) {
+ var sWhere = " and HMaterSN='" + HBardcode + "'";
+
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Cj_SingleStation/Sc_SourceLineRepairBillSub_MaterList',
+ type: "GET",
+ async: false,
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option4 = {
+ elem: '#mainTable4'
+ , toolbar: '#toolbarDemo4'
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { type: 'numbers', title: '搴忓彿' }
+ , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟' }
+ , { field: 'HDate', title: '鏃ユ湡' }
+ , { field: 'HMaterNumber', title: '閰嶄欢鐗╂枡缂栫爜' }
+ , { field: 'HMaterName', title: '閰嶄欢鐗╂枡鍚嶇О' }
+ , { field: 'HBarCode', title: '閰嶄欢SN鐮�' }
+ , { field: 'HMaterSN', title: '浜у搧SN鐮�' }
+
+ ]]
+ , data: data1.data
+ , height: 800
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ table.render(option4);
+ layer.close(ajaxLoad);
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
// 蹇�熻繃婊�
function get_FastQuery() {
+
var ColName = $("#ColName").val();//澶嶉�夋
var Comparator = $("#Comparator").val()
var ColContent = $("#ColContent").val();
@@ -253,7 +496,13 @@
com = " and (" + ColName + " " + com + ")";
}
- get_Display(sWhere);
+ sWhere += com;
+
+ get_Display1(sWhere);//娴佽浆鍗℃竻鍗�
+ get_Display2(sWhere);//浜у搧鐮佺粦瀹氭竻鍗�
+ get_Display3(sWhere);//鍑哄叆搴撹褰�
+ //get_Display4(HBardCode);//鐩稿叧搴撳瓨娓呭崟
+
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
}
@@ -261,8 +510,8 @@
function get_HideColumn() {
var colName = "";
var contentUrl = "";
- for (var i = 1; i < option.cols[0].length - 1; i++) {
- colName += option.cols[0][i]["title"] + ",";
+ for (var i = 1; i < option1.cols[0].length - 1; i++) {
+ colName += option1.cols[0][i]["title"] + ",";
}
var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
var urlLen = urlStr.split('/');
@@ -307,50 +556,50 @@
dataCol = data1.data[0].HGridString.split(',');
- for (var i = 0; i < option.cols[0].length - 2; i++) {
+ for (var i = 0; i < option1.cols[0].length - 2; i++) {
var dataCols = dataCol[i].split('|');
//闅愯棌鍒�
if (dataCols[1] == 1) {
- option.cols[0][i + 1]["hide"] = true;
+ option1.cols[0][i + 1]["hide"] = true;
}
//璁剧疆鍒楀
if (dataCols[3] > 0) {
- option.cols[0][i + 1]["width"] = dataCols[3];
+ option1.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;";
+ option1.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
} else {
- option.cols[0][i + 1]["style"] = "font-size:100%";
+ option1.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;";
+ // option1.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
//} else {
- // option.cols[0][i + 1]["width"] = "";
+ // option1.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;
+ if (dataCols[1] == 0 && $.inArray(option1.cols[0][i + 1]["title"], titleData) == -1) {
+ option1.cols[0][i + 1]["hide"] = false;
}
//瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
switch (dataCols[2]) {
case "L":
- option.cols[0][i + 1]["align"] = "left";
+ option1.cols[0][i + 1]["align"] = "left";
break;
case "M":
- option.cols[0][i + 1]["align"] = "center";
+ option1.cols[0][i + 1]["align"] = "center";
break;
case "R":
- option.cols[0][i + 1]["align"] = "right";
+ option1.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;
+ for (var i = 1; i < option1.cols[0].length - 1; i++) {
+ if (option1.cols[0][i]["fixed"] != null) {
+ option1.cols[0][i]["fixed"] = null;
}
else {
break;
@@ -359,15 +608,15 @@
//鍐荤粨鍒�
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) {
+ if ($.inArray(option1.cols[0][i + 1]["title"], titleData) != -1) {
data1.data[0].HFixCols += 1;
}
- option.cols[0][i + 1]["fixed"] = "left";
+ option1.cols[0][i + 1]["fixed"] = "left";
}
}
- table.render(option);
+ table.render(option1);
} else {
- table.render(option);
+ table.render(option1);
}
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
@@ -378,9 +627,9 @@
// 鍒楁槑鏄剧ず涓嬫媺妗�
function ColFilter() {
var Organization = '<option value="0" selected="selected" ></option>';
- for (var i = 1; i < option.cols[0].length; i++) {
- if (option.cols[0][i].hide != true) {
- Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+ for (var i = 1; i < option1.cols[0].length; i++) {
+ if (option1.cols[0][i].hide != true) {
+ Organization += '<option style="color:blue;" value="' + option1.cols[0][i].field + '">' + option1.cols[0][i].field + '</option>';
}
}
$("#ColName").empty();
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/RetrospectiveQueryReport.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/RetrospectiveQueryReport.html"
index 83dbed4..7bd11c9 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/RetrospectiveQueryReport.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231/RetrospectiveQueryReport.html"
@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
- <title>鍚堟牸杩芥函鏌ヨ鎶ヨ〃</title>
+ <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/layui/layui.js"></script>
@@ -28,7 +28,7 @@
<div class="layui-inline">
<label class="layui-form-label">鐢熶骇璁㈠崟鍙�</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" value="">
+ <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" value="">
</div>
</div>
<div class="layui-inline">
@@ -40,7 +40,7 @@
<div class="layui-inline">
<label class="layui-form-label">娴佽浆鍗″彿</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" value="">
+ <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo">
</div>
</div>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
@@ -49,7 +49,7 @@
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
<div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
<div class="layui-row" style="margin-top:10px;margin-left:5%;">
-
+
</div>
<div class="layui-row" style="margin-top: 10px; margin-bottom: 10px ">
<div class="layui-inline">
@@ -81,10 +81,56 @@
</div>
</div>
</div>
- <table class="" id="mainTable" lay-filter="mainTable"></table>
- <script type="text/html" id="toolbarDemo">
+ <div class="layui-tab layui-tab-card">
+ <ul class="layui-tab-title">
+ <li class="layui-this">杩涘嚭绔欒褰�</li>
+ <li>涓嶈壇姹囨姤璁板綍</li>
+ <li>宸ヨ壓鍙傛暟璁板綍</li>
+ <li>閰嶄欢娓呭崟</li>
+ <li>杩斾慨璁板綍</li>
+ <li>閰嶄欢鍙樻洿璁板綍</li>
+ <!--<li>鍑哄叆搴撹褰�</li>-->
+ </ul>
+ <div class="layui-tab-content">
+ <div class="layui-tab-item layui-show">
+ <!--杩涘嚭绔欒褰�-->
+ <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
+ </div>
+ <div class="layui-tab-item">
+ <!--涓嶈壇姹囨姤璁板綍-->
+ <table class="layui-hide" id="mainTable5" lay-filter="mainTable5"></table>
+ </div>
+ <div class="layui-tab-item">
+ <!--宸ヨ壓鍙傛暟璁板綍-->
+ <table class="layui-hide" id="mainTable7" lay-filter="mainTable7"></table>
+ </div>
+ <div class="layui-tab-item">
+ <!--閰嶄欢娓呭崟-->
+ <table class="layui-hide" id="mainTable3" lay-filter="mainTable3"></table>
+ </div>
+ <div class="layui-tab-item">
+ <!--杩斾慨璁板綍-->
+ <table class="layui-hide" id="mainTable6" lay-filter="mainTable6"></table>
+ </div>
+ <div class="layui-tab-item">
+ <!--閰嶄欢鍙樻洿璁板綍-->
+ <table class="layui-hide" id="mainTable4" lay-filter="mainTable4"></table>
+ </div>
+ <div class="layui-tab-item">
+ <!--鍑哄叆搴撹褰�-->
+ <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+ </div>
+ </div>
+ </div>
+
+ <script type="text/html" id="toolbarDemo1">
<div class="layui-btn-container">
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+ </div>
+ </script>
+ <script type="text/html" id="toolbarDemo5">
+ <div class="layui-btn-container">
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn5"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
</div>
</script>
</form>
@@ -112,7 +158,13 @@
, laydate = layui.laydate
, soulTable = layui.soulTable
var sWhere = "";
- var option = [];
+ var option1 = [];
+ var option2 = [];
+ var option3 = [];
+ var option4 = [];
+ var option5 = [];
+ var option6 = [];
+ var option7 = [];
var HModName = "RetrospectiveQueryReport";
var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID"];//瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
@@ -130,7 +182,7 @@
//#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
// 澶村伐鍏锋爮浜嬩欢
- table.on('toolbar(mainTable)', function (obj) {
+ table.on('toolbar(mainTable2)', function (obj) {
switch (obj.event) {
//鍒楄缃�
case 'set_HideColumn': get_HideColumn();
@@ -138,6 +190,34 @@
};
});
+ table.on('row(mainTable2)', function (obj) {
+ var HBardcode = obj.data["鏉$爜"];
+ get_Display3(HBardcode);//閰嶄欢娓呭崟
+ get_Display6(HBardcode);//杩斾慨璁板綍
+ get_Display7(HBardcode);//宸ヨ壓鍙傛暟
+ })
+
+ table.on('row(mainTable5)', function (obj) {
+ var HBardcode = obj.data["鏉$爜"];
+ get_Display3(HBardcode);//閰嶄欢娓呭崟
+ get_Display6(HBardcode);//杩斾慨璁板綍
+ get_Display7(HBardcode);//宸ヨ壓鍙傛暟
+ })
+
+ table.on('row(mainTable6)', function (obj) {
+ var HBardcode = obj.data["SN鐮�"];
+ get_Display4(HBardcode);//閰嶄欢鍙樻洿璁板綍
+ })
+
+
+ table.on('toolbar(mainTable5)', function (obj) {
+ switch (obj.event) {
+ //鍒楄缃�
+ case 'set_HideColumn5': get_HideColumn5();
+ break;
+ };
+ });
+
//鏌ヨ鎸夐挳
form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
get_FastQuery();
@@ -153,13 +233,210 @@
get_FastQuery();
}
- // 鏌ヨ
- function get_Display(sWhere) {
+ // 杩涘嚭绔欐煡璇�
+ function get_Display2(sWhere) {
var ajaxLoad = layer.load();
$.ajax({
- url: GetWEBURL() + '/Cj_SingleStation/RetrospectiveQueryReport',
+ url: GetWEBURL() + '/Cj_SingleStation/EntryAndExitRecords',
type: "GET",
+ async: false,
+ data: { "HBardCode": $("#HBardCode").val(), "HProcExchBillNo": $("#HProcExchBillNo").val(), "HICMOBillNo": $("#HICMOBillNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+ if ($.inArray(data[i].name, titleData) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 180 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+ }
+ }
+ }
+
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option2 = {
+ elem: '#mainTable2'
+ , toolbar: '#toolbarDemo1'
+ , cols: [col]
+ , data: data1.data
+ , height: 800
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ table.render(option2);
+ //if ($("#HBardCode").val() != "" && data1.data.length != 0) {
+ // $("#HICMOBillNo").val(data1.data[0]["鐢熶骇璁㈠崟鍙�"]);
+ // $("#HProcExchBillNo").val(data1.data[0]["娴佽浆鍗�"]);
+ //}
+
+
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+
+ if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+ ColFilter();
+ }
+
+ layer.close(ajaxLoad);
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //閰嶄欢娓呭崟
+ function get_Display3(HBardcode) {
+
+ var sWhere = " and 浜у搧鏉$爜='" + HBardcode + "'";
+
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Sc_AssemblyBill/list1',
+ type: "GET",
+ async: false,
+ data: { "sWhere": sWhere },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+ if ($.inArray(data[i].name, titleData) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 180 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+ }
+ }
+ }
+
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option3 = {
+ elem: '#mainTable3'
+ , toolbar: '#toolbarDemo3'
+ , cols: [col]
+ , data: data1.data
+ , height: 800
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ table.render(option3);
+ layer.close(ajaxLoad);
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //閰嶄欢鍙樻洿璁板綍
+ function get_Display4(HBardcode) {
+ var sWhere = " and HMaterSN='" + HBardcode + "'";
+
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Cj_SingleStation/Sc_SourceLineRepairBillSub_MaterList',
+ type: "GET",
+ async: false,
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option4 = {
+ elem: '#mainTable4'
+ , toolbar: '#toolbarDemo4'
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { type: 'numbers', title: '搴忓彿' }
+ , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟' }
+ , { field: 'HDate', title: '鏃ユ湡' }
+ , { field: 'HMaterNumber', title: '閰嶄欢鐗╂枡缂栫爜' }
+ , { field: 'HMaterName', title: '閰嶄欢鐗╂枡鍚嶇О' }
+ , { field: 'HBarCode', title: '閰嶄欢SN鐮�' }
+ , { field: 'HMaterSN', title: '浜у搧SN鐮�' }
+
+ ]]
+ , data: data1.data
+ , height: 800
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ table.render(option4);
+ layer.close(ajaxLoad);
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //涓嶈壇姹囨姤璁板綍
+ function get_Display5(sWhere) {
+
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Cj_SingleStation/BadQueryReport',
+ type: "GET",
+ async: false,
data: { "HBardCode": $("#HBardCode").val(), "HProcExchBillNo": $("#HProcExchBillNo").val(), "HICMOBillNo": $("#HICMOBillNo").val(), "sWhere": sWhere, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.count == 1) {
@@ -190,8 +467,8 @@
//鍔ㄦ�佹樉绀哄垪鍚�
option = {
- elem: '#mainTable'
- , toolbar: '#toolbarDemo'
+ elem: '#mainTable5'
+ , toolbar: '#toolbarDemo5'
, cols: [col]
, data: data1.data
, height: 800
@@ -206,13 +483,147 @@
}
table.render(option);
- //鍒锋柊琛ㄦ牸鏁版嵁
- DisPlay_HideColumn();
+ ////鍒锋柊琛ㄦ牸鏁版嵁
+ //DisPlay_HideColumn();
- if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
- ColFilter();
+ //if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+ // ColFilter();
+ //}
+
+ layer.close(ajaxLoad);
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //杩斾慨璁板綍
+ function get_Display6(HBardcode) {
+
+ var sWhere = " and SN鐮�='" + HBardcode + "'";
+
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Cj_SingleStation/ProcessItemRepair',
+ type: "GET",
+ async: false,
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+ if ($.inArray(data[i].name, titleData) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 180 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+ }
+ }
}
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option6 = {
+ elem: '#mainTable6'
+ , toolbar: '#toolbarDemo6'
+ , cols: [col]
+ , data: data1.data
+ , height: 800
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ table.render(option6);
+ layer.close(ajaxLoad);
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //宸ヨ壓鍙傛暟
+ function get_Display7(HBardcode) {
+
+ var sWhere = " and 鏉$爜='" + HBardcode + "'";
+
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Cj_SingleStation/ProcessParameters',
+ type: "GET",
+ async: false,
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+ if ($.inArray(data[i].name, titleData) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 180 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 150 });
+ }
+ }
+ }
+
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option7 = {
+ elem: '#mainTable7'
+ , toolbar: '#toolbarDemo7'
+ , cols: [col]
+ , data: data1.data
+ , height: 800
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ table.render(option7);
layer.close(ajaxLoad);
} else {
layer.close(ajaxLoad);
@@ -227,10 +638,12 @@
// 蹇�熻繃婊�
function get_FastQuery() {
+ var HBardCode = $("#HBardCode").val();
+
var ColName = $("#ColName").val();//澶嶉�夋
var Comparator = $("#Comparator").val()
var ColContent = $("#ColContent").val();
-
+
var com = "";
if (ColName != 0 && Comparator != 0) {
switch (Comparator) {
@@ -253,7 +666,15 @@
com = " and (" + ColName + " " + com + ")";
}
- get_Display(sWhere);
+ get_Display2(sWhere);
+ get_Display5(sWhere);
+ if (HBardCode != "") {
+ get_Display3(HBardCode);//閰嶄欢娓呭崟
+ get_Display6(HBardCode);//杩斾慨璁板綍
+ get_Display7(HBardCode);//宸ヨ壓鍙傛暟
+ get_Display4(HBardCode);//閰嶄欢鍙樻洿璁板綍
+ }
+
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
}
@@ -261,8 +682,8 @@
function get_HideColumn() {
var colName = "";
var contentUrl = "";
- for (var i = 1; i < option.cols[0].length - 1; i++) {
- colName += option.cols[0][i]["title"] + ",";
+ for (var i = 1; i < option2.cols[0].length - 1; i++) {
+ colName += option2.cols[0][i]["title"] + ",";
}
var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
var urlLen = urlStr.split('/');
@@ -307,50 +728,50 @@
dataCol = data1.data[0].HGridString.split(',');
- for (var i = 0; i < option.cols[0].length - 2; i++) {
+ for (var i = 0; i < option2.cols[0].length - 2; i++) {
var dataCols = dataCol[i].split('|');
//闅愯棌鍒�
if (dataCols[1] == 1) {
- option.cols[0][i + 1]["hide"] = true;
+ option2.cols[0][i + 1]["hide"] = true;
}
//璁剧疆鍒楀
if (dataCols[3] > 0) {
- option.cols[0][i + 1]["width"] = dataCols[3];
+ option2.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;";
+ option2.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
} else {
- option.cols[0][i + 1]["style"] = "font-size:100%";
+ option2.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;";
+ // option2.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
//} else {
- // option.cols[0][i + 1]["width"] = "";
+ // option2.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;
+ if (dataCols[1] == 0 && $.inArray(option2.cols[0][i + 1]["title"], titleData) == -1) {
+ option2.cols[0][i + 1]["hide"] = false;
}
//瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
switch (dataCols[2]) {
case "L":
- option.cols[0][i + 1]["align"] = "left";
+ option2.cols[0][i + 1]["align"] = "left";
break;
case "M":
- option.cols[0][i + 1]["align"] = "center";
+ option2.cols[0][i + 1]["align"] = "center";
break;
case "R":
- option.cols[0][i + 1]["align"] = "right";
+ option2.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;
+ for (var i = 1; i < option2.cols[0].length - 1; i++) {
+ if (option2.cols[0][i]["fixed"] != null) {
+ option2.cols[0][i]["fixed"] = null;
}
else {
break;
@@ -359,15 +780,15 @@
//鍐荤粨鍒�
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) {
+ if ($.inArray(option2.cols[0][i + 1]["title"], titleData) != -1) {
data1.data[0].HFixCols += 1;
}
- option.cols[0][i + 1]["fixed"] = "left";
+ option2.cols[0][i + 1]["fixed"] = "left";
}
}
- table.render(option);
+ table.render(option2);
} else {
- table.render(option);
+ table.render(option2);
}
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
@@ -378,9 +799,9 @@
// 鍒楁槑鏄剧ず涓嬫媺妗�
function ColFilter() {
var Organization = '<option value="0" selected="selected" ></option>';
- for (var i = 1; i < option.cols[0].length; i++) {
- if (option.cols[0][i].hide != true) {
- Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+ for (var i = 1; i < option2.cols[0].length; i++) {
+ if (option2.cols[0][i].hide != true) {
+ Organization += '<option style="color:blue;" value="' + option2.cols[0][i].field + '">' + option2.cols[0][i].field + '</option>';
}
}
$("#ColName").empty();
--
Gitblit v1.9.1