6
0
Fork 0

调整后台收款信息显示

release
vine_liutk 2022-01-19 10:02:25 +08:00 committed by 李静
parent 5b1d4f8845
commit 17a6caab28
1 changed files with 48 additions and 11 deletions

View File

@ -111,17 +111,6 @@ class DealerOrderController extends AdminController
DealerOrderStatus::Completed->value => 'success',
DealerOrderStatus::Cancelled->value => '#b3b9bf',
]);
//非(待确认,已取消)显示收款人信息
if (!in_array($show->model()->order_status, [
DealerOrderStatus::Pending->value, DealerOrderStatus::Cancelled->value,
])) {
$show->divider();
$show->field('pay_info')->as(function () {
return $this->getConsignorPayInfo();
// dd($this->getConsignorPayInfo());
});
}
// $show->field('order_status')
$show->divider();
$show->field('consignee_name');
@ -129,6 +118,54 @@ class DealerOrderController extends AdminController
$show->field('consignee', '收货地址')->as(function () {
return $this->consignee_zone . ' '. $this->consignee_address;
});
//非(待确认,已取消)显示收款人信息
if (!in_array($show->model()->order_status, [
DealerOrderStatus::Pending->value, DealerOrderStatus::Cancelled->value,
])) {
$show->divider('收款信息-银行');
$show->field('bank_user_name', '银行-收款人')->as(function () {
$payInfo = $this->getConsignorPayInfo();
return $payInfo['bank']['user_name']??'';
});
$show->field('bank_bank_name', '银行-名称')->as(function () {
$payInfo = $this->getConsignorPayInfo();
return $payInfo['bank']['bank_name']??'';
});
$show->field('bank_bank_number', '银行-卡号')->as(function () {
$payInfo = $this->getConsignorPayInfo();
return $payInfo['bank']['bank_number']??'';
});
$show->field('bank_bank_description', '银行-开户行')->as(function () {
$payInfo = $this->getConsignorPayInfo();
return $payInfo['bank']['bank_description']??'';
});
$show->divider('收款信息-支付宝');
$show->field('alipay_user_name', '支付宝-真实名称')->as(function () {
$payInfo = $this->getConsignorPayInfo();
return $payInfo['alipay']['user_name']??'';
});
$show->field('alipay_ali_name', '支付宝-账户')->as(function () {
$payInfo = $this->getConsignorPayInfo();
return $payInfo['alipay']['ali_name']??'';
});
$show->field('alipay_image', '支付宝-收款码')->as(function () {
$payInfo = $this->getConsignorPayInfo();
return $payInfo['alipay']['image']??'';
})->image();
$show->divider('收款信息-微信');
$show->field('wechat_user_name', '微信-真实名称')->as(function () {
$payInfo = $this->getConsignorPayInfo();
return $payInfo['wechat']['user_name']??'';
});
$show->field('wechat_wechat_name', '微信-ID')->as(function () {
$payInfo = $this->getConsignorPayInfo();
return $payInfo['wechat']['wechat_name']??'';
});
$show->field('wechat_image', '微信-收款码')->as(function () {
$payInfo = $this->getConsignorPayInfo();
return $payInfo['wechat']['image']??'';
})->image();
}
$show->panel()
->tools(function (Show\Tools $tools) use ($show) {
$tools->disableEdit();