123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669 |
- var Register = {
- registData: {},
- validateFields: {
- username: {validators: {notEmpty: {message: '登录账号不能为空'}}},
- name: {validators: {notEmpty: {message: '单位/企业名称不能为空'}, regexp: {regexp: /^([\u4E00-\u9FA5]|\(|\)|\(|\)){1,100}$/, message: "单位/企业名称只允许中文"}}},
- //idCard: {validators: {notEmpty: {message: '统一社会信用代码不能为空'}}},
- agentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
- agentPhone: {
- validators: {
- notEmpty: {
- message: '人才联络员手机号不能为空'
- }, regexp: {
- regexp: /(^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})))$/,
- message: "人才联络员手机号格式不合法"
- }
- }
- },
- verificationCode: {validators: {notEmpty: {message: '手机验证码不能为空'}}},
- //legal: {validators: {notEmpty: {message: '法人代表不能为空'},regexp:{regexp:/^[\u4e00-\u9fa5]{1,50}$/,message:"法人代表只允许中文"}}},
- street: {validators: {notEmpty: {message: '所属街道不能为空'}}},
- address: {validators: {notEmpty: {message: '单位/企业地址不能为空'}}},
- ephone: {
- validators: {
- notEmpty: {
- message: '单位/企业电话不能为空'
- }, regexp: {
- regexp: /(^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})))$/,
- message: "单位/企业电话格式不合法"
- }
- }
- },
- agentEmail: {
- validators: {
- notEmpty: {
- message: '电子邮箱不能为空'
- },
- regexp: {
- regexp: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
- message: "电子邮箱格式不正确"
- }
- }
- },
- //bankCard: {validators: {notEmpty: {message: '企业银行账号不能为空'}}},
- //bankNetwork: {validators: {notEmpty: {message: '企业开户银行网点不能为空'}}},
- //bank: {validators: {notEmpty: {message: '企业开户银行不能为空'}}}
- },
- sy_validateFields: {
- username: {validators: {notEmpty: {message: '登录账号不能为空'}}},
- name: {validators: {notEmpty: {message: '单位名称不能为空'}, regexp: {regexp: /^[\u4e00-\u9fa5]{1,100}$/, message: "单位名称只允许中文"}}},
- agentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
- agentPhone: {
- validators: {
- notEmpty: {
- message: '人才联络员手机号不能为空'
- }, regexp: {
- regexp: /(^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})))$/,
- message: "人才联络员手机号格式不合法"
- }
- }
- },
- verificationCode: {validators: {notEmpty: {message: '手机验证码不能为空'}}},
- street: {validators: {notEmpty: {message: '所属街道不能为空'}}},
- address: {validators: {notEmpty: {message: '单位地址不能为空'}}},
- ephone: {
- validators: {
- notEmpty: {
- message: '单位电话不能为空'
- }, regexp: {
- regexp: /(^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})))$/,
- message: "单位电话格式不合法"
- }
- }
- },
- agentEmail: {
- validators: {
- notEmpty: {
- message: '电子邮箱不能为空'
- },
- regexp: {
- regexp: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
- message: "电子邮箱格式不正确"
- }
- }
- }
- }
- };
- var enterpriseCountDown = 0;
- var enterpriseSmsBtn = $("#enterprise_sms_btn");
- var persionCountDown = 0;
- var psSmsBtn = $("#ps_sms_btn");
- var lock = false;
- Register.addSubmit = function () {
- var regType = $(".active").attr("regType");
- if (regType == "en") { //企业用户注册
- Register.enterpriseUserRegister();
- } else if (regType == "ps") { //个人用户注册
- Register.personUserRegister();
- }
- };
- /**
- * 验证数据
- */
- Register.validate = function () {
- $('#ep_form').data("bootstrapValidator").resetForm();
- $('#ep_form').bootstrapValidator('validate');
- return $("#ep_form").data('bootstrapValidator').isValid();
- }
- var isDis = false;
- Register.enterpriseUserRegister = function () {
- var special = $("#ep_form .active").attr("special");
- $("#special").val(special)
- $('#ep_form').bootstrapValidator({
- feedbackIcons: {
- valid: 'glyphicon glyphicon-ok',
- invalid: 'glyphicon glyphicon-remove',
- validating: 'glyphicon glyphicon-refresh'
- },
- group: '.rowGroup',
- fields: Register.validateFields,
- live: 'enabled',
- message: '该字段不能为空'
- });
- if (special == "qiye") {
- $("#tab-3 .form-control").removeAttr("disabled");
- $("#tab-4 .form-control").attr("disabled", "disabled");
- $('#ep_form').bootstrapValidator("addField", "idCard", {validators: {notEmpty: {message: '统一社会信用代码不能为空'}}});
- $('#ep_form').bootstrapValidator("addField", "legal", {validators: {notEmpty: {message: '法人代表不能为空'}, regexp: {regexp: /^[\u4e00-\u9fa5]{1,50}$/, message: "法人代表只允许中文"}}});
- $('#ep_form').bootstrapValidator("addField", "bankCard", {validators: {notEmpty: {message: '开户银行账号不能为空'}}});
- $('#ep_form').bootstrapValidator("addField", "bankNetwork", {validators: {notEmpty: {message: '开户银行网点不能为空'},
- regexp: {
- regexp: /^[\u4e00-\u9fa5]*银行[\u4e00-\u9fa5]*$/,
- message: "开户银行网点格式不正确"
- }}});
- $('#ep_form').bootstrapValidator("addField", "bank", {validators: {notEmpty: {message: '开户银行不能为空'}, regexp: {
- regexp: /^[\u4e00-\u9fa5]*$/,
- message: "开户银行必须为中文"
- }}});
- var prefix = '企业';
- } else {
- $("#tab-4 .form-control").removeAttr("disabled");
- $("#tab-3 .form-control").attr("disabled", "disabled");
- $('#ep_form').bootstrapValidator("removeField", "idCard");
- $('#ep_form').bootstrapValidator("removeField", "legal");
- $('#ep_form').bootstrapValidator("removeField", "bankCard");
- $('#ep_form').bootstrapValidator("removeField", "bankNetwork");
- $('#ep_form').bootstrapValidator("removeField", "bank");
- var prefix = '单位';
- }
- if (!Register.validate()) {
- return;
- }
- isDis = $("#type").prop("disabled");
- var source = $("#source").val();
- if (special == "qiye") {
- var username = $("#username").val();
- var password = $("#password").val();
- var rePassword = $("#re_password").val();
- var name = $("#name").val();
- var idCard = $("#idCard").val();
- var legal = $("#legal").val();
- var street = $("#street").val();
- var address = $("#address").val();
- var ephone = $("#ephone").val();
- } else {
- var username = $("#sy_username").val();
- var password = $("#sy_password").val();
- var rePassword = $("#sy_re_password").val();
- var name = $("#sy_name").val();
- var street = $("#sy_street").val();
- var address = $("#sy_address").val();
- var ephone = $("#sy_ephone").val();
- }
- var agentName = $("#agentName").val();
- var agentPhone = $("#agentPhone").val();
- var verificationCode = $("#verificationCode").val();
- if (isDis) {
- $("#type").removeAttr("disabled");
- }
- var type = $("#type").val();
- var agentEmail = $("#agentEmail").val();
- var enterpriseTag = $("#enterpriseTag").val();
- var enterpriseType = $("#enterpriseType").val();
- var industryFieldNew = $("#industryFieldNew").val();
- var bankCard = $("#bankCard").val();
- var bank = $("#bank").val();
- var bankNetwork = $("#bankNetwork").val();
- if (username == null || username == '') {
- Feng.info("请填写账号!");
- return;
- }
- if (username.length > 50) {
- Feng.info("账号最多50个字符!");
- return;
- }
- if (source != 2) {
- if (password == null || password == '') {
- Feng.info("请填写密码!");
- return;
- }
- if (!/^(?=.*\d)(?=.*[a-zA-Z]).{8,20}$/.test(password)) {
- Feng.info("密码格式错误,密码由字母与数字组成,且长度必须8个字符及以上!");
- return;
- }
- if (rePassword == null || rePassword == '') {
- Feng.info("请填写重复密码!");
- return;
- }
- if (password != rePassword) {
- Feng.info("两次密码填写不一致!");
- return;
- }
- }
- if (name == null || name == '') {
- Feng.info("请填写" + prefix + "名称!");
- return;
- }
- if (!/^([\u4E00-\u9FA5]|\(|\)|\(|\)){1,100}$/.test(name)) {
- Feng.info(prefix + "名称只能输入中文 !");
- return;
- }
- if (name.length > 100) {
- Feng.info(prefix + "名称最多100个字符!");
- return;
- }
- if (ephone == null || ephone == '') {
- Feng.info("请填写" + prefix + "电话");
- return;
- }
- if (street == null || street == '') {
- Feng.info("请选择所属街道!");
- return;
- }
- if (address == null || address == '') {
- Feng.info("请填写单位地址!");
- return;
- }
- if (special == "qiye") {
- if ((idCard == null || idCard == '')) {
- Feng.info("请填写统一社会信用代码!");
- return;
- }
- if (idCard.length > 40) {
- Feng.info("统一社会信用代码最多40个字符!");
- return;
- }
- if (legal == null || legal == '') {
- Feng.info("请填写法人代表!");
- return;
- }
- if (!/^[\u4e00-\u9fa5]{1,50}$/.test(legal)) {
- Feng.info("法人代表只能输入中文 !");
- return;
- }
- if (type == null || type == '') {
- Feng.info("请选择申报类型!");
- return;
- }
- if (type == null || type == '') {
- Feng.info("请选择企业类别");
- return;
- }
- if (bankCard == null || bankCard == '') {
- Feng.info("请填写企业银行账号!");
- return;
- }
- if (bank == null || bank == '') {
- Feng.info("请填写企业开户银行!");
- return;
- }
- if (bankNetwork == null || bankNetwork == '') {
- Feng.info("请填写企业开户银行网点");
- return;
- }
- var x = document.getElementById("imgurl").value;
- if (x == "") {
- Feng.info("请上传营业执照照片!");
- return;
- }
- if (!Feng.chkFileInvalid(document.getElementById("imgurl").files[0], 5, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "营业执照只允许上传PDF或图片")) {
- return;
- }
- var xx = document.getElementById("bankImg").value;
- if (xx == "") {
- Feng.info("请上传开户银行许可证!");
- return;
- }
- if (!Feng.chkFileInvalid(document.getElementById("bankImg").files[0], 5, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "开户银行许可证只允许上传PDF或图片")) {
- return;
- }
- if (type == 1) {
- if (enterpriseTag == null || enterpriseTag == '') {
- Feng.info("请选择单位标签!");
- return;
- }
- if (industryFieldNew == null || industryFieldNew == '') {
- Feng.info("请选择产业领域");
- return;
- }
- var xxx = document.getElementById("domainImg").value;
- if (xxx == "") {
- Feng.info("请上传行业领域佐证材料!");
- return;
- }
- if (!Feng.chkFileInvalid(document.getElementById("domainImg").files[0], 5, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "行业领域佐证材料只允许上传PDF或图片")) {
- return;
- }
- var checkType = ["guishang", "gaoxinjishu", "zhuanjingtexin"];
- if (checkType.indexOf(enterpriseType) > -1) {
- var typeImg = document.getElementById("typeImg").value;
- if (typeImg == "") {
- Feng.info("规上、高新技术、专精特新企业需要上传佐证材料!");
- return;
- }
- if (!Feng.chkFileInvalid(document.getElementById("typeImg").files[0], 5, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "规上、高新技术、专精特新企业佐证材料只允许上传PDF或图片")) {
- return;
- }
- }
- }
- } else {
- var x = document.getElementById("sy_imgurl").value;
- if (x == "") {
- Feng.info("请上传法人证或批文!");
- return;
- }
- if (!Feng.chkFileInvalid(document.getElementById("sy_imgurl").files[0], 5, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "法人证或批文只允许上传PDF或图片")) {
- return;
- }
- }
- if (agentName == null || agentName == '') {
- Feng.info("请填写人才联络员!");
- return;
- }
- if (agentName.length > 30) {
- Feng.info("人才联络员最多30个字符!");
- return;
- }
- if (agentPhone == null || agentPhone == '') {
- Feng.info("请填写人才联络员电话!");
- return;
- }
- if (verificationCode == null || verificationCode == '') {
- Feng.info("请填写手机验证码!");
- return;
- }
- if (agentEmail == null || agentEmail == '') {
- Feng.info("请填写电子邮箱!");
- return;
- }
- var xxxx = document.getElementById("beian").value;
- if (xxxx == "") {
- Feng.info("请上传人才联络员信息备案表!");
- return;
- }
- if (!Feng.chkFileInvalid(document.getElementById("beian").files[0], 5, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "人才联络员信息备案表只允许上传PDF或图片")) {
- return;
- }
- if (!/(^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})))$/.test(ephone)) {
- Feng.info(prefix + "电话格式不合法!");
- return;
- }
- if (!/(^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})))$/.test(agentPhone)) {
- Feng.info("人才联络员电话格式不合法!");
- return;
- }
- if (!/[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(agentEmail)) {
- Feng.info("电子邮箱格式不合法!");
- return;
- }
- if (!lock) {
- lock = true;
- } else {
- Feng.info("不能重复点击");
- return;
- }
- $("#ep_form")[0].submit();
- };
- Register.changeEnterpriseType = function () {
- var enterpriseType = $("#enterpriseType").val();
- switch (enterpriseType) {
- case "guishang":
- case "gaoxinjishu":
- case "zhuanjingtexin":
- $("td.typeUploader").css("display", "table-cell");
- break;
- default:
- $("td.typeUploader").css("display", "none");
- break;
- }
- };
- Register.personUserRegister = function () {
- var source = $("#ps_source").val();
- var username = $("#ps_username").val();
- var password = $("#ps_password").val();
- var rePassword = $("#ps_re_password").val();
- var name = $("#ps_name").val();
- var sex = $("#ps_sex").val();
- var idCard = $("#ps_idCard").val();
- var phone = $("#ps_phone").val();
- var verificationCode = $("#ps_verificationCode").val();
- if (username == null || username == '') {
- Feng.info("请填写账号!");
- return;
- }
- if (username.length > 50) {
- Feng.info("账号最多20个字符!");
- return;
- }
- if (source != 2) {
- if (password == null || password == '') {
- Feng.info("请填写密码!");
- return;
- }
- if (rePassword == null || rePassword == '') {
- Feng.info("请填写重复密码!");
- return;
- }
- if (password != rePassword) {
- Feng.info("两次密码填写不一致!");
- return;
- }
- }
- if (name == null || name == '') {
- Feng.info("请填写姓名!");
- return;
- }
- if (name.length > 20) {
- Feng.info("姓名最多20个字符!");
- return;
- }
- if (sex == null || sex == '') {
- Feng.info("请选择性别!");
- return;
- }
- if (idCard == null || idCard == '') {
- Feng.info("请填写身份证号!");
- return;
- }
- if (phone == null || phone == '') {
- Feng.info("请填写手机号!");
- return;
- }
- if (verificationCode == null || verificationCode == '') {
- Feng.info("请填写手机验证码!")
- return;
- }
- if (!/0?(13|14|15|17|18|19)[0-9]{9}/.test(phone)) {
- Feng.info("手机号格式不合法!");
- return;
- }
- var da = {"source": source, "username": username, "password": password, "name": name, "sex": sex, "idCard": idCard, "phone": phone, "verificationCode": verificationCode};
- var ajax = new $ax(Feng.ctxPath + "/api/personalUser/register", function (data) {
- Feng.info(data.msg);
- if (data.code == 200) {
- parent.layer.close(window.parent.Login.layerIndex);
- }
- }, function (data) {
- Feng.error("操作失败!" + data.responseJSON.message + "!");
- });
- ajax.set(da);
- ajax.start();
- };
- Register.getEnterpriseSms = function () {
- var agentPhone = $("#agentPhone").val();
- if (agentPhone == null || agentPhone == "") {
- Feng.info("请填写人才联络员手机号!");
- return;
- }
- agentPhone = $.trim(agentPhone);
- if (!Feng.checkMobilePhoneNum(agentPhone)) {
- Feng.info("手机号格式有误,请填写正确的手机号码!");
- return;
- }
- Register.enterpriseBtnCountDown();
- var ajax = new $ax(Feng.ctxPath + "/common/auth/verificationCode?phone=" + agentPhone + "&type=1", function (data) {
- Feng.info(data.msg);
- }, function (data) {
- Feng.error("操作失败!" + data.responseJSON.message + "!");
- });
- ajax.set(null);
- ajax.start();
- };
- Register.enterpriseBtnCountDown = function () {
- if (enterpriseCountDown == 0) {
- enterpriseCountDown = 60;
- } else if (enterpriseCountDown == 1) {
- enterpriseSmsBtn.removeAttr("disabled");
- enterpriseSmsBtn.html("获取验证码");
- enterpriseCountDown = 0;
- return;
- }
- enterpriseSmsBtn.attr("disabled", true);
- enterpriseSmsBtn.html(enterpriseCountDown + "秒");
- enterpriseCountDown--;
- setTimeout("Register.enterpriseBtnCountDown()", 1000);
- };
- Register.getPersionSms = function () {
- var phone = $("#ps_phone").val();
- if (phone == null || phone == "") {
- Feng.info("请填写手机号!");
- return;
- }
- phone = $.trim(phone);
- if (!Feng.checkMobilePhoneNum(phone)) {
- Feng.info("手机号格式有误,请填写正确的手机号码!");
- return;
- }
- Register.getPersionBtnCountDown();
- var ajax = new $ax(Feng.ctxPath + "/common/auth/verificationCode?phone=" + phone + "&type=1", function (data) {
- Feng.info(data.msg);
- }, function (data) {
- Feng.error("操作失败!" + data.responseJSON.message + "!");
- });
- ajax.set(null);
- ajax.start();
- };
- Register.getPersionBtnCountDown = function () {
- if (persionCountDown == 0) {
- persionCountDown = 60;
- } else if (persionCountDown == 1) {
- psSmsBtn.removeAttr("disabled");
- psSmsBtn.html("获取验证码");
- persionCountDown = 0;
- return;
- }
- psSmsBtn.attr("disabled", true);
- psSmsBtn.html(persionCountDown + "秒");
- persionCountDown--;
- setTimeout("Register.getPersionBtnCountDown()", 1000);
- };
- /**
- * 企业用户注册回调
- */
- Register.epCallBack = function (data) {
- lock = false;
- var nowDis = $("#type").prop("disabled");
- if (isDis != nowDis) {
- $("#type").attr("disabled", "disabled");
- }
- Feng.info(data.msg);
- if (data.code == 200) {
- parent.layer.close(window.parent.Login.layerIndex);
- }
- };
- Register.typeChange = function () {
- $("#type").removeAttr("disabled");
- var type = $("#type").val();
- if (type == 1) {
- $("#typeGroup").attr("style", "display:block");
- } else {
- $("#typeGroup").attr("style", "display:none");
- $("#enterpriseTag,#industryFieldNew,#industryFieldOld").val("");
- }
- }
- Register.industryChange = function () {
- var industryNew = $("#industryFieldNew").val();
- var arr = [{"name": "industryFieldOld", "code": industryNew + "_field"}];
- Feng.findChildDictBatch(JSON.stringify(arr));
- }
- $(function () {
- $('#ep_form').bootstrapValidator({
- feedbackIcons: {
- valid: 'glyphicon glyphicon-ok',
- invalid: 'glyphicon glyphicon-remove',
- validating: 'glyphicon glyphicon-refresh'
- },
- group: '.rowGroup',
- fields: Register.validateFields,
- live: 'enabled',
- message: '该字段不能为空'
- });
- var userType = Feng.getUrlValue("userType");
- var username = Feng.getUrlValue("username");
- var name = Feng.getUrlValue("name");
- var idCard = Feng.getUrlValue("idCard");
- var type = Feng.getUrlValue("type");
- if (userType == 1) { //企业用户trigger
- $("#source").val(2);
- $("#username").val(username).attr("readonly", "readonly");
- $("#name").val(name).attr("readonly", "readonly");
- $("#idCard").val(idCard).attr("readonly", "readonly");
- $("#type").val(type).trigger("change");
- $("#type").attr("disabled", "disabled");
- $("#password").val("").attr("placeholder", "密码为聚才网账号密码").attr("readonly", "readonly");
- $("#re_password").val("").attr("placeholder", "密码为聚才网账号密码").attr("readonly", "readonly");
- $("#personTab").css("pointer-events", "none");
- } else if (userType == 2) { //个人用户
- $("#personTab").css("pointer-events", "block");
- $("#personTab").children().click();
- $("#ps_source").val(2);
- $("#ps_username").val(name).attr("readonly", "readonly");
- $("#ps_idCard").val(idCard).attr("readonly", "readonly");
- $("#ps_password").val("").attr("placeholder", "密码为聚才网账号密码").attr("readonly", "readonly");
- $("#ps_re_password").val("").attr("placeholder", "密码为聚才网账号密码").attr("readonly", "readonly");
- $("#enTab").css("pointer-events", "none");
- } else { //无
- }
- var arr = [
- {"name": "street", "code": "street"},
- {"name": "enterpriseTag", "code": "enterprise_tag"},
- {"name": "industryFieldNew", "code": "industry_field"},
- {"name": "enterpriseType", "code": "enterprise_type"},
- {"name": "sy_street", "code": "street"}];
- Feng.findChildDictBatch(JSON.stringify(arr));
- $("#imgurl,#sy_imgurl,#bankImg,#sy_bankImg,#beian,#domainImg").change(function (e) {
- var that = this;
- if (!Feng.chkFileInvalid(that.files[0], 5, 10)) {
- return;
- }
- var file = that.files[0];
- var imgSrc;
- var reader = new FileReader();
- reader.readAsDataURL(file);
- reader.onload = function () {
- if (Feng.isImg(file.type)) {
- imgSrc = this.result;
- $(that).prev("img").attr("src", imgSrc);
- } else {
- $(that).prev("img").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
- }
- };
- });
- });
|