|
|
<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__/icons_alibaba/iconfont.css" rel="stylesheet">
|
|
|
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
|
|
|
<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=07151710" 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;
|
|
|
}
|
|
|
.list-ratio {
|
|
|
display: table;
|
|
|
}
|
|
|
.list-ratio .li-ratio {
|
|
|
display: flex;
|
|
|
margin-bottom: 20px;
|
|
|
align-items: center;
|
|
|
}
|
|
|
.list-ratio .li-ratio .turnover, .list-ratio .li-ratio .turnover-ratio {
|
|
|
position: relative;
|
|
|
}
|
|
|
.list-ratio .li-ratio .turnover span, .list-ratio .li-ratio .turnover-ratio .error-message {
|
|
|
color: red;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 30px;
|
|
|
white-space: nowrap;
|
|
|
display: none;
|
|
|
}
|
|
|
.iconfont-btn {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
.iconfont-style {
|
|
|
font-size: 18px;
|
|
|
color: #fff;
|
|
|
border-radius: 4px;
|
|
|
border: 0;
|
|
|
padding: 5px;
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
.iconfont-selected {
|
|
|
background-color: #0A9AF2;
|
|
|
}
|
|
|
.iconfont-selected:hover {
|
|
|
background-color: #03a9f4;
|
|
|
}
|
|
|
.iconfont-unselected {
|
|
|
background-color: #999;
|
|
|
}
|
|
|
.iconfont-unselected:hover {
|
|
|
background-color: #ababab;
|
|
|
}
|
|
|
.normal-table {
|
|
|
border: solid 1px #cbcbcb;
|
|
|
width: 100%;
|
|
|
clear: both;
|
|
|
border-collapse: collapse;
|
|
|
font-size: 13px;
|
|
|
border-spacing: 0;
|
|
|
}
|
|
|
.normal-table th {
|
|
|
background-color: #F0F5F7;
|
|
|
box-shadow: 0px -3px 0px 0px #EDEDED inset;
|
|
|
height: 37px;
|
|
|
line-height: 37px;
|
|
|
border-bottom: solid 1px #b6cad2;
|
|
|
text-indent: 11px;
|
|
|
text-align: center;
|
|
|
height: 50px;
|
|
|
line-height: 50px;
|
|
|
}
|
|
|
.normal-table tbody tr:nth-child(even) {
|
|
|
background: #f5f8fa;
|
|
|
}
|
|
|
.normal-table tbody td {
|
|
|
text-align: center;
|
|
|
}
|
|
|
|
|
|
.normal-btn {
|
|
|
cursor: pointer;
|
|
|
border: none;
|
|
|
border-radius: 3px;
|
|
|
margin-bottom: 10px;
|
|
|
display: inline-block;
|
|
|
text-align: center;
|
|
|
line-height: 35px;
|
|
|
background: #3E96C9;
|
|
|
padding: 0px 10px;
|
|
|
color: #fff;
|
|
|
background-image: -moz-linear-gradient(top, #449ACB 0%,#3C95C8 50%, #3591C6 100%);
|
|
|
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#449ACB),color-stop(50%,#3C95C8), color-stop(100%,#3591C6));
|
|
|
background-image: -webkit-linear-gradient(top, #449ACB 0%,#3C95C8 50%,#3591C6 100%);
|
|
|
background-image: -o-linear-gradient(top, #449ACB 0%,#3C95C8 50%,#3591C6 100%);
|
|
|
background-image: -ms-linear-gradient(top, #449ACB 0%,#3C95C8 50%,#3591C6 100%);
|
|
|
background-image: linear-gradient(to bottom, #449ACB 0%,#3C95C8 50%,#3591C6 100%);
|
|
|
}
|
|
|
|
|
|
.normal-table .normal-btn {
|
|
|
line-height: 25px;
|
|
|
margin-bottom: 0px;
|
|
|
}
|
|
|
.normal-table .normal-btn.delete-btn {
|
|
|
background: rgb(221, 10, 10);
|
|
|
margin-left: 5px;
|
|
|
}
|
|
|
.layer-box .tabcon1711 input~.notice-text {
|
|
|
width: auto;
|
|
|
}
|
|
|
.deposit-item.no-deposit {
|
|
|
display: none;
|
|
|
}
|
|
|
</style>
|
|
|
|
|
|
<!-- 标签页导航 -->
|
|
|
<div class="tab-wrap">
|
|
|
<div class="cf main-place top_nav_list navtab_list">
|
|
|
<ul class="tabnav1711 fr jstabnav">
|
|
|
<li data-tab="tab1" class="current"><a href="javascript:void(0);">基本信息</a></li>
|
|
|
<li data-tab="tab2" ><a href="javascript:void(0);">结算信息</a></li>
|
|
|
<li data-tab="tab3" ><a href="javascript:void(0);">会长信息</a></li>
|
|
|
</ul>
|
|
|
<h3 class="page_title">{$meta_title}</h3>
|
|
|
<p class="description_text">说明:查看和编辑推广公司的基本信息、结算信息、会长信息等。</p>
|
|
|
</div>
|
|
|
|
|
|
<div class="tab-content tabcon1711">
|
|
|
<!-- 表单 -->
|
|
|
<form id="form" autocomplete="off">
|
|
|
<!-- 基础 -->
|
|
|
<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="" placeholder="请输入推广公司名称">
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>团体归属:</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($vo['id'] == 1)echo selected;</php>>{$vo.name}</option>
|
|
|
</volist>
|
|
|
</select>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>开发类型:</td>
|
|
|
<td class="r" >
|
|
|
<select id="develop_type" name="develop_type" class="select_gallery" style="width: 215px;">
|
|
|
<option value="0">无</option>
|
|
|
<option value="1" selected>自主开发</option>
|
|
|
<option value="2">自主开发及维护</option>
|
|
|
<option value="3">只维护</option>
|
|
|
</select>
|
|
|
</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">公司</option>
|
|
|
<option value="2" selected>个人</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" selected>否</option>
|
|
|
<option value="1">是</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['status'] == 2):?>selected<?php endif;?>>{$service.name}</option>
|
|
|
<?php endforeach;?>
|
|
|
</select>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">合同期限:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt time" id="contact_begin" name="contact_begin" placeholder="合同开始时间">
|
|
|
- <input type="text" class="txt time" id="contact_end" name="contact_end" placeholder="合同结束时间">
|
|
|
<span class="notice-text" style="float: none;">结束时间不选默认永久</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr class="deposit-item">
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>押金付款方式:</td>
|
|
|
<td class="r">
|
|
|
<select name="deposit[pay_type]" id="deposit-pay-type" class="select_gallery">
|
|
|
<option value="">押金付款方式</option>
|
|
|
<?php foreach($payTypes as $key => $name):?>
|
|
|
<option value="<?=$key?>"><?=$name?></option>
|
|
|
<?php endforeach;?>
|
|
|
</select>
|
|
|
<span class="notice-text"></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="deposit-item need-amount">
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>押金支付方式:</td>
|
|
|
<td class="r">
|
|
|
<select name="deposit[pay_way]" id="deposit-pay-way" class="select_gallery">
|
|
|
<option value="">押金支付方式</option>
|
|
|
<?php foreach($payWays as $key => $name):?>
|
|
|
<option value="<?=$key?>"><?=$name?></option>
|
|
|
<?php endforeach;?>
|
|
|
</select>
|
|
|
<span class="notice-text"></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="deposit-item need-amount">
|
|
|
<td class="l"><?php if($record):?><i class="mustmark">*</i><?php endif?>押金金额:</td>
|
|
|
<td class="r table_radio">
|
|
|
<input type="text" class="txt ratio" name="deposit[amount]" id="deposit-amount" value="<?=$record?$record['amount']:''?>" placeholder="请输入押金金额">
|
|
|
<span class="notice-text"></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="deposit-item need-amount">
|
|
|
<td class="l">押金付款人:</td>
|
|
|
<td class="r table_radio">
|
|
|
<input type="text" class="txt ratio" name="deposit[payer]" id="deposit-payer" value="<?=$record?$record['payer']:''?>" placeholder="请输入押金付款人">
|
|
|
<span class="notice-text"></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="deposit-item need-amount">
|
|
|
<td class="l">押金付款账号:</td>
|
|
|
<td class="r table_radio">
|
|
|
<input type="text" class="txt ratio" name="deposit[pay_account]" id="deposit-pay-account" value="<?=$record?$record['pay_account']:''?>" placeholder="请输入押金付款账号">
|
|
|
<span class="notice-text"></span>
|
|
|
</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" style="width: auto;">
|
|
|
<label>
|
|
|
<input type="radio" class="inp_radio" value="0" name="has_server_fee" checked> 否
|
|
|
|
|
|
</label>
|
|
|
<label>
|
|
|
<input type="radio" class="inp_radio" value="1" name="has_server_fee" > 是
|
|
|
</label>
|
|
|
</span>
|
|
|
<span class="notice-text" id="server_fee_input" style="color: #000;display: none;"><input type="text" class="txt " name="server_fee" value="0" placeholder="请输入服务器费用" style="width: 100px;"> 元</span>
|
|
|
</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="cooperation_status" checked> 合作中
|
|
|
</label>
|
|
|
<label>
|
|
|
<input type="radio" class="inp_radio" value="0" name="cooperation_status"> 停止合作
|
|
|
</label>
|
|
|
</span>
|
|
|
<span class="notice-text"></span>
|
|
|
</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" checked> 开启
|
|
|
</label>
|
|
|
<label>
|
|
|
<input type="radio" class="inp_radio" value="0" name="status" <?php if(isMarketAdmin()):?>disabled<?php endif;?>> 关闭
|
|
|
</label>
|
|
|
</span>
|
|
|
<span class="notice-text"></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="is_inside" > 是
|
|
|
</label>
|
|
|
<label>
|
|
|
<input type="radio" class="inp_radio" value="0" name="is_inside" checked> 否
|
|
|
</label>
|
|
|
</span>
|
|
|
<span class="notice-text"></span>
|
|
|
</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="marketing_director_show" checked>展示
|
|
|
</label>
|
|
|
<label>
|
|
|
<input type="radio" class="inp_radio" value="2" name="marketing_director_show"> 隐藏
|
|
|
</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>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
|
</table>
|
|
|
<table border="1" style="width: 600px;text-align: center;" cellspacing="0" cellpadding="0" id="docShow">
|
|
|
|
|
|
</table>
|
|
|
</div>
|
|
|
<div id="tab2" class="tab-pane tab2 ">
|
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>合作方式:</td>
|
|
|
<td class="r">
|
|
|
<select name="relation[collaborate_way]" id="collaborate_way" class="select_gallery">
|
|
|
<option value="1" >甲方</option>
|
|
|
<option value="2" selected>乙方</option>
|
|
|
</select>
|
|
|
<span class="notice-text"></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>己方公司:</td>
|
|
|
<td class="r">
|
|
|
<select name="relation[self_company_id]" id="self_company" class="select_gallery">
|
|
|
<option value="0">无</option>
|
|
|
<?php foreach($selfCompanies as $selfCompany):?>
|
|
|
<option value="<?=$selfCompany['id']?>" <?php if($selfCompany['company_name'] == '福建金菠菜网络科技有限公司'):?>selected<?php endif;?>>
|
|
|
<?=$selfCompany['company_name']?>
|
|
|
</option>
|
|
|
<?php endforeach;?>
|
|
|
</select>
|
|
|
<span class="notice-text"></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>结算周期:</td>
|
|
|
<td class="r">
|
|
|
<select name="relation[settlement_type]" id="settlement_type" class="select_gallery">
|
|
|
<option value="0">无</option>
|
|
|
<option value="1" selected>周结</option>
|
|
|
<option value="2">月结</option>
|
|
|
</select>
|
|
|
<span class="notice-text"></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>开票类型:</td>
|
|
|
<td class="r">
|
|
|
<select name="relation[invoice_type]" id="invoice_type" class="select_gallery">
|
|
|
<option value="0" selected>无</option>
|
|
|
<option value="1">专票</option>
|
|
|
<option value="2">普票</option>
|
|
|
</select>
|
|
|
<span class="notice-text"></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">开票内容:</td>
|
|
|
<td class="r table_radio">
|
|
|
<input type="text" name="relation[invoice_content]" id="invoice_content" class="input" value=""></textarea>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">是否支付宝打款:</td>
|
|
|
<td class="r table_radio">
|
|
|
<span class="form_radio table_btn">
|
|
|
<label>
|
|
|
<input type="radio" value="1" name="relation[is_payment]" checked="checked"> 是
|
|
|
</label>
|
|
|
<label>
|
|
|
<input type="radio" value="2" name="relation[is_payment]"> 否
|
|
|
</label>
|
|
|
</span>
|
|
|
<span class="notice-text">选择否将不能进行线上打款</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>收款方:</td>
|
|
|
<td class="r">
|
|
|
<select name="relation[collection]" id="collection" class="select_gallery">
|
|
|
<option value="1" >甲方</option>
|
|
|
<option value="2" selected>乙方</option>
|
|
|
</select>
|
|
|
<span class="notice-text"></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="l">结算生效期限:</td>
|
|
|
<td class="r">
|
|
|
<input type="text" class="txt time time3" name="validity_start_time" value="" placeholder="生效开始时间">
|
|
|
- <input type="text" class="txt time time4" name="validity_end_time" value="" placeholder="生效结束时间">
|
|
|
<span class="notice-text" style="float: none;">结束时间不选默认永久</span>
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">支付宝真实姓名:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="ali_user" value="" placeholder="请输入支付宝真实姓名">
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="l">支付宝登陆账号:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="ali_account" value="" placeholder="可以是手机及邮箱等">
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="l">账户名:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="bank_address" value="" placeholder="请输入账户名">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">银行卡号:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="bank_card" value="" placeholder="请输入银行卡号">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">收款银行:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="bank_name" value="" placeholder="请输入收款银行">
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="l">联系人:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="settlement_contact" value="" placeholder="请输入结算联系人">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">联系电话:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="contact_phone" value="" placeholder="请输入联系电话">
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="l">对应平台(简称):</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="platform_name" value="" placeholder="请输入对应平台">
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
<td class="l">开票税点:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt" name="fax_ratio" value="" placeholder="开票税点(最多两位小数)"><span style="margin-left: 3px;padding-top: 5px">%</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">渠道费率:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="channel_rate" value="" placeholder="渠道费率(最多两位小数)"> <span style="margin-left: 3px;padding-top: 5px">%</span>
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">税费费率:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="taxation_rate" value="" placeholder="税费费率(最多三位小数)"><span style="margin-left: 3px;padding-top: 5px">%</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
<td class="l">注册地址:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="reg_address" value="" placeholder="请输入注册地址">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">注册电话:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="reg_phone" value="" placeholder="请输入注册电话">
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="l">邮寄地址:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="address" value="" placeholder="请输入邮寄地址">
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="l">备注:</td>
|
|
|
<td class="r" >
|
|
|
<input type="text" class="txt " name="content" value="" 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="0" name="has_ratio" checked> 否
|
|
|
</label>
|
|
|
<label>
|
|
|
<input type="radio" class="inp_radio" value="1" name="has_ratio"> 是
|
|
|
</label>
|
|
|
</span>
|
|
|
<span class="notice-text"></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr id="turnover_ratio" style="display: none;">
|
|
|
<td class="l"></td>
|
|
|
<td class="r table_radio">
|
|
|
<div class="list-ratio">
|
|
|
<div class="li-ratio">
|
|
|
<label class="instanceof_text" style="margin-right: 10px;">流水分成设定:</label>
|
|
|
<span class="iconfont-btn iconfont-btn-add" title="添加流水比例"><i class="iconfont-style iconfont-selected iconfont iconjiahao1"></i></span>
|
|
|
<span class="iconfont-btn iconfont-btn-del" title="删除流水比例"><i class="iconfont-style iconfont-unselected iconfont iconjianhao"></i></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<span class="notice-text" style="width: auto;"></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
<div id="tab3" class="tab-pane tab3 ">
|
|
|
<div>
|
|
|
<button id="edit-promote-btn" class="normal-btn" type="button">新增会长</button>
|
|
|
</div>
|
|
|
<div class="table">
|
|
|
<table id="promote-table" class="normal-table">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>会长账号</th>
|
|
|
<th>真实姓名</th>
|
|
|
<th>手机号码</th>
|
|
|
<th>邮箱</th>
|
|
|
<th>充值信息查看权限</th>
|
|
|
<th>操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<tr class="no-record">
|
|
|
<td colspan="7" style="text-align: center;">暂无会长</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
</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="{:U('PromoteCompany/lists')}" >
|
|
|
返回
|
|
|
</a>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div id="promote-box" class="layer-box" style="display: none;">
|
|
|
<div class="table-wrapper tabcon1711">
|
|
|
<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="account" value="" placeholder="输入推广员账号" onKeyUp="value=value.replace(/[^\w\.\/]/ig,'')">
|
|
|
<span class="notice-text">通过推广员后台注册申请或者管理后台创建的账号</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>登录密码:</td>
|
|
|
<td class="r">
|
|
|
<input style="float:left" type="text" class="txt time" name="password" value="" placeholder="输入登录密码">
|
|
|
<span class="notice-text">密码长度必须大于6位</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">真实姓名:</td>
|
|
|
<td class="r">
|
|
|
<input type="text" class="txt" name="realname" value="" placeholder=" 输入推广员负责人姓名">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">手机号:</td>
|
|
|
<td class="r">
|
|
|
<input type="text" class="txt" name="mobile" value="" placeholder="输入推广员负责人手机号">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<td class="l">邮箱:</td>
|
|
|
<td class="r">
|
|
|
<input type="text" class="txt" name="email" value="" placeholder="输入推广员邮箱">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l">充值信息查看权限:</td>
|
|
|
<td class="r table_radio">
|
|
|
<span class="form_radio table_btn" style="width: 215px;">
|
|
|
<label >
|
|
|
<input type="radio" class="can_view_recharge" value="1" name="can_view_recharge" checked="checked"> 开启
|
|
|
</label >
|
|
|
<label >
|
|
|
<input type="radio" class="can_view_recharge" value="0" name="can_view_recharge"> 锁定
|
|
|
</label>
|
|
|
</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="l"></td>
|
|
|
<td class="r table_radio">
|
|
|
<button id="confirm-promote" class="submit_btn" type="button" style="margin-top: 0px; margin-left: 0px;">保存</button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
</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')}");
|
|
|
var flag = false;
|
|
|
$('#submit').click(function(){
|
|
|
if (!flag) {
|
|
|
flag = true;
|
|
|
setTimeout(function () {
|
|
|
flag = false;
|
|
|
$('#form').submit();
|
|
|
}, 500);
|
|
|
}else{
|
|
|
layer.msg('请求处理中,请勿重复点击');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
var ids = [];
|
|
|
showTab();
|
|
|
</script>
|
|
|
<script>
|
|
|
var doc = [];
|
|
|
function addFile(info) {
|
|
|
doc.push(info);
|
|
|
layer.closeAll();
|
|
|
PROMOTE.juicerFun();
|
|
|
// window.parent.addFile(info);
|
|
|
}
|
|
|
$("input[type=radio][name=has_server_fee]").on('change', function (e) {
|
|
|
var v = $(this).val();
|
|
|
if(v == 1){
|
|
|
$("#server_fee_input").show();
|
|
|
}else{
|
|
|
$("#server_fee_input").hide();
|
|
|
}
|
|
|
});
|
|
|
$("input[type=radio][name=has_ratio]").on('change', function (e) {
|
|
|
var v = $(this).val();
|
|
|
if(v == 1){
|
|
|
$("#turnover_ratio").show();
|
|
|
}else{
|
|
|
$("#turnover_ratio").hide();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$('#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;
|
|
|
});
|
|
|
|
|
|
$('#contact_end').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;
|
|
|
});
|
|
|
|
|
|
$('.time3').datetimepicker({
|
|
|
format: 'yyyy-mm-dd',
|
|
|
language:"zh-CN",
|
|
|
minView: "month",
|
|
|
autoclose:true
|
|
|
}).change(function(){
|
|
|
var start = new Date($(this).val()).getTime();
|
|
|
var end = new Date($('.time4').val()).getTime();
|
|
|
|
|
|
if(isNaN(end)) {return false;}
|
|
|
|
|
|
if(start>=end) {layer.msg('开始时间必须小于结束时间');$('.time3').val('');return false;}
|
|
|
|
|
|
return false;
|
|
|
});
|
|
|
$(".time3").datetimepicker("setDate", new Date());
|
|
|
|
|
|
$('.time4').datetimepicker({
|
|
|
format: 'yyyy-mm-dd',
|
|
|
language:"zh-CN",
|
|
|
minView: "month",
|
|
|
autoclose:true
|
|
|
}).change(function(){
|
|
|
var end = new Date($(this).val()).getTime();
|
|
|
var start = new Date($('.time3').val()).getTime();
|
|
|
|
|
|
if(isNaN(start)) {return false;}
|
|
|
|
|
|
if(start>=end) {layer.msg('开始时间必须小于结束时间');$('.time4').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 flag = true;
|
|
|
var obj = {
|
|
|
"company_name":["required",false,"推广公司名称不允许为空"],
|
|
|
"fax_ratio":["number",true,"开票税率必须是数字,如果无此项请填0"],
|
|
|
"bank_card":["bankid",true,"银行卡格式错误"],
|
|
|
"ali_user":["realname",true,"支付宝真实名称只能是中文"]
|
|
|
}
|
|
|
if(!CIC.checkInput(obj)){ return false; }
|
|
|
var senddata = $("#form").serializeArray();
|
|
|
//验证通过
|
|
|
if(doc.length > 0){
|
|
|
senddata.push({"name":"resources", "value":JSON.stringify(doc)});
|
|
|
}
|
|
|
var hasratio = $("input[type=radio][name=has_ratio]:checked").val();
|
|
|
if(hasratio == 1){
|
|
|
$(".error-message").each(function(index,elm){
|
|
|
var t = $(elm).css("display");
|
|
|
if(t == 'block' || t == 'inline'){
|
|
|
flag = false;
|
|
|
layer.msg("请先处理错误的比例配置", {icon: 2});
|
|
|
return false;
|
|
|
}
|
|
|
})
|
|
|
$(".turnover_money").each(function(index,elm){
|
|
|
var t = $(elm).val();
|
|
|
if(t == ''){
|
|
|
flag = false;
|
|
|
layer.msg("流水及比例不允许为空,如不需要请删除", {icon: 2});
|
|
|
return false;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
if(!flag) return false;
|
|
|
senddata.push({"name":"game_ids", "value":ids.join(",")});
|
|
|
|
|
|
senddata.push({'name': 'promotes', 'value': JSON.stringify(getPromotes())})
|
|
|
|
|
|
//添加
|
|
|
$.ajax({
|
|
|
url:"{:U('add')}",
|
|
|
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){
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
})
|
|
|
$('.iconfont-btn-add').click(function (e) {
|
|
|
var delBtn = $('.iconfont-btn-del');
|
|
|
var html = '';
|
|
|
html += '<div class="li-ratio">';
|
|
|
html += '<label class="instanceof_text">月流水:</label>';
|
|
|
html += '<select name="instanceof[]" style="width: 50px;margin-right: 10px;">';
|
|
|
html += '<option value="1">≥</option>';
|
|
|
html += '<option value="2">></option>';
|
|
|
html += '</select>';
|
|
|
html += '<div class="turnover">';
|
|
|
html += '<input type="text" class="txt turnover_money" name="turnover[]" value="" placeholder="请输入金额" onKeyUp="value=value.replace(/[^\\w\\.\\/]/ig, \'\')" style="width: 100px;margin-right: 10px;">';
|
|
|
html += '<span class="error-message"></span>';
|
|
|
html += '</div>';
|
|
|
html += '<label>分成比例:</label>';
|
|
|
html += '<div class="turnover-ratio">';
|
|
|
html += '<input type="text" class="txt turnover_ratio" name="turnover_ratio[]" value="" placeholder="请输入比例" onKeyUp="value=value.replace(/[^\\w\\.\\/]/ig, \'\')" style="width: 60px;">';
|
|
|
html += '<span class="form_unit" style="margin-right: 10px;">%</span>';
|
|
|
html += '<span class="error-message"></span>';
|
|
|
html += '</div>';
|
|
|
html += '</div>';
|
|
|
|
|
|
$('.list-ratio').append(html);
|
|
|
// subevn();
|
|
|
if ($('.list-ratio').children().length > 1 && delBtn.children('i').hasClass('iconfont-unselected')) {
|
|
|
delBtn.children('i').removeClass('iconfont-unselected');
|
|
|
delBtn.children('i').addClass('iconfont-selected');
|
|
|
}
|
|
|
|
|
|
$('.list-ratio').children(':last-child').children('.turnover').children('input').change(function (e) {
|
|
|
turnoverChangeHandle();
|
|
|
});
|
|
|
|
|
|
$('.list-ratio').children(':last-child').children('.turnover-ratio').children('input').change(function (e) {
|
|
|
turnoverRatioChangeHandle();
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('.list-ratio').children('.li-ratio').children('.turnover').children('input').change(function (e) {
|
|
|
turnoverChangeHandle();
|
|
|
});
|
|
|
|
|
|
$('.list-ratio').children('.li-ratio').children('.turnover-ratio').children('input').change(function (e) {
|
|
|
turnoverRatioChangeHandle();
|
|
|
});
|
|
|
|
|
|
function turnoverChangeHandle()
|
|
|
{
|
|
|
$('.list-ratio').children('.li-ratio').children('.turnover').children('input').each(function () {
|
|
|
var that = $(this);
|
|
|
var thatLiRatio = that.parent().parent();
|
|
|
var thatLiRatioIndex = thatLiRatio.index();
|
|
|
var prevTurnover = 0;
|
|
|
var prev = thatLiRatio.prev().children().children('input');
|
|
|
var thatTurnover = parseFloat(that.val());
|
|
|
|
|
|
if (thatLiRatioIndex > 0) {
|
|
|
prevTurnover = parseFloat(prev.val());
|
|
|
prevTurnoverHandle(thatTurnover, prevTurnover, that);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function turnoverRatioChangeHandle() {
|
|
|
var ratio = parseFloat($('#ratio').val());
|
|
|
$('.list-ratio').children('.li-ratio').children('.turnover-ratio').children('input').each(function () {
|
|
|
var that = $(this);
|
|
|
var thatLiRatio = that.parent().parent();
|
|
|
var thatLiRatioIndex = thatLiRatio.index();
|
|
|
var thatTurnoverRatio = parseFloat(that.val());
|
|
|
|
|
|
if (thatLiRatioIndex === 1) {
|
|
|
prevTurnoverRatio = ratio;
|
|
|
prevTurnoverRatioHandle(thatTurnoverRatio, prevTurnoverRatio, that, true);
|
|
|
} else {
|
|
|
var prev = thatLiRatio.prev().children('.turnover-ratio').children('input');
|
|
|
var prevTurnoverRatio = parseFloat(prev.val());
|
|
|
prevTurnoverRatioHandle(thatTurnoverRatio, prevTurnoverRatio, that);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function prevTurnoverHandle(thatTurnover, prevTurnover, that)
|
|
|
{
|
|
|
if (thatTurnover <= prevTurnover) {
|
|
|
that.parent().children('span').text('月流水必须大于上一个月流水');
|
|
|
that.parent().children('span').show();
|
|
|
} else {
|
|
|
that.parent().children('span').hide();
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
function prevTurnoverRatioHandle(thatTurnoverRatio, prevTurnoverRatio, that, isDefault = false)
|
|
|
{
|
|
|
// if (thatTurnoverRatio <= prevTurnoverRatio) {
|
|
|
// var msg = isDefault ? '月流水分成比例必须大于默认分成比例' : '月流水分成比例必须大于上一个月流水分成比例';
|
|
|
// that.parent().children('.error-message').text(msg);
|
|
|
// that.parent().children('.error-message').show();
|
|
|
// } else {
|
|
|
// that.parent().children('.error-message').hide();
|
|
|
// }
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
$('.iconfont-btn-del').click(function (e) {
|
|
|
var that = $(this);
|
|
|
|
|
|
if ($('.list-ratio').children().length > 1) {
|
|
|
$('.list-ratio').children(':last-child').remove();
|
|
|
if ($('.list-ratio').children().length === 1) {
|
|
|
that.children('i').removeClass('iconfont-selected');
|
|
|
that.children('i').addClass('iconfont-unselected');
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
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){
|
|
|
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$('#edit-promote-btn').on({
|
|
|
click: function () {
|
|
|
layer.open({
|
|
|
title: '编辑会长',
|
|
|
type: 1,
|
|
|
content: $('#promote-box'),
|
|
|
area: ['800px', '460px'],
|
|
|
zIndex: 250,
|
|
|
cancel: function() {
|
|
|
clearPromoteBox()
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
|
|
|
$('#confirm-promote').on({
|
|
|
click: function () {
|
|
|
var box = $('#promote-box')
|
|
|
var promote = {
|
|
|
account: box.find('input[name=account]').val(),
|
|
|
password: box.find('input[name=password]').val(),
|
|
|
real_name: box.find('input[name=realname]').val(),
|
|
|
mobile_phone: box.find('input[name=mobile]').val(),
|
|
|
email: box.find('input[name=email]').val(),
|
|
|
can_view_recharge: box.find('input[name=can_view_recharge]:checked').val(),
|
|
|
}
|
|
|
if (promote.account == '') {
|
|
|
return layer.msg('请输入会长账号')
|
|
|
}
|
|
|
if (promote.password == '') {
|
|
|
return layer.msg('请输入登录密码')
|
|
|
}
|
|
|
if (promote.password.length < 6) {
|
|
|
return layer.msg('密码不能小于6位')
|
|
|
}
|
|
|
|
|
|
var canViewRecharge = promote.can_view_recharge == 1 ? '允许' : '禁止'
|
|
|
|
|
|
var editTr = $('#promote-table').find('.edit')
|
|
|
if (editTr.length > 0) {
|
|
|
editTr.attr('data-post', JSON.stringify(promote))
|
|
|
var html = '<td>' + promote.account + '</td>'
|
|
|
+ '<td>' + promote.real_name + '</td>'
|
|
|
+ '<td>' + promote.mobile_phone + '</td>'
|
|
|
+ '<td>' + promote.email + '</td>'
|
|
|
+ '<td>' + canViewRecharge + '</td>'
|
|
|
+ '<td><button class="modify-btn normal-btn" type="button">编辑</button><button class="delete-btn normal-btn" type="button">删除</button></td>'
|
|
|
editTr.html(html)
|
|
|
editTr.removeClass('edit')
|
|
|
} else {
|
|
|
$('#promote-table').find('.no-record').remove()
|
|
|
var html = '<tr class="normal-record" data-post=' + JSON.stringify(promote) + '><td class="account-' + promote.account + '">' + promote.account + '</td>'
|
|
|
+ '<td>' + promote.real_name + '</td>'
|
|
|
+ '<td class="mobile-' + promote.mobile_phone + '">' + promote.mobile_phone + '</td>'
|
|
|
+ '<td>' + promote.email + '</td>'
|
|
|
+ '<td>' + canViewRecharge + '</td>'
|
|
|
+ '<td><button class="modify-btn normal-btn" type="button">编辑</button><button class="delete-btn normal-btn" type="button">删除</button></td>'
|
|
|
+ '</tr>'
|
|
|
$('#promote-table').children('tbody').append(html)
|
|
|
}
|
|
|
|
|
|
layer.closeAll()
|
|
|
clearPromoteBox()
|
|
|
}
|
|
|
})
|
|
|
|
|
|
function clearPromoteBox() {
|
|
|
var box = $('#promote-box')
|
|
|
box.find('input[name=account]').val('')
|
|
|
box.find('input[name=password]').val('')
|
|
|
box.find('input[name=realname]').val('')
|
|
|
box.find('input[name=mobile]').val('')
|
|
|
box.find('input[name=email]').val('')
|
|
|
box.find('.can_view_recharge[value=1]').click()
|
|
|
}
|
|
|
|
|
|
function initPromoteBox(promote) {
|
|
|
var box = $('#promote-box')
|
|
|
box.find('input[name=account]').val(promote.account)
|
|
|
box.find('input[name=password]').val(promote.password)
|
|
|
box.find('input[name=realname]').val(promote.real_name)
|
|
|
box.find('input[name=mobile]').val(promote.mobile_phone)
|
|
|
box.find('input[name=email]').val(promote.email)
|
|
|
box.find('.can_view_recharge[value=' + promote.can_view_recharge + ']').click()
|
|
|
}
|
|
|
|
|
|
$('#promote-table').on('click', '.delete-btn', function() {
|
|
|
$(this).parents('tr').eq(0).remove()
|
|
|
if ($('#promote-table tbody tr').length == 0) {
|
|
|
$('#promote-table tbody').append('<tr class="no-record"><td colspan="7" style="text-align: center;">暂无会长</td></tr>')
|
|
|
}
|
|
|
})
|
|
|
|
|
|
$('#promote-table').on('click', '.modify-btn', function() {
|
|
|
$(this).parents('tr').eq(0).addClass('edit')
|
|
|
var promote = JSON.parse($(this).parents('tr').eq(0).attr('data-post'))
|
|
|
layer.open({
|
|
|
title: '编辑会长',
|
|
|
type: 1,
|
|
|
content: $('#promote-box'),
|
|
|
area: ['800px', '460px'],
|
|
|
zIndex: 250,
|
|
|
cancel: function() {
|
|
|
clearPromoteBox()
|
|
|
}
|
|
|
})
|
|
|
initPromoteBox(promote)
|
|
|
})
|
|
|
|
|
|
function getPromotes() {
|
|
|
var promotes = []
|
|
|
$('#promote-table tbody tr.normal-record').each(function(index, elem) {
|
|
|
// console.log($(elem).attr('data-post'))
|
|
|
promotes.push(JSON.parse($(elem).attr('data-post')))
|
|
|
})
|
|
|
return promotes
|
|
|
}
|
|
|
|
|
|
$('#company_belong').change(function () {
|
|
|
var val = $(this).val()
|
|
|
if (val != 1 && val != 2) {
|
|
|
$('.deposit-item').addClass('no-deposit')
|
|
|
} else {
|
|
|
$('.deposit-item').removeClass('no-deposit')
|
|
|
}
|
|
|
})
|
|
|
|
|
|
$('#invoice_type').change(function () {
|
|
|
var val = $(this).val()
|
|
|
if (val == 0) {
|
|
|
$('#invoice_content').val('')
|
|
|
} else {
|
|
|
$('#invoice_content').val('信息服务费')
|
|
|
}
|
|
|
})
|
|
|
|
|
|
$('#deposit-pay-type').change(function() {
|
|
|
var val = $(this).val()
|
|
|
if (val == 2) {
|
|
|
$('.need-amount').show();
|
|
|
$("#deposit-pay-way option[value='4']").removeProp('disabled');
|
|
|
$('#deposit-pay-way').val('4')
|
|
|
$('#deposit-pay-way').attr('disabled', 'disabled')
|
|
|
} else if(val == 3) {
|
|
|
$('.need-amount').hide();
|
|
|
} else {
|
|
|
$('.need-amount').show();
|
|
|
$('#deposit-pay-way').removeAttr('disabled');
|
|
|
$("#deposit-pay-way option[value='4']").prop('disabled', true);
|
|
|
$('#deposit-pay-way').val('')
|
|
|
}
|
|
|
})
|
|
|
</script>
|
|
|
</block>
|