From be8b558b89a89deb3aa871fc2ddaacb7fb2197bd Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 16 十月 2023 09:25:14 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html | 575 +++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 498 insertions(+), 77 deletions(-)
diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
index b39da7d..2021d23 100644
--- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
+++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
@@ -1,7 +1,7 @@
锘�<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <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">
@@ -9,11 +9,11 @@
<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/jquery-1.4.1.js"></script>
+ <script src="../../../layuiadmin/scripts/jquery-1.4.1.min.js"></script>
+ <script src="../../../layuiadmin/pubcustom.js"></script>
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
- <script src="../../../layuiadmin/PubCustom.js"></script>
-
+ <script src="../../../layuiadmin/HideButton.js"></script>
</head>
<body>
<div class="layui-fluid">
@@ -23,6 +23,11 @@
<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">
@@ -30,15 +35,13 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">鐗╂枡鍚嶇О</label>
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐗╂枡浠g爜</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="hnumber" id="hnumber">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">鍗曟嵁绫诲瀷</label>
- <div class="layui-input-block">
- <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO">
+ <input type="hidden" class="layui-input" lay-verify="HMaterID" name="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="padding: 0 10px;float: right;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
</div>
</div>
<div class="layui-inline">
@@ -49,26 +52,78 @@
</select>
</div>
</div>
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+ <button class="layui-btn layuiadmin-btn-order" style="display:none;" 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>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding: 0 5px; display: none;">閲嶇疆</button>
+ <div class="layui-row" style="margin-top:10px;margin-left:5%;">
+ <!--鍏朵粬鏉′欢-->
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 76px;">鐗╂枡鍚嶇О</label>
+ <div class="layui-input-block" style="margin-left: 107px;">
+ <input type="text" class="layui-input" name="HMaterName" id="HMaterName">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">瑙勬牸鍨嬪彿</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HModel" id="HModel">
+ </div>
+ </div>
+ </div>
+ <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
+ <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>
</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="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit"><i class="layui-icon layui-icon-repeat"></i>瀹℃牳</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit"><i class="layui-icon layui-icon-refresh"></i>鍙嶅鏍�</button>
-
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AddNew" id="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AddNewSub" id="set_AddNewSub"><i class="layui-icon layui-icon-file-b"></i>鏂板瀛愯矾绾�</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_ShowBill" id="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_Copy" id="set_Copy"><i class="layui-icon layui-icon-form"></i>澶嶅埗</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_DeleteBill" id="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>鍏抽棴</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>鍙嶅叧闂�</button>
+ <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit"><i class="layui-icon layui-icon-repeat"></i>瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit"><i class="layui-icon layui-icon-refresh"></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="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="set_HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
</div>
</script>
</form>
@@ -76,6 +131,7 @@
</div>
</div>
</div>
+
<script>
layui.config({
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
@@ -95,10 +151,15 @@
//var sWhere = " 浜у搧浠g爜 = 'BX0002'";
var sWhere = "";
var option = [];
+ var ins; //鐢ㄤ簬瀵煎嚭excel
+ var HModName = "Gy_RoutingBillList";
+
//#endregion
//#region 杩涘叆椤甸潰鍗冲姞杞�
+ //鍒濆鍖栬〃鏍�
+ DisPlay_HideColumn();
//鍒濆鍖栫晫闈�
set_ClearBill();
@@ -110,7 +171,10 @@
table.on('toolbar(mainTable)', function (obj) {
switch (obj.event) {
//鏂板
- case 'set_AddNew': set_AddNew();
+ case 'set_AddNew': set_AddNew();
+ break;
+ //鏂板瀛愯矾绾�
+ case 'set_AddNewSub': set_AddNewSub();
break;
//缂栬緫
case 'set_ShowBill': set_ShowBill();
@@ -118,14 +182,41 @@
//鍒犻櫎
case 'set_DeleteBill': set_DeleteBill();
break;
+ //澶嶅埗
+ case 'set_Copy': set_Copy();
+ break;
//娴忚
case 'get_PrintReport': get_PrintReport();
break;
//鍒锋柊
case 'get_Refresh': get_Refresh();
break;
+ //瀹℃牳
+ case 'set_CheckBill': set_CheckBill(1);
+ break;
+ //鍙嶅鏍�
+ case 'set_AbandonCheck': set_CheckBill(2);
+ break;
+ //鍏抽棴
+ case 'set_CloseBill': set_CloseBill(1);
+ break;
+ //鍙嶅叧闂�
+ case 'set_CancelCloseBill': set_CloseBill(2);
+ break;
//閫�鍑烘寜閽�
case 'get_Exit': Pub_Close(2);
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn': get_HideColumn();
+ break;
+ //瀵煎嚭excel
+ case 'get_export':
+ get_Export();
+ break;
+ //鎸夐挳璁剧疆
+ case 'set_HideButton':
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ get_HideButton(btns, "3301", HModName, sessionStorage["HUserName"]);
break;
};
});
@@ -139,13 +230,19 @@
});
//#endregion
+ //鐗╂枡
+ form.on('submit(btnHMaterID)', function (data) {//閫夋嫨浠撲綅
+
+ get_btnHMaterID();
+ });
+
//閲嶇疆鎸夐挳
form.on('submit(btnReSearch)', function (data) {
-
+
set_ClearQuery();
});
//#endregion
-
+
//#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
//鑾峰彇缁勭粐
@@ -187,61 +284,61 @@
, toolbar: '#toolbarDemo'
, height: 'full-50'
, page: true
- , cellMinWidth: 90
- , limit:50
+ //, cellMinWidth: 90
+ , limit: 50
, limits: [50, 500, 5000, 20000]
, cols: [[
{ type: 'checkbox', fixed: 'left' }
- /* { field: 'hmainid', title: 'hmainid', width: 110 }*/
+ /* { field: 'hmainid', title: 'hmainid', width: 110 }*/
, { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', sort: true, width: 165 }
- , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷' }
, { field: '宸ヨ壓鍚嶇О', title: '宸ヨ壓鍚嶇О', width: 170 }
- //, { field: 'hmaterid', title: 'hmaterid', width: 165 }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 160 }
, { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 160 }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 215 }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 160 }
, { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 115 }
, { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅' }
- , { field: '榛樿宸ヨ壓', title: '榛樿宸ヨ壓' }
, { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞' }
- , { field: '缁勭粐', title: '缁勭粐' }
- //, { field: 'hsubid', title: 'hsubid', width: 80 }
, { field: '宸ュ簭鍙�', title: '宸ュ簭鍙�' }
- , { field: '濮斿鏍囪', title: '濮斿鏍囪' }
- //, { field: 'hprocid', title: 'hprocid', width: 105 }
, { field: '宸ュ簭浠g爜', title: '宸ュ簭浠g爜' }
, { field: '宸ュ簭', title: '宸ュ簭' }
- //, { field: 'HSupID', title: 'HSupID', width: 105 }
- , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�' }
- , { field: '渚涘簲鍟�', title: '渚涘簲鍟�' }
- //, { field: 'HCenterID', title: 'HCenterID', width: 105 }
, { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', width: 115 }
, { field: '宸ヤ綔涓績鍚嶇О', title: '宸ヤ綔涓績鍚嶇О', width: 115 }
- , { field: '鏃堕棿鍗曚綅', title: '鏃堕棿鍗曚綅' }
- , { field: '杩愯鏃堕棿', title: '杩愯鏃堕棿' }
- , { field: '鍔犲伐鏁伴噺', title: '鍔犲伐鏁伴噺' }
- , { field: '鍑嗗鏃堕棿', title: '鍑嗗鏃堕棿' }
- , { field: '鎺掗槦鏃堕棿', title: '鎺掗槦鏃堕棿' }
- , { field: '杞Щ鏃堕棿', title: '杞Щ鏃堕棿' }
- , { field: '鑹巼', title: '鑹巼' }
- , { field: '绱鑹巼', title: '绱鑹巼' }
- , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞' }
, { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
, { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 195 }
, { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
, { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 180 }
, { field: '淇敼浜�', title: '淇敼浜�' }
, { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 180 }
- , { field: '浣滃簾浜�', title: '浣滃簾浜�' }
- , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡' }
- //, { field: 'HDayWorkQty', title: 'HDayWorkQty', width: 105 }
- //, { field: 'HGroupID', title: 'HGroupID', width: 105 }
- //, { field: 'HWorkerID', title: 'HWorkerID', width: 105 }
- //, { field: 'HSourceID', title: 'HSourceID', width: 105 }
- , { field: '鍔犲伐鍗曚环', title: '鍔犲伐鍗曚环' }
- //, { field: 'HNextProcFlag', title: 'HNextProcFlag', width: 105 }
- , { field: '涓嬮亾娴佽浆宸ュ簭', title: '涓嬮亾娴佽浆宸ュ簭', width: 150 }
- , { field: '娴佽浆宸ュ簭', title: '娴佽浆宸ュ簭' }
+ , { field: '榛樿宸ヨ壓', title: '榛樿宸ヨ壓' }
+ //, { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷' }
+ ////, { field: 'hmaterid', title: 'hmaterid', width: 165 }
+ //, { field: '缁勭粐', title: '缁勭粐' }
+ ////, { field: 'hsubid', title: 'hsubid', width: 80 }
+ //, { field: '濮斿鏍囪', title: '濮斿鏍囪' }
+ ////, { field: 'hprocid', title: 'hprocid', width: 105 }
+ ////, { field: 'HSupID', title: 'HSupID', width: 105 }
+ //, { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�' }
+ //, { field: '渚涘簲鍟�', title: '渚涘簲鍟�' }
+ ////, { field: 'HCenterID', title: 'HCenterID', width: 105 }
+ //, { field: '鏃堕棿鍗曚綅', title: '鏃堕棿鍗曚綅' }
+ //, { field: '杩愯鏃堕棿', title: '杩愯鏃堕棿' }
+ //, { field: '鍔犲伐鏁伴噺', title: '鍔犲伐鏁伴噺' }
+ //, { field: '鍑嗗鏃堕棿', title: '鍑嗗鏃堕棿' }
+ //, { field: '鎺掗槦鏃堕棿', title: '鎺掗槦鏃堕棿' }
+ //, { field: '杞Щ鏃堕棿', title: '杞Щ鏃堕棿' }
+ //, { field: '鑹巼', title: '鑹巼' }
+ //, { field: '绱鑹巼', title: '绱鑹巼' }
+ //, { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞' }
+ //, { field: '浣滃簾浜�', title: '浣滃簾浜�' }
+ //, { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡' }
+ ////, { field: 'HDayWorkQty', title: 'HDayWorkQty', width: 105 }
+ ////, { field: 'HGroupID', title: 'HGroupID', width: 105 }
+ ////, { field: 'HWorkerID', title: 'HWorkerID', width: 105 }
+ ////, { field: 'HSourceID', title: 'HSourceID', width: 105 }
+ //, { field: '鍔犲伐鍗曚环', title: '鍔犲伐鍗曚环' }
+ ////, { field: 'HNextProcFlag', title: 'HNextProcFlag', width: 105 }
+ //, { field: '涓嬮亾娴佽浆宸ュ簭', title: '涓嬮亾娴佽浆宸ュ簭', width: 150 }
+ //, { field: '娴佽浆宸ュ簭', title: '娴佽浆宸ュ簭' }
]]
};
}
@@ -249,13 +346,48 @@
//#region 閲嶇疆杩囨护鏉′欢鏂规硶
function set_ClearQuery() {
$("#WorkCenter").val("");//鍗曟嵁鍙�
- $("#hnumber").val("");//鐗╂枡
+ $("#HMaterID").val(0);//鐗╂枡
+ $("#HMaterName").val("");//鐗╂枡
+ $("#HMaterNumber").val("");//鐗╂枡
+ $("#HModel").val("");//鐗╂枡
$("#HOrderProcNO").val("");//鍗曟嵁绫诲瀷
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0");
+ $("#HOrgID").val(sessionStorage["OrganizationID"]);
+ form.render('select');
$("#btnSearch").click();
- $("#HName").val("");
sWhere = "";
}
//#endregion
+
+
+ //鐗╂枡
+ function get_btnHMaterID() {
+ layer.open({
+ type: 2
+ , area: ['80%', '80%']
+ , title: '鐗╂枡'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_MaterialList.html', 'yes']
+ , btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HMaterID").val(checkStatus.data[0].HItemID);
+ $("#HMaterName").val(checkStatus.data[0].HName);
+ $("#HMaterNumber").val(checkStatus.data[0].HNumber);
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ })
+ }
//#region 鏌ヨ
function get_Display(sWhere) {
@@ -265,12 +397,19 @@
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
url: GetWEBURL() + '/LEMS/MES_Gy_RoutingBillList_Json',
type: "GET",
- data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "HBillSubType":"3301" },
success: function (data1) {
if (data1.count == 1) {
option.data = data1.data;
- table.render(option);
+ ins = table.render(option);
layer.close(ajaxLoad);
+
+ //鍒锋柊鎸夐挳鏄剧ず
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ Display_HideButton(btns, "3301", HModName, sessionStorage["HUserName"]);
+ if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+ ColFilter();
+ }
//layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
} else {
layer.close(ajaxLoad);
@@ -288,9 +427,37 @@
function get_FastQuery(number) {
var HOrgID = "";
var HOrderProcNO = $("#HOrderProcNO").val();//鍗曟嵁绫诲瀷
- var hnumber = $("#hnumber").val();
- //var HName = $("#HName").val();
+ //var HMaterID = $("#HMaterID").val();
+ var HMaterName = $("#HMaterName").val();
+ var HMaterNumber = $("#HMaterNumber").val();
+ var HModel = $("#HModel").val();
var WorkCenter = $("#WorkCenter").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 (number == 1) {
HOrgID = sessionStorage["OrganizationID"];
@@ -298,12 +465,18 @@
else {
HOrgID = $("#HOrgID").val();//缁勭粐
}
-
+
if (HOrderProcNO) {
sWhere += " and 鍗曟嵁绫诲瀷 like '%" + HOrderProcNO + "%'";
}
- if (hnumber) {
- sWhere += " and 鐗╂枡浠g爜 like '%" + hnumber + "%' or 鐗╂枡鍚嶇О like '%" + hnumber + "%'";
+ if (HMaterName) {
+ sWhere += "and 鐗╂枡鍚嶇О like '%" + HMaterName + "%'";
+ }
+ if (HMaterNumber) {
+ sWhere += "and 鐗╂枡浠g爜 like '%" + HMaterNumber + "%'";
+ }
+ if (HModel) {
+ sWhere += "and 瑙勬牸鍨嬪彿 like '%" + HModel + "%'";
}
if (WorkCenter) {
sWhere += " and 鍗曟嵁鍙� like '%" + WorkCenter + "%'";
@@ -311,6 +484,7 @@
if (HOrgID) {
sWhere += " and HOrgID = '" + HOrgID + "'";
}
+ sWhere += " and 宸ュ簭浠g爜 != '9999' and HBillSubType<>'SUB'"
get_Display(sWhere);
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
}
@@ -324,7 +498,7 @@
, area: ['100%', '100%']
, title: '宸ヨ壓璺嚎-鏂板'
, shift: 0//寮瑰嚭鍔ㄧ敾
- , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=1&linterid=&HSouceBillType=&linteridSub=-1'
+ , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=1&linterid=&HSouceBillType=3301&linteridSub=-1'
, end: function () {
//鍒锋柊椤甸潰,
location.reload();
@@ -333,21 +507,37 @@
}
//#endregion
+ //娣诲姞瀛愯矾绾�
+ function set_AddNewSub() {
+ layer.open({
+ type: 2
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['100%', '100%']
+ , title: '宸ヨ壓璺嚎-鏂板'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=1&linterid=&HSouceBillType=SUB&linteridSub=-1'
+ , end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ }
+ })
+ }
+
//#region 缂栬緫
function set_ShowBill() {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
var linterid = data[0].HItemID;
- var linteridSub = data[0].hsubid;
-
+ //var linteridSub = data[0].hsubid;
+
//if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
layer.open({
type: 2
, area: ['100%', '100%']
, title: '宸ヨ壓璺嚎-缂栬緫'
, shift: 0//寮瑰嚭鍔ㄧ敾
- , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=&linteridSub=' + linteridSub
+ , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=3301'
, end: function () {
//鍒锋柊椤甸潰,
location.reload();
@@ -371,7 +561,7 @@
$.ajax({
url: GetWEBURL() + '/LEMS/DeltetGy_RoutingBillSub',
type: "GET",
- data: { "lngBillKey": hmainid, "user": sessionStorage["HUserName"] },
+ data: { "lngBillKey": hmainid, "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
success: function (result) {
console.log('gouba' + result);
if (result.count == 1) {
@@ -402,13 +592,244 @@
}
//#endregion
+ //澶嶅埗
+ function set_Copy() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var linterid = data[0].HItemID;
+
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '宸ヨ壓璺嚎-缂栬緫'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=2&linterid=' + linterid + '&HSouceBillType=3301'
+ , end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ }
+ })
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ }
+ }
+
//#region 鍒锋柊
function get_Refresh() {
set_ClearQuery();
get_Display(sWhere);
}
- //#endregion
+ //瀹℃牳 [1 瀹℃牳銆�2 鍙嶅鏍竇
+ function set_CheckBill(num) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+
+ if (data.length == 1) {
+ layer.confirm("纭瑕佸鏍稿悧?", function (index) {
+ var wait = layer.load();
+ var HInterID = data[0].hmainid;
+ $.ajax({
+ url: GetWEBURL() + '/Gy_RoutingBill/CheckGy_RoutingBill',
+ type: "GET",
+ data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
+ success: function (result) {
+ if (result.count == 1) {
+ get_FastQuery();
+ layer.msg(result.Message, { icon: 1 });
+ layer.close(wait);
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(wait);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
+ }
+ });
+ })
+ } else {
+ layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+ }
+ }
+
+
+ //鍏抽棴 [1 鍏抽棴銆�2 鍙嶅叧闂璢
+ function set_CloseBill(num) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+
+ if (data.length == 1) {
+ layer.confirm("纭瑕佸叧闂悧?", function (index) {
+ var wait = layer.load();
+ var HInterID = data[0].hmainid;
+ $.ajax({
+ url: GetWEBURL() + '/Gy_RoutingBill/CloseGy_RoutingBill_1',
+ type: "GET",
+ data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"], "HBillSubType": ""},
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { icon: 1 });
+ layer.close(wait);
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(wait);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
+ }
+ });
+ })
+ }
+ else {
+ layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+ }
+ }
+
+
+
+ //瀵煎嚭Execel
+ function get_Export() {
+ table.exportFile(ins.config.id, option.data, "xls");
+ }
+
+
+ //#endregion
+ //闅愯棌鍒楄缃�
+ 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 = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //璁剧疆鍒楀
+ //if (data1.data[0].HColumnWidth != 0) {
+ // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+ //} else {
+ // option.cols[0][i + 1]["width"] = "";
+ //}
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ }
+
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ table.render(option);
+ } else {
+ table.render(option);
+ }
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ Display_HideButton(btns, "3301", HModName, sessionStorage["HUserName"]);
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+
+ //#region 鍒楁槑鏄剧ず涓嬫媺妗�
+ 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
//#endregion
//浠ヤ笂鏄痩ayui妯″潡
--
Gitblit v1.9.1