| | |
| | | upload.render({ |
| | | elem: '#kccz-r-btn1', |
| | | url: '../file/update-file', //上传接口 |
| | | size: 4*1024, //限制文件大小,单位KB, 最大上传4MB |
| | | size: 4 * 1024, //限制文件大小,单位KB, 最大上传4MB |
| | | accept: 'images', |
| | | before: function (obj) { |
| | | var plateNum = $("#plateNum").val(); |
| | | this.data={"plateNum":plateNum}; //携带参数 |
| | | this.data = {"plateNum": plateNum}; //携带参数 |
| | | //预读本地文件示例,不支持ie8 |
| | | obj.preview(function (index, file, result) { |
| | | $('#kccz-r-img1').attr('src', result); //图片链接(base64) |
| | |
| | | upload.render({ |
| | | elem: '#kccz-r-btn2', |
| | | url: '../file/update-file', //上传接口 |
| | | size: 4*1024, //限制文件大小,单位KB, 最大上传4MB |
| | | size: 4 * 1024, //限制文件大小,单位KB, 最大上传4MB |
| | | accept: 'images', |
| | | before: function (obj) { |
| | | var plateNum = $("#plateNum").val(); |
| | | this.data={"plateNum":plateNum}; //携带参数 |
| | | this.data = {"plateNum": plateNum}; //携带参数 |
| | | //预读本地文件示例,不支持ie8 |
| | | obj.preview(function (index, file, result) { |
| | | $('#kccz-r-img2').attr('src', result); //图片链接(base64) |
| | |
| | | upload.render({ |
| | | elem: '#kccz-r-btn3', |
| | | url: '../file/update-file', //上传接口 |
| | | size: 4*1024, //限制文件大小,单位KB, 最大上传4MB |
| | | size: 4 * 1024, //限制文件大小,单位KB, 最大上传4MB |
| | | accept: 'images', |
| | | before: function (obj) { |
| | | var plateNum = $("#plateNum").val(); |
| | | this.data={"plateNum":plateNum}; //携带参数 |
| | | this.data = {"plateNum": plateNum}; //携带参数 |
| | | //预读本地文件示例,不支持ie8 |
| | | obj.preview(function (index, file, result) { |
| | | $('#kccz-r-img3').attr('src', result); //图片链接(base64) |
| | |
| | | }); |
| | | |
| | | showProgress(); |
| | | |
| | | // 监听重量变化 |
| | | $(".weight").blur(function () { |
| | | deAutoByHandle(this.name) |
| | | }); |
| | | //调整字段不编辑 |
| | | $("#depotId").attr("disabled",true); |
| | | $("#foodVariety").attr("disabled",true); |
| | | $("#foodLevel").attr("disabled",true); |
| | | $("#depotId").attr("disabled", true); |
| | | $("#foodVariety").attr("disabled", true); |
| | | // $("#foodLevel").attr("disabled", true); |
| | | }); |
| | | |
| | | |
| | | //控制流程环节显示 |
| | | function showProgress() { |
| | | if(!inoutProgress){ |
| | | if (!inoutProgress) { |
| | | return; |
| | | } |
| | | |
| | | if(inoutProgress.indexOf("REGISTER") == -1){ |
| | | if (inoutProgress.indexOf("REGISTER") == -1) { |
| | | $("#progress-register").css("display", "none"); |
| | | } |
| | | if(inoutProgress.indexOf("WEIGHT_FULL") == -1){ |
| | | if (inoutProgress.indexOf("WEIGHT_FULL") == -1) { |
| | | $("#progress-fullWeight").css("display", "none"); |
| | | } |
| | | if(inoutProgress.indexOf("HANDLE") == -1){ |
| | | if (inoutProgress.indexOf("HANDLE") == -1) { |
| | | $("#progress-hand").css("display", "none"); |
| | | } |
| | | if(inoutProgress.indexOf("WEIGHT_EMPTY") == -1){ |
| | | if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) { |
| | | $("#progress-emptyWeight").css("display", "none"); |
| | | } |
| | | if(inoutProgress.indexOf("CARD_BACK") == -1){ |
| | | if (inoutProgress.indexOf("CARD_BACK") == -1) { |
| | | $("#progress-cardBack").css("display", "none"); |
| | | } |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | function flushPage() { |
| | | layer.confirm('确定要刷新页面吗?', {icon: 3, title: '提示'}, function (index) { |
| | | resetForm(); |
| | | layer.close(index); |
| | | }); |
| | | } |
| | | |
| | | // 表单清空 |
| | | function resetForm() { |
| | | $("#form-data")[0].reset(); |
| | |
| | | $('#kccz-r-img3').removeAttr('src'); |
| | | form.render(); |
| | | recordData = null; |
| | | $("#text-param").val(null); |
| | | } |
| | | |
| | | // 更新数据信息 |
| | |
| | | var param = { |
| | | type: type, |
| | | progress: progress, |
| | | userId:userId2, |
| | | intelCard:intelCard, |
| | | userId: userId2, |
| | | intelCard: intelCard, |
| | | plateNum: plateNum |
| | | }; |
| | | var index = layer.load(); |
| | |
| | | data: JSON.stringify(param), |
| | | success: function (result) { |
| | | if (result.code != "0000") { |
| | | notify(result.msg,result.data); |
| | | notify(result.msg, result.data); |
| | | } else { |
| | | recordData = result.data; |
| | | // 返回的数据进行赋值 |
| | |
| | | |
| | | // 当前完成 |
| | | function submit() { |
| | | if (null == recordData) { |
| | | if (!recordData) { |
| | | layer.alert("没有数据可以提交!!!"); |
| | | return; |
| | | } |
| | |
| | | |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../../basic/inout/inout-next-step", |
| | | url: "../../basic/inout/submit-handle", |
| | | dataType: "json", |
| | | contentType: "application/json;charset=UTF-8", |
| | | data: JSON.stringify(recordData), |
| | | success: function (result) { |
| | | if (result.code != "0000") { |
| | | notify(result.msg,result.data); |
| | | notify(result.msg, result.data); |
| | | } else { |
| | | notify("值仓完成",result.data); |
| | | notify("值仓完成", result.data); |
| | | // 重置页面 |
| | | resetForm(); |
| | | } |
| | |
| | | }, |
| | | error: function () { |
| | | layer.close(index); |
| | | notify("提交失败,请重新尝试",null); |
| | | notify("提交失败,请重新尝试", null); |
| | | } |
| | | }); |
| | | } |