单选按钮选中js的处理
function FinancialinfosetController($scope, $http, $timeout, $location, $rootScope, $routeParams) {
var tempurl = "/api/v1/FinancialManagement/GetFinancialinfoset";
$http.get(tempurl).success(function (data) {
if (data.has_val) {
$scope.Financialinfosetinfo = data.result;
var bankprovince = $scope.Financialinfosetinfo.bankprovince;
console.log($scope.Financialinfosetinfo);
var province = $("#province option:selected").text($scope.Financialinfosetinfo.bankprovince);
var city = $("#city option:selected").text($scope.Financialinfosetinfo.bankcity);
var bank = $("#bank option:selected").text($scope.Financialinfosetinfo.bank);
var branch = $("#branch option:selected").text($scope.Financialinfosetinfo.bankname);
//$("#province").val($scope.Financialinfosetinfo.pid);
//$("#city").val($scope.Financialinfosetinfo.cid);
//$("#district").val($scope.Financialinfosetinfo.rid);
if ($scope.Financialinfosetinfo.status == -1 || $scope.Financialinfosetinfo.status == 1 || $scope.Financialinfosetinfo.status == 7) {
$("#subaudit").attr("disabled", true);
$("#subaudit").removeClass("btn btn-primary");
$("#person").attr("disabled", true);
$("#enterprise").attr("disabled", true);
}
if ($scope.Financialinfosetinfo.customertype == "PERSON") {
$("#idnumber").show();
$("#business").hide();
$("#person").attr("checked", "checked");
}
else if ($scope.Financialinfosetinfo.customertype == "ENTERPRISE") {
$("#idnumber").hide();
$("#business").show();
$("#enterprise").attr("checked", "checked");
$("#business").style.display = "";
}
else {
$("#idnumber").show();
$("#business").hide();
$("#person").attr("checked", "checked");
}
}
});
var tempurl1 = "/api/v1/FinancialManagement/Getprovinces";
$http.get(tempurl1).success(function (data) {
if (data.has_val) {
$scope.provincesList = data.result;
console.log($scope.provincesList);
}
});
$scope.getcitylist = function (provinceCode) {
var tempurl1 = "/api/v1/FinancialManagement/GetCitys?provinceCode=" + provinceCode;
$http.get(tempurl1).success(function (data) {
if (data.has_val) {
$scope.citysList = data.result;
console.log($scope.citysList);
}
});
}
$("#province").on("change", function () {
$scope.getcitylist($(this).val());
})
$scope.getbanklist = function (cityCode) {
var tempurl1 = "/api/v1/FinancialManagement/GetBanks?cityCode=" + cityCode;
$http.get(tempurl1).success(function (data) {
if (data.has_val) {
$scope.banksList = data.result;
console.log($scope.banksList);
}
});
}
$("#city").on("change", function () {
$scope.getbanklist($(this).val());
})
$scope.getbranchslist = function (cityCode, bankCode) {
var tempurl1 = "/api/v1/FinancialManagement/GetBranch?cityCode=" + cityCode + "&bankCode=" + bankCode;
$http.get(tempurl1).success(function (data) {
if (data.has_val) {
$scope.branchsList = data.result;
console.log($scope.branchsList);
}
});
}
$("#bank").on("change", function () {
$scope.getbranchslist($("#city").val(), $(this).val());
})
$scope.showpersonal = function () {
$("#idnumber").show();
$("#business").hide();
$("#signedname").val('');
$("#businesslicence").val('');
$("#DefaultImgUrl").imgnull='';
$("#legalperson").val('');
}
$scope.company = function () {
$("#idnumber").hide();
$("#business").show();
$("#idcard").val('');
$("#business").css('display', 'block');
}
$scope.reasonshow = function () {
$('#myModal').modal('show');
}
//获取验证码
var click_func = function () {
$("#securitycodeid").css('display', 'block');
var bindmobile = $("#bindmobile").val();
var re = new RegExp(/^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/);
var result = re.test(bindmobile);
if (!result) {
alert("请输入正确的手机号!");
return;
}
$("#div_get_yzm").off("click", click_func);
var url_get_yzm = "/api/v1/Message/SendVCode?mobile=" + bindmobile + "&type=1001";
$http.get(url_get_yzm)
.success(function (data) {
if (data.has_val) {
var _time = 59;
var _timefunc = function () {
$("#div_get_yzm").html(_time + "秒可重新获取");
_time--;
if (_time > 0) {
$timeout(_timefunc, 1000);
} else {
$("#div_get_yzm").on("click", click_func);
$("#div_get_yzm").html("获取验证码");
}
}
$timeout(_timefunc, 1000);
} else {
$("#div_get_yzm").on("click", click_func);
alert("验证码发送失败");
}
}).error(function (data) {
$("#div_get_yzm").on("click", click_func);
$(document).trigger("ajaxStop");
alert(data.errmsg);
})
}
//获取验证码
$("#div_get_yzm").on("click", click_func);
//var securitynum;
$('#securitycode').blur(function () {
var securitycode = $('#securitycode').val();
if (securitycode == "") {
alert('请输入短信验证码!');
return;
}
var bindmobile = $("#bindmobile").val();
var url_ckeckyzm = "/api/v1/Message/TestVCode?mobile=" + bindmobile + "&vcode=" + securitycode + "&type=1001";
$http.get(url_ckeckyzm).success(function (data) {
if (data.has_val && data.result) {
alert("验证码正确!");
}
else {
alert("验证码错误");
return;
}
})
.error(function (e) {
alert("验证码错误");
})
})
$('#bindmobile').blur(function () {
var bindmobile = $("#bindmobile").val();
var re = new RegExp(/^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/);
var result = re.test(bindmobile);
if (!result || bindmobile == "") {
alert("请输入正确的手机号!");
}
});
$('#bankaccountnumber1').blur(function () {
//alert(securitynum);
var bankaccountnumber = $('#bankaccountnumber').val();
var bankaccountnumber1 = $('#bankaccountnumber1').val();
if (bankaccountnumber != bankaccountnumber1) {
alert("两次填写的银行卡号不一致!");
}
});
//提交审核
$scope.saveinfo = function () {
var linkman = $('#linkman').val();
var bindmobile = $('#bindmobile').val();
var securitycode = $('#securitycode').val();
var email = $('#email').val();
var idcard = $('#idcard').val();
var businesslicence = $('#businesslicence').val();
var businesslicense = $('#DefaultImgUrl').attr('imgnull');
var legalperson = $('#legalperson').val();
var accountname = $('#accountname').val();
var cardno = $('#cardno').val();
var bankaccountnumber = $('#bankaccountnumber').val();
var bankaccountnumber1 = $('#bankaccountnumber1').val();
var province = $("#province option:selected").text();
var city = $("#city option:selected").text();
var bank = $("#bank option:selected").text();
var branch = $("#branch option:selected").text();
var customertype = $("input[name='useType']:checked").val();
var signedname;
signedname = $('#signedname').val();
var bankaccounttype;
bankaccounttype = $(".useType").val();
if (linkman == "") {
alert('请输入财务联系人姓名!');
return;
}
var re = new RegExp(/^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/);
var result = re.test(bindmobile);
if (!result || bindmobile == "") {
alert("请输入正确的手机号!");
}
var re1 = new RegExp(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/);
var result1 = re1.test(email);
if (email != "") {
if (!result1) {
alert("请输入正确的邮箱!");
return;
}
}
if (securitycode == "") {
alert('请输入短信验证码!');
return;
}
if (customertype == "PERSON") {
var re = new RegExp(/^\d{15}|\d{18}$/);
var result = re.test(idcard);
if (!result || idcard == "") {
alert("请输入正确的身份证号!");
return;
}
}
var re2 = new RegExp(/^[A-Za-z0-9]{4,40}$/);
var result2 = re2.test(businesslicence);
if (customertype == "ENTERPRISE") {
if (businesslicence == "") {
alert('请输入营业执照号!');
return;
}
if (!result2) {
alert("请输入正确的营业执照号!");
return;
}
if (DefaultImgUrl == "") {
alert("请上传营业执照图片!");
return;
}
if (legalperson == "") {
alert("请输入法人姓名!");
return;
}
if (signedname == '') {
alert("请输入与营业执照上一致的企业名!");
return;
}
}
if (accountname == "") {
alert('请输入银行开户名!');
return;
}
if (province == "" || province == "选择省") {
alert("请选择省!");
return;
}
if (city == "" || city == "选择城市") {
alert("请选择城市!");
return;
}
if (bank == "" || bank == "选择银行") {
alert("请选择银行!");
return;
}
if (branch == "" || branch == "选择支行") {
alert("请选择支行!");
return;
}
if (bankaccountnumber == "") {
alert("请输入银行卡号!");
return;
}
if (bankaccounttype == "PERSON") {
bankaccounttype = "PrivateCash";
}
else if (bankaccounttype == "ENTERPRISE") {
bankaccounttype = "PublicCash";
}
else {
bankaccounttype = "PrivateCash";
}
if (bankaccounttype == "ENTERPRISE") {
signedname = signedname;
}
else {
signedname = accountname;
}
if (bankaccountnumber != bankaccountnumber1) {
alert('两次填写的银行卡号不一致!');
return;
}
var obj = {
bindmobile: bindmobile,
customertype: customertype,
signedname: signedname,
linkman: linkman,
idcard: idcard,
businesslicence: businesslicence,
minsettleamount: 1,
legalperson: legalperson,
bankaccountnumber: bankaccountnumber,
bankname: branch,
accountname: accountname,
bankaccounttype: bankaccounttype,
bankprovince: province,
bankcity: city,
email: email,
type: 0,
bank: bank,
businesslicense: businesslicense,
};
console.log(obj);
var submitconfirm = confirm('您确定提交审核吗?');
if (submitconfirm == true) {
if ($scope.Financialinfosetinfo.status == 10) {
$http.post("/api/v1/FinancialManagement/UpdateYeepay", obj).success(function (data) {
if (data.has_val) {
alert("修改成功,审核时间需要3-5个工作日!");
window.location.reload();
}
});
}
else {
if ($scope.Financialinfosetinfo.linkman != "") {
$http.post("/api/v1/FinancialManagement/UpdateFinancialinfoset", obj).success(function (data) {
if (data.has_val) {
alert("修改成功!");
window.location.reload();
}
});
}
else {
$http.post("/api/v1/FinancialManagement/SaveFinancialinfoset", obj).success(function (data) {
if (data.has_val) {
alert("保存成功!");
window.location.reload();
}
});
}
}
}
}
}
单选按钮选中js的处理的更多相关文章
- 单选按钮 点击value值自动把单选按钮选中
HTML 代码 <tr> <td align="right">性别:</td> <td><inputt ...
- CheckStateChanged(复选框选中状态更改事件)和 CheckedChanged(单选按钮选中状态更改事件)二者区别?
CheckStateChanged(复选框选中状态更改事件)和 CheckedChanged(单选按钮选中状态更改事件)二者区别: 复选框控件(CheckBox)提供了CheckedChanged控件 ...
- js控制单选按钮选中某一项
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title>& ...
- JQ 获取单选按钮选中的值
==========================html 代码 <input type="radio" style="float: left " on ...
- radio 单选按钮 选中多个
<input type="radio" name="a"/> <input type="radio" name=" ...
- [King.yue]Grid列选中JS控制按钮状态
Grid列选中一行某些按钮启用 例:gridId(Grid ID) btnEditId(编辑按钮ID) btnDeleteId(删除按钮ID) JS: var setButtonStatus = ...
- 同类型元素,只有一个被选中js
<div class="wrap-box flex_row"> <div class="wrap-block"> <div cla ...
- 用jquery获取单选按钮选中的内容 和 获取select下拉列表选中的值
1.<label><input name='reason' type='radio' value='您的评论内容涉嫌谣言' />您的评论内容涉嫌谣言</label> ...
- 单选按钮选中指定value值
$("input[name='BlogStatus'][value='" + rep.data.Status + "']").prop("checke ...
随机推荐
- 放课后的约定 by:S_H_Y
题目背景 十年.十年前.天空的蔚蓝,云彩的舒软.我,怎么会认识你.洁白的,洁白的,十年前.我无法忘却.终究是小时候的约定.记忆被困在冻土里,有时我不认识那天的我.难道一切,都锁在心里面了吗? 题目描述 ...
- Codeforces Round #148 (Div. 2)
A. Two Bags of Potatoes 枚举倍数. B. Easy Tape Programming (待补) C. Not Wool Sequences 考虑前缀异或和. \[answer ...
- 2-1-1 GDI
主要内容:介绍Windows图形设备接口(GDI)及相关概念 1.Windows图形设备接口(GDI) <1>Windows图形设备接口(GDI),是为与设备无关的图形设计的. 所谓设备 ...
- php随笔杂记(一)
1.在function updatepwd($postData=array()) 如果参数是一个数组, 在使用时,如果给他赋值则只返回数组名$postData即可 ,如果里面已有值 ,这返回的可 ...
- poj2186 强连通
题意:有 n 头牛,以及一些喜欢关系,牛 A 喜欢牛 B,这种关系可以传递,问有多少头牛被牧场上所有牛喜欢. 首先强连通,因为在同一个强连通分量中牛是等价的,然后对于一个有向无环图看是否只有一个强连通 ...
- jquery轻松操作CSS样式
$(this).click(function(){ if($(this).hasClass(“zxx_fri_on”)){ $(this).removeClass(“zxx_fri_on”); ...
- mysql学习之-三种安装方式与版本介绍
MYSQL版本介绍 mysql分alpha,beta,rc,GA四个版本. alpha 暗示这是一个以展示新特性为目的的版本,存在比较多的不稳定因素,还会向代码中添加新新特性beta 以后的beta ...
- #linux包之sysstat之iostat命令
概述 对于I/O-bond类型的进程,我们经常用iostat工具查看进程IO请求下发的数量.系统处理IO请求的耗时,进而分析进程与操作系统的交互过程中IO方面是否存在瓶颈.同vmstat一样,iost ...
- ECS 安装redis 及安装PHPredis的扩展
安装redis 1.一条命令就行了:apt-get install redis-server 2.wget http://download.redis.io/releases/redis-3.0.7. ...
- 【转】越狱的 iPhone、iPad 通过网站实现一键安装 ipa 格式的 APP 应用
1.已经越狱的 iPhone.iPad 设备,当通过其自带的 safari 浏览器访问 ipa 应用下载网站时,利用 itms-services 协议,可以一键安装 ipa 文件的 iOS 应用,例如 ...