From 195661ab71ebd4ed89213780dd3fbb39d1a5caab Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 25 十二月 2023 09:13:32 +0800
Subject: [PATCH] 开工,完工,停工单 保存成功后不需要手动点击确认,jit选择生产订单
---
WebTM/views/生产管理/生产汇报单/Sc_Add_ICMOReportBillList.html | 33 ++
WebTM/views/生产管理/产量汇报单/Sc_ProductReportBillList.html | 26 ++
WebTM/views/生产管理/报工台工序/产量汇报/Sc_ICMOBillQualityStatus_TmpList.html | 4
WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html | 455 ++++++++++++++++++++++++++++++++++++++++
WebTM/views/生产管理/报工台工序/产量汇报/Sc_ICMOBillWorkQtyStatus_TmpList.html | 4
WebTM/views/生产管理/生产完工单/Sc_Add_MESEndWorkBillList.html | 33 ++-
WebTM/views/生产管理/产量汇报单/Sc_Add_ProductReportBillList.html | 33 ++-
WebTM/views/设备管理/Sb_Add_EqpConkBookBillList.html | 4
WebTM/views/模治具管理/模治具管理/Sc_Add_MouldConkBookBillList.html | 2
WebTM/views/生产管理/生产开工单/Sc_Add_MESBeginWorkBillList.html | 34 ++-
10 files changed, 576 insertions(+), 52 deletions(-)
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html"
index a573253..cbc4f7c 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html"
@@ -728,7 +728,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../PublicPage/UserInformation.html', 'yes'],
+ content: ['../../Baseset/鍩虹璧勬枡/Gy_EmployeeList.html', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html"
index d8f5c28..93c2c15 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html"
@@ -883,18 +883,29 @@
success: function (data) {
if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
$("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
- layer.confirm(data.Message, {
- btn: ['纭']
- }, function (index) {
- if (data.Verify == "Y") //鑷姩瀹℃牳
- {
- layer.close(index);
- SaveVerify(); //瀹℃牳
- }
- else {
- layer.close(index);
- }
+ layer.msg(result.Message, { time: 1 * 2000, icon: 1 }, function () {
+
});
+ if (data.Verify == "Y") //鑷姩瀹℃牳
+ {
+ layer.close(index);
+ SaveVerify(); //瀹℃牳
+ }
+ else {
+ layer.close(index);
+ }
+ //layer.confirm(data.Message, {
+ // btn: ['纭']
+ //}, function (index) {
+ // if (data.Verify == "Y") //鑷姩瀹℃牳
+ // {
+ // layer.close(index);
+ // SaveVerify(); //瀹℃牳
+ // }
+ // else {
+ // layer.close(index);
+ // }
+ //});
}
else {
layer.alert(data.Message, { icon: 5 })
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
index a3a37b6..b568186 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
@@ -184,6 +184,25 @@
//#endregion
+ table.on('row(mainTable)', function (obj) {
+ //閫変腑琛屾敼鍙橀鑹�
+ var flag = !obj.tr.find(':checkbox:first').prop('checked');
+ obj.tr.find(':checkbox').prop('checked', flag);
+ if (flag) {
+ obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+ } else {
+ obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+ }
+ //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+ layui.each(table.cache.mainTable, function (i, l) {
+ if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+ l.LAY_CHECKED = flag;
+ }
+ });
+ })
+
//#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
//鍒濆鍖栬〃鏍�
@@ -193,9 +212,12 @@
elem: '#mainTable'
, height: 'full-50'
, page: true
+ , limit:500
+ , totalRow: true
+ , limits: [100, 500, 1000, 2000]
, cellMinWidth: 90
, cols: [[
- { type: 'checkbox', fixed: 'left' }
+ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }
, { field: 'HInterID', title: 'HInterID', sort: true, hide: true, width: 200 }
, { field: 'HDate', title: '鏃ユ湡', width: 200, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
, { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 200 }
@@ -212,7 +234,7 @@
, { field: 'HMaterCode', title: '浜у搧浠g爜', width: 200 }
, { field: 'HMaterName', title: '浜у搧鍚嶇О', width: 200 }
, { field: 'HMaterSpec', title: '浜у搧瑙勬牸', width: 200 }
- , { field: 'HQty', title: '姹囨姤鏁伴噺', width: 200 }
+ , { field: 'HQty', title: '姹囨姤鏁伴噺', width: 200, totalRow: true }
, { field: 'HSourceID', title: '鐢熶骇璧勬簮ID', width: 200, hide: true }
, { field: 'HSourceCode', title: '鐢熶骇璧勬簮浠g爜', width: 200 }
, { field: 'HSourceName', title: '鐢熶骇璧勬簮', width: 200 }
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillQualityStatus_TmpList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillQualityStatus_TmpList.html"
index 1cc8bf1..130bad5 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillQualityStatus_TmpList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillQualityStatus_TmpList.html"
@@ -297,10 +297,10 @@
}
if (HDate) {
- sWhere += " and 鍒跺崟鏃ユ湡 >= '" + HDate + "'";
+ sWhere += " and CONVERT(varchar(100), 鍒跺崟鏃ユ湡, 23) >= '" + HDate + "'";
}
if (HDate1) {
- sWhere += " and 鍒跺崟鏃ユ湡 <= '" + HDate1 + "'";
+ sWhere += " and CONVERT(varchar(100), 鍒跺崟鏃ユ湡, 23) <= '" + HDate1 + "'";
}
if (HICMOBillNo) {
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_TmpList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_TmpList.html"
index ce76b65..e15de44 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_TmpList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_TmpList.html"
@@ -297,10 +297,10 @@
}
if (HDate) {
- sWhere += " and 閲囬泦鏃堕棿 >= '" + HDate + "'";
+ sWhere += " and CONVERT(varchar(100), 閲囬泦鏃堕棿, 23) >= '" + HDate + "'";
}
if (HDate1) {
- sWhere += " and 閲囬泦鏃堕棿 <= '" + HDate1 + "'";
+ sWhere += " and CONVERT(varchar(100), 閲囬泦鏃堕棿, 23) <= '" + HDate1 + "'";
}
if (HICMOBillNo) {
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\256\214\345\267\245\345\215\225/Sc_Add_MESEndWorkBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\256\214\345\267\245\345\215\225/Sc_Add_MESEndWorkBillList.html"
index 9a5bdee..5e1ad48 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\256\214\345\267\245\345\215\225/Sc_Add_MESEndWorkBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\256\214\345\267\245\345\215\225/Sc_Add_MESEndWorkBillList.html"
@@ -793,18 +793,29 @@
success: function (data) {
if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
$("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
- layer.confirm(data.Message, {
- btn: ['纭']
- }, function (index) {
- if (data.Verify == "Y") //鑷姩瀹℃牳
- {
- layer.close(index);
- SaveVerify(); //瀹℃牳
- }
- else {
- layer.close(index);
- }
+ layer.msg(result.Message, { time: 1 * 2000, icon: 1 }, function () {
+
});
+ if (data.Verify == "Y") //鑷姩瀹℃牳
+ {
+ layer.close(index);
+ SaveVerify(); //瀹℃牳
+ }
+ else {
+ layer.close(index);
+ }
+ //layer.confirm(data.Message, {
+ // btn: ['纭']
+ //}, function (index) {
+ // if (data.Verify == "Y") //鑷姩瀹℃牳
+ // {
+ // layer.close(index);
+ // SaveVerify(); //瀹℃牳
+ // }
+ // else {
+ // layer.close(index);
+ // }
+ //});
}
else {
layer.alert(data.Message, { icon: 5 })
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
index b7a92d6..ad50d73 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
@@ -634,18 +634,30 @@
success: function (data) {
if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
$("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
- layer.confirm(data.Message, {
- btn: ['纭']
- }, function (index) {
- if (data.Verify == "Y") //鑷姩瀹℃牳
- {
- layer.close(index);
- SaveVerify(); //瀹℃牳
- }
- else {
- layer.close(index);
- }
+ layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) {
+ //layer.close(layer.index);
+ //window.parent.location.reload();
});
+ if (data.Verify == "Y") //鑷姩瀹℃牳
+ {
+ layer.close(index);
+ SaveVerify(); //瀹℃牳
+ }
+ else {
+ layer.close(index);
+ }
+ //layer.confirm(data.Message, {
+ // btn: ['纭']
+ //}, function (index) {
+ // if (data.Verify == "Y") //鑷姩瀹℃牳
+ // {
+ // layer.close(index);
+ // SaveVerify(); //瀹℃牳
+ // }
+ // else {
+ // layer.close(index);
+ // }
+ //});
}
else {
layer.alert(data.Message, { icon: 5 })
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
index e45fb24..0cb8b35 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
@@ -569,7 +569,7 @@
//#region 瀹℃牳
form.on('submit(set_CheckBill)', function (data) {
-
+ set_CheckBill()
});
//#endregion
@@ -647,6 +647,35 @@
}
});
}
+ }
+ //#endregion
+
+ //#region 瀹℃牳
+ function set_CheckBill() {
+ var InterID = $("#HInterID").val();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_ICMOReportBill/AuditProcessReportList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 10000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
}
//#endregion
@@ -911,7 +940,7 @@
success: function (d) {
//console.log(d.data);
$("#HBillNo").val(d.data[0].HBillNo);
- $("#HInterID").val(0);
+ $("#HInterID").val(d.data[0].HInterID);
$("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
$("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
$("#HMaker").val(sessionStorage["HUserName"]);
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 de6e8ae..862b6fb 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"
@@ -181,7 +181,40 @@
</div>
</div>
<div id="HProgressBar"></div>
- <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <div class="layui-row" style="padding:10px 0">
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ </div>
+ <div class="layui-tab layui-tab-card" style="margin-top:40px;">
+ <ul class="layui-tab-title">
+ <li class="layui-this">鐢熶骇璁㈠崟</li>
+ </ul>
+ <div class="layui-tab-content">
+ <div class="layui-tab-item layui-show">
+ <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="HMaterName" id="HMaterName">
+ </div>
+ </div>
+ <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="HMaterName" id="HMaterName">
+ </div>
+ </div>
+ <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="HMaterName" id="HMaterName">
+ </div>
+ </div>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">鏌ヨ</button>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button>
+ <!--寰呮帓璁㈠崟-->
+ <table class="layui-hide" id="mainTable_ICMO" lay-filter="mainTable_ICMO"></table>
+ </div>
+ </div>
+ </div>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_BatchFill"><i class="layui-icon layui-icon-file-b"></i>鎵归噺濉厖</button>
@@ -194,6 +227,13 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_ReadyAsc"><i class="layui-icon layui-icon-delete"></i>鍑嗗鎺掑簭</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_Souce"><i class="layui-icon layui-icon-delete"></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>
+ <script type="text/html" id="toolbarDemo2">
+ <div class="layui-btn-container">
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Arrangement"><i class="layui-icon layuiiconform"></i>鎺掍骇</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn2"><i class="layui-icon layuiiconform"></i>鍒楄缃�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
</div>
</script>
</form>
@@ -227,9 +267,13 @@
, element = layui.element;
var sWhere = "";
+ var sWhere_ICMO = "";
var option = [];
+ var option2 = [];
+ var option_columns = [];
var HModName = "JIT_DayPlanPlatForm";
-
+ //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ var titleData = [];
//#endregion
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -413,9 +457,28 @@
case 'set_Souce':
set_Souce(data);
break;
-
+
}
+ });
+
+
+ table.on('toolbar(mainTable_ICMO)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id);
+ switch (obj.event) {
+ //鎺掍骇
+ case 'set_Arrangement':
+ set_Arrangement();
+ break;
+ //閫�鍑烘寜閽�
+ case 'btn-Close':
+ parent.layui.admin.events.closeThisTabs();
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn2':
+ get_HideColumn2();
+ break;
+ };
});
//瀵煎叆
@@ -562,6 +625,7 @@
get_FastQuery(1);
//闅愯棌鍕鹃�夊瓧娈�
DisPlay_HideColumn();
+ get_Display2(sWhere_ICMO);
}
//#endregion
@@ -614,6 +678,7 @@
columns.push({ field: '鎷嗗崟鏁伴噺', title: '鎷嗗崟鏁伴噺', width: 150, edit: 'text' });
columns.push({ field: '鏄ㄦ棩鏁伴噺', title: '鏄ㄦ棩鏁伴噺'});
columns.push({ field: '浼樺厛绾�', title: '浼樺厛绾�', width: 150, edit: 'text', sort: true });
+ columns.push({ field: '鎷嗗崟姹囨姤鏁伴噺', title: '鎷嗗崟姹囨姤鏁伴噺', width: 150, edit: 'text', sort: true });
columns.push({ field: '鐢熶骇璧勬簮', title: '鐢熶骇璧勬簮', width: 150, edit: 'text', event: "HSourceID" });
columns.push({
@@ -768,12 +833,12 @@
columns.push({ field: 'HGroupName', title: 'HGroupName', width: 150, hide:true });
columns.push({ field: '鐢熶骇璧勬簮浠g爜', title: '鐢熶骇璧勬簮浠g爜', width: 150, hide: true });
columns.push({ field: 'HSourceID', title: 'HSourceID', hide: true });
-
+
columns.push({ field: 'HWorkShopID', title: 'HWorkShopID', hide: true });
columns.push({ field: 'HUnitID', title: 'HUnitID', hide: true });
columns.push({ field: 'HProdORGID', title: 'HProdORGID', hide: true });
columns.push({ fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' });
-
+ option_columns = columns;
option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
@@ -1142,6 +1207,70 @@
sWhere = ""//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
}
+
+ //蹇�熻繃婊�
+ function get_FastQuery_ICMO(number) {
+ var HWorkShopID = 0;
+ var HProdORGID = 0;
+ HWorkShopID = $("#HWorkShopID").val();//鐢熶骇杞﹂棿
+ if (number == 2) {
+ if (HWorkShopID == 0) {
+ return layer.msg("鐢熶骇杞﹂棿涓嶈兘涓虹┖!");
+ }
+
+ HProdORGID = $("#HProdORGID").val();//鐢熶骇璁㈠崟缁勭粐
+ }
+ if (number == 1) {
+ HProdORGID = sessionStorage["OrganizationID"];//鐢熶骇璁㈠崟缁勭粐
+ }
+ var HPlanBeginDate = $("#HPlanBeginDate").val();//寮�宸ヨ捣濮嬫棩鏈�
+ var HPlanEndDate = $("#HPlanEndDate").val();//寮�宸ユ埅姝㈡棩鏈�
+ var HMastersDate = $("#HMastersDate").val();//鎺掍骇鏃ユ湡
+ var HSeOrderBillNo = $("#HSeOrderBillNo").val();//閿�鍞鍗曞彿
+ var HMaterID = $("#HMaterID").val();//鐗╂枡缂栫爜id
+ var HICMOBillNo = $("#HICMOBillNo").val();//鐢熶骇璁㈠崟鍙�
+ var ColName = $("#ColName").val();//澶嶉�夋
+ var Comparator = $("#Comparator").val()
+ var ColContent = $("#ColContent").val();
+ var sWhere_ICMO = "";
+
+ if (ColName != 0 && Comparator != 0) {
+ var com = "";
+ switch (Comparator) {
+ case "7":
+ com = "like''%" + ColContent + "%''";
+ break;
+ case "8":
+ com = "like''%" + ColContent + "''";
+ break;
+ case "9":
+ com = "like''" + ColContent + "%''";
+ break;
+ case "10":
+ com = "not like''%" + ColContent + "%''";
+ break;
+ default:
+ com = "" + Comparator + "''" + ColContent + "''";
+ break;
+ }
+ sWhere_ICMO += " and [" + ColName + "] " + com;
+ }
+
+ sWhere_ICMO = {
+ HPlanBeginDate: HPlanBeginDate
+ , HProdORGID: HProdORGID
+ , HSeOrderBillNo: HSeOrderBillNo
+ , HPlanEndDate: HPlanEndDate
+ , HMaterID: HMaterID
+ , HICMOBillNo: HICMOBillNo
+ , HWorkShopID: HWorkShopID
+ , HMastersDate: HMastersDate
+ , sWheres: sWheres
+ }
+ get_Display2(JSON.stringify(sWhere_ICMO));
+ sWhere_ICMO = ""//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ }
+
//鍙屽嚮璺宠浆榻愬鍒嗘瀽鏄庣粏琛�
function btnrowDouble(obj) {
@@ -1183,6 +1312,27 @@
$("#Comparator").val("0");
form.render('select');
sWhere = "";
+ }
+
+ //閲嶇疆
+ function set_ClearQuery_ICMO() {
+ $("#HPlanBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//寮�宸ヨ捣濮嬫棩鏈�
+ $("#HSeOrderBillNo").val("");//閿�鍞鍗曞彿
+ $("#HPlanEndDate").val(Format(new Date(), "yyyy-MM-dd"));//寮�宸ユ埅姝㈡棩鏈�
+ $("#HMastersDate").val("");//鎺掍骇鏃ユ湡
+ $("#HMaterID").val("0");//鐗╂枡缂栫爜id
+ $("#HMaterNumber").val("");//鐗╂枡缂栫爜
+ $("#HMaterName").val("");//鐗╂枡鍚嶇О
+ $("#HMaterModel").val("");//瑙勬牸鍨嬪彿
+ $("#HICMOBillNo").val("");//鐢熶骇璁㈠崟鍙�
+ $("#HWorkShopID").val("0");//鐢熶骇杞﹂棿id
+ $("#HWorkShopIDName").val("");//鐢熶骇杞﹂棿
+ $("#HProdORGID").val(sessionStorage["OrganizationID"])//鐢熶骇璁㈠崟缁勭粐
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0");
+ form.render('select');
+ sWhere_ICMO = "";
}
//榻愬鍒嗘瀽
@@ -2211,13 +2361,13 @@
}
})
-
+
}
else {
return layer.msg("璇烽�夋嫨鏁版嵁!")
}
}
-
+
//淇濆瓨
function set_AddNew() {
@@ -2228,7 +2378,7 @@
if (parseFloat(table.cache["mainTable"][i]["鎷嗗崟鏁伴噺"]) == 0) {
return layer.msg("绗�" + (i + 1) + "琛�,鎷嗕骇鏁伴噺鏈夎,璇烽噸鏂拌緭鍏�!");
}
- if (parseFloat(table.cache["mainTable"][i]["鎷嗗崟鏁伴噺"]) < parseFloat(table.cache["mainTable"][i]["鏃ヨ鍒掓暟閲忔�婚噺"]) + parseFloat(table.cache["mainTable"][i]["浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�"])) { // - 宸叉眹鎶ユ暟閲�
+ if (parseFloat(table.cache["mainTable"][i]["鎷嗗崟鏁伴噺"]) - parseFloat(table.cache["mainTable"][i]["鎷嗗崟姹囨姤鏁伴噺"]) < parseFloat(table.cache["mainTable"][i]["鏃ヨ鍒掓暟閲忔�婚噺"])) { // - 宸叉眹鎶ユ暟閲�
return layer.msg("绗�" + (i + 1) + "琛�,鎺掍骇鏁伴噺瓒呭嚭璁㈠崟鏁伴噺!");
}
table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
@@ -2404,6 +2554,177 @@
}
}
+
+ //鏌ヨ鏈帓浜х殑鐢熶骇璁㈠崟
+ function get_Display2(sWhere_ICMO) {
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillList_Json',
+ type: "GET",
+ data: { "sWhere": sWhere_ICMO, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+ if ($.inArray(data[i].name, titleData) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
+ }
+ }
+ }
+
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option2 = {
+ elem: '#mainTable_ICMO'
+ , toolbar: '#toolbarDemo2'
+ , cols: [col]
+ , data: data1.data
+ , height: 400
+ , page: true
+ , limits: [50, 500, 5000, 50000]
+ , limit: 200
+ , cellMinWidth: 90
+ }
+ table.render(option2);
+
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn2();
+
+ layer.close(ajaxLoad);
+ //if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+ // ColFilter();
+ //}
+ //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //鎺掍骇鍔熻兘
+ function set_Arrangement() {
+ var checkStatus = table.checkStatus('mainTable_ICMO')
+ , data = checkStatus.data;
+ if (checkStatus.data.length > 0) {
+ console.log(option.data);
+ var arr_field = [];
+ //鑾峰彇宸叉帓璁㈠崟鍒楄〃瀛楁
+ for (let i = 0; i < option_columns.length; i++) {
+ if (option_columns[i].field != undefined && option_columns[i].field != null) {
+ arr_field.push(option_columns[i].field);
+ }
+ }
+ //鎶婂凡鎺掕鍗曞垪琛ㄥ瓧娈靛瓨鍏bj瀵硅薄涓紝浠ヤ究缁欏瓧娈佃祴鍊�
+ var obj = {};
+ for (let i = 0; i < arr_field.length; i++) {
+ var key = arr_field[i];
+ var value = '';
+ obj[key] = value;
+ }
+ //鑾峰彇鍕鹃�変笂鐨勫緟鎺掔敓浜ц鍗�
+ for (var i = 0; i < checkStatus.data.length; i++) {
+ obj.HMaterID = data[i].HMaterID;
+ obj.HProdORGID = data[i].HPRDORGID;
+ obj.HUnitID = data[i].HUnitID;
+ obj.HWorkShopID = data[i].HDeptID;
+ obj.鎷嗗崟鏁伴噺 = data[i].鐢熶骇浠诲姟鍗曟暟閲�;
+ obj.婧愬崟涓诲唴鐮� = data[i].hmainid;
+ obj.婧愬崟瀛愬唴鐮� = data[i].HEntryID;
+ obj.鐗╂枡浠g爜 = data[i].浜у搧浠g爜;
+ obj.鐗╂枡鍚嶇О = data[i].浜у搧鍚嶇О;
+ obj.鐢熶骇缁勭粐 = "鏅轰簯杩堟��";
+ obj.鐢熶骇璁㈠崟鍗曟嵁绫诲瀷 = data[i].鍗曟嵁绫诲瀷;
+ obj.鐢熶骇璁㈠崟鍙� = data[i].鍗曟嵁鍙�;
+ obj.鐢熶骇璁㈠崟鏄庣粏琛屽彿 = data[i].HEntryID;
+ obj.鐢熶骇杞﹂棿 = data[i].鐢熶骇杞﹂棿;
+ obj.瑙勬牸鍨嬪彿 = data[i].瑙勬牸鍨嬪彿;
+ obj.璁″垝寮�濮嬫棩鏈� = data[i].璁″垝寮�宸ユ棩鏈�;
+ obj.璁″垝鏁伴噺 = data[i].鐢熶骇浠诲姟鍗曟暟閲�;
+ obj.璁″垝缁撴潫鏃ユ湡 = data[i].璁″垝瀹屽伐鏃ユ湡;
+ obj.璁¢噺鍗曚綅 = data[i].璁¢噺鍗曚綅;
+ obj.璁㈠崟鍙帓鏁伴噺 = data[i].鐢熶骇浠诲姟鍗曟暟閲�;
+ obj.璁㈠崟绛夌骇 = data[i].璁㈠崟绛夌骇;
+ obj.璁㈠崟绫诲瀷 = data[i].鍗曟嵁绫诲瀷;
+ obj.閿�鍞鍗曞彿 = data[i].閿�鍞鍗曞彿;
+ obj.閿�鍞鍗曟暟閲� = data[i].閿�鍞暟閲�;
+
+ option.data.push(obj);
+ table.render(option)
+ }
+
+ //鑾峰彇涓婃柟鎺掍骇鍒楄〃鏁版嵁,鐢ㄤ簬瀵规瘮涓嬫柟鐢熶骇璁㈠崟鍒楄〃锛屽皢涓嬫柟鐢熶骇璁㈠崟鍒楄〃鐩稿悓鐨勬暟鎹笉鏄剧ず
+ var compareList = [];
+ for (var i = 0; i < option.data.length; i++) {
+ var temp = option.data[i]["婧愬崟涓诲唴鐮�"] + "|" + option.data[i]["婧愬崟瀛愬唴鐮�"];
+ compareList.push(temp);
+ }
+
+ //鍓旈櫎涓婃柟鎺掍骇鍒楄〃涓凡缁忓姞鍏ョ殑鐢熶骇璁㈠崟
+ var tables = [];
+ for (var i = 0; i < option2.data.length; i++) {
+ var temp = option2.data[i]["hmainid"] + "|" + option2.data[i]["HEntryID"];
+ if ($.inArray(temp, compareList) == -1) {
+ tables.push(option2.data[i]);
+ }
+ }
+ option2.data = tables;
+
+ //閲嶆柊娓叉煋瀛愯〃2
+ table.render(option2);
+
+ //var wait = layer.load();
+ ////閫昏緫鏂规硶
+ //$.ajax({
+ // url: GetWEBURL() + '/LEMS/ProcessExchangeArrangement_Add',
+ // type: "GET",
+ // data: { "HInterID_S": HInterID_S.toString(), "HSourceID": DataSourceID, "HOrgID": sessionStorage["OrganizationID"], "user": sessionStorage["HUserName"] },
+ // success: function (result) {
+ // if (result.count == 1) {
+ // layer.msg(result.Message, { icon: 1 }, function () {
+ // // 寰楀埌frame绱㈠紩
+ // var index = layer.getFrameIndex(window.name);
+ // //鍏抽棴褰撳墠frame
+ // layer.close(wait);
+ // get_Display(" and HSourceID=" + DataSourceID);
+ // //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ // get_FastQuery();
+ // });
+ // } else {
+ // layer.alert(result.code + result.Message, { icon: 5 });
+ // layer.close(wait);
+ // }
+ // }, error: function () {
+ // layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ // layer.close(wait);
+ // }
+ //});
+ }
+ else {
+ layer.msg('璇烽�夋嫨鏁版嵁锛�');
+ }
+ }
+
//闅愯棌鍒楄缃�
function get_HideColumn() {
var colName = "";
@@ -2522,6 +2843,124 @@
})
}
+ function get_HideColumn2() {
+ var colName = "";
+ var contentUrl = "";
+ for (var i = 1; i < option2.cols[0].length; i++) {
+ colName += option2.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 + "Main" + '&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_HideColumn2();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ function DisPlay_HideColumn2() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ data: { "HModName": HModName + "Main", "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ /* var titleData = ["鍗曟嵁ID", "HMouldID", "hsubid", "HManagerID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option2.cols[0].length - 1; i++) {
+ if (dataCol[i]) {
+ var dataCols = dataCol[i].split('|');
+ }
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option2.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option2.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option2.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option2.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(option2.cols[0][i + 1]["title"], titleData) == -1) {
+ option2.cols[0][i + 1]["hide"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option2.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option2.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option2.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ }
+
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option2.cols[0].length - 1; i++) {
+ if (option2.cols[0][i]["fixed"] != null) {
+ option2.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(option2.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option2.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ table.render(option2);
+ } else {
+ table.render(option2);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+
//鍒楁槑鏄剧ず涓嬫媺妗�
function ColFilter() {
var Organization = '<option value="0" selected="selected" ></option>';
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html"
index 21d749d..ef287e0 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpConkBookBillList.html"
@@ -107,7 +107,7 @@
<label class="layui-form-label">鏁呴殰绫诲埆</label>
<div class="layui-input-inline">
<input type="text" name="HConkTypeName" id="HConkTypeName" class="layui-input" value="" style="float:left;width:150px;">
- <input type="hidden" name="HConkTypeID" id="HConkTypeID" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="hidden" name="HConkTypeID" id="HConkTypeID" class="layui-input" value="0" style="float:left;width:150px;">
<button type="button" lay-submit="" class="layui-btn" lay-filter="HConkTypeList" style="width:40px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
</button>
@@ -378,7 +378,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../PublicPage/RepairItemInformation.html', 'yes'],
+ content: ['../Baseset/鍩虹璧勬枡/Gy_EmployeeList.html', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
--
Gitblit v1.9.1