From 4149b275c53fb2054cd2d8ef44cb6466b1e7dada Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 04 三月 2026 10:20:20 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/设备管理/Sb_Add_EqpConkBookBillList.html | 262 +++++++++++++++++++++++++++++++++-------------------
1 files changed, 167 insertions(+), 95 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html"
index d6672cf..f49e57e 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html"
@@ -16,7 +16,6 @@
</style>
</head>
<body>
-
<div id="layout1" class="layui-fluid">
<div class="layui-row layui-col-space15">
<div class="layui-col-md12">
@@ -26,17 +25,15 @@
<div class="layui-btn-group">
<button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button>
<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
-
</div>
-
</div>
<div class="layui-card-body">
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
- <!--<ul class="layui-tab-title">
- <li class="layui-this">鍩烘湰淇℃伅</li>-->
- <!--<li>鍏朵粬淇℃伅</li>-->
- <!--</ul>-->
<h1 style="text-align: center; padding: 10px 0;"><b>璁惧鏁呴殰鐧昏鍗�</b></h1>
+ <ul class="layui-tab-title" lay-filter="tab-all">
+ <li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
+ <li lay-id="2" style="padding:1px;">鍒跺崟淇℃伅</li>
+ </ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<div class="layui-form-item">
@@ -51,7 +48,7 @@
<div class="layui-inline">
<label class="layui-form-label">鏃ユ湡</label>
<div class="layui-input-inline">
- <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
+ <input class="layui-input" name="HDate" id="HDate" autocomplete="off" type="date">
</div>
</div>
<div class="layui-inline">
@@ -119,7 +116,7 @@
<div class="layui-inline">
<label class="layui-form-label">鏁呴殰鏃ユ湡<label style="color:red"> * </label></label>
<div class="layui-input-inline">
- <input class="layui-input" name="HConkBeginDate" id="HConkBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
+ <input class="layui-input" name="HConkBeginDate" id="HConkBeginDate" autocomplete="off" type="date">
</div>
</div>
<div class="layui-inline">
@@ -127,13 +124,13 @@
<div class="layui-input-block" style="margin-left: 120px;width:180px">
<select name="HLev" id="HLev" lay-filter="HLev">
<option value="鏅��" selected="">鏅��</option>
- <option value="閲嶈" >閲嶈</option>
+ <option value="閲嶈">閲嶈</option>
<option value="绱ф��">绱ф��</option>
</select>
</div>
- </div>
+ </div>
</div>
- <div class="layui-form-item">
+ <div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">鏁呴殰鍘熷洜鍒嗘瀽鍙婇闃叉帾鏂�</label>
<div class="layui-input-inline" style="width:300px;">
@@ -150,6 +147,76 @@
<label class="layui-form-label">澶囨敞</label>
<div class="layui-input-inline" style="width:300px;">
<textarea placeholder="璇疯緭鍏ュ娉�" class="layui-textarea" name="HRemark" id="HRemark"></textarea>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!--鍒跺崟淇℃伅-->
+ <div class="layui-tab-item">
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鍒跺崟浜�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">瀹℃牳浜�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鍏抽棴浜�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">淇敼浜�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+
+ </div>
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鍒跺崟鏃ユ湡</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">瀹℃牳鏃ユ湡</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鍏抽棴鏃ユ湡</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">淇敼鏃ユ湡</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">浣滃簾浜�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">浣滃簾鏃ユ湡</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
</div>
</div>
</div>
@@ -184,8 +251,14 @@
<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>
var OptionData = [];
+ //鑾峰彇鍙傛暟
+ var HEquipID = ""; //璁惧id
+ var edit = function (data) {
+ HEquipID = data[0].HEquipID;
+ }
//鑾峰彇鍙傛暟
function getUrlVars() {
var vars = [], hash;
@@ -200,8 +273,13 @@
+ //鑾峰彇鍙傛暟
var params = getUrlVars();
- var hID = params[params[0]];//缂栬緫鏌ョ湅
+ var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 1娣诲姞 淇濆瓨 2澶嶅埗 3 缂栬緫
+ var linterid = params[params[1]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
+ var HEntryID = params[params[3]]; //瀛愬唴鐮�
+ var HSouceBillType = params[params[2]]; //婧愬崟绫诲瀷
+
layui.config({
@@ -218,15 +296,15 @@
, element = layui.element;
//甯歌鐢ㄦ硶
- laydate.render({
- elem: '#HDate',
- format: 'yyyy-MM-dd',
+ //laydate.render({
+ // elem: '#HDate',
+ // format: 'yyyy-MM-dd',
- });
- laydate.render({
- elem: '#HConkBeginDate',
- format: 'yyyy-MM-dd',
- });
+ //});
+ //laydate.render({
+ // elem: '#HConkBeginDate',
+ // format: 'yyyy-MM-dd',
+ //});
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
//if (sessionStorage.login != "login") {
// layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
@@ -265,7 +343,7 @@
, limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
};
//鍒ゆ柇鏄惁鏂板
- if (hID == null || hID == 0) {
+ if (OperationType == null || OperationType == 1) {
$("#HEmpID").val(sessionStorage["HEmpID"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鍙戠幇浜篒D
$("#HEmpName").val(sessionStorage["HEmpName"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鍙戠幇浜�
$("#HDeptID").val(sessionStorage["HDeptID"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭閮ㄩ棬ID
@@ -273,20 +351,40 @@
$("#HManagerID").val(sessionStorage["HEmpID"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭璐熻矗浜篒D
$("#HManagerName").val(sessionStorage["HEmpName"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭璐熻矗浜�
+ //鑾峰彇鏈�澶у崟鎹彿 new
+ $("#HInterID").val("0");
+ $("#HBillNo").val("");
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetMAXNum",
+ type: "GET",
+ data: { "HBillType": '3907' },
+ success: function (d) {
+ //console.log(d.data);
+ $("#HBillNo").val(d.data[0].HBillNo);
+ $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HConkBeginDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HInterID").val(0);
+ }
+ });
+
+ if (HEquipID != "") {
+ GetHEquip();
+ }
+
//鍒濆鍔犺浇琛ㄦ牸{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": " ", "HSQProcName": " ","HProcID":0, "HZRProcName": " ", "HMRBChecker": " ", "HRemark": " ", "HPSProcName": " ", "HCloseMan": " " }
option.data = [{ "HConkReasonID": 0, "HConkReasonCode": "", "HConkReasonName": " ", "HConkExplanation": " ", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": " " }];
table.render(option);
}
else {
- $("#HInterID").val(hID);//淇敼鏃朵富琛↖D
+ $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
+ RoadBillMain(linterid);
//缂栬緫鍔犺浇鏁版嵁
$.ajax({
url: GetWEBURL() + 'Sb_EqpRepairWorkBill/Sb_EqpConkBookBillListProjectDetai',
type: "GET",
- data: { "sqlWhere": "and hmainid=" + hID },
+ data: { "sqlWhere": "and hmainid=" + linterid },
success: function (result) {
console.log(result);
- //console.log('gouba' + result);
if (result.count == 1) {
option.data = result.data;
table.render(option);
@@ -304,8 +402,6 @@
//澶村伐鍏锋爮浜嬩欢
- var rowid = 0;
- var rows = 0;
table.on('toolbar(mainTable)', function (obj) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;;
@@ -373,7 +469,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../鍩虹璧勬枡/鍩虹璧勬枡/Gy_ConkReasonList.html', 'yes'],
+ content: ['../鍩虹璧勬枡/鍩虹璧勬枡/Gy_ConkReasonList.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -469,22 +565,22 @@
});
-
- function RoadBillMain(hID)//鍔犺浇琛ㄥご
+ //缂栬緫
+ function RoadBillMain(linterid)//鍔犺浇琛ㄥご
{
//鏌ヨ妫�楠屾柟妗堝崟鏄惁瀛樺湪
$.ajax({
url: GetWEBURL() + "Sb_EqpRepairWorkBill/Sb_EqpConkBookBillListCheckDetai",
type: "GET",
data: {
- "HID": hID
+ "HID": linterid
},
success: function (result) {
if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
var data = result.data.h_v_Sb_EquipConkBookBillList_Edit[0];
form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
"HBillNo": data.鍗曟嵁鍙�
- , "HDate": formatDate(data.鏃ユ湡)
+ , "HDate": Format(data.鏃ユ湡, "yyyy-MM-dd")
, "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
, "HDeptID": data.HDeptID //浣跨敤閮ㄩ棬ID
, "HDeptName": data.閮ㄩ棬鍚嶇О //浣跨敤閮ㄩ棬鍚嶇О
@@ -496,12 +592,21 @@
, "HEquipName": data.璁惧鍚嶇О //璁惧鍚嶇О
, "HConkTypeID": data.HConkTypeID //鏁呴殰绫诲埆ID
, "HConkTypeName": data.鏁呴殰绫诲埆 //鏁呴殰绫诲埆
- , "HConkBeginDate": formatDate(data.鍙戠敓鏃ユ湡) //鏁呴殰鍙戠敓鏃ユ湡
+ , "HConkBeginDate": Format(data.鍙戠敓鏃ユ湡, "yyyy-MM-dd") //鏁呴殰鍙戠敓鏃ユ湡
, "HExplanation": data.鏁呴殰鎻忚堪 //鎽樿
, "HLev": data.绱ф�ョ▼搴� //澶囨敞
, "HReason": data.鏁呴殰鍘熷洜鍒嗘瀽鍙婇闃叉帾鏂� //澶囨敞
, "HRemark": data.琛ㄥご澶囨敞 //澶囨敞
-
+ , "HMaker": data.鍒跺崟浜�
+ , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(data.鍒跺崟鏃ユ湡), "yyyy-MM-dd")
+ , "HChecker": data.瀹℃牳浜�
+ , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(data.瀹℃牳鏃ユ湡), "yyyy-MM-dd")
+ , "HUpDater": data.淇敼浜�
+ , "HUpDateDate": data.淇敼鏃ユ湡 == null ? "" : Format(new Date(data.淇敼鏃ユ湡), "yyyy-MM-dd")
+ , "HCloseMan": data.鍏抽棴浜�
+ , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Format(new Date(data.鍏抽棴鏃ユ湡), "yyyy-MM-dd")
+ , "HDeleteMan": data.浣滃簾浜�
+ , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Format(new Date(data.浣滃簾鏃ユ湡), "yyyy-MM-dd")
});
} else {
@@ -512,37 +617,7 @@
}
});
}
-
-
- var date = new Date();
- var day = date.getDate();
- var month = date.getMonth() + 1;
- var year = date.getFullYear();
- var shijian = year + "-" + month + "-" + day;
-
- //鍒ゆ柇鏄惁鏂板
- if (hID == null || hID == 0) {
- //鑾峰彇鏈�澶у崟鎹彿 new
- $("#HInterID").val("0");
- $("#HBillNo").val("");
- $.ajax({
- url: GetWEBURL() + "/Web/GetMAXNum",
- type: "GET",
- data: { "HBillType": '3907' },
- success: function (d) {
- //console.log(d.data);
- $("#HBillNo").val(d.data[0].HBillNo);
- $("#HDate").val(shijian);
- $("#HConkBeginDate").val(shijian);
- $("#HInterID").val(0);
- }
- });
- }
- else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
- RoadBillMain(hID);
- /* RoadBillSub(linterid);*/
- }
-
+
//琛ㄥご淇℃伅閮ㄩ棬寮圭獥
form.on('submit(Department)', function () {
//椤甸潰灞�-鑷畾涔�
@@ -554,7 +629,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true
- , content: ['../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
+ , content: ['../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html?openType=2&HOrgName=' + sessionStorage["Organization"], 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -668,7 +743,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true
- , content: ['../璁惧绠$悊/璁惧妗f/Gy_EquipFileMainList.html', 'yes']
+ , content: ['../璁惧绠$悊/璁惧妗f/Gy_EquipFileMainList.html?openType=2', 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -706,7 +781,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_ConkType.html', 'yes'],
+ content: ['../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_ConkType.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -733,9 +808,6 @@
});
});
-
-
-
form.on('submit(Exit)', function (data) {//
if (params[params[0]] == undefined) {
//鍏抽棴椤电
@@ -747,30 +819,11 @@
}
});
-
-
-
-
form.on('submit(Cancel)', function () {
//sessionStorage["SourceFlag"] = false;
parent.location.href = "../../../views/index.html"
//window.close();//鍏抽棴褰撳墠椤�
})
-
- function formatDate(date) {
- var d = new Date(date),
- month = '' + (d.getMonth() + 1),
- day = '' + d.getDate(),
- year = d.getFullYear();
-
- if (month.length < 2) month = '0' + month;
- if (day.length < 2) day = '0' + day;
-
- return [year, month, day].join('-');
- }
- //console.log(rTime('2021-06-03T08:35:57.697'));
- //var startDate = new Date("2019-04-30 16:30:30").toLocaleDateString().split('/').join('-');
- //console.log(startDate);
form.on('submit(Saver)', function (data) {//淇濆瓨
//debugger;
@@ -809,10 +862,29 @@
});
}
});
+
function f_alert(sMsg) {
layer.alert(sMsg, { icon: 5 });
}
+
+ //#region 鑾峰彇浼犲叆鐨勪俊鎭洖鏄鹃〉闈�
+ function GetHEquip() {
+ $.ajax({
+ url: GetWEBURL() + "/Gy_EquipFileMain/get锘縎b_EquipList",
+ type: "GET",
+ data: { "HInterID": HEquipID, "user": sessionStorage["HUserName"], },
+ success: function (result) {
+ if (result.count == 1) {
+ $("#HEquipID").val(result.data[0].hmainid);
+ $("#HEquipName").val(result.data[0].璁惧鍚嶇О);
+ } else {
+ layer.alert(result.Message, { icon: 5 });
+ }
+ }
+ });
+ }
+ //#endregion
//鐩戝惉鎻愪氦
form.verify({
@@ -828,7 +900,7 @@
});
//杩斿洖閮ㄩ棬
- function GetHDeptNameValue(obj) {
+ function GetHDeptNameValue(obj) {
$("#HDeptName").val(obj[0].閮ㄩ棬鍚嶇О);
$("#HDeptID").val(obj[0].HItemID);
}
@@ -843,7 +915,7 @@
$("#HManagerID").val(obj[0].HItemID);
}
//杩斿洖璁惧
- function GetEquipFileValue(obj) {
+ function GetEquipFileValue(obj) {
$("#HEquipName").val(obj[0].璁惧鍚嶇О);
$("#HEquipID").val(obj[0].hmainid);
}
@@ -877,7 +949,7 @@
// $("#HProcID").val(obj[0].HItemID);
// $("#HProcNumber").val(obj[0].宸ュ簭浠g爜);
//}
-
+
////杩斿洖鍗曚綅
//function GetHUnitNameValue(obj) {
// $("#HUName").val(obj[0].璁¢噺鍗曚綅鍚嶇О);
@@ -885,7 +957,7 @@
// $("#HUnitNumber").val(obj[0].璁¢噺鍗曚綅浠g爜);
//}
-
+
////function GetHProcValue(obj) { //杩斿洖鐢宠宸ュ簭
//// SQProcName = obj[0].宸ュ簭;
//// ProcID = obj[0].HItemID;
@@ -953,7 +1025,7 @@
return true;
}
}
-
+
</script>
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.1