From 3b57005ff0ece33bde3cce11bc3a93ab57722071 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 04 七月 2024 15:59:00 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/设备管理/Sb_EquipMaintainBillList.html | 106 ++++++++++++++++++++++++++++++++---------------------
1 files changed, 64 insertions(+), 42 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 520ad51..9d8af3e 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"
@@ -10,7 +10,8 @@
<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>
+ <script src="../../layuiadmin/soulTable.slim.js"></script>
+ <script src="../../layuiadmin/PageTitle.js"></script>
<style type="text/css">
input.layui-input.layui-unselect {
@@ -192,6 +193,13 @@
var option1 = [];
var option2 = [];
var HModName = "Sb_EquipMaintainBillList";
+
+ //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+ var HModuleType = "3901";
+ //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+ var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
+ //#endregion
+
var titleData = ["hmainid", "鍗曟嵁绫诲瀷", "琛ㄥご澶囨敞", "閰嶄欢浠g爜", "hsubid", "琛屽叧闂汉", "琛ㄤ綋澶囨敞", "鍒跺崟浜�", "淇敼浜�", "浣滃簾鏃ユ湡", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "HEquipID", "鍐呴儴鍗曟嵁鍙�", "HMaterID", "鍗曚綅ID", "璐熻矗浜篒D", "HBillType"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
//#region 銆愯繃婊ゆ柟妗堛��
@@ -278,29 +286,6 @@
};
});
- //鐐瑰嚮涓昏〃甯﹀嚭浠庤〃鏁版嵁
- 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();
@@ -323,7 +308,7 @@
//鍒濆鍖栬〃鏍�(瀛愯〃2)
set_InitGrid2();
//鏌ヨ
- get_Display(sWhere);
+ //get_Display(sWhere);
//鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规
get_DefaultModule();
}
@@ -334,11 +319,12 @@
, toolbar: '#toolbarDemo'
, height: '400'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
, cols: [[
- { type: 'checkbox', fixed: 'left' }
+ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�'}
, { field: 'hmainid', title: 'hmainid', hide: true }
, { field: '鏃ユ湡', title: '鏃ユ湡', width: 160, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
@@ -354,26 +340,26 @@
, { 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, totalRow: true}
+ , { field: '鏍囧噯鐢ㄩ噺', title: '鏍囧噯鐢ㄩ噺', width: 200 , totalRow: true}
, { field: '璐熻矗浜�', title: '璐熻矗浜�', width: 200 }
, { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
, { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200 }
- , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
- , { field: '鍏宠仈閲戦', title: '鍏宠仈閲戦', width: 200 }
+ , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 , totalRow: true}
+ , { field: '鍏宠仈閲戦', title: '鍏宠仈閲戦', width: 200, totalRow: true}
, { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 115, hide: true }
, { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
, { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200, hide: true }
, { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 115, hide: true }
- , { 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, 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, hide: true }
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 115, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { 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, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 115, hide: true }
+ , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd')}}</div>"}
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
+ , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 115, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd')}}</div>", hide: true }
, { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
, { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
, { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
@@ -401,6 +387,26 @@
l.LAY_CHECKED = flag;
}
});
+
+ 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 });
+ }
+ });
})
//#endregion
@@ -412,6 +418,7 @@
//, toolbar: '#toolbarDemo'
, height: '350'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
@@ -440,6 +447,7 @@
elem: '#mainTable2'
//, toolbar: '#toolbarDemo'
, height: '350'
+ , totalRow: true
, page: true
, cellMinWidth: 90
, limit: 50
@@ -457,8 +465,8 @@
//, { 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: 'HQty', title: '瀹為檯鐢ㄩ噺', width: 200, totalRow: true}
+ , { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', width: 200, totalRow: true }
, { field: 'HRemark', title: '澶囨敞', width: 200 }
]]
};
@@ -471,6 +479,7 @@
var ajaxLoad = layer.load();
//杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
$.ajax({
+ //h_v_Sc_EquipMaintain
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
url: GetWEBURL() + '/Sb_EquipMaintainBill/GetEquipMaintainBillList',
type: "GET",
@@ -483,9 +492,14 @@
//缁欑┖鐨勬暟缁勮祴鍊�
for (var key in data1.list) {
data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
+ var patrn = new RegExp(/^h/i);
+ if (patrn.test(data1.list[key].ColmCols)) {
+ titleData[key] = data1.list[key].ColmCols;
+ }
}
//鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
- col.push({ type: 'checkbox', fixed: 'left' });
+ col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' });
for (var i = 0; i < data.length; i++) {
if ($.inArray(data[i].name, titleData) > -1 ) {
col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
@@ -496,6 +510,13 @@
case 'DateTime':
col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
break;
+ case 'long':
+ case 'Int32':
+ case 'Int64':
+ case 'double':
+ case 'Decimal':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120, totalRow: true });
+ break;
default:
col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
}
@@ -510,6 +531,7 @@
, data: data1.data
, height: 550
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
@@ -521,7 +543,6 @@
//鍒锋柊琛ㄦ牸鏁版嵁
DisPlay_HideColumn();
-
//鍒锋柊鎸夐挳鏄剧ず
var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
var HBillType = "3901";
@@ -550,7 +571,7 @@
layer.open({
type: 2,
skin: 'layui-layer-rim', //鍔犱笂杈规
- title: '鏂板璁惧淇濆吇璁板綍鍗� ',
+ title: '鏂板' + HPageTitle,
closeBtn: false,
shift: 2,
area: ['100%', '100%'],
@@ -574,7 +595,7 @@
layer.open({
type: 2
, area: ['100%', '100%']
- , title: '缂栬緫璁惧淇濆吇璁板綍鍗� '
+ , title: '缂栬緫' + HPageTitle
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
, anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
@@ -678,6 +699,7 @@
data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"] },
success: function (result) {
if (result.count == 1) {
+ get_FastQuery();
layer.msg(result.Message, { icon: 1 });
layer.close(wait);
} else {
--
Gitblit v1.9.1