From e570b232bc6b7aa8c46c73f87caa1cb89f90dcff Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期四, 28 七月 2022 15:07:16 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
---
WebTM/views/设备管理/Sb_EquipMaintainBillList.html | 384 +++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 276 insertions(+), 108 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html"
index 9ab5f9e..04ab15d 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html"
@@ -37,7 +37,7 @@
<option value="ZHSJ">涓婃灦褰掕繕鍗�</option>
</select>
</div>
- </div>
+ </div>-->
<div class="layui-inline">
<label class="layui-form-label">鍗曟嵁鍙�</label>
<div class="layui-input-block">
@@ -49,48 +49,68 @@
<div class="layui-input-block">
<input type="text" class="layui-input" name="HCreateBy" id="HCreateBy">
</div>
- </div>-->
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">寮�濮嬫椂闂�</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">缁撴潫鏃堕棿</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
+ </div>
+ </div>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
- <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>-->
- <!--<div class="layui-colla-content">
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+ <div class="layui-colla-content">
<div class="layui-inline">
<div class="layui-inline">
<span>鍏朵粬鏉′欢></span>
</div>
</div>
- <div class="layui-inline">
- <label class="layui-form-label">寮�濮嬫椂闂�</label>
- <div class="layui-input-block">
- <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">缁撴潫鏃堕棿</label>
- <div class="layui-input-block">
- <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
- </div>
- </div>
- </div>-->
+ </div>
</div>
</div>
+
<table class="" id="mainTable" lay-filter="mainTable"></table>
+ <div class="layui-tab layui-tab-card">
+ <ul class="layui-tab-title">
+ <li class="layui-this">淇濆吇椤逛俊鎭�</li>
+ <li>閰嶄欢淇℃伅</li>
+ </ul>
+ <div class="layui-tab-content">
+ <div class="layui-tab-item layui-show">
+ <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+ </div>
+ <div class="layui-tab-item">
+ <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
+ </div>
+ </div>
+ </div>
+
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<button type="button" class="layui-btn layui-btn-sm" lay-event="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"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
- <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
- <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></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-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
</div>
</script>
+
+ <script type="text/html" id="xuhao">
+ {{d.LAY_TABLE_INDEX+1}}
+ </script>
+ <script type="text/html" id="xuhao1">
+ {{d.LAY_TABLE_INDEX+1}}
+ </script>
+
</form>
</div>
</div>
@@ -100,29 +120,38 @@
<script src="../../layuiadmin/Scripts/json2.js"></script>
<script src="../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
<script src="../../layuiadmin/Scripts/webConfig.js"></script>
+ <script src="../../layuiadmin/PubCustom.js"></script>
+ <script src="../../layuiadmin/zgqCustom/zgqCustom.js"></script>
<script>
layui.config({
base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
}).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ //#region 鍏叡鍙橀噺
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
, table = layui.table
+ , table1 = layui.table
+ , table2 = layui.table
, form = layui.form
, element = layui.element
, laypage = layui.laypage
, laydate = layui.laydate
, util = layui.util
+ //鏌ヨ鏉′欢
var sWhere = "";
- //鍏敤鍙橀噺
var option = [];
+ var option1 = [];
+ var option2 = [];
+ //#endregion
- //鍒濆鍖栬〃鏍�
- set_InitGrid();
- //鍔犺浇鏁版嵁鍒扮綉鏍�
- get_Display(sWhere);
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+ //#endregion
//澶村伐鍏锋爮浜嬩欢
table.on('toolbar(mainTable)', function (obj) {
@@ -132,86 +161,105 @@
case 'btn-Add':
set_AddNew();
break;
+ //缂栬緫鎸夐挳
case 'btn-Edit':
set_ShowBill();
break;
+ //鍒犻櫎
case 'btn-Delete':
set_DeleteBill();
break;
- //瀹℃牳鎸夐挳
- case 'btn-Audit':
- set_CheckBill();
+ //娴忚
+ case 'btn-view':
+ get_ViewReport();
break;
- //鍙嶅鏍告寜閽�
- case 'btn-DeAudit':
- set_AbandonCheck();
- break;
- //棰勮鎸夐挳
- case 'btn-Print':
+ //鎵撳嵃
+ case 'btn-print':
get_PrintReport();
break;
- //閫�鍑烘寜閽�
- case 'btn-Close':
- parent.layui.admin.events.closeThisTabs();
+ //鍒锋柊
+ case 'get_Refresh':
+ set_Refresh();
+ break;
+
+ //閫�鍑�
+ case 'get_Exit':
+ Pub_Close(2);
break;
};
+ });
+
+ //鐐瑰嚮涓昏〃甯﹀嚭浠庤〃鏁版嵁
+ table.on('row(mainTable)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
+ var datas = obj.data; //鑾峰緱褰撳墠琛屾暟鎹�
+ var linterid = datas.hmainid;
+ $.ajax({
+ url: GetWEBURL() + 'Sb_EquipMaintainBill/Sb_EquipMaintainBillListProjectDetaiNew',
+ type: "GET",
+ data: { "HInterID": linterid },
+ success: function (data1) {
+ if (data1.count == 1) {
+ option1.data = data1.list[0];
+ table1.render(option1);
+ option2.data = data1.list[1];
+ table2.render(option2);
+ } else {
+ layer.alert("鑾峰彇澶辫触", { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+ }
+ });
});
//閲嶇疆鎸夐挳
form.on('submit(btnReSearch)', function (data) {
set_ClearQuery();
});
- //閲嶇疆杩囨护鏉′欢
- function set_ClearQuery() {
- $("#HNumber").val("");
- $("#HName").val("");
- }
-
//鏌ヨ鎸夐挳
form.on('submit(btnSearch)', function (data) {
get_FastQuery(table, option);
});
- //蹇�熻繃婊�
- function get_FastQuery(table, option) {
- //var HNumber = $("#HNumber").val();
- //var HName = $("#HName").val();
- //if (HNumber) {
- // sWhere += " and 鑱屽憳浠g爜 like '%" + HNumber + "%'";
- //}
- //if (HName) {
- // sWhere += " and 鑱屽憳鍚嶇О like '%" + HName + "%'";
- //}
- var index = layer.load(0);
- get_Display(sWhere);
- sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
- }
- //鍒濆鍖栬〃鏍�
+ //#region 姝ら〉闈㈡墍鏈夋柟娉�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�(涓昏〃)
+ set_InitGrid();
+ //鍒濆鍖栬〃鏍�(瀛愯〃1)
+ set_InitGrid1();
+ //鍒濆鍖栬〃鏍�(瀛愯〃2)
+ set_InitGrid2();
+ //鏌ヨ
+ get_Display(sWhere);
+ }
+ //鍒濆鍖栦富琛ㄦ牸
function set_InitGrid() {
option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
- , height: 'full-50'
+ , height: '400'
, page: true
, cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
, cols: [[
{ type: 'checkbox', fixed: 'left' }
, { field: 'hmainid', title: 'hmainid', hide: true }
- , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160 }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
, { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160, hide: true }
, { field: '璁惧浠g爜', title: '璁惧浠g爜', width: 200 }
- , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 200, hide: true }
+ , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 200 }
, { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 200, hide: true }
- , { field: '寮�濮嬫棩鏈�', title: '寮�濮嬫棩鏈�', width: 200 }
- , { field: '缁撴潫鏃ユ湡', title: '缁撴潫鏃ユ湡', width: 200 }
+ , { field: '寮�濮嬫棩鏈�', title: '寮�濮嬫棩鏈�', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { field: '缁撴潫鏃ユ湡', title: '缁撴潫鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '淇濆吇璁″垝缂栧彿', title: '淇濆吇璁″垝缂栧彿', width: 200 }
, { field: '鎽樿', title: '鎽樿', width: 200 }
, { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 200 }
, { field: '閰嶄欢浠g爜', title: '閰嶄欢浠g爜', width: 115, hide: true }
, { field: '閰嶄欢鍚嶇О', title: '閰嶄欢鍚嶇О', width: 200 }
- , { field: '鍗曚綅', title: '鍗曚綅', width: 200 }
+ , { field: '鍗曚綅鍚嶇О', title: '鍗曚綅鍚嶇О', width: 200 }
, { field: '瀹為檯鐢ㄩ噺', title: '瀹為檯鐢ㄩ噺', width: 200 }
, { field: '鏍囧噯鐢ㄩ噺', title: '鏍囧噯鐢ㄩ噺', width: 200 }
, { field: '璐熻矗浜�', title: '璐熻矗浜�', width: 200 }
@@ -223,14 +271,14 @@
, { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
, { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200, hide: true }
, { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 115, hide: true }
- , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200 }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
- , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, hide: true }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '淇敼浜�', title: '淇敼浜�', width: 200, hide: true }
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 115, hide: true }
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 115, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
, { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200 }
- , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200, hide: true }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 115, hide: true }
, { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
, { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
@@ -240,6 +288,93 @@
]]
}
}
+ //鍒濆鍖栬〃鏍�(瀛愯〃1)
+ function set_InitGrid1() {
+ var ajaxLoad = layer.load();
+ option1 = {
+ elem: '#mainTable1'
+ //, toolbar: '#toolbarDemo'
+ , height: '350'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , cols: [[
+ //{ type: 'checkbox', fixed: 'left' }
+ , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
+ , { field: 'HMaintainItemID', title: '淇濆吇椤圭洰ID', width: 200, hide: true }
+ , { field: 'HMaintainItemNumber', title: '淇濆吇椤圭洰浠g爜', width: 200 }
+ , { field: 'HMaintainItem', title: '淇濆吇椤圭洰', width: 200 }
+ , { field: 'HMaintainPart', title: '淇濆吇閮ㄤ綅', width: 200 }
+ , { field: 'HClaim', title: '鍏蜂綋瑕佹眰', width: 200 }
+ , { field: 'HManagerID', title: '璐熻矗浜篒D', width: 200, hide: true }
+ , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', width: 200 }
+ , { field: 'HManagerName', title: '璐熻矗浜�', width: 200 }
+ , { field: 'HRemark', title: '澶囨敞', width: 200 }
+ ]]
+ };
+ option1.data = [];
+ table1.render(option1);
+ layer.close(ajaxLoad);
+ }
+ //鍒濆鍖栬〃鏍�(瀛愯〃2)
+ function set_InitGrid2() {
+ var ajaxLoad = layer.load();
+ option2 = {
+ elem: '#mainTable2'
+ //, toolbar: '#toolbarDemo'
+ , height: '350'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , cols: [[
+ //{ type: 'checkbox', fixed: 'left' }
+ , { templet: '#xuhao1', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
+ , { field: 'HMaterID', title: '閰嶄欢ID', width: 200, hide: true }
+ , { field: 'HMaterNumber', title: '閰嶄欢浠g爜', width: 200 }
+ , { field: 'HMaterName', title: '閰嶄欢鍚嶇О', width: 200 }
+ , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', width: 200, hide: true }
+ , { field: 'HUnitID', title: '鍗曚綅ID', width: 200, hide: true }
+ , { field: 'HUnitNumber', title: '鍗曚綅浠g爜', width: 200 }
+ , { field: 'HUnitName', title: '鍗曚綅鍚嶇О', width: 200 }
+ , { field: 'HManagerID', title: '璐熻矗浜篒D', width: 200, hide: true }
+ , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', width: 200 }
+ , { field: 'HManagerName', title: '璐熻矗浜�', width: 200 }
+ , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', width: 200 }
+ , { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', width: 200 }
+ , { field: 'HRemark', title: '澶囨敞', width: 200 }
+ ]]
+ };
+ option2.data = [];
+ table2.render(option2);
+ layer.close(ajaxLoad);
+ }
+ //鍔犺浇缃戞牸
+ function get_Display(sWhere) {
+ //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+ $.ajax({
+ //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
+ url: GetWEBURL() + '/Sb_EquipMaintainBill/GetEquipMaintainBillList',
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
+ success: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ layer.close(index);
+ } else {
+ layer.close(index);
+ layer.alert("娌℃湁鏁版嵁璁板綍!", { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(index);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+
+
var index = layer.load(0);
//鏂板
function set_AddNew() {
@@ -251,7 +386,7 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- content: '../璁惧绠$悊/Sb_EquipMaintainBillEdit.html',
+ content: '../璁惧绠$悊/Sb_EquipMaintainBillEdit.html?OperationType=1&linterid=&HSouceBillType=',
end: function () {
//鍒锋柊椤甸潰,
location.reload();
@@ -260,12 +395,12 @@
}
});
}
- //缂栬緫鍗曟嵁
+ //缂栬緫
function set_ShowBill() {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
- var hID = data[0].hmainid.toString();
+ var linterid = data[0].hmainid.toString();
//if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
layer.open({
type: 2
@@ -274,7 +409,7 @@
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
, anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: '../璁惧绠$悊/Sb_EquipMaintainBillEdit.html?hID=' + hID
+ , content: '../璁惧绠$悊/Sb_EquipMaintainBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
, resize: false,
end: function () {
//鍒锋柊椤甸潰,
@@ -300,7 +435,7 @@
$.ajax({
type: "GET",
url: GetWEBURL() + "/Sb_EquipMaintainBill/DeltetEquipMaintainBillList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- data: { "HInterID": HInterID },
+ data: { "HInterID": HInterID, "user": sessionStorage["HUserName"] },
success: function (result) {
if (result.count == 1) {
layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -325,40 +460,73 @@
layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
}
}
- //瀹℃牳
- function set_CheckBill() {
+ //棰勮
+ function get_ViewReport() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + InterID + "&Type=HEquipMaintainBill&OpenTmp=璁惧淇濆吇璁板綍鏉$爜");
+
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
+ }
}
- //鍙嶅鏍�
- function set_AbandonCheck() {
+ //鎵撳嵃
+ function get_PrintReport() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + InterID + "&Type=HEquipMaintainBill&OpenTmp=璁惧淇濆吇璁板綍鏉$爜");
+
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
+ }
+ }
+ //鍒锋柊
+ function set_Refresh() {
+ $("#btnSearch").click();
+ }
+ //蹇�熻繃婊�
+ function get_FastQuery() {
+ //var HBillType = $("#HBillType").val();//鍗曟嵁绫诲瀷
+ var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
+ var HCreateBy = $("#HCreateBy").val();//鍒跺崟浜�
+ var BenginHCreateDate = $("#BenginHCreateDate").val();//寮�濮嬪埗鍗曟椂闂�
+ var EndHCreateDate = $("#EndHCreateDate").val();//缁撴潫鍒跺崟鏃堕棿
+ if (HBillNo) {
+ sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
+ }
+ if (HCreateBy) {
+ sWhere += " and 鍒跺崟浜� like '%" + HCreateBy + "%'";
+ }
+ if (BenginHCreateDate) {
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + BenginHCreateDate + "'";
+ }
+ if (EndHCreateDate) {
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + EndHCreateDate + "'";
+ }
+ get_Display(sWhere);
+ sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ }
+ //閲嶇疆杩囨护鏉′欢
+ function set_ClearQuery() {
+ //$("#HBillType").val("");//鍗曟嵁绫诲瀷
+ $("#HBillNo").val("");//鍗曟嵁鍙�
+ $("#HSourceBillNo").val("");//婧愬崟鍙�
+ $("#HCreateBy").val("");//鍒跺崟浜�
+ $("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
+ $("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
+ sWhere = "";
+ $("#btnSearch").click();
}
- //鍔犺浇缃戞牸
- function get_Display(sWhere) {
- //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
- $.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL() + '/Sb_EquipMaintainBill/GetEquipMaintainBillList',
- type: "GET",
- data: { "sWhere": sWhere },
- success: function (data1) {
- if (data1.count == 1) {
- option.data = data1.data;
- table.render(option);
- layer.close(index);
- } else {
- layer.close(index);
- layer.alert(data1.code + data1.Message, { icon: 5 });
- }
- }, error: function () {
- layer.close(index);
- layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
- }
- })
- }
+
+ //#endregion
});
-
-
-
</script>
--
Gitblit v1.9.1