From 30cc3b174a0ff8e40f25a7a0bd4e7dc53a7e5286 Mon Sep 17 00:00:00 2001
From: black-goat-me <226547893@qq.com>
Date: 星期六, 20 五月 2023 04:31:32 +0800
Subject: [PATCH] 白坯发布汇总、明细报表:列宽自适应
---
WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatFormImport.html | 52 ++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 48 insertions(+), 4 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 e4df184..5042bcf 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"
@@ -142,6 +142,7 @@
//琛屽唴浜嬩欢
table.on('tool(mainTable)', function (obj) {
set_GridDelete(obj); //琛屽唴鍒犻櫎
+ set_GridCellCheck(obj);//琛屽唴蹇嵎閿瓫閫�
});
//鏂囦欢涓婁紶
@@ -222,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: '鍛樺伐' });
@@ -237,11 +238,14 @@
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 });
+ columns.push({ field: 'HProdORGID', title: 'HProdORGID', 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' })
+ for (var i = 1; i <= dd; i++) {
+ 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' });
@@ -312,6 +316,46 @@
}
}
+ //琛屽唴鍒犻櫎蹇嵎閿�
+ 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;
--
Gitblit v1.9.1