From 24efc0b0d99502afdebb6ef678b0cf4e91dcb084 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 16 五月 2025 15:49:51 +0800
Subject: [PATCH] 组织物料启动检查项目防错装置优化
---
WebTM/views/计划管理/工艺路线/Gy_RoutingBill.html | 1782 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 1,445 insertions(+), 337 deletions(-)
diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_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 a9bdc2e..04fb572 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"
@@ -44,6 +44,12 @@
.layui-form-label {
width: 25%;
}
+
+ .layui-table th, .layui-table td {
+ white-space: nowrap; /* 涓嶆崲琛� */
+ overflow: hidden; /* 瓒呭嚭鍐呭闅愯棌 */
+ text-overflow: ellipsis; /* 鏄剧ず鐪佺暐鍙� */
+ }
</style>
</head>
@@ -59,10 +65,19 @@
<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_startCheckBill" id="set_startCheckBill">鍙戣捣瀹℃壒</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>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CancelCloseBill" id="set_CancelCloseBill">鍙嶅叧闂�</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_Copy" id="set_Copy">澶嶅埗</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckFlowInfo" id="set_CheckFlowInfo">鏌ョ湅瀹℃壒杩涘害</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill_Flow" id="set_CheckBill_Flow">澶氱骇瀹℃牳</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck_Flow" id="set_AbandonCheck_Flow">澶氱骇鍙嶅鏍�</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_RejectCheck_Flow" id="set_RejectCheck_Flow">椹冲洖</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_WithdrawCheck_Flow" id="set_WithdrawCheck_Flow">鎾ゅ洖</button>
</div>
<div class="layui-tab" lay-filter="tab-POStockInBill">
<ul class="layui-tab-title" lay-filter="tab-all">
@@ -89,7 +104,7 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">宸ヨ壓璺嚎鍚嶇О<label style="color:red"> * </label></label>
+ <label class="layui-form-label" style="width: 90px;">宸ヨ壓璺嚎鍚嶇О*</label>
<div class="layui-input-block" style="margin-left: 120px;">
<input type="text" class="layui-input" lay-verify="HName" name="HName" id="HName">
</div>
@@ -100,7 +115,7 @@
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;padding: 9px 18px;">浜у搧浠g爜*</label>
<div class="layui-input-block" style="margin-left: 77px;">
- <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" style="width: 60%;display: inline-block;">
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater" id="btnSearchMater" style="padding: 0 10px;float: right;margin-right: 3px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
@@ -124,7 +139,7 @@
<div class="layui-row">
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;padding: 9px 18px;">璁¢噺鍗曚綅*</label>
- <div class="layui-input-block" style="margin-left: 77px;">
+ <div class="layui-input-block" style="margin-left: 83px;">
<input type="text" class="layui-input" name="HUnitName" lay-verify="HUnitName" id="HUnitName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
<input type="hidden" name="HUnitID" id="HUnitID" lay-verify="HUnitID" value="0">
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnUnit" id="btnUnit" style="padding: 0 10px;float: right;margin-right: 3px;">
@@ -133,106 +148,22 @@
</div>
</div>
<div class="layui-inline">
- <div class="layui-input-block" style="margin-left: 96px;">
+ <label class="layui-form-label" style="width: 85px;">瀹氶绫诲瀷</label>
+ <div class="layui-input-inline">
+ <select name="HProcPriceType" id="HProcPriceType" lay-filter="HProcPriceType" style="width:200px;">
+ <option value="涓存椂瀹氶">涓存椂瀹氶</option>
+ <option value="姘镐箙瀹氶" selected="selected">姘镐箙瀹氶</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-block" style="margin-left: 0px;">
<input type="checkbox" name="checkboxHStandard" id="checkboxHStandard" lay-skin="primary" lay-filter="checkboxHStandard" checked title="鏄惁榛樿宸ヨ壓">
<input type="hidden" value="true" name="HStandard" id="HStandard" lay-verify="HStandard">
<!--<input type="checkbox" name="checkboxHUseFlag" id="checkboxHUseFlag" title="鏄惁鍚敤" lay-skin="primary" lay-filter="checkboxHUseFlag">
- <input type="hidden" value="false" name="HUseFlag" id="HUseFlag">-->
+ <input type="hidden" value="false" name="HUseFlag" id="HUseFlag">-->
</div>
</div>
- </div>
- <div class="layui-row">
- <!--<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">宸ュ簭</label>
- <div class="layui-input-block" style="margin-left: 77px;">
- <input type="text" class="layui-input" lay-verify="HMainProcIDName" name="HMainProcIDName" id="HMainProcIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <input type="hidden" class="layui-input" name="HMainProcID" id="HMainProcID" lay-verify="HMainProcID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProc" id="btnSearchProc" style="padding: 0 10px;float: right;margin-right: 3px;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn" ></i>
- </button>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">宸ヤ綔涓績</label>
- <div class="layui-input-block" style="margin-left: 77px;">
- <input type="text" class="layui-input" lay-verify="HMainCenterIDName" name="HMainCenterIDName" id="HMainCenterIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <input type="hidden" class="layui-input" name="HMainCenterID" lay-verify="HMainCenterID" id="HMainCenterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnWorkCenter" id="btnWorkCenter" style="padding: 0 10px;float: right;margin-right: 3px;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
- </button>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇鐝粍</label>
- <div class="layui-input-block" style="margin-left: 77px;">
- <input type="text" class="layui-input" name="HGroupIDName" lay-verify="HGroupIDName" id="HGroupIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <input type="hidden" class="layui-input" name="HGroupID" lay-verify="HGroupID" id="HGroupID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnGroup" id="" style="padding: 0 10px;float: right;margin-right: 3px;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
- </button>
- </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="HMainWorkQty" lay-verify="HMainWorkQty" id="HMainWorkQty" value="0" onmouseover="this.title=this.value">
- </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="HMainUnitTime" lay-verify="HMainUnitTime" id="HMainUnitTime" value="0">-->
- <!--<input type="hidden" value="灏忔椂" name="HMainTimeUnit" id="HMainTimeUnit">-->
- <!--</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="HMainPrice" id="HMainPrice" lay-verify="HMainPrice" value="0">
- </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="HStdSourceQty" id="HStdSourceQty" lay-verify="HStdSourceQty" value="0">-->
- <!--style="background-color:#efefef4d;"-->
- <!--</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="HAddSourceRate" id="HAddSourceRate" lay-verify="HAddSourceRate" value="0">-->
- <!--style="background-color:#efefef4d;"-->
- <!--</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" lay-verify="HDelSourceRate" name="HDelSourceRate" id="HDelSourceRate" value="0">-->
- <!--style="background-color:#efefef4d;"-->
- <!--</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="hidden" class="layui-input" name="HMaker" id="HMaker" lay-verify="HMaker" value="">
- <input type="text" class="layui-input" name="HRemark" id="HRemark" lay-verify="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style=" width: 500px;">
- </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; width: 501px;">
@@ -241,6 +172,123 @@
</select>
</div>
</div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-inline" id="HIDDEN" style="display:none;">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">宸ュ簭</label>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="text" class="layui-input" lay-verify="HMainProcIDName" name="HMainProcIDName" id="HMainProcIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="hidden" class="layui-input" name="HMainProcID" id="HMainProcID" lay-verify="HMainProcID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProc" id="btnSearchProc" style="padding: 0 10px;float: right;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">寮�濮嬫棩鏈�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 20px;">
+ </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="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 80px;">
+ </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="hidden" class="layui-input" name="HMaker" id="HMaker" lay-verify="HMaker" value="">
+ <input type="text" class="layui-input" name="HRemark" id="HRemark" lay-verify="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style=" width: 500px;">
+ </div>
+ </div>
+ <!--<div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">宸ヤ綔涓績</label>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="text" class="layui-input" lay-verify="HMainCenterIDName" name="HMainCenterIDName" id="HMainCenterIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="hidden" class="layui-input" name="HMainCenterID" lay-verify="HMainCenterID" id="HMainCenterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnWorkCenter" id="btnWorkCenter" style="padding: 0 10px;float: right;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇鐝粍</label>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="text" class="layui-input" name="HGroupIDName" lay-verify="HGroupIDName" id="HGroupIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="hidden" class="layui-input" name="HGroupID" lay-verify="HGroupID" id="HGroupID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnGroup" id="" style="padding: 0 10px;float: right;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ </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="HMainWorkQty" lay-verify="HMainWorkQty" id="HMainWorkQty" value="0" onmouseover="this.title=this.value">
+ </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="HMainUnitTime" lay-verify="HMainUnitTime" id="HMainUnitTime" value="0">-->
+ <!--<input type="hidden" value="灏忔椂" name="HMainTimeUnit" id="HMainTimeUnit">-->
+ <!--</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="HMainPrice" id="HMainPrice" lay-verify="HMainPrice" value="0">
+ </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="HStdSourceQty" id="HStdSourceQty" lay-verify="HStdSourceQty" value="0">-->
+ <!--style="background-color:#efefef4d;"-->
+ <!--</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="HAddSourceRate" id="HAddSourceRate" lay-verify="HAddSourceRate" value="0">-->
+ <!--style="background-color:#efefef4d;"-->
+ <!--</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" lay-verify="HDelSourceRate" name="HDelSourceRate" id="HDelSourceRate" value="0">-->
+ <!--style="background-color:#efefef4d;"-->
+ <!--</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="hidden" class="layui-input" name="HMaker" id="HMaker" lay-verify="HMaker" value="">
+ <input type="text" class="layui-input" name="HRemark" id="HRemark" lay-verify="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style=" width: 500px;">
+ </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; width: 501px;">
+ <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">-->
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ <!--</select>
+ </div>
+ </div>-->
</div>
</div>
</div>
@@ -291,7 +339,7 @@
<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="" id="" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" name="hcloser" id="hcloser" style="background-color:#efefef4d;" readonly>
</div>
</div>
<div class="layui-inline">
@@ -311,7 +359,7 @@
<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="" id="" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" name="hclosedate" id="hclosedate" style="background-color:#efefef4d;" readonly>
</div>
</div>
<div class="layui-inline">
@@ -384,7 +432,7 @@
</div>
<div class="layui-inline">
<div class="layui-input-block" style="margin-left: 185px;">
- <input type="checkbox" name="checkboxIsProNo" id="checkboxIsProNo" lay-skin="primary" lay-filter="checkboxIsProNo" title="杞伐搴�">
+ <input type="checkbox" name="checkboxIsProNo" id="checkboxIsProNo" lay-skin="primary" lay-filter="checkboxIsProNo" title="杞伐搴�" disabled="disabled">
<input type="hidden" value="1" name="IsProNo" id="IsProNo" lay-verify="IsProNo">
</div>
</div>
@@ -430,10 +478,47 @@
</div>
</script>
+ <!--澶嶉�夋 SN杩囩珯鎺у埗-->
+ <script type="text/html" id="HSNCtrl">
+ <div class="layui-input-block" style="margin-left: 20px;">
+ <input type="checkbox" name="HSNCtrl" lay-filter="HSNCtrl" id="HSNCtrl{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ </div>
+ </script>
+ <!--澶嶉�夋 鏄惁棣栦欢-->
+ <script type="text/html" id="HQCFst">
+ <div class="layui-input-block" style="margin-left: 20px;">
+ <input type="checkbox" name="HQCFst" lay-filter="HQCFst" id="HQCFst{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ </div>
+ </script>
+ <!--澶嶉�夋 鏄惁鏈-->
+ <script type="text/html" id="HQCProc">
+ <div class="layui-input-block" style="margin-left: 20px;">
+ <input type="checkbox" name="HQCProc" lay-filter="HQCProc" id="HQCProc{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ </div>
+ </script>
+ <!--澶嶉�夋 鏄惁宸℃-->
+ <script type="text/html" id="HQCPatrol">
+ <div class="layui-input-block" style="margin-left: 20px;">
+ <input type="checkbox" name="HQCPatrol" lay-filter="HQCPatrol" id="HQCPatrol{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ </div>
+ </script>
+ <!--澶嶉�夋 涓婃枡闃查敊鎺у埗-->
+ <script type="text/html" id="HMaterToSourceCtrl">
+ <div class="layui-input-block" style="margin-left: 20px;">
+ <input type="checkbox" name="HMaterToSourceCtrl" lay-filter="HMaterToSourceCtrl" id="HMaterToSourceCtrl{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ </div>
+ </script>
+ <!--澶嶉�夋 鎺掍骇宸ュ簭鏍囪-->
+ <script type="text/html" id="HSortProcFlag">
+ <div class="layui-input-block" style="margin-left: 20px;">
+ <input type="checkbox" name="HSortProcFlag" lay-filter="HSortProcFlag" id="HSortProcFlag{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ </div>
+ </script>
+
<!--澶嶉�夋 涓嬮亾娴佽浆宸ュ簭-->
<script type="text/html" id="HNextProcFlag">
<div class="layui-input-block" style="margin-left: 20px;">
- <input type="checkbox" name="HNextProcFlag" disabled="disabled" lay-filter="HNextProcFlag" id="HNextProcFlag{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ <input type="checkbox" name="HNextProcFlag" disabled="disabled" lay-filter="HNextProcFlag" id="HNextProcFlag{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
</div>
</script>
@@ -459,12 +544,18 @@
</script>
<script>
+ //#region 鏂囨湰妗嗚緭鍏ユ悳绱㈢浉鍏虫暟鎹�-鍙橀噺
+ var childPage = null; //鑾峰彇瀛愮獥鍙e璞★紝鐢ㄤ簬鎿嶄綔瀛愮獥鍙g殑鍙橀噺鍜屾柟娉�
+ var currRowIndex = 0; //鐢ㄤ簬瀹氫綅瀛愮獥鍙e綋鍓嶉�変腑鐨勮
+ var childData = null; //鐢ㄤ簬鑾峰彇瀛愮獥鍙h繑鍥炵殑鏁版嵁
+ //#endregion
+ var OptionData = [];
layui.config({
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index' //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+ }).use(['index', 'form', 'laydate', 'table', 'element','tableSelect'], function () {
//#region 鍏叡鍙橀噺
@@ -473,7 +564,8 @@
, layer = layui.layer
, table = layui.table
, form = layui.form
- , element = layui.element;
+ , element = layui.element
+ , tableSelect = layui.tableSelect;
//瀹氫箟鍏ㄥ眬鍙橀噺
var HReasonName, ReasonID, EmpName, SQProcName,
@@ -481,18 +573,23 @@
//鍒濆琛ㄦ牸鏁版嵁
var rowdata = [{
- "HProcNo": "10", "HProcID_S": 0, "HProcType": "涓诲伐搴�", "HCenterID_S": 0, "HCenterID_SName": ""
+ "HProcNo": "10", "HProcID_S": 0, "HProcType": "涓诲伐搴�", "HCenterID_S": 0, "HCenterID_SName": "","宸ュ簭浠g爜":""
, "HWorkQty_S": 0, "HSubStdEmpQty_S": 0, "HMouldNo": "", "HChangeMould": 0, "HPackStd": ""
- , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "宸ュ簭": ""
+ , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "宸ュ簭": "","宸ユ":""
, "HProcID": 0, "宸ヤ綔涓績浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績": "", "HSupID": 0
- , "渚涘簲鍟嗕唬鐮�": "", "渚涘簲鍟�": "", "HSupFlag": false, "HTimeUnit": "", "HUnitTime": 0
- , "HWorkQty": 1, "HPassRate": 100, "HOverRate": 0, "HReadyTime": 0, "HQueueTime": 0
+ , "渚涘簲鍟嗕唬鐮�": "", "渚涘簲鍟�": "", "HSupFlag": false, "HSortProcFlag": false, "HTimeUnit": "", "HUnitTime": 0
+ , "HWorkQty": 1, "HSNCtrl": false, "HPassRate": 100, "HOverRate": 0, "HReadyTime": 0, "HQueueTime": 0
, "HMoveTime": 0, "HNextProcFlag": false, "HFlowProc": false, "HSubStdEmpQty": 0, "HSubCanUseSourceQty": 0
, "HFixPrice": 0, "HProcPrice": 0, "HBadPrice": 0, "HWasterPrice": 0, "HStdFlag": false
, "HBeginDayQty": 0, "HBeginFixQty": 0, "HFixWorkDays": 0, "HTrunWorkDays": 0, "HReadyTimes": 0
, "HICMOReadyTimes": 0, "HAutoTrunFlag": false, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
, "HProcWorkNum": "", "HBadWHID": 0, "HBadWHName": "", "HWasterWHID": 0, "HWasterWHName": ""
- , "HWHID": 0, "HWHName": "","HRemark":""
+ , "HWHID": 0, "HWHName": "", "HRemark": "", "HWorkTimes_S": 0
+ , "HQCSchemeID_Fst": 0, "HQCSchemeNumber_Fst": "", "HQCSchemeName_Fst": ""
+ , "HQCSchemeID_Proc": 0, "HQCSchemeNumber_Proc": "", "HQCSchemeName_Proc": ""
+ , "HQCSchemeID_Patrol": 0, "HQCSchemeNumber_Patrol": "", "HQCSchemeName_Patrol": ""
+ , "HQCFst": false, "HQCProc": false, "HQCPatrol": false, "HMaterToSourceCtrl": false
+ , "HSubStdEmpAvg_S": 0, "鏍囧噯宸ヤ环": 0,"HYDCoefficient": 0
}];
var HModName = "Gy_RoutingBill";
//#endregion
@@ -503,24 +600,32 @@
elem: '#mainTable'
, toolbar: '#toolbarDemo'
, limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
- , cellMinWidth: 120
- , height: 400
+ , totalRow: true
+ //, cellMinWidth: 120
+ , height: 450
, cols: [[ //琛ㄥご
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', totalRow: true }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', totalRow: true }
, { field: 'HProcNo', title: '娴佹按鍙�', edit: 'text' }
- // , { field: 'HProcID', title: '宸ュ簭ID', hide: true }//, hide: true
+ , { field: 'HProcID', title: '宸ュ簭ID', hide: true }//, hide: true
+ , { field: '宸ュ簭浠g爜', title: '宸ュ簭浠g爜'}
, { field: '宸ュ簭', title: '宸ュ簭', edit: 'text', event: "CheckHProcID" }//f7
+ , { field: 'HProcID_S', title: '宸ユID', hide: true }//, hide: true
+ , { field: '宸ユ', title: '宸ユ', edit: 'text', event: "CheckHProcMulID" }//f7
, { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', edit: 'text', event: "CheckHCenterID" }//涓嶅~
- // , { field: 'HCenterID', title: '宸ヤ綔涓績id', hide: true }//, hide: true
+ , { field: 'HCenterID', title: '宸ヤ綔涓績ID', hide: true }//, hide: true
, { field: '宸ヤ綔涓績', title: '宸ヤ綔涓績' }//f7
, { field: 'HTechnologyParameter', title: '宸ヨ壓鍙傛暟', edit: 'text' }
+ , { field: 'HProcPrice', title: '宸ヤ环', edit: 'text' }
+ , { field: '鏍囧噯宸ヤ环', title: '鏍囧噯宸ヤ环' }
+ , { field: 'HYDCoefficient', title: '绾﹀綋绯绘暟', edit: 'text' }
, { field: 'HRemark', title: '澶囨敞', edit: 'text' }
- // , { field: 'HSupID', title: '渚涘簲鍟咺D', hide: true }
+ , { field: 'HSupID', title: '渚涘簲鍟咺D', hide: true }
, { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', edit: 'text', width: 110, event: "CheckHSupID" }
, { field: '渚涘簲鍟�', title: '渚涘簲鍟�' }//f7
, { field: 'HSupFlag', title: '澶栧崗鏍囪', templet: "#HSupFlag" }//checkbox
-
+ , { field: 'HSortProcFlag', title: '鎺掍骇宸ュ簭鏍囪', templet: "#HSortProcFlag", width: 120 }//checkbox
+
//, { field: 'HProcType', title: '宸ュ簭绫诲瀷', templet: '#HProcType' }//閫夋嫨
////, { field: 'HBadWHID', title: 'HBadWHID', hide: true }//, hide: true
//, { field: 'HBadWHName', title: '涓嶈壇鍝佷粨', edit: 'text', event: "HBadWHID" }//f7
@@ -532,7 +637,24 @@
//, { field: 'HPicNum', title: '鍥剧焊缂栧彿', edit: 'text' }
//, { field: 'HTimeUnit', title: '鏃堕棿鍗曚綅', edit: 'text' }
//, { field: 'HUnitTime', title: '杩愯鏃堕棿', edit: 'text' }
- //, { field: 'HWorkQty', title: '鍔犲伐鏁伴噺', edit: 'text' }//榛樿
+ , { field: 'HSNCtrl', title: 'SN杩囩珯鎺у埗', templet: "#HSNCtrl", width: 120 }
+ , { field: 'HMaterToSourceCtrl', title: '涓婃枡闃查敊鎺у埗', templet: "#HMaterToSourceCtrl", width:120 }
+ , { field: 'HQCFst', title: '鏄惁棣栦欢', templet: "#HQCFst", width: 120 }
+ , { field: 'HQCProc', title: '鏄惁鏈', templet: "#HQCProc", width: 120 }
+ , { field: 'HQCPatrol', title: '鏄惁宸℃', templet: "#HQCPatrol", width: 120 }
+
+ , { field: 'HQCSchemeID_Fst', title: '棣栦欢妫�楠屾柟妗圛D', hide: true }//f7
+ , { field: 'HQCSchemeNumber_Fst', title: '棣栦欢妫�楠屾柟妗堜唬鐮�', edit: 'text', event: "HQCSchemeNumber_Fst", width: 125 }
+ , { field: 'HQCSchemeName_Fst', title: '棣栦欢妫�楠屾柟妗堝悕绉�', width: 125 }//f7
+ , { field: 'HQCSchemeID_Proc', title: '杞簭妫�楠屾柟妗圛D', hide: true }//f7
+ , { field: 'HQCSchemeNumber_Proc', title: '杞簭妫�楠屾柟妗堜唬鐮�', edit: 'text', event: "HQCSchemeNumber_Proc", width: 125 }
+ , { field: 'HQCSchemeName_Proc', title: '杞簭妫�楠屾柟妗堝悕绉�', width: 125 }//f7
+ , { field: 'HQCSchemeID_Patrol', title: '宸℃妫�楠屾柟妗圛D', hide: true }//f7
+ , { field: 'HQCSchemeNumber_Patrol', title: '宸℃妫�楠屾柟妗堜唬鐮�', edit: 'text', event: "HQCSchemeNumber_Patrol", width: 125 }
+ , { field: 'HQCSchemeName_Patrol', title: '宸℃妫�楠屾柟妗堝悕绉�', width: 125 }//f7
+ , { field: 'HWorkQty', title: '鍔犲伐鏁伴噺', edit: 'text', width: 125 }
+ , { field: 'HSubStdEmpQty_S', title: '浜х嚎浜烘暟', edit: 'text', width: 125 }
+ , { field: 'HSubStdEmpAvg_S', title: '浜哄潎浜ц兘', edit: 'text', width: 125}
//, { field: 'HPassRate', title: '鑹巼', edit: 'text' }//榛樿
//, { field: 'HProcID_S', title: '宸ユ', edit: 'text' }
////, { field: 'HCenterID_S', title: '浜х嚎涓績id', hide: true }//hide: true
@@ -553,8 +675,7 @@
//, { field: 'HFlowProc', title: '娴佽浆宸ュ簭', templet: "#HFlowProc" }//chenbox
//, { field: 'HSubStdEmpQty', title: '鏍囧噯浜烘暟', edit: 'text' }
//, { field: 'HSubCanUseSourceQty', title: '鍙搷浣滆澶囨暟', edit: 'text' }
- //, { field: 'HFixPrice', title: '鐝骇瀹氶', edit: 'text' }//榛樿
- //, { field: 'HProcPrice', title: '宸ュ簭宸ヤ环', edit: 'text' }//榛樿
+ //, { field: 'HFixPrice', title: '鐝骇瀹氶', edit: 'text' }//榛樿
//, { field: 'HBadPrice', title: '涓嶅悎鏍煎崟浠�', edit: 'text' }//榛樿
//, { field: 'HWasterPrice', title: '鎶ュ簾鍗曚环', edit: 'text' }//榛樿
//, { field: 'HStdFlag', title: '鏍囧噯瀹氶', templet: "#HStdFlag" }//chenbox
@@ -567,6 +688,8 @@
//, { field: 'HAutoTrunFlag', title: '鑷姩绉昏浆', templet: "#HAutoTrunFlag" }//chenbox
//, { field: 'HProcCheckNote', title: '鏈伐搴忕‘璁よ褰�', edit: 'text' }
//, { field: 'HProcWorkNum', title: '绋嬪簭鍙�', edit: 'text' }
+ /* , { field: 'HWorkTimes_S', title: '浜у搧鍗曚欢宸ユ椂', edit: 'text' }*/
+ , { field: 'HWorkTimes_S', title: '鍗曚欢鐢熶骇鑺傛媿', edit: 'text' }
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
]]
//, done: function (res, curr, count) {
@@ -609,15 +732,47 @@
//}
var params = getUrlVars();
- var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 1娣诲姞 淇濆瓨 2澶嶅埗 3 缂栬緫
+ var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 1娣诲姞 淇濆瓨 2澶嶅埗 3 缂栬緫 4娣诲姞瀛愬伐鑹鸿矾绾�
var linterid = params[params[1]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
- var lSourceBillType = params[params[2]]; //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
+ var HBillSubType = params[params[2]]; //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
//var linteridSub = params[params[3]]; //浠庡弬鏁拌幏鍙� 瀛愯〃绾у埆
+ var IsHavingPermissions = 0; //鎺掍骇椤甸潰璺宠浆杩囨潵鏃跺垽鏂敤鎴锋槸鍚︽湁宸ヨ壓璺嚎缂栬緫鏉冮檺,0浠g爜娌℃湁鏉冮檺锛�1浠h〃鏈夋潈闄�
+ //鎺掍骇椤甸潰璺宠浆缂栬緫鏌ョ湅宸ヨ壓璺嚎
+ if (HBillSubType == 4610 && OperationType == 3) {
+ HBillSubType = 3301
+ IsHavingPermissions = params[params[3]];
+ if (IsHavingPermissions == 0) {
+ //娌℃湁宸ヨ壓璺嚎鐨勭紪杈戞潈闄愶紝绂佺敤鎸夐挳
+ $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);
+ $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);
+ $('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true);
+ $('#set_CloseBill').addClass("layui-btn-disabled").attr("disabled", true);
+ $('#set_CancelCloseBill').addClass("layui-btn-disabled").attr("disabled", true);
+ }
+ }
+ //鎺掍骇椤甸潰璺宠浆鏂板宸ヨ壓璺嚎
+ if (HBillSubType == 4610 && OperationType == 1) {
+ HBillSubType = 3301
+
+ $("#HMaterID").val(params[params[3]]);//鐗╂枡ID
+ $("#HName").val(getParams("HMaterNumber"));//宸ヨ壓璺嚎鍚嶇О
+ $("#HMaterNumber").val(getParams("HMaterNumber"));//鐗╂枡浠g爜
+ $("#HMaterName").val(getParams("HMaterName"));//鐗╂枡鍚嶇О
+ $("#HMaterModel").val(getParams("HMaterModel") == "" ? " " : getParams("HMaterModel"));//瑙勬牸鍨嬪彿
+ }
+
+ if (HBillSubType == "SUB") {
+ //鏄剧ず宸ュ簭
+ $("#HIDDEN").show();
+ } else {
+ HBillSubType = "3301";
+ }
//鍒ゆ柇鏄惁鏂板
if (linterid == null || linterid == 0) {
- //linteridSub = -1;
+ //$("#HIDDEN").hide();
OperationType = 1;
+ $('#set_closeOtherRoute').addClass("layui-btn-disabled").attr("disabled", true);
$.ajax({
url: GetWEBURL() + "/Web/GetMAXNum",
type: "GET",
@@ -627,6 +782,8 @@
$("#HInterID").val(d.data[0].HInterID);
$("#HBillNo").val(d.data[0].HBillNo);
$("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(2100,12,31), "yyyy-MM-dd"));
}
});
}
@@ -643,10 +800,13 @@
$("#HInterID").val(d.data[0].HInterID);
$("#HBillNo").val(d.data[0].HBillNo);
$("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(2100, 12, 31), "yyyy-MM-dd"));
}
});
}
else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+
//绂佺敤缁勭粐閫夐」
$("#HOrgID").attr("disabled", true);
RoadBillMain(linterid);
@@ -660,6 +820,120 @@
//#endregion
//#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+ //#region 琛ㄥご鍩虹璧勬枡閫夋嫨寮圭獥
+ //#region 鏂囨湰妗嗙洃鍚�
+ $(document).ready(function () {
+ //#region 鏍规嵁鐗╂枡浠g爜鑾峰彇鐗╂枡鍩虹璧勬枡绛涢�夊脊绐�
+ //鏍规嵁鍏冪礌ID瀵瑰厓绱犺繘琛岀洃鍚�=============================================================================
+ $("#HMaterNumber").on('keydown', function (data) {
+ //================================================================================================
+ var errKeys = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter"];
+ if ($.inArray(event.key, errKeys) == -1) { //濡傛灉鎸変笅鐨勯敭浣嶄笉鏄� 鏂瑰悜閿紝鍒欏埛鏂板脊绐椾腑鐨勬暟鎹�
+ if (childPage == null) { //鍒ゆ柇褰撳墠瀛愮獥鍙f槸鍚﹀凡缁忔墦寮�锛岃嫢鏈墦鍗★紝鍒欐墦寮�椤甸潰锛屽苟鑾峰彇瀛愮獥鍙g殑瀵硅薄
+ var offset = $(this).offset(); //鑾峰彇瑙﹀彂浜嬩欢鐨勫厓绱犵殑浣嶇疆锛岀敤浜庡畾浣嶅瓙绐楀彛鎵撳紑鐨勪綅缃�
+ var innerHeight = window.innerHeight;
+ var top = offset.top + 0.05 * innerHeight;
+ var left = offset.left;
+ if (top + 0.05 * innerHeight + 0.3 * innerHeight > innerHeight) {
+ top = top - 0.3 * innerHeight - 0.05 * innerHeight;
+ }
+ layer.open({
+ type: 2 //寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['25%', '30%'] //澶у皬
+ , shadeClose: true //鐐瑰嚮閬僵鏃跺叧闂脊绐�
+ , offset: [top, left]
+ , title: false //涓嶆樉绀烘爣棰樻爮
+ //, title: '椤圭洰璐圭敤鍒楄〃' //鏍囬
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , closeBtn: 0 //绂佺敤鍏抽棴鎸夐挳
+ , content: ["../../鍩虹璧勬枡/閫氱敤鍩虹璧勬枡/Gy_CommonBaseData.html?OperationType=2", "yes"]
+ , success: function (layero, index) {
+ setTimeout(function () {
+ //淇敼锛屾牴鎹枃鏈鏁版嵁锛岀紪鍐欐煡璇㈣鍙�================================================================================================
+ var value = $("#HMaterNumber").val().replace(/'/g, ""); //鑾峰彇鏂囨湰妗嗘渶鏂板��
+ currRowIndex = 0;
+ var tableView = "h_v_Gy_MaterialList";
+ var childSWhere = "select top(10) HItemID,鐗╂枡浠g爜,鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,HUnitID,璁¢噺鍗曚綅鍚嶇О from " + tableView + " where 1=1 and 缁勭粐鍚嶇О = '" + sessionStorage["Organization"] + "' and (鐗╂枡浠g爜 like '%" + value + "%' or 鐗╂枡鍚嶇О like '%" + value + "%') order by 鐗╂枡浠g爜 desc";
+ childPage.getData(childSWhere, tableView);
+ //===================================================================================================================================
+ }, 200);
+ }
+ , end: function () {
+ childPage = null;
+ currRowIndex = 0;
+ if (childData != null) {
+ //鏍规嵁寮圭獥杩斿洖鏁版嵁璁剧疆鏂囨湰妗嗘暟鎹�=================================================================================================
+ //鑾峰彇鏁版嵁
+ $("#HMaterID").val(childData.HItemID);//鐗╂枡id
+ $("#HMaterName").val(childData.鐗╂枡鍚嶇О);//鐗╂枡鍚嶇О
+ $("#HMaterNumber").val(childData.鐗╂枡浠g爜);//鐗╂枡浠g爜
+ $("#HMaterModel").val(childData.瑙勬牸鍨嬪彿);//瑙勬牸鍨嬪彿
+ $("#HUnitID").val(childData.HUnitID);//璁¢噺鍗曚綅id
+ $("#HUnitName").val(childData.璁¢噺鍗曚綅鍚嶇О);//璁¢噺鍗曚綅鍚嶇О
+ if ($("#HName").val() == "") {
+ $("#HName").val(childData.鐗╂枡浠g爜);
+ }
+ //===============================================================================================================================
+
+ childData = null;
+ }
+ }
+ });
+ } else {
+ setTimeout(function () {
+ //淇敼锛屾牴鎹枃鏈鏁版嵁锛岀紪鍐欐煡璇㈣鍙�================================================================================================
+ var value = $("#HMaterNumber").val().replace(/'/g, ""); //鑾峰彇鏂囨湰妗嗘渶鏂板��
+ currRowIndex = 0;
+ var tableView = "h_v_Gy_MaterialList";
+ var childSWhere = "select top(10) HItemID,鐗╂枡浠g爜,鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,HUnitID,璁¢噺鍗曚綅鍚嶇О from " + tableView + " where 1=1 and 缁勭粐鍚嶇О = '" + sessionStorage["Organization"] + "' and (鐗╂枡浠g爜 like '%" + value + "%' or 鐗╂枡鍚嶇О like '%" + value + "%') order by 鐗╂枡浠g爜 desc";
+ childPage.getData(childSWhere, tableView);
+ //=================================================================================================================================
+ }, 200);
+ }
+ } else { //濡傛灉鎸変笅鐨勯敭浣嶆槸 鏂瑰悜閿紝鍒欒皟鏁寸獥鍙d腑 閫変腑琛� 鐨勪綅缃�
+ if (event.key == "ArrowUp") {
+ currRowIndex--;
+ childPage.setSelectedRow(currRowIndex);
+ } else if (event.key == "ArrowDown") {
+ currRowIndex++;
+ childPage.setSelectedRow(currRowIndex);
+ } else if (event.key == "Enter") {
+ //鎵嬪姩澶辩劍
+ var element = document.getElementById("HMaterNumber");
+ element.blur();
+
+ childPage.getSelectedData(currRowIndex);
+
+ if (childData != null) {
+ //鏍规嵁寮圭獥杩斿洖鏁版嵁璁剧疆鏂囨湰妗嗘暟鎹�=================================================================================================
+ //鑾峰彇鏁版嵁
+ $("#HMaterID").val(childData.HItemID);//鐗╂枡id
+ $("#HMaterName").val(childData.鐗╂枡鍚嶇О);//鐗╂枡鍚嶇О
+ $("#HMaterNumber").val(childData.鐗╂枡浠g爜);//鐗╂枡浠g爜
+ $("#HMaterModel").val(childData.瑙勬牸鍨嬪彿);//瑙勬牸鍨嬪彿
+ $("#HUnitID").val(childData.HUnitID);//璁¢噺鍗曚綅id
+ $("#HUnitName").val(childData.璁¢噺鍗曚綅鍚嶇О);//璁¢噺鍗曚綅鍚嶇О
+ if ($("#HName").val() == "") {
+ $("#HName").val(childData.鐗╂枡浠g爜);
+ }
+ //===============================================================================================================================
+
+ childData = null;
+ }
+
+
+ childPage = null;
+ currRowIndex = 0;
+ childData = null;
+ }
+ }
+ });
+ //#endregion
+ });
+ //#endregion
+ //#endregion
+
//閫夋嫨浜у搧浠g爜鎸夐挳
form.on('submit(btnSearchMater)', function () {
@@ -691,6 +965,24 @@
get_checkRoutingGroup();
});
+ //鍚敤榛樿
+ form.on('submit(set_defaultRoute)', function (data) {
+ set_defaultRoute(data);
+ });
+ //鍙戣捣瀹℃壒
+ form.on('submit(set_startCheckBill)', function (data) {
+ set_startCheckBill(data);
+ });
+ //绂佺敤鍏跺畠
+ form.on('submit(set_closeOtherRoute)', function (data) {
+ if ($("#hcloser").val() != '') {
+ layer.alert("鍗曟嵁宸茶鍏抽棴鏃犳硶鍏抽棴鍏跺畠!", { icon: 5 });
+ } else {
+ set_closeOtherRoute(data);
+ }
+
+ });
+
//瀹℃牳
form.on('submit(set_CheckBill)', function (data) {
set_CheckBill(data);
@@ -711,6 +1003,32 @@
set_CancelCloseBill(data);
});
+ //鏌ョ湅瀹℃壒杩涘害
+ form.on('submit(set_CheckFlowInfo)', function (data) {
+ set_CheckFlowInfo();
+ });
+
+ //澶氱骇瀹℃牳
+ form.on('submit(set_CheckBill_Flow)', function (data) {
+ set_CheckBill_Flow(0);
+ });
+
+ //澶氱骇鍙嶅鏍�
+ form.on('submit(set_AbandonCheck_Flow)', function (data) {
+ set_CheckBill_Flow(1);
+ });
+ //椹冲洖
+ form.on('submit(set_RejectCheck_Flow)', function (data) {
+ set_RejectCheck_Flow();
+ });
+ //鎾ゅ洖
+ form.on('submit(set_WithdrawCheck_Flow)', function (data) {
+ set_WithdrawCheck_Flow();
+ });
+ //澶嶅埗
+ form.on('submit(set_Copy)', function (data) {
+ set_Copy();
+ });
//鏄惁榛樿宸ヨ壓
form.on('checkbox(checkboxHStandard)', function (data) {
@@ -737,6 +1055,73 @@
$.each(option.data, function (index, value) {
if (value.LAY_TABLE_INDEX == dataindex) {
value.HSupFlag = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+
+ //SN杩囩珯鎺у埗
+ form.on('checkbox(HSNCtrl)', 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.HSNCtrl = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+ //涓婃枡闃查敊鎺у埗
+ form.on('checkbox(HMaterToSourceCtrl)', 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.HMaterToSourceCtrl = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+ //鏄惁棣栦欢
+ form.on('checkbox(HQCFst)', 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.HQCFst = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+ //鏄惁鏈
+ form.on('checkbox(HQCProc)', 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.HQCProc = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+ ///鏄惁宸℃
+ form.on('checkbox(HQCPatrol)', 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.HQCPatrol = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+ //鎺掍骇宸ュ簭鏍囪
+ form.on('checkbox(HSortProcFlag)', 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.HSortProcFlag = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
}
});
});
@@ -810,18 +1195,23 @@
//鏂板琛岃〃鏍兼暟鎹�
var NewRow = {
- "HProcNo": (table.cache["mainTable"].length + 1) * 10, "HProcID_S": 0, "HProcType": "涓诲伐搴�", "HCenterID_S": 0, "HCenterID_SName": ""
+ "HProcNo": (table.cache["mainTable"].length + 1) * 10, "HProcID_S": 0, "HProcType": "涓诲伐搴�", "HCenterID_S": 0, "HCenterID_SName": "","宸ュ簭浠g爜":""
, "HWorkQty_S": 0, "HSubStdEmpQty_S": 0, "HMouldNo": "", "HChangeMould": 0, "HPackStd": ""
- , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "宸ュ簭": ""
+ , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "宸ュ簭": "","宸ユ":""
, "HProcID": 0, "宸ヤ綔涓績浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績": "", "HSupID": 0
- , "渚涘簲鍟嗕唬鐮�": "", "渚涘簲鍟�": "", "HSupFlag": false, "HTimeUnit": "", "HUnitTime": 0
- , "HWorkQty": 1, "HPassRate": 100, "HOverRate": 0, "HReadyTime": 0, "HQueueTime": 0
+ , "渚涘簲鍟嗕唬鐮�": "", "渚涘簲鍟�": "", "HSupFlag": false, "HSortProcFlag": false, "HTimeUnit": "", "HUnitTime": 0
+ , "HWorkQty": 1, "HSNCtrl": false, "HPassRate": 100, "HOverRate": 0, "HReadyTime": 0, "HQueueTime": 0
, "HMoveTime": 0, "HNextProcFlag": false, "HFlowProc": false, "HSubStdEmpQty": 0, "HSubCanUseSourceQty": 0
, "HFixPrice": 0, "HProcPrice": 0, "HBadPrice": 0, "HWasterPrice": 0, "HStdFlag": false
, "HBeginDayQty": 0, "HBeginFixQty": 0, "HFixWorkDays": 0, "HTrunWorkDays": 0, "HReadyTimes": 0
, "HICMOReadyTimes": 0, "HAutoTrunFlag": false, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
, "HProcWorkNum": "", "HBadWHID": 0, "HBadWHName": "", "HWasterWHID": 0, "HWasterWHName": ""
- , "HWHID": 0, "HWHName": "", "HRemark": ""
+ , "HWHID": 0, "HWHName": "", "HRemark": "", "HWorkTimes_S": 0
+ , "HQCSchemeID_Fst": 0, "HQCSchemeNumber_Fst": "", "HQCSchemeName_Fst": ""
+ , "HQCSchemeID_Proc": 0, "HQCSchemeNumber_Proc": "", "HQCSchemeName_Proc": ""
+ , "HQCSchemeID_Patrol": 0, "HQCSchemeNumber_Patrol": "", "HQCSchemeName_Patrol": ""
+ , "HQCFst": false, "HQCProc": false, "HQCPatrol": false, "HMaterToSourceCtrl": false
+ , "HSubStdEmpAvg_S": 0, "鏍囧噯宸ヤ环": 0, "HYDCoefficient": 0
};
switch (obj.event) {
case 'btn-AddLine':
@@ -834,6 +1224,30 @@
//濮斿鍗忓姪
if (option.data[i - 1].HSupFlag) {
$('#HSupFlag' + i + '').attr("checked", true);
+ }
+ //SN杩囩珯鎺у埗
+ if (option.data[i - 1].HSNCtrl) {
+ $('#HSNCtrl' + i + '').attr("checked", true);
+ }
+ //涓婃枡闃查敊鎺у埗
+ if (option.data[i - 1].HMaterToSourceCtrl) {
+ $('#HMaterToSourceCtrl' + i + '').attr("checked", true);
+ }
+ //鏄惁棣栦欢
+ if (option.data[i - 1].HQCFst) {
+ $('#HQCFst' + i + '').attr("checked", true);
+ }
+ //鏄惁鏈
+ if (option.data[i - 1].HQCProc) {
+ $('#HQCProc' + i + '').attr("checked", true);
+ }
+ //鏄惁宸℃
+ if (option.data[i - 1].HQCPatrol) {
+ $('#HQCPatrol' + i + '').attr("checked", true);
+ }
+ //鎺掍骇宸ュ簭鏍囪
+ if (option.data[i - 1].HSortProcFlag) {
+ $('#HSortProcFlag' + i + '').attr("checked", true);
}
//涓嬮亾娴佽浆宸ュ簭
if (option.data[i - 1].HNextProcFlag) {
@@ -875,6 +1289,30 @@
if (option.data[i - 1].HSupFlag) {
$('#HSupFlag' + i + '').attr("checked", true);
}
+ //SN杩囩珯鎺у埗
+ if (option.data[i - 1].HSNCtrl) {
+ $('#HSNCtrl' + i + '').attr("checked", true);
+ }
+ //涓婃枡闃查敊鎺у埗
+ if (option.data[i - 1].HMaterToSourceCtrl) {
+ $('#HMaterToSourceCtrl' + i + '').attr("checked", true);
+ }
+ //鏄惁棣栦欢
+ if (option.data[i - 1].HQCFst) {
+ $('#HQCFst' + i + '').attr("checked", true);
+ }
+ //鏄惁鏈
+ if (option.data[i - 1].HQCProc) {
+ $('#HQCProc' + i + '').attr("checked", true);
+ }
+ //鏄惁宸℃
+ if (option.data[i - 1].HQCPatrol) {
+ $('#HQCPatrol' + i + '').attr("checked", true);
+ }
+ //鎺掍骇宸ュ簭鏍囪
+ if (option.data[i - 1].HSortProcFlag) {
+ $('#HSortProcFlag' + i + '').attr("checked", true);
+ }
//涓嬮亾娴佽浆宸ュ簭
if (option.data[i - 1].HNextProcFlag) {
$('#HNextProcFlag' + i + '').attr("checked", true);
@@ -899,19 +1337,19 @@
//鍒楄缃�
case 'set_HideColumn':
get_HideColumn();
- break;
+ break;
//涓婁竴琛�
case 'btn_up':
btn_up(data);
- break;
+ break;
//涓嬩竴琛�
case 'btn_under':
btn_under(data);
- break;
+ break;
//鍒锋柊娴佹按鍙�
case 'btn_Refresh':
btn_Refresh(data);
- break;
+ break;
}
});
@@ -938,6 +1376,41 @@
}
})
+ //鏄庣粏缃戞牸鍗曞厓鏍肩紪杈戜簨浠�
+ table.on('edit(mainTable)', function (obj) {
+ var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
+ , data = obj.data //寰楀埌鎵�鍦ㄨ鎵�鏈夐敭鍊�
+ , field = obj.field; //寰楀埌瀛楁
+ switch (field) {
+ case 'HSubStdEmpQty_S': //浜х嚎浜烘暟
+ if (value != 0 && value != "" && data.HSubStdEmpAvg_S != 0 && data.HSubStdEmpAvg_S != "") {
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HWorkQty: Number((value * data.HSubStdEmpAvg_S).toFixed(2))
+ });
+ //table.render(option)
+ }
+ break;
+ case 'HSubStdEmpAvg_S': //浜х嚎浜哄潎浜ц兘
+ if (value != 0 && value != "" && data.HSubStdEmpQty_S != 0 && data.HSubStdEmpQty_S != "") {
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HWorkQty: Number((value * data.HSubStdEmpQty_S).toFixed(2))
+ });
+ //table.render(option)
+ }
+ break;
+ case 'HWorkQty': //绾﹀綋绯绘暟
+ if (localStorage["HBenchmarkValue"] != undefined && localStorage["HBenchmarkValue"] != null && data.HWorkQty > 0) {
+ obj.update({
+ HYDCoefficient: !isNaN(parseFloat((localStorage["HBenchmarkValue"] / data.HWorkQty).toFixed(6))) == true ? (localStorage["HBenchmarkValue"] / data.HWorkQty).toFixed(6) : 0
+ });
+ }
+ break;
+
+ }
+ })
+
$('#HName').on('keydown', function (event) {//宸ヨ壓璺嚎鍚嶇О
if (event.keyCode == 118) {
layer.msg("宸ヨ壓璺嚎鍚嶇ОF7鎸夐挳")
@@ -946,11 +1419,36 @@
//淇濆瓨鎻愪氦
form.on('submit(btnSave)', function (data) {//鎻愪氦
- if (AllowLoadData(data)) {
- set_AddNew(data);
+ const procNos = table.cache["mainTable"].map(item => Number(item.HProcNo));
+ if (isSortedAscending(procNos) && haveHProcNO9999()) {
+ if (AllowLoadData(data)) {
+ set_AddNew(data);
+ }
+ } else {
+ layer.msg('璇锋敞鎰忔祦姘村彿娆″簭鎴栬�呮槸鍚︽湁杞伐搴�');
}
});
-
+ // 鍑芥暟锛氬垽鏂暟缁勬槸鍚︿粠灏忓埌澶ф帓搴�
+ function isSortedAscending(arr) {
+ for (let i = 0; i < arr.length - 1; i++) {
+ if (arr[i] > arr[i + 1]) {
+ return false;
+ }
+ }
+ return true;
+ }
+ //澶嶅埗鏃朵繚璇佽浆宸ュ簭瀛樺湪
+ function haveHProcNO9999() {
+ if (OperationType == 2 || OperationType == 3) {
+ for (var i = 0; i < option.data.length; i++) {
+ if (option.data[i]["HProcNo"] == 9999 && option.data[i]["宸ュ簭浠g爜"] == 9999) {
+ return true
+ }
+ }
+ return false;
+ }
+ return true;
+ }
//閫�鍑�
form.on('submit(btnEdit)', function (data) {
if (params[1] != null) {
@@ -958,150 +1456,6 @@
} else if (params[1] == null) {
Pub_Close(2);
}
- });
-
- //閫夋嫨涓嶈壇鍘熷洜
- form.on('submit(HBadReasonID-BT)', function () {//閫夋嫨浠撳簱
- layer.open({
- type: 2
- , area: ['80%', '80%']
- , title: '涓嶈壇鍘熷洜鍒楄〃'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_BadReasonList.html', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
-
- //閫夋嫨宸ュ簭璁″垝鍗�
- form.on('submit(HPlanID-BT)', function () {//閫夋嫨宸ュ簭璁″垝鍗�
- layer.open({
- type: 2
- , area: ['80%', '80%']
- , title: '宸ュ簭璁″垝鍗曞垪琛�'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Sc_ProcessPlanViewList.html', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
-
- //閫夋嫨璐d换浜�
- form.on('submit(HEmployeeID-BT)', function () {//閫夋嫨璐d换浜�
- layer.open({
- type: 2
- , area: ['80%', '80%']
- , title: '鑱屽憳鍒楄〃'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
-
- //閫夋嫨鐢宠宸ュ簭
- form.on('submit(HSQProcID-BT)', function () {//閫夋嫨鐢宠宸ュ簭
- layer.open({
- type: 2
- , area: ['80%', '80%']
- , title: '鐢宠宸ュ簭鍒楄〃'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_ProcList.html', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
-
- //閫夋嫨璐d换宸ュ簭
- form.on('submit(HZRProcID-BT)', function () {//閫夋嫨璐d换宸ュ簭
- layer.open({
- type: 2
- , area: ['80%', '80%']
- , title: '璐d换宸ュ簭鍒楄〃'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_ProcList.html?Type=HZR', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
-
- //缂栬緫
- form.on('submit(cmdModify)', function () {//缂栬緫
- var sSubStr = table.cache['wl-table'];
- //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '鏄庣粏鍒楄〃'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/鍏叡椤甸潰/Kf_BarCodeEditDlg.html?table=' + JSON.stringify(sSubStr), 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- // }
- });
-
- form.on('submit(Cancel)', function () {
- //sessionStorage["SourceFlag"] = false;
- parent.location.href = "../../../views/index.html"
- //window.close();//鍏抽棴褰撳墠椤�
- })
-
-
- form.on('submit(Saver)', function (data) { //淇濆瓨
- //debugger;
- var sMainStr = JSON.stringify(data.field);
- var sSubStr = JSON.stringify(table.cache['mainTable']);
- var sMainSub = sMainStr + ';' + sSubStr;
- $.ajax(
- {
- type: "POST",
- url: GetWEBURL() + "SaveBadReasonList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- async: true,
- data: { "msg": sMainSub },
- dataType: "json",
- success: function (data) {
- if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- layer.msg(data.Message, { icon: 1 });
- $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
- }
- else {
-
- f_alert(data.Message);
- console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
- }
- layer.closeAll("loading");
- },
- error: function (err) {
-
- f_alert("閿欒:" + err);
- console.log("Reason" + sMainStr);
- }
- });
});
//鐩戝惉鎻愪氦
@@ -1147,13 +1501,15 @@
//浜у搧閫夋嫨椤甸潰
function get_checkSearchMater() {
+ var HOrgID = $("#HOrgID").val();
+
layer.open({
type: 2//寮圭獥绫诲瀷
, skin: 'layui-layer-rim' //鍔犱笂杈规
, area: ['90%', '90%']//澶у皬
, title: '鐗╂枡琛�'//鏍囬
, shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ['../../Baseset/鍩虹璧勬枡/Gy_MaterialList_LSQP.html', 'yes']
+ , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html?openType=2&HOrgID=' + HOrgID, 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -1163,13 +1519,13 @@
}
//鑾峰彇鏁版嵁
$("#HMaterID").val(checkStatus.data[0].HItemID);//鐗╂枡id
- $("#HMaterName").val(checkStatus.data[0].HName);//鐗╂枡鍚嶇О
- $("#HMaterNumber").val(checkStatus.data[0].HNumber);//鐗╂枡浠g爜
- $("#HMaterModel").val(checkStatus.data[0].HModel);//瑙勬牸鍨嬪彿
+ $("#HMaterName").val(checkStatus.data[0].鐗╂枡鍚嶇О);//鐗╂枡鍚嶇О
+ $("#HMaterNumber").val(checkStatus.data[0].鐗╂枡浠g爜);//鐗╂枡浠g爜
+ $("#HMaterModel").val(checkStatus.data[0].瑙勬牸鍨嬪彿);//瑙勬牸鍨嬪彿
$("#HUnitID").val(checkStatus.data[0].HUnitID);//璁¢噺鍗曚綅id
- $("#HUnitName").val(checkStatus.data[0].HUnitName);//璁¢噺鍗曚綅鍚嶇О
+ $("#HUnitName").val(checkStatus.data[0].璁¢噺鍗曚綅鍚嶇О);//璁¢噺鍗曚綅鍚嶇О
if ($("#HName").val() == "") {
- $("#HName").val(checkStatus.data[0].HNumber + '/' + checkStatus.data[0].HName + '/' + checkStatus.data[0].HModel);
+ $("#HName").val(checkStatus.data[0].鐗╂枡浠g爜);
}
layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -1212,7 +1568,7 @@
, area: ['90%', '90%']//澶у皬
, title: '璁¢噺鍗曚綅琛�'//鏍囬
, shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ['../../Baseset/鍩虹璧勬枡/Gy_UnitList.html', 'yes']
+ , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Unit.html', 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -1222,7 +1578,7 @@
}
//鑾峰彇鏁版嵁
$("#HUnitID").val(checkStatus.data[0].HItemID);//璁¢噺鍗曚綅id
- $("#HUnitName").val(checkStatus.data[0].HName);//璁¢噺鍗曚綅鍚嶇О
+ $("#HUnitName").val(checkStatus.data[0].璁¢噺鍗曚綅鍚嶇О);//璁¢噺鍗曚綅鍚嶇О
layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -1290,7 +1646,7 @@
, area: ['90%', '90%']//澶у皬
, title: '宸ヨ壓璺嚎澶х被鍒楄〃'//鏍囬
, shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ['../../Baseset/鍩虹璧勬枡/Gy_RoutingGroup.html', 'yes']
+ , content: ['../../璁″垝绠$悊/宸ヨ壓璺嚎澶х被/Gy_RoutingGroupList.html', 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -1299,8 +1655,8 @@
return layer.msg('璇烽�夋嫨鏁版嵁');
}
//鑾峰彇鏁版嵁
- $("#HRoutingGroupID").val(checkStatus.data[0].HItemID);//宸ヨ壓璺嚎澶х被id
- $("#HRoutingGroupIDName").val(checkStatus.data[0].HName);//宸ヨ壓璺嚎澶х被鍚嶇О
+ $("#HRoutingGroupID").val(checkStatus.data[0].id);//宸ヨ壓璺嚎澶х被id
+ $("#HRoutingGroupIDName").val(checkStatus.data[0].鍚嶇О);//宸ヨ壓璺嚎澶х被鍚嶇О
layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -1325,9 +1681,10 @@
var rowIndex = $(obj.tr).attr("data-index");
if (obj.event === 'del') {
layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
- console.log("绱㈠紩涓�:" + rowIndex);
if (rowIndex === '0') {
layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else if (table.cache["mainTable"][obj.tr.data('index')].HProcNo == "9999") {
+ layer.msg('绯荤粺杞伐搴忥紝涓嶅厑璁稿垹闄わ紒锛侊紒');
} else {
var oldData = table.cache["mainTable"];
oldData.splice(obj.tr.data('index'), 1)
@@ -1348,7 +1705,7 @@
data: { "sWhere": "" },
success: function (result) {
if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- if (result.data == "true") {
+ if (result.data.Gy_RoutingBill_SaveAutoLastProc == "Y") {
$("#IsProNo").val("1");
$("input[name='checkboxIsProNo']").prop("checked", true);
form.render("checkbox");
@@ -1362,14 +1719,18 @@
})
}
- //瀹℃牳
- function set_CheckBill() {
- layer.confirm("纭瑕佸鏍稿悧?", function (index) {
+ //鍚敤榛樿
+ function set_defaultRoute() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ var HInterID = $("#HInterID").val();
+
+ layer.confirm("纭瑕佸惎鐢ㄨ宸ヨ壓璺嚎涓虹墿鏂欓粯璁ゅ伐鑹鸿矾绾垮悧?", function (index) {
var wait = layer.load();
$.ajax({
- url: GetWEBURL() + '/Gy_RoutingBill/AuditGy_RoutingBill',
+ url: GetWEBURL() + '/Gy_RoutingBill/set_defaultRoute',
type: "GET",
- data: { "HInterID": $("#HInterID").val(), "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
+ data: { "HInterID": HInterID, "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
success: function (result) {
if (result.count == 1) {
layer.msg(result.Message, { icon: 1 });
@@ -1386,14 +1747,163 @@
})
}
+ //#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
+
+ //#region 鍙戣捣瀹℃壒
+ function set_startCheckBill() {
+ var hmainid = $("#HInterID").val();
+ if (hmainid != 0) {
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Gy_Routing/StartCheckFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": hmainid, "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);
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ else {
+ layer.msg('璇蜂繚瀛樺悗鍐嶅彂璧凤紒');
+ }
+ }
+ //#endregion
+
+ //瀹℃牳
+ function set_CheckBill() {
+ layer.confirm("纭瑕佸鏍稿悧?", function (index) {
+ var wait = layer.load();
+ var HInterID = $("#HInterID").val();
+ $.ajax({
+ url: GetWEBURL() + '/Gy_RoutingBill/CheckGy_RoutingBill',
+ type: "GET",
+ data: { "HInterID": HInterID, "Type": 1, "user": sessionStorage["HUserName"], "HBillSubType": "3301"},
+ success: function (result) {
+ if (result.count == 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) {
+ layer.msg(result2.Message, { icon: 1 });
+ } else {
+ layer.alert(result2.code + result2.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ })
+ layer.close(wait);
+ } else {
+ layer.close(wait);
+ layer.close(index);
+ }
+ }, error: function () {
+ layer.close(wait);
+ layer.close(index);
+ }
+ });
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(wait);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
+ }
+ });
+ })
+ }
+
//鍙嶅鏍�
function set_AbandonCheck() {
layer.confirm("纭瑕佸弽瀹℃牳鍚�?", function (index) {
+ var HInterID = $("#HInterID").val();
var wait = layer.load();
$.ajax({
- url: GetWEBURL() + '/Gy_RoutingBill/AuditGy_RoutingBill',
+ url: GetWEBURL() + '/Gy_RoutingBill/CheckGy_RoutingBill',
type: "GET",
- data: { "HInterID": $("#HInterID").val(), "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] },
+ data: { "HInterID": HInterID, "Type": 2, "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
success: function (result) {
if (result.count == 1) {
layer.msg(result.Message, { icon: 1 });
@@ -1413,11 +1923,12 @@
//鍏抽棴
function set_CloseBill() {
layer.confirm("纭瑕佸叧闂悧?", function (index) {
+ var HInterID = $("#HInterID").val();
var wait = layer.load();
$.ajax({
- url: GetWEBURL() + '/Gy_RoutingBill/CloseGy_RoutingBill',
+ url: GetWEBURL() + '/Gy_RoutingBill/CloseGy_RoutingBill_1',
type: "GET",
- data: { "HInterID": $("#HInterID").val(), "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
+ data: { "HInterID": HInterID, "Type": 1, "user": sessionStorage["HUserName"], "HBillSubType": "" },
success: function (result) {
if (result.count == 1) {
layer.msg(result.Message, { icon: 1 });
@@ -1437,11 +1948,12 @@
//鍙嶅叧闂�
function set_CancelCloseBill() {
layer.confirm("纭瑕佸弽鍏抽棴鍚�?", function (index) {
+ var HInterID = $("#HInterID").val();
var wait = layer.load();
$.ajax({
- url: GetWEBURL() + '/Gy_RoutingBill/CloseGy_RoutingBill',
+ url: GetWEBURL() + '/Gy_RoutingBill/CloseGy_RoutingBill_1',
type: "GET",
- data: { "HInterID": $("#HInterID").val(), "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] },
+ data: { "HInterID": HInterID, "Type": 1, "user": sessionStorage["HUserName"], "HBillSubType": "" },
success: function (result) {
if (result.count == 1) {
layer.msg(result.Message, { icon: 1 });
@@ -1457,6 +1969,163 @@
});
})
}
+
+ //#region 澶氱骇 鍙嶅鏍�/瀹℃牳鏁版嵁
+ function set_CheckBill_Flow(num) {
+ var InterID = $("#HInterID").val();
+ if (InterID != 0) {
+ //閫昏緫瀹℃牳鏂规硶
+ $.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() {
+ var InterID = $("#HInterID").val();
+ if (InterID != 0) {
+ //閫昏緫瀹℃牳鏂规硶
+ $.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
+
+ //#region 鎾ゅ洖
+ function set_WithdrawCheck_Flow() {
+ var InterID = $("#HInterID").val();
+ if (InterID != 0) {
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Gy_Routing/WithdrawCheckFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ });
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#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_Copy() {
+ $('#btnSave').removeClass("layui-btn-disabled").attr("disabled", false);
+ //鍒跺崟浜�
+ $("#HMaker").val(sessionStorage["HUserName"]);
+ $("#hmakers").val(sessionStorage["HUserName"]);
+ $("#hmakedate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(2100, 12, 31), "yyyy-MM-dd"));
+ //璁剧疆hinterid
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetMAXNum",
+ type: "GET",
+ async: false,
+ data: { "HBillType": '3301' },
+ success: function (d) {
+ $("#HInterID").val(d.data[0].HInterID);
+ $("#HBillNo").val(d.data[0].HBillNo);
+ $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+ }
+ });
+ OperationType = 2;
+ }
+ //#endregion
+
+ //#region 鏌ョ湅瀹℃壒杩涘害
+ function set_CheckFlowInfo() {
+ var InterID = $("#HInterID").val();
+ if (InterID != 0) {
+ 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=' + InterID + '&HSouceBillType=3301'
+ , 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('璇烽�夋嫨姝g‘鏁版嵁鏌ョ湅锛�');
+ }
+ }
+ //#endregion
//琛屽唴鍒犻櫎蹇嵎閿�
function set_GridCellCheck(obj) {
@@ -1503,14 +2172,14 @@
, shift: 2 //寮瑰嚭鍔ㄧ敾
, area: ["90%", "90%"] //绐椾綋澶у皬
, maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
- , content: ["../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.html", "yes"]
+ , content: ["../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.html?Type=HProcess", "yes"]
, btn: ["纭畾", "鍙栨秷"]
, btn1: function (index, laero) {
//鎸夐挳涓� 鐨勫洖璋�
var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
- if (checkStatus.data.length ==0) {
+ if (checkStatus.data.length == 0) {
return layer.msg("璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�!");
}
@@ -1527,7 +2196,7 @@
NowNum = i + 1;
}
}
-
+
//鏌ヨ宸ヤ綔涓績鐨勬暟鎹�
var WorkCente = [];
var sWhere = "select isnull(a.HItemID,'') HCenterID, isnull(a.HNumber,'') 宸ヤ綔涓績浠g爜, isnull(a.HName,'') 宸ヤ綔涓績鍚嶇О ,p.HItemID HProcID,p.HName 宸ュ簭鍚嶇О from Gy_Process p left join Gy_WorkCenter a on p.HWorkCenterID=a.HItemID where p.HNumber in (" + ProcessNumber.toString() + ") order by p.HNumber ";
@@ -1558,28 +2227,39 @@
var j = 0;
for (var i = (NowNum - 1); i < option.data.length; i++) {
option.data[i]["宸ュ簭"] = WorkCente[j]["宸ュ簭鍚嶇О"];
+ option.data[i]["宸ュ簭浠g爜"] = ProcessNumber[j].substring(1, ProcessNumber[j].length - 1);
option.data[i]["HProcID"] = WorkCente[j]["HProcID"];
option.data[i]["宸ヤ綔涓績"] = WorkCente[j]["宸ヤ綔涓績鍚嶇О"];
option.data[i]["HCenterID"] = WorkCente[j]["HCenterID"];
option.data[i]["宸ヤ綔涓績浠g爜"] = WorkCente[j]["宸ヤ綔涓績浠g爜"];
+ option.data[i]["HProcID_S"] = checkStatus.data[j]["HProcMulID"];
+ option.data[i]["宸ユ"] = checkStatus.data[j]["宸ユ鍚嶇О"];
+ option.data[i]["鏍囧噯宸ヤ环"] = checkStatus.data[j]["鏍囧噯宸ヤ环"];
+
+
j++;
}
//鍦ㄤ笅鏂规坊鍔犳柊鐨勮〃鏍兼暟鎹�
for (var i = 0; i < num; i++) {
option.data.push({
- "HProcNo": (table.cache["mainTable"].length + i + 1) * 10, "HProcID_S": 0, "HProcType": "涓诲伐搴�", "HCenterID_S": 0, "HCenterID_SName": ""
+ "HProcNo": (table.cache["mainTable"].length + i + 1) * 10, "HProcID_S": 0, "HProcType": "涓诲伐搴�", "HCenterID_S": 0, "HCenterID_SName": "", "宸ュ簭浠g爜": ProcessNumber[j].substring(1, ProcessNumber[j].length - 1)
, "HWorkQty_S": 0, "HSubStdEmpQty_S": 0, "HMouldNo": "", "HChangeMould": 0, "HPackStd": ""
, "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "宸ュ簭": WorkCente[j]["宸ュ簭鍚嶇О"]
, "HProcID": WorkCente[j]["HProcID"], "宸ヤ綔涓績浠g爜": WorkCente[j]["宸ヤ綔涓績浠g爜"], "HCenterID": WorkCente[j]["HCenterID"], "宸ヤ綔涓績": WorkCente[j]["宸ヤ綔涓績鍚嶇О"], "HSupID": 0
- , "渚涘簲鍟嗕唬鐮�": "", "渚涘簲鍟�": "", "HSupFlag": false, "HTimeUnit": "", "HUnitTime": 0
- , "HWorkQty": 1, "HPassRate": 100, "HOverRate": 0, "HReadyTime": 0, "HQueueTime": 0
+ , "渚涘簲鍟嗕唬鐮�": "", "渚涘簲鍟�": "", "HSupFlag": false, "HSortProcFlag": false, "HTimeUnit": "", "HUnitTime": 0
+ , "HWorkQty": 1, "HSNCtrl": false, "HPassRate": 100, "HOverRate": 0, "HReadyTime": 0, "HQueueTime": 0
, "HMoveTime": 0, "HNextProcFlag": false, "HFlowProc": false, "HSubStdEmpQty": 0, "HSubCanUseSourceQty": 0
, "HFixPrice": 0, "HProcPrice": 0, "HBadPrice": 0, "HWasterPrice": 0, "HStdFlag": false
, "HBeginDayQty": 0, "HBeginFixQty": 0, "HFixWorkDays": 0, "HTrunWorkDays": 0, "HReadyTimes": 0
, "HICMOReadyTimes": 0, "HAutoTrunFlag": false, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
, "HProcWorkNum": "", "HBadWHID": 0, "HBadWHName": "", "HWasterWHID": 0, "HWasterWHName": ""
- , "HWHID": 0, "HWHName": "", "HRemark": ""
+ , "HWHID": 0, "HWHName": "", "HRemark": "", "HWorkTimes_S": 0
+ , "HQCSchemeID_Fst": 0, "HQCSchemeNumber_Fst": "", "HQCSchemeName_Fst": ""
+ , "HQCSchemeID_Proc": 0, "HQCSchemeNumber_Proc": "", "HQCSchemeName_Proc": ""
+ , "HQCSchemeID_Patrol": 0, "HQCSchemeNumber_Patrol": "", "HQCSchemeName_Patrol": ""
+ , "HQCFst": false, "HQCProc": false, "HQCPatrol": false, "HMaterToSourceCtrl": false
+ , "HSubStdEmpAvg_S": 0, "鏍囧噯宸ヤ环": 0, "HYDCoefficient": 0
})
j++;
}
@@ -1588,10 +2268,16 @@
var j = 0;
for (var i = (NowNum - 1); i < (NowNum - 1) + ProcessNumber.length; i++) {
option.data[i]["宸ュ簭"] = WorkCente[j]["宸ュ簭鍚嶇О"];
+ option.data[i]["宸ュ簭浠g爜"] = ProcessNumber[j].substring(1, ProcessNumber[j].length - 1);
option.data[i]["HProcID"] = WorkCente[j]["HProcID"];
option.data[i]["宸ヤ綔涓績"] = WorkCente[j]["宸ヤ綔涓績鍚嶇О"];
option.data[i]["HCenterID"] = WorkCente[j]["HCenterID"];
option.data[i]["宸ヤ綔涓績浠g爜"] = WorkCente[j]["宸ヤ綔涓績浠g爜"];
+ option.data[i]["HProcID_S"] = checkStatus.data[j]["HProcMulID"];
+ option.data[i]["宸ユ"] = checkStatus.data[j]["宸ユ鍚嶇О"];
+ option.data[i]["鏍囧噯宸ヤ环"] = checkStatus.data[j]["鏍囧噯宸ヤ环"];
+ option.data[i]["HWorkQty"] = option.data[i]["HProcPrice"] != 0 ? (checkStatus.data[j]["鏍囧噯宸ヤ环"] / option.data[i]["HProcPrice"]).toFixed(2) : option.data[i]["HWorkQty"];
+ option.data[i]["HYDCoefficient"] = !isNaN(parseFloat((localStorage["HBenchmarkValue"] / (option.data[i]["HProcPrice"] != 0 ? (checkStatus.data[j]["鏍囧噯宸ヤ环"] / option.data[i]["HProcPrice"]).toFixed(2) : option.data[i]["HWorkQty"])).toFixed(6))) == true ? (localStorage["HBenchmarkValue"] / (option.data[i]["HProcPrice"] != 0 ? (checkStatus.data[j]["鏍囧噯宸ヤ环"] / option.data[i]["HProcPrice"]).toFixed(2) : option.data[i]["HWorkQty"])).toFixed(6) : 0;//绾﹀綋绯绘暟=鍩哄噯鍊�/灏忔椂浜ц兘
j++;
}
}
@@ -1599,7 +2285,7 @@
//var HCenterID = 0;
//var HCenterNUmber = "";
//var HCenterName = "";
-
+
////鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
//obj.update({
@@ -1612,20 +2298,40 @@
layer.close(index);//鍏抽棴寮圭獥
}
+ , end: function () {
+ if (OptionData.length > 0) {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "宸ュ簭": OptionData[0].宸ュ簭鍚嶇О
+ , "宸ュ簭浠g爜": OptionData[0].宸ュ簭浠g爜
+ , "HProcID": OptionData[0].HItemID
+ , "宸ヤ綔涓績": OptionData[0].宸ヤ綔涓績
+ , "HCenterID": OptionData[0].HWorkCenterID
+ , "宸ヤ綔涓績浠g爜": OptionData[0].宸ヤ綔涓績浠g爜
+ , "HProcID_S": OptionData[0].HProcMulID
+ , "宸ユ": OptionData[0].宸ユ鍚嶇О
+ , "鏍囧噯宸ヤ环": OptionData[0].鏍囧噯宸ヤ环
+ , "HWorkQty": obj.data.HProcPrice != 0 ? (OptionData[0].鏍囧噯宸ヤ环 / obj.data.HProcPrice).toFixed(2) : obj.data.HWorkQty
+ , "HYDCoefficient": !isNaN(parseFloat((localStorage["HBenchmarkValue"] / (obj.data.HProcPrice != 0 ? (OptionData[0].鏍囧噯宸ヤ环 / obj.data.HProcPrice).toFixed(2) : obj.data.HWorkQty)).toFixed(6))) == true ? (localStorage["HBenchmarkValue"] / (obj.data.HProcPrice != 0 ? (OptionData[0].鏍囧噯宸ヤ环 / obj.data.HProcPrice).toFixed(2) : obj.data.HWorkQty)).toFixed(6) : 0
+
+ })
+ OptionData = [];
+ }
+ }
})
}
- //宸ヤ綔涓績
- if (obj.event == "CheckHCenterID") {
+ //宸ユ
+ if (obj.event == "CheckHProcMulID") {
//鎵撳紑浜哄憳琛� 灏忕獥浣�
layer.open({
type: 2
, skin: "layui-layer-rim" //鍔犱笂杈规
- , title: "浜哄憳鍒楄〃" //鏍囬
+ , title: "宸ユ鍒楄〃" //鏍囬
, closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
, shift: 2 //寮瑰嚭鍔ㄧ敾
, area: ["90%", "90%"] //绐椾綋澶у皬
, maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
- , content: ["../../Baseset/鍩虹璧勬枡/Gy_WorkCenterList.html", "yes"]
+ , content: ["../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_ProcMul.html", "yes"]
, btn: ["纭畾", "鍙栨秷"]
, btn1: function (index, laero) {
//鎸夐挳涓� 鐨勫洖璋�
@@ -1637,11 +2343,62 @@
}
//鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
obj.update({
- "宸ヤ綔涓績": checkStatus.data[0].宸ヤ綔涓績
+ "宸ユ": checkStatus.data[0].宸ユ鍚嶇О
+ , "HProcID_S": checkStatus.data[0].HItemID
+ })
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ , end: function () {
+ if (OptionData.length > 0) {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "宸ユ": OptionData[0].宸ユ鍚嶇О
+ , "HProcID_S": OptionData[0].HItemID
+ })
+ OptionData = [];
+ }
+ }
+ })
+ }
+ //宸ヤ綔涓績
+ if (obj.event == "CheckHCenterID") {
+ //鎵撳紑浜哄憳琛� 灏忕獥浣�
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "宸ヤ綔涓績鍒楄〃" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ["../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_WorkCenter.html", "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鎸夐挳涓� 鐨勫洖璋�
+ var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+ if (checkStatus.data.length != 1) {
+ return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+ }
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "宸ヤ綔涓績": checkStatus.data[0].宸ヤ綔涓績鍚嶇О
, "HCenterID": checkStatus.data[0].HItemID
, "宸ヤ綔涓績浠g爜": checkStatus.data[0].宸ヤ綔涓績浠g爜
})
layer.close(index);//鍏抽棴寮圭獥
+ }
+ , end: function () {
+ if (OptionData.length > 0) {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "宸ヤ綔涓績": OptionData[0].宸ヤ綔涓績鍚嶇О
+ , "HCenterID": OptionData[0].HItemID
+ , "宸ヤ綔涓績浠g爜": OptionData[0].宸ヤ綔涓績浠g爜
+ })
+ OptionData = [];
+ }
}
})
}
@@ -1656,7 +2413,7 @@
, shift: 2 //寮瑰嚭鍔ㄧ敾
, area: ["90%", "90%"] //绐椾綋澶у皬
, maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
- , content: ["../../鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html", "yes"]
+ , content: ["../../鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html?type=HSup", "yes"]
, btn: ["纭畾", "鍙栨秷"]
, btn1: function (index, laero) {
//鎸夐挳涓� 鐨勫洖璋�
@@ -1673,6 +2430,17 @@
, "渚涘簲鍟嗕唬鐮�": checkStatus.data[0].渚涘簲鍟嗕唬鐮�
})
layer.close(index);//鍏抽棴寮圭獥
+ }
+ , end: function () {
+ if (OptionData.length > 0) {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "渚涘簲鍟�": OptionData[0].渚涘簲鍟嗗悕绉�
+ , "HSupID": OptionData[0].HItemID
+ , "渚涘簲鍟嗕唬鐮�": OptionData[0].渚涘簲鍟嗕唬鐮�
+ })
+ OptionData = [];
+ }
}
})
}
@@ -1768,28 +2536,250 @@
}
})
}
+ //棣栦欢妫�楠屾柟妗�
+ if (obj.event == "HQCSchemeNumber_Fst") {
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '妫�楠屾柟妗堝垪琛�'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_QCCheckProjectListView.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('璇烽�夋嫨鏁版嵁');
+ }
+ obj.update({
+ "HQCSchemeID_Fst": checkStatus.data[0].HItemID
+ , "HQCSchemeNumber_Fst": checkStatus.data[0].妫�楠屾柟妗堜唬鐮�
+ , "HQCSchemeName_Fst": checkStatus.data[0].鏂规鍚嶇О
+ })
+
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
+ }
+ //杞簭妫�楠屾柟妗�
+ if (obj.event == "HQCSchemeNumber_Proc") {
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '妫�楠屾柟妗堝垪琛�'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_QCCheckProjectListView.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('璇烽�夋嫨鏁版嵁');
+ }
+ obj.update({
+ "HQCSchemeID_Proc": checkStatus.data[0].HItemID
+ , "HQCSchemeNumber_Proc": checkStatus.data[0].妫�楠屾柟妗堜唬鐮�
+ , "HQCSchemeName_Proc": checkStatus.data[0].鏂规鍚嶇О
+ })
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
+ }
+ //宸℃妫�楠屾柟妗�
+ if (obj.event == "HQCSchemeNumber_Patrol") {
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '妫�楠屾柟妗堝垪琛�'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_QCCheckProjectListView.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('璇烽�夋嫨鏁版嵁');
+ }
+ obj.update({
+ "HQCSchemeID_Patrol": checkStatus.data[0].HItemID
+ , "HQCSchemeNumber_Patrol": checkStatus.data[0].妫�楠屾柟妗堜唬鐮�
+ , "HQCSchemeName_Patrol": checkStatus.data[0].鏂规鍚嶇О
+ })
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
+ }
obj.event = "";
return false;
}
})
+
+ //宸ュ簭琛ㄦ牸涓嬫媺鎼滅储妗�
+ tableSelect.render({
+ elem: 'td[data-field="宸ュ簭"] .layui-table-edit',
+ searchKey: '宸ュ簭浠g爜,宸ュ簭鍚嶇О',
+ sWhere: " and 鏄庣粏鏍囪 = 'Y' and 绂佺敤鏍囪 != 'Y'",//table鎼滅储sWhere鏉′欢
+ ajaxSelect: function (sWhere) {
+ var data = '';
+ $.ajax({
+ url: GetWEBURL() + '/Gy_Process/list',
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
+ async: false,
+ success: function (data1) {
+ if (data1.count == 1) {
+ data = data1.data
+ }
+ },
+ error: function () {
+ layer.alert('鑾峰彇鍒楄〃澶辫触锛�', { icon: 15, title: '閫氫俊閿欒' });
+ }
+ });
+ return data;
+ },//璁剧疆鍓嶇鍒嗛〉鏃跺彲浠ヨ缃殑
+ table: {
+ cols: [[
+ { type: 'radio', fixed: 'left' },
+ { field: 'HItemID', title: 'HItemID', hide: true },
+ { field: '宸ュ簭浠g爜', title: '宸ュ簭浠g爜' },
+ { field: '宸ュ簭鍚嶇О', title: '宸ュ簭鍚嶇О' },
+ { field: 'HProcMulID', title: 'HProcMulID', hide: true },
+ { field: '宸ユ鍚嶇О', title: '宸ユ鍚嶇О' }
+ ]],
+ page: true,
+ limit: 5,
+ //limits: [5]
+ },
+ done: function (elem, data) {
+ $(".layui-table-edit").blur();//鍗曞厓鏍煎け鍘荤劍鐐�
+ //鑾峰彇宸ュ簭浠g爜
+ var ProcessNumber = [];
+ for (var i = 0; i < data.data.length; i++) {
+ ProcessNumber.push("'" + data.data[i]["宸ュ簭浠g爜"] + "'");
+ }
+
+ //鑾峰彇褰撳墠浣嶇疆鎵�鍦ㄨ鏁�
+ var NowNum = 0;
+ for (var i = 0; i < option.data.length; i++) {
+ if (obj.data["HProcNo"] == option.data[i]["HProcNo"]) {
+ NowNum = i + 1;
+ }
+ }
+
+ //鏌ヨ宸ヤ綔涓績鐨勬暟鎹�
+ var WorkCente = [];
+ var sWhere = "select isnull(a.HItemID,'') HCenterID, isnull(a.HNumber,'') 宸ヤ綔涓績浠g爜, isnull(a.HName,'') 宸ヤ綔涓績鍚嶇О ,p.HItemID HProcID,p.HName 宸ュ簭鍚嶇О,p.HStandardWages 鏍囧噯宸ヤ环 from Gy_Process p left join Gy_WorkCenter a on p.HWorkCenterID=a.HItemID where p.HNumber in (" + ProcessNumber.toString() + ") order by p.HNumber ";
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async: false,
+ data: { "sWhere": sWhere },
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ WorkCente = data.data;
+ }
+ else {
+ layer.msg(data.Message, { icon: 5 });
+ }
+ layer.closeAll("loading");
+ },
+ error: function (err) {
+ layer.msg("閿欒:" + err, { icon: 5 });
+ }
+ });
+
+ //鍒ゆ柇閫夋嫨鐨勬暟鎹�绘暟 鏄惁澶т簬琛ㄦ牸鐜版湁鐨勬暟鎹�
+ if (ProcessNumber.length > option.data.length - (NowNum - 1)) {
+ //鑾峰彇琛ㄦ牸鍓╀綑琛屾暟閲�
+ var num = ProcessNumber.length - option.data.length + (NowNum - 1);
+ //寰幆璧嬪�� 鍦ㄥ凡鏈夌殑琛ㄦ牸璧嬪��
+ var j = 0;
+ for (var i = (NowNum - 1); i < option.data.length; i++) {
+ option.data[i]["宸ュ簭"] = WorkCente[j]["宸ュ簭鍚嶇О"];
+ option.data[i]["宸ュ簭浠g爜"] = ProcessNumber[j].substring(1, ProcessNumber[j].length - 1);
+ option.data[i]["HProcID"] = WorkCente[j]["HProcID"];
+ option.data[i]["宸ヤ綔涓績"] = WorkCente[j]["宸ヤ綔涓績鍚嶇О"];
+ option.data[i]["HCenterID"] = WorkCente[j]["HCenterID"];
+ option.data[i]["宸ヤ綔涓績浠g爜"] = WorkCente[j]["宸ヤ綔涓績浠g爜"];
+ option.data[i]["HProcID_S"] = data.data[j]["HProcMulID"];
+ option.data[i]["宸ユ"] = data.data[j]["宸ユ鍚嶇О"];
+ option.data[i]["鏍囧噯宸ヤ环"] = WorkCente[j]["鏍囧噯宸ヤ环"];
+ option.data[i]["HYDCoefficient"] = !isNaN(parseFloat((localStorage["HBenchmarkValue"] / option.data[i]["HWorkQty"]).toFixed(6))) == true ? (localStorage["HBenchmarkValue"] / option.data[i]["HWorkQty"]).toFixed(6) : 0;
+
+ j++;
+ }
+
+ //鍦ㄤ笅鏂规坊鍔犳柊鐨勮〃鏍兼暟鎹�
+ for (var i = 0; i < num; i++) {
+ option.data.push({
+ "HProcNo": (table.cache["mainTable"].length + i + 1) * 10, "HProcID_S": 0, "HProcType": "涓诲伐搴�", "HCenterID_S": 0, "HCenterID_SName": "", "宸ュ簭浠g爜": ProcessNumber[j].substring(1, ProcessNumber[j].length - 1)
+ , "HWorkQty_S": 0, "HSubStdEmpQty_S": 0, "HMouldNo": "", "HChangeMould": 0, "HPackStd": ""
+ , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "宸ュ簭": WorkCente[j]["宸ュ簭鍚嶇О"]
+ , "HProcID": WorkCente[j]["HProcID"], "宸ヤ綔涓績浠g爜": WorkCente[j]["宸ヤ綔涓績浠g爜"], "HCenterID": WorkCente[j]["HCenterID"], "宸ヤ綔涓績": WorkCente[j]["宸ヤ綔涓績鍚嶇О"], "HSupID": 0
+ , "渚涘簲鍟嗕唬鐮�": "", "渚涘簲鍟�": "", "HSupFlag": false, "HSortProcFlag": false, "HTimeUnit": "", "HUnitTime": 0
+ , "HWorkQty": 1, "HSNCtrl": false, "HPassRate": 100, "HOverRate": 0, "HReadyTime": 0, "HQueueTime": 0
+ , "HMoveTime": 0, "HNextProcFlag": false, "HFlowProc": false, "HSubStdEmpQty": 0, "HSubCanUseSourceQty": 0
+ , "HFixPrice": 0, "HProcPrice": 0, "HBadPrice": 0, "HWasterPrice": 0, "HStdFlag": false
+ , "HBeginDayQty": 0, "HBeginFixQty": 0, "HFixWorkDays": 0, "HTrunWorkDays": 0, "HReadyTimes": 0
+ , "HICMOReadyTimes": 0, "HAutoTrunFlag": false, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
+ , "HProcWorkNum": "", "HBadWHID": 0, "HBadWHName": "", "HWasterWHID": 0, "HWasterWHName": ""
+ , "HWHID": 0, "HWHName": "", "HRemark": "", "HWorkTimes_S": 0
+ , "HQCSchemeID_Fst": 0, "HQCSchemeNumber_Fst": "", "HQCSchemeName_Fst": ""
+ , "HQCSchemeID_Proc": 0, "HQCSchemeNumber_Proc": "", "HQCSchemeName_Proc": ""
+ , "HQCSchemeID_Patrol": 0, "HQCSchemeNumber_Patrol": "", "HQCSchemeName_Patrol": ""
+ , "HQCFst": false, "HQCProc": false, "HQCPatrol": false, "HMaterToSourceCtrl": false
+ , "HSubStdEmpAvg_S": 0, "鏍囧噯宸ヤ环": 0, "HYDCoefficient": 0
+ })
+ j++;
+ }
+ } else {
+ //寰幆璧嬪�� 鍦ㄥ凡鏈夌殑琛ㄦ牸璧嬪��
+ var j = 0;
+ for (var i = (NowNum - 1); i < (NowNum - 1) + ProcessNumber.length; i++) {
+ option.data[i]["宸ュ簭"] = WorkCente[j]["宸ュ簭鍚嶇О"];
+ option.data[i]["宸ュ簭浠g爜"] = ProcessNumber[j].substring(1, ProcessNumber[j].length - 1);
+ option.data[i]["HProcID"] = WorkCente[j]["HProcID"];
+ option.data[i]["宸ヤ綔涓績"] = WorkCente[j]["宸ヤ綔涓績鍚嶇О"];
+ option.data[i]["HCenterID"] = WorkCente[j]["HCenterID"];
+ option.data[i]["宸ヤ綔涓績浠g爜"] = WorkCente[j]["宸ヤ綔涓績浠g爜"];
+ option.data[i]["HProcID_S"] = data.data[j]["HProcMulID"];
+ option.data[i]["宸ユ"] = data.data[j]["宸ユ鍚嶇О"];
+ option.data[i]["鏍囧噯宸ヤ环"] = WorkCente[j]["鏍囧噯宸ヤ环"];
+ option.data[i]["HYDCoefficient"] = !isNaN(parseFloat((localStorage["HBenchmarkValue"] / option.data[i]["HWorkQty"]).toFixed(6))) == true ? (localStorage["HBenchmarkValue"] / option.data[i]["HWorkQty"]).toFixed(6) : 0;
+ j++;
+ }
+ }
+ table.render(option);
+
+
+
+ //setTableByHMater(obj, data);
+ }
+ })
+
+
}
//缂栬緫 椤甸潰璧嬪��
function RoadBillMain(linterid)//鍔犺浇琛ㄥご
{
- var sWhere = " and hmainid='" + linterid + "'";
+
$.ajax({
- url: GetWEBURL() + "/LEMS/MES_Gy_RoutingBillList_Json",
+ url: GetWEBURL() + "/Gy_RoutingBill/cx",
type: "GET",
async: false,
- data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ data: { "HInterID": linterid },
success: function (d) {
-
//alert(JSON.stringify(d.data[0]))
//return false;
-
var IsHStopflag = d.data[0].榛樿宸ヨ壓;
if (IsHStopflag == 1) {
$("input[name='checkboxHStandard']").prop("checked", true);
@@ -1802,12 +2792,14 @@
"HBillNo": OperationType == 2 ? "" : d.data[0].鍗曟嵁鍙�
, "HInterID": OperationType == 2 ? 0 : d.data[0].hmainid
, "HDate": Format(new Date(d.data[0].鏃ユ湡), "yyyy-MM-dd")
- , "HName": d.data[0].宸ヨ壓鍚嶇О
+ , "HBeginDate": Format(new Date(d.data[0].鐢熸晥鏃堕棿), "yyyy-MM-dd")
+ , "HEndDate": Format(new Date(d.data[0].澶辨晥鏃堕棿), "yyyy-MM-dd")
+ , "HName": OperationType == 2 ? "" : d.data[0].宸ヨ壓鍚嶇О
, "HMaterNumber": OperationType == 2 ? "" : d.data[0].鐗╂枡浠g爜
, "HMaterName": OperationType == 2 ? "" : d.data[0].鐗╂枡鍚嶇О
, "HMaterID": OperationType == 2 ? "" : d.data[0].HMaterID
, "HUnitName": d.data[0].璁¢噺鍗曚綅
- , "HUnitID": d.data[0].hunitid
+ , "HUnitID": d.data[0].HUnitID
, "HMainTimeUnit": d.data[0].杩愯鏃堕棿鍗曚綅
, "HMainProcIDName": d.data[0].宸ュ簭鍚嶇О
, "HMainProcID": d.data[0].HMainProcID
@@ -1830,6 +2822,7 @@
, "HProductNum": d.data[0].鎴愬搧缂栧彿
, "HVerNum": d.data[0].鐗堟湰
, "HOrgID": d.data[0].HOrgID
+ , "HProcPriceType": d.data[0].HProcPriceType == null ? "涓存椂瀹氶" : d.data[0].HProcPriceType
//鍏朵粬淇℃伅
, "hmakers": d.data[0].鍒跺崟浜�
, "hmakedate": d.data[0].鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(d.data[0].鍒跺崟鏃ユ湡), "yyyy-MM-dd")
@@ -1839,25 +2832,33 @@
, "hupdatedate": d.data[0].淇敼鏃ユ湡 == null ? "" : Format(new Date(d.data[0].淇敼鏃ユ湡), "yyyy-MM-dd")
, "hdeleteman": d.data[0].浣滃簾浜�
, "hdeletedate": d.data[0].浣滃簾鏃ユ湡 == null ? "" : Format(new Date(d.data[0].浣滃簾鏃ユ湡), "yyyy-MM-dd")
+ , "hcloser": d.data[0].鍏抽棴浜�
+ , "hclosedate": d.data[0].鍏抽棴鏃ユ湡 == null ? "" : Format(new Date(d.data[0].鍏抽棴鏃ユ湡), "yyyy-MM-dd")
});
//瀛愯〃 璧嬪��
var rowdata = [];
+ console.log(d.data)
for (var i = 0; i < d.data.length; i++) {
rowdata.push(
{
- "HProcNo": d.data[i].宸ュ簭鍙�, "HProcID_S": d.data[i].宸ユ, "HProcType": d.data[i].宸ュ簭绫诲瀷, "HCenterID_S": d.data[i].HCenterID_S, "HCenterID_SName": d.data[i].浜х嚎涓績
+ "HProcNo": d.data[i].宸ュ簭鍙�, "HProcID_S": d.data[i].宸ユ, "HProcType": d.data[i].宸ュ簭绫诲瀷, "HCenterID_S": d.data[i].HCenterID_S, "HCenterID_SName": d.data[i].浜х嚎涓績, "宸ュ簭浠g爜": d.data[i].宸ュ簭浠g爜
, "HWorkQty_S": d.data[i].浜х嚎浜ц兘, "HSubStdEmpQty_S": d.data[i].浜х嚎浜烘暟, "HMouldNo": d.data[i].妯″叿缂栧彿, "HChangeMould": d.data[i].鎹㈡ā鏃堕棿, "HPackStd": d.data[i].鍛ㄨ浆绠辨爣鍑�
- , "HPack": d.data[i].鍛ㄨ浆绠�, "HPutArea": d.data[i].鏆傛斁鍖�, "HMyWorkDays": d.data[i].鐢熶骇鍛ㄦ湡, "HMyFixWorkDays": d.data[i].鍥哄畾鐢熶骇澶╂暟, "宸ュ簭": d.data[i].宸ュ簭
- , "HProcID": d.data[i].hprocid, "宸ヤ綔涓績浠g爜": d.data[i].宸ヤ綔涓績浠g爜, "HCenterID": d.data[i].HCenterID, "宸ヤ綔涓績": d.data[i].宸ヤ綔涓績鍚嶇О, "HSupID": d.data[i].HSupID
- , "渚涘簲鍟嗕唬鐮�": d.data[i].渚涘簲鍟嗕唬鐮�, "渚涘簲鍟�": d.data[i].渚涘簲鍟�, "HSupFlag": d.data[i].濮斿鏍囪 == 0 ? false : true, "HTimeUnit": d.data[i].鏃堕棿鍗曚綅, "HUnitTime": d.data[i].杩愯鏃堕棿
- , "HWorkQty": d.data[i].鍔犲伐鏁伴噺, "HPassRate": d.data[i].鑹巼, "HOverRate": d.data[i].瓒呴姣斾緥, "HReadyTime": d.data[i].鍑嗗鏃堕棿, "HQueueTime": d.data[i].鎺掗槦鏃堕棿
+ , "HPack": d.data[i].鍛ㄨ浆绠�, "HPutArea": d.data[i].鏆傛斁鍖�, "HMyWorkDays": d.data[i].鐢熶骇鍛ㄦ湡, "HMyFixWorkDays": d.data[i].鍥哄畾鐢熶骇澶╂暟, "宸ュ簭": d.data[i].宸ュ簭, "宸ユ": d.data[i].宸ユ鍚嶇О
+ , "HProcID": d.data[i].HProcID, "宸ヤ綔涓績浠g爜": d.data[i].宸ヤ綔涓績浠g爜, "HCenterID": d.data[i].HCenterID, "宸ヤ綔涓績": d.data[i].宸ヤ綔涓績鍚嶇О, "HSupID": d.data[i].HSupID
+ , "渚涘簲鍟嗕唬鐮�": d.data[i].渚涘簲鍟嗕唬鐮�, "渚涘簲鍟�": d.data[i].渚涘簲鍟�, "HSupFlag": d.data[i].濮斿鏍囪 == 0 ? false : true, "HSortProcFlag": d.data[i].鎺掍骇宸ュ簭鏍囪 == 0 ? false : true, "HTimeUnit": d.data[i].鏃堕棿鍗曚綅, "HUnitTime": d.data[i].杩愯鏃堕棿
+ , "HWorkQty": d.data[i].鍔犲伐鏁伴噺, "HSNCtrl": d.data[i].SN杩囩珯鎺у埗 == 0 ? false : true, "HPassRate": d.data[i].鑹巼, "HOverRate": d.data[i].瓒呴姣斾緥, "HReadyTime": d.data[i].鍑嗗鏃堕棿, "HQueueTime": d.data[i].鎺掗槦鏃堕棿
, "HMoveTime": d.data[i].杞Щ鏃堕棿, "HNextProcFlag": d.data[i].HNextProcFlag == 0 ? false : true, "HFlowProc": d.data[i].娴佽浆宸ュ簭 == 0 ? false : true, "HSubStdEmpQty": d.data[i].鏍囧噯浜烘暟, "HSubCanUseSourceQty": d.data[i].鍙搷浣滆澶囨暟
, "HFixPrice": d.data[i].鐝骇瀹氶, "HProcPrice": d.data[i].鍔犲伐鍗曚环, "HBadPrice": d.data[i].涓嶅悎鏍煎崟浠�, "HWasterPrice": d.data[i].鎶ュ簾鍗曚环, "HStdFlag": d.data[i].鏍囧噯瀹氶
, "HBeginDayQty": d.data[i].寮�宸ヤ綑閲忓ぉ鏁�, "HBeginFixQty": d.data[i].寮�宸ヤ綑閲忓浐鏁�, "HFixWorkDays": d.data[i].涓婇亾鍥哄畾澶╂暟, "HTrunWorkDays": d.data[i].涓婇亾寰幆鍛ㄦ湡, "HReadyTimes": d.data[i].鏈亾鍑嗗鏃堕棿
, "HICMOReadyTimes": d.data[i].鎹㈠崟鍑嗗鏃堕棿, "HAutoTrunFlag": d.data[i].鑷姩绉昏浆, "HTechnologyParameter": d.data[i].宸ヨ壓鍙傛暟, "HPicNum": d.data[i].鍥剧焊缂栧彿, "HProcCheckNote": d.data[i].鏈伐搴忕‘璁よ褰�
, "HProcWorkNum": d.data[i].绋嬪簭鍙�, "HBadWHID": d.data[i].HBadWHID, "HBadWHName": d.data[i].HBadWHName, "HWasterWHID": d.data[i].HWasterWHID, "HWasterWHName": d.data[i].HWasterWHName
- , "HWHID": d.data[i].HWHID, "HWHName": d.data[i].HWHName, "HRemark": d.data[i].琛ㄤ綋澶囨敞
+ , "HWHID": d.data[i].HWHID, "HWHName": d.data[i].HWHName, "HRemark": d.data[i].琛ㄤ綋澶囨敞, "HWorkTimes_S": d.data[i].浜у搧鍗曚欢宸ユ椂
+ , "HQCSchemeID_Fst": d.data[i].HQCSchemeID_Fst, "HQCSchemeNumber_Fst": d.data[i].棣栦欢妫�楠屾柟妗堜唬鐮�, "HQCSchemeName_Fst": d.data[i].棣栦欢妫�楠屾柟妗�
+ , "HQCSchemeID_Proc": d.data[i].HQCSchemeID_Proc, "HQCSchemeNumber_Proc": d.data[i].杞簭妫�楠屾柟妗堜唬鐮�, "HQCSchemeName_Proc": d.data[i].杞簭妫�楠屾柟妗�
+ , "HQCSchemeID_Patrol": d.data[i].HQCSchemeID_Patrol, "HQCSchemeNumber_Patrol": d.data[i].宸℃妫�楠屾柟妗堜唬鐮�, "HQCSchemeName_Patrol": d.data[i].宸℃妫�楠屾柟妗�
+ , "HQCFst": d.data[i].HQCFst == 1 ? true : false, "HQCProc": d.data[i].HQCProc == 1 ? true : false, "HQCPatrol": d.data[i].HQCPatrol == 1 ? true : false, "HMaterToSourceCtrl": d.data[i].HMaterToSourceCtrl == 1 ? true : false
+ , "HSubStdEmpAvg_S": d.data[i].浜哄潎浜ц兘, "鏍囧噯宸ヤ环": d.data[i].鏍囧噯宸ヤ环, "HYDCoefficient": d.data[i].绾﹀綋绯绘暟
}
)
}
@@ -1867,6 +2868,24 @@
for (var i = 0; i < d.data.length; i++) {
if (d.data[i].濮斿鏍囪) {
$('#HSupFlag' + (i + 1)).attr("checked", true);
+ }
+ if (d.data[i].SN杩囩珯鎺у埗) {
+ $('#HSNCtrl' + (i + 1)).attr("checked", true);
+ }
+ if (d.data[i].HQCFst) {
+ $('#HQCFst' + (i + 1)).attr("checked", true);
+ }
+ if (d.data[i].HQCProc) {
+ $('#HQCProc' + (i + 1)).attr("checked", true);
+ }
+ if (d.data[i].HQCPatrol) {
+ $('#HQCPatrol' + (i + 1)).attr("checked", true);
+ }
+ if (d.data[i].HMaterToSourceCtrl) {
+ $('#HMaterToSourceCtrl' + (i + 1)).attr("checked", true);
+ }
+ if (d.data[i].鎺掍骇宸ュ簭鏍囪) {
+ $('#HSortProcFlag' + (i + 1)).attr("checked", true);
}
if (d.data[i].HNextProcFlag) {
$('#HNextProcFlag' + (i + 1)).attr("checked", true);
@@ -1891,19 +2910,30 @@
//淇濆瓨HMaker
function set_AddNew(data) {
+ data.field.HMaterModel = data.field.HMaterModel.replace("\"", "鈥�").replace(";", "锛�");
+ data.field.HMaterName = data.field.HMaterName.replace("\"", "鈥�").replace(";", "锛�");
+
var num = [];
for (var i = 0; i < table.cache["mainTable"].length; i++) {
if (table.cache["mainTable"][i] != "") {
table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
+
+ //鍔犲伐鏁伴噺=浜х嚎浜烘暟 * 浜х嚎浜哄潎浜ц兘
+ if (table.cache["mainTable"][i].HSubStdEmpQty_S != 0 && table.cache["mainTable"][i].HSubStdEmpQty_S != "" && table.cache["mainTable"][i].HSubStdEmpAvg_S != 0 && table.cache["mainTable"][i].HSubStdEmpAvg_S != "") {
+
+ table.cache["mainTable"][i].HWorkQty = Number((table.cache["mainTable"][i].HSubStdEmpQty_S * table.cache["mainTable"][i].HSubStdEmpAvg_S).toFixed(2))
+
+ }
+
num.push(table.cache["mainTable"][i])
- }
+ }
}
data.field.HPRDORGID = sessionStorage["OrganizationID"];//缁勭粐
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(num);
//var hentryid = linteridSub;//瀛愯〃 鎺掑簭id
- var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"];
+ var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"] + ";" + HBillSubType;
var index = layer.load();
$.ajax({
@@ -1916,6 +2946,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("鎻愪氦鎴愬姛");
}
@@ -1976,6 +3007,7 @@
// layer.msg("鐢熶骇鐝粍娌℃湁閫夋嫨");
// return false;
//}
+ var pc = 0;
var num = [];
for (var i = 0; i < option.data.length; i++) {
@@ -2004,8 +3036,19 @@
return false;
}
}
+
+ //鎺掍骇宸ュ簭鏍囪
+ if (option.data[i]["HSortProcFlag"]) {
+ pc += 1;
+ }
+
+ //if (pc > 1) {
+ // layer.msg("鎺掍骇宸ュ簭鏍囪鍙兘閫夋嫨涓�涓�,璇烽噸鏂伴�夋嫨!");
+ // return false;
+ //}
+
//else {
- // if (option.data[i]["HCenterID"] == "0") {
+ // if (option.data[i]["HCenterID"] == "0"&&option.data[i]["宸ュ簭浠g爜"] != "9999") {
// layer.msg("绗�" + (i + 1) + "琛�:宸ヤ綔涓績涓嶈兘涓虹┖!");
// return false;
// }
@@ -2044,7 +3087,6 @@
}
}
}
-
return true;
}
@@ -2053,7 +3095,7 @@
var colName = "";
var contentUrl = "";
for (var i = 1; i < option.cols[0].length - 1; i++) {
- colName += option.cols[0][i]["title"] + ",";
+ colName += option.cols[0][i]["field"] + ",";
}
var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
var urlLen = urlStr.split('/');
@@ -2094,6 +3136,7 @@
for (var i = 0; i < option.data.length; i++) {
if (option.data[i]["HProcNo"] == data[0]["HProcNo"]) {
tables.push(option.data[i - 1]);
+ data[0].LAY_CHECKED = true;
option.data[i - 1] = data[0];
option.data[i] = tables[0];
table.render(option);
@@ -2107,13 +3150,14 @@
function btn_under(data) {
if (data.length != 1) {
layer.msg("璇烽�夋嫨涓�琛屾暟鎹紒");
- } else if (option.data[option.data.length-1]["HProcNo"] == data[0]["HProcNo"]) {
+ } else if (option.data[option.data.length - 1]["HProcNo"] == data[0]["HProcNo"]) {
layer.msg("鏈鏁版嵁鏃犳硶绉诲姩锛�");
} else {
var tables = [];
for (var i = 0; i < option.data.length; i++) {
if (option.data[i]["HProcNo"] == data[0]["HProcNo"]) {
tables.push(option.data[i + 1]);
+ data[0].LAY_CHECKED = true;
option.data[i + 1] = data[0];
option.data[i] = tables[0];
table.render(option);
@@ -2126,7 +3170,9 @@
//鍒锋柊娴佹按鍙�
function btn_Refresh(data) {
for (var i = 0; i < option.data.length; i++) {
- option.data[i]["HProcNo"] = (i + 1) * 10;
+ if (option.data[i]["HProcNo"] != 9999) {
+ option.data[i]["HProcNo"] = (i + 1) * 10;
+ }
}
table.render(option);
}
@@ -2146,7 +3192,13 @@
dataCol = data1.data[0].HGridString.split(',');
for (var i = 0; i < option.cols[0].length - 2; i++) {
- var dataCols = dataCol[i].split('|');
+ if (i >= dataCol.length) {
+ continue;
+ }
+ if (dataCol[i]) {
+ var dataCols = dataCol[i].split('|');
+ }
+
//闅愯棌鍒�
if (dataCols[1] == 1) {
option.cols[0][i + 1]["hide"] = true;
@@ -2160,6 +3212,10 @@
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[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
}
//璁剧疆鍒楀
//if (data1.data[0].HColumnWidth != 0) {
@@ -2182,6 +3238,10 @@
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];
}
}
@@ -2213,10 +3273,58 @@
})
}
//#endregion
+ //灏唘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;
+ };
});
+ //鐗╂枡
+ function GetMaterValue(obj) {
+ //鑾峰彇鏁版嵁
+ $("#HMaterID").val(obj[0].HItemID);//鐗╂枡id
+ $("#HMaterName").val(obj[0].鐗╂枡鍚嶇О);//鐗╂枡鍚嶇О
+ $("#HMaterNumber").val(obj[0].鐗╂枡浠g爜);//鐗╂枡浠g爜
+ $("#HMaterModel").val(obj[0].瑙勬牸鍨嬪彿);//瑙勬牸鍨嬪彿
+ $("#HUnitID").val(obj[0].HUnitID);//璁¢噺鍗曚綅id
+ $("#HUnitName").val(obj[0].璁¢噺鍗曚綅鍚嶇О);//璁¢噺鍗曚綅鍚嶇О
+ if ($("#HName").val() == "") {
+ $("#HName").val(obj[0].鐗╂枡浠g爜);
+ }
+ }
+ //璁¢噺鍗曚綅
+ function GetUnitValue(obj) {
+ $("#HUnitID").val(obj[0].HItemID);//璁¢噺鍗曚綅id
+ $("#HUnitName").val(obj[0].璁¢噺鍗曚綅鍚嶇О);//璁¢噺鍗曚綅鍚嶇О
+ }
+
+ //宸ュ簭
+ function GetProcessValue(obj) {
+ OptionData = obj;
+ }
+
+ //宸ヤ綔涓績
+ function GetWorkCenterValue(obj) {
+ OptionData = obj;
+ }
+
+ //渚涘簲鍟�
+ function GetHSupNameValue(obj) {
+ OptionData = obj;
+ }
+ //渚涘簲鍟�
+ function GetGyProcMulValue(obj) {
+ OptionData = obj;
+ }
</script>
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.1