| | |
| | | //当前节点 入库质检 |
| | | var layer; |
| | | var laydate; |
| | | var form; |
| | | var table; |
| | | var page = 1; |
| | |
| | | layer = layui.layer; |
| | | form = layui.form; |
| | | table = layui.table; |
| | | var laydate = layui.laydate; |
| | | laydate = layui.laydate; |
| | | |
| | | laydate.render({ |
| | | elem: '#start', |
| | |
| | | }); |
| | | |
| | | laydate.render({ |
| | | elem: '#foodYear', |
| | | elem: '#checkTime', |
| | | theme: '#7b8e9f', |
| | | type: 'year', |
| | | format: 'yyyy-MM-dd HH:mm:ss', |
| | | type: 'datetime' |
| | | }); |
| | | |
| | | // 初始化表单数据 |
| | |
| | | |
| | | function showDetail(obj) { |
| | | curCheckData = obj.data; |
| | | // console.log(curCheckData); |
| | | |
| | | curCheckData.foodYear = dateFtt("yyyy", new Date()); |
| | | curSampleData = obj.data; |
| | | if(!curCheckData.checkTime){ |
| | | curCheckData.checkTime = dateFtt("yyyy-MM-dd HH:mm:ss", new Date()); |
| | | } |
| | | curCheckData.checkUser = checkUser; |
| | | if (curCheckData.checkStatus == "NONE") { |
| | | //隐藏车牌部分信息 |
| | |
| | | layer.open({ |
| | | type: 1, |
| | | title: "化验单明细", |
| | | area: ['1400px', '650px'], |
| | | area: ['1400px', '700px'], |
| | | shade: 0, |
| | | content: $('#checkDetail'), |
| | | btnAlign: 'c', |
| | |
| | | |
| | | // 获取化验项信息 |
| | | flushCheckItem(null); |
| | | }; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 刷新化验结果项 |
| | |
| | | function flushCheckItem(foodVariety) { |
| | | curCheckItems = null; |
| | | $("#check-result-tip").text("检验结果:#"); |
| | | $("#price-result-tip").text("粮食单价:#元/公斤"); |
| | | curCheckData.foodVariety = foodVariety; |
| | | |
| | | var index = layer.load(); |
| | |
| | | } |
| | | }); |
| | | if (msg) { |
| | | $("#check-result-tip").text("检验结果:" + msg); |
| | | $("#check-result-tip").text("检验结果:" + msg + ";粮食单价:#元/公斤"); |
| | | } else { |
| | | $("#check-result-tip").text("检验结果:合格"); |
| | | $("#check-result-tip").text("检验结果:合格" + ";粮食单价:#元/公斤"); |
| | | } |
| | | }; |
| | | |
| | |
| | | even: true, |
| | | cols: [[{ |
| | | field: 'standardName', |
| | | title: '化验项目', |
| | | title: '检验项目', |
| | | align: 'center', |
| | | width: '20%' |
| | | width: '10%' |
| | | }, { |
| | | field: 'value', |
| | | title: '化验结果', |
| | | title: '检验值', |
| | | align: 'center', |
| | | width: '20%', |
| | | width: '10%', |
| | | edit: 'text' |
| | | }, { |
| | | field: 'operaSymbol', |
| | | title: '标准值', |
| | | align: 'center', |
| | | width: '10%' |
| | | }, { |
| | | field: 'unit', |
| | | title: '单位', |
| | | align: 'center', |
| | | width: '10%' |
| | | }, { |
| | | field: 'standardValue', |
| | | title: '化验标准', |
| | | field: 'deNum', |
| | | title: '扣重', |
| | | align: 'center', |
| | | width: '15%' |
| | | width: '10%', |
| | | edit: 'text' |
| | | }, { |
| | | field: 'addNum', |
| | | title: '增重', |
| | | align: 'center', |
| | | width: '10%', |
| | | edit: 'text' |
| | | }, { |
| | | field: 'dePrice', |
| | | title: '扣价', |
| | | align: 'center', |
| | | width: '10%', |
| | | edit: 'text' |
| | | }, { |
| | | field: 'addPrice', |
| | | title: '增价', |
| | | align: 'center', |
| | | width: '10%', |
| | | edit: 'text' |
| | | }, { |
| | | field: 'result', |
| | | title: '检验结果', |
| | | align: 'center', |
| | | width: '10%', |
| | | edit: 'text' |
| | | }, { |
| | | field: 'remarks', |
| | | title: '说 明', |
| | | title: '备注说明', |
| | | align: 'center', |
| | | edit: 'text' |
| | | }]] |
| | |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../basic/inout/update-check", |
| | | url: "../../basic/inout/update-check1", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(curCheckData), |
| | |
| | | contentType: "application/json;charset=UTF-8", |
| | | cols: [[{ |
| | | field: 'checkId', |
| | | title: '检验单号', |
| | | width: '13%', |
| | | title: '质检单号', |
| | | width: '10%', |
| | | style: 'color: #f67d06;font-weight: bold' |
| | | }, { |
| | | field: 'plateNum', |
| | | title: '车船号', |
| | | width: '11%', |
| | | style: 'font-weight: bold', |
| | | field: 'registerTime', |
| | | title: '登记时间', |
| | | width: '15%', |
| | | style: 'font-weight: bold' |
| | | }, { |
| | | field: 'sampleStatus', |
| | | title: '是否扦样', |
| | | width: '10%', |
| | | templet: function (item) { |
| | | if (item.checkStatus != "NONE") { |
| | | return item.plateNum; |
| | | } else { |
| | | var result = replaceStr(item.plateNum); |
| | | return result == null ? "" : result; |
| | | if (item.sampleStatus == null) { |
| | | return "未扦样"; |
| | | } |
| | | if (item.sampleStatus == 'NONE') { |
| | | return "未扦样"; |
| | | } |
| | | if (item.sampleStatus == 'SAMPLE') { |
| | | return "已扦样"; |
| | | } |
| | | } |
| | | }, { |
| | | field: 'customerName', |
| | | title: '往来单位', |
| | | templet: function (item) { |
| | | if (item.checkStatus != "NONE") { |
| | | return item.customerName; |
| | | } else { |
| | | var result = replaceStr(item.customerName); |
| | | return result == null ? "" : result; |
| | | } |
| | | } |
| | | field: 'sampleUser', |
| | | title: '扦样人', |
| | | width: '10%', |
| | | style: 'font-weight: bold' |
| | | }, { |
| | | field: 'sampleTime', |
| | | title: '扦样时间', |
| | | width: '15%', |
| | | style: 'font-weight: bold' |
| | | }, { |
| | | field: 'foodVariety', |
| | | title: '粮食品种', |
| | | width: '10%', |
| | | width: '11%', |
| | | templet: function (item) { |
| | | var result = item.foodVariety; |
| | | $.each(listFoodVariety, function (index, data) { |
| | |
| | | }, { |
| | | field: 'depotId', |
| | | title: '装卸仓库', |
| | | width: '10%', |
| | | width: '11%', |
| | | templet: function (item) { |
| | | var result = item.depotId; |
| | | $.each(listDepot, function (index, data) { |
| | |
| | | }, { |
| | | field: 'checkStatus', |
| | | title: '检验结果', |
| | | width: '10%', |
| | | style: 'font-weight: bold', |
| | | templet: function (item) { |
| | | if (item.checkStatus == 'NONE') { |
| | |
| | | return item.checkStatus == null ? "" : item.checkStatus; |
| | | } |
| | | }, { |
| | | field: 'registerTime', |
| | | title: '登记时间', |
| | | width: '14%' |
| | | }, { |
| | | field: '', |
| | | title: '操作', |
| | | width: '9%', |
| | | width: '8%', |
| | | toolbar: "#barControl" |
| | | }]], |
| | | where: param, |