Merge branch 'master' of http://git.scdxtc.com/wangxinglong/coupon-admin
commit
9d6faacd05
|
@ -50,11 +50,15 @@ class Recharge extends Base
|
||||||
//这里确定支付成功
|
//这里确定支付成功
|
||||||
$total_fee = $res['total_fee'] / 100;
|
$total_fee = $res['total_fee'] / 100;
|
||||||
//加余额
|
//加余额
|
||||||
$business->save(["balance" => ($business["balance"] + $total_fee)]);
|
$business->save([
|
||||||
|
"balance" => ($business["balance"] + $total_fee),
|
||||||
|
"total_recharge" => ($business["total_recharge"] + $total_fee)
|
||||||
|
]);
|
||||||
//修改支付状态
|
//修改支付状态
|
||||||
$recharge->save([
|
$recharge->save([
|
||||||
"money" => $total_fee,
|
"money" => $total_fee,
|
||||||
"state" => RechargeModel::state_on,
|
"state" => RechargeModel::state_on,
|
||||||
|
"open_id" => $res['openid'],
|
||||||
"update_time" => date("Y-m-d H:i:s"),
|
"update_time" => date("Y-m-d H:i:s"),
|
||||||
"balance" => $business->balance
|
"balance" => $business->balance
|
||||||
]);
|
]);
|
||||||
|
@ -109,11 +113,15 @@ class Recharge extends Base
|
||||||
//这里确定支付成功
|
//这里确定支付成功
|
||||||
$total_fee = $message['total_fee'] / 100;
|
$total_fee = $message['total_fee'] / 100;
|
||||||
//加余额
|
//加余额
|
||||||
$business->save(["balance" => ($business["balance"] + $total_fee)]);
|
$business->inc()->save([
|
||||||
|
"balance" => ($business["balance"] + $total_fee),
|
||||||
|
"total_recharge" => ($business["total_recharge"] + $total_fee)]
|
||||||
|
);
|
||||||
//修改支付状态
|
//修改支付状态
|
||||||
$recharge->save([
|
$recharge->save([
|
||||||
"money" => $total_fee,
|
"money" => $total_fee,
|
||||||
"state" => RechargeModel::state_on,
|
"state" => RechargeModel::state_on,
|
||||||
|
"open_id" => $message['openid'],
|
||||||
"update_time" => date("Y-m-d H:i:s"),
|
"update_time" => date("Y-m-d H:i:s"),
|
||||||
"balance" => $business->balance
|
"balance" => $business->balance
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace app\controller\manager;
|
||||||
|
|
||||||
/*流水查看*/
|
/*流水查看*/
|
||||||
|
|
||||||
|
use app\model\CouponBill;
|
||||||
use app\repository\BillRepository;
|
use app\repository\BillRepository;
|
||||||
|
|
||||||
class Bill extends Base
|
class Bill extends Base
|
||||||
|
@ -17,20 +18,28 @@ class Bill extends Base
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
$startTime = input("start_time/s", date("Y-m-d H:i:s", strtotime(date("Y-m-d") . " -1 month")));
|
||||||
|
$endTime = input("end_time/s", date("Y-m-d 00:00:00"));
|
||||||
if ($this->request->isPost()) {
|
if ($this->request->isPost()) {
|
||||||
$repo = BillRepository::getInstance();
|
$repo = BillRepository::getInstance();
|
||||||
$keyword = $this->request->param('keyword/s', '');
|
$keyword = $this->request->param('keyword/s', '');
|
||||||
$page = $this->request->param('page/d', 1);
|
$page = $this->request->param('page/d', 1);
|
||||||
$size = $this->request->param('size/d', 30);
|
$size = $this->request->param('size/d', 30);
|
||||||
$orders = ['sort'=>'asc'];
|
$orders = ['id' => 'desc'];
|
||||||
|
$list = $repo->billList($page, $size, $keyword, $startTime, $endTime, $orders);
|
||||||
|
$list['agency_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::agency_money, $startTime, $endTime);
|
||||||
$list = $repo->billList($keyword, $page, $size, $orders);
|
$list['admin_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::admin_money, $startTime, $endTime);
|
||||||
|
$list['consumer_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::consumer_money, $startTime, $endTime);
|
||||||
return $this->json(0, 'success', $list);
|
return $this->json(0, 'success', $list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->data["agency_money_sum"] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::agency_money);
|
||||||
|
$this->data["admin_money_sum"] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::admin_money);
|
||||||
|
$this->data["consumer_money_sum"] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::consumer_money);
|
||||||
|
|
||||||
|
$this->data["startTime"] = $startTime;
|
||||||
|
$this->data["endTime"] = $endTime;
|
||||||
|
|
||||||
return $this->view();
|
return $this->view();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,10 +37,10 @@ class Business extends Base
|
||||||
$page = $this->request->param('page/d', 1);
|
$page = $this->request->param('page/d', 1);
|
||||||
$size = $this->request->param('size/d', 30);
|
$size = $this->request->param('size/d', 30);
|
||||||
|
|
||||||
$whereMap = [["business.state", "=", BusinessModel::state_on]];
|
$whereMap = [["c.state", "=", BusinessModel::state_on]];
|
||||||
$orders = ['business.id' => 'desc'];
|
$orders = ['a.id' => 'desc'];
|
||||||
if (!empty($keyword)) {
|
if (!empty($keyword)) {
|
||||||
$whereMap[] = ['account.nick_name|business.business_name', 'like', "%$keyword%"];
|
$whereMap[] = ['b.nick_name|c.business_name', 'like', "%$keyword%"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$list = $repo->businessList($whereMap, $page, $size, $orders);
|
$list = $repo->businessList($whereMap, $page, $size, $orders);
|
||||||
|
@ -48,10 +48,10 @@ class Business extends Base
|
||||||
//得到当前商家的所有优惠券
|
//得到当前商家的所有优惠券
|
||||||
$date = date("Y-m-d H:i:s");
|
$date = date("Y-m-d H:i:s");
|
||||||
//优惠券总数
|
//优惠券总数
|
||||||
$item->coupon_total_count = CouponMain::where(["business_code" => $item->business->code])->sum("count");
|
$item->coupon_total_count = CouponMain::where(["business_code" => $item->business_code])->sum("count");
|
||||||
|
|
||||||
//进行中优惠券总数
|
//进行中优惠券总数
|
||||||
$item->coupon_doing_count = CouponMain::where(["business_code" => $item->business->code])
|
$item->coupon_doing_count = CouponMain::where(["business_code" => $item->business_code])
|
||||||
->whereTime("start_time", "<", $date)
|
->whereTime("start_time", "<", $date)
|
||||||
->whereTime("end_time", ">", $date)
|
->whereTime("end_time", ">", $date)
|
||||||
->where("status", CouponMain::status_on)
|
->where("status", CouponMain::status_on)
|
||||||
|
@ -59,21 +59,21 @@ class Business extends Base
|
||||||
->sum("count");
|
->sum("count");
|
||||||
|
|
||||||
//进行中优惠券总数
|
//进行中优惠券总数
|
||||||
$item->coupon_receive_count = CouponMain::where(["business_code" => $item->business->code])->sum("received_count");
|
$item->coupon_receive_count = CouponMain::where(["business_code" => $item->business_code])->sum("received_count");
|
||||||
|
|
||||||
//过期未使用优惠券总数
|
//过期未使用优惠券总数
|
||||||
$item->coupon_be_overdue_count = Coupon::where(["business_code" => $item->business->code])
|
$item->coupon_be_overdue_count = Coupon::where(["business_code" => $item->business_code])
|
||||||
->where("is_verificated", "=", Coupon::is_verificated_off)
|
->where("is_verificated", "=", Coupon::is_verificated_off)
|
||||||
->whereTime("end_time", "<", $date)
|
->whereTime("end_time", "<", $date)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
//已使用优惠券总数
|
//已使用优惠券总数
|
||||||
$item->coupon_used_count = Coupon::where(["business_code" => $item->business->code])
|
$item->coupon_used_count = Coupon::where(["business_code" => $item->business_code])
|
||||||
->where("is_verificated", "=", Coupon::is_verificated_on)
|
->where("is_verificated", "=", Coupon::is_verificated_on)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
//商家充值总额
|
//商家充值总额
|
||||||
$item->recharge_total_money = $item->business->total_recharge;
|
$item->recharge_total_money = $item->total_recharge;
|
||||||
});
|
});
|
||||||
|
|
||||||
return $this->json(0, 'success', $list);
|
return $this->json(0, 'success', $list);
|
||||||
|
@ -320,7 +320,7 @@ class Business extends Base
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
//创建充值订单
|
//创建充值订单
|
||||||
if (!$order = RechargeRepository::getInstance()->createOrder($businessCode, $money)) {
|
if (!$order = RechargeRepository::getInstance()->adminCreateOrder($businessCode, $money)) {
|
||||||
throw new RepositoryException('订单创建失败,请稍后重试');
|
throw new RepositoryException('订单创建失败,请稍后重试');
|
||||||
}
|
}
|
||||||
//生成支付
|
//生成支付
|
||||||
|
@ -344,7 +344,7 @@ class Business extends Base
|
||||||
return $this->json("5001", $e->getMessage());
|
return $this->json("5001", $e->getMessage());
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
return $this->json("5001", $e->getMessage());
|
return $this->json("5002", $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,10 @@ class Login extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
$userInfo = [
|
$userInfo = [
|
||||||
'user_id' => $member['id'],
|
'user_id' => $member['id'],
|
||||||
'username' => $member['username'],
|
'username' => $member['username'],
|
||||||
'nickname' => $member['nickname'],
|
'nickname' => $member['nickname'],
|
||||||
|
'business_code' => $member['business_code'],
|
||||||
];
|
];
|
||||||
|
|
||||||
$jwtToken = Jwt::generate($userInfo, env('app.expire', 7200));
|
$jwtToken = Jwt::generate($userInfo, env('app.expire', 7200));
|
||||||
|
|
|
@ -14,5 +14,20 @@ use think\db\exception\ModelNotFoundException;
|
||||||
*/
|
*/
|
||||||
class CouponBill extends Base
|
class CouponBill extends Base
|
||||||
{
|
{
|
||||||
|
public const agency_money = "agency_money";
|
||||||
|
public const admin_money = "admin_money";
|
||||||
|
public const consumer_money = "consumer_money";
|
||||||
|
public function couponMain()
|
||||||
|
{
|
||||||
|
return $this->hasOne(CouponMain::class, 'id',"coupon_main_id");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function business()
|
||||||
|
{
|
||||||
|
return $this->hasOne(Business::class, 'code',"business_code");
|
||||||
|
}
|
||||||
|
public function account()
|
||||||
|
{
|
||||||
|
return $this->hasOne(Account::class, 'user_code',"user_code");
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -25,12 +25,18 @@ class BillRepository extends Repository
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 流水列表
|
* 流水列表
|
||||||
* @param $keyword
|
|
||||||
* @param $page
|
* @param $page
|
||||||
* @param $size
|
* @param $size
|
||||||
* @param $orders
|
* @param $keyword
|
||||||
|
* @param null $startTime
|
||||||
|
* @param null $endTime
|
||||||
|
* @param array $orders
|
||||||
|
* @return array
|
||||||
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
|
* @throws \think\db\exception\DbException
|
||||||
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
public function billList($keyword, $page, $size, $orders = ["a.id" => "desc"])
|
public function billList($page, $size, $keyword = null, $startTime = null, $endTime = null, $orders = ["id" => "desc"])
|
||||||
{
|
{
|
||||||
$failData = [
|
$failData = [
|
||||||
'total' => 0,
|
'total' => 0,
|
||||||
|
@ -38,14 +44,28 @@ class BillRepository extends Repository
|
||||||
'size' => $size,
|
'size' => $size,
|
||||||
'list' => new Collection(),
|
'list' => new Collection(),
|
||||||
];
|
];
|
||||||
$rep = CouponBill::alias("a")
|
$rep = CouponBill::with([
|
||||||
->join("business b", "a.business_code = b.code")
|
"business" => function ($query) use ($keyword) {
|
||||||
->wher(!empty($keyword), function ($q) use ($keyword) {
|
$query->field(["code", "business_name"])->when(empty($keyword), function ($q) use ($keyword) {
|
||||||
$q->where("b.business_name", "like", "%$keyword%");
|
$q->where("business_name", "like", "%$keyword%");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
"account" => function ($q) {
|
||||||
|
$q->field(["user_code", "nick_name"]);
|
||||||
|
},
|
||||||
|
"couponMain" => function ($q) {
|
||||||
|
$q->field(["id", "name"]);
|
||||||
|
},
|
||||||
|
])
|
||||||
|
->when(!empty($startTime), function ($q) use ($startTime) {
|
||||||
|
$q->whereTime("create_time", ">=", $startTime);
|
||||||
|
})
|
||||||
|
->when(!empty($endTime), function ($q) use ($endTime) {
|
||||||
|
$q->whereTime("create_time", "<=", $endTime);
|
||||||
});
|
});
|
||||||
|
|
||||||
$failData ['total'] = $rep->count();
|
$failData ['total'] = $rep->count();
|
||||||
$failData ['list'] = $rep->field("a.*,b.business_name")
|
$failData ['list'] = $rep
|
||||||
->page($page, $size)
|
->page($page, $size)
|
||||||
->order($orders)
|
->order($orders)
|
||||||
->select();
|
->select();
|
||||||
|
@ -53,4 +73,21 @@ class BillRepository extends Repository
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总收益
|
||||||
|
* @param $field
|
||||||
|
* @param null $start_time
|
||||||
|
* @param null $end_time
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
public function getAgencyMoneySum($field, $start_time = null, $end_time = null)
|
||||||
|
{
|
||||||
|
return CouponBill::when(!empty($start_time), function ($q) use ($start_time) {
|
||||||
|
$q->whereTime("create_time", ">=", $start_time);
|
||||||
|
})->when(!empty($end_time), function ($q) use ($end_time) {
|
||||||
|
$q->whereTime("create_time", "<=", $end_time);
|
||||||
|
})
|
||||||
|
->sum($field);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -33,7 +33,10 @@ class BusinessRepository extends Repository
|
||||||
*/
|
*/
|
||||||
public function businessList(array $where = [], int $page = 1, int $limit = 0, array $order = [])
|
public function businessList(array $where = [], int $page = 1, int $limit = 0, array $order = [])
|
||||||
{
|
{
|
||||||
$q = $this->model->alias("a")->field("id")->withJoin(["account" => ["avatar_url", "nick_name"], "business"]);
|
$q = $this->model->alias("a")
|
||||||
|
->join("account b","a.user_code = b.user_code")
|
||||||
|
->join("business c","a.business_code = c.code")
|
||||||
|
->field(["c.code as business_code","b.avatar_url", "b.nick_name as account_nick_name","c.business_name","c.total_recharge","c.id as basiness_id","c.balance"]);
|
||||||
$data = [
|
$data = [
|
||||||
'total' => 0,
|
'total' => 0,
|
||||||
'current' => $page,
|
'current' => $page,
|
||||||
|
@ -113,7 +116,12 @@ class BusinessRepository extends Repository
|
||||||
/* 获取所有的商家*/
|
/* 获取所有的商家*/
|
||||||
public function getBusinessAll()
|
public function getBusinessAll()
|
||||||
{
|
{
|
||||||
return Business:: where("state", Business::state_on)->select();
|
return BusinessFlow::alias("a")
|
||||||
|
->join("account b","a.user_code = b.user_code")
|
||||||
|
->join("business c","a.business_code = c.code")
|
||||||
|
->field("c.code , c.business_name ")
|
||||||
|
->order("a.id desc")
|
||||||
|
->select();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,9 +19,32 @@ use think\Model;
|
||||||
*/
|
*/
|
||||||
class RechargeRepository extends Repository
|
class RechargeRepository extends Repository
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* 后台创建一个支付订单
|
||||||
|
* @param $businessCode
|
||||||
|
* @param $money
|
||||||
|
* @return Recharge|Model
|
||||||
|
*/
|
||||||
|
public function adminCreateOrder($businessCode, $money)
|
||||||
|
{
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
"order_num" => createUuid(),
|
||||||
|
"agency_code" => session('auth')['business_code']??'',
|
||||||
|
"business_code" => $businessCode,
|
||||||
|
"money" => $money,
|
||||||
|
"state" => Recharge::state_off,
|
||||||
|
"create_time" => date("Y-m-d H:i:s"),
|
||||||
|
"balance" => 0,
|
||||||
|
];
|
||||||
|
return Recharge::create($data);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 创建一个支付订单
|
* 创建一个支付订单
|
||||||
* */
|
* @param $businessCode
|
||||||
|
* @param $money
|
||||||
|
* @return Recharge|Model
|
||||||
|
*/
|
||||||
public function createOrder($businessCode, $money)
|
public function createOrder($businessCode, $money)
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
|
@ -34,5 +57,4 @@ class RechargeRepository extends Repository
|
||||||
];
|
];
|
||||||
return Recharge::create($data);
|
return Recharge::create($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,10 +1,11 @@
|
||||||
layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function () {
|
layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect',"laydate"], function () {
|
||||||
let $ = layui.jquery,
|
let $ = layui.jquery,
|
||||||
form = layui.form,
|
form = layui.form,
|
||||||
table = layui.table,
|
table = layui.table,
|
||||||
layer = layui.layer,
|
layer = layui.layer,
|
||||||
xmSelect = layui.xmSelect,
|
xmSelect = layui.xmSelect,
|
||||||
miniTab = layui.miniTab;
|
miniTab = layui.miniTab,
|
||||||
|
laydate = layui.laydate ;
|
||||||
|
|
||||||
/**** index begin ***/
|
/**** index begin ***/
|
||||||
//index页面
|
//index页面
|
||||||
|
@ -30,6 +31,10 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
|
||||||
limitName: 'size',
|
limitName: 'size',
|
||||||
},
|
},
|
||||||
parseData: function (res) {
|
parseData: function (res) {
|
||||||
|
//console.log(res)
|
||||||
|
$("#new_agency_money_sum").text(res.data.agency_money_sum?res.data.agency_money_sum:0)
|
||||||
|
$("#new_admin_money_sum").text(res.data.admin_money_sum?res.data.admin_money_sum:0)
|
||||||
|
$("#new_consumer_money_sum").text(res.data.consumer_money_sum?res.data.consumer_money_sum:0)
|
||||||
return {
|
return {
|
||||||
"code": res.code, //解析接口状态
|
"code": res.code, //解析接口状态
|
||||||
"msg": res.msg, //解析提示文本
|
"msg": res.msg, //解析提示文本
|
||||||
|
@ -40,11 +45,30 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
|
||||||
page: true,
|
page: true,
|
||||||
cols: [[
|
cols: [[
|
||||||
{type: 'checkbox'},
|
{type: 'checkbox'},
|
||||||
{field: 'id', width: 80, title: 'ID'},
|
{templet:function(d){
|
||||||
{field: 'title', minWidth: 200, title: '标题'},
|
if( d.account != undefined &&d.account){
|
||||||
|
return d.account.nick_name
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}, title: '用户昵称'},
|
||||||
|
{templet:function(d){
|
||||||
|
if( d.business != undefined &&d.business){
|
||||||
|
return d.business.business_name
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}, title: '商家名称'},
|
||||||
|
{templet:function(d){
|
||||||
|
if( d.couponMain != undefined &&d.couponMain){
|
||||||
|
return d.couponMain.name
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}, title: '优惠券名称'},
|
||||||
|
{templet:"#row-commission", title: '持有比例(渠道商:平台:消费者)'},
|
||||||
|
{field: 'money', minWidth: 200, title: '金额'},
|
||||||
|
{field: 'create_time', minWidth: 200, title: '时间'},
|
||||||
]],
|
]],
|
||||||
done: function () {
|
done: function (res, curr, count) {
|
||||||
|
|
||||||
Tools.setInsTb(insTb);
|
Tools.setInsTb(insTb);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -60,6 +84,18 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//日期时间选择器
|
||||||
|
laydate.render({
|
||||||
|
elem: '#start_time'
|
||||||
|
,type: 'datetime'
|
||||||
|
});
|
||||||
|
|
||||||
|
//日期时间选择器
|
||||||
|
laydate.render({
|
||||||
|
elem: '#end_time'
|
||||||
|
,type: 'datetime'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,25 +40,17 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
|
||||||
page: true,
|
page: true,
|
||||||
cols: [[
|
cols: [[
|
||||||
// {type: 'checkbox'},
|
// {type: 'checkbox'},
|
||||||
{templet:function(d){
|
{field:"basiness_id", width: 80, title: 'ID'},
|
||||||
return d.business.id
|
|
||||||
}, width: 80, title: 'ID'},
|
|
||||||
{templet: '#row-cover', title: '头像', style: 'height: 90px;'},
|
{templet: '#row-cover', title: '头像', style: 'height: 90px;'},
|
||||||
{templet:function(d){
|
{field:"account_nick_name", title: '昵称'},
|
||||||
return d.account.nick_name
|
{field: "business_name" ,title: '商家名称'},
|
||||||
}, title: '昵称'},
|
|
||||||
{templet:function(d){
|
|
||||||
return d.business.business_name
|
|
||||||
} ,title: '商家名称'},
|
|
||||||
{field: 'coupon_total_count', title: '优惠券总数量'},
|
{field: 'coupon_total_count', title: '优惠券总数量'},
|
||||||
{field: 'coupon_doing_count', title: '进行中优惠券数量'},
|
{field: 'coupon_doing_count', title: '进行中优惠券数量'},
|
||||||
{field: 'coupon_receive_count', title: '已领取优惠券数量'},
|
{field: 'coupon_receive_count', title: '已领取优惠券数量'},
|
||||||
{field: 'coupon_be_overdue_count', title: '过期未使用优惠券数量'},
|
{field: 'coupon_be_overdue_count', title: '过期未使用优惠券数量'},
|
||||||
{field: 'coupon_used_count', title: '已使用优惠数量'},
|
{field: 'coupon_used_count', title: '已使用优惠数量'},
|
||||||
|
|
||||||
{templet:function(d){
|
{field: 'balance',title: '商家余额'},
|
||||||
return d.business.balance
|
|
||||||
},field: 'balance',title: '商家余额'},
|
|
||||||
{field: 'recharge_total_money', title: '充值总额'},
|
{field: 'recharge_total_money', title: '充值总额'},
|
||||||
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', fixed: 'right'}
|
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', fixed: 'right'}
|
||||||
]],
|
]],
|
||||||
|
|
|
@ -15,14 +15,99 @@
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
.l_font{
|
||||||
|
font-size: 26px;height: 25px
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="layui-row layui-col-space12">
|
<div class="layui-row layui-col-space12">
|
||||||
|
<div class="layui-row layui-col-space15">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md10">
|
||||||
|
<div class="layui-col-md12">
|
||||||
|
<div class="layui-col-md3">
|
||||||
|
<div class="layui-panel" style="border-radius: 8px;">
|
||||||
|
<div class="layui-row" style="padding: 5% 0;text-align: center">
|
||||||
|
<h3><strong>总流水:</strong></h3>
|
||||||
|
<span class="l_font" > </span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md3">
|
||||||
|
<div class="layui-panel" style="border-radius: 8px;">
|
||||||
|
<div class="layui-row" style="padding: 5% 0;text-align: center">
|
||||||
|
<h3><strong>渠道商提成总额</strong></h3>
|
||||||
|
<span class="l_font">{$agency_money_sum ?? 0}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md3">
|
||||||
|
<div class="layui-panel" style="border-radius: 8px;">
|
||||||
|
<div class="layui-row" style="padding: 5% 0;text-align: center">
|
||||||
|
<h3><strong>太古平台提成总额</strong></h3>
|
||||||
|
<span class="l_font">{$admin_money_sum ?? 0}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md3">
|
||||||
|
<div class="layui-panel" style="border-radius: 8px;">
|
||||||
|
<div class="layui-row" style="padding: 5% 0;text-align: center">
|
||||||
|
<h3><strong>消费者提成总额</strong></h3>
|
||||||
|
<span class="l_font">{$consumer_money_sum?? 0}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md12">
|
||||||
|
<div class="layui-col-md3">
|
||||||
|
<div class="layui-panel" style="border-radius: 8px;">
|
||||||
|
<div class="layui-row" style="padding: 5% 0;text-align: center">
|
||||||
|
<h3><strong>当前流水:</strong></h3>
|
||||||
|
<span class="l_font" > </span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md3">
|
||||||
|
<div class="layui-panel" style="border-radius: 8px;">
|
||||||
|
<div class="layui-row" style="padding: 5% 0;text-align: center">
|
||||||
|
<h3><strong>渠道商提成总额</strong></h3>
|
||||||
|
<span class="l_font" id="new_agency_money_sum"> </span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md3">
|
||||||
|
<div class="layui-panel" style="border-radius: 8px;">
|
||||||
|
<div class="layui-row" style="padding: 5% 0;text-align: center">
|
||||||
|
<h3><strong>太古平台提成总额</strong></h3>
|
||||||
|
<span class="l_font" id="new_admin_money_sum"> </span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md3">
|
||||||
|
<div class="layui-panel" style="border-radius: 8px;">
|
||||||
|
<div class="layui-row" style="padding: 5% 0;text-align: center">
|
||||||
|
<h3><strong>消费者提成总额</strong></h3>
|
||||||
|
<span class="l_font" id="new_consumer_money_sum"> </span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="layui-col-xs12 layui-col-md12">
|
<div class="layui-col-xs12 layui-col-md12">
|
||||||
<div id="echarts-records" style="background-color:#ffffff;min-height:600px;">
|
<div id="echarts-records" style="background-color:#ffffff;min-height:600px;">
|
||||||
<div class="layuimini-container location-index-page">
|
<div class="layuimini-container location-index-page">
|
||||||
<div class="layuimini-main">
|
<div class="layuimini-main">
|
||||||
<fieldset class="table-search-fieldset" style="display: none">
|
<fieldset class="table-search-fieldset" >
|
||||||
<legend>搜索信息</legend>
|
<legend>搜索信息</legend>
|
||||||
<div style="margin: 10px 10px 10px 10px">
|
<div style="margin: 10px 10px 10px 10px">
|
||||||
<form class="layui-form layui-form-pane" action="">
|
<form class="layui-form layui-form-pane" action="">
|
||||||
|
@ -33,7 +118,18 @@
|
||||||
<input type="text" name="keyword" class="layui-input">
|
<input type="text" name="keyword" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">开始时间</label>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" name="start_time" id="start_time" value="{$startTime}" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">结束时间</label>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" name="end_time" id="end_time" value="{$endTime}" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
|
<button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
|
||||||
|
@ -53,14 +149,17 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- toolbar -->
|
||||||
|
<script type="text/html" id="toolbar-tpl">
|
||||||
|
<a class="layui-btn layui-btn-primary layui-btn-sm" data-table-refresh lay-event="refresh"><i class="fa fa-refresh"></i></a>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<!-- 列 轮播图 -->
|
<!-- 列 轮播图 -->
|
||||||
<script type="text/html" id="row-cover">
|
<script type="text/html" id="row-commission">
|
||||||
<div class="layui-layer-photos">
|
比例: <span style="font-weight: bold">{{ d.commission_agency}} : {{ d.commission_admin}} : {{ d.commission_consumer}}</span> <br>
|
||||||
<img src="{{ getFileRequestUrl(d.src) }}" layer-src="{{ getFileRequestUrl(d.src) }}" alt="">
|
金额: <span style="font-weight: bold">{{ d.agency_money}} : {{ d.admin_money}} : {{ d.consumer_money}}</span>
|
||||||
</div>
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="__MANAGER__/js/bill.js?v={:mt_rand()}"></script>
|
<script src="__MANAGER__/js/bill.js?v={:mt_rand()}"></script>
|
|
@ -51,12 +51,12 @@
|
||||||
|
|
||||||
<!-- 操作列 -->
|
<!-- 操作列 -->
|
||||||
<script type="text/html" id="row-operate">
|
<script type="text/html" id="row-operate">
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/business-coupon-list.html?business_code={{d.business.code}}" data-title="【{{ d.business.business_name }}】优惠券浏览" lay-event="">优惠券浏览</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/business-coupon-list.html?business_code={{d.business_code}}" data-title="【{{ d.business_name }}】优惠券浏览" lay-event="">优惠券浏览</a>
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/business-deduction-list.html?business_code={{d.business.code}}" data-title="【{{ d.business.business_name }}】扣费记录" lay-event="">扣费记录</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/business-deduction-list.html?business_code={{d.business_code}}" data-title="【{{ d.business_name }}】扣费记录" lay-event="">扣费记录</a>
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/business-recharge-list.html?business_code={{d.business.code}}" data-title="【{{ d.business.business_name }}】充值记录" lay-event="">充值记录</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/business-recharge-list.html?business_code={{d.business_code}}" data-title="【{{ d.business_name }}】充值记录" lay-event="">充值记录</a>
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/business-detail.html?business_code={{d.business.code}}" data-title="【{{ d.business.business_name }}】基本资料" lay-event="">基本资料</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/business-detail.html?business_code={{d.business_code}}" data-title="【{{ d.business_name }}】基本资料" lay-event="">基本资料</a>
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/assign.html?business_code={{d.business.code}}" data-title="给【{{ d.business.business_name }}】指派代理商" lay-event="">指派代理商</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/assign.html?business_code={{d.business_code}}" data-title="给【{{ d.business_name }}】指派代理商" lay-event="">指派代理商</a>
|
||||||
<a class="layui-btn layui-btn-xs" href="javascript:;" layuimini-content-href="/manager/business/recharge-behalf.html?business_code={{d.business.code}}" data-title="给【{{ d.business.business_name }}】充值" >代为充值</a>
|
<a class="layui-btn layui-btn-xs" href="javascript:;" layuimini-content-href="/manager/business/recharge-behalf.html?business_code={{d.business_code}}" data-title="给【{{ d.business_name }}】充值" >代为充值</a>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- toolbar -->
|
<!-- toolbar -->
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
<!-- 列 轮播图 -->
|
<!-- 列 轮播图 -->
|
||||||
<script type="text/html" id="row-cover">
|
<script type="text/html" id="row-cover">
|
||||||
<div class="layui-layer-photos">
|
<div class="layui-layer-photos">
|
||||||
<img src="{{ d.account.avatar_url }}" layer-src="{{ d.account.avatar_url }}" alt="">
|
<img src="{{ d.avatar_url }}" layer-src="{{ d.avatar_url }}" alt="">
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue