From 87afc2c7764c4db2ec547ddcd6a1ecff1595c63f Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期三, 14 七月 2021 13:14:06 +0800
Subject: [PATCH] nothing
---
WebTM/Properties/PublishProfiles/JFTM.pubxml.user | 16 +-
WebTM/views/车间管理/工序进站接收单/Cj_StationInBill.html | 6
WebTM/layuiadmin/Scripts/webConfig.js | 4
WebTM/views/质量管理/首件检验单/QC_Add_Edit_FirstPieceCheckBill.html | 116 ++++++++--------
WebTM/views/index.html | 2
WebTM/views/车间管理/工序进站接收单/Cj_StationInBillList.html | 247 ++++++++++++++++++++++++++++++-----
6 files changed, 286 insertions(+), 105 deletions(-)
diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index 7d0c191..13d84f7 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -630,7 +630,7 @@
<publishTime>03/23/2021 14:14:38</publishTime>
</File>
<File Include="layuiadmin/Scripts/webConfig.js">
- <publishTime>07/13/2021 20:55:08</publishTime>
+ <publishTime>07/14/2021 10:06:08</publishTime>
</File>
<File Include="layuiadmin/style/admin.css">
<publishTime>03/23/2021 14:14:38</publishTime>
@@ -1065,7 +1065,7 @@
<publishTime>07/12/2021 15:38:26</publishTime>
</File>
<File Include="views/index.html">
- <publishTime>07/12/2021 15:45:40</publishTime>
+ <publishTime>07/14/2021 10:45:31</publishTime>
</File>
<File Include="views/index_Mobile.html">
<publishTime>07/06/2021 15:26:02</publishTime>
@@ -2037,7 +2037,7 @@
<publishTime>05/24/2021 10:08:23</publishTime>
</File>
<File Include="views/璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html">
- <publishTime>05/24/2021 10:08:23</publishTime>
+ <publishTime>07/14/2021 12:45:51</publishTime>
</File>
<File Include="views/璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_FirstPieceCheckBillList.html">
<publishTime>05/24/2021 10:08:23</publishTime>
@@ -2121,7 +2121,7 @@
<publishTime>05/24/2021 10:08:23</publishTime>
</File>
<File Include="views/璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html">
- <publishTime>05/24/2021 10:08:23</publishTime>
+ <publishTime>07/14/2021 12:45:51</publishTime>
</File>
<File Include="views/璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_FirstPieceCheckBillList.html">
<publishTime>05/24/2021 10:08:23</publishTime>
@@ -2181,16 +2181,16 @@
<publishTime>03/23/2021 14:14:38</publishTime>
</File>
<File Include="views/杞﹂棿绠$悊/宸ュ簭杩涚珯鎺ユ敹鍗�/Cj_StationInBill.html">
- <publishTime>06/18/2021 15:59:36</publishTime>
+ <publishTime>07/14/2021 11:05:58</publishTime>
</File>
<File Include="views/杞﹂棿绠$悊/宸ュ簭杩涚珯鎺ユ敹鍗�/Cj_StationInBillList.html">
- <publishTime>07/13/2021 20:30:51</publishTime>
+ <publishTime>07/14/2021 12:47:09</publishTime>
</File>
<File Include="views/杞﹂棿绠$悊/宸ュ簭杩涚珯鎺ユ敹鍗�/Cj_StationInBill.html">
- <publishTime>06/18/2021 15:59:36</publishTime>
+ <publishTime>07/14/2021 11:05:58</publishTime>
</File>
<File Include="views/杞﹂棿绠$悊/宸ュ簭杩涚珯鎺ユ敹鍗�/Cj_StationInBillList.html">
- <publishTime>07/13/2021 20:30:51</publishTime>
+ <publishTime>07/14/2021 12:47:09</publishTime>
</File>
<File Include="views/杞﹂棿绠$悊/鎶ヨ〃鍒嗘瀽/Qk_OutProcessList.html">
<publishTime>03/23/2021 14:14:38</publishTime>
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index e8bcf45..7980c71 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -1,7 +1,7 @@
锘縡unction GetWEBURL() {
//var WEBURL = "http://192.168.16.80:8011/"; //鍔炲叕瀹ゆ湇鍔″櫒
//var WEBURL = "http://localhost:8081/SWEAPI/"; //ch鏈湴
- //var WEBURL = "http://localhost:8085/API/"; //zgq鏈湴
+ var WEBURL = "http://localhost:8085/API/"; //zgq鏈湴
//var WEBURL = "http://192.168.2.21:8081/lubaoWebAPI/";//鐜嬫案娉㈡湰鍦伴厤缃紝璇峰嬁鏇存敼
//var WEBURL = "http://101.37.171.70/API/"; //鍏徃鏈嶅姟鍣�
//var WEBURL = "http://localhost:8080/API/"; //棰滄檽鍐涙湰鍦伴厤缃�
@@ -10,7 +10,7 @@
//var WEBURL = "http://10.1.4.154/API/"; //姹熶赴瀹㈡埛
//var WEBURL = "http://10.1.4.155/API/"; //姹熶赴瀹㈡埛NEW
//var WEBURL = "http://47.96.97.237/API/"; //鏅轰簯鏈嶅姟鍣�
- var WEBURL = "http://183.129.128.86:9090/API/"; //鍑礉濂堢壒瀹㈡埛鏈嶅姟鍣�
+ //var WEBURL = "http://183.129.128.86:9090/API/"; //鍑礉濂堢壒瀹㈡埛鏈嶅姟鍣�
return WEBURL
}
diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index 6f43609..28b93f8 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -352,7 +352,7 @@
<dd><a lay-href="">宸ュ簭濮斿宸ュ崟null</a></dd>
<dd><a lay-href="">宸ュ簭濮斿宸ュ崟缁存姢null</a></dd>
<dd><a lay-href="杞﹂棿绠$悊/宸ュ簭杩涚珯鎺ユ敹鍗�/Cj_StationInBill.html">宸ュ簭杩涚珯鎺ユ敹鍗�</a></dd>
- <dd><a lay-href="杞﹂棿绠$悊/宸ュ簭娴佽浆/MES_StationInBillList.html">宸ュ簭杩涚珯鎺ユ敹鍗曠淮鎶�</a></dd>
+ <dd><a lay-href="杞﹂棿绠$悊/宸ュ簭杩涚珯鎺ユ敹鍗�/Cj_StationInBillList.html">宸ュ簭杩涚珯鎺ユ敹鍗曠淮鎶�</a></dd>
<dd><a lay-href="杞﹂棿绠$悊/宸ュ簭鍑虹珯姹囨姤鍗�/Cj_StationOutBill.html">宸ュ簭鍑虹珯姹囨姤鍗�</a></dd>
<dd><a lay-href="杞﹂棿绠$悊/宸ュ簭娴佽浆/MES_StationOutBillList.html">宸ュ簭鍑虹珯姹囨姤鍗曠淮鎶�</a></dd>
<dd><a lay-href="杞﹂棿绠$悊/濮斿宸ュ簭鍙戝嚭鍗�/Cj_StationEntrustInBill.html">宸ュ簭濮斿鍙戝嚭鍗�</a></dd>
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html"
index 102465b..eb2c20f 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_Add_Edit_FirstPieceCheckBill.html"
@@ -206,25 +206,6 @@
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script>
-
- //鑾峰彇鍙傛暟
- 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 params = getUrlVars();
- var hID = params[params[0]];//缂栬緫鏌ョ湅
-
-
layui.config({
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
@@ -236,6 +217,59 @@
, table = layui.table
, form = layui.form
, element = layui.element;
+ /*鍥哄畾浠g爜锛屾瘡寮犲崟鎹兘瑕乥egin*/
+ /* 1.鏃犳簮鍗曟柊澧�
+ * 2.鏈夋簮鍗曟柊澧�
+ * 3.缂栬緫
+ * 4.娴忚
+ * 5.鍙樻洿
+ */
+ var OperationType = 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;
+ }
+ var params = getUrlVars();
+ var linterid = params[params[0]];//婧愬崟id
+ OperationType = params[params[1]];//鎿嶄綔绫诲瀷
+ /*鍥哄畾浠g爜锛屾瘡寮犲崟鎹兘瑕乥egin*/
+ //alert("id:" + params[params[0]] + ",type:" + params[params[1]]);
+ //鍒ゆ柇鎿嶄綔绫诲瀷
+ if (linterid == null || linterid == 0) {
+ //鍒濆鍔犺浇琛ㄦ牸{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": " ", "HSQProcName": " ","HProcID":0, "HZRProcName": " ", "HMRBChecker": " ", "HRemark": " ", "HPSProcName": " ", "HCloseMan": " " }
+ option.data = [{ "HQCCheckItemID": 0, "HQCStd": " ", "HUnit": " ", "HQCNote": " ", "HResult": " ", "HMax": " ", "HMin": " ", "HAvg": " ", "HRemark": " " }];
+ table.render(option);
+ }
+ else {
+ $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
+ //缂栬緫鍔犺浇鏁版嵁
+ $.ajax({
+ url: GetWEBURL() + 'MES_QC_FirstPieceCheckDetail_Json',
+ type: "GET",
+ data: { "sqlWhere": "and HInterID=" + linterid },
+ success: function (result) {
+ if (result.count == 1) {
+ option.data = result.data;
+ table.render(option);
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(index0);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+
+ }
+
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
//if (sessionStorage.login != "login") {
@@ -266,37 +300,6 @@
]]
, limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
};
- //鍒ゆ柇鏄惁鏂板
- if (hID == null || hID == 0)
- {
- //鍒濆鍔犺浇琛ㄦ牸{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": " ", "HSQProcName": " ","HProcID":0, "HZRProcName": " ", "HMRBChecker": " ", "HRemark": " ", "HPSProcName": " ", "HCloseMan": " " }
- option.data = [{ "HQCCheckItemID": 0, "HQCStd": " ", "HUnit": " ", "HQCNote": " ", "HResult": " ", "HMax": " ", "HMin": " ", "HAvg": " ","HRemark":" " }];
- table.render(option);
- }
- else
- {
- $("#HInterID").val(hID);//淇敼鏃朵富琛↖D
- //缂栬緫鍔犺浇鏁版嵁
- $.ajax({
- url: GetWEBURL() + 'MES_QC_FirstPieceCheckDetail_Json',
- type: "GET",
- data: { "sqlWhere": "and HInterID="+hID },
- success: function (result) {
- console.log('gouba' + result);
- if (result.count == 1) {
- option.data = result.data;
- table.render(option);
-
- } else {
- layer.alert(result.code + result.Message, { icon: 5 });
- }
- }, error: function () {
- layer.close(index0);
- layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
- }
- });
-
- }
//澶村伐鍏锋爮浜嬩欢
@@ -2296,15 +2299,14 @@
- function RoadBillMain(hID)//鍔犺浇琛ㄥご
+ function RoadBillMain(linterid)//鍔犺浇琛ㄥご
{
- alert(hID);
//鏌ヨ妫�楠屾柟妗堝崟鏄惁瀛樺湪
$.ajax({
url: GetWEBURL() + "GetQC_FirstPieceCheckDetail",
type: "GET",
data: {
- "HID": hID
+ "HID": linterid
},
success: function (result) {
if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
@@ -2347,7 +2349,7 @@
var shijian = year + "-" + month + "-" + day;
//鍒ゆ柇鏄惁鏂板
- if (hID == null || hID == 0) {
+ if (linterid == null || linterid == 0) {
//鑾峰彇鏈�澶у崟鎹彿 new
$("#HInterID").val(0);
$("#HBillNo").val("");
@@ -2366,8 +2368,8 @@
});
}
else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
- $("#HInterID").val(hID);//淇敼鏃朵富琛↖D
- RoadBillMain(hID);
+ $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
+ RoadBillMain(linterid);
/* RoadBillSub(linterid);*/
}
@@ -2519,7 +2521,7 @@
form.on('submit(Cancel)', function () {
//sessionStorage["SourceFlag"] = false;
- if (hID == null || hID==0) {
+ if (linterid == null || linterid==0) {
parent.location.href = "../../../views/index.html"
}
else
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html"
index a7ca0ca..a92d383 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html"
@@ -312,6 +312,7 @@
function RoadBillMain(linterid)//鍔犺浇琛ㄥご
{
+ var index = layer.load();
$.ajax({
url: GetWEBURL() + "/Cj_StationInBill/GetStationInBill",
type: "GET",
@@ -335,6 +336,11 @@
"HRemark": data.HRemark
});
PicUpload();
+ layer.close(index);
+ }
+ , error: function () {
+ layer.close(index);
+ layer.msg("鎺ュ彛璇锋眰澶辫触");
}
})
}
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html"
index b8bb6e6..3140db2 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html"
@@ -21,7 +21,18 @@
<div class="layui-colla-item">
<div class="layui-colla-title layui-inline">
<div class="layui-inline">
- <span></span>
+ <span>鏇村</span>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鐘舵��</label>
+ <div class="layui-input-block">
+ <select name="Status" lay-filter="Status" style="width:190px;">
+ <option value="-1" selected="selected">鍏ㄩ儴</option>
+ <option value="0">鏈鏍�</option>
+ <option value="1">宸插鏍�</option>
+ <option value="2">宸插叧闂�</option>
+ </select>
</div>
</div>
<div class="layui-inline">
@@ -40,8 +51,16 @@
<table class="" id="mainTable" lay-filter="mainTable"></table>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-FirstPieceCheck"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-FirstPieceCheck" id="btn-FirstPieceCheck">棣栨</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Print" id="btn-Print"><i class="layui-icon layui-icon-circle"></i>棰勮</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Cell" id="btn-Cell"><i class="layui-icon layui-icon-ok"></i>淇濆瓨鍒楀</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-RefreshCell" id="btn-RefreshCell"><i class="layui-icon layui-icon-refresh"></i>榛樿鍒楀</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Exit" id="btn-Exit">閫�鍑�</button>
</div>
</script>
</form>
@@ -77,11 +96,13 @@
var option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
- //,height: 'full-50'
+ , defaultToolbar: ['filter', 'exports', 'print']
+ ,height: 'full-50'
, page: true
, cellMinWidth: 90
, cols: [[
- { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
, { field: '浠诲姟鍗�', title: '浠诲姟鍗�' }
, { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�' }
, { field: '宸ュ簭娴佽浆鍗″彿', title: '宸ュ簭娴佽浆鍗″彿' }
@@ -111,7 +132,6 @@
, { field: '鐢熶骇鐝粍', title: '鐢熶骇鐝粍' }
, { field: 'LOT鏁伴噺', title: 'LOT鏁伴噺' }
, { field: '鎺ユ敹鏁伴噺', title: '鎺ユ敹鏁伴噺' }
- , { toolbar: '#toolBar', title: '鎿嶄綔', width: 120, fixed: 'right' }
]]
};
@@ -125,6 +145,7 @@
if (data1.count == 1) {
option.data = data1.data;
table.render(option);
+ btnIs();
layer.close(index);
} else {
layer.close(index);
@@ -138,8 +159,8 @@
//閲嶇疆鎸夐挳
form.on('submit(btnReSearch)', function (data) {
- $("#HBillNo").val("");
- $("#btnSearch").click();
+ $("#宸ュ簭娴佽浆鍗″彿").val("");
+ //$("#btnSearch").click();
});
//鏌ヨ鎸夐挳
@@ -148,6 +169,7 @@
if (宸ュ簭娴佽浆鍗″彿) {
sWhere += " and 宸ュ簭娴佽浆鍗″彿 like '%" + 宸ュ簭娴佽浆鍗″彿 + "%'";
}
+ var index = layer.load();
$.ajax({
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
url: GetWEBURL() + '/Cj_StationInBill/list',
@@ -157,48 +179,199 @@
if (data1.count == 1) {
option.data = data1.data;
table.render(option);
- layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ btnIs();
+ //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
} else {
layer.alert(data1.code + data1.Message, { icon: 5 });
}
+ layer.close(index);
}, error: function () {
+ layer.close(index);
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
});
- //鐩戝惉琛ㄦ牸涓宸ュ叿浜嬩欢
- table.on('tool(mainTable)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
- var data = obj.data //鑾峰緱褰撳墠琛屾暟鎹�
- , layEvent = obj.event; //鑾峰緱 lay-event 瀵瑰簲鐨勫��
- if (layEvent === 'detail') {
- layer.msg('鏌ョ湅鎿嶄綔');
- } else if (layEvent === 'del') {
- layer.msg('绂佹鍒犻櫎');
- } else if (layEvent === 'edit') {
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '宸ュ簭杩涚珯鎺ユ敹鍗�-缂栬緫'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0
- , content: ['Cj_StationInBill.html?linterid=' + data.HInterID + '&HBillNo=' + data.鍗曟嵁鍙�, 'yes']
- , resize: false
- , cancel: function () {
- $(".layui-btn").removeClass("layui-btn-disabled");
+ //澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id);
+ switch (obj.event) {
+ case 'btn-Add':
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鏂板妯℃不鍏锋姤搴熷叆搴撳崟',
+ closeBtn: 1,
+ shift: 2,
+ area: ['100%', '100%'],
+ maxmin: true,
+ content: '../妯℃不鍏蜂粨搴撶鐞�/Sc_Add_MouldScrapInBillList.html',
+ end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ },
+ success: function (layero, index) {
+
+ }
+ });
+ break;
+ //缂栬緫
+ case 'btn-Edit':
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '宸ュ簭杩涚珯鎺ユ敹鍗�-缂栬緫'
+ , shade: 0.6
+ , maxmin: false
+ , anim: 0
+ , content: ['Cj_StationInBill.html?linterid=' + data[0].HInterID + '&HBillNo=' + data[0].鍗曟嵁鍙�, 'yes']
+ , resize: false
+ , cancel: function () {
+ $(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
}
- })
- }
+ break;
+ //鍒犻櫎
+ case 'btn-Delete':
+ layer.msg('鍒犻櫎');
+ break;
+ //瀹℃牳
+ case 'btn-Audit':
+ layer.msg('瀹℃牳锛�');
+ break;
+ //鍙嶅鏍�
+ case 'btn-DeAudit':
+ layer.msg('鍙嶅鏍革紒');
+ break;
+ //棣栨
+ case 'btn-FirstPieceCheck':
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var linterid = data[0].HInterID.toString();
+ var type = 2;
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '棣栦欢妫�楠屽崟-缂栬緫'
+ , shade: 0.6
+ , maxmin: false
+ , anim: 0
+ , content: ['../../璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html?linterid=' + linterid + '&type=' + type, 'yes']
+ , resize: false
+ , cancel: function () {
+ btnIs();
+ }
+ })
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ }
+ break;
+ //淇濆瓨鍒楀
+ case 'btn-Cell':
+ var arr = [];
+ // 鍒楁暟
+ var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
+ for (var i = 0; i <= colNum; i++) {
+ var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
+ var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width();
+ if (colName != "" && colName != null) {
+ arr.push(colWidth == -1 ? 200 : colWidth);
+ }
+ }
+ arr.unshift(40); //棣栦綅杩藉姞
+ $.ajax({
+ url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
+ async: false,
+ type: "POST",
+ dataType: "json",
+ data: { "myMap": JSON.stringify(arr), "Name": Name },
+ success: function (data1) {
+ if (data1.count == 1) {
+ layer.alert(data1.Message, { icon: 1 });
+ } else {
+ layer.alert(data1.Message, { icon: 5 });
+ }
+ }, error: function (e) {
+ layer.alert(e.Message, { icon: 5 });
+ }
+ });
+ //璁剧疆璧嬪�煎垪瀹�
+ var colWidth = getColumnsWidth();
+ if (colWidth == "" || colWidth == []) {
+
+ }
+ else {
+ $.each(columns, function (x, m) {
+ m["width"] = colWidth[x];
+ });
+ }
+ SearchLoad(sWhere, table, option);
+ break;
+ //榛樿鍒楀
+ case 'btn-RefreshCell':
+ var arr = [];
+ // 鍒楁暟
+ var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
+ for (var i = 0; i <= colNum; i++) {
+ var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
+ if (colName != "" && colName != null) {
+ arr.push(200); //榛樿瀹藉害200
+ }
+ }
+ arr.unshift(40); //棣栦綅杩藉姞
+
+ $.ajax({
+ url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
+ async: false,
+ type: "POST",
+ dataType: "json",
+ data: { "myMap": JSON.stringify(arr), "Name": Name },
+ success: function (data1) {
+ if (data1.count == 1) {
+ layer.alert(data1.Message, { icon: 1 });
+
+ } else {
+ layer.alert(data1.Message, { icon: 5 });
+ }
+ }, error: function (e) {
+ layer.alert(e.Message, { icon: 5 });
+ }
+ });
+ //璁剧疆璧嬪�煎垪瀹�
+ var colWidth = getColumnsWidth();
+ if (colWidth == "" || colWidth == []) {
+
+ }
+ else {
+ $.each(columns, function (x, m) {
+ m["width"] = colWidth[x];
+ });
+ }
+ SearchLoad(sWhere, table, option);
+ break;
+ };
});
- //laydate.render({
- // elem: '#HDate'
- // , type: 'datetime'
- // , trigger: 'click'
- // , format:'yyyy-MM-dd HH:mm'
- //});
+ //鍔熻兘鎸夐挳鏄惁绂佺敤鏂规硶锛屾瘡娆″姞杞借〃鏍奸兘瑕佽皟鐢�
+ function btnIs() {
+ $('#btn-Add').addClass("layui-btn-disabled").attr("disabled", true);//鏂板鎸夐挳
+ $('#btn-Delete').addClass("layui-btn-disabled").attr("disabled", true);//鍒犻櫎鎸夐挳
+ $('#btn-Audit').addClass("layui-btn-disabled").attr("disabled", true);//瀹℃牳鎸夐挳
+ $('#btn-DeAudit').addClass("layui-btn-disabled").attr("disabled", true);//鍙嶅鏍告寜閽�
+ $('#btn-Print').addClass("layui-btn-disabled").attr("disabled", true);//棰勮鎸夐挳
+ $('#btn-Cell').addClass("layui-btn-disabled").attr("disabled", true);//淇濆瓨鍒楀鎸夐挳
+ $('#btn-RefreshCell').addClass("layui-btn-disabled").attr("disabled", true);//榛樿鍒楀鎸夐挳
+ $('#btn-Exit').addClass("layui-btn-disabled").attr("disabled", true);//閫�鍑烘寜閽�
+ }
//浠ヤ笂鏄痩ayui妯″潡
--
Gitblit v1.9.1