|  |  |  | 
|---|
|  |  |  | var recordData = null;// 业务数据信息 | 
|---|
|  |  |  | var snapData;//系统抓拍对象信息 | 
|---|
|  |  |  | var timerWeight; | 
|---|
|  |  |  | var paramIntelCard;//设备识别结果 | 
|---|
|  |  |  | var paramIdCard;//设备识别结果 | 
|---|
|  |  |  | var curCheckItems = null;// 当前数据的检查项信息 | 
|---|
|  |  |  | var step = 1; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $(function () { | 
|---|
|  |  |  | layui.use(['layer', 'laydate', 'form', 'table', 'util'], function () { | 
|---|
|  |  |  | 
|---|
|  |  |  | shadeClose: true, | 
|---|
|  |  |  | shade: 0.3, | 
|---|
|  |  |  | closeBtn: 2, | 
|---|
|  |  |  | offset: ['50px','120px'], | 
|---|
|  |  |  | offset: ['50px', '120px'], | 
|---|
|  |  |  | area: ['1000px', '640px'], | 
|---|
|  |  |  | content: '../../basic/inout/inout-progress?type=' + type + "&t=" + Math.random() | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 监听重量变化 | 
|---|
|  |  |  | $(".weight").blur(function () { | 
|---|
|  |  |  | var name = this.name; | 
|---|
|  |  |  | deAutoByIn(name); | 
|---|
|  |  |  | deAutoByIn(this.name); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 初始化WebSocket | 
|---|
|  |  |  | 
|---|
|  |  |  | updateWeight(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // socket信息返回處理 | 
|---|
|  |  |  | 
|---|
|  |  |  | //暂无 | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 根据当前操作的按钮ID更新其他按钮状态 | 
|---|
|  |  |  | function flushBtn(btnId) { | 
|---|
|  |  |  | if ("btn-weight" == btnId) {// 称重后可以点击完成称重 | 
|---|
|  |  |  | $("#btn-submit").removeClass("layui-btn-disabled"); | 
|---|
|  |  |  | $("#btn-submit").attr("disabled", false); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if ("btn-submit" == btnId) { | 
|---|
|  |  |  | $("#btn-submit").addClass("layui-btn-disabled"); | 
|---|
|  |  |  | $("#btn-submit").attr("disabled", true); | 
|---|
|  |  |  | if (InoutProgress.WEIGHT_FULL == recordData.progress) {// 如果是满车称重,则直接当前节点完成 | 
|---|
|  |  |  | resetForm(); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | // 完成称重后控制按钮 | 
|---|
|  |  |  | $("#btn-weight").addClass("layui-btn-disabled"); | 
|---|
|  |  |  | $("#btn-weight").attr("disabled", true); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#btn-printBill").removeClass("layui-btn-disabled"); | 
|---|
|  |  |  | $("#btn-printBill").attr("disabled", false); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | addDisabled(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if ("btn-printBill" == btnId) {// 打印过磅单,说明业务完成 | 
|---|
|  |  |  | $("#btn-weight").removeClass("layui-btn-disabled"); | 
|---|
|  |  |  | $("#btn-weight").attr("disabled", false); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#btn-submit").addClass("layui-btn-disabled"); | 
|---|
|  |  |  | $("#btn-submit").attr("disabled", true); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#btn-printBill").addClass("layui-btn-disabled"); | 
|---|
|  |  |  | $("#btn-printBill").attr("disabled", true); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | delDisabled(); | 
|---|
|  |  |  | resetForm(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //控制流程环节显示 | 
|---|
|  |  |  | function showProgress() { | 
|---|
|  |  |  | if (!inoutProgress) { | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (inoutProgress.indexOf("REGISTER") == -1) { | 
|---|
|  |  |  | $("#progress-register").css("display", "none"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (inoutProgress.indexOf("CHECK") == -1) { | 
|---|
|  |  |  | $("#progress-check").css("display", "none"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (inoutProgress.indexOf("WEIGHT_FULL") == -1) { | 
|---|
|  |  |  | $("#progress-fullWeight").css("display", "none"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (inoutProgress.indexOf("HANDLE") == -1) { | 
|---|
|  |  |  | $("#progress-hand").css("display", "none"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) { | 
|---|
|  |  |  | $("#progress-emptyWeight").css("display", "none"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (inoutProgress.indexOf("CARD_BACK") == -1) { | 
|---|
|  |  |  | $("#progress-cardBack").css("display", "none"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //更改扣重信息框不可编辑 | 
|---|
|  |  |  | function addDisabled() { | 
|---|
|  |  |  | //杂质 | 
|---|
|  |  |  | $("#impurity").attr("disabled", true); | 
|---|
|  |  |  | $("#deImpurity").attr("disabled", true); | 
|---|
|  |  |  | //水分 | 
|---|
|  |  |  | $("#wet").attr("disabled", true); | 
|---|
|  |  |  | $("#deWet").attr("disabled", true); | 
|---|
|  |  |  | //值仓 | 
|---|
|  |  |  | $("#deHandle").attr("disabled", true); | 
|---|
|  |  |  | //其他 | 
|---|
|  |  |  | $("#deOther").attr("disabled", true); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //恢复扣重信息框编辑状态 | 
|---|
|  |  |  | function delDisabled() { | 
|---|
|  |  |  | //杂质 | 
|---|
|  |  |  | $("#impurity").attr("disabled", false); | 
|---|
|  |  |  | $("#deImpurity").attr("disabled", false); | 
|---|
|  |  |  | //水分 | 
|---|
|  |  |  | $("#wet").attr("disabled", false); | 
|---|
|  |  |  | $("#deWet").attr("disabled", false); | 
|---|
|  |  |  | //值仓 | 
|---|
|  |  |  | $("#deHandle").attr("disabled", false); | 
|---|
|  |  |  | //其他 | 
|---|
|  |  |  | $("#deOther").attr("disabled", false); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 点击称重 | 
|---|
|  |  |  | //点击称重 | 
|---|
|  |  |  | function weight() { | 
|---|
|  |  |  | // 没有业务数据不可执行 | 
|---|
|  |  |  | if (!recordData) { | 
|---|
|  |  |  | layer.alert("没有查询到业务数据,执行被拒绝!!"); | 
|---|
|  |  |  | alertError("没有查询到业务数据,执行被拒绝!"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 如果是空车称重 | 
|---|
|  |  |  | if (InoutProgress.WEIGHT_EMPTY == recordData.progress) { | 
|---|
|  |  |  | form.val("form-data", { | 
|---|
|  |  |  | emptyWeight: weightDto.weight | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | form.render(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 如果是满车称重 | 
|---|
|  |  |  | if (InoutProgress.WEIGHT_FULL == recordData.progress) { | 
|---|
|  |  |  | form.val("form-data", { | 
|---|
|  |  |  | fullWeight: weightDto.weight | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | form.render(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | form.render(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 点击称重时候自动抓拍数据--增加通知信息 | 
|---|
|  |  |  | layer.msg("系统自动抓拍保留记录……"); | 
|---|
|  |  |  | // 点击称重自动调用抓拍 | 
|---|
|  |  |  | snapData = { | 
|---|
|  |  |  | companyId: companyId, | 
|---|
|  |  |  | deptId: deptId, | 
|---|
|  |  |  | progress: recordData.progress, | 
|---|
|  |  |  | bizType: bizType, | 
|---|
|  |  |  | bizId: recordData.id, | 
|---|
|  |  |  | plateNum: recordData.plateNum, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | id1: (null != snapDto1) ? snapDto1.id : null, | 
|---|
|  |  |  | id2: (null != snapDto2) ? snapDto2.id : null, | 
|---|
|  |  |  | id3: (null != snapDto3) ? snapDto3.id : null, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | id1: snapDto1.id, | 
|---|
|  |  |  | id2: snapDto2.id, | 
|---|
|  |  |  | id3: snapDto3.id, | 
|---|
|  |  |  | sort: $("#scaleName").val(), | 
|---|
|  |  |  | weight: weightDto.weight | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | 
|---|
|  |  |  | success: function (result) { | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | if (result.code != "0000") { | 
|---|
|  |  |  | layer.alert(result.msg); | 
|---|
|  |  |  | alertError(result.msg); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | snapData = result.data; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | error: function () { | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | layer.msg("后台调用截图失败,请重新尝试!!"); | 
|---|
|  |  |  | alertError("后台调用截图失败,请重新尝试"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //入库第二次称重时调用计算方法 | 
|---|
|  |  |  | //如果是第二次称重,默认执行自动计算 | 
|---|
|  |  |  | if (InoutProgress.WEIGHT_EMPTY == recordData.progress) { | 
|---|
|  |  |  | deAutoByIn("emptyWeight"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | flushBtn("btn-weight"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //新的读卡方式 | 
|---|
|  |  |  | //读智慧卡 | 
|---|
|  |  |  | function flushICCard() { | 
|---|
|  |  |  | if(cardDto && cardDto.protocol != "TCP_DEFAULT"){ | 
|---|
|  |  |  | //协议获取 | 
|---|
|  |  |  | flushICCard2(); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | //本地读取 | 
|---|
|  |  |  | if (!cardDto.protocol) { | 
|---|
|  |  |  | flushICCard1(); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | flushICCard2(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * 协议读取智慧卡 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | function flushICCard2() { | 
|---|
|  |  |  | var param = JSON.stringify(cardDto); | 
|---|
|  |  |  | var index = layer.load(); | 
|---|
|  |  |  | var param = JSON.stringify(cardDto); | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | type: "POST", | 
|---|
|  |  |  | url: "../../inout/api/ic-card-num", | 
|---|
|  |  |  | url: "../../inout/api/get-icCard", | 
|---|
|  |  |  | dataType: "json", | 
|---|
|  |  |  | contentType: "application/json;charset=UTF-8", | 
|---|
|  |  |  | data: param, | 
|---|
|  |  |  | success: function (result) { | 
|---|
|  |  |  | if (result.code != "0000") { | 
|---|
|  |  |  | layer.alert(result.msg, { | 
|---|
|  |  |  | offset: ['300px', '300px'] | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | if (result.data.errorMsg) { | 
|---|
|  |  |  | layer.alert(result.data.errorMsg, { | 
|---|
|  |  |  | offset: ['300px', '300px'] | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | $("#intelCard").val(result.data.icCardNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | if (result.code != "0000") { | 
|---|
|  |  |  | alertError(result.msg); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | paramIntelCard = data; | 
|---|
|  |  |  | $("#text-param").text("识别卡号:" + paramIntelCard); | 
|---|
|  |  |  | flushData(paramIntelCard, null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | error: function () { | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | layer.alert("IC卡读取失败!", { | 
|---|
|  |  |  | offset: ['300px', '300px'] | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | alertError("IC卡读取失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | * 本地读取智慧卡 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | function flushICCard1() { | 
|---|
|  |  |  | $("#intelCard").val(null); | 
|---|
|  |  |  | var index = layer.load(); | 
|---|
|  |  |  | $("#text-param").val(null); | 
|---|
|  |  |  | $("#form-data")[0].reset(); | 
|---|
|  |  |  | form.render(); | 
|---|
|  |  |  | recordData = null; | 
|---|
|  |  |  | 
|---|
|  |  |  | jsonp: "callback", | 
|---|
|  |  |  | jsonpCallback: "jsonpCallback", | 
|---|
|  |  |  | success: function (json) { | 
|---|
|  |  |  | //console.log(json); | 
|---|
|  |  |  | var data = json.no; | 
|---|
|  |  |  | //console.log(data); | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | if (data === "not found") { | 
|---|
|  |  |  | layer.alert("请重新读卡!", {offset: ['300px', '300px']}); | 
|---|
|  |  |  | alertError("请重新读卡!"); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | $("#intelCard").val(data); | 
|---|
|  |  |  | flushData(); | 
|---|
|  |  |  | paramIntelCard = data; | 
|---|
|  |  |  | $("#text-param").text("识别卡号:" + paramIntelCard); | 
|---|
|  |  |  | flushData(paramIntelCard, null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | error: function () { | 
|---|
|  |  |  | layer.alert("IC卡读取出错!", {offset: ['300px', '300px']}); | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | alertError("IC卡读取出错!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 使用插件获取省份证 | 
|---|
|  |  |  | // 使用插件获取身份证 | 
|---|
|  |  |  | function flushIdCard() { | 
|---|
|  |  |  | var index = layer.load(); | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | var data = json.content; | 
|---|
|  |  |  | if (data === "not found") { | 
|---|
|  |  |  | layer.alert("没有读取到身份证信息,请手动录入!", { | 
|---|
|  |  |  | offset: ['300px', '300px'] | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | alertError("没有读取到身份证信息!"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | $("#userId").val(data.idNum); | 
|---|
|  |  |  | flushData(); | 
|---|
|  |  |  | paramIdCard = data; | 
|---|
|  |  |  | $("#text-param").text("识别身份证:" + paramIdCard); | 
|---|
|  |  |  | flushData(null, paramIdCard); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | error: function () { | 
|---|
|  |  |  | layer.alert("身份证读取失败,请手动录入!", { | 
|---|
|  |  |  | offset: ['300px', '300px'] | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | alertError("没有读取到身份证信息!"); | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function flushByHand() { | 
|---|
|  |  |  | flushData(null, null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function flushWeight() { | 
|---|
|  |  |  | 
|---|
|  |  |  | // 点击打印,系统判断是否已经执行完成,如果已经完成,直接打印,如果未完成则先执行完成 | 
|---|
|  |  |  | function printBill() { | 
|---|
|  |  |  | if (!recordData) { | 
|---|
|  |  |  | layer.alert("没有获取到业务数据,不支持打印!"); | 
|---|
|  |  |  | alertError("没有获取到业务数据,打印被拒绝!"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 从后台获取模版并打印 | 
|---|
|  |  |  | 
|---|
|  |  |  | // 合并更新當前编辑数据 | 
|---|
|  |  |  | Object.assign(recordData, data); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | printBillStep2(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 点击打印,先执行系统默认执行完成卡回收 | 
|---|
|  |  |  | function printBillStep2() { | 
|---|
|  |  |  | var index = layer.load(); | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | type: "POST", | 
|---|
|  |  |  | url: "../../basic/inout-report/inout-bill-weight", | 
|---|
|  |  |  | url: "../../basic/inout/report/bill-weight", | 
|---|
|  |  |  | dataType: "json", | 
|---|
|  |  |  | contentType: "application/json;charset=UTF-8", | 
|---|
|  |  |  | data: JSON.stringify(recordData), | 
|---|
|  |  |  | success: function (result) { | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | if (result.code != "0000") { | 
|---|
|  |  |  | layer.msg(result.msg); | 
|---|
|  |  |  | alertError(result.msg); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | layer.msg("开始渲染打印单……"); | 
|---|
|  |  |  | if (companyId && companyId == "5016") { | 
|---|
|  |  |  | print5016Weight(result.data); | 
|---|
|  |  |  | console.log("5016"); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | printWeight(result.data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 刷新按钮 | 
|---|
|  |  |  | flushBtn("btn-printBill"); | 
|---|
|  |  |  | printWeight(result.data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | error: function () { | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | layer.msg("获取打印模版失败,请联系管理员查看原因!!"); | 
|---|
|  |  |  | alertError("获取打印模版失败,请联系管理员查看原因"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | form.render(); | 
|---|
|  |  |  | recordData = null; | 
|---|
|  |  |  | weightDto.weight = 0.0; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#weightValue").text("0.0"); | 
|---|
|  |  |  | $("#img_scale_statule").attr("src", "../../static/images/icon-red.png"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //称重可以复用 | 
|---|
|  |  |  | $("#btn-weight").removeClass("layui-btn-disabled"); | 
|---|
|  |  |  | $("#btn-weight").attr("disabled", false); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //空车和满车被重置 | 
|---|
|  |  |  | updateEditAndProgress(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //扣重信息框恢复为可编辑 | 
|---|
|  |  |  | delDisabled(); | 
|---|
|  |  |  | $("#text-param").val(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function flushPage() { | 
|---|
|  |  |  | layer.confirm('确定要刷新页面吗?', {icon: 3, title: '提示'}, function (index) { | 
|---|
|  |  |  | resetForm(); | 
|---|
|  |  |  | layer.msg("页面重置完成,请重新操作……"); | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // --查询方法,获取身份证号、卡号、车牌号,进行查询 | 
|---|
|  |  |  | function flushData() { | 
|---|
|  |  |  | function flushData(intelCard, userIdCard) { | 
|---|
|  |  |  | var index = layer.load(); | 
|---|
|  |  |  | var userId2 = $("#userId").val(); | 
|---|
|  |  |  | var intelCard = $("#intelCard").val(); | 
|---|
|  |  |  | var userIdCard = userIdCard; | 
|---|
|  |  |  | var intelCard = intelCard; | 
|---|
|  |  |  | var plateNum = $("#plateNum").val(); | 
|---|
|  |  |  | var param = { | 
|---|
|  |  |  | type: type, | 
|---|
|  |  |  | progress: progress, | 
|---|
|  |  |  | intelCard: intelCard, | 
|---|
|  |  |  | userId: userId2, | 
|---|
|  |  |  | userId: userIdCard, | 
|---|
|  |  |  | plateNum: plateNum | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | type: "POST", | 
|---|
|  |  |  | url: "../../basic/inout/inout-query", | 
|---|
|  |  |  | 
|---|
|  |  |  | contentType: "application/json;charset=UTF-8", | 
|---|
|  |  |  | data: JSON.stringify(param), | 
|---|
|  |  |  | success: function (result) { | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | if (result.code != "0000") { | 
|---|
|  |  |  | notify(result.msg, result.data); | 
|---|
|  |  |  | notifyProgress(result.msg, result.data); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | recordData = result.data; | 
|---|
|  |  |  | // 返回的数据进行赋值 | 
|---|
|  |  |  | form.val("form-data", recordData); | 
|---|
|  |  |  | form.render(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | updateEditAndProgress(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | error: function () { | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | layer.alert("查询失败,请重新尝试!!"); | 
|---|
|  |  |  | alertError("查询失败,请重新尝试"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 跟新流程说明提心信息 | 
|---|
|  |  |  | * 根据业务数据更新页面中的状态 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | function updateEditAndProgress() { | 
|---|
|  |  |  | if (recordData) { | 
|---|
|  |  |  | if (InoutProgress.WEIGHT_EMPTY == recordData.progress) { | 
|---|
|  |  |  | $("#emptyWeight").removeClass("rkbk-search-input"); | 
|---|
|  |  |  | $("#emptyWeight").attr("disabled", false); | 
|---|
|  |  |  | if (!recordData) return true; | 
|---|
|  |  |  | var curProgress = recordData.progress; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#progress-hand").addClass("active"); | 
|---|
|  |  |  | $("#progress-emptyWeight").addClass("active"); | 
|---|
|  |  |  | //空车称重 | 
|---|
|  |  |  | if (InoutProgress.WEIGHT_EMPTY == curProgress) { | 
|---|
|  |  |  | $("#progress-hand").addClass("active"); | 
|---|
|  |  |  | $("#progress-emptyWeight").addClass("active"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#fullWeight").addClass("rkbk-search-input"); | 
|---|
|  |  |  | $("#fullWeight").attr("disabled", true); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (InoutProgress.WEIGHT_FULL == recordData.progress) { | 
|---|
|  |  |  | $("#fullWeight").removeClass("rkbk-search-input"); | 
|---|
|  |  |  | $("#fullWeight").attr("disabled", false); | 
|---|
|  |  |  | $("#depotIdLabel").removeClass("color-red"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#progress-hand").removeClass("active"); | 
|---|
|  |  |  | $("#progress-emptyWeight").removeClass("active"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#emptyWeight").addClass("rkbk-search-input"); | 
|---|
|  |  |  | $("#emptyWeight").attr("disabled", true); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | $("#fullWeight").addClass("rkbk-search-input"); | 
|---|
|  |  |  | $("#fullWeight").attr("disabled", true); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#emptyWeight").addClass("rkbk-search-input"); | 
|---|
|  |  |  | $("#emptyWeight").attr("disabled", true); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //满车称重 | 
|---|
|  |  |  | if (InoutProgress.WEIGHT_FULL == curProgress) { | 
|---|
|  |  |  | $("#progress-hand").removeClass("active"); | 
|---|
|  |  |  | $("#progress-emptyWeight").removeClass("active"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //根据配置信息设置地磅是否可编辑 | 
|---|
|  |  |  | if (weightEditTag && weightEditTag == 'N') { | 
|---|
|  |  |  | $("#fullWeight").addClass("rkbk-search-input"); | 
|---|
|  |  |  | $("#fullWeight").attr("disabled", true); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#emptyWeight").addClass("rkbk-search-input"); | 
|---|
|  |  |  | $("#emptyWeight").attr("disabled", true); | 
|---|
|  |  |  | //装卸仓库必填 | 
|---|
|  |  |  | $("#depotIdLabel").addClass("color-red"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //设置可编辑 | 
|---|
|  |  |  | if (weightEditTag == 'Y') { | 
|---|
|  |  |  | $("#fullWeight").removeClass("rkbk-search-input"); | 
|---|
|  |  |  | $("#fullWeight").attr("disabled", false); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#emptyWeight").removeClass("rkbk-search-input"); | 
|---|
|  |  |  | $("#emptyWeight").attr("disabled", false); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 当前完成 | 
|---|
|  |  |  | function submit() { | 
|---|
|  |  |  | if (null == recordData) { | 
|---|
|  |  |  | notify("没有数据可以提交", null); | 
|---|
|  |  |  | if (!recordData) { | 
|---|
|  |  |  | alertError("没有业务数据信息,执行被拒绝"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var data = form.val("form-data"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (!data.depotId) { | 
|---|
|  |  |  | notify("装卸仓库必须填写", null); | 
|---|
|  |  |  | alertError("提示:装卸仓库必填"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!data.customerName) { | 
|---|
|  |  |  | alertError("提示:客户名称必填"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 校验-入库满车称重 | 
|---|
|  |  |  | if (InoutProgress.WEIGHT_FULL == recordData.progress) { | 
|---|
|  |  |  | if (data.fullWeight <= 0.0) { | 
|---|
|  |  |  | notify("满车称重信息必填!!", null); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!data.customerName) { | 
|---|
|  |  |  | notify("客户名称必填!!", null); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | if (data.emptyWeight <= 0.0) { | 
|---|
|  |  |  | notify("空车称重信息必填!!", null); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!data.foodVariety) { | 
|---|
|  |  |  | notify("粮食品种必填!!", null); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!data.settleWeight || data.settleWeight <= 0.0) { | 
|---|
|  |  |  | notify("结算重量合规,请核对!!", null); | 
|---|
|  |  |  | alertError("提示:满车称重信息必填"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 合并更新當前编辑数据 | 
|---|
|  |  |  | if (InoutProgress.WEIGHT_EMPTY == recordData.progress) { | 
|---|
|  |  |  | if (data.emptyWeight <= 0.0) { | 
|---|
|  |  |  | alertError("提示:空车称重信息必填"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!data.foodVariety) { | 
|---|
|  |  |  | alertError("提示:粮食品种必填"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (!data.settleWeight || data.settleWeight <= 0.0) { | 
|---|
|  |  |  | alertError("结算重量不合规,请核对"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!data.recordWeight || data.recordWeight <= 0.0) { | 
|---|
|  |  |  | alertError("入库重量不合规,请核对"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //合并数据 | 
|---|
|  |  |  | Object.assign(recordData, data); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 获取照片 | 
|---|
|  |  |  | 
|---|
|  |  |  | var index = layer.load(); | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | type: "POST", | 
|---|
|  |  |  | url: "../../basic/inout/inout-next-step", | 
|---|
|  |  |  | url: "../../basic/inout/submit-weight", | 
|---|
|  |  |  | dataType: "json", | 
|---|
|  |  |  | contentType: "application/json;charset=UTF-8", | 
|---|
|  |  |  | data: JSON.stringify(recordData), | 
|---|
|  |  |  | success: function (result) { | 
|---|
|  |  |  | if (result.code != "0000") { | 
|---|
|  |  |  | notify(result.msg, result.data); | 
|---|
|  |  |  | alertError(result.msg); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | notify("数据提交成功", result.data); | 
|---|
|  |  |  | // 更新按钮显示 | 
|---|
|  |  |  | flushBtn("btn-submit"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | error: function () { | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | notify("提交失败,请重新尝试", null); | 
|---|
|  |  |  | alertError("提交失败,请重新尝试"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //以下逻辑为增加一个语音通知的调用方法,不考虑返回结果--后台调用 | 
|---|
|  |  |  | var curWeight = recordData.fullWeight; | 
|---|
|  |  |  | if (InoutProgress.WEIGHT_EMPTY == recordData.progress) { | 
|---|
|  |  |  | curWeight = recordData.emptyWeight; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var param = { | 
|---|
|  |  |  | sort: $("#scaleName").val(), | 
|---|
|  |  |  | weight: curWeight, | 
|---|
|  |  |  | inoutProgress: recordData.progress, | 
|---|
|  |  |  | deptId: recordData.deptId, | 
|---|
|  |  |  | companyId: recordData.companyId, | 
|---|
|  |  |  | plateNum: recordData.plateNum | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | type: "POST", | 
|---|
|  |  |  | url: "../../inout/api/notice-weight-done", | 
|---|
|  |  |  | dataType: "json", | 
|---|
|  |  |  | contentType: "application/json;charset=UTF-8", | 
|---|
|  |  |  | data: JSON.stringify(param) | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //显示质检信息 | 
|---|
|  |  |  | function showCheck() { | 
|---|
|  |  |  | if (!recordData) { | 
|---|
|  |  |  | alertError("没有业务数据信息,执行被拒绝"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // ---------------------------通知单-开始 -------------------// | 
|---|
|  |  |  | // 弹出往来单位下拉框 | 
|---|
|  |  |  | function showNotice() { | 
|---|
|  |  |  | var index = layer.load(); | 
|---|
|  |  |  | var param = { | 
|---|
|  |  |  | type: type | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | // 渲染往来单位列表 | 
|---|
|  |  |  | table.render({ | 
|---|
|  |  |  | elem: '#tableNotice', | 
|---|
|  |  |  | url: '../../basic/inout/list-notice—in', | 
|---|
|  |  |  | page: false, | 
|---|
|  |  |  | // skin : "nob", | 
|---|
|  |  |  | // size : 'sm', | 
|---|
|  |  |  | even: true, | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | contentType: "application/json;charset=UTF-8", | 
|---|
|  |  |  | cols: [[{ | 
|---|
|  |  |  | field: 'name', | 
|---|
|  |  |  | title: '通知单名称', | 
|---|
|  |  |  | width: '15%' | 
|---|
|  |  |  | },{ | 
|---|
|  |  |  | field: 'customerName', | 
|---|
|  |  |  | title: '送货单位' | 
|---|
|  |  |  | }, { | 
|---|
|  |  |  | field: 'foodVarietyName', | 
|---|
|  |  |  | title: '粮食品种', | 
|---|
|  |  |  | width: '10%' | 
|---|
|  |  |  | }, { | 
|---|
|  |  |  | field: 'year', | 
|---|
|  |  |  | title: '年份', | 
|---|
|  |  |  | width: '8%' | 
|---|
|  |  |  | }, { | 
|---|
|  |  |  | field: 'unitName', | 
|---|
|  |  |  | title: '收货单位' | 
|---|
|  |  |  | }, { | 
|---|
|  |  |  | field: 'contractName', | 
|---|
|  |  |  | title: '所属合同' | 
|---|
|  |  |  | }]], | 
|---|
|  |  |  | where: param, | 
|---|
|  |  |  | parseData: function (res) { | 
|---|
|  |  |  | if ("0000" == res.code) { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | "code": "0", | 
|---|
|  |  |  | "msg": res.msg, | 
|---|
|  |  |  | "data": res.data | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | "code": "1", | 
|---|
|  |  |  | "msg": res.msg | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | done: function (res) { | 
|---|
|  |  |  | layer.close(index); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | // 获取化验项信息 | 
|---|
|  |  |  | flushCheckItem(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //双击显示选中数据 | 
|---|
|  |  |  | table.on('rowDouble(tableNotice)', function (obj) { | 
|---|
|  |  |  | var data = obj.data; | 
|---|
|  |  |  | form.val("form-data", { | 
|---|
|  |  |  | customerId: data.customerId, | 
|---|
|  |  |  | customerName: data.customerName, | 
|---|
|  |  |  | noticeId: data.id | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | // 关闭 | 
|---|
|  |  |  | layer.closeAll(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 弹出对话框 | 
|---|
|  |  |  | layer.open({ | 
|---|
|  |  |  | type: 1, | 
|---|
|  |  |  | offset: ['100px', '250px'], | 
|---|
|  |  |  | title: "入库通知单", | 
|---|
|  |  |  | area: ['900px', '600px'], | 
|---|
|  |  |  | title: "质检详细", | 
|---|
|  |  |  | offset: ['120px', '100px'], | 
|---|
|  |  |  | area: ['1000px', '520px'], | 
|---|
|  |  |  | shade: 0, | 
|---|
|  |  |  | content: $('#listNotice'), | 
|---|
|  |  |  | btn: 0, | 
|---|
|  |  |  | content: $('#checkDetail'), | 
|---|
|  |  |  | btnAlign: 'c', | 
|---|
|  |  |  | btn: ['取消'], | 
|---|
|  |  |  | yes: function () { | 
|---|
|  |  |  | layer.closeAll(); | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // ---------------------------通知单 -结束 -------------------// | 
|---|
|  |  |  | //-------------------------道闸操作--------------------------// | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 刷新化验结果项 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | function flushCheckItem() { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function gateCtrl() { | 
|---|
|  |  |  | layer.open({ | 
|---|
|  |  |  | type: 1, | 
|---|
|  |  |  | title: '设备操作-' + domSelectDevice.attr("name"), | 
|---|
|  |  |  | area: ['450px', '210px'], | 
|---|
|  |  |  | shade: 0, | 
|---|
|  |  |  | content: $('#control-gate'), | 
|---|
|  |  |  | btn: 0, | 
|---|
|  |  |  | closeBtn: 2 | 
|---|
|  |  |  | 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 controlGate(targetStatus){ | 
|---|
|  |  |  | if(gateDto){ | 
|---|
|  |  |  | var data = {"companyId":companyId | 
|---|
|  |  |  | ,"deptId":deptId | 
|---|
|  |  |  | ,"bizType":type | 
|---|
|  |  |  | ,"confId":gateDto.id | 
|---|
|  |  |  | ,"targetStatus":targetStatus | 
|---|
|  |  |  | ,"sort":gateDto.sort | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | type: "POST", | 
|---|
|  |  |  | url: "../../basic/inout/gate-ctrl", | 
|---|
|  |  |  | dataType: "json", | 
|---|
|  |  |  | contentType: "application/json;charset=UTF-8", | 
|---|
|  |  |  | data: JSON.stringify(data), | 
|---|
|  |  |  | success: function (result) { | 
|---|
|  |  |  | if (result.code != "0000") { | 
|---|
|  |  |  | layer.msg("操作失败:"+result.msg); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | layer.msg("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | error: function () { | 
|---|
|  |  |  | layer.alert("操作失败,请重新尝试!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | layer.msg("没有获取到设备!"); | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 弹出提醒框 | 
|---|
|  |  |  | * @param msg 提醒信息 | 
|---|
|  |  |  | * @param data 数据信息,可能为空 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | function notify(msg, data) { | 
|---|
|  |  |  | if (data) { | 
|---|
|  |  |  | //赋值 | 
|---|
|  |  |  | $("#resultMsg").text(msg); | 
|---|
|  |  |  | $("#resultUserName").text(data.userName); | 
|---|
|  |  |  | $("#resultPlateNum").text(data.plateNum); | 
|---|
|  |  |  | if ("IN" == data.type) { | 
|---|
|  |  |  | $("#resultType").text("入库-" + INOUT_PROGRESS_MSG(data.progress)); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | $("#resultType").text("出库-" + INOUT_PROGRESS_MSG(data.progress)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | $("#resultIntelCard").text(data.intelCard); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | layer.open({ | 
|---|
|  |  |  | type: 1, | 
|---|
|  |  |  | offset: ['150px', '200px'], | 
|---|
|  |  |  | area: '450px;', | 
|---|
|  |  |  | shade: 0.8, | 
|---|
|  |  |  | id: 'dialog_notify_info', | 
|---|
|  |  |  | btn: ['确定'], | 
|---|
|  |  |  | content: $('#dialog-from-notify'), | 
|---|
|  |  |  | yes: function (index) { | 
|---|
|  |  |  | layer.closeAll(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | layer.alert(msg, {offset: ['300px', '300px']}); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //-------------------------道闸操作--------------------------// | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 渲染表格 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | 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" | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|