|
|
|
@ -42,7 +42,7 @@
|
|
|
|
|
|
|
|
|
|
<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 ">
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
|
|
@ -261,14 +261,12 @@
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-item cf" style="margin-bottom: 40px;">
|
|
|
|
|
<button class="submit_btn " id="submit" style="margin-left:210px;">
|
|
|
|
|
保存
|
|
|
|
|
</button>
|
|
|
|
|
<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:history.back(-1);" >
|
|
|
|
|
返回
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- </form> -->
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="common_settings">
|
|
|
|
@ -385,6 +383,12 @@
|
|
|
|
|
language: "zh-CN",
|
|
|
|
|
minView: 2,
|
|
|
|
|
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({
|
|
|
|
@ -393,7 +397,15 @@
|
|
|
|
|
minView: 2,
|
|
|
|
|
autoclose: true,
|
|
|
|
|
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 () {
|
|
|
|
|
var url = $(this).data('url');
|
|
|
|
|
var title = '文档添加';
|
|
|
|
@ -408,46 +420,22 @@
|
|
|
|
|
});
|
|
|
|
|
$("#submit").on("click",function(){
|
|
|
|
|
var obj = {
|
|
|
|
|
"company_name":["required","推广公司名称不允许为空"],
|
|
|
|
|
"platform_name":[["nocheck",true]],
|
|
|
|
|
"contact_begin":[["nocheck",true],"合同开始时间不能为空"],
|
|
|
|
|
"contact_end":[["nocheck",true],"合同结束时间不能为空"],
|
|
|
|
|
"fax_ratio":[["number",true],"开票税率必须是数字,如果无此项请填0"],
|
|
|
|
|
"company_type":["nocheck","公司性质不能为空","select"],
|
|
|
|
|
"is_sign_contact":["nocheck","是否签署合同项不能为空","select"],
|
|
|
|
|
"company_belong":["nocheck","团体归属不能为空","select"],
|
|
|
|
|
"settlement_contact":[["nocheck",true],"结算联系人不能为空"],
|
|
|
|
|
"contact_phone":[["phone",true],"联系人电话格式不对"],
|
|
|
|
|
"address":[["nocheck",true],"联系人地址不能为空"],
|
|
|
|
|
"bank_card":[["bankid",true],"银行卡格式错误"],
|
|
|
|
|
"bank_name":[["nocheck",true],"银行名称不能为空"],
|
|
|
|
|
"bank_address":[["nocheck",true],"帐户名不能为空"],
|
|
|
|
|
"ali_user":[["nocheck",true],"支付宝真实姓名不能为空"],
|
|
|
|
|
"ali_account":[["nocheck",true],"支付宝登陆账号不能为空"],
|
|
|
|
|
"content":[["nocheck",true]],
|
|
|
|
|
"develop_type":["nocheck","开发类型不能为空","select"],
|
|
|
|
|
"status":["nocheck","","radio"],
|
|
|
|
|
"service_agreement_show":["nocheck","","select"],
|
|
|
|
|
"marketing_director_show":["nocheck","","radio"],
|
|
|
|
|
}
|
|
|
|
|
var cres = CIC.checkAddInput(obj);
|
|
|
|
|
if(!cres){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (Date.parse(cres.contact_begin) > Date.parse(cres.contact_end)) {
|
|
|
|
|
layer.msg('开始时间必须小于等于结束时间');
|
|
|
|
|
return false;
|
|
|
|
|
"company_name":["required",false,"推广公司名称不允许为空"],
|
|
|
|
|
"fax_ratio":["number",true,"开票税率必须是数字,如果无此项请填0"],
|
|
|
|
|
"contact_phone":["phone",true,"联系人电话格式不对"],
|
|
|
|
|
"bank_card":["bankid",true,"银行卡格式错误"]
|
|
|
|
|
}
|
|
|
|
|
if(!CIC.checkInput(obj)){ return false; }
|
|
|
|
|
var senddata = $("#form").serializeArray();
|
|
|
|
|
senddata.push({"name":"resources", "value":JSON.stringify(doc)});
|
|
|
|
|
senddata.push({"name":"id", "value":id});
|
|
|
|
|
//资源不需要二次修改
|
|
|
|
|
cres.resources = doc;
|
|
|
|
|
cres.id = id;
|
|
|
|
|
|
|
|
|
|
console.log(cres);
|
|
|
|
|
//添加
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:"{:U('PromoteCompany/edit')}",
|
|
|
|
|
type:"post",
|
|
|
|
|
data:cres,
|
|
|
|
|
data:senddata,
|
|
|
|
|
dataType:"json",
|
|
|
|
|
success:function(data){
|
|
|
|
|
if(data.status == 1){
|
|
|
|
|