266 lines
9.8 KiB
PHTML
Executable File
266 lines
9.8 KiB
PHTML
Executable File
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
{include file="include/head" /}
|
||
<meta charset="UTF-8">
|
||
<title>商务订单</title>
|
||
|
||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/weben/css/cooperation.css">
|
||
|
||
</head>
|
||
|
||
<body style="background:#F2F2F2;">
|
||
{include file="include/top-head2023" /}
|
||
|
||
<!--Bult Buy-->
|
||
<div class="bdpage" >
|
||
<div class="bd_main bd_main1">
|
||
<h1 class="t1 sfbt1">批量购买</h1>
|
||
<!--内容-->
|
||
<div class="bd_ct ">
|
||
<div class="bd_from" style="padding: 0 300px;">
|
||
<div class="theit">
|
||
<div class="bditem">
|
||
<label class="itlable">公司名称<span class="redtag">*</span></label>
|
||
<input type="text" class="form-control itinp companyName" placeholder="法定营业名称" name="company" id="company">
|
||
</div>
|
||
</div>
|
||
<div class="theit">
|
||
<div class="bditem">
|
||
<label class="itlable">官方网站</label>
|
||
<input type="text" class="form-control itinp url" placeholder="请粘贴网址" name="url" id="url">
|
||
</div>
|
||
</div>
|
||
<div class="theit">
|
||
<div class="bditem">
|
||
<label class="itlable">姓名<span class="redtag">*</span></label>
|
||
<input type="text" class="form-control itinp first" placeholder="名" name="firstname" id="firstname">
|
||
</div>
|
||
|
||
<div class="bditem">
|
||
<label class="itlable"> </label>
|
||
<input type="text" class="form-control itinp last" placeholder="姓" name="lastname" id="lastname">
|
||
</div>
|
||
</div>
|
||
<div class="theit">
|
||
<div class="bditem">
|
||
<label class="itlable">邮箱<span class="redtag">*</span></label>
|
||
<input type="email" class="form-control itinp email" name="email" id="email">
|
||
</div>
|
||
</div>
|
||
<div class="theit">
|
||
<div class="bditem bditem1">
|
||
<label class="itlable">电话号码</label>
|
||
<input type="text" class="form-control itinp phone" name="phone" id="phone">
|
||
</div>
|
||
</div>
|
||
<div class="theit">
|
||
<div class="bditem bditem1">
|
||
<label class="itlable">您对哪个产品品类感兴趣?</label>
|
||
<div class="sfbchecks">
|
||
<form class="sfbcheckboxlist" action="" method="get">
|
||
<label class="cit">
|
||
<input name="interested" type="checkbox" value="电脑配件" class="sfbcheckboxit">电脑配件
|
||
</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="手机配件" name="interested" class="sfbcheckboxit">手机配件</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="电子电工" name="interested" class="sfbcheckboxit">电子电工
|
||
</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="固态硬盘" name="interested" class="sfbcheckboxit">固态硬盘
|
||
</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="娱乐系列" name="interested" class="sfbcheckboxit">娱乐系列
|
||
</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="智能生活" name="interested" class="sfbcheckboxit">智能生活
|
||
</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="户外电源" name="interested" class="sfbcheckboxit">户外电源
|
||
</label>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="theit">
|
||
<div class="bditem bditem1">
|
||
<label class="itlable">留言<span class="redtag">*</span></label>
|
||
<textarea class="ittextarea ittextarea2 message" placeholder="留言"></textarea>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 提交-->
|
||
<div class="bttj">提交</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<!-- bottom s -->
|
||
{include file="include/bottom2023" /}
|
||
<!-- bottom e -->
|
||
<script>
|
||
try {
|
||
k_win_ref = window.parent.document.referrer;
|
||
} catch(e) {
|
||
k_win_ref = '';
|
||
};
|
||
/*弹出框关闭*/
|
||
$(function() {
|
||
// 输入框失去焦点
|
||
$('.companyName').blur(function(){
|
||
if($('.companyName').val() != ''){
|
||
$('.companyName').removeClass('error');
|
||
$('.companyName').next('span').addClass('hide');
|
||
}else{
|
||
$('.companyName').addClass('error');
|
||
$('.companyName').next('span').removeClass('hide');
|
||
}
|
||
})
|
||
$('.first').blur(function(){
|
||
if($('.first').val() != ''){
|
||
$('.first').removeClass('error');
|
||
$('.first').next('span').addClass('hide');
|
||
}else{
|
||
$('.first').addClass('error');
|
||
$('.first').next('span').removeClass('hide');
|
||
}
|
||
})
|
||
$('.last').blur(function(){
|
||
if($('.last').val() != ''){
|
||
$('.last').removeClass('error');
|
||
$('.last').next('span').addClass('hide');
|
||
}else{
|
||
$('.last').addClass('error');
|
||
$('.last').next('span').removeClass('hide');
|
||
}
|
||
})
|
||
$('.email').blur(function(){
|
||
if($('.email').val() != ''){
|
||
$('.email').removeClass('error');
|
||
$('.email').next('span').addClass('hide');
|
||
}else{
|
||
$('.email').addClass('error');
|
||
$('.email').next('span').removeClass('hide');
|
||
}
|
||
})
|
||
$('.phone').blur(function(){
|
||
if($('.phone').val() != ''){
|
||
$('.phone').removeClass('error');
|
||
$('.phone').next('span').addClass('hide');
|
||
}else{
|
||
$('.phone').addClass('error');
|
||
$('.phone').next('span').removeClass('hide');
|
||
}
|
||
})
|
||
$('.message').blur(function(){
|
||
if($('.message').val() != ''){
|
||
$('.message').removeClass('error');
|
||
$('.message').next('span').addClass('hide');
|
||
}else{
|
||
$('.message').addClass('error');
|
||
$('.message').next('span').removeClass('hide');
|
||
}
|
||
})
|
||
|
||
// 提交表单
|
||
$('.bttj').click(function(){
|
||
var companyName = $('.companyName').val();
|
||
var firstName = $('.first').val();
|
||
var lastName = $('.last').val();
|
||
var email = $('.email').val();
|
||
var phone = $('.phone').val();
|
||
var message = $('.message').val();
|
||
var url = $('.url').val();
|
||
|
||
var checkItem = new Array();
|
||
|
||
$("input[name='interested']:checked").each(function() {
|
||
checkItem.push($(this).val());// 在数组中追加元素
|
||
});
|
||
var interesteds = checkItem.join(",");
|
||
|
||
var inventory = $("input[name='inventory']:checked").val();
|
||
|
||
|
||
if(companyName == ''){
|
||
$('.companyName').addClass('error');
|
||
$('.companyName').next('span').removeClass('hide');
|
||
}
|
||
if(firstName == ''){
|
||
$('.first').addClass('error');
|
||
$('.first').next('span').removeClass('hide');
|
||
}
|
||
if(lastName == ''){
|
||
$('.last').addClass('error');
|
||
$('.last').next('span').removeClass('hide');
|
||
}
|
||
if(email == ''){
|
||
$('#email').addClass('error');
|
||
$('#email').next('span').removeClass('hide');
|
||
}
|
||
else{
|
||
if (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(email) == false) {
|
||
$('#email').addClass('error');
|
||
$('#email').next('span').removeClass('hide');
|
||
}
|
||
}
|
||
if(phone == ''){
|
||
$('.phone').addClass('error');
|
||
$('.phone').next('span').removeClass('hide');
|
||
}
|
||
if(message == ''){
|
||
$('.message').addClass('error');
|
||
$('.message').next('span').removeClass('hide');
|
||
}
|
||
|
||
//点击创建申请块
|
||
|
||
if(companyName && firstName && lastName && email && phone && message) {
|
||
|
||
|
||
$.ajax({
|
||
type: "POST",
|
||
url: "/us/bulk_inquiry/create",
|
||
data: {'company':companyName, 'url':url, 'email':email,'name':firstName,'last_name':lastName,'phone':phone,'interested':interesteds,'message':message,'refer':k_win_ref},
|
||
dataType: "json",
|
||
success: function(data){
|
||
if(data.code == 200) {
|
||
//alert(data.msg);
|
||
|
||
$("input[ type='text']").val('');
|
||
$(":input[name='interested']").attr("checked",false);
|
||
$('.region').val('');
|
||
|
||
location.href = '/us/Group/submission.html';
|
||
|
||
}
|
||
else{
|
||
if(data.code == 403 || data.code == 201) {
|
||
alert(data.msg);
|
||
}
|
||
else{
|
||
|
||
$('.email').addClass('error');
|
||
$('.email').next('span').removeClass('hide');
|
||
|
||
}
|
||
}
|
||
|
||
}
|
||
});
|
||
|
||
}
|
||
|
||
})
|
||
})
|
||
</script>
|
||
<style>
|
||
.csunbmit{height: 35px;margin-top: 10px;margin-bottom: 5px;}
|
||
.submitBtn{width: 75px;height: 30px;line-height: 26px;background-color: #339b53;text-align: center;display: block; color: #FFFFFF;font-size: 12px;border-radius: 6px;float: left;}
|
||
.cli{border-bottom: 1px dashed #ccc;text-align: left;font-size: 12px;}
|
||
.ccontent{width: 98%;padding: 10px; background: #f6f9fb;border:1px solid #ccc;margin-bottom: 10px}
|
||
</style>
|
||
</body>
|
||
</html> |