Merge branch 'monanxiao'
This commit is contained in:
commit
742601af5a
@ -12,6 +12,10 @@ namespace app\admin\controller;
|
||||
use app\admin\BaseController;
|
||||
use think\facade\Db;
|
||||
use think\facade\View;
|
||||
use app\admin\model\ShopUser;
|
||||
use app\admin\model\InformationUserMsg;
|
||||
use app\admin\model\InformationUserAddress;
|
||||
use app\admin\model\GeoStreet;
|
||||
|
||||
class Index extends BaseController
|
||||
{
|
||||
@ -43,38 +47,41 @@ class Index extends BaseController
|
||||
}
|
||||
|
||||
public function main()
|
||||
{
|
||||
// return json($this->adminInfo);
|
||||
$street_id = Db::table('fa_szxc_information_useraddress')
|
||||
->where('admin_id',$this->adminInfo['id'])
|
||||
->value('street_id');
|
||||
{
|
||||
// 镇街表id
|
||||
$street_id = InformationUserAddress::where('admin_id',$this->adminInfo['id'])->value('street_id');
|
||||
// 街道名称
|
||||
$street_name = GeoStreet::where('street_code', $street_id)->value('street_name');
|
||||
|
||||
// 大屏相关
|
||||
if ($this->adminInfo['group_access'] == 4){
|
||||
|
||||
// return $street_id;
|
||||
$street_name = Db::table('fa_geo_street')
|
||||
->where('street_code',$street_id)
|
||||
->value('street_name');
|
||||
|
||||
if ($this->adminInfo['group_access']==4){
|
||||
$urls="http://zhen.lihaink.cn/#/?street_id=$street_id"."&street_name=".$street_name;
|
||||
View::assign('urls',$urls);
|
||||
return View('main3');
|
||||
}elseif($this->adminInfo['group_access']==5){
|
||||
|
||||
}elseif($this->adminInfo['group_access'] == 5){
|
||||
|
||||
$day_price=Db::connect('shop')->table('eb_product_order_log')->where('street_id',$street_id)
|
||||
->where('status',1)
|
||||
->whereDay('create_time')
|
||||
->sum('product_price');
|
||||
|
||||
$day_order=Db::connect('shop')->table('eb_product_order_log')->where('street_id',$street_id)
|
||||
->where('status',1)
|
||||
->whereDay('create_time')
|
||||
->count();
|
||||
|
||||
$Month_price=Db::connect('shop')->table('eb_product_order_log')->where('street_id',$street_id)
|
||||
->where('status',1)
|
||||
->whereMonth('create_time')
|
||||
->sum('product_price');
|
||||
|
||||
$Month_order=Db::connect('shop')->table('eb_product_order_log')->where('street_id',$street_id)
|
||||
->where('status',1)
|
||||
->whereMonth('create_time')
|
||||
->count();
|
||||
|
||||
$urls="http://zhenqiye.lihaink.cn/#/?street_id=$street_id"."&street_name=".$street_name;
|
||||
View::assign('urls',$urls);
|
||||
View::assign('day_order',$day_order);
|
||||
@ -83,10 +90,17 @@ class Index extends BaseController
|
||||
View::assign('month_order',$Month_order);
|
||||
return View('main2');
|
||||
}
|
||||
if ($this->adminInfo['id']!=1){
|
||||
$find = Db::table('fa_szxc_information_useraddress')->where('user_id', $this->adminInfo['user_id'])->find();
|
||||
if ($find) {
|
||||
if ($find['auth_range']==1){
|
||||
|
||||
// 如果登录ID不是超管的话
|
||||
if ($this->adminInfo['id'] != 1){
|
||||
|
||||
// 获取当当前登录用户绑定地址
|
||||
$find = InformationUserAddress::where('user_id', $this->adminInfo['user_id'])->find();
|
||||
|
||||
if($find)
|
||||
{
|
||||
// 所属市镇区县村级别
|
||||
if ($find['auth_range'] == 1){
|
||||
$where[] = ['village_id', '=', $find['village_id']];
|
||||
}elseif ($find['auth_range']==2){
|
||||
$where[] = ['street_id', '=', $find['street_id']];
|
||||
@ -96,49 +110,60 @@ class Index extends BaseController
|
||||
$where[] = ['brigade_id', '=', $find['brigade_id']];
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
$where=[];
|
||||
}
|
||||
$num =Db::table('fa_szxc_information_usermsg')->where($where)->count();
|
||||
|
||||
// 大于60岁人数
|
||||
$old_num = Db::table('fa_szxc_information_usermsg')->where($where)->whereAge('>=', 60)->count();
|
||||
// 儿童人数
|
||||
$children_num = Db::table('fa_szxc_information_usermsg')->where($where)->whereAge('<', 15)->count();
|
||||
// 未婚男
|
||||
$unmarried_man_num = Db::table('fa_szxc_information_usermsg')->where($where)->where([['gender', '=', 1], ['marital_status', '=', 169]])->count();
|
||||
// 未婚女
|
||||
$unmarried_woman_num = Db::table('fa_szxc_information_usermsg')->where($where)->where([['gender', '=', 2], ['marital_status', '=', 169]])->count();
|
||||
// 少数民族
|
||||
$nation_s_num = Db::table('fa_szxc_information_usermsg')->where($where)->whereBetween('nation', [13, 68])->count();
|
||||
// 汉族
|
||||
$nation_h_num = Db::table('fa_szxc_information_usermsg')->where($where)->where('nation', 12)->count();
|
||||
// 获取**数量
|
||||
$num = InformationUserMsg::where($where)->count();
|
||||
|
||||
// 大于60岁人数
|
||||
$old_num = InformationUserMsg::where($where)->whereAge('>=', 60)->count();
|
||||
|
||||
// 儿童人数
|
||||
$children_num = InformationUserMsg::where($where)->whereAge('<', 15)->count();
|
||||
// 未婚男
|
||||
$unmarried_man_num = InformationUserMsg::where($where)->where($where)->where([['gender', '=', 1], ['marital_status', '=', 169]])->count();
|
||||
// 未婚女
|
||||
$unmarried_woman_num = InformationUserMsg::where($where)->where($where)->where([['gender', '=', 2], ['marital_status', '=', 169]])->count();
|
||||
// 少数民族
|
||||
$nation_s_num = InformationUserMsg::where($where)->where($where)->whereBetween('nation', [13, 68])->count();
|
||||
// 汉族
|
||||
$nation_h_num = InformationUserMsg::where($where)->where($where)->where('nation', 12)->count();
|
||||
|
||||
// foreach ($where as $key =>$value){
|
||||
// $where[$key][0] = 'm.'.$value[0];
|
||||
// }
|
||||
// 残疾人数
|
||||
|
||||
// 残疾人数
|
||||
$whether_disabled_num = Db::table('fa_szxc_information_usermsg')
|
||||
->alias('m')
|
||||
->where($where)
|
||||
->join(['fa_szxc_information_insurance'=>'i'],'m.user_id=i.user_id and i.whether_disabled!=112')->count();
|
||||
// 参保人数
|
||||
|
||||
// 参保人数
|
||||
$insurance_type_num = Db::table('fa_szxc_information_usermsg')
|
||||
->alias('m')
|
||||
->where($where)
|
||||
->join(['fa_szxc_information_insurance'=>'i'],'m.user_id=i.user_id and i.insurance_type!=219')->count();
|
||||
|
||||
if ($this->adminInfo['id']!=1){
|
||||
// 工作人员数
|
||||
$work_num = Db::table('fa_szxc_information_usermsg')
|
||||
->alias('m')
|
||||
->where($where)
|
||||
->join(['shop.eb_user'=>'u'],'m.user_id=u.id and u.group_id = 3')->count();
|
||||
$work_num = InformationUsermsg::with('user')->count();
|
||||
|
||||
if ($this->adminInfo['id'] != 1){
|
||||
|
||||
// 工作人员数
|
||||
$work_num = InformationUsermsg::with('user')->where($where)->count();
|
||||
|
||||
// $work_num = Db::table('fa_szxc_information_usermsg')
|
||||
// ->alias('m')
|
||||
// ->join(['shop.eb_user'=>'u'],'m.user_id=u.id and u.group_id = 3')
|
||||
// ->count();
|
||||
|
||||
}else{
|
||||
$work_num = Db::connect('shop')->table('eb_user')
|
||||
->where('group_id',3)
|
||||
->count();
|
||||
$work_num = ShopUser::where('group_id', 3)->count();
|
||||
}
|
||||
|
||||
//土地
|
||||
$land_area_num = Db::table('fa_szxc_information_useraddress')
|
||||
->alias('u')
|
||||
|
@ -35,11 +35,15 @@ class SupplyAccount extends BaseController
|
||||
if (request()->isAjax()) {
|
||||
$param = get_params();
|
||||
$where = [];
|
||||
|
||||
$list = $this->model->getSupplyAccountList($where,$param);
|
||||
$rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit'];
|
||||
|
||||
$list = SupplyAccountModel::with('team')->where($where)
|
||||
->paginate($rows, false, ['query' => $param]);
|
||||
|
||||
foreach ($list as $k =>$v){
|
||||
$list[$k]['fa_supply_team_id'] = Db::table('fa_supply_team')->where('id',$v['fa_supply_team_id'])->value('name');
|
||||
}
|
||||
|
||||
return table_assign(0, '', $list);
|
||||
}
|
||||
else{
|
||||
@ -62,11 +66,25 @@ class SupplyAccount extends BaseController
|
||||
// 验证失败 输出错误信息
|
||||
return to_assign(1, $e->getError());
|
||||
}
|
||||
|
||||
$this->model->addSupplyAccount($param);
|
||||
|
||||
// 如果存在,则更新
|
||||
if(SupplyAccountModel::where('fa_supply_team_id', $this->uid)->find())
|
||||
{
|
||||
$param['fa_supply_team_id'] = $this->uid; // 供应链服务小组ID
|
||||
$this->model->updateSupplyAccount($param);
|
||||
|
||||
}else{ // 不存在,则创建新的提现账户
|
||||
|
||||
$param['fa_supply_team_id'] = $this->uid; // 供应链服务小组ID
|
||||
$this->model->addSupplyAccount($param);
|
||||
}
|
||||
|
||||
}else{
|
||||
$team = Db::table('fa_supply_team')->select();
|
||||
View::assign('team', $team);
|
||||
|
||||
// 获取当前账号提现信息
|
||||
$account = SupplyAccountModel::where('fa_supply_team_id', $this->uid)->find();
|
||||
View::assign('account', $account);
|
||||
|
||||
return view();
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,10 @@ use think\exception\ValidateException;
|
||||
use think\facade\Db;
|
||||
use app\admin\controller\nk\Article;
|
||||
use think\facade\View;
|
||||
use app\admin\model\ShopUser;
|
||||
use app\admin\model\InformationUserMsg;
|
||||
use app\admin\model\InformationUserAddress;
|
||||
use app\admin\model\SupplyBrokerage as SupplyBrokerageModel;
|
||||
|
||||
/**
|
||||
* 佣金管理
|
||||
@ -30,26 +34,112 @@ class Spread extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$nk_user=Db::connect('shop')->name('nk_user')->where('n_user_id',$this->adminInfo['id'])->value('user_id');
|
||||
$total=0;
|
||||
$list=[];
|
||||
$brokerage_price=Db::connect('shop')->name('user')->where('uid',$nk_user)->value('brokerage_price');
|
||||
$total = 0;
|
||||
$list = [];
|
||||
$mmm = [];
|
||||
$map = [];
|
||||
$post = get_params();
|
||||
|
||||
//权限组信息
|
||||
if ($this->adminInfo['group_access'] != 1) {
|
||||
|
||||
$find = InformationUserAddress::where('admin_id', $this->adminInfo['id'])->find();
|
||||
if ($find) {
|
||||
if ($find['auth_range'] == 1) {
|
||||
$mmm['area_id'] = $find['area_id'];
|
||||
|
||||
$mmm['street_id'] = $find['street_id'];
|
||||
$mmm['village_id'] = $find['village_id'];
|
||||
} elseif ($find['auth_range'] == 2) {
|
||||
$mmm['area_id'] = $find['area_id'];
|
||||
$mmm['street_id'] = $find['street_id'];
|
||||
}elseif ($find['auth_range'] == 5) {
|
||||
$mmm['area_id'] = $find['area_id'];
|
||||
$mmm['street_id'] = $find['street_id'];
|
||||
$mmm['village_id'] = $find['village_id'];
|
||||
$mmm['brigade_id'] = $find['brigade_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($post) {
|
||||
if (isset($post['area_id']) && !empty($post['area_id'])) {
|
||||
$mmm['area_id'] = $post['area_id'];
|
||||
}
|
||||
if (isset($post['street_id']) && !empty($post['street_id'])) {
|
||||
$mmm['street_id'] = $post['street_id'];
|
||||
}
|
||||
if (isset($post['village_id']) && !empty($post['village_id'])) {
|
||||
$mmm['village_id'] = $post['village_id'];
|
||||
}
|
||||
if (isset($post['brigade_id']) && !empty($post['brigade_id'])) {
|
||||
$mmm['brigade_id'] = $post['brigade_id'];
|
||||
}
|
||||
}
|
||||
|
||||
if (request()->isAjax()) {
|
||||
$params= get_params();
|
||||
if ($nk_user!=0){
|
||||
$list=Db::connect('shop')->name('store_order')->where('spread_uid',$nk_user)
|
||||
->where('status',3)
|
||||
->field('uid,order_sn,pay_time,extension_one,extension_two,is_selfbuy')
|
||||
->page($params['page'])
|
||||
->limit($params['limit'])
|
||||
->select();
|
||||
|
||||
if (!empty($post['keywords'])) {
|
||||
$map[] = ['m.name', 'LIKE', '%' . $post['keywords'] . '%'];
|
||||
}
|
||||
|
||||
if (!empty($post['phone'])) {
|
||||
|
||||
$map[] = ['m.phone', 'LIKE', '%' . $post['phone'] . '%'];
|
||||
}
|
||||
|
||||
// 获取当前地域成员
|
||||
$userList = InformationUserMsg::where($mmm)
|
||||
->where($map)
|
||||
->with(['user'])
|
||||
->select();
|
||||
|
||||
$arrUid = [];
|
||||
foreach ($userList as $v) {
|
||||
|
||||
// 如果存在服务小组的话,则取出
|
||||
if($v['user']['fa_supply_team_id'])
|
||||
{
|
||||
$arrUid[] = $v['user']['uid'];
|
||||
}
|
||||
}
|
||||
|
||||
$params= get_params();
|
||||
|
||||
$list = SupplyBrokerageModel::whereIn('user_id', $arrUid)
|
||||
->with(['user', 'merchant', 'supplyChain', 'level'])
|
||||
->page($params['page'])
|
||||
->limit($params['limit'])
|
||||
->select();
|
||||
|
||||
$result = ['total' => $total, 'data' => $list];
|
||||
|
||||
return table_assign(0, '', $result);
|
||||
|
||||
}
|
||||
View::assign('brokerage_price', $brokerage_price);
|
||||
return view('',['url'=>$this->url]);
|
||||
|
||||
// 获取当前地域成员
|
||||
$userList = InformationUserMsg::where($mmm)
|
||||
->where($map)
|
||||
->with(['user'])
|
||||
->select();
|
||||
|
||||
$arrUid = [];
|
||||
foreach ($userList as $v) {
|
||||
|
||||
// 如果存在服务小组的话,则取出
|
||||
if($v['user']['fa_supply_team_id'])
|
||||
{
|
||||
$arrUid[] = $v['user']['uid'];
|
||||
}
|
||||
}
|
||||
|
||||
// 总佣金
|
||||
$borkerageSum = SupplyBrokerageModel::whereIn('user_id', $arrUid)->sum('brokerage_price');
|
||||
|
||||
View::assign('brokerage_price', $borkerageSum);
|
||||
return view('',['url' => $this->url]);
|
||||
}
|
||||
/**
|
||||
* 查看信息
|
||||
|
@ -32,30 +32,35 @@ class User extends BaseController
|
||||
'/admin/nk.user/postedit',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (request()->isAjax()) {
|
||||
|
||||
$mmm = [];
|
||||
$map = [];
|
||||
$post = get_params();
|
||||
|
||||
if (!empty($post['keywords'])) {
|
||||
$map[] = ['m.name', 'LIKE', '%' . $post['keywords'] . '%'];
|
||||
}
|
||||
|
||||
if (!empty($post['phone'])) {
|
||||
|
||||
$map[] = ['m.phone', 'LIKE', '%' . $post['phone'] . '%'];
|
||||
}
|
||||
|
||||
//权限组信息
|
||||
if ($this->adminInfo['group_access'] != 1) {
|
||||
|
||||
$find = Db::table('fa_szxc_information_useraddress')->where('admin_id', $this->adminInfo['id'])->find();
|
||||
|
||||
$find = InformationUserAddress::where('admin_id', $this->adminInfo['id'])->find();
|
||||
if ($find) {
|
||||
if ($find['auth_range'] == 1) {
|
||||
$mmm['area_id'] = $find['area_id'];
|
||||
|
||||
$mmm['street_id'] = $find['street_id'];
|
||||
$mmm['village_id'] = $find['village_id'];
|
||||
} elseif ($find['auth_range'] == 2) {
|
||||
@ -69,6 +74,7 @@ class User extends BaseController
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($post) {
|
||||
if (isset($post['area_id']) && !empty($post['area_id'])) {
|
||||
$mmm['area_id'] = $post['area_id'];
|
||||
@ -88,11 +94,13 @@ class User extends BaseController
|
||||
$total = InformationUserMsg::alias('m')
|
||||
->where($mmm)
|
||||
->where($map)
|
||||
->where('user_id', '<>', $this->adminInfo['user_id'])
|
||||
->count();
|
||||
|
||||
$list = InformationUserMsg::alias('m')
|
||||
->where($mmm)
|
||||
->where($map)
|
||||
->where('user_id', '<>', $this->adminInfo['user_id'])
|
||||
// ->join(['shop.eb_user' => 'u'], 'm.user_id=u.uid')u.avatar,u.group_id,u.status,
|
||||
->with(['user.userGroup'])
|
||||
// ->field('m.user_id id,m.name,m.phone,m.gender,m.age,m.householder_id,m.user_id')
|
||||
|
@ -187,7 +187,43 @@ class Extract extends BaseController
|
||||
*/
|
||||
public function cancel()
|
||||
{
|
||||
$params = get_params();
|
||||
|
||||
// 启动事务
|
||||
Db::startTrans();
|
||||
try {
|
||||
|
||||
// 撤销提现,更新状态
|
||||
$status = SupplyExtract::where('id', $params['id'])->update(['status' => 3]);
|
||||
|
||||
// 返回提现金额
|
||||
if($status)
|
||||
{
|
||||
// 申请提现的金额
|
||||
$extractInfo = SupplyExtract::where('id', $params['id'])->find();
|
||||
$extract_price = $extractInfo['extract_price'];
|
||||
$fa_supply_team_id = $extractInfo['fa_supply_team_id'];
|
||||
|
||||
if($extract_price)
|
||||
{
|
||||
// 返还提现余额
|
||||
SupplyTeam::where('id', $fa_supply_team_id)
|
||||
->inc('brokerage', $extract_price)
|
||||
->update();
|
||||
}
|
||||
}
|
||||
|
||||
// 提交事务
|
||||
Db::commit();
|
||||
} catch (\Exception $e) {
|
||||
|
||||
// 回滚事务
|
||||
Db::rollback();
|
||||
|
||||
return to_assign(1, '操作失败,原因:' . $e->getMessage());
|
||||
}
|
||||
|
||||
return to_assign(0, '操作成功');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,16 @@ class SupplyAccount extends Model
|
||||
// 设置当前模型对应的完整数据表名称
|
||||
protected $table = 'fa_supply_account';
|
||||
|
||||
/**
|
||||
*
|
||||
* 获取关联小组
|
||||
*
|
||||
*/
|
||||
public function team()
|
||||
{
|
||||
return $this->hasOne(SupplyTeam::class, 'id', 'fa_supply_team_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页列表
|
||||
* @param $where
|
||||
@ -45,16 +55,17 @@ class SupplyAccount extends Model
|
||||
* 编辑信息
|
||||
* @param $param
|
||||
*/
|
||||
public function editSupplyAccount($param)
|
||||
public function updateSupplyAccount($param)
|
||||
{
|
||||
try {
|
||||
$param['update_time'] = time();
|
||||
self::where('id', $param['id'])->strict(false)->field(true)->update($param);
|
||||
add_log('edit', $param['id'], $param);
|
||||
$param['update_time'] = time();
|
||||
self::where('fa_supply_team_id', $param['fa_supply_team_id'])->strict(false)->field(true)->update($param);
|
||||
add_log('edit', $param['fa_supply_team_id'], $param);
|
||||
} catch(\Exception $e) {
|
||||
return to_assign(1, '操作失败,原因:'.$e->getMessage());
|
||||
return to_assign(1, '操作失败,原因:'.$e->getMessage());
|
||||
}
|
||||
return to_assign();
|
||||
|
||||
return to_assign();
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,6 +11,16 @@ class SupplyBrokerage extends Model
|
||||
// 设置当前模型对应的完整数据表名称
|
||||
protected $table = 'fa_supply_brokerage';
|
||||
|
||||
/**
|
||||
*
|
||||
* 关联用户信息
|
||||
*
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->hasOne(ShopUser::class, 'uid', 'user_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联商户
|
||||
*
|
||||
|
@ -11,22 +11,16 @@ use think\Validate;
|
||||
class SupplyAccountValidate extends Validate
|
||||
{
|
||||
protected $rule = [
|
||||
'account' => 'require',
|
||||
'name' => 'require',
|
||||
'bank' => 'require',
|
||||
'amount' => 'require',
|
||||
'balance' => 'require',
|
||||
'free_balance' => 'require',
|
||||
'fa_supply_team_id' => 'require',
|
||||
];
|
||||
'account' => 'require',
|
||||
'name' => 'require',
|
||||
'bank' => 'require',
|
||||
'bank_address' => 'require',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'account.require' => '账号不能为空',
|
||||
'name.require' => '用户名不能为空',
|
||||
'bank.require' => '开户行不能为空',
|
||||
'amount.require' => '已提现金额不能为空',
|
||||
'balance.require' => '账户余额不能为空',
|
||||
'free_balance.require' => '冻结余额不能为空',
|
||||
'fa_supply_team_id.require' => '所属后台供应链团队ID不能为空',
|
||||
'account.require' => '账号不能为空',
|
||||
'name.require' => '用户名不能为空',
|
||||
'bank.require' => '开户银行不能为空',
|
||||
'bank_address.require' => '开户地址不能为空',
|
||||
];
|
||||
}
|
@ -56,12 +56,6 @@
|
||||
<table class="layui-hide" id="article" lay-filter="article"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group">
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a>
|
||||
{/if}
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
@ -79,25 +73,97 @@
|
||||
page: true,
|
||||
limit: 20,
|
||||
cols: [
|
||||
[
|
||||
{
|
||||
fixed: 'left',
|
||||
field: 'id',
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
},{
|
||||
field: 'order_sn',
|
||||
title: '订单号',
|
||||
},{
|
||||
field: 'extension_one',
|
||||
title: '一级佣金',
|
||||
align: 'center',
|
||||
},{
|
||||
field: 'extension_two',
|
||||
title: '一级佣金',
|
||||
align: 'center',
|
||||
}
|
||||
]
|
||||
[
|
||||
{
|
||||
fixed: 'left',
|
||||
field: 'id',
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
width: 80
|
||||
},{
|
||||
field: 'supply_sn',
|
||||
title: '流水号',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'mer_id',
|
||||
title: '商户',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
templet: function (d)
|
||||
{
|
||||
return d.merchant.mer_name;
|
||||
}
|
||||
},{
|
||||
field: 'fa_supply_chain_id',
|
||||
title: '供应链团队',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
templet: function (d)
|
||||
{
|
||||
return d.supplyChain.name;
|
||||
}
|
||||
},{
|
||||
field: 'order_sn',
|
||||
title: '订单编号',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'order_id',
|
||||
title: '订单ID',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'user_info',
|
||||
title: '用户名',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'user_id',
|
||||
title: '小组服务用户ID',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'supply_userId',
|
||||
title: '供应链用户ID',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'pay_price',
|
||||
title: '订单金额',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'brokerage_price',
|
||||
title: '佣金金额',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'brokerage_rate',
|
||||
title: '分佣等级',
|
||||
align: 'center',
|
||||
width: 300,
|
||||
templet: function (d)
|
||||
{
|
||||
return d.level.name + ',分佣比例:' + d.level.rate + '%';
|
||||
}
|
||||
},{
|
||||
field: 'status',
|
||||
title: '分佣状态',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'group_user',
|
||||
title: '用户组',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'create_time',
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
width: 100
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
//监听表格行工具事件
|
||||
|
@ -101,7 +101,7 @@
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group">
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">用户信息</a>
|
||||
{if {:session('gougu_admin')['group_access']!=5}
|
||||
{if {:session('gougu_admin')['group_access']!=3}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="auths">权限管理</a>
|
||||
{/if}
|
||||
{notin name=":session('gougu_admin')['group_access']" value="2,3,4,5"}
|
||||
@ -165,7 +165,16 @@
|
||||
field: 'user',
|
||||
title: '头像',
|
||||
align: 'center',
|
||||
templet: '<div><img src="{{ d.user.avatar }}" style="width:30px; height:30px;"></div>',
|
||||
templet: function (d)
|
||||
{
|
||||
if(d.user.avatar)
|
||||
{
|
||||
return '<div><img src="{{ d.user.avatar }}" style="width:30px; height:30px;"></div>';
|
||||
|
||||
}else{
|
||||
return '<div><img src="/static/admin/images/icon.png" style="width:30px; height:30px;"></div>';
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'gender',
|
||||
title: '性别',
|
||||
|
@ -1,36 +1,64 @@
|
||||
{extend name="common/base"/}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<form class="layui-form p-4">
|
||||
<h3 class="pb-3">新建提现账户信息</h3>
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr><td class="layui-td-gray-2">账号<font>*</font></td>
|
||||
<td><input type="text" name="account" lay-verify="required" lay-reqText="请完善账号" value="" autocomplete="off" placeholder="请输入账号" class="layui-input"></td><td class="layui-td-gray-2">用户名<font>*</font></td>
|
||||
<td><input type="text" name="name" lay-verify="required" lay-reqText="请完善用户名" value="" autocomplete="off" placeholder="请输入用户名" class="layui-input"></td><td class="layui-td-gray-2">开户行<font>*</font></td>
|
||||
<td><input type="text" name="bank" lay-verify="required" lay-reqText="请完善开户行" value="" autocomplete="off" placeholder="请输入开户行" class="layui-input"></td>
|
||||
</tr>
|
||||
<tr><td class="layui-td-gray-2">已提现金额<font>*</font></td>
|
||||
<td><input type="text" name="amount" lay-verify="required" lay-reqText="请完善已提现金额" value="" autocomplete="off" placeholder="请输入已提现金额" class="layui-input"></td><td class="layui-td-gray-2">账户余额<font>*</font></td>
|
||||
<td><input type="text" name="balance" lay-verify="required" lay-reqText="请完善账户余额" value="" autocomplete="off" placeholder="请输入账户余额" class="layui-input"></td><td class="layui-td-gray-2">冻结余额<font>*</font></td>
|
||||
<td><input type="text" name="free_balance" lay-verify="required" lay-reqText="请完善冻结余额" value="" autocomplete="off" placeholder="请输入冻结余额" class="layui-input"></td>
|
||||
</tr>
|
||||
<tr><td class="layui-td-gray-2">所属后台供应链团队ID<font>*</font></td>
|
||||
<td>
|
||||
<select name="fa_supply_team_id" lay-verify="required" lay-reqText="请完善所属后台供应链团队ID">
|
||||
<option value="">请选择</option>
|
||||
{volist name='team' id='vo'}
|
||||
<option value="{$vo.id}" >{$vo.name}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</td><td colspan='4'></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="pt-3">
|
||||
<input type="hidden" name="id" value="0"/>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</form>
|
||||
{if condition="$account"}
|
||||
<form class="layui-form p-4">
|
||||
<h3 class="pb-3">提现账户信息</h3>
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">用户名<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" value="{$account.name}" lay-verify="required" lay-reqText="请完善用户名" value="" autocomplete="off" placeholder="请输入用户名" class="layui-input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">账号<font>*</font></td>
|
||||
<td><input type="text" name="account" value="{$account.account}" lay-verify="required" lay-reqText="请完善账号" value="" autocomplete="off" placeholder="请输入账号" class="layui-input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">开户银行<font>*</font></td>
|
||||
<td colspan="3"><input type="text" name="bank" value="{$account.bank}" lay-verify="required" lay-reqText="请完善开户行" value="" autocomplete="off" placeholder="请输入开户银行" class="layui-input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">开户银行地址<font>*</font></td>
|
||||
<td colspan="3"><input type="text" name="bank_address" value="{$account.bank_address}" lay-verify="required" lay-reqText="请完善开户银行地址" value="" autocomplete="off" placeholder="请输入开户银行" class="layui-input"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="pt-3">
|
||||
<input type="hidden" name="id" value="0"/>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</form>
|
||||
{else/}
|
||||
<form class="layui-form p-4">
|
||||
<h3 class="pb-3">提现账户信息</h3>
|
||||
<table class="layui-table layui-table-form">
|
||||
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">用户名<font>*</font></td>
|
||||
<td colspan="2"><input type="text" name="name" lay-verify="required" lay-reqText="请完善用户名" value="" autocomplete="off" placeholder="请输入用户名" class="layui-input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">账号<font>*</font></td>
|
||||
<td><input type="text" name="account" lay-verify="required" lay-reqText="请完善账号" value="" autocomplete="off" placeholder="请输入账号" class="layui-input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">开户银行<font>*</font></td>
|
||||
<td colspan="3"><input type="text" name="bank" lay-verify="required" lay-reqText="请完善开户行" value="" autocomplete="off" placeholder="请输入开户银行" class="layui-input"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray-2">开户银行地址<font>*</font></td>
|
||||
<td colspan="3"><input type="text" name="bank_address" lay-verify="required" lay-reqText="请完善开户银行地址" value="" autocomplete="off" placeholder="请输入开户银行" class="layui-input"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="pt-3">
|
||||
<input type="hidden" name="id" value="0"/>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
|
@ -9,12 +9,14 @@
|
||||
</div>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="searchform">提交搜索</button>
|
||||
</form>
|
||||
|
||||
<table class="layui-hide" id="supply_account" lay-filter="supply_account"></table>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container">
|
||||
<span class="layui-btn layui-btn-sm" lay-event="add" data-title="添加供应链团队角色提现账户信息">+ 添加供应链团队角色提现账户信息</span>
|
||||
<span class="layui-btn layui-btn-sm" lay-event="add" data-title="添加提现账户">+ 添加提现账户</span>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
@ -47,50 +49,81 @@
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
width: 80
|
||||
},{
|
||||
field: 'fa_supply_team_id',
|
||||
title: '所属小组服务',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
templet: function (d)
|
||||
{
|
||||
if(d.team)
|
||||
{
|
||||
return d.team.name;
|
||||
}
|
||||
|
||||
return '数据错误';
|
||||
}
|
||||
},{
|
||||
field: 'account',
|
||||
title: '账号',
|
||||
align: 'center',
|
||||
width: 100
|
||||
width: 150
|
||||
},{
|
||||
field: 'name',
|
||||
title: '用户名',
|
||||
align: 'center',
|
||||
width: 100
|
||||
width: 150
|
||||
},{
|
||||
field: 'bank',
|
||||
title: '开户行',
|
||||
align: 'center',
|
||||
width: 100
|
||||
width: 150
|
||||
},{
|
||||
field: 'amount',
|
||||
field: 'bank_address',
|
||||
title: '开户行地址',
|
||||
align: 'center',
|
||||
width: 250
|
||||
},{
|
||||
field: 'withdraw_brokerage',
|
||||
title: '已提现金额',
|
||||
align: 'center',
|
||||
width: 100
|
||||
templet: function (d)
|
||||
{
|
||||
if(d.team)
|
||||
{
|
||||
return d.team.withdraw_brokerage;
|
||||
}
|
||||
|
||||
return '0.00';
|
||||
}
|
||||
},{
|
||||
field: 'balance',
|
||||
field: 'brokerage',
|
||||
title: '账户余额',
|
||||
align: 'center',
|
||||
width: 100
|
||||
templet: function (d)
|
||||
{
|
||||
if(d.team)
|
||||
{
|
||||
return d.team.brokerage;
|
||||
}
|
||||
|
||||
return '0.00';
|
||||
}
|
||||
},{
|
||||
field: 'free_balance',
|
||||
field: 'free_brokerage',
|
||||
title: '冻结余额',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},{
|
||||
field: 'fa_supply_team_id',
|
||||
title: '所属后台供应链团队ID',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
fixed: 'right',
|
||||
field: 'right',
|
||||
title: '操作',
|
||||
toolbar: '#barDemo',
|
||||
width: 136,
|
||||
align: 'center'
|
||||
}
|
||||
templet: function (d)
|
||||
{
|
||||
if(d.team)
|
||||
{
|
||||
return d.team.free_brokerage;
|
||||
}
|
||||
|
||||
return '0.00';
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
@ -13,7 +13,7 @@
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="status">
|
||||
<i class="layui-icon {{# if(d.status == 1){ }}layui-icon-ok{{# } else { }}layui-icon-close{{# } }}"></i>
|
||||
<i class="layui-icon {{# if(d.status == 1){ }}layui-icon-ok{{# } else { }}layui-icon-close }}"></i>
|
||||
</script>
|
||||
<script type="text/html" id="is_home">
|
||||
<i class="layui-icon {{# if(d.is_home == 1){ }}layui-icon-ok{{# } else { }}layui-icon-close{{# } }}"></i>
|
||||
@ -32,7 +32,7 @@
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group">
|
||||
{if {:auth_cache(session('gougu_admin')['id'],$url[2])}==true}
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">撤销</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs {{# if(d.status != 0){ }}layui-hide{{# } }}" lay-event="cancel">撤销</a>
|
||||
{/if}
|
||||
</div>
|
||||
</script>
|
||||
@ -75,12 +75,12 @@
|
||||
field: 'uid',
|
||||
title: '用户UID',
|
||||
align: 'center',
|
||||
width:120,
|
||||
width: 260,
|
||||
templet: function (d)
|
||||
{
|
||||
if(d.user)
|
||||
{
|
||||
return d.user;
|
||||
return '昵称:' + d.user.nickname + '手机号:' + d.user.phone;
|
||||
}
|
||||
|
||||
return '数据错误';
|
||||
@ -145,6 +145,9 @@
|
||||
case 1:
|
||||
return '提现完成';
|
||||
break;
|
||||
case 3:
|
||||
return '撤销提现';
|
||||
break;
|
||||
}
|
||||
}
|
||||
},{
|
||||
@ -159,7 +162,12 @@
|
||||
return d.adminUser;
|
||||
}
|
||||
|
||||
return '数据错误';
|
||||
if(d.status == 0)
|
||||
{
|
||||
return '等待审核';
|
||||
}
|
||||
|
||||
return '无';
|
||||
}
|
||||
},{
|
||||
field: 'fail_msg',
|
||||
@ -192,11 +200,22 @@
|
||||
|
||||
//监听表格行工具事件
|
||||
table.on('tool(article)', function(obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'edit') {
|
||||
tool.side('{$url[2]}?id='+obj.data.id);
|
||||
}
|
||||
|
||||
if (obj.event === 'cancel') {
|
||||
|
||||
layer.confirm('确定要撤销提现吗?', {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function(index) {
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
window.location.reload()
|
||||
}
|
||||
tool.delete('{$url[2]}', { id: obj.data.id }, callback);
|
||||
layer.close(index);
|
||||
});
|
||||
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
@ -79,7 +79,7 @@
|
||||
<div class="layui-col-md4">
|
||||
<label class="layui-form-label">分润比例<font>*</font></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="shareRate" required lay-verify="required" placeholder="{$detail.shareRate}" autocomplete="off" class="layui-input">
|
||||
<input type="text" name="shareRate" required lay-verify="required" value="{$detail.shareRate}" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user