application/controllers/scm/payment.php

(开头部分) 13KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Payment extends CI_Controller {

    public function __construct(){
        parent::__construct();
		$this->common_model->checkpurview();
		$this->jxcsys = $this->session->userdata('jxcsys');
    }
	
	public function index() {
	    $action = $this->input->get('action',TRUE);
		switch ($action) {
			case 'initPay':
			    $this->common_model->checkpurview(130);
			    $this->load->view('scm/payment/initPay');	
				break;  
			case 'editPay':
			    $this->common_model->checkpurview(129);
			    $this->load->view('scm/payment/initPay');	
				break;  	
			case 'initUnhxList':
			    $this->load->view('scm/payment/initUnhxList');
				break; 
			case 'initPayList':
			    $this->common_model->checkpurview(129);
			    $this->load->view('scm/payment/initPayList');
				break;
			default:  
			    $this->common_model->checkpurview(129);
			    $this->payList();	
		}
	}
	
	public function payList(){
		$v = array();
	    $data['status'] = 200;
		$data['msg']    = 'success'; 
		$page = max(intval($this->input->get_post('page',TRUE)),1);
		$rows = max(intval($this->input->get_post('rows',TRUE)),100);
		$matchCon  = str_enhtml($this->input->get_post('matchCon',TRUE));
		$beginDate  = str_enhtml($this->input->get_post('beginDate',TRUE));
		$endDate  = str_enhtml($this->input->get_post('endDate',TRUE));
		$where  = ' and a.transType=153101';  
		$where .= $matchCon  ? ' and (b.name like "%'.$matchCon.'%" or description like "%'.$matchCon.'%" or billNo like "%'.$matchCon.'%")' : ''; 
		$where .= $beginDate ? ' and a.billDate>="'.$beginDate.'"' : ''; 
		$where .= $endDate ? ' and a.billDate<="'.$endDate.'"' : ''; 
		$offset = $rows * ($page-1);
		$data['data']['page']      = $page;
		$data['data']['records']   = $this->data_model->get_invoice($where,3);   //总条数
		$data['data']['total']     = ceil($data['data']['records']/$rows);                                 //总分页数
		$list = $this->data_model->get_invoice($where.' order by id desc limit '.$offset.','.$rows.'');  
		foreach ($list as $arr=>$row) {
		    $v[$arr]['amount']       = (float)$row['rpAmount'];     //付款金额
			$v[$arr]['adjustRate']   = (float)$row['discount'];   //整单折扣
			$v[$arr]['deAmount']     = (float)$row['rpAmount'];   //本次付款
			$v[$arr]['billDate']     = $row['billDate'];
			$v[$arr]['bDeAmount']    = (float)$row['hxAmount'];   //本次核销
			$v[$arr]['id']           = intval($row['id']);
			$v[$arr]['hxAmount']     = (float)$row['hxAmount'];   //本次核销
后面还有 276 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。