Initial import

This commit is contained in:
sas.fajri
2026-05-25 20:01:37 +07:00
commit 710d7c1b97
10371 changed files with 2381698 additions and 0 deletions

View File

@@ -0,0 +1,785 @@
<template>
<v-layout class="fill-height" column>
<v-dialog v-model="dialogsuccess" persistent max-width="290">
<v-card>
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
<v-card-text>
{{msgsuccess}}
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<template>
<v-layout row justify-center>
<v-dialog v-model="dialogreqrerun" persistent max-width="750px">
<v-card>
<v-card-title>
<span class="headline">FORM PERMINTAAN RUNNING ULANG</span>
</v-card-title>
<v-card-text class="pt-0 pb-0">
<v-form ref="formreqrerunreqrerun" v-model="validreqrerun" lazy-validation>
<v-layout wrap>
<!-- <v-flex xs12 pa-2>
<v-text-field readonly label="Tanggal Order" placeholder="dd-mm-yyyy" mask="##-##-####" v-model="xdate"></v-text-field>
</v-flex> -->
<v-flex xs12>
<v-layout wrap>
<v-flex xs12 pa-2>
<v-menu class="xs3 pr-2" v-model="menufilterdateschedule" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition"
offset-y full-width max-width="290px" min-width="290px">
<template v-slot:activator="{ on }">
<v-text-field class="mt-1" v-model="filterComputedDateFormattedSchedule" label="Tanggal Order" readonly v-on="on" @blur="date = deFormatedDateSchedule(filterComputedDateFormattedSchedule)"></v-text-field>
</template>
<v-date-picker v-model="xscheduledate" no-title @input="menufilterdateschedule = false"></v-date-picker>
</v-menu>
</v-flex>
<!-- <v-flex xs6 pa-2>
<v-select :items="timererun" item-text="name" return-object style="font-size:14px" v-model="selected_timererun" label="Jam Running"
readonly></v-select>
</v-flex>-->
</v-layout>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" flat @click="updateDialogFormReRun()">Tutup</v-btn>
<v-btn color="blue darken-1" flat @click="saveFormReRun()">Simpan</v-btn>
</v-card-actions>
</v-form>
</v-card>
</v-dialog>
</v-layout>
</template>
<v-card class="mb-2 pa-2 searchbox">
<v-layout>
<v-menu class="xs3 pr-2" v-model="menufilterdatestart" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition"
offset-y full-width max-width="290px" min-width="290px">
<template v-slot:activator="{ on }">
<v-text-field class="mt-1" v-model="filterComputedDateFormattedStart" label="Tanggal" outline readonly v-on="on" @blur="date = deFormatedDate(filterComputedDateFormattedStart)"></v-text-field>
</template>
<v-date-picker v-model="xstartdate" no-title @input="menufilterdatestart = false"></v-date-picker>
</v-menu>
<v-select class="xs3 ma-1 mini-select" :items="filter_branch" item-text="name" return-object style="font-size:14px" v-model="selected_filter_branch"
label="Cabang" outline hide-details></v-select>
<v-select class="xs3 ma-1 mini-select" :items="filter_status" item-text="name" return-object style="font-size:14px" v-model="selected_filter_status"
label="Status" outline hide-details></v-select>
<span @click="setNewReqReRun" class="icon-medium-fill-base xs1 white--text primary ml-1 icon-add"></span>
<!-- <span v-if="btn_hide === false" title="Kirim" @click="receive" class="icon-medium-fill-base xs1 white--text warning"><v-icon large dark>move_to_inbox</v-icon></span> -->
</v-layout>
</v-card>
<v-card>
<v-layout align-center row>
<v-flex xs12 pl-2 style="max-height:610px;overflow-y:scroll" pr-2 pt-2 pb-2>
<v-data-table :headers="headers" :items="reqreruns" :loading="isLoading" hide-actions class="elevation-1">
<template v-slot:headers="props">
<tr>
<!-- <th class="text-xs-left blue-grey white--text">
<v-checkbox style="padding-top:0;margin-top:0" hide-details color="white" :indeterminate="indeterminatex" @change="changeCbxAll(bar_chx_all)"
v-model="bar_chx_all"></v-checkbox>
</th> -->
<th v-for="header in props.headers" :key="header.text" :class="header.class" :width="header.width">
{{ header.text }}
</th>
</tr>
</template>
<template v-slot:items="props">
<!-- <td style="width:5px" class="text-xs-left">
<v-checkbox style="padding-top:0;margin-top:0" color="blue-grey" hide-details v-model="props.item.chex" @change="checkTop()"></v-checkbox>
</td> -->
<td class="text-xs-left pa-2">{{ props.item.dateorder}}</td>
<td class="text-xs-left pa-2">{{ props.item.branchname}}</td>
<td class="text-xs-left pa-2">{{ props.item.daterunning}}</td>
<td class="text-xs-left pa-2">{{ props.item.status}}</td>
<td class="text-xs-left pa-2">{{ props.item.pengulangan}}</td>
<td class="text-xs-left pa-2">{{ props.item.staffname}}</td>
</template>
</v-data-table>
</v-flex>
</v-layout>
</v-card>
<template>
<v-dialog v-model="dialog_alert_verif" max-width="600px">
<v-card>
<v-card-title class="headline red lighten-2 pt-2 pb-2" primary-title>
Peringatan !
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row>
<v-flex xs12 d-flex>
<v-layout row>
<v-flex pb-1 xs12>
<v-layout row>
<v-flex pt-2 pr-2 xs12>
{{msgalertverif}}
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="primary" flat @click="close_alert_verif()">
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()"
@close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
<one-dialog-print-verify :title="printtitleverify" :width="printwidthverify" :height="500" :status="openprintverify" :urlprint="urlprintverify"
@close-dialog-print="closePrintVerify"></one-dialog-print-verify>
</v-layout>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot {
min-height: 60px;
}
.searchbox .v-btn {
min-height: 60px;
}
table.v-table tbody td,
table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
</style>
<script>
module.exports = {
components: {
'one-dialog-info': httpVueLoader('../../../common/oneDialogInfo.vue'),
'one-dialog-alert': httpVueLoader('../../../common/oneDialogAlert.vue'),
'one-x-check': httpVueLoader('../../../common/onexcheck.vue'),
'one-dialog-print-verify': httpVueLoader('../../../common/oneDialogPrintX.vue')
},
mounted() {
this.$store.dispatch("reqrerun/getmaxtimererun")
this.$store.dispatch("reqrerun/getstationstatus", {
nolab: this.nolab,
date: this.xstartdate,
branchid: 0,
staffid: 0,
typeid: 0,
statusid: 0,
lastid: -1
})
this.$store.dispatch("reqrerun/search")
},
methods: {
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')}`
},
formatDateSchedule(date) {
if (!date) return null
const [year, month, day] = date.split('-')
return `${day}-${month}-${year}`
},
deFormatedDateSchedule(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_BarcodeLabID == this.$store.state.reqrerun.selected_patient.T_BarcodeLabID
},
searchPatient() {
this.$store.dispatch("reqrerun/search", {
nolab: this.nolab,
date: this.xstartdate,
branchid: this.selected_filter_branch.id,
staffid: this.selected_filter_staff.id,
typeid: this.selected_filter_type.id,
statusid: this.selected_filter_status.id,
lastid: -1
})
},
selectMe(pat) {
if (this.$store.state.reqrerun.no_save == 0) {
var reqreruns = this.$store.state.reqrerun.reqreruns
this.$store.commit("reqrerun/update_selected_patient", pat)
var idx = _.findIndex(reqreruns, function (o) {
return o.T_BarcodeLabID == pat.T_BarcodeLabID
})
this.$store.commit("reqrerun/update_last_id", idx)
} else {
this.$store.commit("reqrerun/update_open_alert_confirmation", true)
}
},
close_alert_verif() {
this.$store.commit("reqrerun/update_dialog_alert_verif", false)
this.btn_hide = false
},
closeAlertConfirmation() {
this.$store.commit("reqrerun/update_open_alert_confirmation", false)
},
forgetAlertConfirmation() {
this.$store.commit("reqrerun/update_no_save", 0)
this.$store.commit("reqrerun/update_open_alert_confirmation", false)
},
updateAlert_success(val) {
this.$store.commit("reqrerun/update_alert_success", val)
},
setNewPatient() {
//this.$store.commit("reqrerun/update_selected_Patient",{})
},
opendialog_reqrerun(value) {
//console.log(value)
var trx = this.$store.state.reqrerun.reqreruns
var idx = _.findIndex(trx, function (o) {
return o.T_BarcodeLabBarcode == value.T_BarcodeLabBarcode
})
if (value.status === 'V' && value.requirement_status === 'Y') {
} else {
this.$store.commit("reqrerun/update_selected_patient", value)
trx[idx].requirement_status = 'N'
//console.log(trx[idx].requirements)
this.$store.commit("reqrerun/update_requirements", trx[idx].requirements)
this.$store.commit("reqrerun/update_dialog_reqrerun", true)
}
},
checkReq(val, idx) {
var xrequirements = this.requirements
if (xrequirements[idx].status === 'D') {
xrequirements[idx].chex = val
this.$store.commit("reqrerun/update_requirements", xrequirements)
}
},
updateDialogReRun() {
this.$store.commit("reqrerun/update_dialog_form_reqrerun", false)
},
updateDialogFormReRun() {
this.$store.commit("reqrerun/update_dialog_form_reqrerun", false)
},
setNewReqReRun(val) {
this.xid = 0
this.xdate = moment(new Date()).format('DD-MM-YYYY')
this.xscheduledate = moment(new Date()).format('YYYY-MM-DD')
this.$store.commit("reqrerun/update_dialog_form_reqrerun", true)
},
saveFormReRun() {
var n = moment(new Date()).format("HH:mm:ss")
var m = this.maxtimererun.name
if (n > m) {
//alert('testing')
var startdate = this.xscheduledate
var new_date = moment(startdate, "YYYY-MM-DD").add(1, 'days')
var scheduledate = moment(new_date).format('YYYY-MM-DD')
} else {
var scheduledate = this.xscheduledate
}
this.$store.dispatch("reqrerun/save", {
xid: this.xid,
orderdate: this.xscheduledate,
runningdate: scheduledate,
})
},
confirmRequirement(value) {
var branchs = this.$store.state.reqrerun.reqreruns
var idx = _.findIndex(branchs, function (o) {
return o.T_BarcodeLabID == value.T_BarcodeLabID
})
if (value.status === 'D') {
branchs[idx].requirement_status = 'Y'
this.$store.commit("reqrerun/update_reqreruns", branchs)
branchs[idx].requirements.forEach((el) => {
el.chex = "N"
})
}
},
verify(value) {
console.log(value)
var goaction = true
if (value.requirement_status === 'N') {
var req_check = _.filter(value.requirements, function (o) {
return o.chex === 'Y'
})
if (req_check.length === 0) {
goaction = false
}
}
if (value.status === 'D' && value.requirement_status !== 'X' && goaction) {
console.log("in verify")
this.$store.commit("reqrerun/update_act", 'verify')
this.$store.commit("reqrerun/update_selected_patient", value)
this.closeDialogAction()
} else {
//console.log('oeey')
if (value.status === 'D') {
this.$store.commit("reqrerun/update_msg_info",
"Mobil batmen ngeluarin api, ada requirement mohon dilengkapi")
this.$store.commit("reqrerun/update_open_dialog_info", true)
}
}
},
receive() {
this.$store.commit("reqrerun/update_act", 'receive')
this.closeDialogAction()
},
reject() {
this.$store.commit("reqrerun/update_act", 'reject')
this.closeDialogAction()
},
cancel() {
this.$store.commit("reqrerun/update_act", 'cancel')
this.closeDialogAction()
},
closeDialogAction() {
console.log("closedialogaction")
this.btn_hide = true
var act = this.$store.state.reqrerun.act
var trx = this.$store.state.reqrerun.selected_patient
var reqreruns = this.$store.state.reqrerun.reqreruns
this.$store.dispatch("reqrerun/doaction", {
act: act,
detail: trx,
reqreruns: reqreruns,
lastid: -1
})
},
closeDialogSuccess() {
let arrPatient = this.$store.state.reqrerun.reqreruns
var idx = _.findIndex(arrPatient, item => item.M_PatientID === this.$store.state.reqrerun.last_id)
var xcur_page = 1
// if(idx !== -1)
// xcur_page = this.$store.state.reqrerun.current_page
this.$store.dispatch("reqrerun/search", {
name: this.name,
nolab: this.nolab,
stationid: this.xselectedstation.id,
statusid: this.xselectedstatus.id,
// current_page:xcur_page,
lastid: idx
})
this.$store.commit("reqrerun/update_dialog_success", false)
},
closeDialogInfo() {
this.$store.commit("reqrerun/update_open_dialog_info", false)
},
checkTop() {
var barcodes = this.reqreruns
var selected = _.filter(barcodes, function (o) {
return o.chex;
})
this.bar_chx_all = false
this.indeterminatex = false
if (selected.length > 0) {
this.bar_chx_all = true
this.indeterminatex = false
}
if (selected.length > 0) {
this.bar_chx_all = false
this.indeterminatex = true
}
this.$store.commit("reqrerun/update_selected_patient", selected)
console.log(selected)
},
changeCbxAll(value) {
var arr = this.reqreruns
this.indeterminatex = false
arr.forEach((el) => {
el.chex = value
})
var selected = _.filter(arr, function (o) {
return o.chex;
})
this.$store.commit("reqrerun/update_selected_patient", selected)
},
changeFilter(e) {
if (e.key == 'Tab') {
////////this.searchPatient()
}
},
doPrintVerify(val) {
console.log('doprint')
this.printwidthverify = 1028
this.printtitleverify = ""
let user = one_user()
var id = val.reqrerunid
var d = new Date();
var n = d.getTime()
var rptname = 'price_reqrerun'
var formatrpt = this.formatreport
this.urlprintverify = "/birt/run?__report=report/one/rekap/" + rptname + ".rptdesign&__format=" +
formatrpt + "&PID=" + id + "&username=" + user.M_UserUsername + "&tm=" + n
this.openprintverify = true
},
closePrintVerify() {
this.openprintverify = false
}
},
computed: {
filter_branch() {
return this.$store.state.reqrerun.filter_branch
},
dialogreqrerun() {
return this.$store.state.reqrerun.dialog_form_reqrerun
},
selected_filter_branch: {
get() {
return this.$store.state.reqrerun.selected_filter_branch
},
set(val) {
//console.log("adsda")
this.$store.commit("reqrerun/update_selected_filter_branch", val)
this.searchPatient()
}
},
filter_staff() {
return this.$store.state.reqrerun.filter_staff
},
selected_filter_staff: {
get() {
return this.$store.state.reqrerun.selected_filter_staff
},
set(val) {
//console.log("adsda")
this.$store.commit("reqrerun/update_selected_filter_staff", val)
this.searchPatient()
}
},
filter_type() {
return this.$store.state.reqrerun.filter_type
},
selected_filter_type: {
get() {
return this.$store.state.reqrerun.selected_filter_type
},
set(val) {
//console.log("adsda")
this.$store.commit("reqrerun/update_selected_filter_type", val)
this.searchPatient()
}
},
filter_status() {
return this.$store.state.reqrerun.filter_status
},
selected_filter_status: {
get() {
return this.$store.state.reqrerun.selected_filter_status
},
set(val) {
//console.log("adsda")
this.$store.commit("reqrerun/update_selected_filter_status", val)
this.searchPatient()
}
},
timererun() {
return this.$store.state.reqrerun.timererun
},
selected_timererun: {
get() {
return this.$store.state.reqrerun.selected_timererun
},
set(val) {
//console.log("adsda")
this.$store.commit("reqrerun/update_selected_timererun", val)
}
},
maxtimererun: {
get() {
return this.$store.state.reqrerun.maxtimererun
},
set(val) {
//console.log("adsda")
this.$store.commit("reqrerun/update_maxtimererun", val)
}
},
filterComputedDateFormattedStart() {
return this.formatDate(this.xstartdate)
},
filterComputedDateFormattedSchedule() {
return this.formatDateSchedule(this.xscheduledate)
},
xstartdate: {
get() {
return this.$store.state.reqrerun.startdate
},
set(val) {
this.$store.commit("reqrerun/update_startdate", val)
console.log(val)
this.searchPatient()
}
},
bar_chx_all: {
get() {
return this.$store.state.reqrerun.bar_chx_all
},
set(val) {
this.$store.commit("reqrerun/update_bar_chx_all", val)
}
},
indeterminatex: {
get() {
return this.$store.state.reqrerun.indeterminatex
},
set(val) {
this.$store.commit("reqrerun/update_indeterminatex", val)
}
},
btn_hide: {
get() {
return this.$store.state.reqrerun.btn_hide
},
set(val) {
this.$store.commit("reqrerun/update_btn_hide", val)
}
},
dialogsuccess: {
get() {
return this.$store.state.reqrerun.dialog_success
},
set(val) {
this.$store.commit("reqrerun/update_dialog_success", val)
}
},
msgsuccess() {
return this.$store.state.reqrerun.msg_success
},
snackbar: {
get() {
return this.$store.state.reqrerun.alert_success
},
set(val) {
this.$store.commit("reqrerun/update_alert_success", val)
}
},
isLoading() {
return this.$store.state.reqrerun.search_status == 1
},
xstations() {
return this.$store.state.reqrerun.stations
},
xselectedstation: {
get() {
return this.$store.state.reqrerun.selected_station
},
set(val) {
this.$store.commit("reqrerun/update_selected_station", val)
this.searchPatient()
}
},
xstatuses() {
return this.$store.state.reqrerun.statuses
},
xselectedstatus: {
get() {
return this.$store.state.reqrerun.selected_status
},
set(val) {
this.$store.commit("reqrerun/update_selected_status", val)
////////this.searchPatient()
}
},
reqreruns() {
return this.$store.state.reqrerun.reqreruns
},
openalertconfirmation: {
get() {
return this.$store.state.reqrerun.open_alert_confirmation
},
set(val) {
this.$store.commit("reqrerun/update_open_alert_confirmation", val)
}
},
curr_page: {
get() {
return this.$store.state.reqrerun.current_page
},
set(val) {
this.$store.commit("reqrerun/update_current_page", val)
this.$store.dispatch("reqrerun/search", {
name: this.name,
nolab: this.nolab,
stationid: this.xselectedstation.id,
statusid: this.xselectedstatus.id,
current_page: val,
lastid: idx
})
}
},
xtotal_page: {
get() {
return this.$store.state.reqrerun.total_page
},
set(val) {
this.$store.commit("reqrerun/update_total_page", val)
}
},
opendialoginfo: {
get() {
return this.$store.state.reqrerun.open_dialog_info
},
set(val) {
this.$store.commit("reqrerun/update_open_dialog_info", false)
}
},
msginfo() {
return this.$store.state.reqrerun.msg_info
},
xdate: {
get() {
return this.$store.state.reqrerun.xdate
},
set(val) {
this.$store.commit("reqrerun/update_xdate", val)
}
},
xscheduledate: {
get() {
return this.$store.state.reqrerun.xscheduledate
},
set(val) {
this.$store.commit("reqrerun/update_xscheduledate", val)
this.$store.dispatch("reqrerun/getdatetimererun", {
date: val
})
}
},
xscheduletime: {
get() {
return this.$store.state.reqrerun.xscheduletime
},
set(val) {
this.$store.commit("reqrerun/update_xscheduletime", val)
}
},
nolab: {
get() {
return this.$store.state.reqrerun.nolab
},
set(val) {
this.$store.commit("reqrerun/update_nolab", val)
//////////this.searchPatient()
}
},
requirements: {
get() {
return this.$store.state.reqrerun.requirements
},
set(val) {
this.$store.commit("reqrerun/update_requirements", val)
}
},
dialog_alert_verif() {
return this.$store.state.reqrerun.dialog_alert_verif
},
msgalertverif() {
return this.$store.state.reqrerun.msgalertverif
}
},
data() {
return {
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
items: [],
on: false,
page: 1,
xcode: '',
openprintverify: false,
urlprintverify: '',
printtitleverify: '',
printwidthverify: 600,
formatreport: 'pdf',
menufilterdatestart: false,
menufilterdateschedule: false,
validreqrerun: false,
headers: [{
text: "TANGGAL ORDER",
align: "left",
sortable: false,
value: "mr",
width: "15%",
class: "text-xs-left pa-2 blue-grey white--text"
},
{
text: "CABANG",
align: "left",
sortable: false,
value: "mr",
width: "15%",
class: "text-xs-left pa-2 blue-grey white--text"
},
{
text: "TANGGAL RUNNING",
align: "left",
sortable: false,
value: "mr",
width: "15%",
class: "text-xs-left pa-2 blue-grey white--text"
},
{
text: "STATUS",
align: "left",
sortable: false,
value: "lab",
width: "15%",
class: "text-xs-left pa-2 blue-grey white--text"
},
{
text: "PENGULANGAN",
align: "left",
sortable: false,
value: "lab",
width: "15%",
class: "text-xs-left pa-2 blue-grey white--text"
},
{
text: "STAFF",
align: "left",
sortable: false,
value: "lab",
width: "15%",
class: "text-xs-left pa-2 blue-grey white--text"
}
]
};
}
}
</script>