add button report pr non persediaan
This commit is contained in:
@@ -111,7 +111,7 @@
|
||||
{{ props.item.PurchaseRequestDirectStatus }}
|
||||
</v-chip>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<td class="text-xs-center pa-2" style="white-space: nowrap;">
|
||||
<div v-if="props.item.PurchaseRequestDirectStatus != 'Draft'">
|
||||
<v-btn
|
||||
v-if="props.item.PurchaseRequestDirectStatus == 'Pending'"
|
||||
@@ -400,7 +400,7 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
text: "TOTAL", align: "left", sortable: false,
|
||||
value: "description", width: "20%", class: "blue lighten-3 white--text",
|
||||
value: "description", width: "15%", class: "blue lighten-3 white--text",
|
||||
},
|
||||
{
|
||||
text: "STATUS", align: "center", sortable: false,
|
||||
@@ -408,7 +408,7 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
text: "AKSI", align: "center", sortable: false,
|
||||
value: "action", width: "10%", class: "blue lighten-3 white--text",
|
||||
value: "action", width: "15%", class: "blue lighten-3 white--text",
|
||||
},
|
||||
],
|
||||
detail_headers: [
|
||||
|
||||
@@ -204,6 +204,7 @@
|
||||
>
|
||||
<td
|
||||
class="text-xs-center pa-2"
|
||||
style="white-space: nowrap;"
|
||||
v-bind:class="{
|
||||
'amber lighten-4': isSelected(props.item),
|
||||
}"
|
||||
@@ -229,6 +230,7 @@
|
||||
<template v-else>
|
||||
<td
|
||||
class="text-xs-center pa-2"
|
||||
style="white-space: nowrap;"
|
||||
v-bind:class="{
|
||||
'amber lighten-4': isSelected(props.item),
|
||||
}"
|
||||
|
||||
@@ -101,32 +101,78 @@
|
||||
</td>
|
||||
|
||||
<template v-if="props.item.prStatus == 'Draft'">
|
||||
<td class="text-xs-center pa-2 pr-5" v-bind:class="{
|
||||
<td class="text-xs-center pa-2" style="white-space: nowrap;" v-bind:class="{
|
||||
'amber lighten-4': isSelected(props.item),
|
||||
}">
|
||||
<v-icon small @click="editRequest(props.item)">edit</v-icon>
|
||||
<v-icon small @click="deleteRequest(props.item)">delete</v-icon>
|
||||
<v-btn
|
||||
style="min-width: 25px; height: 25px; margin: 0;"
|
||||
@click="editRequest(props.item)"
|
||||
small title="Edit"
|
||||
color="black"
|
||||
>
|
||||
<v-icon small color="white">edit</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
style="min-width: 25px; height: 25px; margin: 0;"
|
||||
@click="deleteRequest(props.item)"
|
||||
small title="Hapus"
|
||||
color="red"
|
||||
>
|
||||
<v-icon small color="white">delete</v-icon>
|
||||
</v-btn>
|
||||
</td>
|
||||
</template>
|
||||
<template v-else-if="props.item.prStatus == 'Pending'">
|
||||
<td class="text-xs-center pa-2 pr-5" v-bind:class="{
|
||||
<td class="text-xs-center pa-2" style="white-space: nowrap;" v-bind:class="{
|
||||
'amber lighten-4': isSelected(props.item),
|
||||
}">
|
||||
<v-icon small @click="previewRequest(props.item)">receipt</v-icon>
|
||||
<v-btn
|
||||
style="min-width: 25px; height: 25px; margin: 0;"
|
||||
@click="previewRequest(props.item)"
|
||||
small title="Preview Request"
|
||||
color="blue"
|
||||
>
|
||||
<v-icon small color="white">receipt</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
style="min-width: 25px; height: 25px; margin: 0;"
|
||||
@click="printout(props.item)"
|
||||
small title="Cetak PDF"
|
||||
color="primary"
|
||||
>
|
||||
<v-icon small color="white">print</v-icon>
|
||||
</v-btn>
|
||||
</td>
|
||||
</template>
|
||||
<template v-else-if="hasHandover(props.item.itemHandedOver)">
|
||||
<td class="text-xs-center pa-2 pr-5"
|
||||
<td class="text-xs-center pa-2" style="white-space: nowrap;"
|
||||
v-bind:class="{ 'amber lighten-4': isSelected(props.item), }">
|
||||
<v-btn color="success" prepend-icon="mdi-check-circle"
|
||||
@click="confirmHandover(props.item)">
|
||||
Konfirmasi Terima
|
||||
</v-btn>
|
||||
<v-btn
|
||||
style="min-width: 25px; height: 25px; margin: 0;"
|
||||
@click="printout(props.item)"
|
||||
small title="Cetak PDF"
|
||||
color="primary"
|
||||
>
|
||||
<v-icon small color="white">print</v-icon>
|
||||
</v-btn>
|
||||
</td>
|
||||
</template>
|
||||
<template v-else>
|
||||
<td class="text-xs-center pa-2 pr-5"
|
||||
v-bind:class="{ 'amber lighten-4': isSelected(props.item), }"></td>
|
||||
<td class="text-xs-center pa-2" style="white-space: nowrap;"
|
||||
v-bind:class="{ 'amber lighten-4': isSelected(props.item), }">
|
||||
<v-btn
|
||||
style="min-width: 25px; height: 25px; margin: 0;"
|
||||
@click="printout(props.item)"
|
||||
small title="Cetak PDF"
|
||||
color="primary"
|
||||
>
|
||||
<v-icon small color="white">print</v-icon>
|
||||
</v-btn>
|
||||
</td>
|
||||
</template>
|
||||
</template>
|
||||
</v-data-table>
|
||||
@@ -151,6 +197,15 @@
|
||||
<one-dialog-alert :status="dialogAlertDeleteDetail" :msg="msgAlertDeleteRequest"
|
||||
@forget-dialog-alert="dialogAlertDeleteDetail = false"
|
||||
@close-dialog-alert="closeAndDeleteDetail()"></one-dialog-alert>
|
||||
|
||||
<one-dialog-print
|
||||
:title="printtitle"
|
||||
:width="printwidth"
|
||||
:height="600"
|
||||
:status="openprint"
|
||||
:urlprint="urlprint"
|
||||
@close-dialog-print="openprint = false"
|
||||
></one-dialog-print>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -184,9 +239,14 @@ module.exports = {
|
||||
"dialog-confirm-handover": httpVueLoader("./dialogConfirmHandover.vue"),
|
||||
"one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"),
|
||||
"one-dialog-error": httpVueLoader("../../common/oneDialogError.vue"),
|
||||
"one-dialog-print": httpVueLoader("../../common/oneDialogPrintX.vue"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlprint: "",
|
||||
printtitle: "",
|
||||
printwidth: "60%",
|
||||
openprint: false,
|
||||
msgAlertDeleteRequest: "",
|
||||
dialogAlertDeleteRequest: false,
|
||||
dialogAlertDeleteDetail: false,
|
||||
@@ -225,10 +285,10 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "left",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "action",
|
||||
width: "5%",
|
||||
width: "15%",
|
||||
class: "blue lighten-3 white--text",
|
||||
},
|
||||
],
|
||||
@@ -692,6 +752,15 @@ module.exports = {
|
||||
this.$store.commit("requester/updateSelectedMainTable", item);
|
||||
this.$store.commit("requester/updateDialogConfirmHandover", true);
|
||||
},
|
||||
printout(val) {
|
||||
this.printwidth = "60%";
|
||||
this.printtitle = "";
|
||||
let user = one_user();
|
||||
let username = user && user.M_StaffName ? user.M_StaffName : "";
|
||||
let tm = Date.now();
|
||||
this.urlprint = BASE_URL + "/one-api/report/rpt_stock_request_np/pdf?id=" + val.prId + "&username=" + username + "&tm=" + tm;
|
||||
this.openprint = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -211,7 +211,8 @@
|
||||
v-if="props.item.prStatus == 'Draft'"
|
||||
>
|
||||
<td
|
||||
class="text-xs-center pa-2 pr-5"
|
||||
class="text-xs-center pa-2"
|
||||
style="white-space: nowrap;"
|
||||
v-bind:class="{
|
||||
'amber lighten-4': isSelected(props.item),
|
||||
}"
|
||||
@@ -236,7 +237,8 @@
|
||||
</template>
|
||||
<template v-else>
|
||||
<td
|
||||
class="text-xs-center pa-2 pr-5"
|
||||
class="text-xs-center pa-2"
|
||||
style="white-space: nowrap;"
|
||||
v-bind:class="{
|
||||
'amber lighten-4': isSelected(props.item),
|
||||
}"
|
||||
@@ -380,7 +382,7 @@ module.exports = {
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "action",
|
||||
width: "10%",
|
||||
width: "15%",
|
||||
class: "blue lighten-3 white--text",
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user