海南旅游SAAS
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

  1. <?php
  2. namespace App\AdminAgent\Extensions\Grid;
  3. use App\Common\OrderStatus;
  4. use App\Common\StatementType;
  5. use App\Models\IndustryOrder;
  6. use App\Models\Order;
  7. use App\Models\Agent;
  8. use App\Models\OrderProductItem;
  9. use App\Models\Supplier;
  10. use App\Service\WithdrawalService;
  11. use App\Traits\DemandTraits;
  12. use App\Traits\StatementTraits;
  13. use Dcat\Admin\Admin;
  14. use Dcat\Admin\Grid\RowAction;
  15. use Illuminate\Support\Facades\DB;
  16. /**
  17. * 发送核销码到供应商,允许供应商核销
  18. * Class ChangeOrderStatus
  19. * @package App\AdminAgent\Extensions\Grid
  20. */
  21. class SupplierShowQrcode extends RowAction
  22. {
  23. protected $title = '发送核销码';
  24. protected function html()
  25. {
  26. $this->appendHtmlAttribute('class', 'btn btn-sm btn-success');
  27. $this->defaultHtmlAttribute('href', 'javascript:;');
  28. return "<a {$this->formatHtmlAttributes()}>{$this->title}</a>";
  29. }
  30. public function handle()
  31. {
  32. IndustryOrder::where(['id' => $this->getKey(), 'agent_id' => Admin::user()->id])->update(['show_qrcode' => 1]);
  33. return $this->response()->success('发送成功,供应商可以对该订单进行核销了');
  34. }
  35. public function confirm()
  36. {
  37. return ['确定要发送核销码到供应商商,允许供应商核销吗?', ''];
  38. }
  39. }