4 changed files with 67 additions and 5 deletions
-
10app/AdminAgent/Controllers/IndustryOrderController.php
-
45app/AdminAgent/Extensions/Grid/SupplierShowQrcode.php
-
15app/AdminSupplier/Controllers/IndustryOrderController.php
-
2app/AdminSupplier/routes.php
@ -0,0 +1,45 @@ |
|||
<?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 ['确定要发送核销码到供应商商,允许供应商核销吗?', '']; |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue