From dbcc87f39f85b6ec81d53e6dc66e9f51cd34b5d8 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 01 十一月 2023 13:30:37 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/设备管理/Sb_EqpRepairCheckBillList.html | 521 +++++++++++++++++++++++++++++++--------------------------
1 files changed, 283 insertions(+), 238 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpRepairCheckBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpRepairCheckBillList.html"
index 2aca594..2c1ce9f 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpRepairCheckBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EqpRepairCheckBillList.html"
@@ -9,6 +9,9 @@
<link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
<script src="../../layuiadmin/layui/layui.js"></script>
+ <script src="../../layuiadmin/HideButton.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
+
<style type="text/css">
input.layui-input.layui-unselect {
padding-right: 0;
@@ -28,6 +31,30 @@
<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 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>
+ <div class="layui-inline">
+ <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input" id="HDate">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input" id="HDate1">
+ </div>
+ </div>
<!--<div class="layui-inline">
<label class="layui-form-label">鍗曟嵁绫诲瀷</label>
<div class="layui-input-block">
@@ -43,46 +70,30 @@
<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>
- <!--<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>
<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="btn-Add" id="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="Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
</div>
</script>
@@ -95,12 +106,16 @@
<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 () {
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
+
+ //#region 鍏叡鍙橀噺
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
@@ -110,252 +125,282 @@
, laypage = layui.laypage
, laydate = layui.laydate
, util = layui.util
+ , soulTable = layui.soulTable
+
//鏌ヨ鏉′欢
var sWhere = "";
+ var option = [];
+ var HModName = "Sb_EqpRepairCheckBillList";
+ //#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: '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: 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: 'HRepairCheckID1', title: 'HRepairCheckID1', 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_EqpRepairCheckBillList.html',
- end: function () {
- //鍒锋柊椤甸潰,
- location.reload();
- },
- success: function (layero, index) {
-
- }
- });
+ 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_EqpRepairCheckBillList.html?hID=' + hID
- , resize: false,
- end: function () {
- //鍒锋柊椤甸潰,
- location.reload();
- }
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
-
- } else {
- layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
- }
-
+ 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/DeltetEqpRepairCheckBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- 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('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
- }
+ set_DeleteBill();
+ break;
+ //鎸夐挳璁剧疆
+ case 'set_HideButton':
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "3911";
+ get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+ break;
+ //閫�鍑烘寜閽�
+ case 'get_Exit': Pub_Close(2);
break;
};
});
- //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
- $.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL() + '/Sb_EqpRepairWorkBill/GetEqpRepairCheckWorkBillList',
- 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) {
- // $("#HBillType").val("");//鍗曟嵁绫诲瀷
- // $("#HBillNo").val("");//鍗曟嵁鍙�
- // $("#HSourceBillNo").val("");//婧愬崟鍙�
- // $("#HCreateBy").val("");//鍒跺崟浜�
- // $("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
- // $("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
- // $("#btnSearch").click();
- //});
-
+ form.on('submit(btnReSearch)', function (data) {
+ set_ClearQuery();
+ });
//鏌ヨ鎸夐挳
- form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
- //var HBillType = $("#HBillType").val();//鍗曟嵁绫诲瀷
- //var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
- //var HCreateBy = $("#HCreateBy").val();//鍒跺崟浜�
- //var BenginHCreateDate = $("#BenginHCreateDate").val();//寮�濮嬪埗鍗曟椂闂�
- //var EndHCreateDate = $("#EndHCreateDate").val();//缁撴潫鍒跺崟鏃堕棿
- //if (HBillNo) {
- // sWhere += " and HBillNo like '%" + HBillNo + "%'";
- //}
- //if (HCreateBy) {
- // sWhere += " and HCreateBy like '%" + HCreateBy + "%'";
- //}
- //if (BenginHCreateDate) {
- // sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'";
- //}
- //if (EndHCreateDate) {
- // sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'";
- //}
- var index = layer.load(0);
+ form.on('submit(btnSearch)', function (data) {
+ get_FastQuery();
+ })
+ //#endregion
+
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�(涓昏〃)
+ set_InitGrid();
+ //鏌ヨ
+ get_Display(sWhere);
+ }
+ //鍒濆鍖栬〃鏍�(涓昏〃)
+ function set_InitGrid() {
+ $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+ $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-50'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'hmainid', title: '鍗曟嵁ID', hide: true ,sort:true}
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true}
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160, sort: true }
+ , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160, hide: true, sort: true }
+ , { field: 'HEquipID', title: 'HEquipID', width: 200, hide: true, sort: true }
+ , { field: '璁惧浠g爜', title: '璁惧浠g爜', width: 200, sort: true }
+ , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 200, sort: true }
+ , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true, sort: true }
+ , { field: '楠屾敹浜轰唬鐮�', title: '楠屾敹浜轰唬鐮�', width: 200, sort: true }
+ , { field: '楠屾敹浜�', title: '楠屾敹浜�', width: 200, sort: true }
+ , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true }
+ , { field: '缁翠慨閮ㄩ棬浠g爜', title: '缁翠慨閮ㄩ棬浠g爜', width: 115, sort: true }
+ , { field: '缁翠慨閮ㄩ棬鍚嶇О', title: '缁翠慨閮ㄩ棬鍚嶇О', width: 200, sort: true }
+ , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true, sort: true }
+ , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 115, sort: true }
+ , { field: '璐熻矗浜�', title: '璐熻矗浜�', width: 200, sort: true }
+ , { field: '鍙戠敓鏃ユ湡', title: '鍙戠敓鏃ユ湡', width: 160, templet: "<div>{{d.鍙戠敓鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍙戠敓鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 200, sort: true }
+ , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 115, sort: true }
+ , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 200, sort: true }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200, sort: true }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: '淇敼浜�', title: '淇敼浜�', width: 200, sort: true }
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200, sort: true }
+ , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200, sort: true }
+ , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: 'hsubid', title: 'hsubid', width: 200, hide: true, sort: true }
+ , { field: 'HRepairCheckID1', title: 'HRepairCheckID1', width: 115, hide: true, sort: true }
+ , { field: '琛ㄤ綋璐熻矗浜轰唬鐮�', title: '琛ㄤ綋璐熻矗浜轰唬鐮�', width: 200, sort: true }
+ , { field: '琛ㄤ綋璐熻矗浜�', title: '琛ㄤ綋璐熻矗浜�', width: 200, sort: true }
+ , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 200, sort: true }
+ , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200, sort: true }
+ , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200, sort: true }
+ , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true, sort: true }
+ , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true, sort: true }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200, sort: true }
+ , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200, sort: true }
+ , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200, sort: true }
+ , { field: 'HBillType', title: 'HBillType', width: 200, hide: true, sort: true }
+
+ ]]
+ }
+ }
+
+ //鍔犺浇鏁版嵁鍒扮綉鏍�
+ function get_Display(sWhere) {
+ var wait = layer.load();//閬僵
$.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
url: GetWEBURL() + '/Sb_EqpRepairWorkBill/GetEqpRepairCheckWorkBillList',
type: "GET",
- data: { "sWhere": sWhere},
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.count == 1) {
option.data = data1.data;
table.render(option);
- layer.close(index);
- layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ //鍒锋柊鎸夐挳鏄剧ず
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "3911";
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
+ layer.close(wait);
} else {
- layer.close(index);
+ layer.close(wait);
layer.alert(data1.code + data1.Message, { icon: 5 });
}
}, error: function () {
- layer.close(index);
- layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+ layer.close(wait);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
- //璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ }
+
+ //鏂板
+ function set_AddNew() {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鏂板璁惧缁翠慨楠屾敹鍗� ',
+ closeBtn: false,
+ shift: 2,
+ area: ['100%', '100%'],
+ maxmin: true,
+ content: '../璁惧绠$悊/Sb_Add_EqpRepairCheckBillList.html?OperationType=1&linterid=&HSouceBillType=',
+ end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ },
+ success: function (layero, index) {
+
+ }
+ });
+ }
+
+ //鍒犻櫎
+ function set_DeleteBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var HInterID = data[0].hmainid.toString();
+
+ //閫昏緫鍒犻櫎鏂规硶
+ layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "Sb_EqpRepairWorkBill/DeltetEqpRepairCheckBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": HInterID, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ })
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+ }
+ }
+
+ //缂栬緫
+ function set_ShowBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var linterid = data[0].hmainid.toString();
+ //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '缂栬緫璁惧缁翠慨楠屾敹鍗� '
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../璁惧绠$悊/Sb_Add_EqpRepairCheckBillList.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
+ , resize: false,
+ end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ }
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ }
+ }
+
+ //蹇�熻繃婊�
+ function get_FastQuery() {
+ var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
+ var HCreateBy = $("#HCreateBy").val();//鍒跺崟浜�
+ var HDate = $("#HDate").val();//寮�濮嬫棩鏈�
+ var HDate1 = $("#HDate1").val();//缁撴潫鏃ユ湡
+ if (HBillNo) {
+ sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
+ }
+ if (HCreateBy) {
+ sWhere += " and 鍒跺崟浜� like '%" + HCreateBy + "%'";
+ }
+ if (HDate) {
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HDate + "'";
+ }
+ if (HDate1) {
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HDate1 + "'";
+ }
+
+ get_Display(sWhere);
+ sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ }
+
+ //閲嶇疆杩囨护鏉′欢鏂规硶
+ function set_ClearQuery() {
+ $("#HBillNo").val("");//鍗曟嵁鍙�
+ $("#HCreateBy").val("");//鍒跺崟浜�
+ $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); //寮�濮嬫棩鏈�
+ $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));// 缁撴潫鏃ユ湡
sWhere = "";
- //$("#HBillType").val("");//鍗曟嵁绫诲瀷
- //$("#HBillNo").val("");//鍗曟嵁鍙�
- //$("#HSourceBillNo").val("");//婧愬崟鍙�
- //$("#HCreateBy").val("");//鍒跺崟浜�
- //$("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
- //$("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
- });
-
- //鐩戝惉琛屽弻鍑讳簨浠�
- table.on('rowDouble(mainTable)', function (obj) {
- layer.alert("鍙屽嚮浜嬩欢", { icon: 1 });
- });
-
-
- //laydate.render({
- // elem: '#HDate'
- // , type: 'datetime'
- // , trigger: 'click'
- // , format:'yyyy-MM-dd HH:mm'
- //});
-
+ $("#btnSearch").click();
+ }
+ //#endregion
//浠ヤ笂鏄痩ayui妯″潡
});
--
Gitblit v1.9.1