Browse Source

数据卡片增加提现按钮

master
lanzu_qinsheng 5 years ago
parent
commit
6787b783ca
  1. 2
      app/Admin/Forms/RefundNote.php
  2. 15
      app/Admin/Metrics/Examples/Community/TotalAmount.php
  3. 2
      app/Admin/Metrics/Examples/Community/TotalCommunity.php
  4. 2
      app/Admin/Metrics/Examples/ServiceCard/TotalMp.php

2
app/Admin/Forms/RefundNote.php

@ -24,7 +24,7 @@ class RefundNote extends Form
$current_page = request()->get('current_page'); $current_page = request()->get('current_page');
$order = ImsCjdcOrderMain::where('id', $oid)->first(); $order = ImsCjdcOrderMain::where('id', $oid)->first();
$order->refuse_refund_note = $note; $order->refuse_refund_note = $note;
$order->state = 10;
$order->state = 2;
$order->updated_at = time(); $order->updated_at = time();
if ($order->save()) { if ($order->save()) {
$storeIds = ImsCjdcOrder::where('order_main_id',$order->global_order_id)->pluck('store_id')->toArray(); $storeIds = ImsCjdcOrder::where('order_main_id',$order->global_order_id)->pluck('store_id')->toArray();

15
app/Admin/Metrics/Examples/Community/TotalAmount.php

@ -3,6 +3,8 @@
namespace App\Admin\Metrics\Examples\Community; namespace App\Admin\Metrics\Examples\Community;
use App\Models\LanzuUserBalance; use App\Models\LanzuUserBalance;
use Dcat\Admin\Admin;
use Dcat\Admin\Support\Helper;
use Dcat\Admin\Widgets\Metrics\Card; use Dcat\Admin\Widgets\Metrics\Card;
class TotalAmount extends Card class TotalAmount extends Card
@ -21,7 +23,6 @@ class TotalAmount extends Card
{ {
parent::init(); parent::init();
$this->content(LanzuUserBalance::getBalance($this->uid, $this->uType)); $this->content(LanzuUserBalance::getBalance($this->uid, $this->uType));
} }
/** /**
@ -30,11 +31,23 @@ class TotalAmount extends Card
*/ */
public function renderContent() public function renderContent()
{ {
$content = parent::renderContent(); $content = parent::renderContent();
$adu = Admin::user();
$url = "";
if ($adu->isRole('lanzu_mp')){
$url = url('admin/mp_withdraw/create');
}elseif ($adu->isRole('lanzu_cs')){
$url = url('admin/cs_withdraw/create');
}elseif ($adu->isRole('lanzu_mm')){
$url = url('admin/mm_withdraw/create');
}
return <<<HTML return <<<HTML
<div class="d-flex justify-content-between bg-primary align-items-center mt-1" style="margin-bottom: 2px"> <div class="d-flex justify-content-between bg-primary align-items-center mt-1" style="margin-bottom: 2px">
<h2 class="ml-1 font-large-1">{$content}</h2> <h2 class="ml-1 font-large-1">{$content}</h2>
</div> </div>
<a type="button" href="{$url}" style="float: right; margin-right: 10px;margin-top: 15px" class="btn btn-outline-primary">提现</a>
HTML; HTML;
} }

2
app/Admin/Metrics/Examples/Community/TotalCommunity.php

@ -25,7 +25,7 @@ class TotalCommunity extends Card
{ {
$content = parent::renderContent(); $content = parent::renderContent();
return <<<HTML return <<<HTML
<div class="d-flex justify-content-between align-items-center mt-1" style="margin-bottom: 2px">
<div class="d-flex justify-content-between bg-primary align-items-center mt-1" style="margin-bottom: 2px">
<h2 class="ml-1 font-large-1">{$content}</h2> <h2 class="ml-1 font-large-1">{$content}</h2>
</div> </div>
HTML; HTML;

2
app/Admin/Metrics/Examples/ServiceCard/TotalMp.php

@ -24,7 +24,7 @@ class TotalMp extends Card
{ {
$content = parent::renderContent(); $content = parent::renderContent();
return <<<HTML return <<<HTML
<div class="d-flex justify-content-between align-items-center mt-1" style="margin-bottom: 2px">
<div class="d-flex justify-content-between bg-primary align-items-center mt-1" style="margin-bottom: 2px">
<h2 class="ml-1 font-large-1">{$content}</h2> <h2 class="ml-1 font-large-1">{$content}</h2>
</div> </div>
HTML; HTML;

Loading…
Cancel
Save