浏览代码

latest code in server

ifah
root 6 年前
父节点
当前提交
f833ffd4c0

+ 1
- 1
app/Http/Controllers/Api/FormController.php 查看文件



public function get_data_form(Request $request){ public function get_data_form(Request $request){


$dateS = Carbon::createFromFormat('Y-m-d', '2019-01-01');
$dateS = Carbon::createFromFormat('Y-m-d', '2020-08-12');
$start = $dateS->copy()->startOfDay(); $start = $dateS->copy()->startOfDay();
$dateE = Carbon::createFromFormat('Y-m-d', '2020-08-31'); $dateE = Carbon::createFromFormat('Y-m-d', '2020-08-31');
$end = $dateE->copy()->endOfDay(); $end = $dateE->copy()->endOfDay();

+ 6
- 1
app/Http/Controllers/Contractor/WorkOrderController.php 查看文件

} }


function createWorkID($limit){ function createWorkID($limit){
$number = WorkOrder::select('id','wo')->orderBy('created_at','DESC')->first();
$numberOnly = str_replace('WO-','',$number->wo);
$numberOnly++;
return $numberOnly;

$allowedNumbers = range(0, 9); $allowedNumbers = range(0, 9);
shuffle($allowedNumbers); shuffle($allowedNumbers);
$digits = array_rand($allowedNumbers, $limit); $digits = array_rand($allowedNumbers, $limit);
return redirect('/contractor/work-order/list'); return redirect('/contractor/work-order/list');
} }
} }
}
}

+ 7
- 2
app/Http/Controllers/CustomerService/CoverageController.php 查看文件

return substr(base_convert(sha1(uniqid(mt_rand())), 16, 36), 0, $limit); return substr(base_convert(sha1(uniqid(mt_rand())), 16, 36), 0, $limit);
} }


function createWorkID($limit){
function createWorkID($limit) {
$number = WorkOrder::select('id','wo')->orderBy('created_at','DESC')->first();
$numberOnly = str_replace('WO-','',$number->wo);
$numberOnly++;
return $numberOnly;

$allowedNumbers = range(0, 9); $allowedNumbers = range(0, 9);
shuffle($allowedNumbers); shuffle($allowedNumbers);
$digits = array_rand($allowedNumbers, $limit); $digits = array_rand($allowedNumbers, $limit);
return 'false'; return 'false';
} }
} }
}
}

+ 3
- 3
app/Http/Controllers/CustomerService/CustomerController.php 查看文件

$nested_data = array(); $nested_data = array();


if($type == 'null' && $building == 'null' && $dealer == 'null'){ if($type == 'null' && $building == 'null' && $dealer == 'null'){
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->take(500)->get();
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->take(2000)->get();
}else if($type != 'null' && $building == 'null' && $dealer == 'null'){ }else if($type != 'null' && $building == 'null' && $dealer == 'null'){
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->where('type_service',$type)->orderBy('created_at', 'desc')->get(); $form = Form::with('Subscriber','PackageDetail','WorkOrder')->where('type_service',$type)->orderBy('created_at', 'desc')->get();
}else if($type != 'null' && $building != 'null' && $dealer == 'null'){ }else if($type != 'null' && $building != 'null' && $dealer == 'null'){
$nested_data = array(); $nested_data = array();


if($type == 'null' && $building == 'null' && $dealer == 'null'){ if($type == 'null' && $building == 'null' && $dealer == 'null'){
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->get();
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->take(2000)->get();
}else if($type != 'null' && $building == 'null' && $dealer == 'null'){ }else if($type != 'null' && $building == 'null' && $dealer == 'null'){
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->where('type_service',$type)->orderBy('created_at', 'desc')->get(); $form = Form::with('Subscriber','PackageDetail','WorkOrder')->where('type_service',$type)->orderBy('created_at', 'desc')->get();
}else if($type != 'null' && $building != 'null' && $dealer == 'null'){ }else if($type != 'null' && $building != 'null' && $dealer == 'null'){
$nested_data = array(); $nested_data = array();


if($type == 'null' && $building == 'null' && $dealer == 'null'){ if($type == 'null' && $building == 'null' && $dealer == 'null'){
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->get();
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->take(2000)->get();
}else if($type != 'null' && $building == 'null' && $dealer == 'null'){ }else if($type != 'null' && $building == 'null' && $dealer == 'null'){
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->where('type_service',$type)->orderBy('created_at', 'desc')->get(); $form = Form::with('Subscriber','PackageDetail','WorkOrder')->where('type_service',$type)->orderBy('created_at', 'desc')->get();
}else if($type != 'null' && $building != 'null' && $dealer == 'null'){ }else if($type != 'null' && $building != 'null' && $dealer == 'null'){

+ 6
- 1
app/Http/Controllers/CustomerService/WorkOrderController.php 查看文件

} }


function createWorkID($limit){ function createWorkID($limit){
$number = WorkOrder::select('id','wo')->orderBy('created_at','DESC')->first();
$numberOnly = str_replace('WO-','',$number->wo);
$numberOnly++;
return $numberOnly;

$allowedNumbers = range(0, 9); $allowedNumbers = range(0, 9);
shuffle($allowedNumbers); shuffle($allowedNumbers);
$digits = array_rand($allowedNumbers, $limit); $digits = array_rand($allowedNumbers, $limit);
return redirect()->to('/customer-service/work-order/add/schedule/secured/'.$wo.'/'. $su_id); return redirect()->to('/customer-service/work-order/add/schedule/secured/'.$wo.'/'. $su_id);


} }
}
}

+ 2
- 1
app/Http/Controllers/Form/BusinessController.php 查看文件

$destinationPath = 'document/'.$su_id; $destinationPath = 'document/'.$su_id;
// create folder/dir if not exist // create folder/dir if not exist
info(public_path());
if(!File::exists(public_path().'/'.$destinationPath)){ if(!File::exists(public_path().'/'.$destinationPath)){
File::makeDirectory(public_path().'/'.$destinationPath,0777,true); File::makeDirectory(public_path().'/'.$destinationPath,0777,true);
} }
} }
return view('email.invoiceb', compact ('form', 'product')); return view('email.invoiceb', compact ('form', 'product'));
} }
}
}

+ 2
- 1
app/Http/Controllers/Form/ResidentialController.php 查看文件

$destinationPath = 'document/'.$su_id; $destinationPath = 'document/'.$su_id;
// create folder/dir if not exist // create folder/dir if not exist
if(!File::exists(public_path().'/'.$destinationPath)){
info(public_path());
if(!File::exists(public_path().'/'.$destinationPath)){
File::makeDirectory(public_path().'/'.$destinationPath,0777,true); File::makeDirectory(public_path().'/'.$destinationPath,0777,true);
} }



二进制
public/assets/avatar/5ee1c416a1f29b3d4c69e2d8.jpg 查看文件


+ 2
- 0
resources/views/pdf/residential-pdf.blade.php 查看文件

</td> </td>
</tr> </tr>
</table> </table>
@if ($ext1 !="pdf" && $ext2 !="pdf" && $ext3 !="pdf" && $ext4 !="pdf" && $ext5 != "pdf" && $ext6 !="pdf")
@if($form->back_ic != "" && $form->front_ic != "") @if($form->back_ic != "" && $form->front_ic != "")
<!-- <div class="page-break"></div> --> <!-- <div class="page-break"></div> -->
<table border="0" cellpadding="0" cellspacing="0" width="100%"> <table border="0" cellpadding="0" cellspacing="0" width="100%">
@endif @endif
</table> </table>
@endif @endif
@endif
</body> </body>
</html> </html>

正在加载...
取消
保存