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