master
wangxinglong 2021-12-01 16:53:44 +08:00
parent c7d77f4ca6
commit dd6b9d9699
19 changed files with 831 additions and 72 deletions

View File

@ -14,7 +14,6 @@ class Bill extends Base
* 流水列表
*
* @return Json|View
* @throws Exception
*/
public function index()
{
@ -25,11 +24,11 @@ class Bill extends Base
$keyword = $this->request->param('keyword/s', '');
$page = $this->request->param('page/d', 1);
$size = $this->request->param('size/d', 30);
$orders = ['id' => 'desc'];
$orders = ['a.id' => 'desc'];
$list = $repo->billList($page, $size, $keyword, $startTime, $endTime, $orders);
$list['agency_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::agency_money, $startTime, $endTime);
$list['admin_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::admin_money, $startTime, $endTime);
$list['consumer_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::consumer_money, $startTime, $endTime);
$list['agency_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::agency_money, $keyword, $startTime, $endTime);
$list['admin_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::admin_money, $keyword, $startTime, $endTime);
$list['consumer_money_sum'] = BillRepository::getInstance()->getAgencyMoneySum(CouponBill::consumer_money, $keyword, $startTime, $endTime);
return $this->json(0, 'success', $list);
}
@ -43,5 +42,65 @@ class Bill extends Base
return $this->view();
}
/**
* 充值流水
*
* @return Json|View
* @throws Exception
*/
public function recharge()
{
$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()) {
$repo = BillRepository::getInstance();
$keyword = $this->request->param('keyword/s', '');
$page = $this->request->param('page/d', 1);
$size = $this->request->param('size/d', 30);
$orders = ['a.id' => 'desc'];
$list = $repo->rechargeBillList($page, $size, $keyword, $startTime, $endTime, $orders);
$list['recharge_money_sum'] = BillRepository::getInstance()->getRechargeMoneySum($keyword, $startTime, $endTime);
return $this->json(0, 'success', $list);
}
$this->data["recharge_money_sum"] = BillRepository::getInstance()->getRechargeMoneySum();
$this->data["startTime"] = $startTime;
$this->data["endTime"] = $endTime;
return $this->view();
}
/**
* 扣款流水
*
* @return Json|View
* @throws Exception
*/
public function deduction()
{
$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()) {
$repo = BillRepository::getInstance();
$keyword = $this->request->param('keyword/s', '');
$page = $this->request->param('page/d', 1);
$size = $this->request->param('size/d', 30);
$orders = ['a.id' => 'desc'];
$list = $repo->deductionBillList($page, $size, $keyword, $startTime, $endTime, $orders);
$list['deduction_money_sum'] = BillRepository::getInstance()->getDeductionMoneySum($keyword,$startTime, $endTime);
return $this->json(0, 'success', $list);
}
$this->data["deduction_money_sum"] = BillRepository::getInstance()->getDeductionMoneySum();
$this->data["startTime"] = $startTime;
$this->data["endTime"] = $endTime;
return $this->view();
}
}

View File

@ -71,22 +71,23 @@ class Coupon extends Base
->when(Member::is_agency($this->auth['roles']),function ($q){
$q->where( 'agency_code', '=', $this->auth['business_code']);
})
->field("code,business_name,business_subtitle,type")
->with('category');
->field("code,business_name,business_subtitle,type");
//->with('category');
});
}
if(Member::is_agency($this->auth['roles'])){
return $q::hasWhere('business', function ($q) {
$q//如果是渠道商或者工作人员 只查看自己的下级商家
->where( 'agency_code', '=', $this->auth['business_code'])
->field("code,business_name,business_subtitle,type")
->with('category');
->field("code,business_name,business_subtitle,type");
//->with('category');
});
}else{
return $q->with(["business" => function ($query) {
$query->field("code,business_name,business_subtitle,type")
->with('category');
$query->field("code,business_name,business_subtitle,type");
//->with('category');
}]);
}

View File

