Merge branch 'feature/excel_payment' of wmtx/platform into release

打款账号
master
万盟天下 4 years ago committed by Gogs
commit 0885bbdcb7

@ -414,6 +414,12 @@ function set_pagination($count, $row,$request='') {
function set_pagination_all($count, $row,$request='') {
$aside = '<script>function pagechange(that){url = location.href.replace(".html","").replace(/(&|\/)row(=|\/)\d*/gi,"").replace(/\/p\/\d*/gi,"");if(url.indexOf("?")>0){url += "&row="+that.value;}else{url += "?row="+that.value;} window.location.href = url;}</script><select id="pagechange" name="row" onchange="pagechange(this)">';
if($row == 999999){
$aside .= '<option value="999999" selected>全部显示</option>';
}else{
$aside .= '<option value="999999">全部显示</option>';
}
if($row == 10){
$aside .= '<option value="10" selected>每页10条</option>';
}else{
@ -425,15 +431,11 @@ function set_pagination_all($count, $row,$request='') {
$aside .= '<option value="50">每页50条</option>';
}
if($row == 100){
$aside .= '<option value="100" selected>每页100条</option>';
}else{
$aside .= '<option value="100">每页100条</option>';
}
if($row == 999999){
$aside .= '<option value="999999" selected>全部显示</option></select>';
$aside .= '<option value="100" selected>每页100条</option></select>';
}else{
$aside .= '<option value="999999">全部显示</option></select>';
$aside .= '<option value="100">每页100条</option></select>';
}
$count=$count?$count:0;
$row=$row?$row:10;
if ($count > $row) {

@ -255,9 +255,10 @@ class ExcelPaymentController extends BaseController
}else{
$val['ratio'] = 0;
}
$val['ratio'] = $val['ratio']*100;
$val['increment_ratio'] = $val['increment_ratio']*100;
if($is_export){
$val['ratio'] = $val['ratio']*100;
$val['increment_ratio'] = $val['increment_ratio']*100;
//J3*(K3+L3)+M3-N3
$val['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}";
}else{

@ -0,0 +1,80 @@
<?php
namespace Payment\Controller;
/**
* 后台首页控制器
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
class UserController extends BaseController
{
public function _initialize()
{
$this->admininfo = session('payment_user');;
// $this->DBModel = M("CompanyStatementPool","tab_");
parent::_initialize();
}
public function index()
{
$params = I('get.');
$page = $params['p'] ? intval($params['p']) : 1;
$row = $params['row'] ? intval($params['row']) : 10;
$data = M("PaymentMember","tab_")->page($page,$row)->order("id desc")->select();
$count = M("PaymentMember","tab_")->count("id");
$page = set_pagination($count, $row);
if ($page) {
$this->assign('_page', $page);
}
$this->meta_title = '打款结算单';
$this->assign("data",$data);
$this->display();
}
public function add()
{
if (IS_POST) {
$p = $_REQUEST;
$mobile = $p['mobile'];
/*检测用户名是否为空*/
if (empty($p['mobile'])) {
$this->error('手机号码不能为空!');
}
if (!preg_match('/^1[1-9]\d{9}$/', $p['mobile'])) {
return $this->error("手机号码格式错误");
}
if (empty($p['real_name'])) {
$this->error('姓名允许为空');
}
//判断手机唯一
$check_mobile = M("Kv")->field("value")->where("`key`='payment_check_mobile' AND `value`= '{$mobile}'")->find();
if(empty($check_mobile)){
//获取普通登陆
$plogin = M("payment_member","tab_")->where("`mobile`= '{$mobile}'")->find();
if(!empty($plogin)){
$this->error('手机号码已存在');
}
}else{
$this->error('手机号码已存在');
}
M("payment_member","tab_")->add($p);
$this->success('用户添加成功!', U('index'));
} else {
$this->meta_title = '新增制表人';
$this->display();
}
}
public function delete($id)
{
$res = M('payment_member',"tab_")->where("id = '{$id}'")->delete();
if ($res) {
$this->success('删除成功');
} else {
$this->error('删除失败');
}
}
}

@ -80,6 +80,7 @@
<th>市场员</th>
<th>下游性质</th>
<th>产品</th>
<th>产品类型</th>
<th>结算时间</th>
<th>推广流水</th>
<th>分成比例</th>
@ -103,6 +104,7 @@
<td>秦汉风云</td>
<td>策略</td>
<td>2020.6.22-2020.6.28 5626</td>
<td>5626</td>
<td>1%</td>
<td>0%</td>
<td>0</td>

@ -156,7 +156,9 @@
<div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<a class='butn' id='doPayment'>批量打款</a>
<if condition="session('payment_user.is_payment') eq 1">
<a class='butn' id='doPayment'>批量打款</a>
</if>
<a class='butn' id='leadExcel'>Excel导入</a>
<a class='butn' id='export'>导出</a>
<a class='butn' id='delItem' style="background-color: red;">批量删除</a>
@ -221,7 +223,7 @@
</tr>
</volist>
<tr><td style="line-height: 42px;">合计</td><td colspan="13" style="line-height: 42px;">
打款成功金额:&nbsp;{$money.success_money}&nbsp;&nbsp;/&nbsp;&nbsp;待打款金额:&nbsp;{$money.statement_money}&nbsp;&nbsp;/&nbsp;&nbsp;打款成功金额:&nbsp;{$money.error_money}
打款成功金额:&nbsp;{$money.success_money}&nbsp;&nbsp;/&nbsp;&nbsp;待打款金额:&nbsp;{$money.statement_money}&nbsp;&nbsp;/&nbsp;&nbsp;打款失败金额:&nbsp;{$money.error_money}
</td></tr>
</notemtpy>
</tbody>

@ -209,7 +209,9 @@ $(function(){
<li>
<a class="item" href="{:U('Payment/transfer_set')}">复核账号</a>
</li>
<li>
<a class="item" href="{:U('User/index')}">制单账号</a>
</li>
</ul>
</if>
<h3 class='no'><i class="icon icon-unfold"></i>打款方式</h3>

@ -0,0 +1,50 @@
<extend name="Public/base"/>
<block name="body">
<div class="tabcon1711">
<form action="{:U()}" method="post" class="form-horizontal form_info_ml">
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">新增制单人</h3>
<p class="description_text"></p>
</div>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l"><i class="mustmark">*</i>姓名:</td>
<td class="r">
<input name="real_name" type="text" class="">
<span class="notice-text">制单人姓名</span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>手机号码:</td>
<td class="r">
<input name="mobile" type="text" class="">
<span class="notice-text">制单人登陆用的手机</span>
</td>
</tr>
</tbody>
</table>
<div class="form-item cf">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">
保存
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back(-1);" >
返回
</a>
</div>
</form>
</div>
</block>
<block name="script">
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('User/index')}');
</script>
</block>

@ -0,0 +1,84 @@
<extend name="Public/base" />
<block name="body">
<!-- 标题栏 -->
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">制单账号</h3>
<p class="description_text">说明:可设置制单账号</p>
</div>
<div class="cf top_nav_list">
<div class="fl button_list">
<a class="" href="{:U('add')}"><span class="button_icon button_icon1"></span>新增</a>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<table class="">
<thead>
<tr>
<th class="">姓名</th>
<th class="">手机号码</th>
<th class="" style="width:8%;min-width:110px;">操作</th>
</tr>
</thead>
<tbody>
<notempty name="data">
<volist name="data" id="vo">
<tr>
<td>{$vo.real_name}</td>
<td>{$vo.mobile} </td>
<td>
<a href="{:U('User/delete',['id'=>$vo['id']])}" class="confirm ajax-get">删除</a>
</td>
</tr>
</volist>
<else/>
<td colspan="9" class="text-center">aOh! 暂时还没有内容!</td>
</notempty>
</tbody>
</table>
</div>
<div class="page">
{$_page}
</div>
</block>
<block name="script">
<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
<script type="text/javascript">
Think.setValue('status',"{:I('status')}");
Think.setValue('row',"{:I('row',10)}");
//搜索功能
$("#search").click(function(){
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url;
});
//回车搜索
$(".search-input").keyup(function(e){
if(e.keyCode === 13){
$("#search").click();
return false;
}
});
//导航高亮
highlight_subnav('{:U('User/index')}');
</script>
</block>
Loading…
Cancel
Save