From 3ccf32f224519ba7e1f38b8d5b0f4d1e7a8cffaf Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 27 十一月 2023 10:09:14 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/设备管理/Sb_EquipMaintainPlanBillEdit.html | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 176 insertions(+), 3 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
index db4c45f..118338e 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
@@ -106,6 +106,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="hidden" name="HMouldMaintainRuleID" id="HMouldMaintainRuleID" class="layui-input" value="0" style="float:left;width:150px;">
+ <input type="text" name="HMouldMaintainRuleNo" id="HMouldMaintainRuleNo" class="layui-input" value="" style="float:left;width:150px;background-color:#efefef4d;" readonly>
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="HEquipDotCheckRuleInterList" 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">
<textarea placeholder="璇疯緭鍏ユ憳瑕�" class="layui-textarea" name="HExplanation" id="HExplanation"></textarea>
@@ -126,6 +136,7 @@
<ul class="layui-tab-title">
<li class="layui-this">淇濆吇椤逛俊鎭�</li>
<li>閰嶄欢淇℃伅</li>
+ <li>淇濆吇璁″垝</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
@@ -133,6 +144,10 @@
</div>
<div class="layui-tab-item">
<table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+ </div>
+ <div class="layui-tab-item">
+ <!--淇濆吇璁″垝-->
+ <table class="layui-hide" id="mainTable_plan" lay-filter="mainTable_plan"></table>
</div>
</div>
</div>
@@ -202,6 +217,7 @@
//鏌ヨ鏉′欢
var option = [];//淇濆吇
var option1 = [];//閰嶄欢
+ var option_plan = [];//璁″垝
var sBillType = "3902";
//var TabRow = { "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " };//淇濆吇
//var TabRow1 = { "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HQty": "", "HRemark": "" };//閰嶄欢
@@ -356,6 +372,34 @@
});
});
+ //琛ㄥご淇℃伅璁惧淇濆吇瑙勭▼
+ form.on('submit(HEquipDotCheckRuleInterList)', function () {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '璁惧淇濆吇瑙勭▼鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../璁惧绠$悊/璁惧瑙勭▼鍗�/Sb_EquipMaintainRuleList.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('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HMouldMaintainRuleNo").val(checkStatus.data[0].鍗曟嵁鍙�);
+ $("#HMouldMaintainRuleID").val(checkStatus.data[0].hmainid);
+ get_DocCheckItem2(checkStatus.data[0].hmainid);
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ });
+ });
+
//棰勮Printing
form.on("submit(view)", function (data) {
window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + linterid + "&Type=HEquipMaintainPlanBill&OpenTmp=璁惧淇濆吇璁″垝鏉$爜");
@@ -408,6 +452,7 @@
function set_InitGrid() {
Table(); //淇濆吇椤瑰垪琛�
Table1(); //閰嶄欢椤瑰垪琛�
+ Table3(); //淇濆吇璁″垝
}
//鍒濆鍖栦繚鍏婚」鍒楄〃
function Table() {
@@ -451,9 +496,9 @@
, { field: 'HUnitID', title: '鍗曚綅ID', edit: 'text', hide: true }
, { field: 'HUnitNumber', title: '鍗曚綅浠g爜', edit: 'text', event: "HUnitCode" }
, { field: 'HUnitName', title: '鍗曚綅鍚嶇О', edit: 'text', event: "" }
- , { field: 'HManagerID', title: '璐熻矗浜篒D', edit: 'text', hide: true }
- , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: 'HManagerNumber' }
- , { field: 'HManagerName', title: '璐熻矗浜�', edit: 'text' }
+ //, { field: 'HManagerID', title: '璐熻矗浜篒D', edit: 'text', hide: true }
+ //, { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: 'HManagerNumber' }
+ //, { field: 'HManagerName', title: '璐熻矗浜�', edit: 'text' }
, { field: 'HQty', title: '鐢ㄩ噺', edit: 'text' }
, { field: 'HRemark', title: '澶囨敞', edit: 'text' }
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo1', width: 150 }
@@ -469,6 +514,33 @@
, height: 500
, cols: [columns]
, done: function (res, curr, count) {
+ }
+ };
+ }
+ //鍒濆鍖栦繚鍏昏鍒掑垪琛�
+ function Table3() {
+ //鐐规璁″垝
+ columns_plan = [
+ { type: 'checkbox', fixed: 'left' }
+ , { templet: '#xuhao', title: '搴忓彿', sort: true, event: "qwe" }
+ , { field: 'HPlanDate', title: '璁″垝鏃ユ湡' }
+ , { field: 'HPlanBeginTime', title: '璁″垝寮�濮嬫椂闂寸偣' }
+ , { field: 'HPlanEndTime', title: '璁″垝缁撴潫鏃堕棿鐐�' }
+ , { field: 'HRelationFlag', title: '鍏宠仈鏍囪' }
+ , { field: 'DiffDate', title: '鐩稿樊闂撮殧' }
+ ];
+ option_plan = {
+ id: 'mainTable_plan'
+ , elem: '#mainTable_plan'
+ , toolbar: '#toolbarDemo'
+ , page: true
+ , limit: 500
+ , limits: [50, 200, 500, 1000, 3000]
+ , cellMinWidth: 120
+ , height: 500
+ , cols: [columns_plan]
+ , done: function (res, curr, count) {
+
}
};
}
@@ -507,8 +579,13 @@
set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋
option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
table.render(option);
+
option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HQty": "0", "HRemark": "" }];
table.render(option1);
+
+ set_EditGrid_Plan(linterid); //缂栬緫鑾峰彇琛ㄤ綋--鐐规璁″垝
+ option.data = [{ "HPlanDate": "", "HPlanBeginTime": "", "HPlanEndTime": "", "HRelationFlag": "鏈偣妫�", "DiffDate": 0 }];
+ table.render(option_plan);
}
//缂栬緫鑾峰彇琛ㄥご
function set_EditForm(linterid) {
@@ -535,6 +612,8 @@
, "HRemark": data.琛ㄥご澶囨敞
, "HCycleUnit": data.鍛ㄦ湡鍗曚綅
, "HCheckCycle": data.淇濆吇鍛ㄦ湡
+ , "HMouldMaintainRuleID": data.HMouldMaintainRuleID
+ , "HMouldMaintainRuleNo": data.璁惧淇濆吇瑙勭▼
});
} else {
@@ -569,6 +648,100 @@
}
});
}
+
+ // 淇濆吇淇℃伅 閰嶄欢淇℃伅
+ function get_DocCheckItem2(data) {
+ $.ajax({
+ url: GetWEBURL() + "/Sb_EquipMaintainRuleBill/Sb_EquipMaintainRuleBillSubAndSubItem",
+ type: "GET",
+ async: false,
+ data: { "HInterID": data },
+ success: function (result) {
+ if (result != null) {
+ if (result.count == 1) {
+ var BYData = result.list[0];//淇濆吇
+ var PJData = result.list[1];//閰嶄欢
+ var rowdate1 = layui.table.cache["mainTable"];
+ var rowdate2 = layui.table.cache["mainTable1"];
+ option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
+ option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HRemark": "" }];
+ table.render(option);
+ table.render(option1);
+
+ if (BYData.length != 0) //琛ㄤ綋鏁版嵁涓嶄负绌烘椂
+ {
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < BYData.length; i++) {
+ var checkrow = {
+ "HMaintainItemID": BYData[i].HMaintainItemID, "HMaintainItemNumber": BYData[i].HMaintainItemNumber, "HMaintainItem": BYData[i].HMaintainItem,
+ "HMaintainPart": BYData[i].HMaintainPart, "HClaim": BYData[i].HClaim, "HManagerID": BYData[i].HManagerID, "HManagerNumber": BYData[i].HManagerNumber,
+ "HManagerName": BYData[i].HManagerName, "HRemark": BYData[i].HRemark
+ };
+ buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ }
+ table.reload("mainTable", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
+ }
+
+ if (PJData.length != 0) //琛ㄤ綋鏁版嵁涓嶄负绌烘椂
+ {
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < PJData.length; i++) {
+ var checkrow = {
+ "HMaterID": PJData[i].HMaterID, "HMaterNumber": PJData[i].HMaterNumber, "HMaterName": PJData[i].HMaterName,
+ "HUnitID": PJData[i].HUnitID, "HUnitNumber": PJData[i].HUnitNumber,
+ "HUnitName": PJData[i].HUnitName, "HQty": PJData[i].HQty, "HRemark": PJData[i].HRemark
+ };
+ buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ }
+ table.reload("mainTable1", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
+ }
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }
+ }
+ })
+ }
+
+ // 缂栬緫鑾峰彇琛ㄤ綋--鐐规璁″垝
+ function set_EditGrid_Plan(linterid) {
+ $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
+ //缂栬緫鍔犺浇鏁版嵁
+ $.ajax({
+ url: GetWEBURL() + 'Sb_EquipMaintainPlanBill/GetPlanList',
+ type: "GET",
+ data: { "sqlWhere": "and hmainid=" + linterid },
+ success: function (result) {
+ if (result.count == 1) {
+ var rowdata = [];
+ var data = result.data;
+ for (let i = 0; i < data.length; i++) {
+ rowdata.push(
+ {
+ "HPlanDate": Pub_Format(data[i].璁″垝鏃ユ湡, "yyyy-MM-dd"), "HPlanBeginTime": Pub_Format(data[i].璁″垝寮�濮嬫椂闂寸偣, "yyyy-MM-dd hh:mm:ss"), "HPlanEndTime": Pub_Format(data[i].璁″垝缁撴潫鏃堕棿鐐�, "yyyy-MM-dd hh:mm:ss")
+ , "HRelationFlag": data[i].鍏宠仈鏍囪, "DiffDate": data[i].鐩稿樊闂撮殧
+ }
+ )
+ }
+
+ option_plan.data = rowdata;
+ table.render(option_plan);
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(index0);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
//鏃ユ湡鏍煎紡鍖�
function formatDate(date) {
var d = new Date(date),
--
Gitblit v1.9.1