| | |
| | | <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:10px;margin-left:5%;"> |
| | | |
| | | </div> |
| | | <div class="layui-row" style="margin-top: 10px; margin-bottom: 10px "> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator" id="Comparator" 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> |
| | | <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;">æ¯å¦é产</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 class="layui-inline"> |
| | | <input type="text" class="layui-input" value="" name="ColContent" id="ColContent"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style=" margin-top: 10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" 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="HProject" id="HProject" class=" ForFilteringSchemes" lay-verify="HProject"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-row" style=" margin-top: 10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" 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> |
| | | <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 ForFilteringSchemes" value="" name="ColContent2" id="ColContent2"> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab layui-tab-card"> |
| | |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () { |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate', 'soulTable'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | |
| | | function set_ClearBill() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //set_InitGrid(); |
| | | Get_HProject(); //è·å项ç®å· |
| | | GetGy_Division();//è·åäºä¸é¨ |
| | | //æ¥è¯¢ |
| | | get_FastQuery(); |
| | | } |
| | |
| | | |
| | | 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: 'ç©æä»£ç ', title: 'ç©æä»£ç ', 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' |
| | |
| | | //, cellMinWidth: 'auto' |
| | | , totalRow: true |
| | | , limit: 500 |
| | | , data:[] |
| | | , data: [] |
| | | , limits: [50, 500, 5000, 20000] |
| | | //, done: function (res, curr, count) { |
| | | // soulTable.render(this); |
| | |
| | | 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) { |
| | |
| | | option.data = data1.data |
| | | } |
| | | |
| | | |
| | | |
| | | table.render(option); |
| | | |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | |
| | | var HMaterID = $("#HMaterID").val(); |
| | | var HBatchNo = $("#HBatchNo").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; |
| | | } |
| | | 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 = "" + Comparator2 + "'" + ColContent2 + "'"; |
| | | break; |
| | | } |
| | | sWhere += " and " + ColName2 + " " + com2; |
| | | } |
| | | |
| | | 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 |
| | | , HBatchWork: HBatchWork |
| | | , HDivisionName: HDivisionName |
| | | } |
| | | //set_InitGrid(); |
| | | get_Display(JSON.stringify(sWhere)); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | |
| | | function set_ClearQuery() { |
| | | $("#HICMOBillNo").val(""); |
| | | $("#HBardCode").val(""); |
| | | $("#HProcExchBillNo").val(""); |
| | | $("#ColContent1").val(""); |
| | | $("#ColName1").val("0"); |
| | | $("#Comparator1").val("0"); |
| | | $("#ColContent2").val(""); |
| | | $("#ColName2").val("0"); |
| | | $("#Comparator2").val("0"); |
| | | $("#ColContent").val(""); |
| | | $("#ColName").val("0"); |
| | | $("#Comparator").val("0"); |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HMaterID").val("0"); |
| | | $("#HBatchNo").val(""); |
| | | $("#HProject").val(""); |
| | | $("#HBatchWork").val(""); |
| | | $("#HDivisionName").val(""); |
| | | form.render('select'); |
| | | |
| | | sWhere = ""; |
| | | } |
| | | |
| | | |
| | | //#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 |
| | | |
| | | |
| | | 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 () { |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |