From b742f00aac8e1e1bb628232383c35e67f4a41e4e Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期五, 26 一月 2024 15:21:28 +0800
Subject: [PATCH] 1
---
WebTM/views/生产工序管理/增加不良评审单/QC_NoPassProdCheckBillList.html | 362 +++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 330 insertions(+), 32 deletions(-)
diff --git "a/WebTM/views/\347\224\237\344\272\247\345\267\245\345\272\217\347\256\241\347\220\206/\345\242\236\345\212\240\344\270\215\350\211\257\350\257\204\345\256\241\345\215\225/QC_NoPassProdCheckBillList.html" "b/WebTM/views/\347\224\237\344\272\247\345\267\245\345\272\217\347\256\241\347\220\206/\345\242\236\345\212\240\344\270\215\350\211\257\350\257\204\345\256\241\345\215\225/QC_NoPassProdCheckBillList.html"
index 1db7275..3770d0c 100644
--- "a/WebTM/views/\347\224\237\344\272\247\345\267\245\345\272\217\347\256\241\347\220\206/\345\242\236\345\212\240\344\270\215\350\211\257\350\257\204\345\256\241\345\215\225/QC_NoPassProdCheckBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\345\267\245\345\272\217\347\256\241\347\220\206/\345\242\236\345\212\240\344\270\215\350\211\257\350\257\204\345\256\241\345\215\225/QC_NoPassProdCheckBillList.html"
@@ -14,6 +14,7 @@
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script src="../../../layuiadmin/PubCustom.js"></script>
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
</head>
<body>
<div class="layui-fluid">
@@ -105,8 +106,11 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>鍏抽棴</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>鍙嶅叧闂�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
</div>
</script>
@@ -127,7 +131,7 @@
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
//#region 鍏叡鍙橀噺
@@ -139,12 +143,16 @@
, element = layui.element
, laypage = layui.laypage
, laydate = layui.laydate
+ , soulTable = layui.soulTable
//var sWhere = " 浜у搧浠g爜 = 'BX0002'";
var sWhere = "";
var option = [];
//#endregion
+ //#region 杩涘叆椤甸潰鍔犺浇
+
+ var HModName = "QC_NoPassProdCheckBillList";
//#region 鍒濆鍖栫晫闈�
set_ClearBill();
//#endregion
@@ -171,10 +179,25 @@
});
break;
- case '':
- layer.msg('');
+ //鍒犻櫎
+ case 'btn-Delete':
+ set_DeleteBill();
break;
-
+ //瀹℃牳
+ case 'btn-Audit': set_AuditBill();
+ break;
+ //鍙嶅鏍�
+ case 'btn-DeAudit': set_DeAuditBill();
+ break;
+ //鍏抽棴
+ case 'set_CloseBill': set_CloseBill(1);
+ break;
+ //鍙嶅叧闂�
+ case 'set_CancelCloseBill': set_CloseBill(2);
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn': get_HideColumn();
+ break;
};
});
@@ -215,36 +238,39 @@
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
, cols: [[
- //{ type: 'checkbox' }
- { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
+ { type: 'checkbox' }
+ , { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
, { field: '鏃ユ湡', title: '鏃ユ湡', sort: true, width: 120, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', sort: true, width: 170 }
- , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞' }
- , { field: '鐢熶骇璧勬簮鍚嶇О ', title: '鐢熶骇璧勬簮鍚嶇О ', width: 115 }
- , { field: '鐢熶骇璧勬簮浠g爜', title: '鐢熶骇璧勬簮浠g爜' }
- , { field: '鐗╂枡鍐呯爜', title: '鐗╂枡鍐呯爜', width: 100 }
- , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О' }
- , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿' }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
- , { field: '妫�楠屽憳浠g爜', title: '妫�楠屽憳浠g爜' }
- , { field: '妫�楠屽憳鍚嶇О', title: '妫�楠屽憳鍚嶇О' }
- , { field: '鍗曚綅浠g爜', title: '鍗曚綅浠g爜' }
- , { field: '鍗曚綅鍚嶇О', title: '鍗曚綅鍚嶇О' }
- , { field: '涓嶈壇鍘熷洜浠g爜 ', title: '涓嶈壇鍘熷洜浠g爜' }
- , { field: '涓嶈壇鍘熷洜', title: '涓嶈壇鍘熷洜' }
- , { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
- , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 120, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd')}}</div>"}
- , { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
- , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡' }
- , { field: '淇敼浜�', title: '淇敼浜�' }
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 120, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '鍏抽棴浜�', title: '鍏抽棴浜�' }
- , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡' }
- , { field: '浣滃簾浜�', title: '浣滃簾浜�' }
- , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡' }
- , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷' }
- , { field: 'hsubid', title: 'hsubid', fixed: true, hide: true }
+ , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', sort: true }
+ , { field: '鐢熶骇璧勬簮鍚嶇О ', title: '鐢熶骇璧勬簮鍚嶇О ', width: 115, sort: true }
+ , { field: '鐢熶骇璧勬簮浠g爜', title: '鐢熶骇璧勬簮浠g爜', sort: true }
+ , { field: '鐗╂枡鍐呯爜', title: '鐗╂枡鍐呯爜', width: 100, sort: true }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', sort: true }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', sort: true }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', sort: true }
+ , { field: '妫�楠屽憳浠g爜', title: '妫�楠屽憳浠g爜', sort: true }
+ , { field: '妫�楠屽憳鍚嶇О', title: '妫�楠屽憳鍚嶇О', sort: true }
+ , { field: '鍗曚綅浠g爜', title: '鍗曚綅浠g爜', sort: true }
+ , { field: '鍗曚綅鍚嶇О', title: '鍗曚綅鍚嶇О', sort: true }
+ , { field: '涓嶈壇鍘熷洜浠g爜 ', title: '涓嶈壇鍘熷洜浠g爜', sort: true }
+ , { field: '涓嶈壇鍘熷洜', title: '涓嶈壇鍘熷洜', sort: true }
+ , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', sort: true }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 120, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+ , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', sort: true }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', sort: true }
+ , { field: '淇敼浜�', title: '淇敼浜�', sort: true }
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 120, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+ , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', sort: true }
+ , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', sort: true }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', sort: true }
+ , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', sort: true }
+ , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', sort: true }
+ , { field: 'hsubid', title: 'hsubid', fixed: true, hide: true, sort: true }
//,{fixed: 'right', title:'鎿嶄綔', toolbar: '#barDemo', width:150}
]]
@@ -258,7 +284,7 @@
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
url: GetWEBURL() + '/Sc_ProcessMangement/MES_QC_NoPassProdCheckBill_Json',
type: "GET",
- data: { "sWhere": sWhere },
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.count == 1) {
option.data = data1.data;
@@ -273,7 +299,121 @@
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
+ DisPlay_HideColumn();
}
+
+
+ //闅愯棌鍒楄缃�
+ 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 = ["HMaterID", "HUnitID", "HICMOEmpID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ 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 });
+ }
+ })
+ }
+
+
// 蹇�熻繃婊�
function get_FastQuery() {
@@ -338,6 +478,164 @@
sWhere = "";
}
+ //鍒犻櫎
+ function set_DeleteBill() {
+ var checkStatus = table.checkStatus("mainTable");
+ //鍒ゆ柇鏄惁閫変腑鏁版嵁
+ if (checkStatus.data.length != 1) {
+ return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+ }
+
+ layer.confirm('鎮ㄧ‘瀹氳鍒犻櫎鍚楋紵', {
+ btn: ['纭畾', '鍙栨秷'] //鎸夐挳
+ , btn1: function () {
+
+ var HInterID = checkStatus.data[0].hmainid;
+ $.ajax({
+ url: GetWEBURL() + '/Sc_ProcessMangement/ProcessMangementDeleteBill'
+ , type: "GET"
+ , data: { "HInterID": HInterID, "user": sessionStorage["HUserName"] }
+ , success: function (result) {
+
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ ////閲嶈浇tree
+ //tree.reload('treeDepartment', {});
+ });
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }
+ })
+ }
+ })
+
+ }
+
+ //瀹℃牳
+ function set_AuditBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ var HBillStatus = data[0].HBillStatus.toString();
+ if (HBillStatus == 1) {
+ layer.mes("鍗曟嵁宸插鏍�,涓嶈兘鍐嶆瀹℃牳!");
+ return false;
+ }
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_ProcessMangement/AuditProcessMangement", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+ }
+
+ //鍙嶅鏍�
+ function set_DeAuditBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ var HBillStatus = data[0].HBillStatus.toString();
+
+ if (HBillStatus == 0) {
+ layer.msg("鍗曟嵁鏈鏍�,涓嶈兘鍙嶅鏍�!");
+ return false;
+ }
+
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_ProcessMangement/AuditProcessMangement", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "IsAudit": 2, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹弽瀹℃牳锛�');
+ }
+ }
+
+
+ //鍏抽棴 [1 鍏抽棴銆�2 鍙嶅叧闂璢
+ function set_CloseBill(num) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+
+ if (data.length == 1) {
+ layer.confirm("纭瑕佸叧闂悧?", function (index) {
+ var wait = layer.load();
+ var HInterID = data[0].hmainid;
+ $.ajax({
+ url: GetWEBURL() + '/Sc_ProcessMangement/CloseSc_ProcessMangement',
+ type: "GET",
+ data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { icon: 1 });
+ layer.close(wait);
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(wait);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
+ }
+ });
+ })
+ }
+ else {
+ layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+ }
+ }
+
//#endregion
//浠ヤ笂鏄痩ayui妯″潡
--
Gitblit v1.9.1