| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057 |
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <%
- String path = request.getContextPath();
- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
-
- <%-- <base href="<%=basePath%>"> --%>
-
- <title>修改气瓶信息</title>
-
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="cache-control" content="no-cache">
- <meta http-equiv="expires" content="0">
- <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
- <meta http-equiv="description" content="This is my page">
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta http-equiv="X-UA-Compatible" content="IE=10"/>
- <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
- <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
- <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
- <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
- <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
- <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
- <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
- <!-- <script type="text/javascript" src="js/tool.js"></script> -->
- <script type="text/javascript" src="js/beforeDatagrid.js"></script>
-
- <script type="text/javascript">
- function isNull(exp){
- if(!exp || typeof exp=="undefined" || exp.length==0){
- return true;
- }else{
- return false;
- }
- }
- function confirm(okStr,cancelStr,tip,content,unitNo){
- $.messager.defaults = { ok: okStr, cancel: cancelStr };
- $.messager.confirm(tip, content,function (data) {
- if (data) {
-
- }else {
- if(isNull(unitNo)){
- showMsg("提示", "未获取到此单位的编号,操作失败!", 5000);
- }else{
- $.ajax({
- type: 'POST',
- url: "updateUnitTip",
- data: {
- "unitNo":unitNo
- },
- dataType:'text',
- success: function (data) {
- var pData = $.parseJSON(data);
- switch (pData.result) {
- case 0:
- showMsg("提示","操作失败",5000);
- break;
- case 1:
- showMsg("提示","操作成功",2000);
- break;
-
-
- }
-
- }
- });
- }
-
- }
- });
- }
- function showMsg(title,msg,out){
- $.messager.show({
- title: title,
- msg: msg,
- timeout:out
- });
- }
- function showProgress(title,msg,text){
- $.messager.progress({
- title: title,
- msg: msg,
- text: text
- });
- }
- function checkedbox(name){
- var arr=new Array();
- var checkbox=document.getElementsByName(name);
- for(var i=0;i<checkbox.length;i++){
- if(checkbox[i].checked==true){
- arr.push(checkbox[i].value);
- }
- }
- return arr;
- }
- function getCheckTree(id){
- var nodes = $("#"+id).tree('getChecked', ['checked']);
- var arr=new Array();
- for(var i=0; i<nodes.length; i++){
- if(nodes[i].checked==true){
- if(nodes[i].id.length==1){
- arr.push("0"+nodes[i].id);
- }else if(nodes[i].id.length==2){
- arr.push(nodes[i].id+"0000");
- }else if(nodes[i].id.length==4){
- arr.push(nodes[i].id+"00");
- }else{
- arr.push(nodes[i].id);
- }
-
- }
- }
- return arr;
- }
- function getCheckTreeName(id){
- var nodes = $("#"+id).tree('getChecked', ['checked']);
- var arr=new Array();
- for(var i=0; i<nodes.length; i++){
- if(nodes[i].checked==true){
- arr.push(nodes[i].text);
- }
- }
- return arr;
- }
- function isCarNo(str) {//验证车牌号
-
- return /(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]{1}[A-Z0-9]{6}$)|(^[A-Z]{2}[A-Z0-9]{2}[A-Z0-9\u4E00-\u9FA5]{1}[A-Z0-9]{4}$)|(^[\u4E00-\u9FA5]{1}[A-Z0-9]{5}[挂学警军港澳]{1}$)|(^[A-Z]{2}[0-9]{5}$)|(^(08|38){1}[A-Z0-9]{4}[A-Z0-9挂学警军港澳]{1}$)/.test(str);
- //return /(^[\u4E00-\u9FA5]{1}[A-Z0-9]{6}$)|(^[A-Z]{2}[A-Z0-9]{2}[A-Z0-9\u4E00-\u9FA5]{1}[A-Z0-9]{4}$)|(^[\u4E00-\u9FA5]{1}[A-Z0-9]{5}[挂学警军港澳]{1}$)|(^[A-Z]{2}[0-9]{5}$)|(^(08|38){1}[A-Z0-9]{4}[A-Z0-9挂学警军港澳]{1}$)/.test(str);
- }
- function isCarNo1(str){
- return /(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$)/.test(str);
- }
- /**
- * 获取上一个月
- *
- * @date 格式为yyyy-mm-dd的日期,如:2014-01-25
- */
- function getPreMonth(date) {
- var arr = date.split('-');
- var year = arr[0]; //获取当前日期的年份
- var month = arr[1]; //获取当前日期的月份
- var day = arr[2]; //获取当前日期的日
- var days = new Date(year, month, 0);
- days = days.getDate(); //获取当前日期中月的天数
- var year2 = year;
- var month2 = parseInt(month) - 1;
- if (month2 == 0) {//如果是1月份,则取上一年的12月份
- year2 = parseInt(year2) - 1;
- month2 = 12;
- }
- var day2 = day;
- var days2 = new Date(year2, month2, 0);
- days2 = days2.getDate();
- if (day2 > days2) {//如果原来日期大于上一月的日期,则取当月的最大日期。比如3月的30日,在2月中没有30
- day2 = days2;
- }
- if (month2 < 10) {
- month2 = '0' + month2;//月份填补成2位。
- }
- var date11 = new Date();
- var hor = date11.getHours()>9?date11.getHours():"0"+date11.getHours();
- var min = date11.getMinutes()>9?date11.getMinutes():"0"+date11.getMinutes();
-
- var sec = date11.getSeconds()>9?date11.getSeconds():"0"+date11.getSeconds();
-
- var t2 = year2 + '-' + month2 + '-' + day2+" "+hor+":"+min+":"+sec;
- return t2;
- }
- /**
- * 获取上一个月
- *
- * @date 格式为yyyy-mm-dd的日期,如:2014-01-25
- */
- function getPreMonth1(date) {
- var arr = date.split('-');
- var year = arr[0]; //获取当前日期的年份
- var month = arr[1]; //获取当前日期的月份
- var day = arr[2]; //获取当前日期的日
- var days = new Date(year, month, 0);
- days = days.getDate(); //获取当前日期中月的天数
- var year2 = year;
- var month2 = parseInt(month) - 1;
- if (month2 == 0) {//如果是1月份,则取上一年的12月份
- year2 = parseInt(year2) - 1;
- month2 = 12;
- }
- var day2 = day;
- var days2 = new Date(year2, month2, 0);
- days2 = days2.getDate();
- if (day2 > days2) {//如果原来日期大于上一月的日期,则取当月的最大日期。比如3月的30日,在2月中没有30
- day2 = days2;
- }
- if (month2 < 10) {
- month2 = '0' + month2;//月份填补成2位。
- }
- var hor = "00";
- var min = "00";
- var sec = "00";
- var t2 = year2 + '-' + month2 + '-' + day2+" "+hor+":"+min+":"+sec;
- return t2;
- }
- function getPreMonth2(date) {
- var arr = date.split('-');
- var year = arr[0]; //获取当前日期的年份
- var month = arr[1]; //获取当前日期的月份
- var day = arr[2]; //获取当前日期的日
- var days = new Date(year, month, 0);
- days = days.getDate(); //获取当前日期中月的天数
- var year2 = year;
- var month2 = parseInt(month) - 1;
- if (month2 == 0) {//如果是1月份,则取上一年的12月份
- year2 = parseInt(year2) - 1;
- month2 = 12;
- }
- var day2 = day;
- var days2 = new Date(year2, month2, 0);
- days2 = days2.getDate();
- if (day2 > days2) {//如果原来日期大于上一月的日期,则取当月的最大日期。比如3月的30日,在2月中没有30
- day2 = days2;
- }
- if (month2 < 10) {
- month2 = '0' + month2;//月份填补成2位。
- }
- var hor = "00";
- var min = "00";
- var sec = "00";
- day2 = "01";
- var t2 = year2 + '-' + month2 + '-' + day2+" "+hor+":"+min+":"+sec;
- return t2;
- }
- function getNowDay(date) {
- var arr = date.split('-');
- var year = arr[0]; //获取当前日期的年份
- var month = arr[1]; //获取当前日期的月份
- var day = arr[2]; //获取当前日期的日
- var days = new Date(year, month, 0);
- days = days.getDate(); //获取当前日期中月的天数
- var year2 = year;
- var month2 = parseInt(month) - 0;
- if (month2 == 0) {//如果是1月份,则取上一年的12月份
- year2 = parseInt(year2) - 1;
- month2 = 12;
- }
- var day2 = day;
- var days2 = new Date(year2, month2, 0);
- days2 = days2.getDate();
- if (day2 > days2) {//如果原来日期大于上一月的日期,则取当月的最大日期。比如3月的30日,在2月中没有30
- day2 = days2;
- }
- if (month2 < 10) {
- month2 = '0' + month2;//月份填补成2位。
- }
- var date11 = new Date();
- var hor = date11.getHours()>9?date11.getHours():"0"+date11.getHours();
- var min = date11.getMinutes()>9?date11.getMinutes():"0"+date11.getMinutes();
-
- var sec = date11.getSeconds()>9?date11.getSeconds():"0"+date11.getSeconds();
-
- var t2 = year2 + '-' + month2 + '-' + day2;
- return t2;
- }
- function getBeforeDate(number) {
- const num = number;
- const date = new Date();
- let year = date.getFullYear();
- let mon = date.getMonth() + 1;
- let day = date.getDate();
- if (day <= num) {
- if (mon > 1) {
- mon = mon - 1;
- } else {
- year = year - 1;
- mon = 12;
- }
- }
- date.setDate(date.getDate() - num);
- year = date.getFullYear();
- mon = date.getMonth() + 1;
- day = date.getDate();
- const s = year + '-' + (mon < 10 ? ('0' + mon) : mon) + '-' + (day < 10 ? ('0' + day) : day);
- return s;
- }
- function compareDate(date1,date2){
- var oDate1 = new Date(date1);
- var oDate2 = new Date(date2);
- if(oDate1.getTime() >= oDate2.getTime()){
- return true;
- } else {
- return false;
- }
- }
- function fnKeyUp(){
- this.value=this.value.toUpperCase();
- }
- function getDateAA(aa,dat){
- // var date1 = new Date(),
- // time1=date1.getFullYear()+"-"+(date1.getMonth()+1)+"-"+date1.getDate();//time1表示当前时间
- var date2 = new Date(dat);
- date2.setDate(date2.getDate()+aa);
- var time2 = date2.getFullYear()+"-"+(date2.getMonth()+1)+"-"+date2.getDate();
- return time2;
- }
- /**
- * 加密(需要先加载aes.min.js文件)
- * @param word
- * @returns {*}
- */
- function aesMinEncrypt(word){
- var _word = CryptoJS.enc.Utf8.parse(word),
- _key = CryptoJS.enc.Utf8.parse("hizimahzb2021Key"),
- _iv = CryptoJS.enc.Utf8.parse("hizimahzb2Key_Iv");
- var encrypted = CryptoJS.AES.encrypt(_word, _key, {
- iv: _iv,
- mode: CryptoJS.mode.CBC,
- padding: CryptoJS.pad.Pkcs7
- });
- return encrypted.toString();
- }
- /**
- * 解密(需要先加载aes.min.js文件)
- * @param word
- * @returns {*}
- */
- function aesDecrypt(word) {
- var _key = CryptoJS.enc.Utf8.parse("hizimahzb2021Key"),
- _iv = CryptoJS.enc.Utf8.parse("hizimahzb2Key_Iv");
- var decrypted = CryptoJS.AES.decrypt(word, _key, {
- iv: _iv,
- mode: CryptoJS.mode.CBC,
- padding: CryptoJS.pad.Pkcs7
- });
- return decrypted.toString(CryptoJS.enc.Utf8);
- }
-
-
- function addstr(ps){
- if(ps.length<16){
- ps = ps.padEnd(16, '0');
- }else if(ps.length>16&&ps.length>32){
- ps = ps.padEnd(32, '0');
- }else if(ps.length>32&&ps.length>48){
- ps = ps.padEnd(48, '0');
- }else if(ps.length>48&&ps.length>60){
- ps = ps.padEnd(60, '0');
- }
-
- return ps;
- }
-
- function encrypt(word){
- //这里传入自己定义的密钥,后端解密时也需要使用一样的密钥
- var key = CryptoJS.enc.Utf8.parse("abcdeabcde123456");
- var srcs = CryptoJS.enc.Utf8.parse(word);
- var encrypted = CryptoJS.AES.encrypt(srcs, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
- return encrypted.toString();
- }
- </script>
-
- <style type="text/css">
- table tr td{
- font-size: 16px;
- }
- .tdclass{
- padding-left: 20px;
- font-size: 12px;
- }
- .tdclass1{
- font-size: 12px;
- }
- .colorRed{
- color: red;
- }
- .radiusDiv{
-
- margin-top: 0px;
- }
- .cylinderInput{
- width: 150px;
- }
- </style>
- <script type="text/javascript">
- var cylinderEdit = true;
- var selectedCityId="00";
- function getNowFormatDate() {
- var date = new Date();
- var seperator1 = "-";
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var strDate = date.getDate();
- if (month >= 1 && month <= 9) {
- month = "0" + month;
- }
- if (strDate >= 0 && strDate <= 9) {
- strDate = "0" + strDate;
- }
- var currentdate = year + seperator1 + month + seperator1 + strDate;
- return currentdate;
- }
- window.onload = function() {
- var currentLoign = '<%=session.getAttribute("openid")%>';
- if(currentLoign&¤tLoign!="null"){
-
- }else{
- //window.location.replace('jsp/login/loginre.jsp' + window.location.search);
- }
- carGuid ='<%=request.getParameter("carGuid")%>';
- document.getElementById("carGuid").value = carGuid;
- document.getElementById("carNo").value = '<%=request.getParameter("carNo")%>';
- //document.getElementById("gettedCarNo").innerText = '<%=request.getParameter("carNo")%>';
- document.getElementById("cylinderinfotip").innerHTML="修改"+'<%=request.getParameter("carNo")%>'+"的气瓶信息";
- loadData(carGuid,1,100);
- }
- function compareDate(date1,date2){
- var oDate1 = new Date(date1);
- var oDate2 = new Date(date2);
- if(oDate1.getTime() >= oDate2.getTime()){
- return true;
- } else {
- return false;
- }
- }
- var installNum=0;
- var operType123=0;
- var carType=0;
- var installStationNo1="";
- var installStationNo2="";
- var installStationNo3="";
- var installStationNo4="";
- var installStationNo5="";
- var installStationNo6="";
- var installStationNo7="";
- var installStationNo8="";
- var examineCy=0;
- function loadData(carGuid,page,size){
- examineCy=0;
- installStationNo1="";
- installStationNo2="";
- installStationNo3="";
- installStationNo4="";
- installStationNo5="";
- installStationNo6="";
- installStationNo7="";
- installStationNo8="";
- showProgress('提示','请等待','请求源数据中……');
- $.ajax({
- type: 'POST',
- url: "ajax/getCylinderInfo",
- data: {
- "carGuid":carGuid,
- "page":page,
- "size":size
- },
- dataType:'text',
- success: function (data) {
- $.messager.progress('close');
- var vData = $.parseJSON(data);
- //installNum='<%=request.getParameter("installNum") %>';
- installNum = vData.installNum;
- for(var i=1;i<=installNum;i++){
- if(i==installNum){
- addCylinder(i,1);
- }else{
- addCylinder(i,0);
- }
- }
-
- $.each(vData.rows, function(i,item){
- //alert(item.carGuid);
- if(i>=installNum) return;
- if(item.cylinderGuid){
- operType123=1;
- }
- var j=i+1;
- carType = item.plateType;
- document.getElementById("cylinderGuid"+j).value=item.cylinderGuid;
- //第一行
- $("#cylinderNo"+j).textbox('setValue',item.cylinderNo);
- $("#cylinderType"+j).combobox('select', item.cylinderType);
- $("#manufacturer"+j).combobox('select', item.productNo);
- $("#productLicense"+j).textbox('setValue',item.productLicence);
- $("#productDate"+j).datebox('setValue',item.productDate1);
- //$("#installUnit"+j).combobox('select', item.installStationNo);
- switch(j){
- case 1:installStationNo1=item.installStationNo;break;
- case 2:installStationNo2=item.installStationNo;break;
- case 3:installStationNo3=item.installStationNo;break;
- case 4:installStationNo4=item.installStationNo;break;
- case 5:installStationNo5=item.installStationNo;break;
- case 6:installStationNo6=item.installStationNo;break;
- case 7:installStationNo7=item.installStationNo;break;
- case 8:installStationNo8=item.installStationNo;break;
-
- }
- //第二行
- $("#installLicense"+j).textbox('setValue',item.installLicence);
- $("#installCert"+j).textbox('setValue',item.installCert);
- $("#installType"+j).combobox('select', item.installType);
-
- if(item.installLoc){
- if(item.installLoc=="后备箱"){
- $("#installLocation"+j).combobox('select', 0);
- }else if(item.installLoc=="底部"){
- $("#installLocation"+j).combobox('select', 1);
- }else if(item.installLoc=="顶部"){
- $("#installLocation"+j).combobox('select', 2);
- }else if(item.installLoc=="货厢"){
- $("#installLocation"+j).combobox('select', 3);
- }else if(item.installLoc=="中部"){
- $("#installLocation"+j).combobox('select', 4);
- }
- }
-
- $("#installOper"+j).textbox('setValue',item.installWorkerName);
- //第三行
- $("#thirdInstall"+j).textbox('setValue',item.thirdPartyIntall);
- if(item.installDate1){
- $("#refitDate"+j).datebox('setValue',item.installDate1);
- }
- if(item.startUseDate1){
- $("#firstUseCK"+j).prop("checked", true);
- $("#firstUseDate"+j).datebox('setValue', item.startUseDate1);
- }
- if(item.nextCheckDate1){
- $("#nextCheckCK"+j).prop("checked", true);
- $("#nextCheckDate"+j).datebox('setValue', item.nextCheckDate1);
- }
- $("#vol"+j).textbox('setValue', item.vol);
- $("#yearLimit"+j).textbox('setValue',item.yearLimit==0?"不限制":item.yearLimit);
- //第四行
- $("#count"+j).textbox('setValue',item.timesAvailable==0?"不限制":item.timesAvailable);
- $("#productType"+j).textbox('setValue',item.productType);
- $("#weight"+j).textbox('setValue', item.weight);
- $("#wall"+j).textbox('setValue', item.thickness);
- $("#vol"+j).textbox('setValue', item.vol);
- $("#press"+j).textbox('setValue',item.press);
-
- //第五行
- $("#material"+j).textbox('setValue',item.material);
- $("#fibre"+j).textbox('setValue',item.fibre);
- $("#resin"+j).textbox('setValue', item.resin);
- $("#deviceCode"+j).textbox('setValue', item.EQUIPMENTNO);
- $("#mechanism1"+j).textbox('setValue', item.PRODUCTMONITOR);
- $("#mechanism2"+j).textbox('setValue',item.TYPETEST);
-
- //第六行
- $("#valveManufacturer"+j).textbox('setValue',item.VALVEPRODUCT);
- $("#valveModel"+j).textbox('setValue',item.VALVETYPE);
- $("#valveBatch"+j).textbox('setValue', item.VALVETYPE);
- $("#designUnit"+j).textbox('setValue', item.DESIGNUNIT);
- if(item.operState==0||item.operState==6){
- examineCy=1;
- }
- });
- if(vData.rows.length==0){
- examineCy=1;
- }
- if(examineCy==0){
- $('#saveCylinder').linkbutton('disable');
- $.messager.alert('提示','该车辆气瓶已被审核,不可修改');
- cylinderEdit = false;
- setTimeout(function(){
- window.close();
- }, 2000);
- }
- },
- error:function(e){
- $.messager.progress('close');
- console.log(e);
- }
- });
- }
-
- function addCylinder(num,secondP){
- if(num>8){
- //showMsg('提示', '最多增加8只气瓶,如需要更改,可重新打开此页面', 5000);
- $.messager.alert('提示','最多增加8只气瓶,如需更改,可返回车辆信息进行修改气瓶安装数量');
- return;
- }
- var content='<input type="text" style="display:none;" id="cylinderGuid'+num+'" name="cylinderGuid'+num+'" />';
- content+='<table id="table'+num+'" style="margin-top:20px">';
- content+='<tr>';
- content+='<td class="tdclass title">气瓶'+num+':</td>';
- content+='</tr><tr><td> </td></tr><tr>';
- content+='<td class="tdclass colorRed">气瓶编号:<br/>'+'<input id="cylinderNo'+num+'" name="cylinderNo'+num+'" style="height:34px;" class="easyui-textbox cylinderInput" />'+'</td>';
- var op='<option value="0">其他</option><option value="1">钢质气瓶</option><option value="2">钢质内胆环向缠绕气瓶</option><option value="3">铝合金内胆全缠绕气瓶</option><option value="4">塑料内胆全缠绕气瓶</option><option value="5" selected="selected">LNG液化天然气气瓶</option>';
- content+='<td class="tdclass colorRed">类 型:<br/>'+'<select id="cylinderType'+num+'" name="cylinderType'+num+'" style="height:34px;" class="easyui-combobox cylinderInput">'+op+'</select>'+'</td>';
-
- content+='<td class="tdclass colorRed">制造单位:<br/>'+'<select id="manufacturer'+num+'" name="manufacturer'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='<td class="tdclass">生产许可:<br/>'+'<input id="productLicense'+num+'" name="productLicense'+num+'" style="height:34px;" class="easyui-datebox cylinderInput"/>'+'</td>';
-
- content+='<td class="tdclass colorRed">制造日期:<br/>'+'<input id="productDate'+num+'" name="productDate'+num+'" style="height:34px;" class="easyui-datebox cylinderInput"/>'+'</td>';
-
- content+='<td class="tdclass">安装单位:<br/>'+'<select id="installUnit'+num+'" name="installUnit'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='</tr><tr>';
-
- content+='<td class="tdclass">安装许可证:<br/>'+'<select id="installLicense'+num+'" name="installLicense'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='<td class="tdclass">安装合格证:<br/>'+'<select id="installCert'+num+'" name="installCert'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- var op1='<option value="0">安装</option><option value="1">复装</option><option value="2">整车出厂</option>';
-
- content+='<td class="tdclass colorRed">安装类型:<br/>'+'<select id="installType'+num+'" name="installType'+num+'" style="height:34px;" class="easyui-combobox cylinderInput">'+op1+'</select>'+'</td>';
-
- var op2='<option value="0">后备箱</option><option value="1">底部</option><option value="2">顶部</option><option value="3">货厢</option><option value="4">中部</option>';
-
- content+='<td class="tdclass">安装位置:<br/>'+'<select id="installLocation'+num+'" name="installLocation'+num+'" style="height:34px;" class="easyui-combobox cylinderInput">'+op2+'</select>'+'</td>';
-
- content+='<td class="tdclass">安装人员:<br/>'+'<select id="installOper'+num+'" name="installOper'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='</tr><tr>';
-
- content+='<td class="tdclass">第三方安装:<br/>'+'<select id="thirdInstall'+num+'" name="thirdInstall'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='<td class="tdclass colorRed">改装出厂时间:<br/>'+'<input id="refitDate'+num+'" name="refitDate'+num+'" style="height:34px;" class="easyui-datebox cylinderInput"/>'+'</td>';
-
- content+='<td class="tdclass colorRed">初次投用时间(勾选复选框有效):<br/>'+'<input type="checkbox" name="firstUseCK'+num+'" id="firstUseCK'+num+'" /><input id="firstUseDate'+num+'" name="firstUseDate'+num+'" style="height:34px;" class="easyui-datebox cylinderInput"/>'+'</td>';
-
- content+='<td class="tdclass colorRed">下次检验时间(勾选复选框有效):<br/>'+'<input type="checkbox" name="nextCheckCK'+num+'" id="nextCheckCK'+num+'" /><input id="nextCheckDate'+num+'" name="nextCheckDate'+num+'" style="height:34px;" class="easyui-datebox cylinderInput"/>'+'</td>';
-
- content+='<td class="tdclass colorRed">容 积 L:<br/>'+'<input id="vol'+num+'" name="vol'+num+'" style="height:34px;" class="easyui-textbox cylinderInput"/>'+'</td>';
-
- content+='<td class="tdclass colorRed">年 限:<br/>'+'<input id="yearLimit'+num+'" name="yearLimit'+num+'" style="height:34px;" class="easyui-textbox cylinderInput"/>'+'</td>';
-
- content+='</tr><tr>';
-
- content+='<td class="tdclass colorRed">次 数:<br/>'+'<input id="count'+num+'" name="count'+num+'" style="height:34px;" class="easyui-textbox cylinderInput"/>'+'</td>';
-
- content+='<td class="tdclass">产品型号:<br/>'+'<select id="productType'+num+'" name="productType'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='<td class="tdclass">重 量:<br/>'+'<input id="weight'+num+'" name="weight'+num+'" style="height:34px;" class="easyui-textbox cylinderInput"/>'+'</td>';
-
- content+='<td class="tdclass">壁 厚:<br/>'+'<input id="wall'+num+'" name="wall'+num+'" style="height:34px;" class="easyui-textbox cylinderInput"/>'+'</td>';
-
- content+='<td class="tdclass">公称压力:<br/>'+'<input id="press'+num+'" name="press'+num+'" style="height:34px;" class="easyui-textbox cylinderInput"/>'+'</td>';
-
- content+='</tr>';
-
- content+='</tr><tr>';
-
- content+='<td class="tdclass">材 质:<br/>'+'<select id="material'+num+'" name="material'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='<td class="tdclass">纤 维:<br/>'+'<select id="fibre'+num+'" name="fibre'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='<td class="tdclass">树 脂:<br/>'+'<select id="resin'+num+'" name="resin'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='<td class="tdclass">设备代码:<br/>'+'<input id="deviceCode'+num+'" name="deviceCode'+num+'" style="height:34px;" class="easyui-textbox cylinderInput"/>'+'</td>';
-
- content+='<td class="tdclass">制造监管检验机构:<br/>'+'<select id="mechanism1'+num+'" name="mechanism1'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='<td class="tdclass">型式试验机构:<br/>'+'<select id="mechanism2'+num+'" name="mechanism2'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='</tr><tr>';
-
- content+='<td class="tdclass">阀门厂家:<br/>'+'<select id="valveManufacturer'+num+'" name="valveManufacturer'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='<td class="tdclass">阀门型号:<br/>'+'<select id="valveModel'+num+'" name="valveModel'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='<td class="tdclass">阀门批次:<br/>'+'<select id="valveBatch'+num+'" name="valveBatch'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- content+='<td class="tdclass">阀门批次:<br/>'+'<select id="designUnit'+num+'" name="designUnit'+num+'" style="height:34px;" class="easyui-combobox cylinderInput"></select>'+'</td>';
-
- //content+='<td class="tdclass">资质/证件:<br/>'+'<select id="cert'+num+'" style="height:34px;" class="easyui-filebox cylinderInput"></select>'+'</td>';
-
- // content+='<td class="tdclass">资质/证件:<br/>'+'<select id="cert'+num+'" style="height:34px;" class="easyui-filebox cylinderInput"></select>'+'</td>';
- //content+='<td calss="tdclass">资质/证件:<br/>'+'<input type="file" class="cylinderInput" style="height:34px;" name="cert' +num +'" />';
-
- content+='</tr><tr>';
-
- //content+='<td colspan="11" align="center">'+'<img id="add'+num+'" src="images/add.png" style="cursor:pointer;" onclick="addCylinder('+(num+1)+')" />'+'<img id="remove'+num+'" src="images/delete.png" style="cursor:pointer;" onclick="removeCylinder('+(num)+')" />'+'</td>';
- if(secondP==1){
- content+='<td> </td></tr><tr>';
- content+='<td colspan="11" align="center"><span style="font-size:12px;"><input type="checkbox" id="userknow" onchange="checkboxOnclick(this)">本人承诺上传气瓶数据、图片资料信息均真实有效,如因不实所产生的安全后果,用户自行承担!</span></td></tr><tr>';
- content+='<td colspan="11" align="center">'+'<a id="saveCylinder" href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-save1" plain="false" style="width:250px;height:50px;" onclick="saveCylinderInfo();">保存气瓶信息</a>'+'</td>';
- content+='</tr><tr><td> </td>';
- }
- content+='</tr></table>';
-
- $("#cylinderDiv").append(content);
- if(secondP==1){
- $("#saveCylinder").linkbutton({
-
- });
- }
- $('#saveCylinder').linkbutton('disable');
- $("#cylinderNo"+num).textbox({
- required:true,
- editable:true,
- prompt:'必填',
-
- });
-
- $("#cylinderType"+num).combobox({
- required:true,
- editable:false,
- panelHeight:'auto',
- valueField:'id',
- textField:'name',
- onSelect: function (rec) {
- $("#yearLimit"+num).textbox({
- required:true,
- editable:false,
- value:'不限制',
-
- });
- $("#count"+num).textbox({
- required:true,
- editable:false,
- value:'不限制',
-
- });
- if(rec.id==0){
- $("#yearLimit"+num).textbox("setValue","8");
- $("#count"+num).textbox("setValue","15000");
- }else if(rec.id==1){
- $("#yearLimit"+num).textbox("setValue","5");
- $("#count"+num).textbox("setValue","不限制");
- }else if(rec.id==2||rec.id==3){
- $("#yearLimit"+num).textbox("setValue","8");
- $("#count"+num).textbox("setValue","不限制");
- }else if(rec.id==4){
- $("#yearLimit"+num).textbox("setValue","不限制");
- $("#count"+num).textbox("setValue","不限制");
- }else{
- $("#yearLimit"+num).textbox("setValue","不限制");
- $("#count"+num).textbox("setValue","不限制");
- }
-
- }
- });
-
- $("#manufacturer"+num).combobox({
- url:"ajax/getCylinderProduct",
- valueField:'id',
- textField:'name',
- required:true,
- editable:false,
- panelHeight:'150px',
- prompt:'必选',
- });
-
- $("#productLicense"+num).textbox({
- required:false,
- editable:true,
-
- });
-
- $("#productDate"+num).datebox({
- required:true,
- editable:false,
- prompt:'必填',
- value:getNowFormatDate(),
- });
-
- $("#installUnit"+num).combobox({
- url:"ajax/getUnit123?cityId="+selectedCityId+"&countryId=00&&type=3",
- valueField:'id',
- textField:'name',
- required:false,
- editable:true,
- panelHeight:'150px',
- onLoadSuccess:function(){
- switch(num){
- case 1:$("#installUnit"+num).combobox('select', installStationNo1);break;
- case 2:$("#installUnit"+num).combobox('select', installStationNo2);break;
- case 3:$("#installUnit"+num).combobox('select', installStationNo3);break;
- case 4:$("#installUnit"+num).combobox('select', installStationNo4);break;
- case 5:$("#installUnit"+num).combobox('select', installStationNo5);break;
- case 6:$("#installUnit"+num).combobox('select', installStationNo6);break;
- case 7:$("#installUnit"+num).combobox('select', installStationNo7);break;
- case 8:$("#installUnit"+num).combobox('select', installStationNo8);break;
- }
-
- }
- });
-
- $("#installLicense"+num).textbox({
- required:false,
- editable:true,
- panelHeight:'auto',
- });
-
- $("#installCert"+num).textbox({
- required:false,
- editable:true,
- panelHeight:'auto',
- });
-
- $("#installType"+num).combobox({
- required:true,
- editable:false,
- panelHeight:'auto',
- prompt:'必选',
- });
-
- $("#installLocation"+num).combobox({
- required:false,
- editable:false,
- prompt:'必选',
- panelHeight:'auto',
- });
-
- $("#installOper"+num).textbox({
- required:false,
- editable:true,
- panelHeight:'auto',
- });
-
- $("#thirdInstall"+num).textbox({
- required:false,
- editable:true,
- panelHeight:'auto',
- });
-
- // $('#giveCardTime').datebox('setValue', getNowFormatDate());
- $("#refitDate"+num).datebox({
- required:true,
- editable:false,
- prompt:'必选',
- value:getNowFormatDate(),
- });
-
- $("#firstUseDate"+num).datebox({
- required:true,
- editable:false,
- prompt:'必选',
- value:getNowFormatDate(),
-
- });
-
- $("#nextCheckDate"+num).datebox({
- required:true,
- editable:false,
- prompt:'必选',
- value:getNowFormatDate(),
- });
-
- $("#vol"+num).numberbox({
- required:true,
- editable:true,
- precision:2,
- min:0,
- prompt:'必填',
-
- });
-
- $("#yearLimit"+num).textbox({
- required:true,
- editable:false,
- value:'不限制',
-
- });
-
- $("#count"+num).textbox({
- required:true,
- editable:false,
- value:'不限制',
-
- });
-
- $("#productType"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#weight"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#wall"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#press"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#material"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#fibre"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#resin"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#deviceCode"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#mechanism1"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#mechanism2"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#valveManufacturer"+num).textbox({
- required:false,
- editable:true,
- });
-
-
- $("#valveModel"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#valveBatch"+num).textbox({
- required:false,
- editable:true,
- });
-
- $("#designUnit"+num).textbox({
- required:false,
- editable:true,
- });
-
- // $("#cert"+num).filebox({
- // required:false,
- // editable:true,
- // });
-
-
-
-
- }
-
- function removeCylinder(num){
- $("#table"+num).remove();
- }
-
- function saveCylinderInfo(){
- if($("#cylinderInfoFrom").form('validate')){
- for(var i=1;i<=installNum;i++){
- var productDate123=$('#productDate'+i).datebox('getValue');
- var refitDate123=$('#refitDate'+i).datebox('getValue');
- var firstUseDate123=$('#firstUseDate'+i).datebox('getValue');
- var nextCheckDate123=$('#nextCheckDate'+i).datebox('getValue');
- if(!compareDate(refitDate123, productDate123)){
- //showMsg('提示', '气瓶'+i+':改装出厂时间应不小于制造日期', 5000);
- $.messager.alert('提示','气瓶'+i+':改装出厂时间应不小于制造日期');
- return;
- }
- if(!compareDate(firstUseDate123, refitDate123)){
- //showMsg('提示', '气瓶'+i+':初次投用时间应不小于改装出厂时间', 5000);
- $.messager.alert('提示','气瓶'+i+':改装出厂时间应不小于制造日期');
- return;
- }
- if(!compareDate(nextCheckDate123, firstUseDate123)){
- //showMsg('提示', '气瓶'+i+':下次检验时间应不小于初次投用时间', 5000);
- $.messager.alert('提示','气瓶'+i+':改装出厂时间应不小于制造日期');
- return;
- }
- }
-
- showProgress('提示','请等待','保存中……');
- $("#cylinderInfoFrom").form("submit",{
- url: "ajax/insertCylinderInfo?cylinderNum="+installNum+"&operType="+operType123+"&carType="+carType,
- onsubmit: function () {
- return $(this).form("validate");
- },
- success: function (data) {
- $.messager.progress('close');
- var pData = $.parseJSON(data);
- if(pData.result=="0"){
- //showMsg('提示', '操作成功,气瓶信息填写成功', 5000);
- $.messager.alert('提示','操作成功,气瓶信息填写成功');
- setTimeout(function(){
- window.close();
- }, 2000);
- }else{
- //showMsg('提示', '操作失败:'+pData.retinfo, 5000);
- $.messager.alert('提示','操作失败:'+pData.retinfo);
- }
-
- },
- error:function(e){
- $.messager.progress('close');
- console.log(e);
- },
- xhrFields: {
- withCredentials: true
- }
- });
-
-
- }else{
- //showMsg('提示', '验证未通过,有必填信息未填写!', 5000);
- $.messager.alert('提示','验证未通过,有必填信息未填写!');
- }
- }
- function returnCarInfo(){
- document.getElementById("cylinderinfodiv").style.display='none';
- document.getElementById("carinfodiv").style.display='';
- operType=1;//1未修改
-
- }
- function checkboxOnclick(checkbox){
- if(cylinderEdit==false){
- $('#saveCylinder').linkbutton('disable');
- }else{
- if(checkbox.checked){
- $('#saveCylinder').linkbutton('enable');
-
- }else{
- $('#saveCylinder').linkbutton('disable');
- }
- }
-
- }
- </script>
- </head>
-
- <body>
- <div id="cylinderinfodiv">
- <fieldset>
- <legend id="cylinderinfotip">气瓶信息</legend>
- <form id="cylinderInfoFrom" method="post" action="ajax/insertCylinderInfo">
- <input type="text" id="carGuid" name="carGuid" style="display: none;" />
- <input type="text" id="carNo" name="carNo" style="display: none;" />
-
- <div class="radiusDiv" id="cylinderDiv" >
- </div>
- </form>
- </fieldset>
- </div>
- </body>
- </html>
|