fix
@@ -86,18 +86,22 @@ class KelulusanController extends Controller
|
||||
|
||||
public function updatePB(Request $request)
|
||||
{
|
||||
dd($request->all());
|
||||
$imageName = time().'.'.$request->image->extension();
|
||||
|
||||
$request->image->move(public_path('images'), $imageName);
|
||||
$request->image->move(public_path('kelulusanpb'), $imageName);
|
||||
|
||||
// dd($imageName);
|
||||
|
||||
$updatelulus = Http::put(config('api.url') .- '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan,[
|
||||
'sahkan' => 1,
|
||||
'namaoperasi' => $request->namaoperasi,
|
||||
'siri' => $request->siri
|
||||
$updatelulus = Http::put(config('api.url') . '/admin/permohonan/updatepb',[
|
||||
'amaun_lulus' => $request->amaun_lulus,
|
||||
'kelulusan' => $request->kelulusan,
|
||||
'kelulusanpbimage' => $imageName,
|
||||
'komen' => '',
|
||||
'mohonid' => $request->mohonid
|
||||
])->json();
|
||||
|
||||
|
||||
if($updatelulus)
|
||||
{
|
||||
return response(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 943 KiB |
|
After Width: | Height: | Size: 943 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 111 KiB |
@@ -82,7 +82,13 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr v-if="showpermohonan.data.length === 0">
|
||||
<td colspan="9" class=" px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<p class="text-gray-900 whitespace-no-wrap text-center mx-auto">
|
||||
Tiada Rekod Diperolehi
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(mohon,i) in showpermohonan.data" :key="i">
|
||||
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
@@ -232,7 +238,7 @@
|
||||
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<button @click="CetakanPenuh(mohon.kodcaw,mohon.mohonid)" class="border border-blue-600 text-blue-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-blue-600 hover:text-white transition-all duration-300">
|
||||
<button @click="DownloadBukti" class="border border-blue-600 text-blue-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-blue-600 hover:text-white transition-all duration-300">
|
||||
CETAK
|
||||
</button>
|
||||
</td>
|
||||
@@ -550,15 +556,18 @@ export default {
|
||||
this.$refs.bankmodal.mohonid = mid;
|
||||
this.$refs.bankmodal.showModal = true;
|
||||
},
|
||||
CetakanPenuh: function (caw, mid) {
|
||||
let route = window.route('permohonan.cetakanpenuh', {
|
||||
_query: {
|
||||
cawangan: caw,
|
||||
mohonid: mid
|
||||
},
|
||||
});
|
||||
window.open(route, '_blank')
|
||||
DownloadBukti: function(){
|
||||
console.log('dassa');
|
||||
}
|
||||
// CetakanPenuh: function (caw, mid) {
|
||||
// let route = window.route('permohonan.cetakanpenuh', {
|
||||
// _query: {
|
||||
// cawangan: caw,
|
||||
// mohonid: mid
|
||||
// },
|
||||
// });
|
||||
// window.open(route, '_blank')
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -121,9 +121,14 @@ export default {
|
||||
},
|
||||
FuncHantar: function () {
|
||||
|
||||
// console.log(this.item);
|
||||
console.log(this.item.image);
|
||||
let formData = new FormData();
|
||||
formData.append('images', this.item.image);
|
||||
formData.append('image', this.item.image);
|
||||
formData.append('kelulusan', this.selected);
|
||||
formData.append('mohonid', this.mohonid);
|
||||
formData.append('amaun_lulus', this.amaunlulus);
|
||||
|
||||
|
||||
// console.log(formData)
|
||||
let config = {
|
||||
header: {
|
||||
@@ -134,13 +139,7 @@ export default {
|
||||
// return;
|
||||
|
||||
// axios.put(this.$hostname + '/admin/permohonan/updatepb', {
|
||||
axios.put('api/check/kelulusan/pb',{
|
||||
kelulusan: this.selected,
|
||||
mohonid: this.mohonid,
|
||||
amaun_lulus: this.amaunlulus,
|
||||
image: formData
|
||||
|
||||
},config).then(response => {
|
||||
axios.post('api/check/kelulusan/pb',formData,config).then(response => {
|
||||
|
||||
if (response.data === 1) {
|
||||
this.showModal = false;
|
||||
|
||||
@@ -27,7 +27,7 @@ Route::group(['prefix' => 'check'], function () {
|
||||
Route::get('/cawangan', 'App\Http\Controllers\CawanganController@list');
|
||||
|
||||
Route::put('/kelulusan/operasi', 'App\Http\Controllers\KelulusanController@updatekelulusan');
|
||||
Route::put('/kelulusan/pb', 'App\Http\Controllers\KelulusanController@updatePB');
|
||||
Route::post('/kelulusan/pb', 'App\Http\Controllers\KelulusanController@updatePB');
|
||||
|
||||
|
||||
});
|
||||
|
||||