From d9ccb1dfdb438225014b0b95d642a4e2a0c3736b Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 07 九月 2022 19:43:10 +0800
Subject: [PATCH] 隐藏列 维护 工艺路线 物料id 小写
---
WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatFormImport.html | 72 +++++++++++++++++++++++++++++++++--
1 files changed, 67 insertions(+), 5 deletions(-)
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
index 92ed1fc..f62154c 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
@@ -49,7 +49,7 @@
<div class="layui-card-body" style="padding: 1px;">
<form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
<div style="padding: 10px; ">
- <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button>
</div>
@@ -129,6 +129,9 @@
//#region 杩涘叆椤甸潰鍗冲姞杞�
+ var params = getUrlVars();
+ var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 娣诲姞 淇濆瓨
+
//鍒濆鍖栫晫闈�
set_ClearBill();
@@ -139,6 +142,7 @@
//琛屽唴浜嬩欢
table.on('tool(mainTable)', function (obj) {
set_GridDelete(obj); //琛屽唴鍒犻櫎
+ set_GridCellCheck(obj);//琛屽唴蹇嵎閿瓫閫�
});
//鏂囦欢涓婁紶
@@ -168,7 +172,12 @@
//閫�鍑�
form.on('submit(Cancel)', function () {
- Pub_Close(2);
+ if (OperationType == 1) {
+ Pub_Close(1);
+ }
+ else {
+ Pub_Close(2);
+ }
})
//瀵煎叆 淇濆瓨鏁版嵁
@@ -214,7 +223,7 @@
columns.push({ field: 'HWorkShopID', title: 'HWorkShopID', hide: true });
columns.push({ field: '鐢熶骇杞﹂棿缂栫爜*', title: '鐢熶骇杞﹂棿' });
columns.push({ field: 'HSourceID', title: 'HSourceID', hide: true });
- columns.push({ field: '鐢熶骇璧勬簮缂栫爜*', title: '鐢熶骇璧勬簮' });
+ columns.push({ field: '鐢熶骇璧勬簮缂栫爜*', title: '鐢熶骇璧勬簮', edit: 'text', event: "HSourceID" });
columns.push({ field: '浼樺厛绾�', title: '浼樺厛绾�' });
columns.push({ field: 'HEmpID', title: 'HEmpID', hide: true });
columns.push({ field: '鍛樺伐', title: '鍛樺伐' });
@@ -229,11 +238,13 @@
columns.push({ field: '閿�鍞鍗曟暟閲�', title: '閿�鍞鍗曟暟閲�', width: 200 });
columns.push({ field: '鐢熶骇璁㈠崟鏁伴噺', title: '鐢熶骇璁㈠崟鏁伴噺', width: 200 });
columns.push({ field: '鎬婚綈濂楁暟閲�', title: '鎬婚綈濂楁暟閲�', width: 200 });
+ columns.push({ field: 'ICMOBillHInterID', title: 'ICMOBillHInterID', hide: true});
+ columns.push({ field: 'ICMOBillHEntryID', title: 'ICMOBillHEntryID', hide: true });
for (var i = 0; i <= (SumMonth - dd); i++) {
- columns.push({ field: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), edit: 'text' })
+ columns.push({ field: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + (dd + i), 'MM.dd'), edit: 'text', width:60 })
}
for (var i = 1; i < dd; i++) {
- columns.push({ field: Format(yyyy + '/' + (MM + 1) + '/' + i, 'yyyy-MM-dd'), title: Format(yyyy + '/' + (MM + 1) + '/' + i, 'yyyy-MM-dd'), edit: 'text' })
+ columns.push({ field: Format(yyyy + '/' + (MM + 1) + '/' + i, 'yyyy-MM-dd'), title: Format(yyyy + '/' + (MM + 1) + '/' + i, 'MM.dd'), edit: 'text', width: 60 })
}
columns.push({ fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' });
@@ -304,6 +315,57 @@
}
}
+ //琛屽唴鍒犻櫎蹇嵎閿�
+ function set_GridCellCheck(obj) {
+ $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+ if (event.key == "F7") {
+ //鐢熶骇璧勬簮
+ if (obj.event == "HSourceID") {
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "鐢熶骇璧勬簮鍒楄〃" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ["../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html", "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鎸夐挳涓� 鐨勫洖璋�
+ var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+ if (checkStatus.data.length != 1) {
+ return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+ }
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "HSourceID": checkStatus.data[0].HItemID
+ , "鐢熶骇璧勬簮缂栫爜*": checkStatus.data[0].鐢熶骇璧勬簮浠g爜
+ })
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+ obj.event = "";
+ return false;
+ }
+
+ })
+ }
+
+ //鑾峰彇鍙傛暟
+ function getUrlVars() {
+ var vars = [], hash;
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+ for (var i = 0; i < hashes.length; i++) {
+ hash = hashes[i].split('=');
+ vars.push(hash[0]);
+ vars[hash[0]] = hash[1];
+ }
+ return vars;
+ }
//#endregion
--
Gitblit v1.9.1