| | |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <!--èªå®ä¹æ ·å¼--> |
| | | <style> |
| | | /* .maintitle { |
| | | background-color: #1492ff; |
| | | color: #fff; |
| | | padding: 5px 10px; |
| | | border: none; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .title { |
| | | border-left: 4px solid #1492ff; |
| | | padding-left: 6px; |
| | | margin: 20px 10px 4px; |
| | | font-size: 16px; |
| | | color: #333; |
| | | } |
| | | |
| | | .buttom_box_little { |
| | | width: 60px; |
| | | height: 36px; |
| | | color: #fff; |
| | | background-color: #1492ff; |
| | | border-radius: 4px; |
| | | border: none; |
| | | margin: 10px; |
| | | } |
| | | |
| | | .layui-input { |
| | | width: 93%; |
| | | } |
| | | |
| | | .layui-inline, img { |
| | | display: block; |
| | | vertical-align: middle |
| | | } |
| | | |
| | | .layui-input, .layui-textarea { |
| | | display: inline-block; |
| | | width: 100%; |
| | | padding-left: 10px; |
| | | } |
| | | |
| | | .laydate-time-list ol { |
| | | overflow-x: hidden !important; |
| | | overflow-y: auto !important; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | padding: 9px 5px; |
| | | width: 85px; |
| | | } |
| | | |
| | | .layui-input-block { |
| | | margin-left: 85px; |
| | | min-height: 36px; |
| | | }*/ |
| | | |
| | | .layui-form-label { |
| | | font-size: 14px; |
| | | width: 85px; |
| | |
| | | th { |
| | | width: 70px; |
| | | text-align: left; |
| | | } |
| | | |
| | | /* 鲿¢ä¸ææ¡ç䏿å表被éè---å¿
须设置--- */ |
| | | .layui-table-cell { |
| | | overflow: visible !important; |
| | | } |
| | | /* 使å¾ä¸ææ¡ä¸åå
æ ¼å好åé */ |
| | | td .layui-form-select { |
| | | margin-top: -10px; |
| | | margin-left: -15px; |
| | | margin-right: -15px; |
| | | } |
| | | </style> |
| | | </head> |
| | |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>æ£éªæ¹æ¡</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HQCSchemeName" class="layui-input" id="HQCSchemeName" placeholder="éæ©æ£éªæ¹æ¡" style="border-radius: 50px; background-color: #efefef4d;"> |
| | | <input type="hidden" name="HQCSchemeID" id="HQCSchemeID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="btnSearchQCScheme" id="btnSearchQCScheme" style="font-weight:bolder;">...</button> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>å¶å人</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaker" class="layui-input" id="HMaker" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | |
| | | </div> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">åæ®ä¿¡æ¯</li> |
| | | <li>æ£éªé¡¹ç®</li> |
| | | <li>å¶åä¿¡æ¯</li> |
| | | </ul> |
| | | </div> |
| | |
| | | </div> |
| | | </body> |
| | | </html> |
| | | <!--è¡æé®--> |
| | | <script type="text/html" id="barDemo"> |
| | | <!--<a class="layui-btn layui-btn-xs" lay-event="edit">ç¼è¾</a>--> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <!--å¤éæ¡ï¼æ£éªç»è®ºï¼--> |
| | | <script type="text/html" id="HResult"> |
| | | <input type="checkbox" value="{{d.HResult}}" lay-skin="primary" id="HResult{{d.LAY_TABLE_INDEX+1}}" lay-filter="HResult" {{ d.HResult == 1 ? 'checked' : '' }}> |
| | | </script> |
| | | <!--å¤éæ¡ï¼éç¹æ£æ¥ï¼--> |
| | | <script type="text/html" id="HKeyInspect"> |
| | | <input type="checkbox" value="{{d.HKeyInspect}}" lay-skin="primary" id="HKeyInspect{{d.LAY_TABLE_INDEX+1}}" lay-filter="HKeyInspect" {{ d.HKeyInspect == 1 ? 'checked' : '' }}> |
| | | </script> |
| | | <!--è¡ä¸æéæ©(åææ¹æ³)--> |
| | | <script type="text/html" id="HAnalysisMethod"> |
| | | <select name="HAnalysisMethod" lay-filter="HAnalysisMethod" id="HAnalysisMethod{{d.LAY_TABLE_INDEX+1}}"> |
| | | <option value="">è¯·éæ©</option> |
| | | <option value="1">宿§åæ</option> |
| | | <option value="2">å®éåæ</option> |
| | | <option value="3">å
¶ä»åæ</option> |
| | | </select> |
| | | </script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | |
| | | }) |
| | | }); |
| | | |
| | | //è¡¨å¤´ä¿¡æ¯æ£éªæ¹æ¡å¼¹çª |
| | | form.on('submit(btnSearchQCScheme)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | area: ['90%', '90%'], |
| | | title: 'æ£éªæ¹æ¡å表', |
| | | shift: 2,//å¼¹åºå¨ç», |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_QCCheckProjectListView.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HQCSchemeID").val(checkStatus.data[0].HItemID); |
| | | $("#HQCSchemeName").val(checkStatus.data[0].æ¹æ¡åç§°); |
| | | get_CheckItem(); |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //éæ©è®¡éåä½ |
| | | form.on('submit(BtnHUnit)', function () {//çäº§èµæº |
| | | layer.open({ |
| | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | |
| | | function set_InitGrid() { |
| | | rowdata = [{ |
| | | "HQCCheckItemID": "", "æ£éªé¡¹ç®": "", "HInspectInstruMentID": 0, "æ£éªä»ªå¨": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "", "HResult": "", "HMax": "", "HMin": "", "HAvg": "", "HKeyInspect": false |
| | | }]; |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , limit: 500 //æ¯é¡µé»è®¤æ¾ç¤ºçæ°é |
| | | , height: 'full-50' |
| | | , cellMinWidth: 150 |
| | | , cols: [[ //表头 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', totalRow: true } |
| | | , { field: 'HQCCheckItemID', title: 'HQCCheckItemID', hide: true } |
| | | , { field: 'æ£éªé¡¹ç®', title: 'æ£éªé¡¹ç®', edit: 'text', event: 'HQCCheckItemID' } |
| | | , { field: 'HInspectInstruMentID', title: 'HInspectInstruMentID', hide: true } |
| | | , { field: 'æ£éªä»ªå¨', title: 'æ£éªä»ªå¨', edit: 'text', event: 'HInspectInstruMentID' } |
| | | , { field: 'HResult', title: 'ç»è®º', width: 70, templet: '#HResult' } |
| | | , { field: 'HAnalysisMethod', title: 'åææ¹æ³', templet: '#HAnalysisMethod', event: 'HAnalysisMethod' } |
| | | , { field: 'HKeyInspect', title: 'éç¹æ£æ¥', templet: '#HKeyInspect', unresize: false } |
| | | , { field: 'HQCStd', title: 'æ£éªæ å', edit: 'text' } |
| | | , { field: 'HUnit', title: 'åä½', edit: 'text' } |
| | | , { field: 'HQCNote', title: 'æ£éªè®°å½', edit: 'text' } |
| | | , { field: 'HMax', title: 'æå¤§å¼', edit: 'text' } |
| | | , { field: 'HMin', title: 'æå°å¼', edit: 'text' } |
| | | , { field: 'HAvg', title: 'å¹³åå¼', edit: 'text', totalRow: true } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 70 } |
| | | ]] |
| | | , done: function (res, curr, count) { |
| | | option.data = res.data; |
| | | //廿䏿æ¡å¤±ç¦äºä»¶å¦åå¨ä¸ææ¡éè¾å
¥å¼ |
| | | $('.layui-form-select').find('input').unbind("blur"); |
| | | //è¡¨æ ¼éè½½åæ¾ä¸ææ¡éçæ°æ® |
| | | $('tr').each(function (e) { |
| | | var $cr = $(this); |
| | | var dataIndex = $cr.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TNDEX == dataIndex) { |
| | | $cr.find('input').val(value.HResult); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | , text: { |
| | | none: 'æ æ°æ®ï¼' |
| | | } |
| | | }; |
| | | //å è½½ç©ºè¡¨æ ¼ |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | } |
| | | |
| | | function get_CheckItem() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetCheckItemByCheckProjectID", |
| | | type: "GET", |
| | | data: { "CheckProjectID": $("#HQCSchemeID").val() == '' ? 0 : $("#HQCSchemeID").val(), "HBatchQty": 0 }, |
| | | success: function (result) { |
| | | if (result.code == 1) { |
| | | var rowdata = []; |
| | | rowdata_Value = []; |
| | | var data = result.data; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | //å表 èµå¼ |
| | | rowdata.push( |
| | | { |
| | | "HQCCheckItemID": data[i]["HQCCheckItemID"], "æ£éªé¡¹ç®": data[i]["æ£éªé¡¹ç®"], "HInspectInstruMentID": data[i]["HInspectInstruMentID"], "æ£éªä»ªå¨": data[i]["æ£éªä»ªå¨"], "HQCStd": data[i]["HQCStd"], "HUnit": data[i]["åä½åç§°"], "HQCNote": "", "HAnalysisMethod": data[i]["åææ¹æ³"], "HResult": data[i]["é»è®¤ç»è®º"], |
| | | "HMax": "", "HMin": "", "HAvg": "", "HKeyInspect": data[i]["éç¹æ£æ¥"] == 1 ? true : false, |
| | | } |
| | | ); |
| | | } |
| | | //æ£éªé¡¹ç® |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function txtHBarCode_KeyDown(HBarCode) { |
| | | //æ«ç ç±»å2 |