You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

459 lines
23 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<extend name="Public/base" />
<block name="css">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<style>
#form .txt_area.download_url {width:400px;}
.tabcon1711 .table_radio2 .table_btn {width:215px;}
</style>
</block>
<block name="body">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script src="__STATIC__/md5.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.js"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.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 src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/czinputcheck.js?v=1.29" type="text/javascript"></script>
<style>
.coin-detail{
display: block;
float: left;
text-align: center;
line-height: 35px;
width: 100px;
height: 35px;
font-size: 14px;
border-radius: 4px;
cursor: pointer;
}
</style>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">推广公司编辑</h3>
</div>
<div class="tab-content tabcon1711">
<!-- 表单 -->
<form id="form">
<!-- 基础 -->
<div id="tab1" class="tab-pane in tab1 ">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>推广公司名称:</td>
<td class="r" >
<input type="text" class="txt " name="company_name" value="{$data.company_name}" placeholder="请输入推广公司名称">
</td>
</tr>
<tr>
<td class="l">对应平台(简称):</td>
<td class="r" >
<input type="text" class="txt " name="platform_name" value="{$data.platform_name}" placeholder="请输入对应平台">
</td>
</tr>
<tr>
<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}"
placeholder="合同开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<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>
</div>
</td>
</tr>
<tr>
<td class="l">开票税点:</td>
<td class="r" >
<input type="number" class="txt" name="fax_ratio" value="{$data.fax_ratio}" placeholder="请输入开票税点">
<span>%</span>
</td>
</tr>
<tr>
<td class="l">公司性质:</td>
<td class="r" >
<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" <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>
</tr>
<tr>
<td class="l">是否签署合同:</td>
<td class="r" >
<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" <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>
</tr>
<tr>
<td class="l">是否展示合同服务协议:</td>
<td class="r" >
<div class="input-list input-list-server search_label_rehab" style="margin:0;">
<select id="service_agreement_show" name="service_agreement_show" class="select_gallery" style="width: 215px;">
<!-- <option value="">请选择是否签署合同</option> -->
<option value="0" selected>不显示</option>
<?php foreach($serviceAgreements as $index => $service):?>
<option value="{$service.id}" <?php if($service['id'] == $data['service_agreement_show']):?>selected<?php endif;?>>{$service.name}</option>
<?php endforeach;?>
</select>
</div>
</td>
</tr>
<tr>
<td class="l">团体归属:</td>
<td class="r" >
<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> -->
<volist name=":getCompanyBlong()" id="vo">
<option value="{$vo.id}" <php> if($data['company_belong'] !='' && $vo['id'] == $data['company_belong'])echo selected;</php>>{$vo.name}</option>
</volist>
</select>
</div>
</td>
</tr>
<tr>
<td class="l">联系结算人:</td>
<td class="r" >
<input type="text" class="txt " name="settlement_contact" value="{$data.settlement_contact}" placeholder="请输入结算联系人">
</td>
</tr>
<tr>
<td class="l">联系电话:</td>
<td class="r" >
<input type="text" class="txt " name="contact_phone" value="{$data.contact_phone}" placeholder="请输入联系电话">
</td>
</tr>
<tr>
<td class="l">所在地址:</td>
<td class="r" >
<input type="text" class="txt " name="address" value="{$data.address}" placeholder="请输入所在地址">
</td>
</tr>
<tr>
<td class="l">银行卡号:</td>
<td class="r" >
<input type="text" class="txt " name="bank_card" value="{$data.bank_card}" 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_cardname" value="" placeholder="请输入银行卡名">
</td>
</tr> -->
<tr>
<td class="l">收款银行:</td>
<td class="r" >
<input type="text" class="txt " name="bank_name" value="{$data.bank_name}" placeholder="请输入收款银行">
</td>
</tr>
<tr>
<td class="l">账户名:</td>
<td class="r" >
<input type="text" class="txt " name="bank_address" value="{$data.bank_address}" placeholder="请输入账户名">
</td>
</tr>
<tr>
<td class="l">支付宝真实姓名:</td>
<td class="r" >
<input type="text" class="txt " name="ali_user" value="{$data.ali_user}" placeholder="请输入支付宝真实姓名">
</td>
</tr>
<tr>
<td class="l">支付宝登陆账号:</td>
<td class="r" >
<input type="text" class="txt " name="ali_account" value="{$data.ali_account}" placeholder="可以是手机及邮箱等">
</td>
</tr>
<tr>
<td class="l">开发类型:</td>
<td class="r" >
<select id="develop_type" name="develop_type" class="select_gallery" style="width: 215px;">
<option value="">请选择开发类型</option>
<option value="1" <if condition="$data.develop_type eq 1">selected</if>>自主开发</option>
<option value="2" <if condition="$data.develop_type eq 2">selected</if>>自主开发及维护</option>
<option value="3" <if condition="$data.develop_type eq 3">selected</if>>只维护</option>
</select>
</td>
</tr>
<tr>
<td class="l">备注:</td>
<td class="r" >
<input type="text" class="txt " name="content" value="{$data.content}" placeholder="">
</td>
</tr>
<tr>
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>显示状态:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<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" <if condition="$data['status'] eq 0">checked
</if>> 关闭
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">文档管理</td>
<td class="r table_radio">
<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>
<tr>
<td class="l noticeinfo">市场总监信息展示:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="marketing_director_show" <if condition="$data['marketing_director_show'] eq 1">checked
</if>> 展示
</label>
<label>
<input type="radio" class="inp_radio" value="2" name="marketing_director_show" <if condition="$data['marketing_director_show'] eq 2">checked
</if>> 隐藏
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
</tbody>
</table>
<table border="1" style="width: 600px;text-align: center;margin:10px 0 0 60px;" cellspacing="0" cellpadding="0" id="docShow">
</table>
</div>
<div class="form-item cf" style="margin-bottom: 40px;">
<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>
</div>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$meta_title}">
<input type="hidden" name="url" value="Partner/add">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
<script type="text/html" id="doctpl">
{@each list as it,index}
{@if index==0}
<thead>
<tr>
<th>文档名称</th>
<th>上传时间</th>
<th style="width:150px;">操作</th>
</tr>
</thead>
{@/if}
<tr>
<td style="padding:0;">${it.file_name}</td>
<td>${it.upload_time}</td>
<td>
<a class="filedown" data-index="${index}" data-path="${it.file_path}">下载</a>
<a class="filedel" data-index="${index}" data-path="${it.file_path}">删除</a>
</td>
</tr>
{@/each}
</script>
</block>
<block name="script">
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('PromoteCompany/lists')}");
$('#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 = {$data.resources};
if(!doc){
doc = [];
}
var id = {$data.id};
PROMOTE.juicerFun();
function addFile(info) {
doc.push(info);
layer.closeAll();
PROMOTE.juicerFun();
// window.parent.addFile(info);
}
$('#contact_begin').datetimepicker({
format: 'yyyy-mm-dd',
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({
format: 'yyyy-mm-dd',
language: "zh-CN",
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 = '文档添加';
layer.open({
type: 2,
title: title,
shadeClose: true,
shade: 0.8,
area: ['40%', '60%'],
content: url
});
});
$("#submit").on("click",function(){
var obj = {
"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});
//资源不需要二次修改
//添加
$.ajax({
url:"{:U('PromoteCompany/edit')}",
type:"post",
data:senddata,
dataType:"json",
success:function(data){
if(data.status == 1){
layer.msg(data.info,function(){
window.location.href="{:U('PromoteCompany/lists')}";
});
}else{
layer.msg(data.info);
}
},
error:function(e){
}
});
})
</script>
</block>