@ -61,13 +61,9 @@ class Index extends Base
$res['logoInfo'] = ['title' => '恒美植发', 'href' => "", 'image' => '/static/manager/image/logo.png'];
$menus = CmsRepository::getInstance()->getMenuList(Menu::TYPE_MENU, Menu::SHOW_YES)->toArray();
foreach ($menus as $k => $m) {
$menus[$k]['icon'] = !empty($m['icon']) ? 'fa '.$m['icon'] : '';
$menus[$k]['href'] = ltrim($m['href'], '/');
}
$menus = CmsRepository::getInstance()->buildMenuChild(0, $menus, 'child',);
$userId = $this->auth['user_id'] ?? 0;
$menus = CmsRepository::getInstance()->handMenuRule($userId, $menus);
$menus = CmsRepository::getInstance()->buildMenuChild(0, $menus, 'child');
$res['menuInfo'] = $menus;
return json($res);

View File

@ -16,4 +16,8 @@ class Business extends Base
{
return $this->hasOne(Account::class, 'business_code',"code");
}
public function agency()
{
return $this->hasOne(self::class,"code","agency_code");
}
}

View File

@ -86,6 +86,7 @@ class Member extends Base
/**
* 验证当前用户是否是渠道商
* @param string $roles
* @return bool
*/
public static function is_agency(string $roles)
{
@ -101,6 +102,7 @@ class Member extends Base
}
if (in_array(self::STAFF_ROLE_ID, $roles) || in_array(self::ANENT_ROLE_ID, $roles)) {
return true;
}
return false;

View File

@ -19,6 +19,7 @@ class Recharge extends Base
public function business()
{
return $this->hasOne(Business::class,"code","business_code")->bind(["business_name"]);
return $this->hasOne(Business::class,"code","business_code");
}
}

View File

