From 9e635d2820f8e8401c267a4adb92e0ac0eccaa8e Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期三, 23 十月 2024 09:10:56 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/基础资料/公用基础资料/xmlLBM_Sc_ProcessExchangeBillList.aspx | 2
/dev/null | 26
WebTM/views/计划管理/工艺路线/Gy_RoutingBill.html | 68 ++
WebTM/views/grf/返工流转卡 - A5.grf | 4
WebTM/views/计划管理/工艺路线/Gy_RoutingBillCloseList.html | 1552 +++++++++++++++++++++++++++++++++++++++++++++++++++
WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html | 129 +++
WebTM/WebTM.csproj | 4
7 files changed, 1,731 insertions(+), 54 deletions(-)
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index d6a932b..5d2f2e3 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -465,6 +465,7 @@
<Content Include="views\绯荤粺绠$悊\鐢ㄦ埛绠$悊\Xt_UserRightQuery.html" />
<Content Include="views\璁″垝绠$悊\Excel\Gy_Group_Excel.html" />
<Content Include="views\璁″垝绠$悊\宸ヨ壓璺嚎\Gy_RoutingBillCheckQuery.html" />
+ <Content Include="views\璁″垝绠$悊\宸ヨ壓璺嚎\Gy_RoutingBillCloseList.html" />
<Content Include="views\璁″垝绠$悊\宸ヨ壓璺嚎\Pay_ProcPriceTypeChangeReport.html" />
<Content Include="views\璁惧绠$悊\Sb_Add_EquipRepairSignBillList.html" />
<Content Include="views\璁惧绠$悊\Sb_EquipRepairSignBillList_PDA.html" />
@@ -2736,9 +2737,6 @@
<Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Sc_ProcessExchangeBillList.aspx.cs">
<DependentUpon>xmlLBM_Sc_ProcessExchangeBillList.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Sc_ProcessExchangeBillList.aspx.designer.cs">
- <DependentUpon>xmlLBM_Sc_ProcessExchangeBillList.aspx</DependentUpon>
</Compile>
<Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Sc_ProcessExchangeBillList_SubList.aspx.cs">
<DependentUpon>xmlLBM_Sc_ProcessExchangeBillList_SubList.aspx</DependentUpon>
diff --git "a/WebTM/views/grf/\350\277\224\345\267\245\346\265\201\350\275\254\345\215\241 - A5.grf" "b/WebTM/views/grf/\350\277\224\345\267\245\346\265\201\350\275\254\345\215\241 - A5.grf"
index 24f9405..78c8a9d 100644
--- "a/WebTM/views/grf/\350\277\224\345\267\245\346\265\201\350\275\254\345\215\241 - A5.grf"
+++ "b/WebTM/views/grf/\350\277\224\345\267\245\346\265\201\350\275\254\345\215\241 - A5.grf"
@@ -92,7 +92,7 @@
"Name":"鐢熶骇璁㈠崟鏁伴噺"
},
{
- "Name":"宸叉眹鎶ユ暟閲�"
+ "Name":"鍑虹珯鍏宠仈鏁伴噺"
}
]
},
@@ -198,7 +198,7 @@
},
{
"Column":"Column17",
- "DataField":"宸叉眹鎶ユ暟閲�"
+ "DataField":"鍑虹珯鍏宠仈鏁伴噺"
},
{
"Column":"Column12",
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Sc_ProcessExchangeBillList.aspx" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Sc_ProcessExchangeBillList.aspx"
index b1f44af..08bc323 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Sc_ProcessExchangeBillList.aspx"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Sc_ProcessExchangeBillList.aspx"
@@ -14,7 +14,7 @@
//OledbXMLReportData閫傚悎浜嶢ccess绛夋湰鍦版暟鎹簱锛屼负浜嗘紨绀烘柟渚匡紝杩欓噷浠嶨rid++Report鐨凙ccess渚嬪瓙鏁版嵁搴撲腑鑾峰彇鎶ヨ〃鏁版嵁
//OledbXMLReportData.GenOneRecordset(this, "select * from Customers order by CustomerID");
- SqlXMLReportData.GenEntireData(this, "select cast((cast( b.娴佹按鍙� as float)/10) as decimal(6,1)) 娴佹按鍙�,鐢熶骇璁㈠崟鍙�,a.鐢熶骇鏁伴噺,a.鎷嗗垎鍙�,a.娴佽浆鍗℃暟閲�,a.浜よ揣鏃ユ湡,a.浜у搧浠g爜,a.鍗曟嵁鍙�,case when ISNULL(a.鐢熶骇瑙勬牸,'')='' then a.浜у搧瑙勬牸 else a.鐢熶骇瑙勬牸 end 浜у搧瑙勬牸,a.浜у搧鍚嶇О,a.鏃ユ湡,a.璁″垝瀹屽伐鏃ユ湡,a.鍗曟嵁鍙�,b.宸ュ簭鍚嶇О,b.妯″叿缂栧彿,b.宸ヨ壓鍙傛暟,b.鍔犲伐璇存槑,case when ISNULL(a.鐢熶骇骞呭,0)=0 then a.骞呭 else a.鐢熶骇骞呭 end 骞呭,case when ISNULL(a.鐢熶骇鍏嬮噸,0) = 0 then a.鍏嬮噸 else a.鐢熶骇鍏嬮噸 end 鍏嬮噸,a.鐧藉澂瑕佹眰,a.搴曢儴澶囨敞,a.瀹㈡埛,a.涓氬姟鍛�,a.姣涢珮,a.瀵告暟缁勭粐,a.鍏ㄦ瘺闀�,a.鍧竷瀵嗗害,a.姣涚罕鍚嶇О鍙婅鏍�,a.搴曚笣,a.杈呮暟閲�,a.杈呭姪鍗曚綅,a.瀹氬瀷娴嗘枡,a.浜よ揣鏃ユ湡,a.鏌撹壊瑕佹眰,a.杈呮暟閲�2,a.HAuxUnit2,a.杈呭姪鍗曚綅2,b.HRelationQty_Out 宸叉眹鎶ユ暟閲� from h_v_Sc_ProcessExchangeBillQuery a left join h_v_Sc_ProcessExchangeBillQuerySub b on a.hmainid=b.hmainid where b.hmainid in("+Request.Params["linterid"] +") order by cast(b.娴佹按鍙� as int)","select 1");
+ SqlXMLReportData.GenEntireData(this, "select cast((cast( b.娴佹按鍙� as float)/10) as decimal(6,1)) 娴佹按鍙�,鐢熶骇璁㈠崟鍙�,a.鐢熶骇鏁伴噺,a.鎷嗗垎鍙�,a.娴佽浆鍗℃暟閲�,a.浜よ揣鏃ユ湡,a.浜у搧浠g爜,a.鍗曟嵁鍙�,case when ISNULL(a.鐢熶骇瑙勬牸,'')='' then a.浜у搧瑙勬牸 else a.鐢熶骇瑙勬牸 end 浜у搧瑙勬牸,a.浜у搧鍚嶇О,a.鏃ユ湡,a.璁″垝瀹屽伐鏃ユ湡,a.鍗曟嵁鍙�,b.宸ュ簭鍚嶇О,b.妯″叿缂栧彿,b.宸ヨ壓鍙傛暟,b.鍔犲伐璇存槑,case when ISNULL(a.鐢熶骇骞呭,0)=0 then a.骞呭 else a.鐢熶骇骞呭 end 骞呭,case when ISNULL(a.鐢熶骇鍏嬮噸,0) = 0 then a.鍏嬮噸 else a.鐢熶骇鍏嬮噸 end 鍏嬮噸,a.鐧藉澂瑕佹眰,a.搴曢儴澶囨敞,a.瀹㈡埛,a.涓氬姟鍛�,a.姣涢珮,a.瀵告暟缁勭粐,a.鍏ㄦ瘺闀�,a.鍧竷瀵嗗害,a.姣涚罕鍚嶇О鍙婅鏍�,a.搴曚笣,a.杈呮暟閲�,a.杈呭姪鍗曚綅,a.瀹氬瀷娴嗘枡,a.浜よ揣鏃ユ湡,a.鏌撹壊瑕佹眰,a.杈呮暟閲�2,a.HAuxUnit2,a.杈呭姪鍗曚綅2,b.鍑虹珯鍏宠仈鏁伴噺 from h_v_Sc_ProcessExchangeBillQuery a left join h_v_Sc_ProcessExchangeBillQuerySub b on a.hmainid=b.hmainid where b.hmainid in("+Request.Params["linterid"] +") order by cast(b.娴佹按鍙� as int)","select 1");
}
</script>
</head>
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Sc_ProcessExchangeBillList.aspx.designer.cs" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Sc_ProcessExchangeBillList.aspx.designer.cs"
deleted file mode 100644
index bff9a95..0000000
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Sc_ProcessExchangeBillList.aspx.designer.cs"
+++ /dev/null
@@ -1,26 +0,0 @@
-锘�//------------------------------------------------------------------------------
-// <鑷姩鐢熸垚>
-// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆�
-//
-// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉
-// 閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆�
-// </鑷姩鐢熸垚>
-//------------------------------------------------------------------------------
-
-namespace WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡
-{
-
-
- public partial class xmlLBM_QC_TakeSampleCheckBillMainList
- {
-
- /// <summary>
- /// form1 鎺т欢銆�
- /// </summary>
- /// <remarks>
- /// 鑷姩鐢熸垚鐨勫瓧娈点��
- /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲��
- /// </remarks>
- protected global::System.Web.UI.HtmlControls.HtmlForm form1;
- }
-}
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_RoutingBill.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_RoutingBill.html"
index c597a43..7e19cbb 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_RoutingBill.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_RoutingBill.html"
@@ -60,12 +60,13 @@
<form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
<div style="padding: 2px; ">
<!--<button type="button" id="btnSearch" style="margin-left: 0px" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="btnSearch" >棰勮</button>
- <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">鏂板</button>
- <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">淇敼</button>-->
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">鏂板</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">淇敼</button>-->
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">淇濆瓨</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">閫�鍑�</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_defaultRoute" id="set_defaultRoute">鍚敤榛樿</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_closeOtherRoute" id="set_closeOtherRoute">绂佺敤鍏跺畠</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">鍙嶅鏍�</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CloseBill" id="set_CloseBill">鍏抽棴</button>
@@ -735,7 +736,7 @@
if (linterid == null || linterid == 0) {
//$("#HIDDEN").hide();
OperationType = 1;
-
+ $('#set_closeOtherRoute').addClass("layui-btn-disabled").attr("disabled", true);
$.ajax({
url: GetWEBURL() + "/Web/GetMAXNum",
type: "GET",
@@ -815,6 +816,10 @@
//鍚敤榛樿
form.on('submit(set_defaultRoute)', function (data) {
set_defaultRoute(data);
+ });
+ //绂佺敤鍏跺畠
+ form.on('submit(set_closeOtherRoute)', function (data) {
+ set_closeOtherRoute(data);
});
//瀹℃牳
@@ -1491,6 +1496,62 @@
});
})
}
+
+ //#region 鍏抽棴鍏跺畠
+ function set_closeOtherRoute() {
+ var hmainid = $("#HInterID").val();
+ var HName = $("#HName").val();
+ var HMaterID = $("#HMaterID").val();
+ if (hmainid != 0 && HMaterID != 0 && HName!="") {
+ layer.open({
+ type: 2
+ , area: ['70%', '70%']
+ , title: '浼氬叧闂殑鍗曟嵁鍒楄〃璇风‘璁�'
+ , closeBtn: 1
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../../璁″垝绠$悊/宸ヨ壓璺嚎/Gy_RoutingBillCloseList.html?HMaterID=' + HMaterID + '&HProID=' + 0 + '&HName=' + HName + '&HInterID=' + hmainid
+ , resize: false
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ $.ajax({
+ url: GetWEBURL() + '/Gy_Routing/CloseOther',
+ type: "GET",
+ data: { "HInterID": hmainid, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { icon: 1 });
+ layer.close(index);
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(index);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+
+ }
+ });
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ , end: function () {
+ ////淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ //if (get_needClose_Bar == 0) {
+ $("#btnSearch").trigger('click');
+ //} else if (get_needClose_Bar == 1) {
+ // $("#get_needClose").trigger('click');
+ //}
+ }
+ , cancel: function () {
+
+ }
+ })
+ } else {
+ layer.msg('淇℃伅閿欒');
+ }
+ }
+ //#endregion
//瀹℃牳
function set_CheckBill() {
@@ -2269,6 +2330,7 @@
success: function (data) {
if (data.count == 1) {
$('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);
+ $('#set_closeOtherRoute').prop('disabled', false).removeClass('layui-btn-disabled');
layer.close(index);
layer.msg("鎻愪氦鎴愬姛");
}
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_RoutingBillCloseList.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_RoutingBillCloseList.html"
new file mode 100644
index 0000000..f1c667b
--- /dev/null
+++ "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_RoutingBillCloseList.html"
@@ -0,0 +1,1552 @@
+锘�<!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 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/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/HideButton.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.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">
+ <input type="text" class="layui-input" name="WorkCenter" id="WorkCenter">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐗╂枡浠g爜</label>
+ <div class="layui-input-block">
+ <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-row" style="margin-top:5px;margin-left:82px;margin-bottom:5px;">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鐢熶骇璁㈠崟缁勭粐</label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+ <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">椤圭洰鍙�</label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+ <select name="HProject" id="HProject" class=" ForFilteringSchemes" lay-verify="HProject">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
+ </div>
+ </div>
+ <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; display: none;">閲嶇疆</button>
+ </div>
+ <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 class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+ <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; margin-left: 70px;">
+ <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>
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <div id="page" style="position:relative;bottom:0;"></div>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+ <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew" id="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" id="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
+ <button type="button" class="layui-btn layui-btn-sm" 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" 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" 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" 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" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_defaultRoute" id="set_defaultRoute"><i class="layui-icon layui-icon-form"></i>鍚敤榛樿</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_startCheckBill" id="set_startCheckBill"><i class="layui-icon layui-icon-form"></i>鍙戣捣瀹℃壒</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_CheckFlowInfo" id="get_CheckFlowInfo"><i class="layui-icon layui-icon-form"></i>鏌ョ湅瀹℃壒杩涘害</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill_Flow" id="CheckBill_Flow"><i class="layui-icon layui-icon-form"></i>澶氱骇瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck_Flow" id="AbandonCheck_Flow"><i class="layui-icon layui-icon-form"></i>澶氱骇鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_RejectCheck_Flow" id="RejectCheck_Flow"><i class="layui-icon layui-icon-form"></i>椹冲洖</button>
+ <!--<button type="button" class="layui-btn layui-btn-sm" 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" 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="set_HideColumn" id="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+ <button type="button" class="layui-btn layui-btn-sm" 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" lay-event="set_HideButton" id="set_HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>-->
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <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 = " 浜у搧浠g爜 = 'BX0002'";
+ var sWhere = "";
+ var option = [];
+ var page = 1;//鍒嗛〉鏁版嵁
+ var size = 50;
+ var HBillType = 3301;
+ var ins; //鐢ㄤ簬瀵煎嚭excel
+ var HModName = "Gy_RoutingBillList";
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ //鑾峰彇鍙傛暟
+ function getUrlVars() {
+ var vars = [], hash;
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+ for (var i = 0; i < hashes.length; i++) {
+ hash = hashes[i].split('=');
+ vars.push(hash[0]);
+ vars[hash[0]] = hash[1];
+ }
+ return vars;
+ }
+ //灏唘rl鍙傛暟涓殑涓枃涔辩爜閲嶆柊杞崲鎴愪腑鏂�
+ function getParams(key) {
+ var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
+ //濡傛灉鍦板潃鏍忎腑鍑虹幇涓枃鍒欒繘琛岀紪鐮�
+ var r = encodeURI(window.location.search).substr(1).match(reg);
+ if (r != null) {
+ //灏嗕腑鏂囩紪鐮佺殑瀛楃閲嶆柊鍙樻垚涓枃
+ return decodeURI(unescape(r[2]));
+ }
+ return null;
+ };
+ var HMaterID = "";
+ var HProID = 0;
+ var params = getUrlVars();
+ if (params[params[0]] != "undefined") {
+ HMaterID = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇
+ HProID = params[params[1]]; //浠庡弬鏁颁腑鑾峰彇
+ HName = params[params[2]];
+ HInterID = params[params[3]];
+ HName = getParams("HName");//灏嗕腑鏂囦贡鐮佽浆鎹㈡垚涓枃
+ }
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //#region 澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable)', function (obj) {
+ switch (obj.event) {
+ //鏂板
+ case 'set_AddNew': set_AddNew();
+ break;
+ //鏂板瀛愯矾绾�
+ case 'set_AddNewSub': set_AddNewSub();
+ break;
+ //缂栬緫
+ case 'set_ShowBill': set_ShowBill();
+ break;
+ //澶氳涓嬫帹
+ case 'btn-ProcPriceRequestBills': set_ProcPriceRequestBills();
+ break;
+ //鍒犻櫎
+ case 'set_DeleteBill': set_DeleteBill();
+ break;
+ //鍚敤榛樿
+ case 'set_defaultRoute': set_defaultRoute();
+ break;
+ //鍙戣捣瀹℃壒
+ case 'set_startCheckBill': set_startCheckBill();
+ break;
+ //鏌ョ湅瀹℃壒杩涘害
+ case 'get_CheckFlowInfo': get_CheckFlowInfo();
+ break;
+ //澶氱骇瀹℃牳
+ case 'set_CheckBill_Flow': set_CheckBill_Flow(0);
+ break;
+ //澶氱骇鍙嶅鏍�
+ case 'set_AbandonCheck_Flow': set_CheckBill_Flow(1);
+ break;
+ //椹冲洖
+ case 'set_RejectCheck_Flow': set_RejectCheck_Flow();
+ 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;
+ };
+ });
+
+ //#endregion
+
+ //#region 鏌ヨ鎸夐挳
+ form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
+
+ if (page != 1) {
+ $("#page a:eq(1)").get(0).click();//鐐瑰嚮鍒嗛〉鏍忕涓�椤�
+ } else {
+ get_FastQuery(2);
+ }
+ });
+ //#endregion
+
+ //鐗╂枡
+ form.on('submit(btnHMaterID)', function (data) {//閫夋嫨浠撲綅
+
+ get_btnHMaterID();
+ });
+
+ //閲嶇疆鎸夐挳
+ form.on('submit(btnReSearch)', function (data) {
+
+ set_ClearQuery();
+ });
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ //鑾峰彇缁勭粐
+ function Organ() {
+ //鑾峰彇鐧诲綍椤电粍缁囧垪
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Web/GetOrganizations",
+ success: function (result) {
+ var Organization = "";
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
+ }
+ $("#HOrgID").append(Organization);
+ $("#HOrgID").val(sessionStorage["OrganizationID"])
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+
+ //#endregion
+
+ //#region 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ Organ();
+ //鏌ヨ
+ get_FastQuery(1);
+ //鑾峰彇椤圭洰鍙�
+ Get_HProject();
+ }
+ //#endregion
+
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-150'
+ , page: false
+ , limit: 50
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ /* { field: 'hmainid', title: 'hmainid', width: 110 }*/
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', sort: true, width: 165 }
+ , { field: '宸ヨ壓鍚嶇О', title: '宸ヨ壓鍚嶇О', width: 170, sort: true }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 160, sort: true }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 160, sort: true }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 160, sort: true }
+ , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 115, sort: true }
+ , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', sort: true }
+ , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', sort: true }
+ , { field: '宸ュ簭鍙�', title: '宸ュ簭鍙�', sort: true }
+ , { field: '宸ュ簭浠g爜', title: '宸ュ簭浠g爜', sort: true }
+ , { field: '宸ュ簭', title: '宸ュ簭', sort: true }
+ , { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', width: 115, sort: true }
+ , { field: '宸ヤ綔涓績鍚嶇О', title: '宸ヤ綔涓績鍚嶇О', width: 115, sort: true }
+ , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', sort: true }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 195, sort: true }
+ , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', sort: true }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 180, sort: true }
+ , { field: '淇敼浜�', title: '淇敼浜�', sort: true }
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 180, sort: true }
+ , { field: '榛樿宸ヨ壓', title: '榛樿宸ヨ壓', sort: true }
+ //, { 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: '娴佽浆宸ュ簭' }
+ ]]
+ };
+ optionPage = {
+ elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
+ count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
+ limit: 50,
+ limits: [50, 500, 5000, 50000],
+ layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
+ jump: function (obj, first) {
+ //console.log(obj)
+ //obj鍖呭惈浜嗗綋鍓嶅垎椤电殑鎵�鏈夊弬鏁帮紝姣斿锛�
+ //console.log(obj.curr); //寰楀埌褰撳墠椤碉紝浠ヤ究鍚戞湇鍔$璇锋眰瀵瑰簲椤电殑鏁版嵁銆�
+ //console.log(obj.limit); //寰楀埌姣忛〉鏄剧ず鐨勬潯鏁�
+
+ //棣栨涓嶆墽琛�
+ if (!first) {
+ //do something
+ page = obj.curr;
+ size = obj.limit;
+ get_FastQuery();
+ }
+ }
+ }
+ laypage.render(optionPage);
+ }
+ //#region 鎺掑簭鍚庨�夋嫨
+ table.on('sort(mainTable)', function (obj) { //娉細sort 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
+ table.reload('mainTable', {
+ initSort: obj //璁板綍鍒濆鎺掑簭锛屽鏋滀笉璁剧殑璇濓紝灏嗘棤娉曟爣璁拌〃澶寸殑鎺掑簭鐘舵�併�� layui 2.1.1 鏂板鍙傛暟
+ , where: { //璇锋眰鍙傛暟锛堟敞鎰忥細杩欓噷闈㈢殑鍙傛暟鍙换鎰忓畾涔夛紝骞堕潪涓嬮潰鍥哄畾鐨勬牸寮忥級
+ field: obj.field //鎺掑簭瀛楁 鍦ㄦ帴鍙d綔涓哄弬鏁板瓧娈� field order
+ , order: obj.type //鎺掑簭鏂瑰紡 鍦ㄦ帴鍙d綔涓哄弬鏁板瓧娈� field order
+ }
+ });
+ option.data = layui.table.cache["mainTable"];
+ table.render(option);
+ });
+ //#endregion
+
+ //#region 鐐瑰嚮琛岄�変腑楂樹寒
+ table.on('row(mainTable)', function (obj) {
+ //閫変腑琛屾敼鍙橀鑹�
+ var flag = !obj.tr.find(':checkbox:first').prop('checked');
+ obj.tr.find(':checkbox').prop('checked', flag);
+ if (flag) {
+ obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+ } else {
+ obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+ }
+ //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+ layui.each(table.cache.mainTable, function (i, l) {
+ if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+ l.LAY_CHECKED = flag;
+ }
+ });
+ })
+ //#endregion
+
+ //#region 閲嶇疆杩囨护鏉′欢鏂规硶
+ function set_ClearQuery() {
+ $("#WorkCenter").val("");//鍗曟嵁鍙�
+ $("#HMaterID").val(0);//鐗╂枡
+ $("#HMaterName").val("");//鐗╂枡
+ $("#HMaterNumber").val("");//鐗╂枡
+ $("#HModel").val("");//鐗╂枡
+ $("#HOrderProcNO").val("");//鍗曟嵁绫诲瀷
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0"); $("#ColContent1").val("");
+ $("#ColName1").val("0");
+ $("#Comparator1").val("0"); $("#ColContent2").val("");
+ $("#ColName2").val("0");
+ $("#Comparator2").val("0");
+ $("#HOrgID").val(sessionStorage["OrganizationID"]);
+ form.render('select');
+ $("#btnSearch").click();
+ sWhere = "";
+ }
+ //#endregion
+
+
+ //鐗╂枡
+ function get_btnHMaterID() {
+ layer.open({
+ type: 2
+ , area: ['80%', '80%']
+ , title: '鐗╂枡'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.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].鐗╂枡鍚嶇О);
+ $("#HMaterNumber").val(checkStatus.data[0].鐗╂枡浠g爜);
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ })
+ }
+ //#endregion 鐩戝惉缃戞牸琛ㄤ綋浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ var data = obj.data;
+
+ //鍗曟嵁鍙疯秴閾炬帴
+ if (obj.event == '鍗曟嵁鍙�') { //妫�鏌� obj.event 鏄惁绛変簬瀛楃涓� '鍗曟嵁鍙�'銆傚鏋滅瓑浜庯紝鍒欐墽琛宨f寰幆
+ var linterid = data.hmainid.toString(); //澹版槑鍙橀噺linterid 涓� data.hmainid
+ //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+ layer.open({ //浣跨敤 layer鐨刼pen鎵撳紑寮瑰嚭 灞�
+ type: 2 //琛ㄧず寮瑰嚭灞傜殑鍐呭鏄竴涓� iframe
+ , area: ['100%', '100%']
+ , title: '缂栬緫' //璁剧疆寮瑰嚭灞傜殑鍚嶅瓧鍜屽彉閲�
+ , closeBtn: 1//鏄剧ず鍏抽棴鎸夐挳
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=3301' //璁剧疆 iframe 鐨� URL锛孶RL 涓寘鍚簡鏌ヨ鍙傛暟锛屾潵璋冪敤鎵�闇�瑕佺殑鍊�
+
+ , resize: false, //鏄惁鍏佽鐢ㄦ埛璋冩暣寮瑰嚭澶у皬
+ end: function () { //褰撳叧闂椂璋冪敤
+ get_FastQuery(table, option);
+ }
+ , cancel: function () { //鐐瑰嚮鍙栨秷鏃朵娇鐢ㄥ洖璋�
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+ }
+ });
+ //#endregion
+
+ //#region 蹇�熻繃婊�
+ function get_FastQuery(number) {
+
+ var HOrgID = "";
+ var HOrderProcNO = $("#HOrderProcNO").val();//鍗曟嵁绫诲瀷
+ //var HMaterID = $("#HMaterID").val();
+ var HMaterName = $("#HMaterName").val();
+ var HMaterNumber = $("#HMaterNumber").val();
+ var HModel = $("#HModel").val();
+ var WorkCenter = $("#WorkCenter").val();//鍗曟嵁鍙�
+ var HProject = $("#HProject").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 = "" + Comparator + "''" + ColContent + "''";
+ break;
+ }
+ sWhere += " and " + ColName2 + " " + com2;
+ }
+ if (HMaterID != "" && HMaterID != "undefined" && HMaterID != null) {
+ //浠庡埆鐨勯〉闈㈡墦寮�浼犲叆Hmaterid鍊硷紝璁剧疆鐗╂枡杩囨护
+ sWhere += " and HMaterID = " + HMaterID;
+ //浠庡埆鐨勯〉闈㈡墦寮�璁剧疆鍏抽棴
+ sWhere += " and hmainid!=" + HInterID + " and 宸ヨ壓鍚嶇О = ''" + HName.toString() + "''";
+ } else {
+ //涓嶆槸浠庡埆鐨勯〉闈㈡墦寮�
+ var HMaterID2 = $("#HMaterID").val();
+ sWhere += (HMaterID2 == 0 ? "" : (" and HMaterID = " + HMaterID2));
+ }
+ if (HProID != 0 && HProID != "undefined" && HProID != null) {
+ sWhere += " and HMainProcID = " + HProID;
+ }
+ if (number == 1) {
+ HOrgID = sessionStorage["OrganizationID"];
+ }
+ else {
+ HOrgID = $("#HOrgID").val();//缁勭粐
+ }
+
+ if (HOrderProcNO) {
+ sWhere += " and 鍗曟嵁绫诲瀷 like ''%" + HOrderProcNO + "%''";
+ }
+ 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 + "%''";
+ }
+ if (HOrgID) {
+ sWhere += " and HOrgID = ''" + HOrgID + "''";
+ }
+ if (number==2) {
+ if (HProject!='0') {
+ sWhere += " and 椤圭洰鍙� like ''%" + HProject + "%''";
+ }
+ }
+
+ sWhere += " and 宸ュ簭浠g爜 != ''9999'' and HBillSubType<>''SUB''"
+ get_DisplayPage(sWhere);
+ sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ }
+ //#endregion
+
+ //#region 鍒嗛〉鏌ヨ
+ function get_DisplayPage(sWhere) {
+ var wait = layer.load();//閬僵
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Gy_RoutingBill/page',
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
+ success: function (data1) {
+ option.limit = size;//鏀瑰彉琛ㄦ牸椤靛ぇ灏�
+ if (data1.code == 1) {
+ optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟
+ 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', 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 {
+ switch (data[i].Type) {
+ //int
+ case 'long':
+ case 'Int32':
+ case 'Int64':
+ case 'double':
+ case 'Decimal':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120, totalRow: true });
+ break;
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 120 });
+ }
+ }
+ }
+
+ option.cols = [col];
+ option.data = data1.data;
+ laypage.render(optionPage);
+ //璁剧疆鍒楄〃鍚屼竴涓崟鎹彧鏈夌涓�鏉℃暟鎹樉绀轰富琛ㄤ俊鎭紝鍏跺畠璁板綍鍙樉绀哄瓙琛ㄤ俊鎭�
+ //鑾峰彇瀛愯〃鍒楁暟鎹�
+ var colList = [];
+ for (var i = 0; i < option.cols[0].length; i++) {
+ colList.push(option.cols[0][i].field);
+ }
+ //璁剧疆鏁版嵁
+ var result = data1.data;
+ var temp = "";
+ for (var i = 0; i < result.length; i++) {
+ if (temp != result[i]["鍗曟嵁鍙�"]) {
+ temp = result[i]["鍗曟嵁鍙�"];
+ } else {
+ var initIndex = $.inArray("鍗曟嵁鍙�", colList);
+ var lastIndex = $.inArray("hsubid", colList);
+ for (var j = initIndex; j < lastIndex; j++) {
+ var fieldName = colList[j];
+ result[i][fieldName] = "";
+ }
+ }
+ }
+ option.data = result;
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+
+ layer.close(ajaxLoad);
+ if ($("#ColName option").length < 1) {
+ ColFilter();
+ }
+ //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ } else {
+ //option.data = [[]]
+ //table.render(option);
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
+
+ //#region 鏂板
+ function set_AddNew() {
+ layer.open({
+ type: 2
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['100%', '100%']
+ , title: '宸ヨ壓璺嚎-鏂板'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=1&linterid=&HSouceBillType=3301&linteridSub=-1'
+ , end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ }
+ })
+ }
+ //#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;
+
+ //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '宸ヨ壓璺嚎-缂栬緫'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=3301'
+ , end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ }
+ })
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ }
+ }
+ //#endregion
+
+ //#region 鍒犻櫎
+ function set_DeleteBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var hmainid = data[0].hmainid;
+ layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+ var wait = layer.load();
+ //閫昏緫鍒犻櫎鏂规硶
+ $.ajax({
+ url: GetWEBURL() + '/LEMS/DeltetGy_RoutingBillSub',
+ type: "GET",
+ data: { "lngBillKey": hmainid, "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
+ success: function (result) {
+ console.log('gouba' + result);
+ if (result.count == 1) {
+ layer.msg(result.Message, { icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(wait);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(wait);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
+ }
+ });
+ })
+
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+ }
+
+ }
+ //#endregion
+
+ //#region 鑾峰彇椤圭洰鍙�
+ function Get_HProject() {
+ //鑾峰彇椤圭洰鍙�
+ var HProjectList = '<option value="0" style="color:red;" selected></option>';
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Gy_Material/Get_HProject",
+ 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++) {
+ HProjectList += '<option style="color:blue;" value="' + data[i].HName + '" >' + data[i].HName + '</option>';
+ }
+ $("#HProject").append(HProjectList);
+ form.render('select');
+
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+ //#endregion
+
+ //#region 澶氳涓嬫帹锛堥噰璐叆搴撳崟锛�
+ function set_ProcPriceRequestBills() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (data.length > 0) {
+ var dataArray = [];
+ for (var i = 0; i < data.length; i++) {
+ var temp = {
+ "hmainid": data[i].hmainid
+ , "hsubid": data[i].hsubid
+ }
+ dataArray.push(temp);
+ //if (data[i].鐘舵�� != "瀹℃牳") {
+ // var err = "涓嬫帹澶辫触!鍗曟嵁銆�" + data[i].鍗曟嵁鍙� + "銆戠殑鐘舵�佷负鈥�" + data[0].鐘舵�� + "鈥�,涓嶅厑璁镐笅鎺紒";
+ // layer.alert(err, { icon: 5 });
+ // return;
+ //}
+ //if (data[i].琛岀姸鎬� != "") {
+ // var err = "涓嬫帹澶辫触!鍗曟嵁銆�" + data[i].鍗曟嵁鍙� + "銆戠殑鐘舵�佷负鈥�" + data[0].琛岀姸鎬� + "鈥�,涓嶅厑璁镐笅鎺紒";
+ // layer.alert(err, { icon: 5 });
+ // return;
+ //}
+ }
+
+ var datajson = {
+ "data": dataArray
+ };
+ var url = encodeURI('../../宸ヨ祫绠$悊/瀹氶鐢宠/Pay_ProcPriceRequestBill.html?OperationType=4&linterid=0&HSouceBillType=3301&res=' + JSON.stringify(datajson))
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '宸ヨ壓璺嚎-澶氳涓嬫帹瀹氶鐢宠鍗�'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: url
+ , btn: [],
+ // 鎸夐挳1 鐨勫洖璋�
+ end: function (index, layero, that) {
+ //鍒锋柊椤甸潰
+ $("#btnSearch").trigger('click');
+ }
+ })
+ } else {
+ layer.msg('璇烽�夋嫨鏁版嵁涓嬫帹锛�');
+ }
+ }
+ //#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_DisplayPage(sWhere);
+ }
+
+ //鍚敤榛樿
+ function set_defaultRoute() {
+ 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/set_defaultRoute',
+ type: "GET",
+ data: { "HInterID": HInterID, "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_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) {
+ if (num == 1) {
+ //妫�鏌ユ槸鍚﹀叿澶囧惎鐢ㄩ粯璁ゅ伐鑹鸿矾绾跨殑鏉冮檺锛屽瓨鍦紝鍒欏脊绐楁彁闂�
+ $.ajax({
+ url: GetWEBURL() + '/Gy_RoutingBill/set_defaultRoute_CheckRight',
+ type: "GET",
+ async: false,
+ data: { "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
+ success: function (result1) {
+ if (result1.count == 1) { //鎷ユ湁鏉冮檺
+ layer.confirm("纭瑕佸惎鐢ㄨ宸ヨ壓璺嚎涓虹墿鏂欓粯璁ゅ伐鑹鸿矾绾垮悧?", function (index1) {
+ //鍚敤榛樿宸ヨ壓璺嚎
+ $.ajax({
+ url: GetWEBURL() + '/Gy_RoutingBill/set_defaultRoute',
+ type: "GET",
+ async: false,
+ data: { "HInterID": HInterID, "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
+ success: function (result2) {
+ if (result2.count == 1) {
+ get_FastQuery();
+ layer.msg(result2.Message, { icon: 1 });
+ } else {
+ layer.alert(result2.code + result2.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ })
+ get_FastQuery();
+ layer.close(wait);
+ } else {
+ get_FastQuery();
+ layer.close(wait);
+ layer.close(index);
+ }
+ }, error: function () {
+ get_FastQuery();
+ layer.close(wait);
+ layer.close(index);
+ }
+ });
+ } else {
+ get_FastQuery();
+ layer.close(wait);
+ layer.close(index);
+ }
+ //layer.closeAll('dialog');
+
+ } 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("璇烽�夋嫨涓�鏉℃暟鎹�!");
+ }
+ }
+
+
+
+ //#region 瀵煎嚭Execel
+ function get_Export() {
+ var ModRightNameCheck = "Gy_RoutingBillList_ExportExcel";
+
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ var data = option.data
+ data.forEach((item) => {
+ for (let itemobj in item) {
+ if (item[itemobj] == null) {
+ item[itemobj] = "";
+ }
+ if (item[itemobj].length > 0) { // 鍋囪瀛楁鍚嶄负field
+ item[itemobj] = item[itemobj].toString().replace(/[\r\n]+/g, ''); // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓�
+ }
+ }
+ });
+
+ if (result.count == 1) {
+ table.exportFile(ins.config.id, option.data, "xls");
+ } else {
+ layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
+
+ //#region 鍙戣捣瀹℃壒
+ function set_startCheckBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Gy_Routing/StartCheckFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "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);
+ $("#btnSearch").trigger('click');
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+ }
+ //#endregion
+
+ //#region 鏌ョ湅瀹℃壒杩涘害
+ function get_CheckFlowInfo() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var hID = data[0].hmainid.toString();
+ layer.open({
+ type: 2
+ , area: ['70%', '70%']
+ , title: '鍗曟嵁瀹℃壒杩涘害'
+ , closeBtn: 1
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../../绯荤粺绠$悊/澶氱骇瀹℃壒/瀹℃壒杩涘害/Xt_CheckFlowProgressList.html?linterid=' + hID + '&HSouceBillType=' + HBillType
+ , resize: false,
+ end: function () {
+ ////淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ //if (get_needClose_Bar == 0) {
+ // $("#btnSearch").trigger('click');
+ //} else if (get_needClose_Bar == 1) {
+ // $("#get_needClose").trigger('click');
+ //}
+ }
+ , cancel: function () {
+
+ }
+ })
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹煡鐪嬶紒');
+ }
+ }
+ //#endregion
+
+ //#region 澶氱骇 鍙嶅鏍�/瀹℃牳鏁版嵁
+ function set_CheckBill_Flow(num) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Gy_Routing/AuditFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] },
+ 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);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+ }
+ //#endregion
+
+ //#region 椹冲洖
+ function set_RejectCheck_Flow(num) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Gy_Routing/RejectCheckFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "CurUserID": sessionStorage["Czybm"] },
+ 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);
+ });
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+ }
+ //#endregion
+
+ //#endregion
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ var contentUrl = "";
+ for (var i = 1; i < option.cols[0].length; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+ 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_New.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);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //#region 鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
+ dataCol = data1.data[0].HGridString.split(',');
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ }
+ }
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ }
+ }
+ table.render(option);
+ } else {
+ table.render(option);
+ }
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ Display_HideButton(btns, "3301", HModName, sessionStorage["HUserName"]);
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+ //#endregion
+
+
+ //#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
+ //#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].title + '</option>';
+ }
+ }
+ $("#ColName").empty();
+ $("#ColName").append(Organization); $("#ColName1").empty();
+ $("#ColName1").append(Organization); $("#ColName2").empty();
+ $("#ColName2").append(Organization);
+ form.render('select');
+ }
+ //#endregion
+ //#endregion
+
+ //浠ヤ笂鏄痩ayui妯″潡
+ });
+
+ //鐗╂枡
+ function GetMaterValue(obj) {
+ $("#HMaterID").val(obj[0].HItemID);
+ $("#HMaterName").val(obj[0].鐗╂枡鍚嶇О);
+ $("#HMaterNumber").val(obj[0].鐗╂枡浠g爜);
+ }
+
+
+ </script>
+
+</body>
+</html>
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 52550df..95e4e87 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"
@@ -203,6 +203,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>鍙嶅鏍�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_defaultRoute" id="set_defaultRoute"><i class="layui-icon layui-icon-form"></i>鍚敤榛樿</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_closeOtherRoute" id="set_closeOtherRoute"><i class="layui-icon layui-icon-form"></i>绂佺敤鍏跺畠</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_startCheckBill" id="set_startCheckBill"><i class="layui-icon layui-icon-form"></i>鍙戣捣瀹℃壒</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_CheckFlowInfo" id="get_CheckFlowInfo"><i class="layui-icon layui-icon-form"></i>鏌ョ湅瀹℃壒杩涘害</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill_Flow" id="CheckBill_Flow"><i class="layui-icon layui-icon-form"></i>澶氱骇瀹℃牳</button>
@@ -303,6 +304,9 @@
break;
//鍚敤榛樿
case 'set_defaultRoute': set_defaultRoute();
+ break;
+ //绂佺敤鍏跺畠
+ case 'set_closeOtherRoute': set_closeOtherRoute();
break;
//鍙戣捣瀹℃壒
case 'set_startCheckBill': set_startCheckBill();
@@ -554,6 +558,8 @@
});
option.data = layui.table.cache["mainTable"];
table.render(option);
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ Display_HideButton(btns, "3301", HModName, sessionStorage["HUserName"]);
});
//#endregion
@@ -858,8 +864,8 @@
sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= ''" + HDate1 + "''";
}
if (HMaterID != "" && HMaterID != "undefined" && HMaterID != null) {
- //浠庡埆鐨勯〉闈㈡墦寮�浼犲叆Hmaterid鍊硷紝璁剧疆鐗╂枡杩囨护
- sWhere += " and HMaterID = " + HMaterID;
+ //浠庡埆鐨勯〉闈㈡墦寮�浼犲叆Hmaterid鍊硷紝璁剧疆鐗╂枡杩囨护,鏈叧闂�
+ sWhere += " and HMaterID = " + HMaterID + " and 鍏抽棴浜�=''''";
} else {
//涓嶆槸浠庡埆鐨勯〉闈㈡墦寮�
var HMaterID2 = $("#HMaterID").val();
@@ -924,27 +930,21 @@
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++) {
+ col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+ for (var i = 0; i < data.length; i++) {//閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
// if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
- if ($.inArray(data[i].name, titleData) > -1) {
+ if ($.inArray(data[i].name, titleData) > -1) {//妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑 //璁$畻鍒�
col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
- }
- else {
+ } else if (data[i].name == '鍗曟嵁鍙�') {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '鍗曟嵁鍙�' });
+ } else {
switch (data[i].Type) {
//int
- case 'long':
- case 'Int32':
- case 'Int64':
- case 'double':
- case 'Decimal':
- col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120, totalRow: true });
- break;
case 'DateTime':
- col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
+ 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: false, width: 120 });
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
}
}
}
@@ -952,8 +952,30 @@
option.cols = [col];
option.data = data1.data;
-
+ //璁剧疆鍒楄〃鍚屼竴涓崟鎹彧鏈夌涓�鏉℃暟鎹樉绀轰富琛ㄤ俊鎭紝鍏跺畠璁板綍鍙樉绀哄瓙琛ㄤ俊鎭�
+ //鑾峰彇瀛愯〃鍒楁暟鎹�
+ var colList = [];
+ for (var i = 0; i < option.cols[0].length; i++) {
+ colList.push(option.cols[0][i].field);
+ }
+ //璁剧疆鏁版嵁
+ var result = data1.data;
+ var temp = "";
+ for (var i = 0; i < result.length; i++) {
+ if (temp != result[i]["鍗曟嵁鍙�"]) {
+ temp = result[i]["鍗曟嵁鍙�"];
+ } else {
+ var initIndex = $.inArray("鍗曟嵁鍙�", colList);
+ var lastIndex = $.inArray("hsubid", colList);
+ for (var j = initIndex; j < lastIndex; j++) {
+ var fieldName = colList[j];
+ result[i][fieldName] = "";
+ }
+ }
+ }
+ option.data = result;
laypage.render(optionPage);
+
//鍒锋柊琛ㄦ牸鏁版嵁
DisPlay_HideColumn();
@@ -1211,6 +1233,64 @@
}
}
+ //#region 鍏抽棴鍏跺畠
+ function set_closeOtherRoute() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var hmainid = data[0].hmainid.toString();
+ var HName = data[0]["宸ヨ壓鍚嶇О"].toString();
+ var HMaterID = data[0]["HMaterID"].toString();
+ layer.open({
+ type: 2
+ , area: ['70%', '70%']
+ , title: '浼氬叧闂殑鍗曟嵁鍒楄〃璇风‘璁�'
+ , closeBtn: 1
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../../璁″垝绠$悊/宸ヨ壓璺嚎/Gy_RoutingBillCloseList.html?HMaterID=' + HMaterID + '&HProID=' + 0 + '&HName=' + HName + '&HInterID=' + hmainid
+ , resize: false
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ $.ajax({
+ url: GetWEBURL() + '/Gy_Routing/CloseOther',
+ type: "GET",
+ data: { "HInterID": hmainid, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { icon: 1 });
+ layer.close(index);
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(index);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+
+ }
+ });
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ ,end: function () {
+ ////淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ //if (get_needClose_Bar == 0) {
+ $("#btnSearch").trigger('click');
+ //} else if (get_needClose_Bar == 1) {
+ // $("#get_needClose").trigger('click');
+ //}
+ }
+ , cancel: function () {
+
+ }
+ })
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹煡鐪嬶紒');
+ }
+ }
+ //#endregion
+
//瀹℃牳 [1 瀹℃牳銆�2 鍙嶅鏍竇
function set_CheckBill(num) {
var checkStatus = table.checkStatus('mainTable')
@@ -1335,6 +1415,17 @@
url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
success: function (result) {
+ var data = option.data
+ data.forEach((item) => {
+ for (let itemobj in item) {
+ if (item[itemobj] == null) {
+ item[itemobj] = "";
+ }
+ if (item[itemobj].length > 0) { // 鍋囪瀛楁鍚嶄负field
+ item[itemobj] = item[itemobj].toString().replace(/[\r\n]+/g, ''); // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓�
+ }
+ }
+ });
if (result.count == 1) {
table.exportFile(ins.config.id, option.data, "xls");
} else {
@@ -1711,9 +1802,9 @@
}
}
}
- table.render(option);
+ ins=table.render(option);
} else {
- table.render(option);
+ ins=table.render(option);
}
var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
Display_HideButton(btns, "3301", HModName, sessionStorage["HUserName"]);
--
Gitblit v1.9.1