From c1a25b418e23f7040b91353bee2b131351e99695 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 24 五月 2022 09:40:49 +0800
Subject: [PATCH] 生产叫料平台 完善
---
WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html | 50 +++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 47 insertions(+), 3 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_DayPlanPlatForm.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_DayPlanPlatForm.html"
index 6921a65..d01b5ca 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_DayPlanPlatForm.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_DayPlanPlatForm.html"
@@ -194,7 +194,7 @@
}
else {
data[0]["鐢熶骇璧勬簮"] = "";
- data[0]["HSourceID"] = 0;
+ data[0]["HSourceID"] = "";
data[0]["hmainid"] = "";
data[0]["鍗曟嵁鍙�"] = "";
var copydata = JSON.stringify(data);
@@ -238,6 +238,10 @@
set_ClearQuery();
});
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+ });
//#endregion
//#region 鏈〉闈㈣璋冪敤鐨勬墍鏈夋柟娉�
@@ -310,9 +314,9 @@
columns.push({ field: '浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�', title: '浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�', width: 150 });//0
columns.push({ field: '璁″垝寮�濮嬫棩鏈�', title: '棰勮寮�宸ユ棩鏈�', width:150 });
columns.push({ field: 'HWorkShopID', title: 'HWorkShopID', hide: true });
- columns.push({ field: '鐢熶骇杞﹂棿', title: '鐢熶骇杞﹂棿', width:150 });
+ columns.push({ field: '鐢熶骇杞﹂棿', title: '鐢熶骇杞﹂棿', width: 150});
columns.push({ field: 'HSourceID', title: 'HSourceID', hide:true });
- columns.push({ field: '鐢熶骇璧勬簮', title: '鐢熶骇璧勬簮', width:150 });
+ columns.push({ field: '鐢熶骇璧勬簮', title: '鐢熶骇璧勬簮', width: 150, edit: 'text', event: "HSourceID" });
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',width:120 })//0
}
@@ -516,6 +520,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].鐢熶骇璧勬簮鍚嶇О
+ })
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+ obj.event = "";
+ return false;
+ }
+
+ })
+ }
//#endregion
//浠ヤ笂鏄痩ayui妯″潡
});
--
Gitblit v1.9.1