|
|
@@ -295,18 +295,18 @@ class CustomerController extends Controller
|
|
|
|
|
|
public function financeInstantBill(Request $request)
|
|
|
{
|
|
|
- if(!Gate::allows('客户管理-财务-即时账单')){ return redirect('denied'); }
|
|
|
+ if(!Gate::allows('结算管理-即时账单')){ return redirect('denied'); }
|
|
|
$params = $request->input();
|
|
|
$shops = app('ShopService')->getSelection();
|
|
|
$customers = app('CustomerService')->getSelection();
|
|
|
$owners = app('OwnerService')->getIntersectPermitting();
|
|
|
$details = app('OwnerFeeDetailService')->paginate($params,["owner.customer","shop","processMethod","logistic","items"]);
|
|
|
- return response()->view('customer.finance.instantBill',compact("details","params","shops","customers","owners"));
|
|
|
+ return response()->view('finance.instantBill',compact("details","params","shops","customers","owners"));
|
|
|
}
|
|
|
|
|
|
public function financeInstantBillExport(Request $request)
|
|
|
{
|
|
|
- if(!Gate::allows('客户管理-财务-即时账单')){ return redirect('denied'); }
|
|
|
+ if(!Gate::allows('结算管理-即时账单')){ return redirect('denied'); }
|
|
|
$params = $request->input();
|
|
|
if ($request->checkAllSign)unset($params['checkAllSign']);
|
|
|
else $params = ["id"=>$request->data];
|
|
|
@@ -331,7 +331,7 @@ class CustomerController extends Controller
|
|
|
|
|
|
public function financeBillConfirmation(Request $request)
|
|
|
{
|
|
|
- if(!Gate::allows('客户管理-财务-账单确认')){ return redirect('denied'); }
|
|
|
+ if(!Gate::allows('结算管理-账单确认')){ return redirect('denied'); }
|
|
|
$params = $request->input();
|
|
|
$ownerGroups = app('UserOwnerGroupService')->getSelection();
|
|
|
$customers = app('CustomerService')->getSelection();
|
|
|
@@ -340,12 +340,12 @@ class CustomerController extends Controller
|
|
|
/** @var Builder $query */
|
|
|
$query->with(["customer","userOwnerGroup"]);
|
|
|
}]);
|
|
|
- return response()->view('customer.finance.billConfirmation',compact("params","owners","ownerGroups","customers","bills"));
|
|
|
+ return response()->view('finance.billConfirmation',compact("params","owners","ownerGroups","customers","bills"));
|
|
|
}
|
|
|
|
|
|
public function financeBillConfirmationExport(Request $request)
|
|
|
{
|
|
|
- if(!Gate::allows('客户管理-财务-账单确认')){ return redirect('denied'); }
|
|
|
+ if(!Gate::allows('结算管理-账单确认')){ return redirect('denied'); }
|
|
|
$params = $request->input();
|
|
|
if ($request->checkAllSign)unset($params['checkAllSign']);
|
|
|
else $params = ["id"=>$request->data];
|
|
|
@@ -384,7 +384,7 @@ class CustomerController extends Controller
|
|
|
|
|
|
public function updateBillReport(Request $request)
|
|
|
{
|
|
|
- if(!Gate::allows('客户管理-财务-账单确认-编辑')){ return ["success"=>false,'data'=>"无权操作!"]; }
|
|
|
+ if(!Gate::allows('结算管理-账单确认-编辑')){ return ["success"=>false,'data'=>"无权操作!"]; }
|
|
|
if (!$request->confirm_fee || !is_numeric($request->confirm_fee) || $request->confirm_fee<0)return ["success"=>false,"data"=>"非法金额参数"];
|
|
|
$date = date('Y-m-d H:i:s');
|
|
|
app('OwnerBillReportService')->update(["id"=>$request->id],["confirm_fee"=>$request->confirm_fee,"difference"=>DB::raw($request->confirm_fee.'- initial_fee'),"updated_at"=>$date]);
|
|
|
@@ -394,7 +394,7 @@ class CustomerController extends Controller
|
|
|
|
|
|
public function billConfirm(Request $request)
|
|
|
{
|
|
|
- if(!Gate::allows('客户管理-财务-账单确认-完结')){ return ["success"=>false,'data'=>"无权操作!"]; }
|
|
|
+ if(!Gate::allows('结算管理-账单确认-完结')){ return ["success"=>false,'data'=>"无权操作!"]; }
|
|
|
if (!($request->id ?? false))return["success"=>false,"data"=>"非法参数"];
|
|
|
app('OwnerBillReportService')->update(["id"=>$request->id],["confirmed"=>"是"]);
|
|
|
LogService::log(__METHOD__,"客户管理-确认账单",json_encode($request->input()));
|