@ -3,7 +3,9 @@
namespace app\repository;
use app\model\CouponBill;
use app\model\Deduction;
use app\model\Member as MemberModel;
use app\model\Recharge;
use app\service\Repository;
use think\Collection;
use think\Model;
@ -27,9 +29,6 @@ class BillRepository extends Repository
* @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($page, $size, $keyword = null, $startTime = null, $endTime = null, $orders = ["id" => "desc"])
{
@ -43,7 +42,6 @@ class BillRepository extends Repository
->join("business b", "a.business_code = b.code")
->join("account c", "a.user_code = c.user_code")
->join("coupon_main d", "a.coupon_main_id = d.id")
->when(!empty($keyword), function ($q) use ($keyword) {
$q->where("b.business_name|c.nick_name|d.name", "like", "%$keyword%");
})
@ -56,11 +54,7 @@ class BillRepository extends Repository
->when(!empty($endTime), function ($q) use ($endTime) {
$q->whereTime("a.create_time", "<=", $endTime);
})
->field("a.*,b.business_name,c.nick_name,c.avatar_url,d.name as coupon_main_name")
;
->field("a.*,b.business_name,c.nick_name,c.avatar_url,d.name as coupon_main_name");
$failData ['total'] = $rep->count();
$failData ['list'] = $rep
@ -70,26 +64,202 @@ class BillRepository extends Repository
return $failData;
}
/**
* 充值流水列表
* @param $page
* @param $size
* @param $keyword
* @param null $startTime
* @param null $endTime
* @param array $orders
* @return array
*/
public function rechargeBillList($page, $size, $keyword = null, $startTime = null, $endTime = null, $orders = ["a.id" => "desc"])
{
$failData = [
'total' => 0,
'current' => $page,
'size' => $size,
'list' => new Collection(),
];
$rep = Recharge::alias("a")
->join("account b", "a.open_id = b.open_id")
->join("business c", "a.business_code = c.code")
->join("member d", "a.member_id = d.id", "left")
->join("business e", "c.agency_code = e.code", "left")
->when(!empty($startTime), function ($q) use ($startTime) {
$q->whereTime("a.update_time", ">=", $startTime);
})
->when(!empty($keyword), function ($q) use ($keyword) {
$q->where("c.business_name|e.business_name", "like", "%$keyword%");
})
->when(!empty($endTime), function ($q) use ($endTime) {
$q->whereTime("a.update_time", "<=", $endTime);
})
->field(
[
"a.*",
"b.nick_name",
"b.avatar_url",
"d.nickname as member_nickname",
"c.business_name",
"e.business_name as agency_business_name",
]
);
$failData ['total'] = $rep->count();
$failData ['list'] = $rep
->page($page, $size)
->order($orders)
->select();
return $failData;
}
/**
* 扣款流水列表
* @param $page
* @param $size
* @param $keyword
* @param null $startTime
* @param null $endTime
* @param array $orders
* @return array
*/
public function deductionBillList($page, $size, $keyword = null, $startTime = null, $endTime = null, $orders = ["id" => "desc"])
{
$failData = [
'total' => 0,
'current' => $page,
'size' => $size,
'list' => new Collection(),
];
$rep = Deduction::alias("a")
->join("business c", "a.business_code = c.code")
->join("business f", "f.code = c.agency_code", "left")
->join("coupon_main e", "a.coupon_main_id = e.id")
->join("coupon_bill d", "a.bill_id = d.id")
->join("account b", "d.user_code = b.user_code", "left")
->when(!empty($startTime), function ($q) use ($startTime) {
$q->whereTime("a.create_time", ">=", $startTime);
})
->when(!empty($keyword), function ($q) use ($keyword) {
$q->where("c.business_name|f.business_name", "like", "%" . $keyword . "%");
})
->when(!empty($endTime), function ($q) use ($endTime) {
$q->whereTime("a.create_time", "<=", $endTime);
})
->field(
[
"a.money",
"a.balance",
"a.create_time",
"b.nick_name",
"b.avatar_url",
"e.name as coupon_main_name",
"c.business_name",
"f.business_name as agency_business_name",
"d.consumer_money",
"d.admin_money",
"d.agency_money",
"d.lat",
"d.lng",
]
);
$failData ['total'] = $rep->count();
$failData ['list'] = $rep
->page($page, $size)
->order($orders)
->select();
return $failData;
}
/**
* 总收益
* @param $field
* @param null $keyword
* @param null $start_time
* @param null $end_time
* @return float
*/
public function getAgencyMoneySum($field, $start_time = null, $end_time = null)
public function getAgencyMoneySum($field, $keyword = null, $start_time = null, $end_time = null)
{
return CouponBill::when(!empty($start_time), function ($q) use ($start_time) {
$q->whereTime("create_time", ">=", $start_time);
return CouponBill::alias("a")
->join("business b", "a.business_code = b.code", "left")
->join("business e", "a.agency_code = e.code", "left")
->join("account c", "a.user_code = c.user_code")
->join("coupon_main d", "a.coupon_main_id = d.id")
->when(!empty($keyword), function ($q) use ($keyword) {
$q->whereTime("c.business_name|e.business_name", "like", "%" . $keyword . "%");
})
->when(!empty($start_time), function ($q) use ($start_time) {
$q->whereTime("a.create_time", ">=", $start_time);
})
->when(!empty($end_time), function ($q) use ($end_time) {
$q->whereTime("create_time", "<=", $end_time);
$q->whereTime("a.create_time", "<=", $end_time);
})
->when(MemberModel::is_agency(session("auth")['roles']), function ($q) {
$q->where("agency_code", "=", session("auth")['business_code']);
$q->where("a.agency_code", "=", session("auth")['business_code']);
})
->sum($field);
->sum("a." . $field);
}
/**
* 总充值流水
* @param null $keyword
* @param null $start_time
* @param null $end_time
* @return float
*/
public function getRechargeMoneySum($keyword = null, $start_time = null, $end_time = null)
{
return Recharge::alias("a")
->join("account b", "a.open_id = b.open_id")
->join("business c", "a.business_code = c.code")
->join("member d", "a.member_id = d.id", "left")
->join("business e", "c.agency_code = e.code", "left")
->when(!empty($keyword), function ($q) use ($keyword) {
$q->whereTime("c.business_name|e.business_name", "like", "%" . $keyword . "%");
})
->when(!empty($start_time), function ($q) use ($start_time) {
$q->whereTime("a.update_time", ">=", $start_time);
})
->when(!empty($end_time), function ($q) use ($end_time) {
$q->whereTime("a.update_time", "<=", $end_time);
})
->sum("a.money");
}
/**
* 总扣款流水
* @param null $keyword
* @param null $start_time
* @param null $end_time
* @return float
*/
public function getDeductionMoneySum($keyword = null,$start_time = null, $end_time = null)
{
return Deduction::alias("a")
->join("business c", "a.business_code = c.code")
->join("business f", "f.code = c.agency_code", "left")
->join("coupon_main e", "a.coupon_main_id = e.id")
->join("coupon_bill d", "a.bill_id = d.id")
->join("account b", "d.user_code = b.user_code", "left")
->when(!empty($keyword), function ($q) use ($keyword) {
$q->where("c.business_name|f.business_name", "like", "%" . $keyword . "%");
})
->when(!empty($start_time), function ($q) use ($start_time) {
$q->whereTime("a.create_time", ">=", $start_time);
})
->when(!empty($end_time), function ($q) use ($end_time) {
$q->whereTime("a.create_time", "<=", $end_time);
})
->sum("a.money");
}
}

View File

@ -37,13 +37,21 @@ class BusinessRepository extends Repository
{
$q = $this->model->alias("a")
->join("account b", "a.code = b.business_code")
->join("category c", "a.type = c.id","left")
->field(["a.code as business_code",
"b.avatar_url",
"b.nick_name as account_nick_name",
"a.business_name",
"a.total_recharge",
"a.id as basiness_id",
"a.balance"])
"a.balance",
"a.contact_name",
"a.contact_phone",
"a.business_address",
"a.business_license",
"a.state",
"c.name as type_name",
])
->group("a.id");
$data = [
'total' => 0,
@ -102,7 +110,7 @@ class BusinessRepository extends Repository
public function businessDeductionList($where, int $page = 1, int $limit = 0, array $order = ["create_time" => "desc", "id" => "desc"])
{
return Deduction::findList($where, [], $page, $limit, function ($q) {
return $q->with("couponMain");
return $q->with(["couponMain","bill"]);
}, $order);
}

View File

@ -5,6 +5,7 @@ namespace app\repository;
use app\traits\cms\ArticleTrait;
use app\traits\cms\MenuTrait;
use app\traits\CmsCategoryTrait;
use tauthz\facade\Enforcer;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
@ -46,4 +47,30 @@ class CmsRepository extends Repository
return $list;
}
/**
* 获取后台用户权限列表
*
* @param int $accountId
* @return array
*/
public function getUserRules(int $accountId): array
{
$rules = [];
$roles = Enforcer::getRolesForUser($accountId);
foreach ($roles as $role) {
$rules = array_merge($rules, Enforcer::getPermissionsForUser($role));
}
$ruleNameList = [];
foreach ($rules as $rule) {
if (isset($rule[2])) {
$ruleNameList[] = $rule[1].':'.$rule[2];
} else {
$ruleNameList[] = $rule[1];
}
}
return array_unique($ruleNameList);
}
}

