| | |
| | | var timerWeight; |
| | | var paramIntelCard;//设备识别结果 |
| | | var paramIdCard;//设备识别结果 |
| | | var curCheckItems = null;// 当前数据的检查项信息 |
| | | var step = 1; |
| | | |
| | | $(function () { |
| | |
| | | |
| | | //显示质检信息 |
| | | function showCheck() { |
| | | alertError("调整"); |
| | | if(!recordData){ |
| | | alertError("没有业务数据信息,执行被拒绝"); |
| | | return; |
| | | } |
| | | |
| | | // 获取化验项信息 |
| | | flushCheckItem(); |
| | | |
| | | layer.open({ |
| | | type: 1, |
| | | title: "质检详细", |
| | | offset: ['120px', '100px'], |
| | | area: ['1000px', '520px'], |
| | | shade: 0, |
| | | content: $('#checkDetail'), |
| | | btnAlign: 'c', |
| | | btn: ['取消'], |
| | | yes: function () { |
| | | layer.closeAll(); |
| | | }, |
| | | closeBtn: 0 |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 刷新化验结果项 |
| | | */ |
| | | function flushCheckItem() { |
| | | |
| | | curCheckItems = null; |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../basic/inout/get-check-item", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(recordData), |
| | | success: function (result) { |
| | | if (result.code != "0000") { |
| | | layer.msg(result.msg); |
| | | } else { |
| | | curCheckItems = result.data; |
| | | |
| | | // 页面渲染检测项 |
| | | renderTableCheckItem(); |
| | | } |
| | | }, |
| | | error: function () { |
| | | layer.msg("后台异常,请重试或者联系管理员!!"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 渲染表格 |
| | | */ |
| | | function renderTableCheckItem() { |
| | | // 清空数据 |
| | | $("#tableCheckItem").empty(); |
| | | table.render({ |
| | | elem: '#tableCheckItem', |
| | | data: curCheckItems, |
| | | page: false, |
| | | even: true, |
| | | cols: [[{ |
| | | field: 'standardName', |
| | | title: '检验项目', |
| | | align: 'center', |
| | | width: '13%' |
| | | }, { |
| | | field: 'value', |
| | | title: '检验值', |
| | | align: 'center', |
| | | width: '9%' |
| | | }, { |
| | | field: 'operaSymbolValue', |
| | | title: '标准值', |
| | | align: 'center', |
| | | width: '10%' |
| | | }, { |
| | | field: 'unit', |
| | | title: '单位', |
| | | align: 'center', |
| | | width: '10%' |
| | | }, { |
| | | field: 'deNum', |
| | | title: '扣重', |
| | | align: 'center', |
| | | width: '9%' |
| | | }, { |
| | | field: 'addNum', |
| | | title: '增重', |
| | | align: 'center', |
| | | width: '9%' |
| | | }, { |
| | | field: 'dePrice', |
| | | title: '扣价', |
| | | align: 'center', |
| | | width: '9%' |
| | | }, { |
| | | field: 'addPrice', |
| | | title: '增价', |
| | | align: 'center', |
| | | width: '9%' |
| | | }, { |
| | | field: 'result', |
| | | title: '检验结果', |
| | | align: 'center', |
| | | width: '10%', |
| | | templet: function (item) { |
| | | if (item.result == null) { |
| | | return ""; |
| | | } |
| | | if (item.result == '0') { |
| | | return "不合格"; |
| | | } |
| | | if (item.result == '1') { |
| | | return "合格"; |
| | | } |
| | | } |
| | | }, { |
| | | field: 'remarks', |
| | | title: '备注说明', |
| | | align: 'center' |
| | | }]] |
| | | }); |
| | | |
| | | $("thead tr").css({ |
| | | "border-bottom": "2px solid #53adce", |
| | | "background": "#eff4f6" |
| | | }); |
| | | } |