From 727ee25aeb5fcaf84e2cf009b2eacd3a86bcb3ca Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 28 十一月 2024 12:55:23 +0800
Subject: [PATCH] 新增 环境检测方案,环境检测单
---
WebTM/views/质量管理/质量报表/QC_RegistrationForTestingReport.html | 112 ++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 92 insertions(+), 20 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_RegistrationForTestingReport.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_RegistrationForTestingReport.html"
index d17a999..19480c5 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_RegistrationForTestingReport.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_RegistrationForTestingReport.html"
@@ -102,6 +102,7 @@
</div>
<script type="text/html" id="toolbarDemo1">
<div class="layui-btn-container">
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></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>
@@ -117,7 +118,7 @@
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate', 'soulTable'], function () {
//#region 鍏叡鍙橀噺
var $ = layui.$
@@ -131,6 +132,7 @@
, soulTable = layui.soulTable
var sWhere = "";
var option = [];
+ var ins; //鐢ㄤ簬瀵煎嚭excel
var HModName = "QC_RegistrationForTestingReport";
var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID"];//瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
@@ -152,6 +154,9 @@
switch (obj.event) {
//鍒楄缃�
case 'set_HideColumn': get_HideColumn();
+ break;
+ //瀵煎嚭鎸夐挳
+ case 'btn_Export': btn_Export();
break;
};
});
@@ -216,20 +221,20 @@
var columns = [];
columns.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
- columns.push({ field: '鏃ユ湡', title: '鏃ユ湡', sort: true, width: 180});
+ columns.push({ field: '鏃ユ湡', title: '鏃ユ湡', sort: true, width: 180 });
columns.push({ field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', sort: true, width: 180 });
columns.push({ field: '鐗╂枡', title: '鐗╂枡', sort: true, width: 110 });
columns.push({ field: '宸ュ簭', title: '宸ュ簭', sort: true, width: 110 });
columns.push({ field: '鎵规鍙�', title: '鎵规鍙�', sort: true, width: 110 });
- columns.push({ field: '(1)浜у搧鍗曢噸/g', title: '(1)浜у搧鍗曢噸/g', sort: true, totalRow: true, width: 140});
- columns.push({ field: '(2)浜у搧鍗曢噸/g', title: '(2)浜у搧鍗曢噸/g', sort: true, totalRow: true, width: 140});
- columns.push({ field: '(3)浜у搧鍗曢噸/g', title: '(3)浜у搧鍗曢噸/g', sort: true, totalRow: true, width: 140});
- columns.push({ field: '閫佹祴鍐呭', title: '閫佹祴鍐呭', sort: true, width: 110});
- columns.push({ field: '閫佹祴鏁伴噺', title: '閫佹祴鏁伴噺', sort: true, totalRow: true, width: 110});
- columns.push({ field: '閫佹祴鏃堕棿', title: '閫佹祴鏃堕棿', sort: true, width: 180});
- columns.push({ field: '鍒ゅ畾缁撴灉', title: '鍒ゅ畾缁撴灉', sort: true, width: 110});
- columns.push({ field: '鍥炴敹鏁伴噺', title: '鍥炴敹鏁伴噺', sort: true, totalRow: true, width: 110});
- columns.push({ field: '鍥炴敹鏃堕棿', title: '鍥炴敹鏃堕棿', sort: true, width: 180});
+ columns.push({ field: '(1)浜у搧鍗曢噸/g', title: '(1)浜у搧鍗曢噸/g', sort: true, totalRow: true, width: 140 });
+ columns.push({ field: '(2)浜у搧鍗曢噸/g', title: '(2)浜у搧鍗曢噸/g', sort: true, totalRow: true, width: 140 });
+ columns.push({ field: '(3)浜у搧鍗曢噸/g', title: '(3)浜у搧鍗曢噸/g', sort: true, totalRow: true, width: 140 });
+ columns.push({ field: '閫佹祴鍐呭', title: '閫佹祴鍐呭', sort: true, width: 110 });
+ columns.push({ field: '閫佹祴鏁伴噺', title: '閫佹祴鏁伴噺', sort: true, totalRow: true, width: 110 });
+ columns.push({ field: '閫佹祴鏃堕棿', title: '閫佹祴鏃堕棿', sort: true, width: 180 });
+ columns.push({ field: '鍒ゅ畾缁撴灉', title: '鍒ゅ畾缁撴灉', sort: true, width: 110 });
+ columns.push({ field: '鍥炴敹鏁伴噺', title: '鍥炴敹鏁伴噺', sort: true, totalRow: true, width: 110 });
+ columns.push({ field: '鍥炴敹鏃堕棿', title: '鍥炴敹鏃堕棿', sort: true, width: 180 });
option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo1'
@@ -238,7 +243,7 @@
//, cellMinWidth: 'auto'
, totalRow: true
, limit: 500
- , data:[]
+ , data: []
, limits: [50, 500, 5000, 20000]
//, done: function (res, curr, count) {
// soulTable.render(this);
@@ -272,6 +277,13 @@
for (var i = 0; i < data.length; i++) {
if ($.inArray(data[i].name, titleData) > -1) {
col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else if (data[i].name == '妫�楠屽崟鍗曞彿') {//娣诲姞瓒呴摼鎺�
+ col.push({
+ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '妫�楠屽崟鍗曞彿', templet: function (d) {
+ return '<span style="color: blue;">' + d.妫�楠屽崟鍗曞彿 + '</span>'
+ }, style: 'cursor: pointer;'
+ });
}
else {
switch (data[i].Type) {
@@ -311,15 +323,10 @@
option.data = data1.data
}
-
table.render(option);
-
+ ins = table.render(option);
//鍒锋柊琛ㄦ牸鏁版嵁
DisPlay_HideColumn();
-
- //if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
- // ColFilter();
- //}
layer.close(ajaxLoad);
} else {
@@ -343,10 +350,10 @@
var HProject = $("#HProject").val();//椤圭洰鍙�
var HBatchWork = $("#HBatchWork").val();//鏄惁閲忎骇
var HDivisionName = $("#HDivisionName").val();//浜嬩笟閮�
-
+
sWhere = {
HBeginDate: HBeginDate
- ,HEndDate: HEndDate
+ , HEndDate: HEndDate
, HMaterID: HMaterID
, HBatchNo: HBatchNo
, HProject: HProject
@@ -422,6 +429,71 @@
//#endregion
+ table.on('tool(mainTable)', function (obj) {
+ var data = obj.data;
+ if (obj.event == '妫�楠屽崟鍗曞彿') {
+ const HBillNo = data.妫�楠屽崟鍗曞彿.substring(0, 2);
+ var linterid = data.HInterID;
+ if (HBillNo == "SJ") {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '鏌ョ湅棣栦欢妫�楠屽崟'
+ , closeBtn: 1
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0'
+ , resize: false,
+ end: function () {
+ }
+ , cancel: function () {
+ }
+ })
+ }
+ else if (HBillNo == "XJ") {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '鏌ョ湅宸℃璁板綍鍗�'
+ , closeBtn: 1
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../宸℃璁板綍鍗�/QC_Add_Edit_PatrolProcCheckOtherill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0'
+ , resize: false,
+ end: function () {
+ }
+ , cancel: function () {
+ }
+ })
+ }
+ else if (HBillNo == "GX") {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '鏌ョ湅鏈妫�楠屽崟'
+ , closeBtn: 1
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../宸ュ簭妫�楠屽崟/QC_ProcessCheckBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0'
+ , resize: false,
+ end: function () {
+ }
+ , cancel: function () {
+ }
+ })
+ }
+ }
+ });
+
+ //#region 瀵煎嚭Execel
+ function btn_Export() {
+ table.exportFile(ins.config.id, option.data, "xls");
+ }
+ //#endregion
+
//闅愯棌鍒楄缃�
function get_HideColumn() {
var colName = "";
--
Gitblit v1.9.1