247 行
6.5 KiB
JavaScript
可执行文件
247 行
6.5 KiB
JavaScript
可执行文件
function wxtypeChange() {
|
||
if ($('[name="WxAccountType"]:checked').val() === "0" || $('[name="WxAccountType"]:checked').val() === "2") {
|
||
$("#wxcompany").show();
|
||
$("#wxpersonal").hide();
|
||
$("#zz").show();
|
||
$("#cc").hide();
|
||
$(".qy").show();
|
||
$(".gr").hide();
|
||
|
||
$('#BankCardID').addClass("novalid");
|
||
$('#BankPermitAccount').removeClass("novalid");
|
||
}
|
||
else {
|
||
$(".qy").hide();
|
||
$(".gr").show();
|
||
$("#zz").hide();
|
||
$("#cc").show();
|
||
$("#wxpersonal").show();
|
||
$("#wxcompany").hide();
|
||
$('#BankCardID').removeClass("novalid");
|
||
$('#BankPermitAccount').addClass("novalid");
|
||
}
|
||
}
|
||
|
||
function ZFBChange() {
|
||
$("#wxcompany").hide();
|
||
$("#wxpersonal").hide();
|
||
}
|
||
|
||
$(function () {
|
||
//$(".wxtype").click(function () {
|
||
// wxtypeChange();
|
||
//});
|
||
wxtypeChange();
|
||
$('form').loadingForm({
|
||
success: function (d) {
|
||
location.href = '/SiteManage/SiteInfo/?id=' + d.Data;
|
||
}
|
||
});
|
||
});
|
||
|
||
function openDialogAlipay() {
|
||
$(".wxtype").click(function () {
|
||
ZFBChange();
|
||
});
|
||
$("#zfbzh").show();
|
||
$("#hzzpid").show();
|
||
$("#zfbmtz").show();
|
||
$("#zfbnj").show();
|
||
$("#weixinpid").hide();
|
||
|
||
$("#hangxi").hide();
|
||
$("#wxcompany").hide();
|
||
$("#wxpersonal").hide();
|
||
|
||
|
||
if (!$("form").valid()) {
|
||
return;
|
||
}
|
||
layer.open({
|
||
type: 1,
|
||
title: '签约支付宝',
|
||
area: ['950px', '520px'],
|
||
btn: ['保存'],
|
||
content: $('#weixin'),
|
||
yes: function (index) {
|
||
|
||
if ($('#ZhiFuBaoAccount').val() == "") {
|
||
top.layer.alert("请填写支付宝帐号!");
|
||
return;
|
||
}
|
||
//if ($('#AlipayPartner').val() == "") {
|
||
// top.layer.alert("请填写合作者身份PID!");
|
||
// return;
|
||
//}
|
||
if ($('#ShopFrontPic').val() == "") {
|
||
top.layer.alert("请上传门头照!");
|
||
return;
|
||
}
|
||
if ($('#RoomPic1').val() == "" || $('#RoomPic2').val() == "" || $('#RoomPic3').val() == "") {
|
||
top.layer.alert("请上传内景照!");
|
||
return;
|
||
}
|
||
|
||
if ($('#AppendixArea').is(':visible') && $('input[name=AppendixPic]').length == 0) {
|
||
top.layer.alert("请上传特殊资质");
|
||
return;
|
||
}
|
||
|
||
|
||
|
||
if (validatedialog('alipay')) {
|
||
layer.closeAll();
|
||
$('.wyhaha').attr('src', '/Content/img/kt_zfb.png');
|
||
$('.wyhheihei').css('color', '#2db7f5');
|
||
}
|
||
|
||
|
||
}
|
||
|
||
|
||
});
|
||
|
||
}
|
||
function openDialogQQ() {
|
||
if (!$("form").valid()) {
|
||
return;
|
||
}
|
||
var canSubmit = true;
|
||
$('#weixin').find('input[type=text]').each(function () {
|
||
if ($(this).val() == "") {
|
||
layer.tips('请先提交开通微信签约信息', $('#openDialogWeixinBtn'), {
|
||
tips: [2, '#2db7f5']
|
||
});
|
||
canSubmit = false;
|
||
return false;
|
||
|
||
}
|
||
});
|
||
if (!canSubmit) {
|
||
return;
|
||
}
|
||
layer.open({
|
||
type: 1,
|
||
title: '签约百度京东QQ',
|
||
area: ['900px', '450px'],
|
||
btn: ['保存'],
|
||
content: $('#qq'),
|
||
yes: function (index) {
|
||
if (validatedialog('qq')) {
|
||
layer.close(index);
|
||
$('.qqwy').attr('src', '/Content/img/kt_shy.png');
|
||
|
||
$('.qqwya').css('color', '#2db7f5');
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
function validatedialog(id) {
|
||
var isTrue = true;
|
||
$('#' + id + ' [data-val-required]').each(function () {
|
||
if (!$(this).hasClass('novalid')) {
|
||
if ($(this).val() == '') {
|
||
top.layer.alert($(this).data('val-required'));
|
||
isTrue = false;
|
||
$(this).focus();
|
||
return false;
|
||
}
|
||
}
|
||
});
|
||
return isTrue;
|
||
}
|
||
|
||
function openDialogWeiXin() {
|
||
$(".wxtype").click(function () {
|
||
wxtypeChange();
|
||
});
|
||
wxtypeChange();
|
||
$("#zfbzh").hide();
|
||
$("#hzzpid").hide();
|
||
$("#zfbmtz").hide();
|
||
$("#zfbnj").hide();
|
||
$("#weixinpid").show();
|
||
$("#hangxi").show();
|
||
if (!$("form").valid()) {
|
||
return;
|
||
}
|
||
layer.open({
|
||
type: 1,
|
||
title: '签约微信',
|
||
area: ['950px', '500px'],
|
||
btn: ['保存'],
|
||
content: $('#weixin'),
|
||
yes: function (index) {
|
||
var isTrue = validatedialog('weixin');
|
||
if (!isTrue) {
|
||
return;
|
||
}
|
||
|
||
if ($('[name="WxAccountType"]:checked').val() === "0" && $('#AppId').val()=="") {
|
||
top.layer.alert("请填写微信AppId!");
|
||
return;
|
||
}
|
||
if ($('#AppendixArea').is(':visible') && $('input[name=AppendixPic]').length == 0) {
|
||
top.layer.alert("请上传特殊资质");
|
||
return;
|
||
}
|
||
if ($('#BankPermitInfo').val() == "") {
|
||
top.layer.alert("请填写开户行信息!");
|
||
return;
|
||
}
|
||
if ($('[name="WxAccountType"]:checked').val() === "0" && $('#BankPermitAccount').val() == "") {
|
||
top.layer.alert("请填写对公帐号");
|
||
return;
|
||
|
||
}
|
||
|
||
if ($('[name="WxAccountType"]:checked').val() === "1" && $('#BankCardId').val() == "") {
|
||
top.layer.alert("请填写法人银行卡帐号!");
|
||
return;
|
||
|
||
}
|
||
|
||
|
||
|
||
layer.close(index);
|
||
$('.wxwy').attr('src', '/Content/img/kt_wx.png');
|
||
|
||
$('.wxwya').css('color', '#2db7f5');
|
||
|
||
|
||
|
||
}
|
||
});
|
||
}
|
||
function openDialogPengYouQuan() {
|
||
if (!$("form").valid()) {
|
||
return;
|
||
}
|
||
layer.open({
|
||
type: 1,
|
||
title: '开通朋友圈',
|
||
area: ['450px', '170px'],
|
||
btn: ['保存'],
|
||
content: $('#pengyouquan'),
|
||
yes: function (index) {
|
||
if (validatedialog('pengyouquan')) {
|
||
layer.close(index);
|
||
$('.pyquanwy').attr('src', '/Content/img/kt_pyq.png');
|
||
|
||
$('.pyquanwya').css('color', '#2db7f5');
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
function btnsubmit() {
|
||
//因为图片是否上传无法通过验证插件验证,只能写代码判断了
|
||
if ($('#BusinessPic').val() == '') {
|
||
top.layer.alert("请上传营业执照");
|
||
return false;
|
||
}
|
||
|
||
$('form').submit();
|
||
return true;
|
||
} |