From a6b19a453d7d8deba1114725eca64eae0312ff7c Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 03 六月 2025 16:35:07 +0800
Subject: [PATCH] 器具主档:编辑页面,子表 器具只可以选择已审核且未作废、未关闭的数据。可以双击返回,可以多选确定返回
---
WebTM/Properties/PublishProfiles/LAYUI.pubxml.user | 4 ++--
WebTM/views/模治具管理/模治具管理/Gy_MouldFile.html | 48 ++++++++++++++++++++++++++++++++++--------------
WebTM/views/模治具管理/模治具管理/Gy_MouldFileList.html | 2 +-
3 files changed, 37 insertions(+), 17 deletions(-)
diff --git a/WebTM/Properties/PublishProfiles/LAYUI.pubxml.user b/WebTM/Properties/PublishProfiles/LAYUI.pubxml.user
index bc4a6ec..a96eb0d 100644
--- a/WebTM/Properties/PublishProfiles/LAYUI.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/LAYUI.pubxml.user
@@ -5149,10 +5149,10 @@
<publishTime>07/19/2021 10:10:46</publishTime>
</File>
<File Include="views/妯℃不鍏风鐞�/妯℃不鍏风鐞�/Gy_MouldFile.html">
- <publishTime>06/03/2025 16:05:47</publishTime>
+ <publishTime>06/03/2025 16:30:12</publishTime>
</File>
<File Include="views/妯℃不鍏风鐞�/妯℃不鍏风鐞�/Gy_MouldFileList.html">
- <publishTime>06/03/2025 14:03:10</publishTime>
+ <publishTime>06/03/2025 16:33:48</publishTime>
</File>
<File Include="views/妯℃不鍏风鐞�/妯℃不鍏风鐞�/Gy_MouldFileResume.html">
<publishTime>06/13/2024 14:47:29</publishTime>
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFile.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFile.html"
index bb7635b..ab6ad99 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFile.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFile.html"
@@ -583,6 +583,8 @@
</script>
<script>
var Stverf = "";
+
+ var HDataEmp = {};
//鑾峰彇椤甸潰璺宠浆鍙傛暟
var params = get_UrlVars();
if (typeof (params[params[0]]) == "undefined") {
@@ -2057,34 +2059,42 @@
, shift: 2 //寮瑰嚭鍔ㄧ敾
, area: ["90%", "90%"] //绐椾綋澶у皬
, maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
- , content: ["../../妯℃不鍏风鐞�/妯℃不鍏风鐞�/Gy_MouldFileList.html", "yes"]
+ , content: ["../../妯℃不鍏风鐞�/妯℃不鍏风鐞�/Gy_MouldFileList.html?openType=2", "yes"]
, btn: ["纭畾", "鍙栨秷"]
, btn1: function (index, laero) {
//鎸夐挳涓� 鐨勫洖璋�
var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+ var rowIndex = $(obj.tr).attr("data-index") * 1;
- if (checkStatus.data.length != 1) {
- return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+ for (var i = 0; i < checkStatus.data.length; i++) {
+ if (rowIndex + i >= option.data.length) {
+ var NewRow = {
+ "HMouldFileID": "0", "HMouldFileName": "", "HUnionDate": Format(new Date, "yyyy-MM-dd"), "HRemark": "",
+ "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
+ };
+ btnAddLine(NewRow);
+ }
+
+ //鑾峰彇閫変腑鐨勫瓙鍣ㄥ叿淇℃伅
+ var resultData = checkStatus.data[i];
+ option.data[rowIndex + i].HMouldFileID = resultData.hmainid;
+ option.data[rowIndex + i].HMouldFileName = resultData.妯″叿鍚嶇О;
}
- //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
- obj.update({
- "HMouldFileID": checkStatus.data[0].hmainid,
- "HMouldFileName": checkStatus.data[0].妯″叿鍚嶇О
- })
+
+ table.render(option);
+
layer.close(index);//鍏抽棴寮圭獥
}
, btn2: function (index, layero) { }
, end: function () {
- if (typeof (OptionData.HItemID) != "undefined") {
+ if (typeof (HDataEmp.hmainid) != "undefined") {
obj.update({
- "HMouldFileID": OptionData.HItemID,
- "HMouldFileName": OptionData.妯″叿鍚嶇О
+ "HMouldFileID": HDataEmp.hmainid,
+ "HMouldFileName": HDataEmp.妯″叿鍚嶇О
})
- OptionData = [];
+ HDataEmp = {};
}
-
-
}
})
}
@@ -2199,6 +2209,14 @@
}
});
}
+ }
+ //#endregion
+
+ //#region 鍦ㄦ湯灏惧鍔犱竴琛�
+ function btnAddLine(NewRow) {
+ table.cache["mainTable"].push(NewRow);
+ option.data = table.cache["mainTable"];
+ table.render(option);
}
//#endregion
@@ -2359,6 +2377,8 @@
//瀛愯〃鍣ㄥ叿鍙屽嚮杩斿洖
function GetMouldFileValue(obj) {
OptionData = obj[0];
+
+ HDataEmp = obj[0];
}
function GetMouldDotCheckRuleValue(obj) {
OptionData = obj[0];
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFileList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFileList.html"
index 169e275..31dc43e 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFileList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFileList.html"
@@ -1215,7 +1215,7 @@
var openType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鎵撳紑鏂瑰紡 1鐩存帴鎵撳紑 2鍏跺畠椤甸潰閫氳繃閫夋嫨鎸夐挳鎵撳紑
var addSWhere = "";
if (typeof(openType) != "undefined") {
- addSWhere = " and 鍏抽棴浜� = '' and 瀹℃牳浜� != ''";
+ addSWhere = " and 浣滃簾浜� = '' and 鍏抽棴浜� = '' and 瀹℃牳浜� <> ''";
}
return addSWhere;
}
--
Gitblit v1.9.1