From c8b97e23a06f57261ebf3149d3c00b04aeb3020a Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 06 三月 2023 09:09:34 +0800
Subject: [PATCH] 工序返工记录单
---
WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill.html | 2
WebTM/views/车间管理/工序流转卡/Sc_ProcExchWorkBackBillList.html | 17
WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBillList.html | 41 +
WebTM/views/车间管理/工序流转卡/Sc_ProcExchWorkBackBillEdit.html | 10
WebTM/views/index.html | 3
WebTM/views/车间管理/工序流转卡/Sc_ProcExchRecordBackBillEdit.html | 986 ++++++++++++++++++++++++++++++++++
WebTM/views/车间管理/工序流转卡/Sc_ProcExchRecordBackBillList.html | 664 ++++++++++++++++++++++
WebTM/WebTM.csproj | 2
8 files changed, 1,699 insertions(+), 26 deletions(-)
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 9796b3a..50f1bea 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -176,6 +176,8 @@
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_MaterType.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_MaterTypeEdit.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Gy_SourceList.aspx" />
+ <Content Include="views\杞﹂棿绠$悊\宸ュ簭娴佽浆鍗Sc_ProcExchRecordBackBillList.html" />
+ <Content Include="views\杞﹂棿绠$悊\宸ュ簭娴佽浆鍗Sc_ProcExchRecordBackBillEdit.html" />
<Content Include="views\杞﹂棿绠$悊\宸ュ簭娴佽浆鍗WindowPrint.html" />
<Content Include="views\浠撳瓨绠$悊\浠撳簱璋冩嫧\Kf_MoveStockBill_CheckList_New.html" />
<Content Include="views\浠撳瓨绠$悊\浠撳簱璋冩嫧\Kf_MoveStockBill_Check_New.html" />
diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index 6326fda..5e51ee8 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -448,7 +448,8 @@
<dd><a lay-href="杞﹂棿绠$悊/宸ュ簭娴佽浆鍗�/Sc_ProcessExchangeBillList.html">宸ュ簭娴佽浆鍗$淮鎶�</a></dd>
<dd><a lay-href="杞﹂棿绠$悊/宸ュ簭娴佽浆鍗�/Sc_ProcessExchangeIssueBillList.html">宸ュ簭娴佽浆鍗★紙涓嬭揪锛�</a></dd>
<dd><a lay-href="杞﹂棿绠$悊/宸ュ簭娴佽浆鍗�/Sc_ProcExchWorkBackBillList.html">宸ュ簭杩斿伐鐢宠鍒楄〃</a></dd>
- <!--<dd><a lay-href="杞﹂棿绠$悊/宸ュ簭娴佽浆鍗�/Sc_ProcExchWorkBackBillEdit.html">宸ュ簭杩斿伐鐢宠</a></dd>-->
+ <dd><a lay-href="杞﹂棿绠$悊/宸ュ簭娴佽浆鍗�/Sc_ProcExchRecordBackBillList.html">宸ュ簭杩斿伐璁板綍鍗�</a></dd>
+ <dd><a lay-href="杞﹂棿绠$悊/宸ュ簭娴佽浆鍗�/Sc_ProcExchRecordBackBillEdit.html">宸ュ簭杩斿伐璁板綍鍗曠紪杈�</a></dd>
<dd><a lay-href="">宸ュ簭濮斿宸ュ崟n</a></dd>
<dd><a lay-href="">宸ュ簭濮斿宸ュ崟缁存姢n</a></dd>
<dd><a lay-href="杞﹂棿绠$悊/宸ュ簭杩涚珯鎺ユ敹鍗�/Cj_StationInBill.html">宸ュ簭杩涚珯鎺ユ敹鍗�</a></dd>
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
index 501ced8..d0e9e4c 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
@@ -50,7 +50,7 @@
<div class="layui-form-item" style="padding-top: 10px;">
<div class="layui-row">
<div class="layui-col-xs4 layui-inline">
- <h2>宸ュ簭鍑虹珯鎺ユ敹鍗�</h2>
+ <h2>宸ュ簭鍑虹珯姹囨姤鍗�</h2>
</div>
<div class="layui-col-xs4 layui-inline">
<label class="layui-form-label"><span style="color:red;">*</span>鏉″舰鐮�</label>
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchRecordBackBillEdit.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchRecordBackBillEdit.html"
new file mode 100644
index 0000000..4f7693c
--- /dev/null
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchRecordBackBillEdit.html"
@@ -0,0 +1,986 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>宸ュ簭杩斿伐璁板綍缂栬緫</title>
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/layui/layui.js"></script>
+ <script src="../../../layuiadmin/Scripts/json2.js"></script>
+ <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+ <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+ <script src="../../../layuiadmin/PubCustom.js"></script>
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <style>
+ .main-btn { /*澶撮儴涓绘寜閽�*/
+ padding: 0 2px; /*璋冩暣鎸夐挳宸﹀彸绌洪殭澶у皬*/
+ height: 30px;
+ line-height: 30px;
+ }
+
+ .btn-title {
+ font-size: 16px;
+ }
+ /* 闃叉涓嬫媺妗嗙殑涓嬫媺鍒楄〃琚殣钘�---蹇呴』璁剧疆--- */
+ .layui-table-cell {
+ overflow: visible !important;
+ }
+ /* 浣垮緱涓嬫媺妗嗕笌鍗曞厓鏍煎垰濂藉悎閫� */
+ td .layui-form-select {
+ margin-top: -10px;
+ margin-left: -15px;
+ margin-right: -15px;
+ }
+
+ .layui-form-item .layui-inline {
+ margin-top: 5px;
+ margin-bottom: 5px;
+ margin-right: 0px;
+ }
+
+ .layui-form-label {
+ width: 25%;
+ }
+ </style>
+</head>
+<body>
+ <div class="layui-fluid" style="padding: 0;">
+ <div class="layui-card" style="padding: 15px;">
+ <div class="layui-card-body" style="padding: 1px;">
+ <form class="layui-form" lay-filter="component-form-group" action="">
+ <div class="layui-card-header">
+ <div class="layui-btn-group">
+ <button type="button" id="btnSave" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btnSave">淇濆瓨</button>
+ <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">閫�鍑�</button>
+ <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn_print">鎵撳嵃</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">闅愯棌鍒楄缃�</button>
+ </div>
+ </div>
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
+ <ul class="layui-tab-title" lay-filter="tab-all">
+ <li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
+ <li lay-id="2" style="padding:1px;">鍏朵粬淇℃伅</li>
+ </ul>
+ <div class="layui-tab-content">
+ <!--鍩烘湰淇℃伅-->
+ <div class="layui-tab-item layui-show">
+ <div class="layui-form-item" style="padding-top: 10px;">
+ <div class="layui-row">
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">鍗曟嵁鍙�</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HInterID" id="HInterID" value="0">
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">鏃ユ湡</label>
+ <div class="layui-input-inline">
+ <input type="date" class="layui-input" name="HDate" id="HDate">
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">璐熻矗浜�</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HEmpName" id="HEmpName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
+ <input type="hidden" name="HEmpID" id="HEmpID" value="0">
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHEmpID" id="btnHEmpID" style="width: 40px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+ </button>
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">娴佽浆鍗�</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HProcExchInterID" id="HProcExchInterID" value="0">
+ <input type="hidden" name="HProcExchEntryID" id="HProcExchEntryID" value="0">
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">鐢熶骇杞﹂棿</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HWorkShopName" id="HWorkShopName" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HWorkShopID" id="HWorkShopID" value="0">
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">鐗╂枡浠g爜</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HMaterID" id="HMaterID" value="0">
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">鐗╂枡鍚嶇О</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">瑙勬牸鍨嬪彿</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HModel" id="HModel" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">璁¢噺鍗曚綅</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HUnitName" id="HUnitName" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HUnitID" id="HUnitID" value="0">
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">璁㈠崟鏁伴噺</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HPlanQty" id="HPlanQty" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">杩斿伐鏁伴噺</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HQty" id="HQty" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">寮�濮嬪伐搴�</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HProcBegName" id="HProcBegName" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HProcBegID" id="HProcBegID" value="0">
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">缁撴潫宸ュ簭</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HProcEndName" id="HProcEndName" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HProcEndID" id="HProcEndID" value="0">
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">寮�濮嬫祦姘村彿</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HProcExchBegNO" id="HProcExchBegNO" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">缁撴潫娴佹按鍙�</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HProcExchEndNO" id="HProcExchEndNO" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">鐢熶骇缁勭粐</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HPRDORGName" id="HPRDORGName" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HPRDORGID" id="HPRDORGID" lay-verify="HPRDORGID"><!--HSTOCKORGID-->
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">鐢熶骇璁㈠崟</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HICMOInterID" id="HICMOInterID" lay-verify="HICMOInterID">
+ <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" lay-verify="HICMOEntryID">
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">璁㈠崟璺熻釜鍙�</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">鍐呴儴鍗曟嵁鍙�</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HInnerBillNo" id="HInnerBillNo">
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs6 layui-inline">
+ <label class="layui-form-label" style="width:12.5%">澶囨敞</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="width:610px;">
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!--鍏朵粬淇℃伅-->
+ <div class="layui-tab-item">
+ <div class="layui-form-item">
+ <div class="layui-row">
+ <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="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
+ </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="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
+ </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="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <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="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
+ </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="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
+ </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="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <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="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly>
+ </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="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <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="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
+ </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="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script type="text/html" id="barDemo">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+</script>
+<!--琛屼笅鎷夐�夋嫨(鏄惁濮斿)-->
+<script type="text/html" id="HSupFlag">
+ <select name="HSupFlag" lay-filter="HSupFlag" id="HSupFlag{{d.LAY_TABLE_INDEX+1}}">
+ <option value="false">鍚�</option>
+ <option value="true">鏄�</option>
+ </select>
+</script>
+<script>
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+ //#region 鍏叡鍙橀噺
+
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , laydate = layui.laydate
+ , element = layui.element;
+ var option;
+
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+ var params = get_UrlVars();
+ if (typeof (params[params[0]]) == "undefined") {
+ var OperationType = -1;//鎿嶄綔绫诲瀷
+ } else {
+ var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
+ var linterid = params[params[1]];//婧愬崟id
+ var HEntryID = params[params[2]];//婧愬崟瀛恑d
+ }
+
+ //宸ュ簭杩斿伐鏂板
+ if (OperationType == 1) {
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetMAXNum",
+ type: "GET",
+ data: { "HBillType": '3797' },
+ success: function (d) {
+ $("#HInterID").val(d.data[0].HInterID);
+ $("#HBillNo").val(d.data[0].HBillNo);
+ $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));
+ $("#HMaker").val(sessionStorage["HUserName"]);
+ }
+ });
+
+ //鏌ヨ宸ュ簭娴佽浆鍗�
+ get_ProcessExchange();
+ } else if (OperationType == 3) {
+ RoadBillMain(linterid);
+ }
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //閫夋嫨璐熻矗浜�
+ form.on('submit(btnHEmpID)', function () {
+ get_btnHEmpID();
+ });
+
+ //琛岄�夋嫨澶勭悊锛堟槸鍚﹀澶栵級
+ form.on('select(HSupFlag)', function (data) {
+ //鑾峰彇涓嬫媺妗嗛�変腑鐨勫��
+ var elem = data.othis.parents('tr');
+ var dataindex = elem.attr("data-index");
+ $.each(option.data, function (index, value) {
+ if (value.LAY_TABLE_INDEX == dataindex) {
+ value.HSupFlag = data.value;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+
+ //澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable)', function (obj) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ //鏂板琛岃〃鏍兼暟鎹�
+ var NewRow = {
+ "HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
+ "HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
+ "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
+ "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
+ "HQty": 0, "HRemark": ""
+ };
+ switch (obj.event) {
+ case 'btn-AddLine':
+ table.cache["mainTable"].push(NewRow);
+ option.data = table.cache["mainTable"];
+ table.render(option);
+ for (var i = 1; i <= option.data.length; i++) {
+ $('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true);
+ }
+ form.render('select');
+ break;
+ case 'btn-CopyLine':
+ var copydata = JSON.stringify(data);
+ if (data.length <= 0) {
+ layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+ }
+ else if (data.length > 1) {
+ layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+ }
+ else {
+ var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+ var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+ table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+ option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+ for (var i = 1; i <= option.data.length; i++) {
+ $('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true);
+ }
+ form.render('select');
+ }
+ break;
+ }
+ });
+
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ var data = obj.data;
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+ if (rowIndex === '0') {
+ layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else {
+ obj.del();
+ option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+ layer.close(index);
+ }
+ });
+ }
+
+ $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+ if (event.key == "F7") {
+ if (obj.event == 'HProcCheck') {
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '宸ュ簭鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ maxmin: true,
+ content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_ProcList.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index];
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ obj.update({
+ HProcName: checkStatus.data[0].宸ュ簭
+ , HProcID: checkStatus.data[0].HItemID
+ , HProcNumber: checkStatus.data[0].宸ュ簭浠g爜
+ });
+
+ layer.close(layer.index);
+ }
+ , btn2: function (index, layero) {
+ },
+ end: function () {
+
+ }
+ });
+ }
+ if (obj.event === 'HWorkCenterCheck') {//宸ヤ綔涓績
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鍔犲伐涓績鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ maxmin: true,
+ content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WorkCenterList.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index];
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ obj.update({
+ HCenterName: checkStatus.data[0].宸ヤ綔涓績
+ , HCenterID: checkStatus.data[0].HItemID
+ , HCenterNumber: checkStatus.data[0].宸ヤ綔涓績浠g爜
+ });
+ layer.close(layer.index);
+ }
+ , btn2: function (index, layero) {
+ },
+ end: function () {
+
+ }
+ });
+ }
+ if (obj.event === 'HSupCheck') {//渚涘簲鍟�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '渚涘簲鍟嗗垪琛�',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ maxmin: true,
+ content: ['../../../../views/鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index];
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ obj.update({
+ HSupName: checkStatus.data[0].渚涘簲鍟嗗悕绉�
+ , HSupID: checkStatus.data[0].HItemID
+ , HSupNumber: checkStatus.data[0].渚涘簲鍟嗕唬鐮�
+ });
+ layer.close(layer.index);
+ }
+ , btn2: function (index, layero) {
+ },
+ end: function () {
+
+ }
+ });
+ }
+ if (obj.event === 'HDeptCheck') {//閮ㄩ棬
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '閮ㄩ棬鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ maxmin: true,
+ content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index];
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ obj.update({
+ HDeptName: checkStatus.data[0].HName
+ , HDeptID: checkStatus.data[0].HItemID
+ , HDeptNumber: checkStatus.data[0].HNumber
+ });
+ layer.close(layer.index);
+ }
+ , btn2: function (index, layero) {
+ },
+ end: function () {
+
+ }
+ });
+ }
+ obj.event = "";
+ return false;
+ }
+ })
+ //鍗曞嚮鏀瑰彉涓嶅彲缂栬緫鍊�
+ if (obj.event === 'isEditCheck') {
+ var flag = obj.data.isEdit;
+ var flagValue = obj.data.isEditValue;
+ if (flagValue === "false") {
+ flagValue = "true";
+ flag = "鏄�";
+ }
+ else if (flagValue === "true") {
+ flagValue = "false";
+ flag = "鍚�";
+ }
+ else {
+ flagValue = "false";
+ flag = "鍚�";
+ }
+ obj.update({
+ isEdit: flag
+ , isEditValue: flagValue
+ });
+ }
+ });
+
+ //淇濆瓨鎻愪氦
+ form.on('submit(btnSave)', function (data) {//鎻愪氦
+ if (AllowLoadData(data)) {
+ set_AddNew(data);
+ }
+ });
+
+ //閫�鍑�
+ form.on('submit(Cancel)', function (data) {
+ if (OperationType != "") {
+ Pub_Close(1);
+ }
+ });
+
+ //鎵撳嵃
+ form.on('submit(btn_print)', function (data) {
+ btn_print();
+ });
+
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+ // 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ $("#HDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//寮�濮嬫棩鏈�
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ }
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ //琛ㄥご
+ columns = [ //琛ㄥご
+ { type: 'checkbox', totalRowText: '鍚堣琛�' }
+ , { type: 'numbers', title: '搴忓彿', totalRow: true }
+ , { field: 'HProcNo', title: '娴佹按鍙�', edit: 'text' }
+ , { field: 'HProcID', title: '宸ュ簭ID', hide: true }
+ , { field: 'HProcNumber', title: '宸ュ簭浠g爜', edit: 'text', event: "HProcCheck" }
+ , { field: 'HProcName', title: '宸ュ簭鍚嶇О' }
+ , { field: 'HWorkRemark', title: '鍔犲伐璇存槑', edit: 'text' }
+ , { field: 'HCenterID', title: '宸ヤ綔涓績ID', hide: true }
+ , { field: 'HCenterNumber', title: '宸ヤ綔涓績浠g爜', edit: 'text', event: "HWorkCenterCheck" }
+ , { field: 'HCenterName', title: '宸ヤ綔涓績鍚嶇О' }
+ , { field: 'HQty', title: '杩斿伐鏁伴噺', edit: 'text' }
+ , { field: 'HDeptID', title: '閮ㄩ棬ID', hide: true }
+ , { field: 'HDeptNumber', title: '閮ㄩ棬浠g爜', edit: 'text', event: "HDeptCheck" }
+ , { field: 'HDeptName', title: '閮ㄩ棬' }
+ , { field: 'HSupID', title: '渚涘簲鍟咺D', hide: true }
+ , { field: 'HSupNumber', title: '渚涘簲鍟嗕唬鐮�', edit: 'text', event: "HSupCheck" }
+ , { field: 'HSupName', title: '渚涘簲鍟�' }
+ , { field: 'HSupFlag', title: '鏄惁濮斿', templet: '#HSupFlag' }
+ , { field: 'HRemark', title: '澶囨敞', edit: 'text',width:"300" }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+ ];
+ option = {
+ id: 'mainTable'
+ , elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , page: false
+ , cellMinWidth: 120
+ , height: 350
+ , cols: [columns]
+ , limit: Number.MAX_VALUE//榛樿鏄剧ず鍏ㄩ儴
+ , done: function (res, curr, count) {
+ option.data = res.data;
+ //鍘绘帀涓嬫媺妗嗗け鐒︿簨浠跺惁鍒欏湪涓嬫媺妗嗛噷杈撳叆鍊�
+ $('.layui-form-select').find('input').unbind("blur");
+ //琛ㄦ牸閲嶈浇鍥炴樉涓嬫媺妗嗛噷鐨勬暟鎹�
+ $('tr').each(function (e) {
+ var $cr = $(this);
+ var dataIndex = $cr.attr("data-index");
+ $.each(option.data, function (index, value) {
+ if (value.LAY_TNDEX == dataIndex) {
+ $cr.find('input').val(value.HSupFlag);
+ }
+ });
+ });
+ }
+ , done: function (res, curr, count) {
+
+ }
+ };
+ option.data = [{
+ "HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
+ "HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
+ "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
+ "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
+ "HQty": 0, "HRemark": ""
+ }];
+ table.render(option);
+
+ }
+
+ //璐熻矗浜�
+ function get_btnHEmpID() {
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '鑱屽憳琛�'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.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('璇烽�夋嫨鏁版嵁');
+ }
+ //鑾峰彇鏁版嵁
+ $("#HEmpID").val(checkStatus.data[0].HItemID);//璐熻矗浜篿d
+ $("#HEmpName").val(checkStatus.data[0].鑱屽憳鍚嶇О);//璐熻矗浜哄悕绉�
+
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ })
+ }
+
+ //鏌ヨ宸ュ簭娴佽浆鍗�
+ function get_ProcessExchange() {
+ var sWhere = " where hmainid=" + linterid + " and (HEntryID=" + HEntryID + " or HEntryID>" + HEntryID + ") ";
+ //缂栬緫鍔犺浇鏁版嵁
+ $.ajax({
+ url: GetWEBURL() + 'Sc_ProcExchRecordBackBill/GetProcessExchangeBillSub',
+ type: "GET",
+ data: { "sWhere": sWhere },
+ success: function (result) {
+ if (result.count == 1) {
+ $("#HProcExchBillNo").val(result.data[0]["鍗曟嵁鍙�"]);
+ $("#HProcExchInterID").val(result.data[0]["hmainid"]);
+ $("#HProcExchEntryID").val(result.data[0]["hsubid"]);
+ $("#HWorkShopID").val(result.data[0]["HWorkShopID"]);
+ $("#HWorkShopName").val(result.data[0]["鐢熶骇杞﹂棿"]);
+ $("#HMaterNumber").val(result.data[0]["浜у搧浠g爜"]);
+ $("#HMaterID").val(result.data[0]["HMaterID"]);
+ $("#HMaterName").val(result.data[0]["浜у搧鍚嶇О"]);
+ $("#HModel").val(result.data[0]["瑙勬牸鍨嬪彿"]);
+ $("#HUnitID").val(result.data[0]["HUnitID"]);
+ $("#HUnitName").val(result.data[0]["鍗曚綅"]);
+ $("#HPlanQty").val(result.data[0]["鐢熶骇鏁伴噺"]);
+ $("#HQty").val(result.data[0]["璁″垝鏁伴噺"]);
+ $("#HProcBegName").val(result.data[0]["宸ュ簭鍚嶇О"]);
+ $("#HProcBegID").val(result.data[0]["HProcID"]);
+ $("#HProcEndName").val(result.data[1]["宸ュ簭鍚嶇О"]);
+ $("#HProcEndID").val(result.data[1]["HProcID"]);
+ $("#HProcExchBegNO").val(result.data[0]["娴佹按鍙�"]);
+ $("#HProcExchEndNO").val(result.data[1]["娴佹按鍙�"]);
+ $("#HPRDORGID").val(result.data[0]["HPRDORGID"]);
+ $("#HPRDORGName").val(result.data[0]["缁勭粐"]);
+ $("#HICMOBillNo").val(result.data[0]["浠诲姟鍗曞彿"]);
+ $("#HICMOInterID").val(result.data[0]["hicmointerid"]);
+ $("#HICMOEntryID").val(result.data[0]["HICMOEntryID"]);
+ $("#HOrderProcNO").val(result.data[0]["HOrderProcNO"]);
+ } else {
+ layer.msg(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(index0);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+
+ }
+
+ //闈炵┖楠岃瘉
+ function AllowLoadData(data) {
+
+ if ($("#HEmpID").val()=="0") {
+ layer.msg("璇烽�夋嫨璐熻矗浜�!");
+ return false;
+ }
+
+ var num = [];
+ var num_2 = [];
+ for (var i = 0; i < option.data.length; i++) {
+ if (option.data[i] != "") {
+ if (!option.data[i].HProcNo) {
+ var indexRow = i + 1;
+ layer.msg("绗�" + indexRow + "琛岋紝娴佹按鍙蜂笉鑳戒负绌猴紒");
+ return;
+ }
+ if (option.data[i].HProcNo == 0) {
+ var indexRow = i + 1;
+ layer.msg("绗�" + indexRow + "琛岋紝娴佹按鍙蜂笉鑳戒负0锛�");
+ return;
+ }
+ if (!option.data[i].HProcID) {
+ var indexRow = i + 1;
+ layer.msg("绗�" + indexRow + "琛岋紝宸ュ簭涓嶈兘涓虹┖锛�");
+ return;
+ }
+ if (!option.data[i].HCenterID) {
+ var indexRow = i + 1;
+ layer.msg("绗�" + indexRow + "琛岋紝宸ヤ綔涓績涓嶈兘涓虹┖锛�");
+ return;
+ }
+
+ if (parseInt(option.data[i].HQty) > parseInt($("#HQty").val())) {
+ var indexRow = i + 1;
+ layer.msg("绗�" + indexRow + "琛岋紝杩斿伐鏁伴噺瓒呭嚭闇�瑕佽繑宸ユ暟閲忥紒");
+ return;
+ }
+
+ //娴佹按鍙�
+ if ($.inArray(option.data[i]["HProcNo"], num) == -1) {
+ num.push(option.data[i]["HProcNo"]);
+ }
+ else {
+ layer.msg("绗�" + (i + 1) + "琛�,娴佹按鍙�:" + option.data[i]["HProcNo"] + "閲嶅!");
+ return false;
+ }
+
+ if (parseInt(option.data[i].HProcNo) < parseInt($("#HProcExchBegNO").val())) {
+ var indexRow = i + 1;
+ layer.msg("绗�" + indexRow + "琛岋紝娴佹按鍙峰皬浜庡紑濮嬫祦姘村彿锛�");
+ return;
+ }
+
+ if (parseInt(option.data[i].HProcNo) > parseInt($("#HProcExchEndNO").val())) {
+ var indexRow = i + 1;
+ layer.msg("绗�" + indexRow + "琛岋紝娴佹按鍙峰ぇ浜庣粨鏉熸祦姘村彿锛�");
+ return;
+ }
+
+
+ //宸ュ簭
+ if ($.inArray(option.data[i]["HProcName"], num_2) == -1) {
+ num_2.push(option.data[i]["HProcName"]);
+ }
+ else {
+ layer.msg("绗�" + (i + 1) + "琛�,宸ュ簭:" + option.data[i]["HProcName"] + "閲嶅!");
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ //淇濆瓨HMaker
+ function set_AddNew(data) {
+
+ var num_1 = [];
+ for (var i = 0; i < table.cache["mainTable"].length; i++) {
+ if (table.cache["mainTable"][i] != "") {
+ table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
+ num_1.push(table.cache["mainTable"][i])
+ }
+ }
+
+ var sMainStr = JSON.stringify(data.field);
+ var sSubStr = JSON.stringify(num_1);
+ var sMainSub = sMainStr + ';' + sSubStr +';' + OperationType + ";" + sessionStorage["HUserName"];
+
+ var index = layer.load();
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Sc_ProcExchRecordBackBill/Sc_ProcExchRecordBackBillAddBill",
+ async: true,
+ data: { "sMainSub": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) {
+ $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);
+ layer.close(index);
+ layer.msg("鎻愪氦鎴愬姛");
+ }
+ else {
+ layer.close(index);
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
+
+ //缂栬緫 椤甸潰璧嬪��
+ function RoadBillMain(linterid)//鍔犺浇琛ㄥご
+ {
+ var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and hmainid=" + linterid;
+ $.ajax({
+ url: GetWEBURL() + "/Sc_ProcExchRecordBackBill/Sc_ProcExchRecordBackBillList",
+ type: "GET",
+ async: false,
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (d) {
+ if (d.count == 1) {
+ //涓昏〃
+ $("#HBillNo").val(d.data[0]["鍗曟嵁鍙�"]);
+ $("#HInterID").val(d.data[0]["hmainid"]);
+ $("#HDate").val(Format(d.data[0]["鏃ユ湡"], "yyyy-MM-dd"));
+ $("#HEmpName").val(d.data[0]["璐熻矗浜�"]);
+ $("#HEmpID").val(d.data[0]["HEmpID"]);
+ $("#HProcExchBillNo").val(d.data[0]["娴佽浆鍗″彿"]);
+ $("#HProcExchInterID").val(d.data[0]["娴佽浆鍗′富鍐呯爜"]);
+ $("#HProcExchEntryID").val(d.data[0]["娴佽浆鍗″瓙鍐呯爜"]);
+ $("#HWorkShopID").val(d.data[0]["HWorkShopID"]);
+ $("#HWorkShopName").val(d.data[0]["鐢熶骇杞﹂棿"]);
+ $("#HMaterNumber").val(d.data[0]["浜у搧浠g爜"]);
+ $("#HMaterID").val(d.data[0]["HMaterID"]);
+ $("#HMaterName").val(d.data[0]["浜у搧鍚嶇О"]);
+ $("#HModel").val(d.data[0]["瑙勬牸鍨嬪彿"]);
+ $("#HUnitID").val(d.data[0]["HUnitID"]);
+ $("#HUnitName").val(d.data[0]["鍗曚綅"]);
+ $("#HPlanQty").val(d.data[0]["璁㈠崟鏁伴噺"]);
+ $("#HQty").val(d.data[0]["杩斿伐鏁伴噺"]);
+ $("#HProcBegName").val(d.data[0]["杩斿伐寮�濮嬪伐搴�"]);
+ $("#HProcBegID").val(d.data[0]["HProcBegID"]);
+ $("#HProcEndName").val(d.data[0]["杩斿伐缁撴潫宸ュ簭"]);
+ $("#HProcEndID").val(d.data[0]["HProcEndID"]);
+ $("#HProcExchBegNO").val(d.data[0]["杩斿伐寮�濮嬫祦姘村彿"]);
+ $("#HProcExchEndNO").val(d.data[0]["杩斿伐缁撴潫娴佹按鍙�"]);
+ $("#HPRDORGID").val(d.data[0]["HPRDORGID"]);
+ $("#HPRDORGName").val(d.data[0]["缁勭粐"]);
+ $("#HICMOBillNo").val(d.data[0]["鐢熶骇璁㈠崟鍙�"]);
+ $("#HICMOInterID").val(d.data[0]["HICMOInterID"]);
+ $("#HICMOEntryID").val(d.data[0]["HICMOEntryID"]);
+ $("#HOrderProcNO").val(d.data[0]["璁㈠崟璺熻釜鍙�"]);
+ $("#HInnerBillNo").val(d.data[0]["鍐呴儴鍗曟嵁鍙�"]);
+ $("#HRemark").val(d.data[0]["琛ㄥご澶囨敞"]);
+ $("#HMakeDate").val(d.data[0]["鍒跺崟浜�"]==""?"":Format(d.data[0]["鍒跺崟鏃ユ湡"], "yyyy-MM-dd"));
+ $("#HMaker").val(d.data[0]["鍒跺崟浜�"]);
+ $("#HCheckDate").val(d.data[0]["瀹℃牳浜�"] == "" ? "" :Format(d.data[0]["瀹℃牳鏃ユ湡"], "yyyy-MM-dd"));
+ $("#HChecker").val(d.data[0]["瀹℃牳浜�"]);
+ $("#HCloseDate").val(d.data[0]["鍏抽棴浜�"] == "" ? "" :Format(d.data[0]["鍏抽棴鏃ユ湡"], "yyyy-MM-dd"));
+ $("#HCloseMan").val(d.data[0]["鍏抽棴浜�"]);
+ $("#HUpDateDate").val(d.data[0]["淇敼浜�"] == "" ? "" :Format(d.data[0]["淇敼鏃ユ湡"], "yyyy-MM-dd"));
+ $("#HUpDater").val(d.data[0]["淇敼浜�"]);
+ $("#HDeleteDate").val(d.data[0]["浣滃簾浜�"] == "" ? "" :Format(d.data[0]["浣滃簾鏃ユ湡"], "yyyy-MM-dd"));
+ $("#HDeleteMan").val(d.data[0]["浣滃簾浜�"]);
+
+ var rowdata = [];
+ for (var i = 0; i < d.data.length; i++) {
+ //瀛愯〃 璧嬪��
+ rowdata.push({
+ "HProcNo": d.data[i]["娴佹按鍙�"], "HProcID": d.data[i]["HProcID"], "HProcNumber": d.data[i]["宸ュ簭浠g爜"], "HProcName": d.data[i]["宸ュ簭"], "HWorkRemark": d.data[i]["鍔犲伐璇存槑"],
+ "HCenterID": d.data[i]["HCenterID"], "HCenterNumber": d.data[i]["宸ヤ綔涓績浠g爜"], "HCenterName": d.data[i]["宸ヤ綔涓績"],
+ "HDeptID": d.data[i]["HDeptID"], "HDeptNumber": d.data[i]["鍔犲伐杞﹂棿浠g爜"], "HDeptName": d.data[i]["鍔犲伐杞﹂棿"],
+ "HSupID": d.data[i]["HSupID"], "HSupNumber": d.data[i]["渚涘簲鍟嗕唬鐮�"], "HSupName": d.data[i]["渚涘簲鍟�"], "HSupFlag": d.data[i]["濮斿鏍囪"] == 1 ? true : false,
+ "HQty": d.data[i]["瀛愯繑宸ユ暟閲�"], "HRemark": d.data[i]["琛ㄤ綋澶囨敞"]
+ });
+ }
+ option.data = rowdata;
+ table.render(option);
+
+ for (var i = 0; i < d.data.length; i++) {
+ //濮斿鏍囪
+ $('#HSupFlag' + (i + 1)).find("option[value='" + d.data[i].濮斿鏍囪 + "']").attr("selected", true);
+ }
+ form.render('select');
+ } else {
+ layer.msg(result.code + result.Message, { icon: 5 });
+ }
+ }
+ })
+ }
+
+ //鎵撳嵃
+ function btn_print() {
+
+ }
+
+ function get_UrlVars() {
+ 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;
+ }
+
+ //#endregion
+ })
+</script>
\ No newline at end of file
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchRecordBackBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchRecordBackBillList.html"
new file mode 100644
index 0000000..593d2a3
--- /dev/null
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchRecordBackBillList.html"
@@ -0,0 +1,664 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>宸ュ簭杩斿伐璁板綍鍒楄〃</title>
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/layui/layui.js"></script>
+ <script src="../../../layuiadmin/Scripts/json2.js"></script>
+ <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+ <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+ <script src="../../../layuiadmin/PubCustom.js"></script>
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+</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="date" class="layui-input" id="HDate">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input" id="HDate1">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鍗曟嵁鍙�</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
+ </div>
+ </div>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+ <div class="layui-colla-content">
+ <div class="layui-row" style=" margin-bottom: 10px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">鐢熶骇杞﹂棿</label>
+ <div class="layui-input-block">
+ <select name="HDeptName" id="HDeptName" lay-verify="required" lay-search class="layui-input">
+ <!--鍔ㄦ�佹覆鏌撹溅闂�-->
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鐗╂枡缂栫爜</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HMaterName" id="HMaterName">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">娴佽浆鍗″彿</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo">
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <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_Edit"><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="set_CheckBill"><i class="layui-icon layui-icon-delete"></i>瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck"><i class="layui-icon layui-icon-delete"></i>鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_print"><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="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script>
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index', //涓诲叆鍙fā鍧�
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], 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
+ var sWhere = "";
+ var titleData = ["hmainid", "HICMOInterID", "HWorkShopID", "HUnitID", "HPRDORGID", "HCenterID", "HProcID", "HDeptID","HEmpID"];
+ var option = [];
+ var HModName = "Sc_ProcExchRecordBackBillList";
+
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+ //澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable)', function (obj) {
+ switch (obj.event) {
+ //鏂板
+ case 'set_AddNew': set_AddNew();
+ break;
+ //缂栬緫
+ case 'set_Edit': set_Edit();
+ break;
+ //鍒犻櫎
+ case 'set_DeleteBill': set_DeleteBill();
+ break;
+ //瀹℃牳
+ case 'set_CheckBill': set_CheckBill();
+ break;
+ //鍙嶅鏍�
+ case 'set_AbandonCheck': set_AbandonCheck();
+ break;
+ //鎵撳嵃
+ case 'btn_print': btn_print();
+ break;
+ //鍒锋柊
+ case 'get_Refresh': get_Refresh();
+ break;
+ //閫�鍑烘寜閽�
+ case 'get_Exit': Pub_Close(2);
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
+ };
+ });
+
+ //閲嶇疆鎸夐挳
+ form.on('submit(btnReSearch)', function (data) {
+ set_ClearQuery();
+
+ });
+
+ //鏌ヨ鎸夐挳
+ form.on('submit(btnSearch)', function (data) {
+ get_FastQuery();
+ });
+
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ // 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//寮�濮嬫棩鏈�
+ $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));;//缁撴潫鏃ユ湡
+ //鏌ヨ
+ get_Display("");
+ //杞﹂棿鍒楄〃
+ getDept();
+ //鍒濆鍖栬〃鏍�
+ DisPlay_HideColumn();
+ }
+
+ //鑾峰彇杞﹂棿鍒楄〃
+ function getDept() {
+ var HDeptName = '<option value="0" style="color:red;" selected>鍏ㄩ儴杞﹂棿</option>';
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Sc_ICMOBill/GetHDeptList",
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ HDeptName += '<option style="color:blue;" value="' + data[i].HItemID + '">' + data[i].HName + '</option>';
+ }
+ $("#HDeptName").append(HDeptName);
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+
+ // 鏌ヨ
+ function get_Display(sWhere) {
+ sWhere += " and HPRDORGID=" + sessionStorage["OrganizationID"] + " ";
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Sc_ProcExchRecordBackBill/Sc_ProcExchRecordBackBillList',
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ layer.close(ajaxLoad);
+
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ if ($.inArray(data[i].name, titleData) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+ }
+ }
+ }
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 800
+ , page: true //寮�鍚垎椤�
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , cols: [col]
+ , data: data1.data
+ };
+ table.render(option);
+
+ if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+ ColFilter();
+ }
+ } else {
+ layer.close(ajaxLoad);
+ layer.msg(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+
+ }
+
+ // 蹇�熻繃婊�
+ function get_FastQuery() {
+ var HDate = $("#HDate").val();;//寮�濮嬫棩鏈�
+ var HDate1 = $("#HDate1").val();//缁撴潫鏃ユ湡
+ var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
+ var HMaterName = $("#HMaterName").val();//鐗╂枡
+ var HDeptName = $("#HDeptName").val();//杞﹂棿
+ var HProcExchBillNo = $("#HProcExchBillNo").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 (HDate) {
+ sWhere += " and 鏃ユ湡 >= '" + HDate + "'";
+ }
+ if (HDate1) {
+ sWhere += " and 鏃ユ湡 <= '" + HDate1 + "'";
+ }
+
+ if (HBillNo) {
+ sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
+ }
+ if (HMaterName) {
+ sWhere += " and 浜у搧浠g爜 like '%" + HMaterName + "%'";
+ }
+ if (HDeptName && HDeptName != "0") {
+ sWhere += " and HWorkShopID = '" + HDeptName + "'";
+ }
+ if (HProcExchBillNo) {
+ sWhere += " and 娴佽浆鍗″彿 = '" + HProcExchBillNo + "'";
+ }
+
+ get_Display(sWhere);
+ sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ }
+
+ // 閲嶇疆杩囨护鏉′欢鏂规硶
+ function set_ClearQuery() {
+ $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//寮�濮嬫棩鏈�
+ $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));;//缁撴潫鏃ユ湡
+ $("#HBillNo").val("");//鍗曟嵁鍙�
+ $("#HMaterName").val("");//鐗╂枡
+ $("#HDeptName").val("0");//杞﹂棿
+ $("#HProcExchBillNo").val("");//娴佽浆鍗″彿
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0");
+ form.render('select');
+ $("#btnSearch").click();
+ sWhere = "";
+ }
+
+ // 缂栬緫
+ function set_Edit() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var linterid = data[0].hmainid;
+
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '宸ュ簭杩斿伐璁板綍鍗曠紪杈�'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../宸ュ簭娴佽浆鍗�/Sc_ProcExchRecordBackBillEdit.html?OperationType=3&linterid=' + linterid + '&HEntryID=-1'
+ , end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ }
+ })
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ }
+ }
+
+ // 鍒犻櫎
+ 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() + '/Sc_ProcExchRecordBackBill/DelProcExchWorkBackBill',
+ type: "GET",
+ data: { "HInterID": hmainid, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ //鍏抽棴褰撳墠frame
+ layer.close(wait);
+ layer.msg(result.Message);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ get_FastQuery();
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(wait);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
+ }
+ });
+ })
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+ }
+
+ }
+
+ //瀹℃牳
+ function set_CheckBill() {
+ 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() + '/Sc_ProcExchRecordBackBill/set_CheckBill',
+ type: "GET",
+ data: { "HInterID": hmainid, "num": 1, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ //鍏抽棴褰撳墠frame
+ layer.close(wait);
+ layer.msg(result.Message);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ get_FastQuery();
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(wait);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
+ }
+ });
+ })
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+
+ }
+
+ //鍙嶅鏍�
+ function set_AbandonCheck() {
+ 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() + '/Sc_ProcExchRecordBackBill/set_CheckBill',
+ type: "GET",
+ data: { "HInterID": hmainid, "num": 2, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ //鍏抽棴褰撳墠frame
+ layer.close(wait);
+ layer.msg(result.Message);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ get_FastQuery();
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(wait);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
+ }
+ });
+ })
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹弽瀹℃牳锛�');
+ }
+
+ }
+
+ //鎵撳嵃
+ function btn_print() {
+
+ }
+
+ // 鍒锋柊
+ function get_Refresh() {
+ set_ClearQuery();
+ get_Display(sWhere);
+ }
+
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ var contentUrl = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["title"] + ",";
+ }
+ var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+ var urlLen = urlStr.split('/');
+ for (var i = 0; i < urlLen.length - 4; i++) {
+ contentUrl += "../";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+ contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: [contentUrl, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = ["hmainid", "HEntryID", "浣滃簾浜�", "浣滃簾鏃ユ湡", "閿�鍞鍗曟棩鏈�", "璁㈠崟璺熻釜鍙�", "HDeptID", "HMaterID", "hunitid", "hempid", "涓氬姟鍛樹唬鐮�", "涓氬姟鍛�", "hcusid", "瀹㈡埛浠g爜", "瀹㈡埛", "HCenterID", "宸ヤ綔涓績浠g爜", "宸ヤ綔涓績", "hbomid", "BOM鍗曠紪鐮�", "HRoutingInterID", "宸ヨ壓璺嚎浠g爜", "宸ヨ壓璺嚎", "hsubid", "婧愬崟鍗曞彿", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "琛屽叧闂汉", "鍏抽棴绫诲瀷", "鍗曟嵁绫诲瀷", "璁″垝璺熻釜鍙�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //璁剧疆鍒楀
+ //if (data1.data[0].HColumnWidth != 0) {
+ // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+ //} else {
+ // option.cols[0][i + 1]["width"] = "";
+ //}
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ }
+
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ table.render(option);
+ } else {
+ table.render(option);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+
+ //鍒楁槑鏄剧ず涓嬫媺妗�
+ function ColFilter() {
+ var Organization = '<option value="0" selected="selected" ></option>';
+ for (var i = 1; i < option.cols[0].length; i++) {
+ if (option.cols[0][i].hide != true) {
+ Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+ }
+ }
+ $("#ColName").empty();
+ $("#ColName").append(Organization);
+ form.render('select');
+ }
+
+ //#endregion
+
+
+
+
+
+
+
+ //浠ヤ笂鏄痩ayui妯″潡
+ });
+
+</script>
\ No newline at end of file
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchWorkBackBillEdit.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchWorkBackBillEdit.html"
index ba8946c..75f6f0e 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchWorkBackBillEdit.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchWorkBackBillEdit.html"
@@ -52,7 +52,7 @@
<div class="layui-btn-group">
<button type="button" id="btnSave" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btnSave">淇濆瓨</button>
<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">閫�鍑�</button>
- <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn_print">鎵撳嵃</button>
+ <!--<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn_print">鎵撳嵃</button>-->
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">闅愯棌鍒楄缃�</button>
</div>
</div>
@@ -661,7 +661,7 @@
, toolbar: '#toolbarDemo'
, page: false
, cellMinWidth: 120
- , height: 400
+ , height: 350
, cols: [columns]
, limit: Number.MAX_VALUE//榛樿鏄剧ず鍏ㄩ儴
, done: function (res, curr, count) {
@@ -911,10 +911,10 @@
$("#HQty").val(d.data[0]["杩斿伐鏁伴噺"]);
$("#HProcBegName").val(d.data[0]["杩斿伐寮�濮嬪伐搴�"]);
$("#HProcBegID").val(d.data[0]["HProcBegID"]);
- $("#HProcEndName").val(d.data[1]["杩斿伐缁撴潫宸ュ簭"]);
- $("#HProcEndID").val(d.data[1]["HProcEndID"]);
+ $("#HProcEndName").val(d.data[0]["杩斿伐缁撴潫宸ュ簭"]);
+ $("#HProcEndID").val(d.data[0]["HProcEndID"]);
$("#HProcExchBegNO").val(d.data[0]["杩斿伐寮�濮嬫祦姘村彿"]);
- $("#HProcExchEndNO").val(d.data[1]["杩斿伐缁撴潫娴佹按鍙�"]);
+ $("#HProcExchEndNO").val(d.data[0]["杩斿伐缁撴潫娴佹按鍙�"]);
$("#HPRDORGID").val(d.data[0]["HPRDORGID"]);
$("#HPRDORGName").val(d.data[0]["缁勭粐"]);
$("#HICMOBillNo").val(d.data[0]["鐢熶骇璁㈠崟鍙�"]);
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchWorkBackBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchWorkBackBillList.html"
index d505371..f0ec689 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchWorkBackBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcExchWorkBackBillList.html"
@@ -363,21 +363,6 @@
sWhere = "";
}
- //鏂板
- function set_AddNew() {
- layer.open({
- type: 2
- , skin: 'layui-layer-rim' //鍔犱笂杈规
- , area: ['100%', '100%']
- , title: '鐢熶骇璁㈠崟鏂板'
- , shift: 0//寮瑰嚭鍔ㄧ敾
- , content: '../鐢熶骇浠诲姟鍗�/Sc_ICMOBillEdit.html?OperationType=1&linterid='
- , end: function () {
- //鍒锋柊椤甸潰,
- location.reload();
- }
- })
- }
// 缂栬緫
function set_Edit() {
@@ -389,7 +374,7 @@
layer.open({
type: 2
, area: ['100%', '100%']
- , title: '鐢熶骇璁㈠崟缂栬緫'
+ , title: '宸ュ簭杩斿伐鐢宠鍗曠紪杈�'
, shift: 0//寮瑰嚭鍔ㄧ敾
, content: '../宸ュ簭娴佽浆鍗�/Sc_ProcExchWorkBackBillEdit.html?OperationType=3&linterid=' + linterid + '&HEntryID=-1'
, end: function () {
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
index bcc8fb9..e39d814 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
@@ -147,7 +147,8 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_StationOut"><i class="layui-icon layui-icon-form"></i>宸ュ簭鍑虹珯姹囨姤鍗�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_StationIn"><i class="layui-icon layui-icon-form"></i>宸ュ簭杩涚珯鎺ユ敹鍗�</button>-->
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_HideColumn2"><i class="layui-icon layui-icon-file-b"></i>鏄庣粏鍒楄缃�</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Fg"><i class="layui-icon layui-icon-file-b"></i>宸ュ簭杩斿伐</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Fg"><i class="layui-icon layui-icon-file-b"></i>杩斿伐鐢宠</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Jl"><i class="layui-icon layui-icon-file-b"></i>杩斿伐璁板綍</button>
</div>
</script>
<script type="text/html" id="toolbarDemo3">
@@ -308,8 +309,11 @@
//鏄庣粏鍒楄缃�
case 'get_HideColumn2': get_HideColumn2();
break
- //宸ュ簭杩斿伐鍗�
+ //宸ュ簭杩斿伐鍗曠敵璇�
case 'get_Fg': get_Fg();
+ break
+ //宸ュ簭杩斿伐鍗曡褰�
+ case 'get_Jl': get_Jl();
break
};
});
@@ -944,7 +948,7 @@
}
//#endregion
- //宸ュ簭杩斿伐
+ //宸ュ簭杩斿伐鐢宠
function get_Fg() {
var checkStatus = table.checkStatus('mainTable2')
, data = checkStatus.data;
@@ -975,6 +979,37 @@
}
}
+ //宸ュ簭杩斿伐璁板綍
+ function get_Jl() {
+ var checkStatus = table.checkStatus('mainTable2')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ if (checkStatus.data[0]["娴佹按鍙�"] != "9999") {
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "宸ュ簭杩斿伐璁板綍鍗曠紪杈�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["100%", "100%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../杞﹂棿绠$悊/宸ュ簭娴佽浆鍗�/Sc_ProcExchRecordBackBillEdit.html?OperationType=1&linterid=' + checkStatus.data[0]["hmainid"] + '&HEntryID=' + checkStatus.data[0]["HEntryID"], "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ } else {
+ layer.msg('杩斿伐宸ュ簭涓嶈兘鏄浆宸ュ簭锛�');
+ }
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ }
+ }
+
//#region 鏄剧ず鍒楁暟鎹� (涓诲垪琛�)
function DisPlay_HideColumn() {
$.ajax({
--
Gitblit v1.9.1