feat: 添加导出功能到提现列表页面

This commit is contained in:
mkm 2024-08-23 17:57:50 +08:00
parent fcaf009427
commit c459d0adc9
2 changed files with 37 additions and 3 deletions

View File

@ -8,14 +8,16 @@ use app\common\model\store_extract\StoreExtract;
use app\common\lists\ListsSearchInterface;
use app\common\model\system_store\SystemStore;
use app\common\model\user\User;
use app\common\model\user\UserAuth;
use app\common\model\user_ship\UserShip;
use app\common\lists\ListsExcelInterface;
/**
* 门店提现列表
* Class StoreExtractLists
* @package app\admin\listsstore_extract
*/
class StoreExtractLists extends BaseAdminDataLists implements ListsSearchInterface
class StoreExtractLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{
@ -58,9 +60,11 @@ class StoreExtractLists extends BaseAdminDataLists implements ListsSearchInterfa
}else{
$name=$find['mobile'];
}
$openid=UserAuth::where('uid',$find['id'])->value('openid');
$user_ship=UserShip::where('id',$find['user_ship'])->value('title');
$item->nickname=$name.'('.$user_ship.')';
// $item->id_card=$name.'('.$user_ship.')';
$item->id_card=$find['id_card'];
$item->openid=$openid;
}
})
->toArray();
@ -78,4 +82,33 @@ class StoreExtractLists extends BaseAdminDataLists implements ListsSearchInterfa
return StoreExtract::where($this->searchWhere)->count();
}
/**
* @notes 导出文件名
* @return string
* @author 乔峰
* @date 2022/11/24 16:17
*/
public function setFileName(): string
{
return '提现列表';
}
/**
* @notes 导出字段
* @return string[]
* @author 乔峰
* @date 2022/11/24 16:17
*/
public function setExcelFields(): array
{
$data=[
'nickname' => '名称',
'extract_price' => '提现金额',
'id_card' => '身份证',
'openid' => 'openid',
'create_time' => '时间',
];
return $data;
}
}

View File

@ -122,7 +122,8 @@ class StoreBranchProductLogic extends BaseLogic
self::setError('商品库存不为0,无法删除');
return false;
}
return StoreBranchProduct::destroy($params['id']);
StoreBranchProduct::destroy($params['id']);
return true;
}