From 417c6db1ab7698f625bcc6452c2936981fade14b Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期四, 06 十二月 2018 12:19:34 +0800
Subject: [PATCH] 打开系统设置面板检测数据的正确性
---
gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html | 51 +++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 41 insertions(+), 10 deletions(-)
diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
index 45e7224..5e02643 100644
--- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
+++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
@@ -283,9 +283,13 @@
temp=JSON.parse(temp);
console.info(temp);
console.info(temp[30]);
+ console.info(temp[33]);
installstartdata(temp);
-
- getUpdateArr();
+ if(temp[33]&&temp[33]=="new"){
+
+ }else{
+
+ }
function installstartdata(temp){
//$("#StationId").value=temp[0];
//var t=document.getElementById("station_name1");
@@ -378,13 +382,17 @@
$(function(){
$(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
$("#sure").click(function(){
- editParm();
- function backpage(){window.location.href="ele-param.html";}
- setTimeout(backpage,3000);
- });
- $("#cancel").click(function(){
- window.location.href="ele-param.html";
- });
+ if(temp[33]&&temp[33]=="new"){
+ addBatt();
+ }else{
+ editParm();
+ }
+ function backpage(){window.location.href="ele-param.html";}
+ setTimeout(backpage,500);
+ });
+ $("#cancel").click(function(){
+ window.location.href="ele-param.html";
+ });
});
function editParm(){
var parm = getUpdateArr();
@@ -409,7 +417,30 @@
}
});
}
-
+ function addBatt(){
+ var parm = getUpdateArr();
+ $.ajax({
+ type: "post",
+ url: "BattInfAction!add",
+ async:true,
+ dataType:'text',
+ data:"json="+JSON.stringify(parm),
+ success: function(data){
+ data = eval('('+data+')');
+ var model = eval('('+data.result+')');
+ //console.info(model);
+ if(model.code ==1){
+ alert("娣诲姞鐢垫睜缁勬垚鍔�!");
+ }else{
+ alert("娣诲姞鐢垫睜缁勫け璐�!");
+ }
+ },
+ error:function(){
+ alert("娣诲姞鐢垫睜缁勫彂鐢熼敊璇�!");
+ }
+ });
+ }
+
/* 鎿嶄綔鎴愬姛
$('#changeSuc').popup('open');
鎿嶄綔澶辫触
--
Gitblit v1.9.1