供应商详情页展示绑定的银行卡列表

This commit is contained in:
weiz 2024-05-21 15:26:57 +08:00
parent f53b028278
commit 4c17b52852
2 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,7 @@ namespace app\admin\logic\supplier;
use app\admin\logic\user\UserLogic;
use app\admin\service\JgPushService;
use app\common\model\goods\GoodsLabel;
use app\common\model\merchant\MerchantBank;
use app\common\model\supplier\Supplier;
use app\common\logic\BaseLogic;
use think\facade\Db;
@ -238,6 +239,10 @@ class SupplierLogic extends BaseLogic
}else{
$data['sys_labels_text'] = '';
}
$data['supplier_banks'] = MerchantBank::where('supplier_id',$params['id'])->select()->each(function($item){
$item['is_check_text'] = $item->is_check_text;
$item['is_own_text'] = $item->is_own_text;
})->toArray();
return $data->toArray();
}

View File

@ -22,4 +22,9 @@ class MerchantBank extends BaseModel
$arr = [0=>'待审核', 1=>'审核通过', 2=>'审核未通过'];
return $arr[$data['is_check']];
}
public function getIsOwnTextAttr($value,$data){
$arr = [0=>'个人账户', 1=>'对公账户'];
return $arr[$data['is_own']];
}
}