From af5ddf873da1981fed8fb0f8dfcdaafb97f47d17 Mon Sep 17 00:00:00 2001
From: 沈泽 <211959439@qq.com>
Date: 星期四, 02 九月 2021 15:30:14 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
---
WebTM/views/设备管理/Sb_EqpConkBookBillList.html | 470 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 238 insertions(+), 232 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html"
index 2b1d9cd..349b9c4 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpConkBookBillList.html"
@@ -49,19 +49,14 @@
<option value="ZHSJ">涓婃灦褰掕繕鍗�</option>
</select>
</div>
- </div>
+ </div>-->
<div class="layui-inline">
<label class="layui-form-label">鍗曟嵁鍙�</label>
<div class="layui-input-block">
<input type="text" class="layui-input" name="HBillNo" id="HBillNo">
</div>
</div>
- <div class="layui-inline">
- <label class="layui-form-label">鍒跺崟浜�</label>
- <div class="layui-input-block">
- <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy">
- </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>
@@ -72,12 +67,7 @@
<span>鍏朵粬鏉′欢></span>
</div>
</div>
- <div class="layui-inline">
- <label class="layui-form-label">鍗曟嵁鍙�</label>
- <div class="layui-input-block">
- <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
- </div>
- </div>
+
</div>
</div>
</div>
@@ -85,9 +75,9 @@
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<!--<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-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="btnAdd"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btnModify"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btndelete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
</div>
@@ -107,6 +97,7 @@
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
}).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ //#region 鍏叡鍙橀噺
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
@@ -118,193 +109,240 @@
, util = layui.util
//鏌ヨ鏉′欢
var sWhere = "";
+ var option = [];
+ //#endregion
- var option = {
- elem: '#mainTable'
- , toolbar: '#toolbarDemo'
- , height: 'full-50'
- , page: true
- , cellMinWidth: 90
- , cols: [[
- { type: 'checkbox', fixed: 'left' }
- ,{ field: 'hmainid', title: '鍗曟嵁ID', hide: true }
- , { 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: 'HEquipID', title: 'HEquipID', width: 200, hide: true }
- , { field: '璁惧浠g爜', title: '璁惧浠g爜', width: 200 }
- , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 200 }
- , { field: 'HConkTypeID', title: 'HConkTypeID', width: 200, hide: true }
- , { field: '鏁呴殰绫诲埆浠g爜', title: '鏁呴殰绫诲埆浠g爜', width: 200 }
- , { field: '鏁呴殰绫诲埆', title: '鏁呴殰绫诲埆', width: 200 }
- , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
- , { field: '鍙戠幇浜轰唬鐮�', title: '鍙戠幇浜轰唬鐮�', width: 200 }
- , { field: '鍙戠幇浜�', title: '鍙戠幇浜�', width: 200 }
- , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
- , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 115 }
- , { field: '閮ㄩ棬鍚嶇О', title: '閮ㄩ棬鍚嶇О', width: 200 }
- , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true }
- , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 115 }
- , { field: '璐熻矗浜�', title: '璐熻矗浜�', width: 200 }
- , { field: '鍙戠敓鏃ユ湡', title: '鍙戠敓鏃ユ湡', width: 160, templet: "<div>{{d.鍙戠敓鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍙戠敓鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '鏁呴殰鎻忚堪', title: '鏁呴殰鎻忚堪', width: 200 }
- , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 200 }
- , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 115 }
- , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 200 }
- , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
- , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '淇敼浜�', title: '淇敼浜�', width: 200 }
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
- , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
- , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
- , { field: 'HConkReasonID', title: 'HConkReasonID', width: 115, hide: true }
- , { field: '鏁呴殰鍘熷洜浠g爜', title: '鏁呴殰鍘熷洜浠g爜', width: 200 }
- , { field: '鏁呴殰鍘熷洜鍚嶇О', title: '鏁呴殰鍘熷洜鍚嶇О', width: 200 }
- , { field: '鏁呴殰鍘熷洜鎻忚堪', title: '鏁呴殰鍘熷洜鎻忚堪', width: 200 }
- , { field: 'HManagerID', title: 'HManagerID', 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, hide: true }
- , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
- , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
- , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
- , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
- , { field: 'HBillType', title: 'HBillType', width: 200, hide: true }
- ]]
- };
+ //#region 杩涘叆椤甸潰鏃㈠姞杞�
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+ //#endregion
- var index = layer.load(0);
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢
//澶村伐鍏锋爮浜嬩欢
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: '../璁惧绠$悊/Sb_Add_EqpConkBookBillList.html',
- end: function () {
- //鍒锋柊椤甸潰,
- location.reload();
- },
- success: function (layero, index) {
-
- }
- });
+ //鏂板
+ case 'btnAdd': set_AddNew();
break;
- case 'btn-Edit':
- var checkStatus = table.checkStatus('mainTable')
- , data = checkStatus.data;
- if (checkStatus.data.length === 1) {
- var hID = data[0].hmainid.toString();
- //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '缂栬緫璁惧鏁呴殰鐧昏鍗�'
- , closeBtn: 1
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: '../璁惧绠$悊/Sb_Add_EqpConkBookBillList.html?hID=' + hID
- , resize: false,
- end: function () {
- //鍒锋柊椤甸潰,
- location.reload();
- }
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
-
- } else {
- layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
- }
-
+ //缂栬緫
+ case 'btnModify': set_ShowBill();
break;
- case 'btn-Delete':
- var checkStatus = table.checkStatus('mainTable')
- , data = checkStatus.data;
- if (checkStatus.data.length === 1) {
- var InterID = data[0].hmainid.toString();
- //閫昏緫鍒犻櫎鏂规硶
- layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
- $.ajax({
- type: "GET",
- url: GetWEBURL() + "Sb_EqpRepairWorkBill/DeltetEqpConkBookBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- data: { "HInterID": InterID },
- success: function (result) {
- if (result.count == 1) {
- layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
- // 寰楀埌frame绱㈠紩
- var index = layer.getFrameIndex(window.name);
- //鍏抽棴褰撳墠frame
- layer.close(index);
- //淇敼涓哄姛鍚庡埛鏂扮晫闈�
- window.location.reload();
- });
-
- } else {
- layer.alert(result.code + result.Message, { icon: 5 });
- }
- }, error: function () {
- layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
- }
- });
- })
- }
- else {
- layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
- }
+ //鍒犻櫎
+ case 'btndelete': set_DeleteBill();
+ break;
+ //绂佺敤
+ case 'btnJY': set_AuditBill();
+ break;
+ //鍙嶇鐢�
+ case 'btnFJY': set_DeAuditBill();
break;
};
});
- //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
- $.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL() + '/Sb_EqpRepairWorkBill/GetEqpConkBookBillList',
- 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 });
- }
- });
-
- //閲嶇疆鎸夐挳
- form.on('submit(btnReSearch)', function (data) {
- $("#HDate").val("");//寮�濮嬫棩鏈�
- $("#HDate1").val("");//缁撴潫鏃ユ湡
- $("#HBillNo").val("");//鍗曟嵁鍙�
- $("#btnSearch").click();
- });
-
//鏌ヨ鎸夐挳
- form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
+ form.on('submit(btnSearch)', function (data) {
+ get_FastQuery();
+ });
+
+ // 閲嶇疆鎸夐挳
+ form.on('submit(btnReSearch)', function (data) {
+ set_ClearQuery();
+ });
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夋柟娉�
+
+ // 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ //鏌ヨ
+ get_Display(sWhere);
+ }
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-50'
+ , page: true
+ , cellMinWidth: 90
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'hmainid', title: '鍗曟嵁ID', hide: true }
+ , { 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: 'HEquipID', title: 'HEquipID', width: 200, hide: true }
+ , { field: '璁惧浠g爜', title: '璁惧浠g爜', width: 200 }
+ , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 200 }
+ , { field: 'HConkTypeID', title: 'HConkTypeID', width: 200, hide: true }
+ , { field: '鏁呴殰绫诲埆浠g爜', title: '鏁呴殰绫诲埆浠g爜', width: 200 }
+ , { field: '鏁呴殰绫诲埆', title: '鏁呴殰绫诲埆', width: 200 }
+ , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
+ , { field: '鍙戠幇浜轰唬鐮�', title: '鍙戠幇浜轰唬鐮�', width: 200 }
+ , { field: '鍙戠幇浜�', title: '鍙戠幇浜�', width: 200 }
+ , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
+ , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 115 }
+ , { field: '閮ㄩ棬鍚嶇О', title: '閮ㄩ棬鍚嶇О', width: 200 }
+ , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true }
+ , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 115 }
+ , { field: '璐熻矗浜�', title: '璐熻矗浜�', width: 200 }
+ , { field: '鍙戠敓鏃ユ湡', title: '鍙戠敓鏃ユ湡', width: 160, templet: "<div>{{d.鍙戠敓鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍙戠敓鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '鏁呴殰鎻忚堪', title: '鏁呴殰鎻忚堪', width: 200 }
+ , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 200 }
+ , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 115 }
+ , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 200 }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '淇敼浜�', title: '淇敼浜�', width: 200 }
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
+ , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
+ , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
+ , { field: 'HConkReasonID', title: 'HConkReasonID', width: 115, hide: true }
+ , { field: '鏁呴殰鍘熷洜浠g爜', title: '鏁呴殰鍘熷洜浠g爜', width: 200 }
+ , { field: '鏁呴殰鍘熷洜鍚嶇О', title: '鏁呴殰鍘熷洜鍚嶇О', width: 200 }
+ , { field: '鏁呴殰鍘熷洜鎻忚堪', title: '鏁呴殰鍘熷洜鎻忚堪', width: 200 }
+ , { field: 'HManagerID', title: 'HManagerID', 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, hide: true }
+ , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
+ , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
+ , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
+ , { field: 'HBillType', title: 'HBillType', width: 200, hide: true }
+
+ ]]
+ };
+ }
+
+ //鏌ヨ
+ function get_Display() {
+ var index = layer.load(0, { shade: false });
+ //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+ $.ajax({
+ url: GetWEBURL() + '/Sb_EqpRepairWorkBill/GetEqpConkBookBillList',
+ 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 });
+ }
+ });
+ }
+
+ //鏂板
+ function set_AddNew() {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鏂板璁惧鏁呴殰鐧昏鍗�',
+ closeBtn: 1,
+ shift: 2,
+ area: ['100%', '100%'],
+ maxmin: true,
+ content: '../璁惧绠$悊/Sb_Add_EqpConkBookBillList.html?OperationType=1&linterid=&HSouceBillType=',
+ end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ },
+ success: function (layero, index) {
+
+ }
+ });
+ }
+
+ //缂栬緫
+ function set_ShowBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var hID = data[0].hmainid.toString();
+ //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '缂栬緫璁惧鏁呴殰鐧昏鍗�'
+ , closeBtn: 1
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../璁惧绠$悊/Sb_Add_EqpConkBookBillList.html?OperationType=3&linterid=' + hID + '&HSouceBillType='
+ , resize: false,
+ end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ }
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ }
+ }
+
+ //鍒犻櫎
+ function set_DeleteBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫鍒犻櫎鏂规硶
+ layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "Sb_EqpRepairWorkBill/DeltetEqpConkBookBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ })
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+ }
+ }
+
+ //蹇�熻繃婊�
+ function get_FastQuery() {
var HDate = $("#HDate").val();//寮�濮嬫棩鏈�
var HDate1 = $("#HDate1").val();//缁撴潫鏃ユ湡
var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
@@ -317,55 +355,23 @@
if (HBillNo) {
sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
}
- var index = layer.load(0);
- $.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL() + '/Sb_EqpRepairWorkBill/GetEqpConkBookBillList',
- type: "GET",
- data: { "sWhere": sWhere},
- success: function (data1) {
- if (data1.count == 1) {
- option.data = data1.data;
- table.render(option);
- layer.close(index);
- layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
- } else {
- layer.close(index);
- layer.alert(data1.code + data1.Message, { icon: 5 });
- }
- }, error: function () {
- layer.close(index);
- layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
- }
- });
- //璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
- sWhere = "";
- //$("#HBillType").val("");//鍗曟嵁绫诲瀷
- //$("#HBillNo").val("");//鍗曟嵁鍙�
- //$("#HSourceBillNo").val("");//婧愬崟鍙�
- //$("#HCreateBy").val("");//鍒跺崟浜�
- //$("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
- //$("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
- });
+ get_Display(sWhere);
+ sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ }
- //鐩戝惉琛屽弻鍑讳簨浠�
- table.on('rowDouble(mainTable)', function (obj) {
- layer.alert("鍙屽嚮浜嬩欢", { icon: 1 });
- });
+ //閲嶇疆
+ function set_ClearQuery() {
+ $("#HDate").val("");//寮�濮嬫棩鏈�
+ $("#HDate1").val("");//缁撴潫鏃ユ湡
+ $("#HBillNo").val("");//鍗曟嵁鍙�
+ $("#btnSearch").click();
+ }
-
- //laydate.render({
- // elem: '#HDate'
- // , type: 'datetime'
- // , trigger: 'click'
- // , format:'yyyy-MM-dd HH:mm'
- //});
+ //#endregion
//浠ヤ笂鏄痩ayui妯″潡
});
-
-
</script>
--
Gitblit v1.9.1