Flatten nested repos

This commit is contained in:
sas.fajri
2026-04-27 10:13:31 +07:00
parent 01c2963a43
commit 8347aef8f4
17935 changed files with 5015229 additions and 3 deletions

View File

@@ -0,0 +1,346 @@
<template>
<v-layout class="fill-height" column>
<v-card class="mb-2 pa-2 searchbox">
<v-layout >
<v-flex xs5>
<v-select
:items="statuses"
v-model="selected_status"
item-value="val"
item-text="label"
outline
hide-details
class="ma-1"
></v-select>
</v-flex>
<v-flex xs4>
<v-select
:items="ref_type"
v-model="is_internal"
item-value="val"
item-text="label"
outline
hide-details
class="ma-1"
></v-select>
</v-flex>
<v-flex xs3>
<v-text-field class="ma-1"
label=""
placeholder="Pencarian"
single-line
outline
v-model="query"
hide-details
:height="height"
@keyup.native="searchUp"
></v-text-field>
</v-flex>
<v-btn class="xs3 ma-1 one-btn-icon" color="success" @click="search">
<span class="icon-search"></span>
</v-btn>
<!-- <v-spacer></v-spacer>
<v-btn color="primary" :disabled="selected_order.length < 1" :dark="selected_order.length > 0" class=" one-btn-icon" @click="sendSome">
<v-icon>send</v-icon>
</v-btn> -->
</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="orders"
:loading="isLoading"
hide-actions
class="elevation-1">
<template slot="items" slot-scope="props">
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ (props.item.T_OrderRefOutHeaderDate.split(" "))[0].split('-').reverse().join('-') }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.company_name }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_OrderRefOutHeaderNumber }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_OrderRefOutHeaderIsSent == 'Y' ? 'Sudah Serah Terima' : 'Belum Serah Terima' }}</td>
<td class="text-xs-left pr-1 pl-1 pa-0" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
<v-btn color="orange" small dark class="ma-0" v-show="props.item.T_OrderRefOutHeaderIsSent == 'Y'" @click="printSJMe(props.item)">Cetak SJ</v-btn>
</td>
</template>
</v-data-table>
<v-pagination
v-model="curr_order_page"
:length="total_order_page"
:total-visible="5"
@input="change_page"
></v-pagination>
</v-flex>
</v-layout>
</v-card>
<v-snackbar
v-model="snackbar"
top
>
Order berhasil dikirim
<v-btn flat color="red" @click.native="snackbar = false">Tutup</v-btn>
</v-snackbar>
</v-layout>
</template>
<style scoped>
table tr th:first-child {
background-color: #90caf9!important;
border-color: #90caf9!important;
}
/* .searchbox .v-input.v-text-field .v-input__slot{
min-height:50px;
} */
/* .v-autocomplete.v-text-field--enclosed:not(.v-text-field--solo):not(.v-text-field--single-line) .v-select__slot>input {
margin-top: 14px;
} */
.searchbox .v-btn {
min-height:50px;
}
table.v-table tbody td,table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
.searchbox .one-btn-icon {
font-size: 1.5em
}
/* Overwrite */
.v-text-field--box>.v-input__control>.v-input__slot,
.v-text-field--full-width>.v-input__control>.v-input__slot,
.v-text-field--outline>.v-input__control>.v-input__slot {
align-items: stretch;
min-height: 50px
}
.v-text-field--box .v-label, .v-text-field--full-width .v-label, .v-text-field--outline .v-label {
top: 12px;
}
.v-text-field.v-text-field--enclosed .v-input__append-inner {
margin-top: 10px;
}
.v-text-field--outline.v-text-field--single-line input {
margin-top: 6px;
}
.v-select.v-text-field--enclosed:not(.v-text-field--single-line) .v-select__selections {
padding-top: 6px;
}
</style>
<script>
module.exports = {
components : {
},
data() {
return {
headers: [
{
text: "TANGGAL",
align: "left",
sortable: false,
value: "mr",
width: "13%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TUJUAN RUJUKAN",
align: "left",
sortable: false,
value: "mr",
width: "22%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NOMOR RUJUKAN",
align: "left",
sortable: false,
value: "mr",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "STATUS",
align: "left",
sortable: false,
value: "mr",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "CETAK",
align: "left",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
}
],
pagination : {
descending: false,
page: 1,
rowsPerPage: 5,
sortBy: 'T_OrderRefOutHeaderNumber',
totalItems: this.$store.state.order.total_order
},
ref_type : [
{val:'N', label:'Rujuk Eksternal'},
{val:'Y', label:'Rujuk Internal'}
],
height: 50
};
},
computed: {
query : {
get () {
return this.$store.state.order.query
},
set (v) {
this.$store.commit('order/update_query', v)
}
},
orders () {
return this.$store.state.order.orders
},
isLoading () {
return false
},
is_loading () {
return false
},
total_order_page () {
return this.$store.state.order.total_order_page
},
curr_order_page : {
get () { return this.$store.state.order.curr_order_page },
set (v) { this.$store.commit('order/update_curr_order_page', v) }
},
snackbar : {
get () { return this.$store.state.order.snackbar },
set (v) { this.$store.commit('order/update_snackbar', v) }
},
selected_order : {
get () { return this.$store.state.order.selected_order },
set (v) { this.$store.commit('order/update_selected_order', v) }
},
is_internal : {
get () { return this.$store.state.order.is_internal },
set (v) {
this.$store.commit('order/update_is_internal', v)
this.search()
}
},
statuses () {
return this.$store.state.order.statuses
},
selected_status : {
get () { return this.$store.state.order.selected_status },
set (v) {
this.$store.commit('order/update_selected_status', v)
this.search()
}
}
},
mounted() {
this.$store.dispatch('order/search')
},
methods : {
isSelected(p) {
let x = this.$store.state.order.selected_order
if (!x)
return false
if (x.T_OrderRefOutHeaderID == p.T_OrderRefOutHeaderID)
return true
return false
},
search() {
this.$store.dispatch("order/search")
},
searchUp(e) {
if (e.which == 13) {
this.search()
}
},
selectMe(doc) {
this.$store.commit('order/update_selected_order', doc)
this.$store.dispatch('order/search_sample')
this.$store.commit('order/update_selected_courier', {M_CourierID:doc.M_CourierID, M_StaffName:doc.M_StaffName})
},
one_money (x) {
return window.one_money(x)
},
change_page(x) {
this.curr_order_page = x
this.$store.dispatch('order/search')
},
sendMe (doc) {
this.$store.dispatch("order/send", doc.T_OrderRefOutID)
},
sendSome (doc) {
if (this.selected_order.length < 1) {
alert('Tidak ada yang perlu di kirim')
return
}
let x = []
for (let i in this.selected_order)
x.push(this.selected_order[i].T_OrderRefOutID)
this.$store.dispatch("order/send", x.join(","))
},
printSJMe (x) {
this.$store.commit('order/update_dialog_print', true);
}
},
watch : {
}
}
</script>

