You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.2 KiB
45 lines
1.2 KiB
<?php
|
|
|
|
namespace App\AdminAgent\Extensions\Grid;
|
|
use App\Common\OrderStatus;
|
|
use App\Common\StatementType;
|
|
use App\Models\IndustryOrder;
|
|
use App\Models\Order;
|
|
use App\Models\Agent;
|
|
use App\Models\OrderProductItem;
|
|
use App\Models\Supplier;
|
|
use App\Service\WithdrawalService;
|
|
use App\Traits\DemandTraits;
|
|
use App\Traits\StatementTraits;
|
|
use Dcat\Admin\Admin;
|
|
use Dcat\Admin\Grid\RowAction;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
/**
|
|
* 发送核销码到供应商,允许供应商核销
|
|
* Class ChangeOrderStatus
|
|
* @package App\AdminAgent\Extensions\Grid
|
|
*/
|
|
class SupplierShowQrcode extends RowAction
|
|
{
|
|
protected $title = '发送核销码';
|
|
|
|
protected function html()
|
|
{
|
|
$this->appendHtmlAttribute('class', 'btn btn-sm btn-success');
|
|
$this->defaultHtmlAttribute('href', 'javascript:;');
|
|
|
|
return "<a {$this->formatHtmlAttributes()}>{$this->title}</a>";
|
|
}
|
|
|
|
public function handle()
|
|
{
|
|
IndustryOrder::where(['id' => $this->getKey(), 'agent_id' => Admin::user()->id])->update(['show_qrcode' => 1]);
|
|
return $this->response()->success('发送成功,供应商可以对该订单进行核销了');
|
|
}
|
|
|
|
public function confirm()
|
|
{
|
|
return ['确定要发送核销码到供应商商,允许供应商核销吗?', ''];
|
|
}
|
|
}
|