From b1dbe8d3fef852a9fe0333861292e13c4a1cdf19 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期日, 09 十月 2022 09:57:04 +0800 Subject: [PATCH] 修改 生产计划平台 --- WebTM/views/生产管理/生产日计划工单/JIT_DayPlanBillList.html | 126 +++++++++++++++++++++++++++++++ WebTM/views/生产管理/齐套分析/JIT_CompleteDetailList.html | 6 + WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html | 41 +++++++--- WebTM/views/生产管理/要料计划/JIT_NeedMaterPlanBillEdit.html | 4 WebTM/views/生产管理/提料计划/JIT_LiftMaterPlanBillEdit.html | 4 5 files changed, 164 insertions(+), 17 deletions(-) diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlanBillEdit.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlanBillEdit.html" index 9231133..dff7126 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlanBillEdit.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlanBillEdit.html" @@ -208,9 +208,9 @@ <option value="1">钃濇捣瀹炰笟闆嗗洟</option> <option value="100035">钃濇捣閫氳鍏徃</option> <option value="100037">閫氳鍏徃鏈儴</option> - <option value="100038">鎵嬫満浜嬩笟閮�</option> + <option value="100038">鏉窞宸ュ巶</option> <option value="100039">骞虫澘浜嬩笟閮�</option> - <option value="100040">钃濇捣鐢靛瓙鍏徃</option> + <option value="100040">姹熷北宸ュ巶</option> <option value="100041">钃濇捣閿�鍞叕鍙�</option> <option value="100042">棣欐腐閿�鍞叕鍙�</option> <option value="100043">钃濇捣鐢靛瓙鍟嗗姟鏈夐檺鍏徃</option> diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillList.html" index 13c666a..8b034b0 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillList.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillList.html" @@ -99,6 +99,7 @@ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CloseBill"><i class="layui-icon layui-icon-logout"></i>鍏抽棴</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="set_TuiBill"><i class="layui-icon layui-icon-form"></i>涓嬫帹</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> </div> </script> </form> @@ -128,6 +129,7 @@ , util = layui.util var sWhere = ""; var option = []; + var HModName = "JIT_DayPlanBillList"; //#endregion //#region 杩涘叆椤甸潰鍗冲姞杞� @@ -156,6 +158,10 @@ break; //涓嬫帹 case 'set_TuiBill': set_TuiBill(); + break; + //鍒楄缃� + case 'set_HideColumn': + get_HideColumn(); break; }; }); @@ -194,6 +200,8 @@ set_InitGrid(); //鏌ヨ get_Display(sWhere); + //闅愯棌鍕鹃�夊瓧娈� + DisPlay_HideColumn(); } //#endregion @@ -521,6 +529,124 @@ } } + //闅愯棌鍒楄缃� + function get_HideColumn() { + var colName = ""; + var contentUrl = ""; + for (var i = 1; i < option.cols[0].length - 1; i++) { + colName += option.cols[0][i]["title"] + ","; + } + var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞 + var urlLen = urlStr.split('/'); + for (var i = 0; i < urlLen.length - 4; i++) { + contentUrl += "../"; + } + colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 + + contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName; + + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "闅愯棌鍒楄缃�" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: [contentUrl, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + + //鏄剧ず鍒楁暟鎹� + function DisPlay_HideColumn() { + $.ajax({ + url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + type: "GET", + data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, + success: function (data1) { + if (data1.data.length != 0) { + + + var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁 + var titleData = ["hmainid"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞� + + dataCol = data1.data[0].HGridString.split(','); + + for (var i = 0; i < option.cols[0].length - 2; i++) { + var dataCols = dataCol[i].split('|'); + //闅愯棌鍒� + if (dataCols[1] == 1) { + option.cols[0][i + 1]["hide"] = true; + } + //璁剧疆鍒楀 + if (dataCols[3] > 0) { + option.cols[0][i + 1]["width"] = dataCols[3]; + } + //璁剧疆鍐呭瀛椾綋澶у皬 + if (data1.data[0].HFontSize != 0) { + option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; + } else { + option.cols[0][i + 1]["style"] = "font-size:100%"; + } + //璁剧疆鍒楀 + //if (data1.data[0].HColumnWidth != 0) { + // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; + //} else { + // option.cols[0][i + 1]["width"] = ""; + //} + //鏄剧ず鍒� + if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { + option.cols[0][i + 1]["hide"] = false; + } + //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + switch (dataCols[2]) { + case "L": + option.cols[0][i + 1]["align"] = "left"; + break; + case "M": + option.cols[0][i + 1]["align"] = "center"; + break; + case "R": + option.cols[0][i + 1]["align"] = "right"; + break; + } + } + + //鍙栨秷鍐荤粨鍒� + for (var i = 1; i < option.cols[0].length - 1; i++) { + if (option.cols[0][i]["fixed"] != null) { + option.cols[0][i]["fixed"] = null; + } + else { + break; + } + } + //鍐荤粨鍒� + if (data1.data[0].HFixCols != 0) { + for (var i = 0; i < data1.data[0].HFixCols; i++) { + if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { + data1.data[0].HFixCols += 1; + } + option.cols[0][i + 1]["fixed"] = "left"; + } + } + table.render(option); + } else { + table.render(option); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }) + } + //#endregion //浠ヤ笂鏄痩ayui妯″潡 }); 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 5cb1c4b..892a717 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" @@ -354,7 +354,6 @@ columns.push({ field: '閿�鍞鍗曞彿', title: '閿�鍞鍗曞彿', width: 150}); columns.push({ field: '鐢熶骇璁㈠崟鍙�', title: '鐢熶骇璁㈠崟鍙�', width: 150, style: 'background-color: #f9f9f9;' }); columns.push({ field: '鐢熶骇璁㈠崟鏄庣粏琛屽彿', title: '鐢熶骇璁㈠崟鏄庣粏琛屽彿', width: 150 }); - columns.push({ field: '鐢靛帇/鍔熺巼/搴曟澘', title: '鐢靛帇/鍔熺巼/搴曟澘', width: 150 }); columns.push({ field: '浼樺厛绾�', title: '浼樺厛绾�', width:150 }); columns.push({ field: 'HProdORGID', title: 'HProdORGID', hide: true }); columns.push({ field: '鐢熶骇缁勭粐', title: '鐢熶骇缁勭粐', width:150 }); @@ -362,13 +361,9 @@ columns.push({ field: '鐗╂枡浠g爜', title: '鐗╂枡缂栫爜', width:150 }); columns.push({ field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width:150 }); columns.push({ field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width:150 }); - columns.push({ field: 'HUnitID', title: 'HUnitID', hide: true}); - columns.push({ field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width:150 }); + columns.push({ field: 'HUnitID', title: 'HUnitID', hide: true }); columns.push({ field: '閿�鍞鍗曟暟閲�', title: '閿�鍞鍗曟暟閲�', width:150 });//0 columns.push({ field: '璁″垝鏁伴噺', title: '鐢熶骇璁㈠崟鏁伴噺', width: 150 });//0 - columns.push({ field: '璁㈠崟鍙帓鏁伴噺', title: '璁㈠崟鍙帓鏁伴噺', width:150 }); - columns.push({ field: '鏈叆搴撴暟閲�', title: '鏈叆搴撴暟閲�', width: 150 });//0 - columns.push({ field: '鎷嗗崟鏁伴噺', title: '鎷嗗崟鏁伴噺', width: 150 });//0 columns.push({field: '鏃ヨ鍒掓暟閲忔�婚噺', title: '鏃ヨ鍒掓暟閲忔�婚噺', width: 150});//0 columns.push({ field: '浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�', title: '浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�', width: 150 });//0 columns.push({ field: '璁″垝寮�濮嬫棩鏈�', title: '棰勮寮�宸ユ棩鏈�', width: 150, templet: "<div>{{d.璁″垝寮�濮嬫棩鏈� ==null ?'':layui.util.toDateString(d.璁″垝寮�濮嬫棩鏈�, 'yyyy-MM-dd')}}</div>"}); @@ -513,6 +508,11 @@ columns.push({ field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 150 }); columns.push({ field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 150 }); columns.push({ field: 'hmainid', title: '鏃ヨ鍒掑伐鍗曚富鐮�', width: 150 }); + columns.push({ field: '鐢靛帇/鍔熺巼/搴曟澘', title: '鐢靛帇/鍔熺巼/搴曟澘', width: 150 }); + columns.push({ field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 150 }); + columns.push({ field: '鎷嗗崟鏁伴噺', title: '鎷嗗崟鏁伴噺', width: 150 });//0 + columns.push({ field: '璁㈠崟鍙帓鏁伴噺', title: '璁㈠崟鍙帓鏁伴噺', width: 150 }); + columns.push({ field: '鏈叆搴撴暟閲�', title: '鏈叆搴撴暟閲�', width: 150 });//0 option = { elem: '#mainTable' @@ -568,13 +568,13 @@ if (data1.count == 1) { if (data1.data[0]["DayNum"] > 0) { for (var i = 0; i <= data1.data[0]["DayNum"]; i++) { - option.cols[0][27 + i]["edit"] = ""; - option.cols[0][27 + i]["style"] = " background-color: #e6e6e6"; + option.cols[0][22 + i]["edit"] = ""; + option.cols[0][22 + i]["style"] = " background-color: #e6e6e6"; } } else { for (var i = 0; i < 31; i++) { - option.cols[0][27 + i]["edit"] = "text"; - option.cols[0][27 + i]["style"] = ""; + option.cols[0][22 + i]["edit"] = "text"; + option.cols[0][22 + i]["style"] = ""; } } table.render(option); @@ -627,7 +627,7 @@ //鑾峰彇鏃ユ湡涓嬫爣 var _numData3 = []; for (var i = 0; i < _numData2.length; i++) { - for (var j = 27; j < 58; j++) { + for (var j = 22; j < 53; j++) { if (option.cols[0][j]["field"] == _numData2[i]) { _numData3[i] = j; break; @@ -771,9 +771,14 @@ //鍙屽嚮璺宠浆榻愬鍒嗘瀽鏄庣粏琛� function btnrowDouble(obj) { + HMainICMOEntryID = obj["HICMOEntryID"]; HMainICMOInterID = obj["HICMOInterID"]; HICMOInterID = obj["HInterID"]; + + if (HICMOInterID == "" || HICMOInterID == null) { + return layer.alert("鏃犳棩璁″垝宸ュ崟,鏃犳硶鏌ョ湅!", { icon: 5 }); + } layer.open({ type: 2 //绫诲瀷 @@ -881,6 +886,18 @@ for (var i = 0; i < tableBak.length; i++) { dataPush.push(tableBak[i]); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍 } + + for (var i = 0; i < dataPush.length; i++) { + if (dataPush[i]["鍗曟嵁鍙�"] == "") { + for (var j = 0; j < data1.data.length; j++) { + if (data1.data[j]["婧愬崟涓诲唴鐮�"] == dataPush[i]["婧愬崟涓诲唴鐮�"] && data1.data[j]["婧愬崟瀛愬唴鐮�"] == dataPush[i]["婧愬崟瀛愬唴鐮�"]) { + layer.close(ajaxLoad); + return layer.alert("鐢熶骇鏄庣粏琛岄噸澶�,閲嶅鐨勭敓浜ц鍗曞彿:" + dataPush[i]["鐢熶骇璁㈠崟鍙�"] + ",鏄庣粏琛屽彿:" + dataPush[i]["鐢熶骇璁㈠崟鏄庣粏琛屽彿"], { icon: 5 }); + + } + } + } + } //瀛樺偍鏁版嵁 for (var i = 0; i < data1.data.length; i++) { dataPush.push(data1.data[i]); @@ -890,7 +907,7 @@ layer.close(ajaxLoad); } else { layer.close(ajaxLoad); - layer.alert(data1.code + data1.Message, { icon: 5 }); + layer.alert(data1.Message, { icon: 5 }); } }, error: function () { layer.close(ajaxLoad); diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html" index 2ddbe5c..02880a4 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html" @@ -200,9 +200,9 @@ <option value="1">钃濇捣瀹炰笟闆嗗洟</option> <option value="100035">钃濇捣閫氳鍏徃</option> <option value="100037">閫氳鍏徃鏈儴</option> - <option value="100038">鎵嬫満浜嬩笟閮�</option> + <option value="100038">鏉窞宸ュ巶</option> <option value="100039">骞虫澘浜嬩笟閮�</option> - <option value="100040">钃濇捣鐢靛瓙鍏徃</option> + <option value="100040">姹熷北宸ュ巶</option> <option value="100041">钃濇捣閿�鍞叕鍙�</option> <option value="100042">棣欐腐閿�鍞叕鍙�</option> <option value="100043">钃濇捣鐢靛瓙鍟嗗姟鏈夐檺鍏徃</option> diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\351\275\220\345\245\227\345\210\206\346\236\220/JIT_CompleteDetailList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\351\275\220\345\245\227\345\210\206\346\236\220/JIT_CompleteDetailList.html" index a455206..ad23be8 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\351\275\220\345\245\227\345\210\206\346\236\220/JIT_CompleteDetailList.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\351\275\220\345\245\227\345\210\206\346\236\220/JIT_CompleteDetailList.html" @@ -64,7 +64,7 @@ <div class="layui-inline"> <label class="layui-form-label" style="width: 85px;">鐢熶骇璁㈠崟</label> <div class="layui-input-block" style="margin-left: 120px;"> - <input type="text" class="layui-input" name="" id=""> + <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo"> </div> </div> <div class="layui-inline"> @@ -274,6 +274,7 @@ var HMaterNumber = $("#HMaterNumber").val(); var HComplete = $("#HComplete").val(); var HPlanDate = $("#HPlanDate").val(); + var HICMOBillNo = $("#HICMOBillNo").val(); if (HMaterID!="0") { sWhere += " and 鐗╂枡ID = '" + HMaterID + "'"; @@ -287,6 +288,9 @@ if (HPlanDate) { sWhere += " and 鏃ヨ鍒掓棩鏈� = '" + HPlanDate + "'"; } + if (HICMOBillNo) { + sWhere += " and 鐢熶骇璁㈠崟鍙� = '" + HICMOBillNo + "'"; + } get_Display(sWhere); sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 } -- Gitblit v1.9.1