add button report purchase request direct approval
This commit is contained in:
@@ -116,15 +116,24 @@
|
||||
<v-btn
|
||||
v-if="props.item.PurchaseRequestDirectStatus == 'Pending'"
|
||||
small color="black" title="Edit" @click="{}"
|
||||
style="min-width: 25px; height: 25px; margin: 0;"
|
||||
>
|
||||
<v-icon small color="white">edit</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
v-if="['Approved', 'Paid', 'Completed'].includes(props.item.PurchaseRequestDirectStatus)"
|
||||
small color="blue" title="Detail"
|
||||
style="min-width: 25px; height: 25px; margin: 0;"
|
||||
>
|
||||
<v-icon small color="white">visibility</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
v-if="['Approved', 'Paid', 'Completed'].includes(props.item.PurchaseRequestDirectStatus)"
|
||||
small color="primary" title="Cetak PDF" @click="printout(props.item)"
|
||||
style="min-width: 25px; height: 25px; margin: 0;"
|
||||
>
|
||||
<v-icon small color="white">print</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -325,6 +334,16 @@
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo"
|
||||
@close-dialog-info="opendialoginfo = false"></one-dialog-info>
|
||||
</template>
|
||||
|
||||
<!-- dialog print -->
|
||||
<one-dialog-print
|
||||
:title="printtitle"
|
||||
:width="printwidth"
|
||||
:height="600"
|
||||
:status="openprint"
|
||||
:urlprint="urlprint"
|
||||
@close-dialog-print="openprint = false"
|
||||
></one-dialog-print>
|
||||
</v-layout>
|
||||
</div>
|
||||
</template>
|
||||
@@ -349,9 +368,14 @@ module.exports = {
|
||||
"one-dialog-info": httpVueLoader("../../common/oneDialogInfo.vue"),
|
||||
"one-dialog-attachment": httpVueLoader("./formDialogAttachtment.vue"),
|
||||
"one-dialog-edit-req": httpVueLoader("./formEditRequest.vue"),
|
||||
"one-dialog-print": httpVueLoader("../../common/oneDialogPrintX.vue"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlprint: "",
|
||||
printtitle: "",
|
||||
printwidth: "60%",
|
||||
openprint: false,
|
||||
msgAlertDeleteOrReject: "",
|
||||
dialogAlertRejectRequest: false,
|
||||
dialogAlertDeleteDetail: false,
|
||||
@@ -742,6 +766,15 @@ module.exports = {
|
||||
})
|
||||
}
|
||||
this.dialogAlertUnapprove = false;
|
||||
},
|
||||
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_pr_direct_approval/pdf?id=" + val.PurchaseRequestDirectID + "&username=" + username + "&tm=" + tm;
|
||||
this.openprint = true;
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user