From e03936ac966a76bf62780e7bba907e2778eb636e Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期一, 26 二月 2024 10:04:43 +0800
Subject: [PATCH] 1
---
WebTM/views/设备管理/Sb_Add_EqpRepairCheckBillList.html | 84 ++++++++++++++++++++++++++++++++---------
1 files changed, 65 insertions(+), 19 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpRepairCheckBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpRepairCheckBillList.html"
index 5d0d539..20cce06 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpRepairCheckBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpRepairCheckBillList.html"
@@ -114,6 +114,16 @@
</div>
<div class="layui-form-item">
<div class="layui-inline">
+ <label class="layui-form-label">缁翠慨璁板綍<label style="color:red"> * </label></label>
+ <div class="layui-input-inline">
+ <input type="text" name="HMouldRepairWorkName" id="HMouldRepairWorkName" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="hidden" name="HMouldRepairWorkID" id="HMouldRepairWorkID" class="layui-input" value="" style="float:left;width:150px;">
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="btnHMouldRepairWork" style="width:40px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+ </button>
+ </div>
+ </div>
+ <div class="layui-inline">
<label class="layui-form-label">楠屾敹缁撹</label>
<div class="layui-input-inline">
<select name="HCheckResult" lay-filter="aihao" id="HCheckResult">
@@ -198,7 +208,7 @@
var option;
var sBillType = "3911";
- var TabRow = { "HRepairCheckID": 0, "HRepairCheckCode": "", "HRepairCheckName": " ", "HRepairCheckContent": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HRemark": " " };
+ //var TabRow = { "HRepairCheckID": 0, "HRepairCheckCode": "", "HRepairCheckName": " ", "HRepairCheckContent": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HRemark": " " };
//#endregion
@@ -211,6 +221,13 @@
//鍒ゆ柇鎿嶄綔绫诲瀷
if (OperationType == 1) {//鏃犳簮鍗�
+ $("#HEmpID").val(sessionStorage["HEmpID"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭楠屾敹浜篒D
+ $("#HEmpName").val(sessionStorage["HEmpName"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭楠屾敹浜�
+ $("#HDeptID").val(sessionStorage["HDeptID"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭閮ㄩ棬ID
+ $("#HDeptName").val(sessionStorage["HDept"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭閮ㄩ棬
+ $("#HManagerID").val(sessionStorage["HEmpID"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭璐熻矗浜篒D
+ $("#HManagerName").val(sessionStorage["HEmpName"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭璐熻矗浜�
+
set_AddFNew();
}
else if (OperationType == 3) {//缂栬緫
@@ -360,7 +377,7 @@
return layer.msg('璇烽�夋嫨鏁版嵁');
}
$("#HEquipName").val(checkStatus.data[0].HName);
- $("#HEquipID").val(checkStatus.data[0].HItemID);
+ $("#HEquipID").val(checkStatus.data[0].HInterID);
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) {
@@ -382,7 +399,7 @@
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;;
var AddRow = table.cache['mainTable'];
- var NewRow = TabRow;
+ var NewRow = { "HRepairCheckID": 0, "HRepairCheckCode": "", "HRepairCheckName": " ", "HRepairCheckContent": " ", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": " " };
switch (obj.event) {
//鏂板涓�琛�
case 'btn-AddLine': btnAddLine(NewRow);
@@ -404,8 +421,8 @@
data.field.HMaker = sessionStorage["HUserName"];//鍒跺崟浜�
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(table.cache['mainTable']);
- var sMainSub = sMainStr + ';' + sSubStr;
- if (AllowLoadData()) {
+ var sMainSub = sMainStr + ';' + sSubStr + ";" + sessionStorage["HUserName"];
+ if (AllowLoadData(sSubStr)) {
$.ajax(
{
type: "POST",
@@ -437,19 +454,47 @@
}
});
+ //琛ㄥご淇℃伅缁翠慨璁板綍寮圭獥
+ form.on('submit(btnHMouldRepairWork)', function () {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '璁惧缁翠慨璁板綍鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../璁惧绠$悊/Sb_EqpMaintenanceBillList.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HMouldRepairWorkName").val(checkStatus.data[0].鍗曟嵁鍙�);
+ $("#HMouldRepairWorkID").val(checkStatus.data[0].hmainid);
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ });
+ });
+
//閫�鍑�
form.on('submit(Exit)', function (data) {
- if (closeType == 0) {
+ if (linterid == undefined) {
//鍏抽棴椤电
- parent.layui.admin.events.closeThisTabs();
+ Pub_Close(2);
}
- if (closeType == 1) {
- //鍏抽棴寮圭獥
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- } else if (closeType == 2) {
+ else {
//鍏抽棴椤电
- parent.layui.admin.events.closeThisTabs();
+ Pub_Close(1);
}
});
@@ -477,7 +522,7 @@
function set_InitGrid() {
//琛ㄥご
columns = [
- { type: 'checkbox', fixed: 'left' }
+ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' }
, { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
, { field: 'HRepairCheckID', title: 'HRepairCheckID', hide: true }
, { field: 'HRepairCheckCode', title: '楠屾敹椤圭洰浠g爜', edit: 'text', event: "HRepairCheckCode" }
@@ -494,6 +539,7 @@
, elem: '#mainTable'
, toolbar: '#toolbarDemo'
, page: false
+ , totalRow: true
, cellMinWidth: 120
, height: 500
, cols: [columns]
@@ -507,7 +553,7 @@
function set_AddFNew() {
//鑾峰彇鏈�澶у崟鎹彿
get_MAXNum();
- option.data = [TabRow];
+ option.data = [{ "HRepairCheckID": 0, "HRepairCheckCode": "", "HRepairCheckName": " ", "HRepairCheckContent": " ", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": " " }];
table.render(option);
}
@@ -515,7 +561,7 @@
function set_EditFromGrid() {
set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご
set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋
- option.data = [TabRow];
+ option.data = [{ "HRepairCheckID": 0, "HRepairCheckCode": "", "HRepairCheckName": " ", "HRepairCheckContent": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HRemark": " " }];
table.render(option);
}
@@ -567,6 +613,8 @@
, "HCheckResult": data.楠屾敹缁撹 //楠屾敹缁撹
, "HExplanation": data.鎽樿 //鎽樿
, "HRemark": data.琛ㄥご澶囨敞 //澶囨敞
+ , "HMouldRepairWorkID": data.HMouldRepairWorkID //澶囨敞
+ , "HMouldRepairWorkName": data.HMouldRepairWorkNo //澶囨敞
});
@@ -805,9 +853,7 @@
}
}
}
- else {
- return true;
- }
+ return true;
}
//#endregion
--
Gitblit v1.9.1