|
|
|
@ -37,7 +37,7 @@
|
|
|
|
|
<!-- 标签页导航 -->
|
|
|
|
|
<div class="tab-wrap">
|
|
|
|
|
<div class="cf main-place top_nav_list navtab_list">
|
|
|
|
|
<h3 class="page_title">{$meta_title}</h3>
|
|
|
|
|
<h3 class="page_title">推广公司编辑</h3>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="tab-content tabcon1711">
|
|
|
|
@ -63,11 +63,11 @@
|
|
|
|
|
<td class="l">合同期限:</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<div class="input-list" style="margin:0;">
|
|
|
|
|
<input type="text" readonly id="contact_begin" name="contact_begin" class="" value="{$data.contact_begin}""
|
|
|
|
|
<input type="text" readonly id="contact_begin" name="contact_begin" class="" value="{$data.contact_begin}"
|
|
|
|
|
placeholder="合同开始时间" />
|
|
|
|
|
-
|
|
|
|
|
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
|
|
|
|
<input type="text" readonly id="contact_end" name="contact_end" class="" value="{:I('contact_end')}"
|
|
|
|
|
<input type="text" readonly id="contact_end" name="contact_end" class="" value="{$data.contact_end}"
|
|
|
|
|
placeholder="合同结束时间" />
|
|
|
|
|
<span class="add-on"><i class="icon-th"></i></span>
|
|
|
|
|
</div>
|
|
|
|
@ -77,7 +77,7 @@
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l">开票税点:</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<input type="number" class="txt" name="fax_ratio" value="0" placeholder="请输入开票税点">
|
|
|
|
|
<input type="number" class="txt" name="fax_ratio" value="{$data.fax_ratio}" placeholder="请输入开票税点">
|
|
|
|
|
<span>%</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
@ -87,8 +87,10 @@
|
|
|
|
|
<div class="input-list input-list-server search_label_rehab" style="margin:0;">
|
|
|
|
|
<select id="company_type" name="company_type" class="select_gallery" style="width: 215px;">
|
|
|
|
|
<option value="">请选择公司性质</option>
|
|
|
|
|
<option value="1">公司</option>
|
|
|
|
|
<option value="2">个人</option>
|
|
|
|
|
<option value="1" <if condition="$data['company_type'] eq 1">selected
|
|
|
|
|
</if>>公司</option>
|
|
|
|
|
<option value="2" <if condition="$data.company_type eq 2">selected
|
|
|
|
|
</if>>个人</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
@ -99,8 +101,10 @@
|
|
|
|
|
<div class="input-list input-list-server search_label_rehab" style="margin:0;">
|
|
|
|
|
<select id="is_sign_contact" name="is_sign_contact" class="select_gallery" style="width: 215px;">
|
|
|
|
|
<option value="">请选择是否签署合同</option>
|
|
|
|
|
<option value="0">否</option>
|
|
|
|
|
<option value="1">是</option>
|
|
|
|
|
<option value="0" <if condition="$data['is_sign_contact'] eq 0">selected
|
|
|
|
|
</if>>否</option>
|
|
|
|
|
<option value="1" <if condition="$data['is_sign_contact'] eq 1">selected
|
|
|
|
|
</if>>是</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
@ -111,10 +115,14 @@
|
|
|
|
|
<div class="input-list input-list-server search_label_rehab" style="margin:0;">
|
|
|
|
|
<select id="company_belong" name="company_belong" class="select_gallery" style="width: 215px;">
|
|
|
|
|
<option value="">请选择团体归属</option>
|
|
|
|
|
<option value="0">内团</option>
|
|
|
|
|
<option value="1">外团</option>
|
|
|
|
|
<option value="2">外团-分发</option>
|
|
|
|
|
<option value="3">其他</option>
|
|
|
|
|
<option value="0" <if condition="$data['company_belong'] eq 0">selected
|
|
|
|
|
</if>>内团</option>
|
|
|
|
|
<option value="1" <if condition="$data['company_belong'] eq 1">selected
|
|
|
|
|
</if>>外团</option>
|
|
|
|
|
<option value="2" <if condition="$data['company_belong'] eq 2">selected
|
|
|
|
|
</if>>外团-分发</option>
|
|
|
|
|
<option value="3" <if condition="$data['company_belong'] eq 3">selected
|
|
|
|
|
</if>>其他</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
@ -123,25 +131,25 @@
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>联系结算人:</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<input type="text" class="txt " name="settlement_contact" value="" placeholder="请输入结算联系人">
|
|
|
|
|
<input type="text" class="txt " name="settlement_contact" value="{$data.settlement_contact}" placeholder="请输入结算联系人">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>联系电话:</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<input type="text" class="txt " name="contact_phone" value="" placeholder="请输入联系电话">
|
|
|
|
|
<input type="text" class="txt " name="contact_phone" value="{$data.contact_phone}" placeholder="请输入联系电话">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>所在地址:</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<input type="text" class="txt " name="address" value="" placeholder="请输入所在地址">
|
|
|
|
|
<input type="text" class="txt " name="address" value="{$data.address}" placeholder="请输入所在地址">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>银行卡号:</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<input type="text" class="txt " name="bank_card" value="" placeholder="请输入银行卡号">
|
|
|
|
|
<input type="text" class="txt " name="bank_card" value="{$data.bank_card}" placeholder="请输入银行卡号">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<!-- <tr>
|
|
|
|
@ -153,19 +161,19 @@
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>收款银行:</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<input type="text" class="txt " name="bank_name" value="" placeholder="请输入收款银行">
|
|
|
|
|
<input type="text" class="txt " name="bank_name" value="{$data.bank_name}" placeholder="请输入收款银行">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>开户网点:</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<input type="text" class="txt " name="bank_address" value="" placeholder="请输入开户网点">
|
|
|
|
|
<input type="text" class="txt " name="bank_address" value="{$data.bank_address}" placeholder="请输入开户网点">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px"></i>备注:</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<input type="text" class="txt " name="content" value="" placeholder="">
|
|
|
|
|
<input type="text" class="txt " name="content" value="{$data.content}" placeholder="">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
@ -173,10 +181,12 @@
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<span class="form_radio table_btn">
|
|
|
|
|
<label>
|
|
|
|
|
<input type="radio" class="inp_radio" value="1" name="status" checked> 开启
|
|
|
|
|
<input type="radio" class="inp_radio" value="1" name="status" <if condition="$data['status'] eq 1">checked
|
|
|
|
|
</if>> 开启
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<input type="radio" class="inp_radio" value="0" name="status"> 关闭
|
|
|
|
|
<input type="radio" class="inp_radio" value="0" name="status" <if condition="$data['status'] eq 0">checked
|
|
|
|
|
</if>> 关闭
|
|
|
|
|
</label>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="notice-text"></span>
|
|
|
|
@ -188,12 +198,15 @@
|
|
|
|
|
<div class="coin-detail" data-url="{:U('PromoteCompany/addfile')}" style="margin:0px;background: #fff;color: #333;font-weight: 400;border: 1px solid #777;">
|
|
|
|
|
添加
|
|
|
|
|
</div>
|
|
|
|
|
<span style="margin-left:30px;color: red;">
|
|
|
|
|
* 新增加文档需要保存修改后生效,删除文档即时生效(取消保存修改也生效,请慎重删除)
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<table border="1" style="width: 600px;text-align: center;" cellspacing="0" cellpadding="0" id="docShow">
|
|
|
|
|
<table border="1" style="width: 600px;text-align: center;margin:10px 0 0 60px;" cellspacing="0" cellpadding="0" id="docShow">
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
@ -248,9 +261,69 @@
|
|
|
|
|
$('#submit').click(function(){
|
|
|
|
|
$('#form').submit();
|
|
|
|
|
});
|
|
|
|
|
var PROMOTE = {
|
|
|
|
|
juicerFun(){
|
|
|
|
|
var tpl =$("#doctpl").html();
|
|
|
|
|
var html = juicer(tpl, {list:doc});
|
|
|
|
|
$("#docShow").html(html);
|
|
|
|
|
PROMOTE.juicerEvent();
|
|
|
|
|
},
|
|
|
|
|
juicerEvent(){
|
|
|
|
|
$(".filedown,.filedel").off("click");
|
|
|
|
|
$(".filedown").on("click",function(){
|
|
|
|
|
var url = window.location.protocol+"//"+window.location.host+$(this).data("path");
|
|
|
|
|
// window.open(url,"_blank");
|
|
|
|
|
var link = document.createElement('a');
|
|
|
|
|
link.setAttribute("download", "");
|
|
|
|
|
link.href = url;
|
|
|
|
|
link.click()
|
|
|
|
|
});
|
|
|
|
|
$(".filedel").on("click",function(){
|
|
|
|
|
layer.confirm('删除将即时生效,并且无法回退。请慎重选择', {icon: 2, title:'删除提示'}, function(index){
|
|
|
|
|
var path = $(this).data("path");
|
|
|
|
|
var index = $(this).data("index");
|
|
|
|
|
var id = {$data.id};
|
|
|
|
|
var doccopy = doc.concat();
|
|
|
|
|
doccopy.splice(index,1)
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:"{:U('PromoteCompany/delFile')}",
|
|
|
|
|
type:"post",
|
|
|
|
|
data:{
|
|
|
|
|
"id":id,
|
|
|
|
|
"file_path":path,
|
|
|
|
|
"resources":doccopy
|
|
|
|
|
},
|
|
|
|
|
dataType:"json",
|
|
|
|
|
success:function(data){
|
|
|
|
|
if(data.status == 1){
|
|
|
|
|
doc.splice(index,1);
|
|
|
|
|
layer.msg(data.info,function(){
|
|
|
|
|
PROMOTE.juicerFun();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
layer.alert(data.info);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error:function(e){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|
var doc = [];
|
|
|
|
|
var doc = {$data.resources};
|
|
|
|
|
if(!doc){
|
|
|
|
|
doc = [];
|
|
|
|
|
}
|
|
|
|
|
var id = {$data.id};
|
|
|
|
|
PROMOTE.juicerFun();
|
|
|
|
|
|
|
|
|
|
function addFile(info) {
|
|
|
|
|
doc.push(info);
|
|
|
|
|
layer.closeAll();
|
|
|
|
@ -310,13 +383,14 @@
|
|
|
|
|
layer.msg('开始时间必须小于等于结束时间');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//验证通过
|
|
|
|
|
if(doc.length > 0){
|
|
|
|
|
cres.resources = doc;
|
|
|
|
|
}
|
|
|
|
|
//资源不需要二次修改
|
|
|
|
|
cres.resources = doc;
|
|
|
|
|
cres.id = id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//添加
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:"{:U('PromoteCompany/add')}",
|
|
|
|
|
url:"{:U('PromoteCompany/edit')}",
|
|
|
|
|
type:"post",
|
|
|
|
|
data:cres,
|
|
|
|
|
dataType:"json",
|
|
|
|
@ -335,51 +409,7 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
var PROMOTE = {
|
|
|
|
|
juicerFun(){
|
|
|
|
|
var tpl =$("#doctpl").html();
|
|
|
|
|
var html = juicer(tpl, {list:doc});
|
|
|
|
|
$("#docShow").html(html);
|
|
|
|
|
PROMOTE.juicerEvent();
|
|
|
|
|
},
|
|
|
|
|
juicerEvent(){
|
|
|
|
|
$(".filedown,.filedel").off("click");
|
|
|
|
|
$(".filedown").on("click",function(){
|
|
|
|
|
var url = window.location.protocol+"//"+window.location.host+$(this).data("path");
|
|
|
|
|
// window.open(url,"_blank");
|
|
|
|
|
var link = document.createElement('a');
|
|
|
|
|
link.setAttribute("download", "");
|
|
|
|
|
link.href = url;
|
|
|
|
|
link.click()
|
|
|
|
|
});
|
|
|
|
|
$(".filedel").on("click",function(){
|
|
|
|
|
var path = $(this).data("path");
|
|
|
|
|
var index = $(this).data("index");
|
|
|
|
|
console.log(index);
|
|
|
|
|
var id = 0;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:"{:U('PromoteCompany/delFile')}",
|
|
|
|
|
type:"post",
|
|
|
|
|
data:{
|
|
|
|
|
"id":0,
|
|
|
|
|
"file_path":path
|
|
|
|
|
},
|
|
|
|
|
dataType:"json",
|
|
|
|
|
success:function(data){
|
|
|
|
|
if(data.status == 1){
|
|
|
|
|
doc.splice(index,1)
|
|
|
|
|
PROMOTE.juicerFun();
|
|
|
|
|
}else{
|
|
|
|
|
layer.alert(data.info);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error:function(e){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
</block>
|
|
|
|
|