From b742f00aac8e1e1bb628232383c35e67f4a41e4e Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期五, 26 一月 2024 15:21:28 +0800
Subject: [PATCH] 1
---
WebTM/views/模治具管理/模治具管理/Sb_MouldRepairWorkBillList.html | 990 +++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 801 insertions(+), 189 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/Sb_MouldRepairWorkBillList.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/Sb_MouldRepairWorkBillList.html"
index 87b5549..bc10be5 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/Sb_MouldRepairWorkBillList.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/Sb_MouldRepairWorkBillList.html"
@@ -1,14 +1,16 @@
锘�<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<title>妯″叿缁翠慨宸ュ崟琛ㄥ垪琛�</title>
+ <meta http-equiv="Content-Type" content="text/html; 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/HideButton.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
<style type="text/css">
input.layui-input.layui-unselect {
padding-right: 0;
@@ -28,66 +30,135 @@
<span>鏇村</span>
</div>
</div>
- <!--<div class="layui-inline">
- <label class="layui-form-label">鍗曟嵁绫诲瀷</label>
+ <div class="layui-inline">
+ <label class="layui-form-label">鐘舵��</label>
<div class="layui-input-block">
- <select name="HBillType" id="HBillType">
- <option value="">鎵�鏈�</option>
- <option value="ZHXJ">涓嬫灦鎵捐揣鍗�</option>
- <option value="ZHSJ">涓婃灦褰掕繕鍗�</option>
+ <select name="Status" lay-filter="Status" style="width:190px;">
+ <option value="-1" selected="selected">鍏ㄩ儴</option>
+ <option value="0">鏈鏍�</option>
+ <option value="1">宸插鏍�</option>
+ <option value="2">宸插叧闂�</option>
</select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input" id="HDate" 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" id="HDate1" 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" name="HBillNo" id="HBillNo">
+ <input type="text" class="layui-input" name="HBillNo" id="HBillNo" 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" name="HCreateBy" id="HCreateBy">
- </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 class="layui-colla-content">
- <div class="layui-inline">
+ <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">
+ <div class="layui-row">
<div class="layui-inline">
- <span>鍏朵粬鏉′欢></span>
+ <div class="layui-inline">
+ <span>鍏朵粬鏉′欢></span>
+ </div>
</div>
</div>
- <div class="layui-inline">
- <label class="layui-form-label">寮�濮嬫椂闂�</label>
- <div class="layui-input-block">
- <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
+ <div class="layui-row">
+ <div class="layui-inline">
+ <label class="layui-form-label">鍣ㄥ叿缂栫爜</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HMouldNumber" id="HMouldNumber" 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" name="HMouldName" id="HMouldName" 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" name="RepairItem" id="RepairItem" style="width:190px;">
+ </div>
</div>
</div>
- <div class="layui-inline">
- <label class="layui-form-label">缁撴潫鏃堕棿</label>
- <div class="layui-input-block">
- <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
+ <div class="layui-row">
+ <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>-->
+ </div>
</div>
- </div>
- <table class="" id="mainTable" lay-filter="mainTable"></table>
- <script type="text/html" id="toolbarDemo">
- <div class="layui-btn-container">
- <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
-
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <div class="layui-tab layui-tab-card">
+ <ul class="layui-tab-title">
+ <li class="layui-this">缁翠慨椤逛俊鎭�</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>
</div>
- </script>
+ <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>-->
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Audit" id="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-DeAudit" id="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-reload" id="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-details" id="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-generate" id="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-exit" id="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideColumn" id="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>
+ </div>
+ </script>
+ <script type="text/html" id="xuhao">
+ {{d.LAY_TABLE_INDEX+1}}
+ </script>
+ <script type="text/html" id="xuhao1">
+ {{d.LAY_TABLE_INDEX+1}}
+ </script>
</form>
</div>
</div>
@@ -97,12 +168,14 @@
<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/zgqCustom/zgqCustom.js"></script>
<script>
layui.config({
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
+ // #region 鍏ㄥ眬鍙橀噺
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
@@ -112,170 +185,713 @@
, laypage = layui.laypage
, laydate = layui.laydate
, util = layui.util
+ , soulTable = layui.soulTable
//鏌ヨ鏉′欢
var sWhere = "";
+ var option = [];
+ var HBillType = "3807";
+ var HModName = "Sb_MouldRepairWorkBillList";
+ var titleData = ["hmainid","鍗曟嵁ID", "鍗曟嵁绫诲瀷", "HMouldID", "HEquipID", "HEmpID", "HManagerID", "HDeptID", "HSupID", "hsubid", "HRepairID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "HBillType"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ //#endregion
- var option = {
- elem: '#mainTable'
- //, toolbar: '#toolbarDemo'
- , height: 'full-50'
- , page: true
- , cellMinWidth: 90
- , cols: [[
- { field: 'hmainid', title: '鍗曟嵁ID', hide: true }
- , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160 }
- , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
- , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160, hide: true }
- , { field: 'HMouldID', title: 'HMouldID', width: 200, hide: true }
- , { field: '浜у搧妯″叿浠g爜', title: '浜у搧妯″叿浠g爜', width: 200 }
- , { field: '浜у搧妯″叿', title: '浜у搧妯″叿', width: 200 }
- , { field: 'HEquipID', title: 'HEquipID', width: 200, hide: true }
- , { field: '璁惧浠g爜', title: '璁惧浠g爜', width: 200 }
- , { field: '璁惧', title: '璁惧', width: 200 }
- , { field: '缁翠慨椤圭洰浠g爜', title: '缁翠慨椤圭洰浠g爜', width: 200 }
- , { field: '缁翠慨椤圭洰', title: '缁翠慨椤圭洰', width: 160 }
- , { field: '缁翠慨寮�濮嬫棩鏈�', title: '缁翠慨寮�濮嬫棩鏈�', width: 160 }
- , { field: '缁翠慨缁撴潫鏃ユ湡', title: '缁翠慨缁撴潫鏃ユ湡', width: 160 }
- , { field: '缁翠慨鍐呭', title: '缁翠慨鍐呭', width: 200 }
- , { field: '鏃堕棿鍗曚綅', title: '鏃堕棿鍗曚綅', width: 200 }
- , { field: '璁″垝缁翠慨宸ユ椂', title: '璁″垝缁翠慨宸ユ椂', width: 200 }
- , { field: '瀹為檯缁翠慨宸ユ椂', title: '瀹為檯缁翠慨宸ユ椂', width: 200 }
- , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
- , { field: '缁翠慨浜轰唬鐮�', title: '缁翠慨浜轰唬鐮�', width: 200 }
- , { field: '缁翠慨浜�', title: '缁翠慨浜�', width: 200 }
- , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true }
- , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 115 }
- , { field: '璐熻矗浜�', title: '璐熻矗浜�', width: 200 }
- , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
- , { field: '缁翠慨閮ㄩ棬浠g爜', title: '缁翠慨閮ㄩ棬浠g爜', width: 115 }
- , { field: '缁翠慨閮ㄩ棬', title: '缁翠慨閮ㄩ棬', width: 200 }
- , { field: 'HSupID', title: 'HSupID', width: 200, hide: true }
- , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 200 }
- , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 200 }
- , { field: '缁翠慨绫诲瀷', title: '缁翠慨绫诲瀷', width: 115 }
- , { field: '缁翠慨鍚庢柊瑙勬牸', title: '缁翠慨鍚庢柊瑙勬牸', width: 200 }
- , { field: '鏂拌璁″鍛�', title: '鏂拌璁″鍛�', width: 200 }
- , { field: '缁翠慨瑕佹眰', title: '缁翠慨瑕佹眰', width: 200 }
- , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 115 }
- , { field: '澶囨敞', title: '澶囨敞', width: 200 }
- , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
- , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
- , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 200 }
- , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
- , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200 }
- , { field: 'HRepairID', title: 'HRepairID', width: 115, hide: true }
- , { field: '瀛愮淮淇」鐩唬鐮�', title: '瀛愮淮淇」鐩唬鐮�', width: 200 }
- , { field: '瀛愮淮淇」鐩�', title: '瀛愮淮淇」鐩�', width: 200 }
- , { field: '瀛愮淮淇姹�', title: '瀛愮淮淇姹�', width: 200 }
- , { field: '瀛愯礋璐d汉浠g爜', title: '瀛愯礋璐d汉浠g爜', width: 200 }
- , { field: '瀛愯礋璐d汉', title: '瀛愯礋璐d汉', width: 200 }
- , { field: '缁翠慨璐圭敤', title: '缁翠慨璐圭敤', width: 115 }
- , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 200 }
- , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200 }
- , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
- , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200 }
- , { field: '淇敼浜�', title: '淇敼浜�', width: 200 }
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200 }
- , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
- , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200 }
- , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
- , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200 }
- , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
- , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true}
- , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
- , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
- , { field: 'HBillType', title: 'HBillType', width: 200, hide: true }
- ]]
- };
+ //鍒濆鍖栭〉闈㈠姞杞�
+ set_ClearBill();
+ ////鍒濆鍖栬〃鏍�
+ //DisPlay_HideColumn();
- var index = layer.load(0);
- //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
- $.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL() + '/Sb_MouldRepairWorkBill/GetMouldRepairWorkBillList',
- type: "GET",
- data: { "sWhere": sWhere},
- success: function (data1) {
- if (data1.count == 1) {
- option.data = data1.data;
- table.render(option);
- layer.close(index);
- } else {
- layer.close(index);
- layer.alert(data1.code + data1.Message, { icon: 5 });
- }
- }, error: function () {
- layer.close(index);
- layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
- }
- });
-
- //閲嶇疆鎸夐挳
- //form.on('submit(btnReSearch)', function (data) {
- // $("#HBillType").val("");//鍗曟嵁绫诲瀷
- // $("#HBillNo").val("");//鍗曟嵁鍙�
- // $("#HSourceBillNo").val("");//婧愬崟鍙�
- // $("#HCreateBy").val("");//鍒跺崟浜�
- // $("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
- // $("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
- // $("#btnSearch").click();
- //});
-
- //鏌ヨ鎸夐挳
- form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
- //var HBillType = $("#HBillType").val();//鍗曟嵁绫诲瀷
- //var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
- //var HCreateBy = $("#HCreateBy").val();//鍒跺崟浜�
- //var BenginHCreateDate = $("#BenginHCreateDate").val();//寮�濮嬪埗鍗曟椂闂�
- //var EndHCreateDate = $("#EndHCreateDate").val();//缁撴潫鍒跺崟鏃堕棿
- //if (HBillNo) {
- // sWhere += " and HBillNo like '%" + HBillNo + "%'";
- //}
- //if (HCreateBy) {
- // sWhere += " and HCreateBy like '%" + HCreateBy + "%'";
- //}
- //if (BenginHCreateDate) {
- // sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'";
- //}
- //if (EndHCreateDate) {
- // sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'";
- //}
- var index = layer.load(0);
+ //鐐瑰嚮涓昏〃甯﹀嚭浠庤〃鏁版嵁
+ table.on('row(mainTable)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
+ var datas = obj.data; //鑾峰緱褰撳墠琛屾暟鎹�
+ var linterid = datas.hmainid;
$.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL1() + '/Sb_MouldRepairWorkBill/GetMouldRepairWorkBillList',
+ url: GetWEBURL() + 'Sb_MouldRepairWorkBill/Sb_MouldRepairWorkBillListProjectDetai',
type: "GET",
- data: { "sWhere": sWhere},
+ data: { "sqlWhere": "and hmainid=" + linterid },
success: function (data1) {
if (data1.count == 1) {
- option.data = data1.data;
- table.render(option);
- layer.close(index);
- layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ option1.data = data1.list[0];
+ table.render(option1);
+ option2.data = data1.list[1];
+ table.render(option2);
} else {
- layer.close(index);
- layer.alert(data1.code + data1.Message, { icon: 5 });
+ layer.alert(result.code + result.Message, { icon: 5 });
}
}, error: function () {
- layer.close(index);
layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
}
});
+ });
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+ //澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable)', function (obj) {
+ switch (obj.event) {
+ //鏂板
+ case 'btn-Add': set_AddNew();
+ break;
+ //缂栬緫
+ case 'btn-Edit': set_ShowBill();
+ break;
+ //鍒犻櫎
+ case 'btn-Delete': set_DeleteBill();
+ break;
+ //瀹℃牳
+ case 'btn-Audit': set_AuditBill();
+ break;
+ //鍙嶅鏍�
+ case 'btn-DeAudit': set_DeAuditBill();
+ break;
+ //鍒楄缃�
+ case 'get_HideColumn1': get_HideColumn1();
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn': get_HideColumn();
+ break;
+ ////閫�鍑烘寜閽�
+ //case 'get_Exit': Pub_Close(2);
+ // break;
+ //鎸夐挳璁剧疆
+ case 'set_HideButton':
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+ break;
+ };
+ });
+
+ // 鏌ヨ鎸夐挳
+ form.on('submit(btnSearch)', function (data) {
+ get_FastQuery();
+ });
+
+ // 閲嶇疆鎸夐挳
+ form.on('submit(btnReSearch)', function (data) {
+ set_ClearQuery();
+ });
+ //#endregion
+
+ //#region 褰撳墠椤甸潰鍔犺浇鎵�鏈夋柟娉�
+ // 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栨棩鏈�
+ $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+ $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ //鍒濆鍖栬〃鏍�(瀛愯〃1)
+ set_InitGrid1();
+ //鍒濆鍖栬〃鏍�(瀛愯〃2)
+ set_InitGrid2();
+ //鏌ヨ
+ get_Display(sWhere);
+ }
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-50'
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , page: true
+ , cellMinWidth: 90
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'hmainid', title: '鍗曟嵁ID', hide: true }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
+ , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160, hide: true }
+ , { field: 'HMouldID', title: 'HMouldID', width: 200, hide: true }
+ , { field: '浜у搧妯″叿浠g爜', title: '浜у搧鍣ㄥ叿浠g爜', width: 200 }
+ , { field: '浜у搧妯″叿', title: '浜у搧鍣ㄥ叿', width: 200 }
+ , { field: 'HEquipID', title: 'HEquipID', width: 200, hide: true }
+ , { field: '璁惧浠g爜', title: '璁惧浠g爜', width: 200 }
+ , { field: '璁惧', title: '璁惧', width: 200 }
+ , { field: '缁翠慨椤圭洰浠g爜', title: '缁翠慨椤圭洰浠g爜', width: 200 }
+ , { field: '缁翠慨椤圭洰', title: '缁翠慨椤圭洰', width: 160 }
+ , { field: '缁翠慨寮�濮嬫棩鏈�', title: '缁翠慨寮�濮嬫棩鏈�', width: 160, templet: "<div>{{d.缁翠慨寮�濮嬫棩鏈� ==null ?'':layui.util.toDateString(d.缁翠慨寮�濮嬫棩鏈�, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '缁翠慨缁撴潫鏃ユ湡', title: '缁翠慨缁撴潫鏃ユ湡', width: 160, templet: "<div>{{d.缁翠慨缁撴潫鏃ユ湡 ==null ?'':layui.util.toDateString(d.缁翠慨缁撴潫鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '缁翠慨鍐呭', title: '缁翠慨鍐呭', width: 200 }
+ , { field: '鏃堕棿鍗曚綅', title: '鏃堕棿鍗曚綅', width: 200 }
+ , { field: '璁″垝缁翠慨宸ユ椂', title: '璁″垝缁翠慨宸ユ椂', width: 200 }
+ , { field: '瀹為檯缁翠慨宸ユ椂', title: '瀹為檯缁翠慨宸ユ椂', width: 200 }
+ , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
+ , { field: '缁翠慨浜轰唬鐮�', title: '缁翠慨浜轰唬鐮�', width: 200 }
+ , { field: '缁翠慨浜�', title: '缁翠慨浜�', width: 200 }
+ , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true }
+ , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 115 }
+ , { field: '璐熻矗浜�', title: '璐熻矗浜�', width: 200 }
+ , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
+ , { field: '缁翠慨閮ㄩ棬浠g爜', title: '缁翠慨閮ㄩ棬浠g爜', width: 115 }
+ , { field: '缁翠慨閮ㄩ棬', title: '缁翠慨閮ㄩ棬', width: 200 }
+ , { field: 'HSupID', title: 'HSupID', width: 200, hide: true }
+ , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 200 }
+ , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 200 }
+ , { field: '缁翠慨绫诲瀷', title: '缁翠慨绫诲瀷', width: 115 }
+ , { field: '缁翠慨鍚庢柊瑙勬牸', title: '缁翠慨鍚庢柊瑙勬牸', width: 200 }
+ , { field: '鏂拌璁″鍛�', title: '鏂拌璁″鍛�', width: 200 }
+ , { field: '缁翠慨瑕佹眰', title: '缁翠慨瑕佹眰', width: 200 }
+ , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 115 }
+ , { field: '澶囨敞', title: '澶囨敞', width: 200 }
+ , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
+ , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
+ //, { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 200 }
+ //, { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
+ , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200 }
+ , { field: 'HRepairID', title: 'HRepairID', width: 115, hide: true }
+ , { field: '瀛愮淮淇」鐩唬鐮�', title: '瀛愮淮淇」鐩唬鐮�', width: 200 }
+ , { field: '瀛愮淮淇」鐩�', title: '瀛愮淮淇」鐩�', width: 200 }
+ , { field: '瀛愮淮淇姹�', title: '瀛愮淮淇姹�', width: 200 }
+ , { field: '瀛愯礋璐d汉浠g爜', title: '瀛愯礋璐d汉浠g爜', width: 200 }
+ , { field: '瀛愯礋璐d汉', title: '瀛愯礋璐d汉', width: 200 }
+ , { field: '缁翠慨璐圭敤', title: '缁翠慨璐圭敤', width: 115 }
+ , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 200 }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '淇敼浜�', title: '淇敼浜�', width: 200 }
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
+ , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
+ , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ //, { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
+ //, { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
+ //, { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
+ , { field: 'HBillType', title: 'HBillType', width: 200, hide: true }
+ ]]
+ };
+ }
+
+ //鏌ヨ
+ function get_Display(sWhere) {
+ var index = layer.load(0);
+ var ajaxLoad = layer.load();
+ //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+ $.ajax({
+ //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
+ url: GetWEBURL() + '/Sb_MouldRepairWorkBill/GetMouldRepairWorkBillList',
+ type: "GET",
+ 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 ($.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')}}</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:450
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ table.render(option);
+
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+
+ layer.close(ajaxLoad);
+ if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+ ColFilter();
+ }
+ //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 });
+ }
+ });
+ }
+
+ //鍒濆鍖栬〃鏍�(瀛愯〃1)
+ function set_InitGrid1() {
+ var ajaxLoad = layer.load();
+ option1 = {
+ elem: '#mainTable1'
+ //, toolbar: '#toolbarDemo'
+ , height: '250'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , cols: [[
+ //{ type: 'checkbox', fixed: 'left' }
+ , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left' }
+ , { field: 'HRepairID', title: '缁翠慨椤圭洰ID', width: 200, hide: true }
+ , { field: 'HRepairCode', title: '缁翠慨椤圭洰浠g爜', width: 200 }
+ , { field: 'HRepairName', title: '缁翠慨椤圭洰', width: 200 }
+ , { field: 'HRepairExplanation', title: '缁翠慨瑕佹眰', width: 200 }
+ , { field: 'HManagerID', title: '璐熻矗浜篒D', width: 200, hide: true }
+ , { field: 'HManagerCode', title: '璐熻矗浜轰唬鐮�', width: 200 }
+ , { field: 'HManagerName', title: '璐熻矗浜�', width: 200 }
+ , { field: 'HMoney', title: '缁翠慨璐圭敤', width: 200 }
+ , { field: 'HRemark', title: '澶囨敞', width: 200 }
+ ]]
+ };
+ option1.data = [];
+ table.render(option1);
+ layer.close(ajaxLoad);
+ }
+
+ //鍒濆鍖栬〃鏍�(瀛愯〃2)
+ function set_InitGrid2() {
+ var ajaxLoad = layer.load();
+ option2 = {
+ elem: '#mainTable2'
+ //, toolbar: '#toolbarDemo'
+ , height: '250'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , cols: [[
+ //{ type: 'checkbox', fixed: 'left' }
+ , { templet: '#xuhao1', title: '搴忓彿', sort: true, fixed: 'left' }
+ , { field: 'HMaterID', title: '閰嶄欢ID', width: 200, hide: true }
+ , { field: 'HMaterNumber', title: '閰嶄欢浠g爜', width: 200 }
+ , { field: 'HMaterName', title: '閰嶄欢鍚嶇О', width: 200 }
+ , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', width: 200, hide: true }
+ , { field: 'HUnitID', title: '鍗曚綅ID', width: 200, hide: true }
+ , { field: 'HUnitNumber', title: '鍗曚綅浠g爜', width: 200 }
+ , { field: 'HUnitName', title: '鍗曚綅鍚嶇О', width: 200 }
+ , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', width: 200 }
+ , { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', width: 200 }
+ , { field: 'HRemark', title: '澶囨敞', width: 200 }
+ ]]
+ };
+ option2.data = [];
+ table.render(option2);
+ layer.close(ajaxLoad);
+ }
+
+
+ //鏂板
+ function set_AddNew() {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鏂板鍣ㄥ叿缁翠慨鍗�',
+ closeBtn: 1,
+ shift: 2,
+ area: ['100%', '100%'],
+ maxmin: true,
+ content: '../妯℃不鍏风鐞�/Sb_Add_MouldRepairWorkBillList.html?OperationType=1&linterid=&HSouceBillType=',
+ end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ },
+ success: function (layero, index) {
+
+ }
+ });
+ }
+
+ //缂栬緫
+ function set_ShowBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var hID = data[0].hmainid.toString();
+ //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '缂栬緫鍣ㄥ叿缁翠慨鍗�'
+ , closeBtn: 1
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../妯℃不鍏风鐞�/Sb_Add_MouldRepairWorkBillList.html?OperationType=3&linterid=' + hID + '&HSouceBillType='
+ , resize: false,
+ end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ }
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ }
+ }
+
+ //鍒犻櫎
+ function set_DeleteBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫鍒犻櫎鏂规硶
+ layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sb_MouldRepairWorkBill/DeltetMouldRepairWorkBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ })
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+ }
+ }
+
+ //瀹℃牳
+ function set_AuditBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sb_MouldRepairWorkBill/AuditProcessReportList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+ }
+
+ //鍙嶅鏍�
+ function set_DeAuditBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sb_MouldRepairWorkBill/AuditProcessReportList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹弽瀹℃牳锛�');
+ }
+ }
+
+ //蹇�熻繃婊�
+ function get_FastQuery() {
+ var Status = $("select[name='Status']").val();//鐘舵��
+ var HDate = $("#HDate").val();//寮�濮嬫棩鏈�
+ var HDate1 = $("#HDate1").val();//缁撴潫鏃ユ湡
+ var HBillNo = $("#HBillNo").val(); //鍗曟嵁鍙�
+ var HMouldNumber = $("#HMouldNumber").val(); //妯℃不鍏风紪鐮�
+ var HMouldName = $("#HMouldName").val(); //妯℃不鍏峰悕绉�
+ var RepairItem = $("#RepairItem").val(); //缁翠慨椤圭洰
+ var ColName = $("#ColName").val();//澶嶉�夋
+ var Comparator = $("#Comparator").val()
+ var ColContent = $("#ColContent").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 (Status) {
+ switch (Status) {
+ case '-1': //鍏ㄩ儴
+ sWhere += "";
+ break;
+ case '0': //鏈鏍�
+ sWhere += " and 瀹℃牳浜�=''";
+ break;
+ case '1': //宸插鏍�
+ sWhere += " and 瀹℃牳浜�<>''";
+ break;
+ case '2': //宸插叧闂�
+ sWhere += " and 鍏抽棴浜�<>''";
+ default:
+
+ }
+ }
+ if (HDate) {
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HDate + "'";
+ }
+ if (HDate1) {
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HDate1 + "'";
+ }
+ if (HBillNo) {
+ sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
+ }
+ if (HMouldNumber) {
+ sWhere += " and 浜у搧妯″叿浠g爜 like '%" + HMouldNumber + "%'";
+ }
+ if (HMouldName) {
+ sWhere += " and 浜у搧妯″叿 like '%" + HMouldName + "%'";
+ }
+ if (RepairItem) {
+ sWhere += " and 缁翠慨椤圭洰 like '%" + RepairItem + "%'";
+ }
+
+ get_Display(sWhere);
//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
sWhere = "";
- //$("#HBillType").val("");//鍗曟嵁绫诲瀷
- //$("#HBillNo").val("");//鍗曟嵁鍙�
- //$("#HSourceBillNo").val("");//婧愬崟鍙�
- //$("#HCreateBy").val("");//鍒跺崟浜�
- //$("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
- //$("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
- });
+ }
+
+ //閲嶇疆杩囨护鏉′欢鏂规硶
+ function set_ClearQuery() {
+ $('#Status').find("option[value='-1']").attr("selected", true);
+ $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+ $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HBillNo").val("");
+ $("#HMouldNumber").val("");
+ $("#HMouldName").val("");
+ $("#RepairItem").val("");
+ $("#btnSearch").click();
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0");
+ form.render('select');
+ sWhere = "";
+ }
+
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["title"] + ",";
+ }
+
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "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 = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ /*var titleData = ["鍗曟嵁ID", "鍗曟嵁绫诲瀷", "HMouldID", "HEquipID", "HEmpID", "HManagerID", "HDeptID", "HSupID", "hsubid", "HRepairID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "HBillType"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ //鍦ㄦ暟鎹笉涓虹┖鐨勬儏鍐典笅杩涜鍒嗗壊锛屽惁鍒欐姤閿�
+ if (dataCol[i]) {
+ var dataCols = dataCol[i].split('|');
+ }
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //璁剧疆鍒楀
+ //if (data1.data[0].HColumnWidth != 0) {
+ // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+ //} else {
+ // option.cols[0][i + 1]["width"] = "";
+ //}
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ }
+
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ table.render(option);
+
+ //鍒锋柊鎸夐挳鏄剧ず
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+ } else {
+ table.render(option);
+
+ //鍒锋柊鎸夐挳鏄剧ず
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+ }
+ }, 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);
+ form.render('select');
+ }
+ //#endregion
//鐩戝惉琛屽弻鍑讳簨浠�
table.on('rowDouble(mainTable)', function (obj) {
layer.alert("鍙屽嚮浜嬩欢", { icon: 1 });
});
-
+ //#endregion
//laydate.render({
// elem: '#HDate'
@@ -287,10 +903,6 @@
//浠ヤ笂鏄痩ayui妯″潡
});
-
-
-
-
</script>
</body>
--
Gitblit v1.9.1