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_ComplementGoodBillMain.html | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 156 insertions(+), 15 deletions(-)
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html"
index c226e29..f6a5635 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html"
@@ -38,6 +38,7 @@
<button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Yltl" id="Yltl">浣欓噺閫�鏂欑敵璇峰崟</button>
<button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Bftl" id="Bftl">鎶ュ簾閫�鏂欑敵璇峰崟</button>
<button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Sctld" id="Sctld">鐢熸垚閫�鏂欏崟</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px;margin-top:5px;" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">闅愯棌鍒楄缃�</button>
</div>
<div class="layui-collapse">
<div class="layui-colla-item">
@@ -129,17 +130,15 @@
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">寮�濮嬫棩鏈�</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 48px;">
+ <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 80px;">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;text-align:center;">鈥�</label>
- <div class="layui-input-block" style="margin-left: 118px;">
- <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 48px;">
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 80px;">
</div>
</div>
- </div>
- <div class="layui-row" style="margin-top:10px;">
<div class="layui-inline">
<div class="layui-input-block" style="margin-left: 90px;">
<input type="checkbox" name="ps" id="ps" lay-skin="primary" lay-filter="ps" title="浠呮樉绀烘湭瀹屽叏閰嶉��">
@@ -154,7 +153,6 @@
<div class="layui-form-item" style="padding-top: 10px;">
<table class="" id="mainTable" lay-filter="mainTable"></table>
</div>
-
</div>
</div>
</form>
@@ -180,6 +178,7 @@
//鏌ヨ鏉′欢
var sWhere = "";
var option = [];
+ var HModName = "JIT_ComplementGoodBill";
//#endregion
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -251,6 +250,11 @@
getXc();
})
+ //闅愯棌鍒楄缃�
+ form.on('submit(HideColumn)', function () {
+ get_HideColumn();
+ })
+
//#endregion
//#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
@@ -264,6 +268,7 @@
//鏃堕棿鍒濆鍖�
$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+ DisPlay_HideColumn();
}
//鑾峰彇缁勭粐
function Organ() {
@@ -314,13 +319,15 @@
, { field: '閫�鏂欏師鍥�', title: '閫�鏂欏師鍥�', width: 160, edit: 'text'}
, { field: '宸插彨鏂欐暟閲�', title: '宸插彨鏂欐暟閲�', width: 160}
, { field: '宸查厤閫佹暟閲�', title: '宸查厤閫佹暟閲�', width: 160 }
- , { field: '璋冨嚭浠撳簱', title: '璋冨嚭浠撳簱', width: 160, edit: 'text', event: 'Warehouse' }
+ , { field: '璋冨嚭浠撳簱', title: '璋冨嚭浠撳簱', width: 160, edit: 'text', event: 'OutWarehouse' }
, { field: '璋冨嚭浠撳簱id', title: '璋冨嚭浠撳簱id', width: 160, hide: true }
+ , { field: '璋冨叆浠撳簱', title: '璋冨叆浠撳簱', width: 160, edit: 'text', event: 'InWarehouse' }
+ , { field: '璋冨叆浠撳簱id', title: '璋冨叆浠撳簱id', width: 160, hide: true }
, { field: '搴撳瓨鏁伴噺', title: '搴撳瓨鏁伴噺', width: 160 }
, { field: '璋冨嚭浠撳簱搴撳瓨鏁伴噺', title: '璋冨嚭浠撳簱搴撳瓨鏁伴噺', width: 160 }
, { field: '璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺', title: '璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺', width: 160 }
, { field: '鍙敤搴撳瓨', title: '鍙敤搴撳瓨', width: 160 }
- , { field: '搴撳瓨缁勭粐', title: '搴撳瓨缁勭粐', width: 160}
+ , { field: '璋冨嚭缁勭粐', title: '璋冨嚭缁勭粐', width: 160}
, { field: 'HICMOBillNo', title: 'HICMOBillNo', width: 160 }
, { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 160 }
, { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 160 }
@@ -488,7 +495,7 @@
function set_GridCellCheck(obj) {
$(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
if (event.key == "F7") {
- if (obj.event == "Warehouse") {
+ if (obj.event == "OutWarehouse") {
//鎵撳紑缁翠慨椤圭洰灏忕獥浣�
layer.open({
type: 2
@@ -513,7 +520,36 @@
"璋冨嚭浠撳簱": checkStatus.data[0].HName
, "璋冨嚭浠撳簱id": checkStatus.data[0].HItemID
})
- console.log(checkStatus.data[0].HItemID)
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ if (obj.event == "InWarehouse") {
+ //鎵撳紑缁翠慨椤圭洰灏忕獥浣�
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "浠撳簱鍒楄〃" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ["../../Baseset/鍩虹璧勬枡/Gy_WarehouseList.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({
+ "璋冨叆浠撳簱": checkStatus.data[0].HName
+ , "璋冨叆浠撳簱id": checkStatus.data[0].HItemID
+ })
layer.close(index);//鍏抽棴寮圭獥
}
})
@@ -524,17 +560,18 @@
//鏂板鍙枡鍗�
function set_AddNew_Jl() {
-
- if (table.cache['mainTable'].length == 0) {
+ var data = table.cache['mainTable'];
+ if (data.length == 0) {
return layer.msg("鏃犳暟鎹�,鏃犳硶鍙枡!");
}
else {
+
var sMainStr = JSON.stringify(table.cache['mainTable']) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"];//sessionStorage["HUserName"]
$.ajax(
{
type: "POST",
- url: GetWEBURL() + "Sc_ComplementGoodBill/InsertCallGoodsBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ url: GetWEBURL() + "/Sc_ComplementGoodBill/InsertCallGoodsBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
async: true,
data: { "msg": sMainStr },
dataType: "json",
@@ -679,7 +716,7 @@
$.ajax(
{
type: "POST",
- url: GetWEBURL() + "Sc_ComplementGoodBill/Insert_JL_ICStockTuiBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ url: GetWEBURL() + "/Sc_ComplementGoodBill/Insert_JL_ICStockTuiBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
async: true,
data: { "msg": sMainStr },
dataType: "json",
@@ -761,10 +798,114 @@
, area: ['80%', '80%']
, title: '鍙枡鎷f枡淇℃伅鏌ヨ'
, shift: 0//寮瑰嚭鍔ㄧ敾
- , content: '../鐢熶骇鍙枡骞冲彴/JIT_HlpBillList.html?HSourceInterID=' + HSouceInterID + '&HSourceEntryID=' + HSourceEntryID
+ , content: '../鐢熶骇鍙枡骞冲彴/JIT_HlpBillList.html?HSourceInterID=' + HSouceInterID + '&HSourceEntryID=' + HSourceEntryID + '&Type=1'
})
}
}
+
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["title"] + ",";
+ }
+
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "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 = ["璋冨嚭浠撳簱id", "璋冨叆浠撳簱id", "HDeptID", "HDeptNumber", "HMaterialID", "HWHID", "HOutOrgID", "HSouceInterID", "HSourceEntryID", "HSourceBillNo", "HICMOInterID", "HICMOEntryID","HSTOCKID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ 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 (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 (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["field"], 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
});
--
Gitblit v1.9.1