打款账号

master
chenzhi 4 years ago
parent fd706fb314
commit bed393c5a0

@ -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('删除失败');
}
}
}

@ -221,7 +221,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