Flatten nested repos
This commit is contained in:
1178
test/vuex/one-mcu-screening/components/oneSampleStorageForm.vue
Normal file
1178
test/vuex/one-mcu-screening/components/oneSampleStorageForm.vue
Normal file
File diff suppressed because it is too large
Load Diff
579
test/vuex/one-mcu-screening/components/oneSampleStorageList.vue
Normal file
579
test/vuex/one-mcu-screening/components/oneSampleStorageList.vue
Normal file
@@ -0,0 +1,579 @@
|
||||
<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>
|
||||
<v-dialog v-model="dialogauthorize" persistent max-width="450">
|
||||
<v-card class="align-center justify-center">
|
||||
<v-card-title primary-title dark color="warning" class="warning white--text">PERHATIAN !</v-card-title>
|
||||
<v-card-text>
|
||||
<p>Maaf ... yang bisa diupload hanya yang sudah disampling</p>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn color="red darken-1" flat @click="dialogauthorize = false">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card class="mb-1 pa-1">
|
||||
<v-layout row>
|
||||
<v-flex xs7>
|
||||
<v-layout>
|
||||
<v-text-field class="flex xs4 ma-1"
|
||||
label="Cari ..."
|
||||
outline
|
||||
hide-details
|
||||
v-model="search"
|
||||
></v-text-field>
|
||||
<span @click="searchs" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex xs5 class="text-xs-right">
|
||||
<v-btn @click="printRekap()" dark color="grey">PRINT</v-btn>
|
||||
<v-btn @click="downloaddataimage()" dark color="red">DOWNLOAD FOTO</v-btn>
|
||||
<!-- <v-btn @click="downloaddata()" color="info">DOWNLOAD</v-btn> -->
|
||||
<v-btn @click="downloaddata_v2()" color="info">DOWNLOAD V2</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xtransactions"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-center pa-2" >{{ props.item.labnumber}}</td>
|
||||
<td class="text-xs-left pa-2" >{{ props.item.patient_fullname}}</td>
|
||||
<td class="text-xs-left pa-2" >
|
||||
<v-flex xs12>
|
||||
<v-layout wrap>
|
||||
<v-flex ma-1 v-for="sample in props.item.sampletypes" xs3>
|
||||
<v-card style="cursor:pointer" @click="screening(sample)" dark :color="getcolor(sample.status)" class="pa-1">
|
||||
<p class="mb-0">{{sample.samplename}}</p>
|
||||
<p class="mb-0">{{sample.barcode}}</p>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-snackbar
|
||||
v-model="snackbar.value"
|
||||
:timeout="snackbar.timeout"
|
||||
>
|
||||
{{ snackbar.text }}
|
||||
<v-btn
|
||||
color="blue"
|
||||
text
|
||||
@click="snackbar = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()" @close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
|
||||
<one-dialog-print :title="printtitle" :width="printwidth" :height="700" :status="openprintout" :urlprint="urlprintnote" @close-dialog-print="openprintout = false"></one-dialog-print>
|
||||
</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;
|
||||
}
|
||||
|
||||
.iceland-number{
|
||||
font-family: 'Iceland', cursive;
|
||||
font-size:20px;
|
||||
font-weight:400;
|
||||
margin-left:3px;
|
||||
margin-right:3px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
|
||||
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue'),
|
||||
'one-dialog-print':httpVueLoader('../../common/oneDialogPrintX.vue')
|
||||
},
|
||||
mounted() {
|
||||
var prm = {}
|
||||
prm.search = this.search
|
||||
prm.current_page = 1
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
search:this.search,
|
||||
current_page:1,
|
||||
mouid:this.xselectedfilterstatus.id,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
methods : {
|
||||
downloaddataimage(){
|
||||
location.replace("/one-api/tools/icopy/getimage")
|
||||
},
|
||||
downloaddata(){
|
||||
location.replace("/one-api/tools/ucopy/db")
|
||||
},
|
||||
downloaddata_v2(){
|
||||
location.replace("/one-api/tools/ucopy_v2/db")
|
||||
},
|
||||
screening(value){
|
||||
if(value.status === 'Y'){
|
||||
var prm = value
|
||||
prm.search = this.search,
|
||||
prm.current_page = 1
|
||||
prm.mouid = this.xselectedfilterstatus.id,
|
||||
prm.lastid = -1
|
||||
this.$store.dispatch("samplestorage/screening",prm)
|
||||
}
|
||||
else{
|
||||
if(value.status === 'X')
|
||||
this.dialogauthorize = true
|
||||
}
|
||||
},
|
||||
getcolor(status){
|
||||
var rt = 'black'
|
||||
if(status === 'Y'){
|
||||
rt = 'teal'
|
||||
}
|
||||
if(status === 'V'){
|
||||
rt = 'info'
|
||||
}
|
||||
return rt
|
||||
},
|
||||
searchs(){
|
||||
this.curr_page = 1
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
search:this.search,
|
||||
current_page:1,
|
||||
mouid:this.xselectedfilterstatus.id,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
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.uniqid == this.$store.state.samplestorage.selected_transaction.uniqid
|
||||
},
|
||||
searchTransaction() {
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
selectMe(trx) {
|
||||
if(this.$store.state.samplestorage.no_save == 0 ){
|
||||
console.log(trx)
|
||||
this.$store.commit("samplestorage/update_selected_transaction",trx)
|
||||
this.$store.commit("samplestorage/update_act",'edit')
|
||||
this.$store.commit("form/update_transaction_number",trx.trx_number)
|
||||
this.$store.commit("form/update_transaction_date",trx.xdate)
|
||||
this.$store.commit("form/update_transaction_time",trx.xtime)
|
||||
this.$store.commit("form/update_sample_weight",trx.trx_sampleweight)
|
||||
this.$store.commit("form/update_staffs",[{M_StaffID:trx.trx_staffid,M_StaffName:trx.trx_staffname}])
|
||||
this.$store.commit("form/update_selected_staff",{M_StaffID:trx.trx_staffid,M_StaffName:trx.trx_staffname})
|
||||
this.$store.commit("form/update_transaction_note",trx.trx_note)
|
||||
this.$store.commit("form/update_detailnonsamples",trx.detailnonsamples)
|
||||
this.$store.commit("form/update_details",trx.details)
|
||||
}else{
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",true)
|
||||
}
|
||||
},
|
||||
closeAlertConfirmation(){
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",false)
|
||||
},
|
||||
forgetAlertConfirmation(){
|
||||
this.$store.commit("samplestorage/update_no_save",0)
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",false)
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("samplestorage/update_alert_success",val)
|
||||
},
|
||||
closeDialogSuccess(){
|
||||
let arrtrx = this.$store.state.samplestorage.transactions
|
||||
var idx = _.findIndex(arrtrx, item => item.T_SampleStorageID === this.$store.state.samplestorage.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
lastid: idx
|
||||
})
|
||||
this.$store.commit("samplestorage/update_dialog_success",false)
|
||||
},
|
||||
closeDialogInfo(){
|
||||
this.$store.commit("samplestorage/update_open_dialog_info",false)
|
||||
|
||||
|
||||
},
|
||||
printOut(val){
|
||||
this.printwidth = 800
|
||||
this.printtitle = ""
|
||||
let idx = val.id
|
||||
let user = one_user()
|
||||
this.urlprintnote = "/birt/run?__report=report/one/lab/rpt_s_001.rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+idx
|
||||
|
||||
this.openprintout = true
|
||||
},
|
||||
printRekap(){
|
||||
this.printwidth = 800
|
||||
this.printtitle = ""
|
||||
let idx = this.$store.state.samplestorage.transactions[0].prepare_id
|
||||
let user = one_user()
|
||||
//this.urlprintnote = "/birt/run?__report=report/one/lab/rpt_s_001.rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+idx
|
||||
this.urlprintnote = "/birt/run?__report=report/one/rekap/rpt_mcu_screening.rptdesign&__format=pdf&PID="+idx+"&username="+user.M_UserUsername+"&tm="+Date.now()
|
||||
|
||||
this.openprintout = true
|
||||
},
|
||||
btngroups(xgroups){
|
||||
var btn = "";
|
||||
for (var x = 0; x < xgroups.length; x++) {
|
||||
btn += '<v-btn color="error" dark>'+xgroups[x].xgroup+'</v-btn>'
|
||||
}
|
||||
return btn
|
||||
},
|
||||
Authorization(row,btn){
|
||||
this.now_row = row
|
||||
this.now_btn = btn
|
||||
if(btn.status_fo === 'Y'){
|
||||
this.type_nonlab = btn.xgroup
|
||||
if(btn.xgroup === ''){
|
||||
this.type_nonlab = 'LAB'
|
||||
}
|
||||
|
||||
this.$store.commit("samplestorage/update_selected_staff",{})
|
||||
this.dialogauthorize = true
|
||||
}
|
||||
},
|
||||
doAuthorization(){
|
||||
var row = this.now_row
|
||||
var btn = this.now_btn
|
||||
|
||||
|
||||
var prm = {
|
||||
groupid:row.group_id,
|
||||
type:btn.xgroup,
|
||||
orderid:row.orderid,
|
||||
promiseid:row.promiseid,
|
||||
filter_status:this.xselectedfilterstatus.value,
|
||||
nolab:this.nolab,
|
||||
name:this.search,
|
||||
lastid:-1
|
||||
}
|
||||
this.$store.dispatch("samplestorage/doauthorization",prm)
|
||||
},
|
||||
xbtnclass(btn){
|
||||
//console.log(btn)
|
||||
if(parseInt(btn.print_count) === 0){
|
||||
if(btn.received === 'Y'){
|
||||
return 'teal'
|
||||
}
|
||||
else
|
||||
return 'gray'
|
||||
}
|
||||
else if(parseInt(btn.print_count) > 0 && btn.status === 'N'){
|
||||
return 'error'
|
||||
}
|
||||
else if(parseInt(btn.print_count) > 0 && btn.status === 'P'){
|
||||
|
||||
if(btn.status_fo === 'Y')
|
||||
return 'primary'
|
||||
else
|
||||
return 'warning'
|
||||
}
|
||||
else{
|
||||
if(btn.status_fo === 'Y')
|
||||
return 'primary'
|
||||
else{
|
||||
if(btn.status_received = 'Y'){
|
||||
return 'teal'
|
||||
}
|
||||
else{
|
||||
return 'success'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
changeEmail(value){
|
||||
let arr = this.$store.state.samplestorage.transactions
|
||||
var idx = _.findIndex(arr, item => item.uniqid === value.uniqid)
|
||||
arr[idx].email_address = value.email_address
|
||||
this.$store.commit("samplestorage/update_transactions",arr)
|
||||
},
|
||||
getColorChip(value){
|
||||
if(value.status === 'N' && value.flag_ex === 'N')
|
||||
return 'error'
|
||||
else if(value.status === 'Y' && value.flag_ex === 'N')
|
||||
return 'teal'
|
||||
else
|
||||
return 'brown'
|
||||
},
|
||||
doSampled(value){
|
||||
|
||||
value.search = this.search
|
||||
value.mouid = this.xselectedfilterstatus.id
|
||||
value.current_page = this.curr_page
|
||||
value.lastid = -1
|
||||
this.$store.dispatch("samplestorage/dosampled",value)
|
||||
|
||||
},
|
||||
scanbarcode(){
|
||||
console.log(this.barcode)
|
||||
var prm = {}
|
||||
prm.barcode = this.barcode
|
||||
prm.search = this.search
|
||||
prm.mouid = this.xselectedfilterstatus.id
|
||||
prm.current_page = this.curr_page
|
||||
prm.lastid = -1
|
||||
this.$store.dispatch("samplestorage/scanbarcode",prm)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
search: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_search",val)
|
||||
}
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.snackbar
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_snackbar",val)
|
||||
}
|
||||
},
|
||||
change_page(x) {
|
||||
this.curr_patient_page = x
|
||||
|
||||
},
|
||||
openprintout: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.open_print_out
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_open_print_out",val)
|
||||
}
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_dialog_success",val)
|
||||
}
|
||||
},
|
||||
msgsuccess(){
|
||||
return this.$store.state.samplestorage.msg_success
|
||||
},
|
||||
totalinfo(){
|
||||
return this.$store.state.samplestorage.info
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.samplestorage.search_status == 1
|
||||
},
|
||||
xdatestart : {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_start_date",val)
|
||||
}
|
||||
},
|
||||
xdateend : {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_end_date",val)
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart () {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
filterComputedDateFormattedEnd () {
|
||||
return this.formatDate(this.xdateend)
|
||||
},
|
||||
xfilterworks() {
|
||||
return this.$store.state.samplestorage.filter_work
|
||||
},
|
||||
xselectedfilterwork: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.selected_filter_work
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_selected_filter_work",val)
|
||||
}
|
||||
},
|
||||
xfilterstatuses() {
|
||||
return this.$store.state.samplestorage.mous
|
||||
},
|
||||
xselectedfilterstatus: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.selected_mou
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_selected_mou",val)
|
||||
}
|
||||
},
|
||||
xtransactions() {
|
||||
console.log(this.$store.state.samplestorage.transactions)
|
||||
return this.$store.state.samplestorage.transactions
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_open_dialog_info",val)
|
||||
}
|
||||
},
|
||||
msginfo(){
|
||||
return this.$store.state.samplestorage.msg_info
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_current_page",val)
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
search:this.search,
|
||||
current_page:val,
|
||||
mouid:this.xselectedfilterstatus.id,
|
||||
lastid:-1
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.total_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_total_page",val)
|
||||
}
|
||||
},
|
||||
dialogauthorize: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.dialog_authorize
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_dialog_authorize",val)
|
||||
}
|
||||
},
|
||||
xstaffs() {
|
||||
return this.$store.state.samplestorage.staffs
|
||||
},
|
||||
xselectedstaff: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.selected_staff
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_selected_staff",val)
|
||||
}
|
||||
},
|
||||
barcode: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.barcode
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_barcode",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
urlprintnote:'',
|
||||
printtitle:'',
|
||||
printwidth:600,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
type_nonlab:'',
|
||||
name: '',
|
||||
page:1,
|
||||
requirestaff:false,
|
||||
now_row:{},
|
||||
now_btn:{},
|
||||
headers: [
|
||||
{
|
||||
text: "NOMOR LAB",
|
||||
align: "CENTER",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PASIEN",
|
||||
align: "CENTER",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SPESIMEN",
|
||||
align: "CENTER",
|
||||
sortable: false,
|
||||
width: "75%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user