View File

@ -3,6 +3,7 @@
namespace app\traits\cms;
use app\model\Menu;
use app\repository\CmsRepository;
use tauthz\facade\Enforcer;
use think\Collection;
@ -46,6 +47,31 @@ trait MenuTrait
return $treeList;
}
//菜单权限过滤
public function handMenuRule(int $accountId, array $menus): array
{
$rules = CmsRepository::getInstance()->getUserRules($accountId);
foreach ($menus as $k => $m) {
$menus[$k]['icon'] = !empty($m['icon']) ? 'fa '.$m['icon'] : '';
$menus[$k]['href'] = ltrim($m['href'], '/');
if ($m['pid'] !== 0) {
$name = $m['name'];
$nameArr = explode(':', $name);
if (count($nameArr) <= 1) {
$name = $name.':index';
}
if (!in_array($name, $rules)) {
unset($menus[$k]);
}
}
}
return $menus;
}
/**
* 检测批量数据下 是否有子栏目
*

View File

@ -0,0 +1,132 @@
layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect',"laydate"], function () {
let $ = layui.jquery,
form = layui.form,
table = layui.table,
layer = layui.layer,
xmSelect = layui.xmSelect,
miniTab = layui.miniTab,
laydate = layui.laydate ;
/**** index begin ***/
//index页面
if ($('.location-index-page').length > 0) {
miniTab.listen();
var exportDataTitle=
[
"消费者昵称","扣款优惠券名称",
"所属商家名称","商家所属平台商",
"扣款总额","当前余额",
"消费者红包","平台商佣金",
"太古佣金","扣款时间",
"经纬度"
];
var exportData =[];
// 渲染表格
let listUrl = $('#table-container').data('url');
let insTb = table.render({
elem: '#table-container',
toolbar: '#toolbar-tpl',
defaultToolbar: [{ //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可
title: '搜索'
, layEvent: 'search'
, icon: 'layui-icon-search'
},'filter'],
url: listUrl,
method: 'post',
even: true,
limits: [10,20,50,100,200,500,1000],
request: {
pageName: 'page',
limitName: 'size',
},
parseData: function (res) {
//console.log(res)
$("#deduction_money_sum").text(res.data.deduction_money_sum?res.data.deduction_money_sum:0)
return {
"code": res.code, //解析接口状态
"msg": res.msg, //解析提示文本
"count": res.data.total, //解析数据长度
"data": res.data.list //解析数据列表
};
},
page: true,
cols: [[
{type: 'checkbox'},
{ field:"nick_name",title: '消费者昵称'},
{templet: "#row-avatar_url",field:"avatar_url",title: '消费者头像'},
{field:"coupon_main_name",title: '扣款优惠券名称'},
{field:"business_name",title: '所属商家名称'},
{field:"agency_business_name",title: '商家所属平台商'},
{field: "money", title: '扣款总额'},
{field: "balance", title: '当前余额'},
{field: "consumer_money", title: '消费者红包'},
{field: "agency_money", title: '平台商佣金'},
{field: "admin_money", title: '太古佣金'},
{field: "create_time", title: '扣款时间'},
{templet: "#row-position", title: '经纬度'},
// {templet: '#row-operate', minWidth: 200, fixed: 'right', align: 'center', title: '操作'}
]],
done: function (res, curr, count) {
Tools.setInsTb(insTb);
var rdata=[];
res.data.forEach(function (d,index) {
rdata[index] = [
d.nick_name ,
d.coupon_main_name ,
d.business_name ,
d.agency_business_name ,
d.money,
d.balance,
d.consumer_money,
d.agency_money,
d.admin_money,
d.create_time,
d.lng + "," + d.lat
]
})
exportData=rdata
}
});
$("#exports").on("click",function(){
//console.log(exportData)
table.exportFile(exportDataTitle,exportData, 'xls');
return false;
})
// 监听搜索操作
form.on('submit(data-search-btn)', function (data) {
//执行搜索重载
table.reload('table-container', {
page: {curr: 1}
, where: data.field
}, 'data');
return false;
});
//日期时间选择器
laydate.render({
elem: '#start_time'
,type: 'datetime'
});
//日期时间选择器
laydate.render({
elem: '#end_time'
,type: 'datetime'
});
}
/*** index end ***/
});

