This commit is contained in:
hafifierahman
2022-04-04 15:36:04 +08:00
parent 039739dd1d
commit 0fc699b7f5
11 changed files with 40 additions and 28 deletions
+12 -8
View File
@@ -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);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 943 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 943 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

+19 -10
View File
@@ -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>
+8 -9
View File
@@ -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;
+1 -1
View File
@@ -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');
});