From 2d2d672e5bdc7e6ea4e7658030229cb3b67ec89a Mon Sep 17 00:00:00 2001
From: 杨乐 <yang.le.192@qq.com>
Date: 星期一, 14 二月 2022 17:18:06 +0800
Subject: [PATCH] 无数据的情况下去掉提示,直接显示无数据的列表,且带出操作工具栏
---
WebTM/views/计划管理/工艺路线/Gy_RoutingBill.html | 1212 ++++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 930 insertions(+), 282 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 c3c1230..c1152ad 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"
@@ -9,6 +9,11 @@
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script src="../../../layuiadmin/layui/layui.js"></script>
+ <script src="../../../layuiadmin/Scripts/json2.js"></script>
+ <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+ <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+ <script src="../../../layuiadmin/PubCustom.js"></script>
<style>
.main-btn { /*澶撮儴涓绘寜閽�*/
padding: 0 2px; /*璋冩暣鎸夐挳宸﹀彸绌洪殭澶у皬*/
@@ -16,32 +21,37 @@
line-height: 30px;
}
- .maintitle {
- background-color: #1492ff;
- color: #fff;
- padding: 5px 10px;
- border: none;
- border-radius: 4px;
- text-align: center;
- font-size: 24px;
- }
-
.btn-title {
font-size: 16px;
}
- /*.table-select {
+ /* 闃叉涓嬫媺妗嗙殑涓嬫媺鍒楄〃琚殣钘�---蹇呴』璁剧疆--- */
+ .layui-table-cell {
+ overflow: visible !important;
+ }
+ /* 浣垮緱涓嬫媺妗嗕笌鍗曞厓鏍煎垰濂藉悎閫� */
+ td .layui-form-select {
margin-top: -10px;
margin-left: -15px;
margin-right: -15px;
- }*/
+ }
+
+ .layui-form-item .layui-inline {
+ margin-top: 5px;
+ margin-bottom: 5px;
+ margin-right: 0px;
+ }
+
+ .layui-form-label {
+ width: 25%;
+ }
</style>
+
</head>
<body>
<div class="layui-fluid" style="padding: 0;">
<div class="layui-card" style="padding: 2px;background-color: #efefef;">
<div class="layui-card-body" style="padding: 1px;">
<form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
- <div class="maintitle">宸ヨ壓璺嚎</div>
<div style="padding: 10px;">
<button class="layui-btn layuiadmin-btn-order main-btn" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
<i class="layui-icon layui-icon-print layuiadmin-button-btn"><span class="btn-title">棰勮</span></i>
@@ -56,7 +66,7 @@
<i class="layui-icon layui-icon-delete layuiadmin-button-btn"><span class="btn-title">淇濆瓨</span></i>
</button>
</div>
- <div class="layui-tab" lay-filter="tab-POStockInBill" style="margin-top: 80px;">
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
<ul class="layui-tab-title" lay-filter="tab-all">
<li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
<li lay-id="2" style="padding:1px;">鍏朵粬淇℃伅</li>
@@ -69,20 +79,27 @@
<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="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
- <input type="hidden" name="HInterID" id="HInterID">
+ <input type="text" class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID">
+ <input type="hidden" name="HPRDORGID" id="HPRDORGID" lay-verify="HPRDORGID">
</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" name="HDate" id="HDate" style="padding-left: 32px;">
+ <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 32px;">
</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="HName" id="HName">
+ <input type="text" class="layui-input" lay-verify="HName" name="HName" id="HName">
+ </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="HPicNumVer" name="HPicNumVer" id="HPicNumVer">
</div>
</div>
</div>
@@ -90,23 +107,29 @@
<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" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;width: 61%;display: inline-block;" readonly>
+ <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater" id="btnSearchMater" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
</button>
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">浜у搧鍚嶇О</label>
+ <label class="layui-form-label" style="width: 75px;">浜у搧鍚嶇О</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="background-color:#efefef4d;" readonly>
- <input type="hidden" name="HMaterID" id="HMaterID" value="0">
+ <input type="text" class="layui-input" name="HMaterName" lay-verify="HMaterName" id="HMaterName" style="background-color:#efefef4d;width:90%" readonly>
+ <input type="hidden" name="HMaterID" id="HMaterID" lay-verify="HMaterID" value="0">
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">瑙勬牸鍨嬪彿</label>
+ <label class="layui-form-label" style="width: 65px;">瑙勬牸鍨嬪彿</label>
+ <div class="layui-input-block" style="margin-left: 105px;">
+ <input type="text" class="layui-input" name="HMaterModel" id="HMaterModel" onmouseover="this.title=this.value" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鎬昏鍥惧彿</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HMaterModel" id="HMaterModel" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" name="HPicNumAssemble" id="HPicNumAssemble" onmouseover="this.title=this.value">
</div>
</div>
</div>
@@ -114,9 +137,9 @@
<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="HUnitName" id="HUnitName" style="background-color:#efefef4d;width: 61%;display: inline-block;" readonly>
- <input type="hidden" name="HUnitID" id="HUnitID" value="0">
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProc" id="btnSearchProc" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
+ <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: left;margin-right: 3px;background-color:gainsboro;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
</button>
</div>
@@ -124,19 +147,26 @@
<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="HRoutingGroupID" id="HRoutingGroupID" value="0" style="background-color:#efefef4d;width: 61%;display: inline-block;" readonly>
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchSup" id="btnSearchSup" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
+ <input type="hidden" class="layui-input" lay-verify="HRoutingGroupID" name="HRoutingGroupID" id="HRoutingGroupID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="text" class="layui-input" lay-verify="HRoutingGroupIDName" name="HRoutingGroupIDName" id="HRoutingGroupIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnRoutingGroup" id="btnRoutingGroup" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
</button>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">鏃堕棿鍗曚綅</label>
- <div class="layui-input-block" style="margin-left: 120px;width: 182px;">
- <select name="" id="">
+ <div class="layui-input-block" style="margin-left: 120px;width: 172px;">
+ <select name="HMainTimeUnit" lay-verify="HMainTimeUnit" id="HMainTimeUnit">
<option value="灏忔椂">灏忔椂</option>
<option value="澶�">澶�</option>
</select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鏉愯川</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HMaterTexture" lay-verify="HMaterTexture" id="HMaterTexture" value="" onmouseover="this.title=this.value">
</div>
</div>
</div>
@@ -144,7 +174,8 @@
<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="HMainProcID" id="HMainProcID" value="0" style="background-color:#efefef4d;width: 61%;display: inline-block;" readonly>
+ <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: left;margin-right: 3px;background-color:gainsboro;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
</button>
@@ -153,8 +184,9 @@
<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="HMainCenterID" id="HMainCenterID" value="0" style="background-color:#efefef4d;width: 61%;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: left;margin-right: 3px;background-color:gainsboro;">
+ <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: left;margin-right: 3px;background-color:gainsboro;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
</button>
</div>
@@ -162,10 +194,17 @@
<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="HGroupID" id="HGroupID" value="0" style="background-color:#efefef4d;width: 61%;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: left;margin-right: 3px;background-color:gainsboro;">
+ <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: left;margin-right: 3px;background-color:gainsboro;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
</button>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 65px;">鎴愬搧缂栧彿</label>
+ <div class="layui-input-block" style="margin-left: 100px;">
+ <input type="text" class="layui-input" name="HProductNum" lay-verify="HProductNum" id="HProductNum" value="" onmouseover="this.title=this.value">
</div>
</div>
</div>
@@ -173,20 +212,26 @@
<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" id="HMainWorkQty" value="0" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
+ <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" id="HMainUnitTime" value="0">
- <input type="hidden" value="灏忔椂" name="HMainTimeUnit" id="HMainTimeUnit">
+ <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" value="0">
+ <input type="text" class="layui-input" name="HMainPrice" id="HMainPrice" lay-verify="HMainPrice" value="0">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 65px;">鐗堟湰</label>
+ <div class="layui-input-block" style="margin-left: 105px;">
+ <input type="text" class="layui-input" name="HVerNum" lay-verify="HVerNum" id="HVerNum" value="" onmouseover="this.title=this.value">
</div>
</div>
</div>
@@ -194,19 +239,19 @@
<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" value="0" style="background-color:#efefef4d;" readonly>
+ <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" value="0" style="background-color:#efefef4d;" readonly>
+ <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" name="HDelSourceRate" id="HDelSourceRate" value="0" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" lay-verify="HDelSourceRate" name="HDelSourceRate" id="HDelSourceRate" value="0"> <!--style="background-color:#efefef4d;"-->
</div>
</div>
</div>
@@ -214,13 +259,14 @@
<div class="layui-inline" style="width: 56%;">
<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="HRemark" id="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value">
+ <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">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-block" style="margin-left: 70px;">
- <input type="checkbox" name="checkboxHStandard" id="checkboxHStandard" title="鏄惁榛樿宸ヨ壓" lay-skin="primary" lay-filter="checkboxHStandard">
- <input type="hidden" value="false" name="HStandard" id="HStandard">
+ <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">-->
</div>
@@ -316,6 +362,7 @@
</div>
</div>
</div>
+
<table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
@@ -332,17 +379,50 @@
<!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
</script>
- <script type="text/html" id="HSupColor">
- {{# if(d.HSupFlag === "true"){ }}
- <span style="color: white;background-color:blue;">{{ d.HSupFlag }}</span>
- {{# } else { }}
- <span style="color: white;background-color:red;">{{ d.HSupFlag }}</span>
- {{# } }}
+
+ <!--琛屼笅鎷夐�夋嫨(宸ュ簭绫诲瀷)-->
+ <script type="text/html" id="HProcType">
+ <select name="HProcType" lay-filter="HProcType" id="HProcType{{d.LAY_TABLE_INDEX+1}}">
+ <option value="涓诲伐搴�">涓诲伐搴�</option>
+ <option value="杈呭姪宸ュ簭">杈呭姪宸ュ簭</option>
+ </select>
</script>
- <script src="../../../layuiadmin/layui/layui.js"></script>
- <script src="../../../layuiadmin/Scripts/json2.js"></script>
- <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
- <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+
+ <!--澶嶉�夋 濮斿鍗忓姪-->
+ <script type="text/html" id="HSupFlag">
+ <div class="layui-input-block" style="margin-left: 20px;">
+ <input type="checkbox" name="HSupFlag" lay-filter="HSupFlag" id="HSupFlag{{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" lay-filter="HNextProcFlag" id="HNextProcFlag{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ </div>
+ </script>
+
+ <!--澶嶉�夋 娴佽浆宸ュ簭-->
+ <script type="text/html" id="HFlowProc">
+ <div class="layui-input-block" style="margin-left: 20px;">
+ <input type="checkbox" name="HFlowProc" lay-filter="HFlowProc" id="HFlowProc{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ </div>
+ </script>
+
+ <!--澶嶉�夋 鏍囧噯瀹氶-->
+ <script type="text/html" id="HStdFlag">
+ <div class="layui-input-block" style="margin-left: 20px;">
+ <input type="checkbox" name="HStdFlag" lay-filter="HStdFlag" id="HStdFlag{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ </div>
+ </script>
+
+ <!--澶嶉�夋 鑷姩绉昏浆-->
+ <script type="text/html" id="HAutoTrunFlag">
+ <div class="layui-input-block" style="margin-left: 20px;">
+ <input type="checkbox" name="HAutoTrunFlag" lay-filter="HAutoTrunFlag" id="HAutoTrunFlag{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ </div>
+ </script>
+
<script>
layui.config({
@@ -350,6 +430,9 @@
}).extend({
index: 'lib/index' //涓诲叆鍙fā鍧�
}).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+
+ //#region 鍏叡鍙橀噺
+
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
@@ -357,31 +440,49 @@
, form = layui.form
, element = layui.element;
+ //瀹氫箟鍏ㄥ眬鍙橀噺
+ var HReasonName, ReasonID, EmpName, SQProcName,
+ ProcID, ZRProcName, QRName;
+
+ //鍒濆琛ㄦ牸鏁版嵁
+ var rowdata = [{
+ "HProcNo": "", "HProcID_S": 0, "HProcType": "涓诲伐搴�", "HCenterID_S": 0, "HCenterID_SName": ""
+ , "HWorkQty_S": 0, "HSubStdEmpQty_S": 0, "HMouldNo": "", "HChangeMould": 0, "HPackStd": ""
+ , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "宸ュ簭": ""
+ , "HProcID": 0, "宸ヤ綔涓績浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績": "", "HSupID": 0
+ , "渚涘簲鍟嗕唬鐮�": "", "渚涘簲鍟�": "", "HSupFlag": false, "HTimeUnit": "", "HUnitTime": 0
+ , "HWorkQty": 0, "HPassRate": 0, "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": ""
+ }];
+
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒跺崟浜�
+ $("#HMaker").val(sessionStorage["HUserName"]);
+
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
- if (sessionStorage.login != "login") {
- layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
- icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
- }, function () { window.location.href = "../../user/login.html"; });
- }
+ //if (sessionStorage.login != "login") {
+ // layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
+ // icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
+ // }, function () { window.location.href = "../../user/login.html"; });
+ //}
var params = getUrlVars();
- //鑾峰彇鍙傛暟
- function getUrlVars() {
- var vars = [], hash;
- var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
- for (var i = 0; i < hashes.length; i++) {
- hash = hashes[i].split('=');
- vars.push(hash[0]);
- vars[hash[0]] = hash[1];
- }
- return vars;
- }
-
- var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
+ var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 娣诲姞 淇濆瓨
+ var linterid = params[params[1]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
var lSourceBillType = params[params[2]]; //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
+ var linteridSub = params[params[3]]; //浠庡弬鏁拌幏鍙� 瀛愯〃绾у埆
//鍒ゆ柇鏄惁鏂板
if (linterid == null || linterid == 0) {
+ linteridSub = -1;
+ OperationType = 1;
$.ajax({
url: GetWEBURL() + "/Web/GetMAXNum",
type: "GET",
@@ -395,53 +496,210 @@
});
}
else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
- RoadBillMain(linterid);
- RoadBillSub(linterid);
+ RoadBillMain(linterid, linteridSub);
+ //RoadBillSub(linterid);
}
- //鍒濆琛ㄦ牸鏁版嵁
- var rowdata = [{
- "HProcNo": "", "宸ュ簭": "", "HProcID": "0", "宸ヤ綔涓績浠g爜": "", "宸ヤ綔涓績": "", "HSupID": "0", "渚涘簲鍟嗕唬鐮�": ""
- , "渚涘簲鍟�": "", "HSupFlag": "false", "HWorkQty": "", "HPassRate": "", "HRemark": ""
- }];
+
var option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
, limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
- , cellMinWidth: 90
+ , cellMinWidth: 120
+ , height: 400
, cols: [[ //琛ㄥご
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
, { type: 'numbers', title: '搴忓彿', totalRow: true }
, { field: 'HProcNo', title: '娴佹按鍙�', edit: 'text' }
- , { field: '宸ュ簭', title: '宸ュ簭', edit: 'text' }
- , { field: 'HProcID', title: '宸ュ簭ID' }//, hide: true
- , { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', edit: 'text', width: 115 }
- , { field: '宸ヤ綔涓績', title: '宸ヤ綔涓績', edit: 'text' }
- , { field: 'HSupID', title: '渚涘簲鍟咺D' }
- , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', edit: 'text', width: 110 }
- , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', edit: 'text' }
- , { field: 'HSupFlag', title: '澶栧崗鏍囪', templet: '#HSupColor', event: "HSupFlagEvent" }
- , { field: 'HWorkQty', title: '鍔犲伐鏁伴噺', edit: 'text' }
- , { field: 'HPassRate', title: '鑹巼', edit: 'text' }
- , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+ , { field: 'HProcID_S', title: '宸ユ', edit: 'text' }
+ , { field: 'HProcType', title: '宸ュ簭绫诲瀷', templet: '#HProcType' }//閫夋嫨
+ , { field: 'HCenterID_SName', title: '浜х嚎涓績', edit: 'text', event: "CheckHCenterID_S" }//f7
+ , { field: 'HCenterID_S', title: '浜х嚎涓績id', hide: true }//hide: true
+ , { field: 'HWorkQty_S', title: '浜х嚎浜ц兘', edit: 'text' }
+ , { field: 'HSubStdEmpQty_S', title: '浜х嚎浜烘暟', edit: 'text' }
+ , { field: 'HMouldNo', title: '妯″叿缂栧彿', edit: 'text' }
+ , { field: 'HChangeMould', title: '鎹㈡ā鏃堕棿', edit: 'text' }
+ , { field: 'HPackStd', title: '鍛ㄨ浆绠辨爣鍑�', edit: 'text' }
+ , { field: 'HPack', title: '鍛ㄨ浆绠�', edit: 'text' }
+ , { field: 'HPutArea', title: '鏆傛斁鍖�', edit: 'text' }
+ , { field: 'HMyWorkDays', title: '鐢熶骇鍛ㄦ湡', edit: 'text' }
+ , { field: 'HMyFixWorkDays', title: '鍥哄畾鐢熶骇澶╂暟', edit: 'text' }
+ , { field: '宸ュ簭', title: '宸ュ簭', edit: 'text', event: "CheckHProcID" }//f7
+ , { field: 'HProcID', title: '宸ュ簭ID', hide: true }//, hide: true
+ , { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜' }//涓嶅~
+ , { field: 'HCenterID', title: '宸ヤ綔涓績id', hide: true }//, hide: true
+ , { field: '宸ヤ綔涓績', title: '宸ヤ綔涓績', edit: 'text', event: "CheckHCenterID" }//f7
+ , { field: 'HSupID', title: '渚涘簲鍟咺D', hide: true }
+ , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�' }
+ , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', edit: 'text', width: 110, event: "CheckHSupID" }//f7
+ , { field: 'HSupFlag', title: '澶栧崗鏍囪', templet: "#HSupFlag" }//checkbox
+ , { field: 'HTimeUnit', title: '鏃堕棿鍗曚綅', edit: 'text' }
+ , { field: 'HUnitTime', title: '杩愯鏃堕棿', edit: 'text' }
+ , { field: 'HWorkQty', title: '鍔犲伐鏁伴噺', edit: 'text' }//榛樿
+ , { field: 'HPassRate', title: '鑹巼', edit: 'text' }//榛樿
+ , { field: 'HOverRate', title: '瓒呴姣斾緥', edit: 'text' }
+ , { field: 'HReadyTime', title: '鍑嗗鏃堕棿', edit: 'text' }
+ , { field: 'HQueueTime', title: '鎺掗槦鏃堕棿', edit: 'text' }
+ , { field: 'HMoveTime', title: '杞Щ鏃堕棿', edit: 'text' }
+ , { field: 'HNextProcFlag', title: '涓嬮亾娴佽浆宸ュ簭', templet: "#HNextProcFlag" }//chenbox
+ , { 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: 'HBadPrice', title: '涓嶅悎鏍煎崟浠�', edit: 'text' }//榛樿
+ , { field: 'HWasterPrice', title: '鎶ュ簾鍗曚环', edit: 'text' }//榛樿
+ , { field: 'HStdFlag', title: '鏍囧噯瀹氶', templet: "#HStdFlag" }//chenbox
+ , { field: 'HBeginDayQty', title: '寮�宸ヤ綑閲忥紙澶╂暟锛�', edit: 'text' }
+ , { field: 'HBeginFixQty', title: '寮�宸ヤ綑閲忥紙鍥烘暟锛�', edit: 'text' }
+ , { field: 'HFixWorkDays', title: '涓婇亾鍥哄畾澶╂暟', edit: 'text' }
+ , { field: 'HTrunWorkDays', title: '涓婇亾寰幆鍛ㄦ湡', edit: 'text' }
+ , { field: 'HReadyTimes', title: '鏈亾鍑嗗鏃堕棿', edit: 'text' }
+ , { field: 'HICMOReadyTimes', title: '鎹㈠崟鍑嗗鏃堕棿', edit: 'text' }
+ , { field: 'HAutoTrunFlag', title: '鑷姩绉昏浆', templet: "#HAutoTrunFlag" }//chenbox
+ , { field: 'HTechnologyParameter', title: '宸ヨ壓鍙傛暟', edit: 'text' }
+ , { field: 'HPicNum', title: '鍥剧焊缂栧彿', edit: 'text' }
+ , { field: 'HProcCheckNote', title: '鏈伐搴忕‘璁よ褰�', edit: 'text' }
+ , { field: 'HProcWorkNum', title: '绋嬪簭鍙�', edit: 'text' }
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
]]
//, done: function (res, curr, count) {
- // $(".layui-table-body, .layui-table-box, .layui-table-cell").css('overflow', 'visible');
+ // option.data = res.data;
+ // //鍘绘帀涓嬫媺妗嗗け鐒︿簨浠跺惁鍒欏湪涓嬫媺妗嗛噷杈撳叆鍊�
+ // $('.layui-form-select').find('input').unbind("blur");
+ // //琛ㄦ牸閲嶈浇鍥炴樉涓嬫媺妗嗛噷鐨勬暟鎹�
+ // $('tr').each(function (e) {
+
+ // var $cr = $(this);
+ // var dataIndex = $cr.attr("data-index");
+ // $.each(option.data, function (index, value) {
+ // //alert(value)
+ // if (value.LAY_TNDEX == dataIndex) {
+ // $cr.find('input').val(value.HProcType);
+ // }
+ // });
+ // });
//}
- };
+ }
+
//鍒濆鍔犺浇琛ㄦ牸
option.data = rowdata;
table.render(option);
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //閫夋嫨浜у搧浠g爜鎸夐挳
+ form.on('submit(btnSearchMater)', function () {
+ get_checkSearchMater();
+ });
+
+ //閫夋嫨宸ュ簭鎸夐挳
+ form.on('submit(btnSearchProc)', function () {
+ get_checkSearchProc();
+ });
+
+ //閫夋嫨璁¢噺鍗曚綅鎸夐挳
+ form.on('submit(btnUnit)', function () {
+ get_checkUnit();
+ });
+
+ //閫夋嫨鐢熶骇鐝粍鎸夐挳
+ form.on('submit(btnGroup)', function () {
+ get_checkGroup();
+ });
+
+ //閫夋嫨宸ヤ綔涓績鎸夐挳
+ form.on('submit(btnWorkCenter)', function () {
+ get_checkWorkCenter();
+ });
+
+ //閫夋嫨宸ヨ壓璺嚎澶х被鎸夐挳
+ form.on('submit(btnRoutingGroup)', function () {
+ get_checkRoutingGroup();
+ });
+
+
//鏄惁榛樿宸ヨ壓
form.on('checkbox(checkboxHStandard)', function (data) {
$("#HStandard").val(data.elem.checked);
});
- //鏄惁鍚敤
- form.on('checkbox(checkboxHUseFlag)', function (data) {
- $("#HUseFlag").val(data.elem.checked);
+
+ //#region 澶嶉�夋
+ //濮斿鍗忓姪
+ form.on('checkbox(HSupFlag)', function (data) {
+ //鑾峰彇涓嬫媺妗嗛�変腑鐨勫��
+ var elem = data.othis.parents('tr');
+ var dataindex = elem.attr("data-index");
+ $.each(option.data, function (index, value) {
+ if (value.LAY_TABLE_INDEX == dataindex) {
+ value.HSupFlag = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
});
+
+ //涓嬮亾娴佽浆宸ュ簭
+ form.on('checkbox(HNextProcFlag)', 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.HNextProcFlag = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+
+ //娴佽浆宸ュ簭
+ form.on('checkbox(HFlowProc)', 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.HFlowProc = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+
+ //鏍囧噯瀹氶
+ form.on('checkbox(HStdFlag)', 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.HStdFlag = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+
+ //鑷姩绉昏浆
+ form.on('checkbox(HAutoTrunFlag)', 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.HAutoTrunFlag = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+ //#endregion
+
+ //琛岄�夋嫨澶勭悊锛堝伐搴忕被鍨嬶級
+ form.on('select(HProcType)', 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.HProcType = data.value;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
+
//澶村伐鍏锋爮浜嬩欢
table.on('toolbar(mainTable)', function (obj) {
@@ -449,14 +707,51 @@
, data = checkStatus.data;
//鏂板琛岃〃鏍兼暟鎹�
var NewRow = {
- "HProcNo": "", "宸ュ簭": "", "HProcID": "0", "宸ヤ綔涓績浠g爜": "", "宸ヤ綔涓績": "", "HSupID": "0", "渚涘簲鍟嗕唬鐮�": ""
- , "渚涘簲鍟�": "", "HSupFlag": "false", "HWorkQty": "", "HPassRate": "", "HRemark": ""
+ "HProcNo": "", "HProcID_S": 0, "HProcType": "涓诲伐搴�", "HCenterID_S": 0, "HCenterID_SName": ""
+ , "HWorkQty_S": 0, "HSubStdEmpQty_S": 0, "HMouldNo": "", "HChangeMould": 0, "HPackStd": ""
+ , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "宸ュ簭": ""
+ , "HProcID": 0, "宸ヤ綔涓績浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績": "", "HSupID": 0
+ , "渚涘簲鍟嗕唬鐮�": "", "渚涘簲鍟�": "", "HSupFlag": false, "HTimeUnit": "", "HUnitTime": 0
+ , "HWorkQty": 0, "HPassRate": 0, "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": ""
};
switch (obj.event) {
case 'btn-AddLine':
table.cache["mainTable"].push(NewRow);
option.data = table.cache["mainTable"];
+
table.render(option);
+
+ for (var i = 1; i <= option.data.length; i++) {
+ console.log(option.data[i - 1].HSupFlag)
+ $('#HProcType' + i + '').find("option[value='" + option.data[i - 1].HProcType + "']").attr("selected", true);
+ //濮斿鍗忓姪
+ if (option.data[i - 1].HSupFlag) {
+ $('#HSupFlag' + i + '').attr("checked", true);
+ }
+ //涓嬮亾娴佽浆宸ュ簭
+ if (option.data[i - 1].HNextProcFlag) {
+ $('#HNextProcFlag' + i + '').attr("checked", true);
+ }
+ //娴佽浆宸ュ簭
+ if (option.data[i - 1].HFlowProc) {
+ $('#HFlowProc' + i + '').attr("checked", true);
+ }
+ //鏍囧噯瀹氶
+ if (option.data[i - 1].HStdFlag) {
+ $('#HStdFlag' + i + '').attr("checked", true);
+ }
+ //鑷姩绉昏浆
+ if (option.data[i - 1].HAutoTrunFlag) {
+ $('#HAutoTrunFlag' + i + '').attr("checked", true);
+ }
+ }
+ form.render('select');
+ form.render('checkbox');
break;
case 'btn-CopyLine':
var copydata = JSON.stringify(data);
@@ -472,7 +767,31 @@
table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
- //layer.alert(copyrow);
+ for (var i = 1; i <= option.data.length; i++) {
+ $('#HProcType' + i + '').find("option[value='" + option.data[i - 1].HProcType + "']").attr("selected", true);
+ //濮斿鍗忓姪
+ if (option.data[i - 1].HSupFlag) {
+ $('#HSupFlag' + i + '').attr("checked", true);
+ }
+ //涓嬮亾娴佽浆宸ュ簭
+ if (option.data[i - 1].HNextProcFlag) {
+ $('#HNextProcFlag' + i + '').attr("checked", true);
+ }
+ //娴佽浆宸ュ簭
+ if (option.data[i - 1].HFlowProc) {
+ $('#HFlowProc' + i + '').attr("checked", true);
+ }
+ //鏍囧噯瀹氶
+ if (option.data[i - 1].HStdFlag) {
+ $('#HStdFlag' + i + '').attr("checked", true);
+ }
+ //鑷姩绉昏浆
+ if (option.data[i - 1].HAutoTrunFlag) {
+ $('#HAutoTrunFlag' + i + '').attr("checked", true);
+ }
+ }
+ form.render('select');
+ form.render('checkbox');
}
break;
}
@@ -480,37 +799,9 @@
//琛屽唴浜嬩欢
table.on('tool(mainTable)', function (obj) {
- var data = obj.data;
- var rowIndex = $(obj.tr).attr("data-index");
- if (obj.event === 'del') {
- layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
- console.log("绱㈠紩涓�:" + rowIndex);
- if (rowIndex === '0') {
- layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
- } else {
- obj.del();
- option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
- table.reload(option);
- layer.close(index);
- }
- });
- }
- //鍗曞嚮鏀瑰彉澶栧崗鏍囪鍊�
- if (obj.event === 'HSupFlagEvent') {
- var flag = obj.data.HSupFlag;
- if (flag === "false") {
- flag = "true";
- }
- else if (flag === "true") {
- flag = "false";
- }
- else {
- flag = "true";
- }
- obj.update({
- HSupFlag: flag
- });
- }
+ set_GridDelete(obj); //琛屽唴鍒犻櫎
+ set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+
});
$('#HName').on('keydown', function (event) {//宸ヨ壓璺嚎鍚嶇О
@@ -519,65 +810,12 @@
}
});
-
//淇濆瓨鎻愪氦
form.on('submit(btnSave)', function (data) {//鎻愪氦
- //var tableData = data.field;
- var sMainStr = JSON.stringify(data.field);
- var sSubStr = JSON.stringify(table.cache['mainTable']);
- var sMainSub = sMainStr + ';' + sSubStr;
- var index = layer.load();
- $.ajax({
- type: "POST",
- url: GetWEBURL() + "/Gy_RoutingBill/AddBill",
- //url:"http://localhost:12761/Gy_RoutingBill/AddBill",
- async: true,
- data: { "sMainSub": sMainSub },
- dataType: "json",
- success: function (data) {
- if (data.count == 1) {
- //layer.confirm(data.Message, {
- // icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板'],
- // btn2: function () {
- // //parent.layui.admin.events.closeThisTabs();鍏抽棴椤电
- // //window.close();//鍏抽棴椤甸潰锛屾祻瑙堝櫒鏈夋晥锛孭DA鏃犳晥
- // parent.location.href = "../../../views/index.html"
- // }//鍏抽棴
- //}, function () { window.location.reload(); });//鏂板
- layer.close(index);
- layer.msg("鎻愪氦鎴愬姛");
- }
- else {
- layer.close(index);
- layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- }
- },
- error: function (err) {
- layer.close(index);
- layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- }
- });
+ if (AllowLoadData(data)) {
+ set_AddNew(data);
+ }
});
-
-
- function RoadBillMain(linterid)//鍔犺浇琛ㄥご
- {
- $.ajax({
- url: GetWEBURL() + "/Web/GetPonderationBill",
- type: "GET",
- data: { "HInterID": linterid },
- success: function (d) {
- // console.log(d.data);
- $("#HInterID").val(d.data[0].HInterID);
- $("#HBillNo").val(d.data[0].HBillNo);
- $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
-
- }
- })
- }
-
-
-
//閫夋嫨涓嶈壇鍘熷洜
form.on('submit(HBadReasonID-BT)', function () {//閫夋嫨浠撳簱
@@ -690,7 +928,8 @@
//window.close();//鍏抽棴褰撳墠椤�
})
- form.on('submit(Saver)', function (data) {//淇濆瓨
+
+ form.on('submit(Saver)', function (data) { //淇濆瓨
//debugger;
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(table.cache['mainTable']);
@@ -721,14 +960,11 @@
}
});
});
- function f_alert(sMsg) {
- layer.alert(sMsg, { icon: 5 });
-
- }
//鐩戝惉鎻愪氦
form.verify({
numberOrEmpty: function (value, item) {
+
// if (value != '') {
if (!/^\d+$/.test(value)) {
return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
@@ -738,109 +974,521 @@
});
- });
- //瀹氫箟鍏ㄥ眬鍙橀噺
- var HReasonName, ReasonID, EmpName, SQProcName,
- ProcID, ZRProcName, QRName
- ;
- function GetHReasonValue(obj) //杩斿洖涓嶈壇鍘熷洜
- {
- HReasonName = obj[0].HName;
- ReasonID = obj[0].HItemID;
- }
- function GetHPlanValue(obj) { //杩斿洖宸ュ簭璁″垝鍗�
- $("#HMainSourceInterID").val(obj[0].hmainid);
- $("#HMainSourceEntryID").val(obj[0].hsubid);
- $("#HMainSourceBillNo").val(obj[0].鍗曟嵁鍙�);
- $("#HMaterID").val(obj[0].HMaterID);
- $("#HMaterNumber").val(obj[0].鐗╂枡浠g爜);
- $("#HMater").val(obj[0].鐗╂枡鍚嶇О);
- $("#HCenterID").val(obj[0].HCenterID);
- $("#HWorkCenterName").val(obj[0].宸ヤ綔涓績);
- $("#HModel").val(obj[0].瑙勬牸鍨嬪彿);
- $("#HPlanQty").val(obj[0].璁″垝鏁伴噺);
- }
- function GetHKeeperValue(obj) { //杩斿洖璐d换浜�
- EmpName = obj[0].HName;
- // $("#HEmpName").val(obj[0].HName);
- //$("#HItemID").val(obj[0].HItemID);
- }
- function GetHProcValue(obj) { //杩斿洖鐢宠宸ュ簭
- SQProcName = obj[0].宸ュ簭;
- ProcID = obj[0].HItemID;
- //$("#HSQProcName").val(obj[0].宸ュ簭);
- //$("#HProcID").val(obj[0].HItemID);
- }
- function GetHZRValue(obj) { //杩斿洖璐d换宸ュ簭
- ZRProcName = obj[0].宸ュ簭;
- //$("#HZRProcName").val(obj[0].宸ュ簭);
- //$("#HItemID").val(obj[0].HItemID);
- }
- //HWorker
- function GetHWorkerValue(obj) { //杩斿洖涓嶈壇纭浜�
- QRName = obj[0].HName;
- //$("#HQRName").val(obj[0].HName);
- //$("#HItemID").val(obj[0].HItemID);
- }
- function AllowLoadData(sSubStr) { //闈炵┖楠岃瘉
- //if ($("#HSourceBillNo").val() == '') {
- // layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
- // return false;
- //}
- if ($("#HDeptName").val() == '') {
- layer.msg("閮ㄩ棬娌℃湁閫夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ //浜у搧閫夋嫨椤甸潰
+ function get_checkSearchMater() {
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '鐗╂枡琛�'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_MaterialList.html', 'yes']
+ , btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ //鑾峰彇鏁版嵁
+ $("#HMaterID").val(checkStatus.data[0].HItemID);//鐗╂枡id
+ $("#HMaterName").val(checkStatus.data[0].HName);//鐗╂枡鍚嶇О
+ $("#HMaterNumber").val(checkStatus.data[0].HNumber);//鐗╂枡浠g爜
+ $("#HMaterModel").val(checkStatus.data[0].HModel);//瑙勬牸鍨嬪彿
+
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
}
- if ($("#HSecManager").val() == '') {
- layer.msg("楠屾敹浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+
+ //宸ュ簭閫夋嫨椤甸潰
+ function get_checkSearchProc() {
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '宸ュ簭琛�'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_ProcList.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('璇烽�夋嫨鏁版嵁');
+ }
+ //鑾峰彇鏁版嵁
+ $("#HMainProcID").val(checkStatus.data[0].HItemID);//宸ュ簭id
+ $("#HMainProcIDName").val(checkStatus.data[0].宸ュ簭);//宸ュ簭id
+
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
}
- if ($("#HKeeper").val() == '') {
- layer.msg("淇濈浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+
+ //璁¢噺鍗曚綅閫夋嫨椤甸潰
+ function get_checkUnit() {
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '璁¢噺鍗曚綅琛�'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_UnitList.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('璇烽�夋嫨鏁版嵁');
+ }
+ //鑾峰彇鏁版嵁
+ $("#HUnitID").val(checkStatus.data[0].HItemID);//璁¢噺鍗曚綅id
+ $("#HUnitName").val(checkStatus.data[0].HName);//璁¢噺鍗曚綅鍚嶇О
+
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
}
- //if ($("#HWHNAME").val() == '') {
- // layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
- // return false;
- //}
- if ($("#HBillNo").val() == '') {
- layer.msg("閿欒鐨勫崟鎹彿", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+
+ //鐢熶骇鐝粍閫夋嫨椤甸潰
+ function get_checkGroup() {
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '鐝粍琛�'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_Group.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 != 1) {
+ return layer.msg('璇烽�夋嫨涓�鏉℃暟鎹�');
+ }
+ //鑾峰彇鏁版嵁
+ $("#HGroupID").val(checkStatus.data[0].HItemID);//鐝粍id
+ $("#HGroupIDName").val(checkStatus.data[0].鐝粍鍚嶇О);//璁¢噺鍗曚綅鍚嶇О
+
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
}
- if ($("#HInterID").val() == '') {
- layer.msg("閿欒鐨勫唴鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+
+ //宸ヤ綔涓績閫夋嫨椤甸潰
+ function get_checkWorkCenter() {
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '宸ヤ綔涓績琛�'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_WorkCenterList.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('璇烽�夋嫨鏁版嵁');
+ }
+ //鑾峰彇鏁版嵁
+ $("#HMainCenterID").val(checkStatus.data[0].HItemID);//宸ヤ綔涓績id
+ $("#HMainCenterIDName").val(checkStatus.data[0].宸ヤ綔涓績);//璁¢噺鍗曚綅鍚嶇О
+
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
}
- if (typeof (sSubStr) == "undefined") {
- layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+
+ //宸ヨ壓璺嚎澶х被閫夋嫨椤甸潰
+ function get_checkRoutingGroup() {
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '宸ヨ壓璺嚎澶х被鍒楄〃'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_RoutingGroup.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('璇烽�夋嫨鏁版嵁');
+ }
+ //鑾峰彇鏁版嵁
+ $("#HRoutingGroupID").val(checkStatus.data[0].HItemID);//宸ヨ壓璺嚎澶х被id
+ $("#HRoutingGroupIDName").val(checkStatus.data[0].HName);//宸ヨ壓璺嚎澶х被鍚嶇О
+
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
}
- if (!typeof (sSubStr) == "undefined") {
- //for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
- // if (parseFloat(sSubStr[i].HQtyMust) > 0) {
- // if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust))
- // {
- // layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
- // return false;
- // }
- // }
- //}
- for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
- if (parseFloat(sSubStr[i].HQty) > 0) {
- s = 1;
+ //鑾峰彇鍙傛暟
+ function getUrlVars() {
+ var vars = [], hash;
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+ for (var i = 0; i < hashes.length; i++) {
+ hash = hashes[i].split('=');
+ vars.push(hash[0]);
+ vars[hash[0]] = hash[1];
+ }
+ return vars;
+ }
+
+ //琛屽唴鍒犻櫎
+ function set_GridDelete(obj) {
+ var data = obj.data;
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+ console.log("绱㈠紩涓�:" + rowIndex);
+ if (rowIndex === '0') {
+ layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else {
+ obj.del();
+ option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+ table.reload(option);
+ layer.close(index);
+ }
+ });
+ }
+ }
+
+ //琛屽唴鍒犻櫎蹇嵎閿�
+ function set_GridCellCheck(obj) {
+ $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+ if (event.key == "F7") {
+ //浜х嚎涓績
+ if (obj.event == "CheckHCenterID_S") {
+ //鎵撳紑缁翠慨椤圭洰灏忕獥浣�
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "浜х嚎涓績鍒楄〃" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ["../../Baseset/鍩虹璧勬枡/Gy_LineCenter.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({
+ "HCenterID_SName": checkStatus.data[0].HName
+ , "HCenterID_S": checkStatus.data[0].HItemID
+ })
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+ //宸ュ簭
+ if (obj.event == "CheckHProcID") {
+ //鎵撳紑浜哄憳琛� 灏忕獥浣�
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "宸ュ簭鍒楄〃" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ["../../Baseset/鍩虹璧勬枡/Gy_ProcList.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].宸ュ簭
+ , "HProcID": checkStatus.data[0].HItemID
+ })
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+ //宸ヤ綔涓績
+ if (obj.event == "CheckHCenterID") {
+ //鎵撳紑浜哄憳琛� 灏忕獥浣�
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "浜哄憳鍒楄〃" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ["../../Baseset/鍩虹璧勬枡/Gy_WorkCenterList.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);//鍏抽棴寮圭獥
+ }
+ })
+ }
+ //渚涘簲鍟�
+ if (obj.event == "CheckHSupID") {
+ //鎵撳紑浜哄憳琛� 灏忕獥浣�
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "渚涘簲鍟嗗垪琛�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ["../../Baseset/鍩虹璧勬枡/Gy_SupplierList.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].HName
+ , "HSupID": checkStatus.data[0].HItemID
+ , "渚涘簲鍟嗕唬鐮�": checkStatus.data[0].HNumber
+ })
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+ obj.event = "";
+ return false;
+ }
+
+ })
+ }
+
+ //缂栬緫 椤甸潰璧嬪��
+ function RoadBillMain(linterid, linteridSub)//鍔犺浇琛ㄥご
+ {
+ var sWhere = " and hmainid='" + linterid + "' and hsubid='" + linteridSub + "'";
+ $.ajax({
+ url: GetWEBURL() + "/LEMS/MES_Gy_RoutingBillList_Json",
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ 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);
+ }
+ //涓昏〃
+ form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+ "HBillNo": d.data[0].鍗曟嵁鍙�
+ , "HInterID": d.data[0].hmainid
+ , "HDate": Format(new Date(d.data[0].鍒跺崟鏃ユ湡), "yyyy-MM-dd")
+ , "HName": d.data[0].宸ヨ壓鍚嶇О
+ , "HMaterNumber": d.data[0].鐗╂枡浠g爜
+ , "HMaterName": d.data[0].鐗╂枡鍚嶇О
+ , "HMaterID": d.data[0].hmaterid
+ , "HUnitName": d.data[0].璁¢噺鍗曚綅
+ , "HUnitID": d.data[0].hunitid
+ , "HMainTimeUnit": d.data[0].杩愯鏃堕棿鍗曚綅
+ , "HMainProcIDName": d.data[0].宸ュ簭鍚嶇О
+ , "HMainProcID": d.data[0].HMainProcID
+ , "HMainCenterIDName": d.data[0].宸ヤ綔
+ , "HMainCenterID": d.data[0].HMainCenterID
+ , "HGroupIDName": d.data[0].鐝粍
+ , "HGroupID": d.data[0].HMainGroupID
+ , "HMainWorkQty": d.data[0].涓诲姞宸ユ暟閲�
+ , "HMainUnitTime": d.data[0].涓昏繍琛屾椂闂�
+ , "HMainPrice": d.data[0].宸ヤ环
+ , "HStdSourceQty": d.data[0].鏍囧噯璧勬簮鏁�
+ , "HAddSourceRate": d.data[0].鍔犺祫婧愬閲�
+ , "HDelSourceRate": d.data[0].鍑忚祫婧愬噺閲�
+ , "HRemark": d.data[0].琛ㄥご澶囨敞
+ , "HStandard": d.data[0].榛樿宸ヨ壓 == 1 ? true : false
+ , "HMaterModel": d.data[0].瑙勬牸鍨嬪彿
+ , "HPicNumVer": d.data[0].鍥惧彿鐗堟湰
+ , "HPicNumAssemble": d.data[0].鎬昏鍥惧彿
+ , "HMaterTexture": d.data[0].鏉愯川
+ , "HProductNum": d.data[0].鎴愬搧缂栧彿
+ , "HVerNum": d.data[0].鐗堟湰
+ });
+
+ //瀛愯〃 璧嬪��
+ var rowdata = [{
+ "HProcNo": d.data[0].宸ュ簭鍙�, "HProcID_S": d.data[0].宸ユ, "HProcType": d.data[0].宸ュ簭绫诲瀷, "HCenterID_S": d.data[0].HCenterID_S, "HCenterID_SName": d.data[0].浜х嚎涓績
+ , "HWorkQty_S": d.data[0].浜х嚎浜ц兘, "HSubStdEmpQty_S": d.data[0].浜х嚎浜烘暟, "HMouldNo": d.data[0].妯″叿缂栧彿, "HChangeMould": d.data[0].鎹㈡ā鏃堕棿, "HPackStd": d.data[0].鍛ㄨ浆绠辨爣鍑�
+ , "HPack": d.data[0].鍛ㄨ浆绠�, "HPutArea": d.data[0].鏆傛斁鍖�, "HMyWorkDays": d.data[0].鐢熶骇鍛ㄦ湡, "HMyFixWorkDays": d.data[0].鍥哄畾鐢熶骇澶╂暟, "宸ュ簭": d.data[0].宸ュ簭
+ , "HProcID": d.data[0].hprocid, "宸ヤ綔涓績浠g爜": d.data[0].宸ヤ綔涓績浠g爜, "HCenterID": d.data[0].HCenterID, "宸ヤ綔涓績": d.data[0].宸ヤ綔涓績鍚嶇О, "HSupID": d.data[0].HSupID
+ , "渚涘簲鍟嗕唬鐮�": d.data[0].渚涘簲鍟嗕唬鐮�, "渚涘簲鍟�": d.data[0].渚涘簲鍟�, "HSupFlag": d.data[0].濮斿鏍囪 == 0 ? false : true, "HTimeUnit": d.data[0].鏃堕棿鍗曚綅, "HUnitTime": d.data[0].杩愯鏃堕棿
+ , "HWorkQty": d.data[0].鍔犲伐鏁伴噺, "HPassRate": d.data[0].鑹巼, "HOverRate": d.data[0].瓒呴姣斾緥, "HReadyTime": d.data[0].鍑嗗鏃堕棿, "HQueueTime": d.data[0].鎺掗槦鏃堕棿
+ , "HMoveTime": d.data[0].杞Щ鏃堕棿, "HNextProcFlag": d.data[0].HNextProcFlag == 0 ? false : true, "HFlowProc": d.data[0].娴佽浆宸ュ簭 == 0 ? false : true, "HSubStdEmpQty": d.data[0].鏍囧噯浜烘暟, "HSubCanUseSourceQty": d.data[0].鍙搷浣滆澶囨暟
+ , "HFixPrice": d.data[0].鐝骇瀹氶, "HProcPrice": d.data[0].鍔犲伐鍗曚环, "HBadPrice": d.data[0].涓嶅悎鏍煎崟浠�, "HWasterPrice": d.data[0].鎶ュ簾鍗曚环, "HStdFlag": d.data[0].鏍囧噯瀹氶
+ , "HBeginDayQty": d.data[0].寮�宸ヤ綑閲忓ぉ鏁�, "HBeginFixQty": d.data[0].寮�宸ヤ綑閲忓浐鏁�, "HFixWorkDays": d.data[0].涓婇亾鍥哄畾澶╂暟, "HTrunWorkDays": d.data[0].涓婇亾寰幆鍛ㄦ湡, "HReadyTimes": d.data[0].鏈亾鍑嗗鏃堕棿
+ , "HICMOReadyTimes": d.data[0].鎹㈠崟鍑嗗鏃堕棿, "HAutoTrunFlag": d.data[0].鑷姩绉昏浆, "HTechnologyParameter": d.data[0].宸ヨ壓鍙傛暟, "HPicNum": d.data[0].鍥剧焊缂栧彿, "HProcCheckNote": d.data[0].鏈伐搴忕‘璁よ褰�
+ , "HProcWorkNum": d.data[0].绋嬪簭鍙�
+ }];
+ option.data = rowdata;
+ table.render(option);
+
+ if (d.data[0].濮斿鏍囪) {
+ $('#HSupFlag1').attr("checked", true);
+ }
+ if (d.data[0].HNextProcFlag) {
+ $('#HNextProcFlag1').attr("checked", true);
+ }
+ if (d.data[0].娴佽浆宸ュ簭) {
+ $('#HFlowProc1').attr("checked", true);
+ }
+ if (d.data[0].鏍囧噯瀹氶) {
+ $('#HStdFlag1').attr("checked", true);
+ }
+ if (d.data[0].鑷姩绉昏浆) {
+ $('#HAutoTrunFlag1').attr("checked", true);
+ }
+ form.render('checkbox');
+ $('#HProcType1').find("option[value='" + d.data[0].宸ュ簭绫诲瀷+ "']").attr("selected", true);
+ form.render('select');
+ }
+ })
+ }
+ //淇濆瓨HMaker
+ function set_AddNew(data) {
+
+ 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;
+ num.push(table.cache["mainTable"][i])
}
}
- if (s == 0) {
- layer.msg("浜у搧鍏ュ簱璁板綍鏈壂鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+
+ data.field.HPRDORGID = sessionStorage["OrganizationID"];//缁勭粐
+ var sMainStr = JSON.stringify(data.field);
+ var sSubStr = JSON.stringify(num);
+ var hentryid = linteridSub;//瀛愯〃 鎺掑簭id
+ var sMainSub = sMainStr + ';' + sSubStr + ';' + hentryid + ';' + OperationType + ";" + sessionStorage["HUserName"];
+
+ var index = layer.load();
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Gy_RoutingBill/AddBill",
+ //url:"http://localhost:12761/Gy_RoutingBill/AddBill",
+ async: true,
+ data: { "sMainSub": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) {
+ //layer.confirm(data.Message, {
+ // icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板'],
+ // btn2: function () {
+ // //parent.layui.admin.events.closeThisTabs();鍏抽棴椤电
+ // //window.close();//鍏抽棴椤甸潰锛屾祻瑙堝櫒鏈夋晥锛孭DA鏃犳晥
+ // parent.location.href = "../../../views/index.html"
+ // }//鍏抽棴
+ //}, function () { window.location.reload(); });//鏂板
+ layer.close(index);
+ layer.msg("鎻愪氦鎴愬姛");
+ }
+ else {
+ layer.close(index);
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
+
+ function f_alert(sMsg) {
+ layer.alert(sMsg, { icon: 5 });
+
+ }
+ //闈炵┖楠岃瘉
+ function AllowLoadData(data) {
+
+ if ($("#HMaterNumber").val() == "") {
+ layer.msg("浜у搧浠g爜娌℃湁閫夋嫨");
return false;
}
- }
- else {
+ if ($("#HUnitName").val() == "") {
+ layer.msg("璁¢噺鍗曚綅娌℃湁閫夋嫨");
+ return false;
+ }
+ if ($("#HMainProcIDName").val() == "") {
+ layer.msg("宸ュ簭娌℃湁閫夋嫨");
+ return false;
+ }
+ if ($("#HMainCenterIDName").val() == "") {
+ layer.msg("宸ヤ綔涓績娌℃湁閫夋嫨");
+ return false;
+ }
+ if ($("#HGroupIDName").val() == "") {
+ layer.msg("鐢熶骇鐝粍娌℃湁閫夋嫨");
+ return false;
+ }
+
return true;
+ //if ($("#HBillNo").val() == '') {
+ // layer.msg("閿欒鐨勫崟鎹彿", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return false;
+ //}
+ //if ($("#HInterID").val() == '') {
+ // layer.msg("閿欒鐨勫唴鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return false;
+ //}
+ //if (typeof (sSubStr) == "undefined") {
+ // layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return false;
+ //}
+
}
- }
+
+ //#endregion
+
+ });
+
+
</script>
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.1