init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
|
||||
namespace Retail\Controller;
|
||||
|
||||
use Retail\Business\Vip;
|
||||
|
||||
//[1.8.68]
|
||||
|
||||
/**
|
||||
* 门店会员余额、充值记录
|
||||
* Class VipsbalanceController
|
||||
* @package Retail\Controller
|
||||
*/
|
||||
class VipsbalanceController extends BaseController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取余额统计
|
||||
*/
|
||||
public function getBalanceTotal()
|
||||
{
|
||||
$vipClass = new Vip();
|
||||
$param['req_data'] = I('post.req_data'); // 搜索条件
|
||||
$param['merchant_id'] = $this->merchant_id;
|
||||
$param['store_id'] = $this->store_id;
|
||||
$result = $vipClass->getBalanceTotal($param);
|
||||
$this->ajaxReturn($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 余额记录
|
||||
*/
|
||||
public function balanceList()
|
||||
{
|
||||
$param['req_data'] = I('post.req_data'); // 搜索条件
|
||||
$param['merchant_id'] = $this->merchant_id;
|
||||
$param['store_id'] = $this->store_id;
|
||||
$param['page'] = I('post.page') ? I('post.page') : 1;
|
||||
$param['limit'] = I('post.limit') ? I('post.limit') : 10;
|
||||
$vipClass = new Vip();
|
||||
$result = $vipClass->getBalanceList($param);
|
||||
$this->ajaxReturn($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 余额记录导出
|
||||
*/
|
||||
public function balanceExport()
|
||||
{
|
||||
$param['req_data'] = I('get.req_data'); // 搜索条件
|
||||
$param['merchant_id'] = $this->merchant_id;
|
||||
$param['store_id'] = $this->store_id;
|
||||
$param['is_export'] = 1;
|
||||
$vipClass = new Vip();
|
||||
$result = $vipClass->getBalanceList($param);
|
||||
$file_name = "会员余额记录";
|
||||
$str = $file_name . "导出时间:" . date('Y-m-d H:i:s', time());
|
||||
$head_arr = array(
|
||||
['index', '序号'],
|
||||
['name', '姓名'],
|
||||
['nickname', '昵称'],
|
||||
['mobile_phone', '手机号'],
|
||||
['card_key', '实体卡'],
|
||||
['scene_name', '场景'],
|
||||
['type_name', '类型'],
|
||||
['recharge_mode', '方式'],
|
||||
['money', '使用金额'],
|
||||
['give_money', '赠送金额'],
|
||||
['all_money', '总金额'],
|
||||
['add_time', '时间'],
|
||||
['store_name', '门店'],
|
||||
['remark', '备注'],
|
||||
);
|
||||
getExcel($file_name, $head_arr, $result['data']['list'], $str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员充值记录页面
|
||||
*/
|
||||
public function recharge()
|
||||
{
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值记录-列表
|
||||
*/
|
||||
public function rechargeList()
|
||||
{
|
||||
$param['req_data'] = I('post.req_data'); // 搜索条件
|
||||
$param['page'] = I('post.page');
|
||||
$param['limit'] = I('post.limit');
|
||||
$param['merchant_id'] = $this->merchant_id;
|
||||
$param['store_id'] = $this->store_id;
|
||||
$vipClass = new Vip();
|
||||
$result = $vipClass->getRechargeList($param);
|
||||
$this->ajaxReturn($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值记录-统计
|
||||
*/
|
||||
public function rechargeTotal()
|
||||
{
|
||||
$param['req_data'] = I('post.req_data'); // 搜索条件
|
||||
$param['page'] = I('post.page');
|
||||
$param['limit'] = I('post.limit');
|
||||
$param['merchant_id'] = $this->merchant_id;
|
||||
$param['store_id'] = $this->store_id;
|
||||
$vipClass = new Vip();
|
||||
$result = $vipClass->getRechargeTotal($param);
|
||||
$this->ajaxReturn($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员充值记录导出
|
||||
*/
|
||||
public function rechargeExport()
|
||||
{
|
||||
$param['req_data'] = I('get.req_data'); // 搜索条件
|
||||
$param['page'] = I('get.page');
|
||||
$param['limit'] = I('get.limit');
|
||||
$param['store_id'] = $this->store_id;
|
||||
$param['merchant_id'] = $this->merchant_id;
|
||||
$param['is_export'] = 1;
|
||||
$vipClass = new Vip();
|
||||
$result = $vipClass->getRechargeList($param);
|
||||
if ($result['status'] != 1) {
|
||||
$this->ajaxReturn($result);
|
||||
}
|
||||
$filename = "会员充值记录";
|
||||
$str = $filename . "导出时间:" . date('Y-m-d H:i:s', time());
|
||||
$headArr = [
|
||||
['index', '序号'],
|
||||
['name', '姓名'],
|
||||
['nickname', '昵称'],
|
||||
['mobile_phone', '手机号'],
|
||||
['card_key', '实体卡'],
|
||||
['store_name', '充值门店'],
|
||||
['scene_name', '充值类型'],
|
||||
['recharge_mode', '充值方式'],
|
||||
['money', '充值金额'],
|
||||
['give_money', '赠送金额'],
|
||||
['all_money', '到账金额'],
|
||||
['pay_coupon_fee', '微信支付代金券'],
|
||||
['aging_repay_name', '到账方式'],
|
||||
['add_time', '充值时间'],
|
||||
['remark', '备注'],
|
||||
];
|
||||
getExcel($filename, $headArr, $result['data']['list'], $str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 门店id打印
|
||||
*/
|
||||
public function wifiPrintRechargeOrder()
|
||||
{
|
||||
$res = A('PayApi/Printer')->rechargeWifiPrint([
|
||||
'order_id' => I('post.order_id'),
|
||||
'store_id' => $this->store_id,
|
||||
]);
|
||||
$this->ajaxReturn($res);
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户