|
|
@ -19,7 +19,7 @@
|
|
|
|
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
|
|
|
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
|
|
|
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
|
|
|
|
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
|
|
|
|
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
|
|
|
|
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
|
|
|
|
<script src="__STATIC__/czinputcheck.js?v=0527" type="text/javascript"></script>
|
|
|
|
<script src="__STATIC__/czinputcheck.js?v=07151710" type="text/javascript"></script>
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
.coin-detail{
|
|
|
|
.coin-detail{
|
|
|
|
display: block;
|
|
|
|
display: block;
|
|
|
@ -42,7 +42,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<div class="tab-content tabcon1711">
|
|
|
|
<div class="tab-content tabcon1711">
|
|
|
|
<!-- 表单 -->
|
|
|
|
<!-- 表单 -->
|
|
|
|
<!-- <form id="form" action="{:U('add')}" method="post" class="form-horizontal"> -->
|
|
|
|
<form id="form" >
|
|
|
|
<!-- 基础 -->
|
|
|
|
<!-- 基础 -->
|
|
|
|
<div id="tab1" class="tab-pane in tab1 ">
|
|
|
|
<div id="tab1" class="tab-pane in tab1 ">
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
|
@ -250,14 +250,12 @@
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-item cf" style="margin-bottom: 40px;">
|
|
|
|
<div class="form-item cf" style="margin-bottom: 40px;">
|
|
|
|
<button class="submit_btn " id="submit" style="margin-left:210px;">
|
|
|
|
<input class="submit_btn" type="button" value="保存" id="submit" target-form="form-horizontal" style="margin-left:210px;">
|
|
|
|
保存
|
|
|
|
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();" >
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:history.back(-1);" >
|
|
|
|
|
|
|
|
返回
|
|
|
|
返回
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- </form> -->
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="common_settings">
|
|
|
|
<div class="common_settings">
|
|
|
@ -314,6 +312,12 @@
|
|
|
|
language: "zh-CN",
|
|
|
|
language: "zh-CN",
|
|
|
|
minView: 2,
|
|
|
|
minView: 2,
|
|
|
|
autoclose: true
|
|
|
|
autoclose: true
|
|
|
|
|
|
|
|
}).change(function(){
|
|
|
|
|
|
|
|
var start = new Date($(this).val()).getTime();
|
|
|
|
|
|
|
|
var end = new Date($('#contact_end').val()).getTime();
|
|
|
|
|
|
|
|
if(isNaN(end)) {return false;}
|
|
|
|
|
|
|
|
if(start>=end) {layer.msg('开始时间必须小于结束时间');$("#contact_begin").val('');return false;}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('#datetimepicker').datetimepicker({
|
|
|
|
$('#datetimepicker').datetimepicker({
|
|
|
@ -322,7 +326,14 @@
|
|
|
|
minView: 2,
|
|
|
|
minView: 2,
|
|
|
|
autoclose: true,
|
|
|
|
autoclose: true,
|
|
|
|
pickerPosition: 'bottom-left'
|
|
|
|
pickerPosition: 'bottom-left'
|
|
|
|
})
|
|
|
|
}).change(function(){
|
|
|
|
|
|
|
|
var end = new Date($("#contact_end").val()).getTime();
|
|
|
|
|
|
|
|
var start = new Date($('#contact_begin').val()).getTime();
|
|
|
|
|
|
|
|
if(isNaN(start)) {return false;}
|
|
|
|
|
|
|
|
if(start>=end) {layer.msg('开始时间必须小于结束时间');$("#contact_end").val('');return false;}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$(".coin-detail").click(function () {
|
|
|
|
$(".coin-detail").click(function () {
|
|
|
|
var url = $(this).data('url');
|
|
|
|
var url = $(this).data('url');
|
|
|
|
var title = '文档添加';
|
|
|
|
var title = '文档添加';
|
|
|
@ -337,45 +348,22 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$("#submit").on("click",function(){
|
|
|
|
$("#submit").on("click",function(){
|
|
|
|
var obj = {
|
|
|
|
var obj = {
|
|
|
|
"company_name":["required","推广公司名称不允许为空"],
|
|
|
|
"company_name":["required",false,"推广公司名称不允许为空"],
|
|
|
|
"platform_name":["nocheck"],
|
|
|
|
"fax_ratio":["number",true,"开票税率必须是数字,如果无此项请填0"],
|
|
|
|
"contact_begin":["nocheck","合同开始时间不能为空"],
|
|
|
|
"contact_phone":["phone",true,"联系人电话格式不对"],
|
|
|
|
"contact_end":["nocheck","合同结束时间不能为空"],
|
|
|
|
"bank_card":["bankid",true,"银行卡格式错误"]
|
|
|
|
"fax_ratio":[["number",true],"开票税率必须是数字,如果无此项请填0"],
|
|
|
|
|
|
|
|
"company_type":["nocheck","公司性质不能为空","select"],
|
|
|
|
|
|
|
|
"is_sign_contact":["nocheck","是否签署合同项不能为空","select"],
|
|
|
|
|
|
|
|
"company_belong":["nocheck","团体归属不能为空","select"],
|
|
|
|
|
|
|
|
"settlement_contact":["nocheck","结算联系人不能为空"],
|
|
|
|
|
|
|
|
"contact_phone":[["phone",true],"联系人电话格式不对"],
|
|
|
|
|
|
|
|
"address":["nocheck","联系人地址不能为空"],
|
|
|
|
|
|
|
|
"bank_card":[["bankid",true],"银行卡格式错误"],
|
|
|
|
|
|
|
|
"bank_name":["nocheck","银行名称不能为空"],
|
|
|
|
|
|
|
|
"bank_address":["nocheck","帐户名不能为空"],
|
|
|
|
|
|
|
|
"ali_user":["nocheck","支付宝真实姓名不能为空"],
|
|
|
|
|
|
|
|
"ali_account":["nocheck","支付宝登陆账号不能为空"],
|
|
|
|
|
|
|
|
"content":["nocheck"],
|
|
|
|
|
|
|
|
"service_agreement_show":["nocheck","","select"],
|
|
|
|
|
|
|
|
"marketing_director_show":["nocheck","","radio"],
|
|
|
|
|
|
|
|
"status":["nocheck","","radio"],
|
|
|
|
|
|
|
|
"develop_type":["nocheck","开发类型不能为空","select"]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var cres = CIC.checkAddInput(obj);
|
|
|
|
|
|
|
|
if(!cres){
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Date.parse(cres.contact_begin) > Date.parse(cres.contact_end)) {
|
|
|
|
|
|
|
|
layer.msg('开始时间必须小于等于结束时间');
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!CIC.checkInput(obj)){ return false; }
|
|
|
|
|
|
|
|
var senddata = $("#form").serializeArray();
|
|
|
|
//验证通过
|
|
|
|
//验证通过
|
|
|
|
if(doc.length > 0){
|
|
|
|
if(doc.length > 0){
|
|
|
|
cres.resources = doc;
|
|
|
|
senddata.push({"name":"resources", "value":JSON.stringify(doc)});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//添加
|
|
|
|
//添加
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url:"{:U('PromoteCompany/add')}",
|
|
|
|
url:"{:U('PromoteCompany/add')}",
|
|
|
|
type:"post",
|
|
|
|
type:"post",
|
|
|
|
data:cres,
|
|
|
|
data:senddata,
|
|
|
|
dataType:"json",
|
|
|
|
dataType:"json",
|
|
|
|
success:function(data){
|
|
|
|
success:function(data){
|
|
|
|
if(data.status == 1){
|
|
|
|
if(data.status == 1){
|
|
|
|