From 3d240d150e6e1a4e2df1a9f87d00ddd03ace4ee5 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期五, 17 一月 2025 10:06:37 +0800
Subject: [PATCH] 增加 BOM层级展开报表,修复全程追溯报表 黑白标页签导出失败,工艺路线的表头查询优化页面排序
---
WebTM/views/质量管理/质量报表/QC_ProcessPerformancePass.html | 373 +++++++++++++++++++++++++++++------------------------
1 files changed, 205 insertions(+), 168 deletions(-)
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProcessPerformancePass.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProcessPerformancePass.html"
index 178d0e8..d0da046 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProcessPerformancePass.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_ProcessPerformancePass.html"
@@ -38,91 +38,51 @@
<!--鍔ㄦ�佹覆鏌撳勾浠�-->
</select>
</div>
- </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鏄惁閲忎骇</label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+ <select name="HBatchWork" id="HBatchWork" lay-verify="HBatchWork">
+ <option value="">璇烽�夋嫨</option>
+ <option value="1">閲忎骇</option>
+ <option value="0">闈為噺浜�</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">椤圭洰鍙�</label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+ <select name="HProject" id="HProject" class=" ForFilteringSchemes" lay-verify="HProject">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
+ </div>
+ </div>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
- <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
- <div class="layui-row" style="margin-top:5px">
- <div class="layui-inline">
- <label class="layui-form-label">杩囨护</label>
- <div class="layui-input-block">
- <select name="ColName" id="ColName" class="ForFilteringSchemes" lay-filter="ColName" style="width:190px;">
- </select>
- </div>
+ <div class="layui-row" style="margin-top:5px;margin-left:82px;margin-bottom:5px;">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐗╂枡缂栫爜</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="padding: 0 10px; margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
</div>
- <div class="layui-inline">
- <select name="Comparator" id="Comparator" class="ForFilteringSchemes" lay-filter="Comparator" style="width:190px;">
- <option value="0" selected="selected"></option>
- <option value="=">=</option>
- <option value=">=">>=</option>
- <option value=">">></option>
- <option value="<="><=</option>
- <option value="<"><</option>
- <option value="<>"><></option>
- <option value="7">鍖呭惈</option>
- <option value="8">宸﹀寘鍚�</option>
- <option value="9">鍙冲寘鍚�</option>
- <option value="10">涓嶅寘鍚�</option>
- </select>
- </div>
- <div class="layui-inline">
- <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
+ </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 ForFilteringSchemes" name="HMaterName" id="HMaterName">
</div>
</div>
- <div class="layui-row" style="margin-top:5px">
- <div class="layui-inline">
- <label class="layui-form-label">杩囨护</label>
- <div class="layui-input-block">
- <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;">
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" style="width:190px;">
- <option value="0" selected="selected"></option>
- <option value="=">=</option>
- <option value=">=">>=</option>
- <option value=">">></option>
- <option value="<="><=</option>
- <option value="<"><</option>
- <option value="<>"><></option>
- <option value="7">鍖呭惈</option>
- <option value="8">宸﹀寘鍚�</option>
- <option value="9">鍙冲寘鍚�</option>
- <option value="10">涓嶅寘鍚�</option>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">浜嬩笟閮�</label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+ <select name="HDivisionName" id="HDivisionName" class=" ForFilteringSchemes" lay-verify="HDivisionName">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
</select>
- </div>
- <div class="layui-inline">
- <input type="text" class="layui-input" value="" name="ColContent1" id="ColContent1">
- </div>
- </div>
- <div class="layui-row" style="margin-top:5px">
- <div class="layui-inline">
- <label class="layui-form-label">杩囨护</label>
- <div class="layui-input-block">
- <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;">
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" style="width:190px;">
- <option value="0" selected="selected"></option>
- <option value="=">=</option>
- <option value=">=">>=</option>
- <option value=">">></option>
- <option value="<="><=</option>
- <option value="<"><</option>
- <option value="<>"><></option>
- <option value="7">鍖呭惈</option>
- <option value="8">宸﹀寘鍚�</option>
- <option value="9">鍙冲寘鍚�</option>
- <option value="10">涓嶅寘鍚�</option>
- </select>
- </div>
- <div class="layui-inline">
- <input type="text" class="layui-input" value="" name="ColContent2" id="ColContent2">
</div>
</div>
</div>
@@ -217,6 +177,12 @@
form.on('submit(btnReSearch)', function (data) {
set_ClearQuery();
});
+
+ //#region 浜у搧缂栫爜
+ form.on('submit(btnHMaterID)', function (data) {
+ btnHMaterID();
+ });
+ //#endregion
//#endregion
//#region 鐐瑰嚮琛岄�変腑楂樹寒
@@ -244,6 +210,8 @@
// 鍒濆鍖栫晫闈�
function set_ClearBill() {
Year(); //鍒濆鍖栧勾
+ Get_HProject(); //鑾峰彇椤圭洰鍙�
+ GetGy_Division();//鑾峰彇浜嬩笟閮�
set_InitGrid(); //鍒濆鍖栬〃鏍�
get_FastQuery();
//鍔犺浇鏌辩姸鍥�
@@ -351,85 +319,21 @@
//蹇�熸煡璇�
function get_FastQuery() {
var HYear = $("#HYear").val();
+ var HProject = $("#HProject").val();//椤圭洰鍙�
+ var HMaterNumber = $("#HMaterNumber").val();//鐗╂枡浠g爜
+ var HMaterName = $("#HMaterName").val();//鐗╂枡鍚嶇О
+ var HBatchWork = $("#HBatchWork").val();//鏄惁閲忎骇
+ var HDivisionName = $("#HDivisionName").val();//浜嬩笟閮�
- var ColName = $("#ColName").val();//澶嶉�夋
- var Comparator = $("#Comparator").val()
- var ColContent = $("#ColContent").val();
-
- var ColName1 = $("#ColName1").val();//澶嶉�夋
- var Comparator1 = $("#Comparator1").val()
- var ColContent1 = $("#ColContent1").val();
- var ColName2 = $("#ColName2").val();//澶嶉�夋
- var Comparator2 = $("#Comparator2").val()
- var ColContent2 = $("#ColContent2").val();
-
- 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 += " and " + ColName + " " + com;
+ sWhere = {
+ HYear: HYear
+ , HProject: HProject
+ , HMaterNumber: HMaterNumber
+ , HMaterName: HMaterName
+ , HBatchWork: HBatchWork
+ , HDivisionName: HDivisionName
}
- if (ColName1 != 0 && Comparator1 != 0) {
- var com1 = "";
- switch (Comparator1) {
- case "7":
- com1 = "like'%" + ColContent1 + "%'";
- break;
- case "8":
- com1 = "like'%" + ColContent1 + "'";
- break;
- case "9":
- com1 = "like'" + ColContent1 + "%'";
- break;
- case "10":
- com1 = "not like'%" + ColContent1 + "%'";
- break;
- default:
- com1 = "" + Comparator1 + "'" + ColContent1 + "'";
- break;
- }
- sWhere += " and " + ColName1 + " " + com1;
- }
- if (ColName2 != 0 && Comparator2 != 0) {
- var com2 = "";
- switch (Comparator2) {
- case "7":
- com2 = "like'%" + ColContent2 + "%'";
- break;
- case "8":
- com2 = "like'%" + ColContent2 + "'";
- break;
- case "9":
- com2 = "like'" + ColContent2 + "%'";
- break;
- case "10":
- com2 = "not like'%" + ColContent2 + "%'";
- break;
- default:
- com2 = "" + Comparator + "'" + ColContent + "'";
- break;
- }
- sWhere += " and " + ColName2 + " " + com2;
- }
- if (HYear) {
- sWhere += " and HYear = '" + HYear + "'";
- }
- get_Display(sWhere);
+ get_Display(JSON.stringify(sWhere));
//鍔犺浇鏌辩姸鍥�
set_Graphics();
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
@@ -438,17 +342,13 @@
//閲嶇疆蹇�熸煡璇�
function set_ClearQuery() {
$("#HYear").val(new Date().getFullYear());
+ $("#HProject").val("");
+ $("#HMaterNumber").val("");
+ $("#HMaterName").val("");
+ $("#HBatchWork").val("");
+ $("#HDivisionName").val("");
- $("#btnSearch").click();
- $("#ColContent").val("");
- $("#ColName").val("0");
- $("#Comparator").val("0");
- $("#ColContent2").val("");
- $("#ColName2").val("0");
- $("#Comparator2").val("0");
- $("#ColContent1").val("");
- $("#ColName1").val("0");
- $("#Comparator1").val("0");
+ $("#btnSearch").click();
form.render('select');
sWhere = "";
@@ -468,6 +368,7 @@
var H_X = [];//X杞存爣棰�
var HBackCount = [];//涓嶈壇鎬绘暟
var Pass = [];//鍚堟牸鐜�
+ var target = [];//鐩爣鍊�
var HTitle = "鍚堟牸鐜囪秼鍔垮浘";//鍥惧舰鏍囬
if (option.data.length > 0) {
for (let i = 0; i < option.data.length; i++) {
@@ -478,6 +379,7 @@
HBackCount.push(option.data[i].涓嶈壇鎬绘暟);
Pass.push((option.data[i].鍚堟牸鐜�).replace('%', ''));
+ target.push(('95.00%').replace('%', ''))
}
}
@@ -507,7 +409,7 @@
}
},
legend: {
- data: ['涓嶈壇鎬绘暟','鍚堟牸鐜�'],
+ data: ['涓嶈壇鎬绘暟','鍚堟牸鐜�','鐩爣鍊�'],
top: 'bottom', // 灏嗗浘渚嬫斁缃湪鍥捐〃鐨勪笅鏂�
left: 'center' // 鎴栬�� 'right'锛屾牴鎹渶瑕佽皟鏁存按骞充綅缃�
},
@@ -552,7 +454,10 @@
series: [
{
name: '涓嶈壇鎬绘暟',
- type: 'bar',
+ type: 'bar',
+ label: {
+ show: true
+ },
barGap: 0,
emphasis: {
focus: 'series'
@@ -562,11 +467,19 @@
return value;
}
},
+ itemStyle: {
+ color: '#FF0000' // 璁剧疆鏌辩姸鍥剧孩鑹�
+ },
data: HBackCount
},
{
name: '鍚堟牸鐜�',
type: 'line',
+ yAxisIndex: 1, // 浣跨敤绗簩涓� y 杞�
+ label: {
+ show: true,
+ formatter: '{c}%'
+ },
tooltip: {
valueFormatter: function (value) {
return value;
@@ -575,12 +488,35 @@
itemStyle: {
normal: {
lineStyle: {
- color: 'green' // 璁剧疆绾挎潯棰滆壊涓虹豢鑹�
+ color: '#0066FF' // 璁剧疆绾挎潯棰滆壊涓虹豢鑹�
},
- color: 'green' // 璁剧疆绾挎潯棰滆壊涓虹豢鑹�
+ color: '#0066FF' // 璁剧疆绾挎潯棰滆壊涓虹豢鑹�
}
},
data: Pass
+ },
+ {
+ name: '鐩爣鍊�',
+ type: 'line',
+ yAxisIndex: 1, // 浣跨敤绗簩涓� y 杞�
+ label: {
+ show: true,
+ formatter: '{c}%'
+ },
+ tooltip: {
+ valueFormatter: function (value) {
+ return value;
+ }
+ },
+ itemStyle: {
+ normal: {
+ lineStyle: {
+ color: '#FF0000' // 璁剧疆绾挎潯棰滆壊涓虹豢鑹�
+ },
+ color: '#FF0000' // 璁剧疆绾挎潯棰滆壊涓虹豢鑹�
+ }
+ },
+ data: target
}
]
};
@@ -589,6 +525,82 @@
}
//#endregion
+ //鐢熶骇杞﹂棿
+ function DeptName() {
+ //鑾峰彇杞﹂棿鍒�
+ var HDeptName = '<option value="0" style="color:red;" selected>鍏ㄩ儴杞﹂棿</option>';
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Sc_ICMOBill/GetHDeptList",
+ async: false,
+ data: { "HOrgID": sessionStorage["OrganizationID"] },
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ if (i == 0)
+ HDeptName += '<option style="color:blue;" value="' + data[i].HName + '" >' + data[i].HName + '</option>';
+ else
+ HDeptName += '<option style="color:blue;" value="' + data[i].HName + '">' + data[i].HName + '</option>';
+
+ }
+ $("#HDeptName").append(HDeptName);
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+
+ //#region 鑾峰彇椤圭洰鍙�
+ function Get_HProject() {
+ //鑾峰彇椤圭洰鍙�
+ var HProjectList = '<option value="" style="color:red;" selected></option>';
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Gy_Material/Get_HProject",
+ async: false,
+ data: { "HOrgID": sessionStorage["OrganizationID"] },
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ HProjectList += '<option style="color:blue;" value="' + data[i].HName + '" >' + data[i].HName + '</option>';
+ }
+ $("#HProject").append(HProjectList);
+ form.render('select');
+
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+ //#endregion
+
+ //#region 鑾峰彇浜嬩笟閮�
+ function GetGy_Division() {
+ //鑾峰彇浜嬩笟閮�
+ var HDivisionList = '<option value="" style="color:red;" selected></option>';
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Gy_Material/Get_Gy_Division",
+ async: false,
+ data: { "HOrgID": sessionStorage["OrganizationID"] },
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ HDivisionList += '<option style="color:blue;" value="' + data[i].HName + '" >' + data[i].HName + '</option>';
+ }
+ $("#HDivisionName").append(HDivisionList);
+ form.render('select');
+
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+ //#endregion
//#region 瀵煎嚭Execel
function get_Export() {
@@ -749,6 +761,31 @@
}
//#endregion
+ //鐗╂枡鍒楄〃
+ function btnHMaterID() {
+ layer.open({
+ type: 2 //绫诲瀷
+ , skin: 'layui-layer-rim'//鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '鐗╂枡鍒楄〃'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html', 'yes']
+ , btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ //鑾峰彇鏁版嵁
+ $("#HMaterNumber").val(checkStatus.data[0].鐗╂枡浠g爜);
+ $("#HMaterName").val(checkStatus.data[0].鐗╂枡鍚嶇О);
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
+ }
+
//浠ヤ笂鏄痩ayui妯″潡
});
</script>
--
Gitblit v1.9.1