View File

@@ -0,0 +1,69 @@
<template>
<v-dialog
v-model="dialog"
width="1000px"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Cetak Surat Jalan
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout>
<v-flex xs12>
<v-divider class="mt-1 mb-1"></v-divider>
<object :data="rpt_url"
width="100%" height="512px"></object>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
@click="dialog = false"
flat
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
components : {
},
methods : {
},
computed : {
dialog: {
get() {
return this.$store.state.order.dialog_print;
},
set(val) {
this.$store.commit('order/update_dialog_print', val);
}
},
rpt_url () {
return this.$store.state.order.rpt_url
}
}
}
</script>

View File

@@ -0,0 +1,244 @@
<template>
<v-layout class="fill-height" column>
<v-card class="mb-2 pa-2 fill-height">
<v-card-text class="grow pa-1">
<v-layout >
<v-flex xs5>
<v-layout row wrap v-show="selected_order">
<!-- <v-flex xs12>
<v-text-field
outline
hide-details
solo
label="Scan Barcode Specimen"
v-model="query_barcode"
@keyup.native="barcodeMeUp"
></v-text-field>
<hr class="mt-2">
</v-flex> -->
<v-flex xs12>
<v-select
:items="couriers"
v-model="selected_courier"
item-value="M_CourierID"
item-text="M_StaffName"
return-object
label="Pilih Kurir"
hide-details
outline
:disabled="selected_order.T_OrderRefOutHeaderIsSent == 'Y'"
></v-select>
</v-flex>
<v-flex xs12 pt-3>
<p class="body-1 mb-1">Tujuan pengiriman :</p>
<hr class="mt-1 mb-2">
<h3 class="title mb-1">{{ selected_order ? selected_order.company_name : '' }}</h3>
<p class="body-1 mb-1">{{ selected_order ? selected_order.company_address : '' }}</p>
<p class="body-1 mb-1">Kel. {{ selected_order ? selected_order.M_KelurahanName : '' }}</p>
<p class="body-1 mb-1">Kec. {{ selected_order ? selected_order.M_DistrictName : '' }}</p>
<p class="body-1 mb-1">{{ selected_order ? selected_order.M_CityName : '' }}</p>
<hr class="mt-2 mb-2">
</v-flex>
<v-flex xs12 class="text-xs-right">
<v-spacer></v-spacer>
<!-- <v-btn color="orange"
@click="printDO"
dark>Cetak SJ</v-btn> -->
<v-btn color="success"
:disabled="!selected_courier.M_CourierID || selected_sample_length == 0"
:dark="selected_sample_length > 0 && selected_courier.M_CourierID > 0"
@click="send">Serahkan ke Kurir</v-btn>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs7 pl-3>
<v-layout row wrap>
<v-flex xs12>
<v-text-field
outline
hide-details
solo
label="Scan Barcode Specimen"
v-model="query_barcode"
@keyup.native="barcodeMeUp"
:disabled="selected_order.T_OrderRefOutHeaderIsSent == 'Y'"
></v-text-field>
<hr class="mt-2 mb-1">
</v-flex>
<v-flex xs12>
<v-btn color="success" v-for="(sample, n) in samples"
v-bind:key="n"
small
class="mr-2 mb-2 ma-0"
:outline="sample.selected == 'N'"
:dark="sample.selected == 'Y'"
:disabled="selected_order.T_OrderRefOutHeaderIsSent == 'Y'"
block
@click="barcodeClick(sample)">{{sample.T_BarcodeLabBarcode}} - {{sample.T_SampleTypeName}}</v-btn>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-card-text>
<!-- <v-card-actions>
<v-spacer></v-spacer>
<v-btn color="success"
:disabled="!selected_courier.M_CourierID || selected_sample_length == 0"
:dark="selected_sample_length > 0 && selected_courier.M_CourierID > 0"
@click="send">Kirim</v-btn>
</v-card-actions> -->
</v-card>
<v-snackbar
v-model="snackbar"
top
>
Order berhasil diserahkan ke kurir
<v-btn flat color="red" @click.native="snackbar = false">Tutup</v-btn>
</v-snackbar>
<one-process-ref-out-status-sent></one-process-ref-out-status-sent>
<one-process-ref-out-status-print-dialog></one-process-ref-out-status-print-dialog>
</v-layout>
</template>
<style scoped>
</style>
<script>
module.exports = {
components : {
'one-process-ref-out-status-sent' : httpVueLoader('./oneProcessRefOutStatusSent.vue'),
'one-process-ref-out-status-print-dialog' : httpVueLoader('./oneProcessRefOutStatusPrintDialog.vue')
},
data() {
return {
query_barcode: "",
pagination:{
descending: false,
page: 1,
rowsPerPage: 5,
sortBy: 'T_OrderRefOutHeaderNumber',
totalItems: this.$store.state.order.total_order
},
height: 50
};
},
computed: {
samples () {
return this.$store.state.order.samples
},
couriers () {
return this.$store.state.order.couriers
},
selected_courier : {
get () { return this.$store.state.order.selected_courier },
set (v) { this.$store.commit('order/update_selected_courier', v) }
},
selected_sample_length () {
let n = 0
for (let i in this.samples) {
if (this.samples[i].selected == "Y")
n++
}
return n
},
selected_order () {
return this.$store.state.order.selected_order
},
snackbar : {
get () { return this.$store.state.order.snackbar },
set (v) { this.$store.commit('order/update_snackbar', v) }
}
},
mounted() {
this.$store.dispatch('order/search_courier')
},
methods : {
barcodeMeUp(e) {
if (e.which == 13) {
return this.barcodeMe(e)
}
},
barcodeMe (e) {
let x = this.query_barcode
let y = this.samples
let found = false
for (let i in y) {
if (y[i].T_BarcodeLabBarcode == x) {
found = true
if (y[i].selected == 'N')
y[i].selected = "Y"
else
alert('Sampel tersebut sudah dibarcode !!!')
}
}
if (found)
this.$store.commit('order/update_samples', {records:y})
else
alert('No barcode Found !!!')
e.target.select()
},
barcodeClick (x) {
x.selected = x.selected == "Y" ? "N" : "Y"
let y = this.samples
for (let i in y) {
if (y[i].T_BarcodeLabBarcode == x.T_BarcodeLabBarcode)
y[i] = x
}
this.$store.commit('order/update_samples', {records:y})
},
send () {
this.$store.dispatch('order/send')
},
printDO () {
return
}
},
watch : {
}
}
</script>

View File

@@ -0,0 +1,60 @@
<template>
<v-dialog
v-model="dialog"
persistent
max-width="500px"
>
<v-card>
<v-card-text>
<h3 class="title mb-2">Serah terima kurir berhasil.</h3>
<h3 class="subheading">Nomor SJ : {{ selected_order.T_OrderRefOutHeaderNumber }}</h3>
<h3 class="subheading">Kurir : {{ selected_courier.M_StaffName }}</h3>
</v-card-text>
<v-card-actions>
<v-btn color="primary" flat @click="dialog=false">Tutup</v-btn>
<v-spacer></v-spacer>
<v-btn color="orange" dark @click="printSJ">Cetak Surat Jalan</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
module.exports = {
data () {
return {
}
},
computed : {
selected_order () {
return this.$store.state.order.selected_order
},
selected_courier () {
return this.$store.state.order.selected_courier
},
dialog : {
get () { return this.$store.state.order.dialog_finish },
set (v) { this.$store.commit('order/update_dialog_finish', v) }
}
},
methods : {
printSJ () {
this.$store.commit('order/update_dialog_print', true)
}
},
watch : {
dialog (val, old) {
if (!val && old) {
this.$store.dispatch('order/search')
}
}
}
}
</script>