From 310d7435e49c17bd759e4e115a13d4a367c440a7 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 06 八月 2024 17:29:33 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/WebTM.csproj.user | 7
WebTM/views/WMS扫码模块/销售出库/Kf_SellOutBill_QiaoYi_PDA.html | 12
WebTM/views/质量管理/质量报表/QC_BadProductsReport.html | 674 ++++++++++++++++++++++++++++
WebTM/layuiadmin/Scripts/webConfig.js | 8
WebTM/views/质量管理/质量报表/QC_ErrManagerLedgerReport.html | 704 +++++++++++++++++++++++++++++
WebTM/WebTM.csproj | 2
6 files changed, 1,399 insertions(+), 8 deletions(-)
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 561cb3a..454a3bb 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -450,10 +450,12 @@
<Content Include="views\璐ㄩ噺绠$悊\妫�楠屽彇鏍疯繕鏍峰崟\QC_TakeSampleCheckBillMainList.html" />
<Content Include="views\璐ㄩ噺绠$悊\妫�楠屽彇鏍疯繕鏍峰崟\QC_Add_TakeSampleCheckBill.html" />
<Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_ErrMsgBackBillList.html" />
+ <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_BadProductsReport.html" />
<Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_InspectionFormReport.html" />
<Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_MoistureContentDataLedger.html" />
<Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_PerformanceScrapLedger.html" />
<Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_ProcessPerformancePass.html" />
+ <Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_ErrManagerLedgerReport.html" />
<Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_QualityStatisticsDailyReport.html" />
<Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_RegistrationForTestingReport.html" />
<Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_MoistureContentDataLedger.html" />
diff --git a/WebTM/WebTM.csproj.user b/WebTM/WebTM.csproj.user
index e39639b..abfa447 100644
--- a/WebTM/WebTM.csproj.user
+++ b/WebTM/WebTM.csproj.user
@@ -1,7 +1,7 @@
锘�<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <NameOfLastUsedPublishProfile>D:\鏅轰簯杩堟�漒MES\MES-WEB-LayUI\WebTM\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
+ <NameOfLastUsedPublishProfile>D:\GIT浠撳簱\MESWMS-LayUI\WebTM\Properties\PublishProfiles\JFTM.pubxml</NameOfLastUsedPublishProfile>
<ProjectView>ProjectFiles</ProjectView>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
@@ -16,9 +16,8 @@
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
- <StartPageUrl>
- </StartPageUrl>
- <StartAction>CurrentPage</StartAction>
+ <StartPageUrl>views/user/login.html</StartPageUrl>
+ <StartAction>SpecificPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index e436c98..ba4cfc4 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -3,14 +3,14 @@
//var WEBURL = "http://192.168.16.80:8011/"; //鍔炲叕瀹ゆ湇鍔″櫒
//var WEBURL = "http://localhost:8081/SWEAPI/"; //ch鏈湴*/
//var WEBURL = "http://61.164.86.218:8099/ABAPI/";
- /*var WEBURL = "http://localhost/API/"; //棰滄檽鍐涙湰鍦伴厤缃�*/
+ var WEBURL = "http://localhost/API/"; //棰滄檽鍐涙湰鍦伴厤缃�
//var WEBURL = "http://localhost:8082/LuBaoAPI/"; //鏉ㄤ箰鏈湴閰嶇疆
/*var WEBURL = "http://localhost:8082/API/"; //鏉滆春鏈湴閰嶇疆*/
//var WEBURL = "http://localhost:81/API/"; //鐜嬪浆鏈湴閰嶇疆
/*var WEBURL = "http://localhost:8083/API/"; //闄堥洴闈欐湰鍦伴厤缃�*/
- /* var WEBURL = "http://localhost:81/API/" //缈佹稕娑涙湰鍦伴厤缃�*/
- var WEBURL = "http://localhost:8082/API/"; //寮犵憺骞挎湰鍦伴厤缃�
- /*var WEBURL = "http://localhost:8082/LuBaoAPI/";*/ //浣欐�濇澃鏈湴閰嶇疆
+ //var WEBURL = "http://localhost:81/API/" //缈佹稕娑涙湰鍦伴厤缃�
+ /*var WEBURL = "http://localhost:8082/API/"; *//*//寮犵憺骞挎湰鍦伴厤缃�*/
+ //var WEBURL = "http://localhost:8082/LuBaoAPI/"; //浣欐�濇澃鏈湴閰嶇疆
//var WEBURL = "http://localhost:8088/ARAPI/"; //浣欐�濇澃鏈湴閰嶇疆(瀹夌憺)
//var WEBURL = "http://10.1.4.155/API/"; //姹熶赴瀹㈡埛NEW
/* var WEBURL = "http://47.96.97.237/API/"; //鏅轰簯鏈嶅姟鍣�*/
diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_QiaoYi_PDA.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_QiaoYi_PDA.html"
index fabb874..8545d60 100644
--- "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_QiaoYi_PDA.html"
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_QiaoYi_PDA.html"
@@ -14,6 +14,7 @@
<script src="../../../layuiadmin/Scripts/json2.js"></script>
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+ <script src="../../../layuiadmin/PubCustom.js"></script>
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
<style>
.layui-col-xs8 {
@@ -245,6 +246,7 @@
<!--<button type="button" lay-submit="" lay-filter="cmdModify" class="layui-btn" id="cmdModify">缂栬緫</button>-->
<button type="button" lay-submit="" lay-filter="cmdDelete" class="layui-btn" id="cmdDelete">娓呯┖</button>
<button type="button" lay-submit="" lay-filter="cmdCancel" class="layui-btn" id="cmdCancel">閫�鍑�</button>
+ <button type="button" lay-submit="" lay-filter="cmdRefresh" class="layui-btn" id="cmdRefresh">鍒锋柊</button>
</div>
</div>
@@ -1079,6 +1081,16 @@
//#endregion
+ //#region 鍒锋柊
+
+ form.on('submit(cmdRefresh)', function () {
+ //鍒锋柊琛ㄤ綋鏄庣粏
+ DisBillEntryList();
+ element.tabChange('tab-Kf_SellOutBill_QiaoYi_PDA', '2');
+ })
+
+ //#endregion
+
//#region 鎵嬪伐鎶勫寘
form.on('submit(cmdChaoBao)', function () {
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_BadProductsReport.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_BadProductsReport.html"
new file mode 100644
index 0000000..8ef66db
--- /dev/null
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_BadProductsReport.html"
@@ -0,0 +1,674 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>涓嶈壇鍝佸彴璐�</title>
+ <meta name="renderer" content="webkit">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <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>
+ <script src="../../../layuiadmin/Scripts/json2.js"></script>
+ <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+ <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+ <script src="../../../layuiadmin/PubCustom.js"></script>
+ <script src="../../../layuiadmin/HideButton.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
+ <script src="../../../layuiadmin/PageTitle.js"></script>
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+</head>
+<body>
+ <div class="layui-fluid">
+ <div class="layui-col-md12">
+ <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 class="layui-collapse">
+ <div class="layui-colla-item">
+ <div class="layui-colla-title layui-inline">
+ <div class="layui-inline">
+ <span>鏇村</span>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鏃ユ湡闂撮殧</label>
+ <div class="layui-input-block">
+ <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鐗╂枡浠g爜</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HMaterNumber" id="HMaterNumber" style="width:215px;">
+ </div>
+ </div>
+ <div class="layui-row" style="margin-top:5px;margin-left:82px;margin-bottom:5px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">瑙勬牸鍨嬪彿</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HMaterModel" id="HMaterModel" style="width:215px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鍙戠幇宸ュ簭</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HProcessName" id="HProcessName" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">澶勭疆鏂瑰紡</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HDealingType" id="HDealingType" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鐧昏浜�</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HSendManName" id="HSendManName" style="width:100px;">
+ </div>
+ </div>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+ </div>
+ <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">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+ </div>
+ </div>
+ <div class="layui-row" style=" margin-top: 10px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
+ </div>
+ </div>
+
+ <div class="layui-row" style=" margin-top: 10px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="layui-tab layui-tab-card">
+ <div class="layui-tab-content">
+ <div class="layui-tab-item layui-show">
+ <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+ </div>
+ </div>
+ </div>
+ <script type="text/html" id="toolbarDemo">
+ <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>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script>
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index', //涓诲叆鍙fā鍧�
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
+
+ //#region 鍏叡鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ , soulTable = layui.soulTable
+ var sWhere = "";
+ var option = [];
+ var HModName = "QC_BadProductsReport";
+ var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID"];//瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栬〃鏍�
+ DisPlay_HideColumn();
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ // 澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable)', function (obj) {
+ switch (obj.event) {
+ //鍒楄缃�
+ case 'set_HideColumn': get_HideColumn();
+ break;
+ };
+ });
+
+ //鏌ヨ鎸夐挳
+ form.on('submit(btnSearch)', function (data) {
+ get_FastQuery();
+ });
+
+ //閲嶇疆
+ form.on('submit(btnReSearch)', function (data) {
+ set_ClearQuery();
+ });
+
+ //鏃ユ湡闂撮殧涓嬫媺鍒楄〃鐩戝惉
+ form.on('select(HInitTimeCycle)', function (data) {
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+ if (HInitTimeCycle != -1) {
+ $('#HBeginDate').prop('disabled', true);
+ $('#HEndDate').prop('disabled', true);
+
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+ //鎵ц鏌ヨ鏂规硶
+ get_FastQuery();
+ } else {
+ $('#HBeginDate').prop('disabled', false);
+ $('#HEndDate').prop('disabled', false);
+ }
+ });
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ // 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栨棩鏈熼棿闅斻�佸紑濮嬫棩鏈熴�佺粨鏉熸棩鏈�
+ setSelect_HInitTimeCycle();
+ //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ if (HInitTimeCycle != -1) {
+ $('#HBeginDate').prop('disabled', true);
+ $('#HEndDate').prop('disabled', true);
+ } else {
+ $('#HBeginDate').prop('disabled', false);
+ $('#HEndDate').prop('disabled', false);
+ }
+
+ //鏍规嵁鏃ユ湡闂撮殧璁剧疆寮�濮嬫椂闂翠笌缁撴潫鏃堕棿
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+ //鏌ヨ
+ get_FastQuery();
+ }
+
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-50'
+ , page: true
+ , totalRow: true
+ , limit: 500
+ , data:[]
+ , limits: [50, 500, 5000, 20000]
+ , cols: []
+ };
+ table.render(option);
+ }
+
+ // 鏌ヨ
+ function get_Display(sWhere) {
+
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/QC_CustomerAppealReport/QC_BadProductsReport',
+ type: "GET",
+ async: false,
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = [];//鍒楀瓧娈垫暟鎹�
+ var col = [];
+ var totalArray = ["鏁伴噺", "鍏宠仈鏁伴噺", "鏈叧鑱旀暟閲�", "鎵撳嵃鏉$爜鏁伴噺", "鏈墦鍗版潯鐮佹暟閲�", "瀹炴敹鏁伴噺", "閲戦"];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ 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', totalRowText: '鍚堣' });
+ 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 if ($.inArray(data[i].name, totalArray) > -1) { //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+ } else if (data[i].name == '鍗曟嵁鍙�') {//娣诲姞瓒呴摼鎺�
+ col.push({
+ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '鍗曟嵁鍙�', templet: function (d) {
+ return '<span style="color: blue;">' + d.鍗曟嵁鍙� + '</span>'
+ }, style: 'cursor: pointer;'
+ });
+ } 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 == "琛屽叧闂棩鏈�" ? "琛屽叧闂汉" : data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+ }
+ }
+ }
+
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , cols: [col]
+ , data: data1.data
+ , height: 'full-50'
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ table.render(option);
+
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+
+ if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+ ColFilter();
+ }
+
+ layer.close(ajaxLoad);
+ //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ } 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 HBeginDate = $("#HBeginDate").val();
+ var HEndDate = $("#HEndDate").val();
+ var HMaterNumber = $("#HMaterNumber").val();
+ var HMaterModel = $("#HMaterModel").val();
+ var HProcessName = $("#HProcessName").val();
+ var HDealingType = $("#HDealingType").val();
+ var HSendManName = $("#HSendManName").val();
+
+ var ColName = $("#ColName").val();//澶嶉�夋
+ var Comparator = $("#Comparator").val()
+ var ColContent = $("#ColContent").val();
+ var ColName1 = $("#ColName1").val();//澶嶉�夋
+ var Comparator1 = $("#Comparator1").val()
+ var ColContent1 = $("#ColContent1").val();
+ var ColName2 = $("#ColName2").val();//澶嶉�夋
+ var Comparator2 = $("#Comparator2").val()
+ var ColContent2 = $("#ColContent2").val();
+
+ if (ColName != 0 && Comparator != 0) {
+ var com = "";
+ switch (Comparator) {
+ case "7":
+ com = "like''%" + ColContent + "%''";
+ break;
+ case "8":
+ com = "like''%" + ColContent + "''";
+ break;
+ case "9":
+ com = "like''" + ColContent + "%''";
+ break;
+ case "10":
+ com = "not like''%" + ColContent + "%''";
+ break;
+ default:
+ com = "" + Comparator + "''" + ColContent + "''";
+ break;
+ }
+ sWhere += " and " + ColName + " " + com;
+ }
+ if (ColName1 != 0 && Comparator1 != 0) {
+ var com1 = "";
+ switch (Comparator1) {
+ case "7":
+ com1 = "like''%" + ColContent1 + "%''";
+ break;
+ case "8":
+ com1 = "like''%" + ColContent1 + "''";
+ break;
+ case "9":
+ com1 = "like''" + ColContent1 + "%''";
+ break;
+ case "10":
+ com1 = "not like''%" + ColContent1 + "%''";
+ break;
+ default:
+ com1 = "" + Comparator1 + "''" + ColContent1 + "''";
+ break;
+ }
+ sWhere += " and " + ColName1 + " " + com1;
+ }
+ if (ColName2 != 0 && Comparator2 != 0) {
+ var com2 = "";
+ switch (Comparator2) {
+ case "7":
+ com2 = "like''%" + ColContent2 + "%''";
+ break;
+ case "8":
+ com2 = "like''%" + ColContent2 + "''";
+ break;
+ case "9":
+ com2 = "like''" + ColContent2 + "%''";
+ break;
+ case "10":
+ com2 = "not like''%" + ColContent2 + "%''";
+ break;
+ default:
+ com2 = "" + Comparator2 + "''" + ColContent2 + "''";
+ break;
+ }
+ sWhere += " and " + ColName2 + " " + com2;
+ }
+
+ sWhere = {
+ HBeginDate: HBeginDate
+ , HEndDate: HEndDate
+ , HMaterNumber: HMaterNumber
+ , HMaterModel: HMaterModel
+ , HProcessName: HProcessName
+ , HDealingType: HDealingType
+ , HSendManName: HSendManName
+ , HCustomize: sWhere
+ }
+ set_InitGrid();
+ get_Display(JSON.stringify(sWhere));
+ sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ }
+
+ function set_ClearQuery() {
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); //寮�濮嬫棩鏈�
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); //缁撴潫鏃ユ湡
+ $("#HMaterNumber").val("");
+ $("#HMaterModel").val("");
+ $("#HProcessName").val("");
+ $("#HDealingType").val("");
+ $("#HSendManName").val("");
+ $("#ColContent1").val("");
+ $("#ColName1").val("0");
+ $("#Comparator1").val("0");
+ $("#ColContent2").val("");
+ $("#ColName2").val("0");
+ $("#Comparator2").val("0");
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0");
+ form.render('select');
+
+ sWhere = "";
+ }
+
+ //闅愯棌鍒楄缃�
+ 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();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ 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 = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+
+
+ 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);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+
+ // 鍒楁槑鏄剧ず涓嬫媺妗�
+ 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>';
+ }
+ }
+ $("#ColName").empty();
+ $("#ColName").append(Organization); $("#ColName1").empty();
+ $("#ColName1").append(Organization); $("#ColName2").empty();
+ $("#ColName2").append(Organization);
+ form.render('select');
+ }
+
+ //#region 鍒濆鏃ユ湡闂撮殧 涓嬫媺鍒楄〃
+ function setSelect_HInitTimeCycle() {
+ var valueList = [0, 1, 2, 3, 4, 5, 6, 29];
+ var titleList = ["浠婂ぉ", "杩戜袱澶�", "杩戜笁澶�", "杩戝洓澶�", "杩戜簲澶�", "杩戝叚澶�", "杩戜竷澶�", "杩�30澶�"];
+
+ var HInitTimeCycle_ArrayList = '<option value="-1" selected="selected" >浠绘剰闂撮殧</option>';
+ for (var i = 0; i < valueList.length; i++) {
+ HInitTimeCycle_ArrayList += '<option style="color:blue;" value="' + valueList[i] + '">' + titleList[i] + '</option>';
+ }
+
+ $("#HInitTimeCycle").empty();
+ $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList);
+ form.render('select');
+
+ $("#HInitTimeCycle").val("29");
+ }
+ //#endregion
+
+ //#endregion
+
+ //浠ヤ笂鏄痩ayui妯″潡
+ });
+
+
+
+
+</script>
\ No newline at end of file
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ErrManagerLedgerReport.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ErrManagerLedgerReport.html"
new file mode 100644
index 0000000..ca90ccd
--- /dev/null
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ErrManagerLedgerReport.html"
@@ -0,0 +1,704 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>寮傚父绠$悊鍙拌处</title>
+ <meta name="renderer" content="webkit">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <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>
+ <script src="../../../layuiadmin/Scripts/json2.js"></script>
+ <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+ <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+ <script src="../../../layuiadmin/PubCustom.js"></script>
+ <script src="../../../layuiadmin/HideButton.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
+ <script src="../../../layuiadmin/PageTitle.js"></script>
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+</head>
+<body>
+ <div class="layui-fluid">
+ <div class="layui-col-md12">
+ <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 class="layui-collapse">
+ <div class="layui-colla-item">
+ <div class="layui-colla-title layui-inline">
+ <div class="layui-inline">
+ <span>鏇村</span>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鏃ユ湡闂撮殧</label>
+ <div class="layui-input-block">
+ <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">閮ㄩ棬</label>
+ <div class="layui-input-block" style="width: 190px;">
+ <select name="HDeptName" id="HDeptName" lay-verify="HDeptName">
+ <!--鍔ㄦ�佹覆鏌撻儴闂�-->
+ </select>
+ </div>
+ </div>
+ <div class="layui-row" style="margin-top:5px;margin-left:82px;margin-bottom:5px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">瑙勬牸鍨嬪彿</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HMaterModel" id="HMaterModel" style="width:215px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鐢熶骇璧勬簮</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HSourceName" id="HSourceName" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">闂鏉ユ簮</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HProSource" id="HProSource" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鐝</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HShiftsName" id="HShiftsName" style="width:128px;">
+ </div>
+ </div>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+ </div>
+ <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">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+ </div>
+ </div>
+ <div class="layui-row" style=" margin-top: 10px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
+ </div>
+ </div>
+
+ <div class="layui-row" style=" margin-top: 10px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="layui-tab layui-tab-card">
+ <div class="layui-tab-content">
+ <div class="layui-tab-item layui-show">
+ <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+ </div>
+ </div>
+ </div>
+ <script type="text/html" id="toolbarDemo">
+ <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>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script>
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index', //涓诲叆鍙fā鍧�
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
+
+ //#region 鍏叡鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ , soulTable = layui.soulTable
+ var sWhere = "";
+ var option = [];
+ var HModName = "QC_ErrManagerLedgerReport";
+ var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID"];//瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栬〃鏍�
+ DisPlay_HideColumn();
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ // 澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable)', function (obj) {
+ switch (obj.event) {
+ //鍒楄缃�
+ case 'set_HideColumn': get_HideColumn();
+ break;
+ };
+ });
+
+ //鏌ヨ鎸夐挳
+ form.on('submit(btnSearch)', function (data) {
+ get_FastQuery();
+ });
+
+ //閲嶇疆
+ form.on('submit(btnReSearch)', function (data) {
+ set_ClearQuery();
+ });
+
+ //鏃ユ湡闂撮殧涓嬫媺鍒楄〃鐩戝惉
+ form.on('select(HInitTimeCycle)', function (data) {
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+ if (HInitTimeCycle != -1) {
+ $('#HBeginDate').prop('disabled', true);
+ $('#HEndDate').prop('disabled', true);
+
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+ //鎵ц鏌ヨ鏂规硶
+ get_FastQuery();
+ } else {
+ $('#HBeginDate').prop('disabled', false);
+ $('#HEndDate').prop('disabled', false);
+ }
+ });
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ // 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栨棩鏈熼棿闅斻�佸紑濮嬫棩鏈熴�佺粨鏉熸棩鏈�
+ setSelect_HInitTimeCycle();
+ //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ if (HInitTimeCycle != -1) {
+ $('#HBeginDate').prop('disabled', true);
+ $('#HEndDate').prop('disabled', true);
+ } else {
+ $('#HBeginDate').prop('disabled', false);
+ $('#HEndDate').prop('disabled', false);
+ }
+
+ //鏍规嵁鏃ユ湡闂撮殧璁剧疆寮�濮嬫椂闂翠笌缁撴潫鏃堕棿
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+ DeptName();
+ //鏌ヨ
+ get_FastQuery();
+ }
+
+ //鐢熶骇杞﹂棿
+ function DeptName() {
+ //鑾峰彇杞﹂棿鍒�
+ var HDeptName = '<option value="0" style="color:red;" selected>鍏ㄩ儴杞﹂棿</option>';
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Sc_ICMOBill/GetHDeptList",
+ async: false,
+ data: { "HOrgID": sessionStorage["OrganizationID"] },
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ if (i == 0)
+ HDeptName += '<option style="color:blue;" value="' + data[i].HItemID + '" >' + data[i].HName + '</option>';
+ else
+ HDeptName += '<option style="color:blue;" value="' + data[i].HItemID + '">' + data[i].HName + '</option>';
+
+ }
+ $("#HDeptName").append(HDeptName);
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-50'
+ , page: true
+ , totalRow: true
+ , limit: 500
+ , data:[]
+ , limits: [50, 500, 5000, 20000]
+ , cols: []
+ };
+ table.render(option);
+ }
+
+ // 鏌ヨ
+ function get_Display(sWhere) {
+
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/QC_CustomerAppealReport/QC_ErrManagerLedgerReport',
+ type: "GET",
+ async: false,
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = [];//鍒楀瓧娈垫暟鎹�
+ var col = [];
+ var totalArray = ["鏁伴噺", "鍏宠仈鏁伴噺", "鏈叧鑱旀暟閲�", "鎵撳嵃鏉$爜鏁伴噺", "鏈墦鍗版潯鐮佹暟閲�", "瀹炴敹鏁伴噺", "閲戦"];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ 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', totalRowText: '鍚堣' });
+ 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 if ($.inArray(data[i].name, totalArray) > -1) { //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+ } else if (data[i].name == '鍗曟嵁鍙�') {//娣诲姞瓒呴摼鎺�
+ col.push({
+ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '鍗曟嵁鍙�', templet: function (d) {
+ return '<span style="color: blue;">' + d.鍗曟嵁鍙� + '</span>'
+ }, style: 'cursor: pointer;'
+ });
+ } 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 == "琛屽叧闂棩鏈�" ? "琛屽叧闂汉" : data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+ }
+ }
+ }
+
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , cols: [col]
+ , data: data1.data
+ , height: 'full-50'
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ table.render(option);
+
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+
+ if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+ ColFilter();
+ }
+
+ layer.close(ajaxLoad);
+ //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ } 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 HBeginDate = $("#HBeginDate").val();
+ var HEndDate = $("#HEndDate").val();
+ var HDeptID = $("#HDeptName").val();
+ var HMaterModel = $("#HMaterModel").val();
+ var HSourceName = $("#HSourceName").val();
+ var HProSource = $("#HProSource").val();
+ var HShiftsName = $("#HShiftsName").val();
+
+ var ColName = $("#ColName").val();//澶嶉�夋
+ var Comparator = $("#Comparator").val()
+ var ColContent = $("#ColContent").val();
+ var ColName1 = $("#ColName1").val();//澶嶉�夋
+ var Comparator1 = $("#Comparator1").val()
+ var ColContent1 = $("#ColContent1").val();
+ var ColName2 = $("#ColName2").val();//澶嶉�夋
+ var Comparator2 = $("#Comparator2").val()
+ var ColContent2 = $("#ColContent2").val();
+
+ if (ColName != 0 && Comparator != 0) {
+ var com = "";
+ switch (Comparator) {
+ case "7":
+ com = "like''%" + ColContent + "%''";
+ break;
+ case "8":
+ com = "like''%" + ColContent + "''";
+ break;
+ case "9":
+ com = "like''" + ColContent + "%''";
+ break;
+ case "10":
+ com = "not like''%" + ColContent + "%''";
+ break;
+ default:
+ com = "" + Comparator + "''" + ColContent + "''";
+ break;
+ }
+ sWhere += " and " + ColName + " " + com;
+ }
+ if (ColName1 != 0 && Comparator1 != 0) {
+ var com1 = "";
+ switch (Comparator1) {
+ case "7":
+ com1 = "like''%" + ColContent1 + "%''";
+ break;
+ case "8":
+ com1 = "like''%" + ColContent1 + "''";
+ break;
+ case "9":
+ com1 = "like''" + ColContent1 + "%''";
+ break;
+ case "10":
+ com1 = "not like''%" + ColContent1 + "%''";
+ break;
+ default:
+ com1 = "" + Comparator1 + "''" + ColContent1 + "''";
+ break;
+ }
+ sWhere += " and " + ColName1 + " " + com1;
+ }
+ if (ColName2 != 0 && Comparator2 != 0) {
+ var com2 = "";
+ switch (Comparator2) {
+ case "7":
+ com2 = "like''%" + ColContent2 + "%''";
+ break;
+ case "8":
+ com2 = "like''%" + ColContent2 + "''";
+ break;
+ case "9":
+ com2 = "like''" + ColContent2 + "%''";
+ break;
+ case "10":
+ com2 = "not like''%" + ColContent2 + "%''";
+ break;
+ default:
+ com2 = "" + Comparator2 + "''" + ColContent2 + "''";
+ break;
+ }
+ sWhere += " and " + ColName2 + " " + com2;
+ }
+
+ sWhere = {
+ HBeginDate: HBeginDate
+ , HEndDate: HEndDate
+ , HDeptID: HDeptID
+ , HMaterModel: HMaterModel
+ , HSourceName: HSourceName
+ , HProSource: HProSource
+ , HShiftsName: HShiftsName
+ , HCustomize: sWhere
+ }
+ set_InitGrid();
+ get_Display(JSON.stringify(sWhere));
+ sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ }
+
+ function set_ClearQuery() {
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); //寮�濮嬫棩鏈�
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); //缁撴潫鏃ユ湡
+ $("#HDeptName").val("0");
+ $("#HMaterModel").val("");
+ $("#HSourceName").val("");
+ $("#HProSource").val("");
+ $("#HShiftsName").val("");
+ $("#ColContent1").val("");
+ $("#ColName1").val("0");
+ $("#Comparator1").val("0");
+ $("#ColContent2").val("");
+ $("#ColName2").val("0");
+ $("#Comparator2").val("0");
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0");
+ form.render('select');
+
+ sWhere = "";
+ }
+
+ //闅愯棌鍒楄缃�
+ 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();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ 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 = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+
+
+ 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);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+
+ // 鍒楁槑鏄剧ず涓嬫媺妗�
+ 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>';
+ }
+ }
+ $("#ColName").empty();
+ $("#ColName").append(Organization); $("#ColName1").empty();
+ $("#ColName1").append(Organization); $("#ColName2").empty();
+ $("#ColName2").append(Organization);
+ form.render('select');
+ }
+
+ //#region 鍒濆鏃ユ湡闂撮殧 涓嬫媺鍒楄〃
+ function setSelect_HInitTimeCycle() {
+ var valueList = [0, 1, 2, 3, 4, 5, 6, 29];
+ var titleList = ["浠婂ぉ", "杩戜袱澶�", "杩戜笁澶�", "杩戝洓澶�", "杩戜簲澶�", "杩戝叚澶�", "杩戜竷澶�", "杩�30澶�"];
+
+ var HInitTimeCycle_ArrayList = '<option value="-1" selected="selected" >浠绘剰闂撮殧</option>';
+ for (var i = 0; i < valueList.length; i++) {
+ HInitTimeCycle_ArrayList += '<option style="color:blue;" value="' + valueList[i] + '">' + titleList[i] + '</option>';
+ }
+
+ $("#HInitTimeCycle").empty();
+ $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList);
+ form.render('select');
+
+ $("#HInitTimeCycle").val("29");
+ }
+ //#endregion
+
+ //#endregion
+
+ //浠ヤ笂鏄痩ayui妯″潡
+ });
+
+
+
+
+</script>
\ No newline at end of file
--
Gitblit v1.9.1