258 lines
6.4 KiB
Vue
258 lines
6.4 KiB
Vue
<template>
|
|
<v-layout class="fill-height" column>
|
|
<v-layout row wrap >
|
|
|
|
|
|
|
|
<v-flex xs12 class="right" fill-height pa-1>
|
|
|
|
<v-card class="fill-height" >
|
|
<v-layout row >
|
|
<v-flex >
|
|
|
|
<v-card-text >
|
|
<object style="overflow: hidden;" width="100%" :height="xheight" :data="xurl"></object>
|
|
</v-card-text>
|
|
|
|
<v-divider></v-divider>
|
|
|
|
|
|
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
</v-layout>
|
|
|
|
|
|
|
|
<one-dialog-print :title="printtitle" :width="printwidth" :height="850" :status="openprintnote" :urlprint="urlprintnote" @close-dialog-print="openprintnote = false"></one-dialog-print>
|
|
|
|
</v-layout>
|
|
</template>
|
|
|
|
<style scoped>
|
|
|
|
|
|
span.xtd {
|
|
margin-right:10px;
|
|
}
|
|
.searchbox .v-input.v-text-field .v-input__slot{
|
|
min-height:40px;
|
|
}
|
|
.searchbox .v-btn {
|
|
min-height:40px;
|
|
}
|
|
table.v-table tbody td,table.v-table tbody th {
|
|
height: 40px;
|
|
}
|
|
|
|
table.v-table thead tr {
|
|
height: 40px;
|
|
}
|
|
|
|
.v-messages{
|
|
min-height:0px!important;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
module.exports = {
|
|
components : {
|
|
|
|
'one-dialog-print':httpVueLoader('../../common/oneDialogPrintX.vue')
|
|
},
|
|
mounted() {
|
|
this.$store.dispatch("close/search",{
|
|
startdate:this.xstartdate,
|
|
enddate:this.xenddate,
|
|
search: this.searchnamelab,
|
|
status: this.status.value,
|
|
current_page:1,
|
|
lastidx:0
|
|
})
|
|
},
|
|
methods : {
|
|
|
|
|
|
selectMe(pat) {
|
|
this.$store.commit("close/update_selected_close",pat)
|
|
},
|
|
|
|
async save() {
|
|
await this.$store.dispatch("close/save",{
|
|
pUserID:JSON.parse(localStorage.getItem('user')).M_UserID
|
|
})
|
|
location.reload()
|
|
},
|
|
formatDate (date) {
|
|
if (!date) return null
|
|
|
|
const [year, month, day] = date.split('-')
|
|
return `${day}-${month}-${year}`
|
|
},
|
|
deFormatedDate (date) {
|
|
if (!date) return null
|
|
|
|
const [ day,month, year] = date.split('-')
|
|
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
|
},
|
|
isSelected(p) {
|
|
return p.T_OrderHeaderID == this.$store.state.close.selected_close.T_OrderHeaderID
|
|
},
|
|
searchClose() {
|
|
this.$store.dispatch("close/search",{
|
|
startdate:this.xstartdate,
|
|
enddate:this.xenddate,
|
|
search:this.searchnamelab,
|
|
status: this.status.value,
|
|
current_page:1,
|
|
lastidx:0
|
|
})
|
|
},printControlCard(value){
|
|
this.printwidth = 900
|
|
this.printtitle = ""
|
|
let idx = value.F_PaymentKasirID
|
|
let user = one_user()
|
|
var tm = new Date()
|
|
this.urlprintnote = "/birt/run?__report=report/one/rekap/rpt_b_002.rptdesign&__format=pdf&username="+user.M_UserUsername+"&tm="+tm
|
|
this.$store.commit("close/update_open_print_note",true)
|
|
}
|
|
},
|
|
computed: {
|
|
|
|
xstartdate:{
|
|
get() {
|
|
return this.$store.state.close.start_date
|
|
},
|
|
set(val) {
|
|
this.$store.commit("close/update_start_date",val)
|
|
}
|
|
},
|
|
xenddate:{
|
|
get() {
|
|
return this.$store.state.close.end_date
|
|
},
|
|
set(val) {
|
|
this.$store.commit("close/update_end_date",val)
|
|
}
|
|
},
|
|
searchnamelab:{
|
|
get() {
|
|
return this.$store.state.close.search
|
|
},
|
|
set(val) {
|
|
this.$store.commit("close/update_search",val)
|
|
}
|
|
},
|
|
statuses(){
|
|
return this.$store.state.close.statuses
|
|
},
|
|
status:{
|
|
get() {
|
|
return this.$store.state.close.selected_status
|
|
},
|
|
set(val) {
|
|
this.$store.commit("close/update_selected_status",val)
|
|
}
|
|
},
|
|
openprintnote: {
|
|
get() {
|
|
return this.$store.state.close.open_print_note
|
|
},
|
|
set(val) {
|
|
this.$store.commit("close/update_open_print_note",false)
|
|
}
|
|
},
|
|
selpat(){
|
|
return this.$store.state.close.selected_close
|
|
},
|
|
startDateFormatted () {
|
|
return this.formatDate(this.xstartdate)
|
|
},
|
|
endDateFormatted () {
|
|
return this.formatDate(this.xenddate)
|
|
},
|
|
isLoading() {
|
|
return this.$store.state.close.search_status == 1
|
|
},
|
|
closes() {
|
|
return this.$store.state.close.closes
|
|
},
|
|
|
|
curr_page: {
|
|
get() {
|
|
return this.$store.state.close.current_page
|
|
},
|
|
set(val) {
|
|
this.$store.commit("close/update_current_page",val)
|
|
this.$store.dispatch("close/search",{
|
|
startdate:this.xstartdate,
|
|
enddate:this.xenddate,
|
|
search: this.searchnamelab,
|
|
status: this.status.value,
|
|
current_page:val,
|
|
lastidx:0
|
|
})
|
|
}
|
|
},
|
|
xtotal_page: {
|
|
get() {
|
|
return this.$store.state.close.total_page
|
|
},
|
|
set(val) {
|
|
this.$store.commit("close/update_total_page",val)
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
xheight:600,
|
|
xurl: '/birt/run?__report=report/one/rekap/rpt_b_002.rptdesign&__format=pdf&username='+JSON.parse(localStorage.getItem('user')).M_UserUsername+'',
|
|
items: [],
|
|
menustartdate:false,
|
|
menuenddate:false,
|
|
dialog:false,
|
|
urlprintnote:'',
|
|
printtitle:'',
|
|
printwidth:'90%',
|
|
headers: [
|
|
{
|
|
text: "TANGGAL",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "mr",
|
|
width: "15%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "NO TRX",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "lab",
|
|
width: "10%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
|
|
{
|
|
text: "NAMA FO",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "name",
|
|
width: "15%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "ACTION",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "name",
|
|
width: "10%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
}
|
|
],
|
|
}
|
|
}
|
|
}
|
|
</script>
|