View File

@ -0,0 +1,116 @@
layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect',"laydate"], function () {
let $ = layui.jquery,
form = layui.form,
table = layui.table,
layer = layui.layer,
xmSelect = layui.xmSelect,
miniTab = layui.miniTab,
laydate = layui.laydate ;
/**** index begin ***/
//index页面
if ($('.location-index-page').length > 0) {
miniTab.listen();
var exportDataTitle=
["充值者昵称","平台商充值(后台人员)","商家名称","商家所属平台商","充值时间","充值金额","当前余额"]
;
var exportData =[];
// 渲染表格
let listUrl = $('#table-container').data('url');
let insTb = table.render({
elem: '#table-container',
toolbar: '#toolbar-tpl',
defaultToolbar: [{ //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可
title: '搜索'
, layEvent: 'search'
, icon: 'layui-icon-search'
},'filter'],
url: listUrl,
method: 'post',
even: true,
limits: [10,20,50,100,200,500,1000],
request: {
pageName: 'page',
limitName: 'size',
},
parseData: function (res) {
//console.log(res)
$("#recharge_money_sum").text(res.data.recharge_money_sum?res.data.recharge_money_sum:0)
return {
"code": res.code, //解析接口状态
"msg": res.msg, //解析提示文本
"count": res.data.total, //解析数据长度
"data": res.data.list //解析数据列表
};
},
page: true,
cols: [[
{type: 'checkbox'},
{ field:"nick_name",title: '充值者昵称'},
{templet: "#row-recharge-account-avatar_url",field:"avatar_url",title: '充值者头像'},
{field:"member_nickname",title: '平台商充值(后台人员)'},
{field:"business_name",title: '商家名称'},
{field:"agency_business_name",title: '商家所属平台商'},
{field: "update_time", title: '充值时间'},
{field: "money", title: '充值金额'},
{field: "balance", title: '当前余额'},
// {templet: '#row-operate', minWidth: 200, fixed: 'right', align: 'center', title: '操作'}
]],
done: function (res, curr, count) {
Tools.setInsTb(insTb);
var rdata=[];
res.data.forEach(function (d,index) {
rdata[index] = [
d.nick_name ,
d.member_nickname ,
d.business_name ,
d.agency_business_name ,
d.update_time,
d.money,
d.balance,
]
})
exportData=rdata
}
});
$("#exports").on("click",function(){
//console.log(exportData)
table.exportFile(exportDataTitle,exportData, 'xls');
return false;
})
// 监听搜索操作
form.on('submit(data-search-btn)', function (data) {
//执行搜索重载
table.reload('table-container', {
page: {curr: 1}
, where: data.field
}, 'data');
return false;
});
//日期时间选择器
laydate.render({
elem: '#start_time'
,type: 'datetime'
});
//日期时间选择器
laydate.render({
elem: '#end_time'
,type: 'datetime'
});
}
/*** index end ***/
});

