diff --git a/Application/Payment/Controller/UserController.class.php b/Application/Payment/Controller/UserController.class.php new file mode 100644 index 000000000..b945f4b77 --- /dev/null +++ b/Application/Payment/Controller/UserController.class.php @@ -0,0 +1,80 @@ + + */ +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('删除失败'); + } + } + + + + +} diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html index 19f84250e..56580344d 100644 --- a/Application/Payment/View/ExcelPayment/lists.html +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -221,7 +221,7 @@ 合计 - 打款成功金额: {$money.success_money}  /  待打款金额: {$money.statement_money}  /  打款成功金额: {$money.error_money} + 打款成功金额: {$money.success_money}  /  待打款金额: {$money.statement_money}  /  打款失败金额: {$money.error_money} diff --git a/Application/Payment/View/Public/base.html b/Application/Payment/View/Public/base.html index 4c0b381f4..edf351e1f 100644 --- a/Application/Payment/View/Public/base.html +++ b/Application/Payment/View/Public/base.html @@ -209,7 +209,9 @@ $(function(){
  • 复核账号
  • - +
  • + 制单账号 +
  • 打款方式

    diff --git a/Application/Payment/View/User/add.html b/Application/Payment/View/User/add.html new file mode 100644 index 000000000..ab9fc7180 --- /dev/null +++ b/Application/Payment/View/User/add.html @@ -0,0 +1,50 @@ + + + +
    +
    + + + + + + + + + + + + + + + +
    *姓名: + + 制单人姓名 +
    *手机号码: + + 制单人登陆用的手机 +
    + +
    + + + 返回 + +
    + +
    +
    +
    + + + + diff --git a/Application/Payment/View/User/index.html b/Application/Payment/View/User/index.html new file mode 100644 index 000000000..4b93c1ab7 --- /dev/null +++ b/Application/Payment/View/User/index.html @@ -0,0 +1,84 @@ + + + + + + + + +
    +
    + 新增 +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    姓名手机号码操作
    {$vo.real_name}{$vo.mobile} + 删除 +
    aOh! 暂时还没有内容!
    +
    +
    + + {$_page} +
    + + +
    + + + + + +