|
@@ -38,6 +38,7 @@ class ProcurementController extends Controller
|
|
|
|
|
|
|
|
private function newProcurement($param,$userId,$type=0,$status=0): Procurement
|
|
private function newProcurement($param,$userId,$type=0,$status=0): Procurement
|
|
|
{
|
|
{
|
|
|
|
|
+ $this->error("移至SWMS下达采购单,该系统已关闭");
|
|
|
$procurement=new Procurement([
|
|
$procurement=new Procurement([
|
|
|
'owner_material_id'=>$param['owner_material_id'],
|
|
'owner_material_id'=>$param['owner_material_id'],
|
|
|
'quantity'=>$param['quantity'],
|
|
'quantity'=>$param['quantity'],
|
|
@@ -103,6 +104,7 @@ class ProcurementController extends Controller
|
|
|
|
|
|
|
|
public function create()
|
|
public function create()
|
|
|
{
|
|
{
|
|
|
|
|
+ $this->error("移至SWMS下达采购单,该系统已关闭");
|
|
|
if(!Gate::allows('采购管理-采购-新建')){ return ["success"=>false,"data"=>"您无此权限操作!"]; }
|
|
if(!Gate::allows('采购管理-采购-新建')){ return ["success"=>false,"data"=>"您无此权限操作!"]; }
|
|
|
/** @var OwnerMaterialService $ownerMaterialService*/
|
|
/** @var OwnerMaterialService $ownerMaterialService*/
|
|
|
$ownerMaterialService=app(OwnerMaterialService::class);
|
|
$ownerMaterialService=app(OwnerMaterialService::class);
|
|
@@ -112,6 +114,7 @@ class ProcurementController extends Controller
|
|
|
|
|
|
|
|
public function store(Request $request)
|
|
public function store(Request $request)
|
|
|
{
|
|
{
|
|
|
|
|
+ $this->error("移至SWMS下达采购单,该系统已关闭");
|
|
|
$this->gate('采购管理-采购-新建');
|
|
$this->gate('采购管理-采购-新建');
|
|
|
$param=$request->all(['owner_material_id','quantity','amount','unit_price','remark']);
|
|
$param=$request->all(['owner_material_id','quantity','amount','unit_price','remark']);
|
|
|
$procurement=$this->newProcurement($param,Auth::user()['id']);
|
|
$procurement=$this->newProcurement($param,Auth::user()['id']);
|
|
@@ -119,7 +122,7 @@ class ProcurementController extends Controller
|
|
|
}
|
|
}
|
|
|
public function createProcurement(ProcurementRequest $request): array
|
|
public function createProcurement(ProcurementRequest $request): array
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
|
|
+ $this->error("移至SWMS下达采购单,该系统已关闭");
|
|
|
$this->gate('采购管理-采购-新建');
|
|
$this->gate('采购管理-采购-新建');
|
|
|
$request->validated();
|
|
$request->validated();
|
|
|
$param=$request->all(['owner_material_id','quantity','amount','unit_price','remark']);
|
|
$param=$request->all(['owner_material_id','quantity','amount','unit_price','remark']);
|
|
@@ -132,6 +135,7 @@ class ProcurementController extends Controller
|
|
|
//新增询价
|
|
//新增询价
|
|
|
public function createEnquiry(EnquiryRequest $request): array
|
|
public function createEnquiry(EnquiryRequest $request): array
|
|
|
{
|
|
{
|
|
|
|
|
+ $this->error("移至SWMS下达采购单,该系统已关闭");
|
|
|
$this->gate('采购管理-采购-新建');
|
|
$this->gate('采购管理-采购-新建');
|
|
|
$request->validated();
|
|
$request->validated();
|
|
|
$param=$request->all(['owner_material_id']);
|
|
$param=$request->all(['owner_material_id']);
|
|
@@ -161,6 +165,7 @@ class ProcurementController extends Controller
|
|
|
//新增打样
|
|
//新增打样
|
|
|
public function createProof(ProofRequest $request): array
|
|
public function createProof(ProofRequest $request): array
|
|
|
{
|
|
{
|
|
|
|
|
+ $this->error("移至SWMS下达采购单,该系统已关闭");
|
|
|
$this->gate('采购管理-采购-新建');
|
|
$this->gate('采购管理-采购-新建');
|
|
|
$request->validated();
|
|
$request->validated();
|
|
|
$param=$request->all(['owner_material_id']);
|
|
$param=$request->all(['owner_material_id']);
|
|
@@ -201,6 +206,7 @@ class ProcurementController extends Controller
|
|
|
//询价单提交采购申请
|
|
//询价单提交采购申请
|
|
|
public function submitProcurement(ProcurementAmountRequest $request): array
|
|
public function submitProcurement(ProcurementAmountRequest $request): array
|
|
|
{
|
|
{
|
|
|
|
|
+ $this->error("移至SWMS下达采购单,该系统已关闭");
|
|
|
$this->gate('采购管理-采购-编辑');
|
|
$this->gate('采购管理-采购-编辑');
|
|
|
$request->validated();
|
|
$request->validated();
|
|
|
$param=$request->all();
|
|
$param=$request->all();
|
|
@@ -253,6 +259,7 @@ class ProcurementController extends Controller
|
|
|
}
|
|
}
|
|
|
public function createAnew(Request $request): array
|
|
public function createAnew(Request $request): array
|
|
|
{
|
|
{
|
|
|
|
|
+ $this->error("移至SWMS下达采购单,该系统已关闭");
|
|
|
$this->gate('采购管理-采购-新建');
|
|
$this->gate('采购管理-采购-新建');
|
|
|
$ids=$request->input('checkData');
|
|
$ids=$request->input('checkData');
|
|
|
if (empty($ids)) return ['success' => false, 'message' => '当前未勾选指定订单!'];
|
|
if (empty($ids)) return ['success' => false, 'message' => '当前未勾选指定订单!'];
|
|
@@ -353,7 +360,7 @@ class ProcurementController extends Controller
|
|
|
foreach ($procurements as $procurement){
|
|
foreach ($procurements as $procurement){
|
|
|
if (empty($procurement->procurementDeliveries))continue;
|
|
if (empty($procurement->procurementDeliveries))continue;
|
|
|
$procurement->receive_amount=$procurement->procurementDeliveries->sum('amount');
|
|
$procurement->receive_amount=$procurement->procurementDeliveries->sum('amount');
|
|
|
- $procurement->signed_at=$procurement->procurementDeliveries->first()['signed_at'];
|
|
|
|
|
|
|
+ $procurement->signed_at=$procurement->procurementDeliveries->first()['signed_at'] ?? '';
|
|
|
}
|
|
}
|
|
|
return view('procurement/finance/procurementBill',compact('suppliers','materials','owners','paginateParams','procurements'));
|
|
return view('procurement/finance/procurementBill',compact('suppliers','materials','owners','paginateParams','procurements'));
|
|
|
}
|
|
}
|