View File

@ -40,25 +40,13 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
page: true,
cols: [[
// {type: 'checkbox'},
{templet:function(d){
return d.business.business_name
}, title: '商家名称'},
{templet:function(d){
return d.business.type_name
}, title: '商家类型'},
{templet:function(d){
return d.business.contact_name
}, title: '联系人'},
{templet:function(d){
return d.business.contact_phone
}, title: '联系电话'},
{templet:function(d){
return d.business.business_address
}, title: '地址'},
{ field : "business_name", title: '商家名称'},
{ field : "type_name", title: '商家类型'},
{field : "contact_name" , title: '联系人'},
{field : "contact_phone" , title: '联系电话'},
{field : "business_address" , title: '地址'},
{templet: '#row-business-license', title: '执照', style: 'height: 90px;'},
{templet: '#row-status', title: '状态', style: 'height: 90px;'},
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', fixed: 'right'}
]],
done: function () {

View File

@ -47,7 +47,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
{field: 'coupon_total_count', title: '优惠券领取数'},
{field: 'coupon_used_count', title: '优惠券使用数'},
{field: 'coupon_not_use_count', title: '优惠券未使用数'},
{field: 'consumer_coupon_bill_total', title: '红包总'},
{field: 'consumer_coupon_bill_total', title: '红包总收入'},
{field: 'login_time', title: '最近登录'},

View File

@ -0,0 +1,115 @@
{layout name="manager/layout" /}
<style>
.layui-table-cell{
height: auto;
white-space: normal;
}
.layui-table .layui-layer-photos {height: 90px;}
.layui-table img{
max-height: 100%;
object-fit: cover;
margin-left: auto;
margin-right: auto;
display: block;
max-width: 150px;
vertical-align: middle;
border: 0;
}
.l_font{
font-size: 26px;height: 25px
}
</style>
<div class="layui-row layui-col-space12">
<div class="layui-row layui-col-space15">
</div>
<div class="layui-col-md10">
<div class="layui-row ">
<div class="layui-col-md6">
<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" >{$deduction_money_sum ?? 0}</span>
</div>
</div>
</div>
<div class="layui-col-md6">
<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="deduction_money_sum"> &nbsp;</span>
</div>
</div>
</div>
</div>
</div>
<div class="layui-col-xs12 layui-col-md12">
<div id="echarts-records" style="background-color:#ffffff;min-height:600px;">
<div class="layuimini-container location-index-page">
<div class="layuimini-main">
<fieldset class="table-search-fieldset" >
<legend>搜索信息</legend>
<div style="margin: 10px 10px 10px 10px">
<form class="layui-form layui-form-pane" action="">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">关键词</label>
<div class="layui-inline">
<input type="text" name="keyword" class="layui-input">
</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">
<button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
</div>
</div>
</form>
</div>
</fieldset>
<div>
<table id="table-container" class="layui-table" data-url="/manager/bill/deduction" lay-filter="table-container"></table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 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>
<a class="layui-btn layui-btn-primary layui-btn-sm" id="exports">导出</a>
</script>
<!-- 列 轮播图 -->
<script type="text/html" id="row-avatar_url">
<div class="layui-layer-photos">
<img src="{{ d.avatar_url }}" layer-src="{{ d.avatar_url }}" alt="">
</div>
</script>
<!-- 列 轮播图 -->
<script type="text/html" id="row-position">
经纬度:{{ d.lng }},{{ d.lat }}
</script>
<script src="__MANAGER__/js/bill_deduction.js?v={:mt_rand()}"></script>

View File

@ -0,0 +1,113 @@
{layout name="manager/layout" /}
<style>
.layui-table-cell{
height: auto;
white-space: normal;
}
.layui-table .layui-layer-photos {height: 90px;}
.layui-table img{
max-height: 100%;
object-fit: cover;
margin-left: auto;
margin-right: auto;
display: block;
max-width: 150px;
vertical-align: middle;
border: 0;
}
.l_font{
font-size: 26px;height: 25px
}
</style>
<div class="layui-row layui-col-space12">
<div class="layui-row layui-col-space15">
</div>
<div class="layui-col-md10">
<div class="layui-row ">
<div class="layui-col-md6">
<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" >{$recharge_money_sum ?? 0}</span>
</div>
</div>
</div>
<div class="layui-col-md6">
<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="recharge_money_sum"> &nbsp;</span>
</div>
</div>
</div>
</div>
</div>
<div class="layui-col-xs12 layui-col-md12">
<div id="echarts-records" style="background-color:#ffffff;min-height:600px;">
<div class="layuimini-container location-index-page">
<div class="layuimini-main">
<fieldset class="table-search-fieldset" >
<legend>搜索信息</legend>
<div style="margin: 10px 10px 10px 10px">
<form class="layui-form layui-form-pane" action="">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">关键词</label>
<div class="layui-inline">
<input type="text" name="keyword" class="layui-input">
</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">
<button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
</div>
</div>
</form>
</div>
</fieldset>
<div>
<table id="table-container" class="layui-table" data-url="/manager/bill/recharge" lay-filter="table-container"></table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 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>
<a class="layui-btn layui-btn-primary layui-btn-sm" id="exports">导出</a>
</script>
<!-- 列 轮播图 -->
<script type="text/html" id="row-recharge-account-avatar_url">
<div class="layui-layer-photos">
<img src="{{ d.avatar_url }}" layer-src="{{ d.avatar_url }}" alt="">
</div>
</script>
<script src="__MANAGER__/js/bill_recharge.js?v={:mt_rand()}"></script>

View File

@ -71,7 +71,8 @@
<!-- 列 轮播图 -->
<script type="text/html" id="row-other">
经纬度:{{ d.lng }},{{ d.lat }}
经纬度:{{ d.bill!=undefined?d.bill.lng:'' }},{{ d.bill!=undefined?d.lat:'' }}
</script>
<script src="__MANAGER__/js/business/business_deduction_list.js?v={:mt_rand()}"></script>

View File

@ -52,15 +52,15 @@
<!-- 操作列 -->
<script type="text/html" id="row-operate">
{{# if (d.business.state == 0){ }}
{{# if (d.state == 0){ }}
<a class=" layui-btn layui-btn-primary layui-btn-xs" lay-event="wait"
data-href="/manager/business/business-wait.html?business_code={{d.business.code}}"
data-href="/manager/business/business-wait.html?business_code={{d.business_code}}"
data-state="1"
>
通过
</a>
<a class=" layui-btn layui-btn-primary layui-btn-xs" lay-event="wait"
data-href="/manager/business/business-wait.html?business_code={{d.business.code}}"
data-href="/manager/business/business-wait.html?business_code={{d.business_code}}"
data-state="2"
>
驳回
@ -77,7 +77,7 @@
<!-- 状态列 -->
<script type="text/html" id="row-status">
{{# if (d.business.state == 0){ }}
{{# if (d.state == 0){ }}
待审核
{{# }else{ }}
驳回
@ -87,7 +87,7 @@
<!-- 列 轮播图 -->
<script type="text/html" id="row-business-license">
<div class="layui-layer-photos">
<img src="{{ d.business.business_license }}" layer-src="{{ d.business.business_license }}" alt="">
<img src="{{ d.business_license }}" layer-src="{{ d.business_license }}" alt="">
</div>
</script>

View File

@ -36,7 +36,7 @@
check: {
enable: true,
nocheckInherit: true,
chkboxType: { "Y" : "s", "N" : "ps" },
chkboxType: { "Y" : "ps", "N" : "ps" },
},
callback: {
onClick: open,