<?php namespace App\Http\Controllers; use App\Http\Services\RoleService; use App\Http\Services\SupplierContactService; use App\Http\Services\SupplierService; use App\Http\Services\SupplierStatisticsService; use App\Http\Services\ViewCheckService; use App\Model\IntracodeModel; use App\Model\SupplierChannelModel; use App\Model\SupplierReceiptModel; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; class ReceiptController extends Controller { public function info(Request $request, $id = '') { { if ($request->path() == '/') { $path = 'web/index'; } else { $path = $request->path(); } $this->data = [ 'menus' => $request->menus, 'header' => $request->user->header, 'username' => $request->user->email, 'user_email' => $request->user->email, 'uri' => '/' . $path, 'id' => $id ]; $userId = $request->user->userId; $canAudit = perm($userId, 'AuditSupplier'); $this->data['canAudit'] = $canAudit; //把是否是领导查看放到模板,用来区分部门老大能干的权限 $leaderView = perm($userId, 'LeaderView'); $this->data['leaderView'] = $leaderView; return $this->$id($request); } } public function __call($name, $arr) { $data['errinfo'] = '访问路径错误'; return view('errors.error', $data); } //供应商详情 public function PureAddReceipt($request) { $receiptId = $request->get('receipt_id'); if (!empty($receiptId)) { $model = new SupplierReceiptModel(); $this->data['receipt'] = $model->where('receipt_id', $receiptId)->first()->toArray(); } $this->data['title'] = '添加供应商多银行'; $this->data['stockup_type'] = Config('fixed.SupplierStockupType'); $this->data['currency'] = Config('fixed.Currency'); $this->data['pay_type'] = Config('fixed.SupplierPayType'); $this->data['receipt_type'] = Config('fixed.ReceiptType'); return $this->view('添加银行'); } }