267 lines
12 KiB
PHTML
Executable File
267 lines
12 KiB
PHTML
Executable File
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<title>商务订单</title>
|
||
<meta name="keywords" content="Honors and Certificates, ORICO">
|
||
<meta name="description" content="ORICO is a brand that is deeply rooted in the exploration and application of USB technology. It has achieved remarkable results in fields of USB storage, charging and transmission for many years.">
|
||
{include file="include/head" /}
|
||
<script type="text/javascript">
|
||
var navID = "1";
|
||
</script>
|
||
<!--link rel="stylesheet" type="text/css" href="__PUBLIC__/m_weben/css/subject/honor.css"-->
|
||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/m_weben/css/app.css?v={:time()}">
|
||
</head>
|
||
<body style="background-color:#FFF;">
|
||
<div id="content">
|
||
<!--头部-->
|
||
{include file="include/top_back1" /}
|
||
|
||
<div class="bdpage" style="background: #fff;border-radius: 8px;padding-top: 50px;">
|
||
<div class="bd_main bd_main1 bd_main2" >
|
||
<h1 class="t1 sfbt1">批量购买</h1>
|
||
<!--内容-->
|
||
<div class="bd_ct ">
|
||
<div class="bd_from" style="padding: 0 16px;">
|
||
<div class="theit">
|
||
<div class="bditem">
|
||
<label class="itlable">公司名称<span class="redtag">*</span></label>
|
||
<input type="text" class="form-control itinp companyName" placeholder="法定营业名称">
|
||
</div>
|
||
</div>
|
||
<div class="theit">
|
||
<div class="bditem">
|
||
<label class="itlable">官方网站</label>
|
||
<input type="text" class="form-control itinp url" placeholder="请粘贴网址">
|
||
</div>
|
||
</div>
|
||
<div class="theit">
|
||
<div class="bditem">
|
||
<label class="itlable">姓名<span class="redtag">*</span></label>
|
||
<input type="text" class="form-control itinp firstname" placeholder="名">
|
||
<input type="text" class="form-control itinp lastname" placeholder="姓" style="margin-top: 8px;">
|
||
</div>
|
||
</div>
|
||
<div class="theit">
|
||
<div class="bditem">
|
||
<label class="itlable">邮箱<span class="redtag">*</span></label>
|
||
<input type="text" class="form-control itinp email">
|
||
</div>
|
||
</div>
|
||
<div class="theit">
|
||
<div class="bditem bditem1">
|
||
<label class="itlable">电话号码</label>
|
||
<input type="text" class="form-control itinp 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="Computer Peripheral" class="sfbcheckboxit">电脑配件
|
||
</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="Phone Peripheral" name="interested" class="sfbcheckboxit">手机配件</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="Electronics" name="interested" class="sfbcheckboxit">电子电工
|
||
</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="SSD" name="interested" class="sfbcheckboxit">固态硬盘
|
||
</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="Entertainment Series" name="interested" class="sfbcheckboxit">娱乐系列
|
||
</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="Smart Life Series" name="interested" class="sfbcheckboxit">智能生活
|
||
</label>
|
||
<label class="cit">
|
||
<input type="checkbox" value="Outdoor Power Station" 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>
|
||
<!-- 详情页 e -->
|
||
</div>
|
||
<script>
|
||
$(function() {
|
||
// 输入框失去焦点
|
||
$('.companyName').blur(function(){
|
||
if($('.companyName').val() != ''){
|
||
$('.companyName').removeClass('error');
|
||
$('.companyName').next('span').addClass('hide');
|
||
}else{
|
||
$('.companyName').addClass('error');
|
||
$('.companyName').next('span').removeClass('hide');
|
||
}
|
||
})
|
||
$('.firstname').blur(function(){
|
||
if($('.firstname').val() != ''){
|
||
$('.firstname').removeClass('error');
|
||
$('.firstname').next('span').addClass('hide');
|
||
}else{
|
||
$('.firstname').addClass('error');
|
||
$('.firstname').next('span').removeClass('hide');
|
||
}
|
||
})
|
||
$('.lastname').blur(function(){
|
||
if($('.lastname').val() != ''){
|
||
$('.lastname').removeClass('error');
|
||
$('.lastname').next('span').addClass('hide');
|
||
}else{
|
||
$('.lastname').addClass('error');
|
||
$('.lastname').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 = $('.firstname').val();
|
||
var lastName = $('.lastname').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 == ''){
|
||
$('.firstname').addClass('error');
|
||
$('.firstname').next('span').removeClass('hide');
|
||
}
|
||
if(lastName == ''){
|
||
$('.lastname').addClass('error');
|
||
$('.lastname').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: "/usmobile/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 = '/usmobile/Group/submission.html';
|
||
|
||
}
|
||
else{
|
||
if(data.code == 403 || data.code == 201) {
|
||
alert(data.msg);
|
||
}
|
||
else{
|
||
|
||
$('.email').addClass('error');
|
||
$('.email').next('span').removeClass('hide');
|
||
|
||
}
|
||
}
|
||
|
||
}
|
||
});
|
||
|
||
}
|
||
|
||
})
|
||
})
|
||
|
||
$(function (doc, win) {
|
||
var docEl = doc.documentElement;
|
||
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
|
||
recalc = function () {
|
||
var clientWidth = docEl.clientWidth;
|
||
if (!clientWidth) return;
|
||
docEl.style.fontSize = 50 * (clientWidth / 375) + 'px';
|
||
};
|
||
if (!doc.addEventListener) return;
|
||
win.addEventListener(resizeEvt, recalc, false);
|
||
doc.addEventListener('DOMContentLoaded', recalc, false);
|
||
}(document,window));
|
||
</script>
|
||
<!--底部-->
|
||
{include file="include/bottom1" /}
|
||
|
||
</body>
|
||
</html> |