Flatten nested repos
This commit is contained in:
260
test/vuex/one-futurelog/components/oneHeaderList.vue
Normal file
260
test/vuex/one-futurelog/components/oneHeaderList.vue
Normal file
@@ -0,0 +1,260 @@
|
||||
<template>
|
||||
<v-layout column>
|
||||
<v-layout>
|
||||
|
||||
<v-flex xs12 class="right">
|
||||
<v-card class=" mb-2 pa-3 searchbox">
|
||||
<v-layout>
|
||||
<v-flex xs12 class="right">
|
||||
<v-btn @click="refreshLog()" color="green">REFRESH
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
<v-spacer></v-spacer>
|
||||
</v-layout>
|
||||
|
||||
|
||||
</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: {
|
||||
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
|
||||
selectMe(pat) {
|
||||
this.$store.commit("close/update_selected_close", pat)
|
||||
},
|
||||
|
||||
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
|
||||
})
|
||||
},
|
||||
refreshLog() {
|
||||
this.$store.dispatch("info/lookupbyname")
|
||||
},
|
||||
printControlCard(value) {
|
||||
this.printwidth = "800"
|
||||
this.printtitle = ""
|
||||
let user = one_user()
|
||||
var tm = new Date()
|
||||
var formatrpt = "pdf"
|
||||
var branchid = this.selected_filter_branch.M_BranchID
|
||||
this.xurl =
|
||||
"https://regonline.pramita.co.id/birt/run?__report=report/one/fo/rpt_onlite_002.rptdesign&__format=" +
|
||||
formatrpt + "&PStartDate=" + this.xstartdate + "&PEndDate=" + this.xenddate +
|
||||
"&PBranchID=" + branchid + "&username=" + user.M_UserUsername + ""
|
||||
}
|
||||
},
|
||||
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)
|
||||
}
|
||||
},
|
||||
selected_filter_branch: {
|
||||
get() {
|
||||
return this.$store.state.close.selected_filter_branch
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("close/update_selected_filter_branch", val)
|
||||
}
|
||||
},
|
||||
branchs: {
|
||||
get() {
|
||||
return this.$store.state.close.branchs
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("close/update_branchs", 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: '',
|
||||
items: [],
|
||||
menustartdate: false,
|
||||
menuenddate: false,
|
||||
dialog: false,
|
||||
urlprintnote: '',
|
||||
printtitle: '',
|
||||
formatreport: 'pdf',
|
||||
printwidth: '100%',
|
||||
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>
|
||||
904
test/vuex/one-futurelog/components/oneInfoList.vue
Normal file
904
test/vuex/one-futurelog/components/oneInfoList.vue
Normal file
@@ -0,0 +1,904 @@
|
||||
<template>
|
||||
<v-layout>
|
||||
<v-flex xs12>
|
||||
<v-card class="mb-2" color="white">
|
||||
<v-card tile flat color=" pa-2 teal lighten-3">
|
||||
<h5 class=" subtitle-1 font-weight-bold">FUTURE ORDER LOG</h5>
|
||||
</v-card>
|
||||
<v-layout row style="background:#bbdefb;padding-top:5px;" justify-left>
|
||||
|
||||
</v-layout>
|
||||
<v-layout row wrap class="scroll-container" style="max-height:600px;overflow: auto;">
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<div v-html="infos"></div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
|
||||
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="dialoginfo" persistent max-width="750px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">FORM CONTROL</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-form ref="formcontrolinfo" v-model="validinfo" lazy-validation>
|
||||
<v-layout wrap>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<v-flex xs7 pa-1>
|
||||
<v-autocomplete label="Instrumen" v-model="xorderautoinfo" :items="xorderautoinfos" :search-input.sync="search_info" auto-select-first
|
||||
no-filter item-text="Nat_InstrumentName" return-object no-data-text="Cari Instrumen"
|
||||
outline small>
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.Nat_InstrumentName"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex xs5 pa-1>
|
||||
<v-btn @click="addInstrument()" color="teal en-3">Tambah</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
<v-flex xs4 v-for="(vst,idx) in xorderinfos" :key="vst.Nat_InstrumentID" class="pr-2 pb-1">
|
||||
<v-layout row>
|
||||
<v-flex class="boxoutline" style="text-overflow:ellipsis;overflow:hidden;" xs11>
|
||||
<v-btn class="ml-4" large @click="deleteDataPx(idx)" color="error">
|
||||
<v-icon left>close</v-icon>{{vst.Nat_InstrumentName}}</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex>
|
||||
<p v-for="(xerror,idx) in xerrors" class="error pl-2 pr-2" style="color:#fff">{{xerror.msg}}</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="teal darken-1" flat @click="updateDialogFormInstrument()">Tutup</v-btn>
|
||||
<v-btn color="teal darken-1" flat @click="saveFormInstrument()">Simpan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
</v-card>
|
||||
</v-flex>
|
||||
|
||||
<one-dialog-print :title="printtitle" :width="printwidth" :height="500" :status="openprint" :urlprint="urlprint" @close-dialog-print="closePrint"></one-dialog-print>
|
||||
<template>
|
||||
|
||||
<v-dialog v-model="dialogdeletealertinfo" max-width="30%">
|
||||
<v-card>
|
||||
<v-card-title class="headline grey 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>
|
||||
{{msgalertinfo}}
|
||||
</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="dialogdeletealertinfo = false">
|
||||
Tutup
|
||||
</v-btn>
|
||||
<v-btn color="primary" flat @click="closeDeleteAlertInstrument()">
|
||||
Yakin lah
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()"
|
||||
@close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
</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;
|
||||
}
|
||||
|
||||
.textinput {
|
||||
-webkit-transition: width 0.4s ease-in-out;
|
||||
transition: width 0.4s ease-in-out;
|
||||
background-color: white;
|
||||
background-position: 10px 10px;
|
||||
background-repeat: no-repeat;
|
||||
padding-left: 40px;
|
||||
width: 100%;
|
||||
padding: 8px 10px;
|
||||
margin-bottom: 5px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #607d8b;
|
||||
|
||||
}
|
||||
|
||||
.textinput:focus {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.textinput:focus::-webkit-input-placeholder {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.textinput:focus::-moz-placeholder {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.textinput:-moz-placeholder {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.boxoutline {
|
||||
color: red;
|
||||
border: 1px solid red;
|
||||
justify-content: center;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
padding-left: 10px;
|
||||
background: #ffffff;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border-radius: 1px
|
||||
}
|
||||
|
||||
.boxoutline:hover {
|
||||
background: rgba(0, 0, 0, 0.07) !important;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.boxsolid {
|
||||
color: #ffffff;
|
||||
border: 1px solid #ffffff;
|
||||
justify-content: center;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
padding-left: 10px;
|
||||
background: #f44336;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border-radius: 1px
|
||||
}
|
||||
|
||||
.boxsolid:hover {
|
||||
background: #f44336de;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
scroll-padding: 50px 0 0 50px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
}
|
||||
|
||||
/* this targets the default scrollbar (compulsory) */
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #73baf3;
|
||||
}
|
||||
|
||||
/* the new scrollbar will have a flat appearance with the set background color */
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #2196f3;
|
||||
}
|
||||
|
||||
/* this will style the thumb, ignoring the track */
|
||||
|
||||
::-webkit-scrollbar-button {
|
||||
background-color: #0079da;
|
||||
}
|
||||
|
||||
/* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
/* if both the vertical and the horizontal bars appear, then perhaps the right bottom corner also needs to be styled */
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
'one-date-picker': httpVueLoader('../../common/oneDatePicker.vue'),
|
||||
'one-dialog-print': httpVueLoader('../../common/oneDialogPrintX.vue'),
|
||||
'one-dialog-alert': httpVueLoader('../../common/oneDialogAlert.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
openprint: false,
|
||||
urlprint: '',
|
||||
printtitle: '',
|
||||
printwidth: 600,
|
||||
formatreport: 'pdf',
|
||||
readonlydefault: false,
|
||||
page: 1,
|
||||
xname: '',
|
||||
xphone: '',
|
||||
xcode: '',
|
||||
xdescription: '',
|
||||
xipdescription: '',
|
||||
xbasename: '',
|
||||
isdefault: false,
|
||||
issatellite: false,
|
||||
search_control: '',
|
||||
search_city: '',
|
||||
search_district: '',
|
||||
search_kelurahan: '',
|
||||
search_company: '',
|
||||
search_mou: '',
|
||||
search_doctor: '',
|
||||
search_info: '',
|
||||
menufilterdatestart: false,
|
||||
xnameRules: [
|
||||
v => !!v || 'Nama harus diisi'
|
||||
],
|
||||
xcodeRules: [
|
||||
v => !!v || 'Kode harus diisi'
|
||||
],
|
||||
descriptionRules: [
|
||||
v => !!v || 'Alamat harus diisi'
|
||||
],
|
||||
xipdescriptionRules: [
|
||||
v => !!v || 'Alamat IP harus diisi'
|
||||
],
|
||||
controlRules: [
|
||||
v => !!v || 'Control harus dipilih'
|
||||
],
|
||||
cityRules: [
|
||||
v => !!v || 'Kota harus dipilih'
|
||||
],
|
||||
districtRules: [
|
||||
v => !!v || 'Kecamatan harus dipilih'
|
||||
],
|
||||
kelurahanRules: [
|
||||
v => !!v || 'Kelurahan harus dipilih'
|
||||
],
|
||||
headers: [{
|
||||
text: "JAM",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 teal lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KUOTA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 teal lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
headerareas: [{
|
||||
text: "AREA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "70%",
|
||||
class: "pa-2 teal lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "BIAYA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 teal lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination: {
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 100,
|
||||
sortBy: 'Nat_InstrumentName ASC',
|
||||
totalItems: this.$store.state.info.total_transactions
|
||||
},
|
||||
statuss: [{
|
||||
waktu: '16-07-2019 10:00',
|
||||
status: 'Order Dibuat',
|
||||
info: 'Nagita Slavina'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 11:00',
|
||||
status: 'Order Dikirim',
|
||||
info: 'Nagita Slavina'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 12:00',
|
||||
status: 'Order dikonfirmasi',
|
||||
info: 'Chacha Frederica'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 13:00',
|
||||
status: 'Telah dibuat Surat Jalan',
|
||||
info: 'Chacha Frederica'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 14:00',
|
||||
status: 'Kurir akan mengambil sampel',
|
||||
info: 'Satria Subiantoro'
|
||||
}
|
||||
],
|
||||
color: "success",
|
||||
validinfo: false,
|
||||
xid: 0,
|
||||
isinput: "N",
|
||||
countprice: 0,
|
||||
infoinfoid: 0,
|
||||
infoxname: "",
|
||||
infolang: "",
|
||||
infotext: "",
|
||||
isadvance: "N",
|
||||
infoformatadvance: "",
|
||||
issenttocontrol: "N",
|
||||
menustartdate: false,
|
||||
menuenddate: false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
|
||||
dialogdeletealertinfo: false,
|
||||
dialogverifyalertinfo: false,
|
||||
dialogreleasealertinfo: false,
|
||||
alertverify: false,
|
||||
dialogunreleasealertinfo: false,
|
||||
dialogunverifyalertinfo: false,
|
||||
msgalertinfo: ""
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("info/lookupbyname")
|
||||
},
|
||||
computed: {
|
||||
infos() {
|
||||
return this.$store.state.info.infos
|
||||
},
|
||||
infokuotas() {
|
||||
return this.$store.state.info.infokuotas
|
||||
},
|
||||
xcontrol() {
|
||||
return this.$store.state.control.selected_control
|
||||
},
|
||||
xorderintruments() {
|
||||
return this.$store.state.control.orderinfos
|
||||
},
|
||||
dialoginfo() {
|
||||
return this.$store.state.info.dialog_form_info
|
||||
},
|
||||
xerrors() {
|
||||
return this.$store.state.info.errors
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.info.search_status == 1
|
||||
},
|
||||
startComputedDateFormatted() {
|
||||
return this.formatDate(this.xstartdate)
|
||||
},
|
||||
xstartdate: {
|
||||
get() {
|
||||
return this.$store.state.info.startdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_startdate", val)
|
||||
}
|
||||
},
|
||||
endComputedDateFormatted() {
|
||||
return this.formatDate(this.xenddate)
|
||||
},
|
||||
xenddate: {
|
||||
get() {
|
||||
return this.$store.state.info.enddate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_enddate", val)
|
||||
}
|
||||
},
|
||||
xautocitys() {
|
||||
return this.$store.state.info.autocitys
|
||||
},
|
||||
xautocity: {
|
||||
get() {
|
||||
return this.$store.state.info.autocity
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_autocity", val)
|
||||
this.$store.dispatch("info/searchdistrict", {
|
||||
search: this.search_district,
|
||||
id: val.M_CityID
|
||||
})
|
||||
}
|
||||
},
|
||||
xautodistricts() {
|
||||
return this.$store.state.info.autodistricts
|
||||
},
|
||||
xautodistrict: {
|
||||
get() {
|
||||
return this.$store.state.info.autodistrict
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_autodistrict", val)
|
||||
this.$store.dispatch("info/searchkelurahan", {
|
||||
search: this.search_kelurahan,
|
||||
id: val.M_DistrictID
|
||||
})
|
||||
}
|
||||
},
|
||||
xautokelurahans() {
|
||||
return this.$store.state.info.autokelurahans
|
||||
},
|
||||
xautokelurahan: {
|
||||
get() {
|
||||
return this.$store.state.info.autokelurahan
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_autokelurahan", val)
|
||||
}
|
||||
},
|
||||
xautocompanys() {
|
||||
return this.$store.state.info.autocompanys
|
||||
},
|
||||
xautocompany: {
|
||||
get() {
|
||||
return this.$store.state.info.autocompany
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_autocompany", val)
|
||||
this.$store.dispatch("info/searchmou", {
|
||||
search: this.search_mou,
|
||||
id: val.M_CompanyID
|
||||
})
|
||||
}
|
||||
},
|
||||
xautomous() {
|
||||
return this.$store.state.info.automous
|
||||
},
|
||||
xautomou: {
|
||||
get() {
|
||||
return this.$store.state.info.automou
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_automou", val)
|
||||
}
|
||||
},
|
||||
xautodoctors() {
|
||||
return this.$store.state.info.autodoctors
|
||||
},
|
||||
xautodoctor: {
|
||||
get() {
|
||||
return this.$store.state.info.autodoctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_autodoctor", val)
|
||||
this.$store.dispatch("info/selectdescriptiondoctor", {
|
||||
id: val.M_DoctorID
|
||||
})
|
||||
}
|
||||
},
|
||||
xdescriptiondoctors() {
|
||||
return this.$store.state.info.descriptiondoctors
|
||||
},
|
||||
xdescriptiondoctor: {
|
||||
get() {
|
||||
return this.$store.state.info.descriptiondoctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_descriptiondoctor", val)
|
||||
}
|
||||
},
|
||||
xstatuss() {
|
||||
return this.$store.state.info.statuss
|
||||
},
|
||||
dialogstatusorder() {
|
||||
return this.$store.state.info.dialog_status_order
|
||||
},
|
||||
xautocontrols() {
|
||||
return this.$store.state.info.autocontrols
|
||||
},
|
||||
xautocontrol: {
|
||||
get() {
|
||||
return this.$store.state.info.autocontrol
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_autocontrol", val)
|
||||
}
|
||||
},
|
||||
xorderautoinfos() {
|
||||
return this.$store.state.info.orderautoinfos
|
||||
},
|
||||
xorderautoinfo: {
|
||||
get() {
|
||||
return this.$store.state.info.orderautoinfo
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_orderautoinfo", val)
|
||||
}
|
||||
},
|
||||
xorderinfos() {
|
||||
return this.$store.state.info.orderinfos
|
||||
},
|
||||
no_save: {
|
||||
get() {
|
||||
return this.$store.state.info.no_save
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_no_save", val)
|
||||
}
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.info.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_open_alert_confirmation", val)
|
||||
}
|
||||
},
|
||||
xsearch: {
|
||||
get() {
|
||||
return this.$store.state.info.x_search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_x_search", val)
|
||||
}
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.info.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.dispatch("info/lookupbyname", {
|
||||
area: this.xsearch,
|
||||
current_page: val,
|
||||
lastid: -1
|
||||
})
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart() {
|
||||
return this.formatDate(this.xstartdate)
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.info.total_data
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("info/update_total_data", val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isSelected(p) {
|
||||
return p.id == this.$store.state.info.selected_info.id
|
||||
},
|
||||
selectMe(sc) {
|
||||
},
|
||||
updateDialogFormInstrument() {
|
||||
this.$store.commit("info/update_dialog_form_info", false)
|
||||
},
|
||||
updateDialogStatusOrder() {
|
||||
this.$store.commit("info/update_dialog_status_order", false)
|
||||
},
|
||||
setStatusOrder(val) {
|
||||
this.$store.commit("info/update_infos", {})
|
||||
this.$store.commit("info/update_dialog_status_order", true)
|
||||
this.$store.commit("info/update_statuss", val.statuss)
|
||||
},
|
||||
addInstrument() {
|
||||
var oldArr = this.$store.state.info.orderinfos
|
||||
oldArr.push(this.$store.state.info.orderautoinfo)
|
||||
this.searchinfo = ''
|
||||
this.$store.commit("info/update_orderautoinfos", [])
|
||||
this.$store.commit("info/update_orderautoinfo", {})
|
||||
},
|
||||
deleteDataPx(idx) {
|
||||
var inx = parseInt(idx);
|
||||
var xrow = this.$store.state.info.orderinfos[inx]
|
||||
if (parseInt(xrow.xid) !== 0) {
|
||||
var xdeltest = this.$store.state.info.deleted_orderinfos
|
||||
xdeltest.push(xrow)
|
||||
this.$store.commit("info/update_deleted_orderinfos", xdeltest)
|
||||
}
|
||||
var oldArr = this.$store.state.info.orderinfos
|
||||
oldArr.splice(inx, 1)
|
||||
this.$store.commit("inforegister/update_orderinfos", oldArr)
|
||||
},
|
||||
doPriceList(val) {
|
||||
console.log(location)
|
||||
var id = val.id
|
||||
location.replace("/one-ui/control/vuex/one-md-price/" + "?id=" + id)
|
||||
},
|
||||
doPrice() {
|
||||
console.log(location)
|
||||
var id = this.xid
|
||||
location.replace("/one-ui/control/vuex/one-md-price/" + "?id=" + id)
|
||||
},
|
||||
thr_search_control: _.debounce(function () {
|
||||
this.$store.dispatch("info/searchcontrol", {
|
||||
tes: this.search_control
|
||||
})
|
||||
}, 200),
|
||||
thr_search_info: _.debounce(function () {
|
||||
this.$store.dispatch("info/searchinfo", {
|
||||
search: this.search_info,
|
||||
controlid: this.$store.state.control.selected_control.id,
|
||||
infos: this.xorderinfos
|
||||
})
|
||||
}, 200),
|
||||
thr_search_city: _.debounce(function () {
|
||||
this.$store.dispatch("info/searchcity", {
|
||||
search: this.search_city
|
||||
})
|
||||
}, 200),
|
||||
thr_search_district: _.debounce(function () {
|
||||
this.$store.dispatch("info/searchdistrict", {
|
||||
search: this.search_district,
|
||||
id: this.xautocity.M_CityID
|
||||
})
|
||||
}, 200),
|
||||
thr_search_kelurahan: _.debounce(function () {
|
||||
this.$store.dispatch("info/searchkelurahan", {
|
||||
search: this.search_kelurahan,
|
||||
id: this.xautodistrict.M_DistrictID
|
||||
})
|
||||
}, 200),
|
||||
thr_search: _.debounce(function () {
|
||||
this.$store.dispatch("info/lookupbyname", {
|
||||
area: this.xsearch,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
}, 200),
|
||||
thr_search_company: _.debounce(function () {
|
||||
this.$store.dispatch("info/searchcompany", {
|
||||
search: this.search_company
|
||||
})
|
||||
}, 200),
|
||||
thr_search_mou: _.debounce(function () {
|
||||
this.$store.dispatch("info/searchmou", {
|
||||
search: this.search_mou,
|
||||
id: this.xautocompany.M_CompanyID
|
||||
})
|
||||
}, 200),
|
||||
thr_search_doctor: _.debounce(function () {
|
||||
this.$store.dispatch("info/searchdoctor", {
|
||||
search: this.search_doctor
|
||||
})
|
||||
}, 200),
|
||||
searchControl() {
|
||||
this.$store.dispatch("info/lookup", {
|
||||
id: this.xcontrol.name === "Belum Pilih Control" ? "0" : this.$store.state.control.selected_control
|
||||
.id,
|
||||
search: this.xsearch,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
doPrint() {
|
||||
console.log('doprint')
|
||||
this.printwidth = 1028
|
||||
this.printtitle = ""
|
||||
let info = one_info()
|
||||
var id = this.xid
|
||||
var d = new Date();
|
||||
var n = d.getTime()
|
||||
var rptname = 'control_price'
|
||||
var formatrpt = this.formatreport
|
||||
|
||||
this.urlprint = "/birt/run?__report=report/one/md/" + rptname +
|
||||
".rptdesign&__format=" +
|
||||
formatrpt + "&PInstrumentID=" + id + "&infoxname=" + info.Nat_InstrumentInstrumentname +
|
||||
"&tm=" + n
|
||||
|
||||
this.openprint = true
|
||||
},
|
||||
closePrint() {
|
||||
this.openprint = false
|
||||
},
|
||||
openFormInstrument(val) {
|
||||
this.xid = val
|
||||
this.$store.commit("info/update_orderinfos", [])
|
||||
this.$store.commit("info/update_dialog_form_info", true)
|
||||
},
|
||||
editFormInstrument(val) {
|
||||
this.xid = val.id
|
||||
this.xname = val.Nat_InstrumentName
|
||||
this.xdescription = val.Nat_InstrumentDescription
|
||||
this.$store.commit("info/update_autocontrols", [{
|
||||
Nat_QcControlID: val.Nat_QcControlID,
|
||||
Nat_QcControlName: val.Nat_QcControlName
|
||||
}])
|
||||
this.$store.commit("info/update_autocontrol", {
|
||||
Nat_QcControlID: val.Nat_QcControlID,
|
||||
Nat_QcControlName: val.Nat_QcControlName
|
||||
})
|
||||
this.$store.commit("info/update_dialog_form_info", true)
|
||||
},
|
||||
checkError(value) {
|
||||
var errors = this.$store.state.info.errors
|
||||
if (errors.includes(value)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
forgetAlertConfirmation() {
|
||||
this.$store.commit("info/update_no_save", 0)
|
||||
this.$store.commit("info/update_open_alert_confirmation", false)
|
||||
},
|
||||
closeAlertConfirmation() {
|
||||
this.$store.commit("info/update_open_alert_confirmation", false)
|
||||
},
|
||||
changeQc() {
|
||||
this.$store.commit("info/update_no_save", 1)
|
||||
},
|
||||
saveFormInstrument() {
|
||||
if (this.$refs.formcontrolinfo.validate()) {
|
||||
this.$store.dispatch("info/save", {
|
||||
xid: this.xid,
|
||||
controlid: this.$store.state.control.selected_control.id,
|
||||
controlname: this.$store.state.control.selected_control.name,
|
||||
infos: this.xorderinfos,
|
||||
scontrol: this.$store.state.control.x_search,
|
||||
sinfo: this.xsearch
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
simpanAll() {
|
||||
this.$store.dispatch("info/saveall", {
|
||||
xid: this.xid,
|
||||
controlid: this.$store.state.control.selected_control.id,
|
||||
controlname: this.$store.state.control.selected_control.name,
|
||||
infos: this.$store.state.info.infos,
|
||||
scontrol: this.$store.state.control.x_search,
|
||||
sinfo: this.xsearch
|
||||
})
|
||||
|
||||
},
|
||||
set_date2(x) {
|
||||
this.startdate = x.new_date
|
||||
},
|
||||
set_date3(x) {
|
||||
this.enddate = x.new_date
|
||||
},
|
||||
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')}`
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("control/update_alert_success", val)
|
||||
},
|
||||
deleteFormInstrument(data) {
|
||||
this.xid = data.id
|
||||
|
||||
this.msgalertinfo = "Yakin, mau hapus info ini?"
|
||||
this.dialogdeletealertinfo = true
|
||||
},
|
||||
closeDeleteAlertInstrument() {
|
||||
this.$store.dispatch("info/delete", {
|
||||
xid: this.xid,
|
||||
controlid: this.$store.state.control.selected_control.id,
|
||||
controlname: this.$store.state.control.selected_control.name,
|
||||
infoid: this.$store.state.info.selected_info.Nat_InstrumentID,
|
||||
infoname: this.$store.state.info.selected_info.Nat_InstrumentName,
|
||||
name: this.xname,
|
||||
scontrol: this.$store.state.control.x_search,
|
||||
sinfo: this.xsearch
|
||||
})
|
||||
this.dialogdeletealertinfo = false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
xsearch(val, old) {
|
||||
console.log(val)
|
||||
this.xsearch = val
|
||||
this.thr_search()
|
||||
|
||||
},
|
||||
search_control(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.info.update_autocomplete_status == 1) return
|
||||
this.thr_search_control()
|
||||
},
|
||||
search_info(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.info.update_autocomplete_status == 1) return
|
||||
this.thr_search_info()
|
||||
},
|
||||
search_city(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.info.update_autocomplete_status == 1) return
|
||||
this.thr_search_city()
|
||||
},
|
||||
search_district(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.info.update_autocomplete_status == 1) return
|
||||
this.thr_search_district()
|
||||
},
|
||||
search_kelurahan(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.info.update_autocomplete_status == 1) return
|
||||
this.thr_search_kelurahan()
|
||||
},
|
||||
search_company(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.info.update_autocomplete_status == 1) return
|
||||
this.thr_search_company()
|
||||
},
|
||||
search_mou(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.info.update_autocomplete_status == 1) return
|
||||
this.thr_search_mou()
|
||||
},
|
||||
search_doctor(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.info.update_autocomplete_status == 1) return
|
||||
this.thr_search_doctor()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
808
test/vuex/one-futurelog/components/oneMdInstrumentList.vue
Normal file
808
test/vuex/one-futurelog/components/oneMdInstrumentList.vue
Normal file
@@ -0,0 +1,808 @@
|
||||
<template>
|
||||
<v-layout>
|
||||
<template>
|
||||
|
||||
<v-dialog v-model="dialogdeletealert" max-width="30%">
|
||||
<v-card>
|
||||
<v-card-title class="headline grey 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>
|
||||
{{msgalert}}
|
||||
</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="dialogdeletealert = false">
|
||||
Tutup
|
||||
</v-btn>
|
||||
<v-btn color="primary" flat @click="closeDeleteAlert()">
|
||||
Yakin lah
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<v-dialog v-model="dialogcontrol" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">FORM INSTRUMENT</span></v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-form ref="formcontrol" v-model="valid" lazy-validation>
|
||||
<v-layout wrap>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="xname" label="Nama*"></v-text-field>
|
||||
<p v-if="checkError('requirename')" class="error pl-2 pr-2" style="color:#fff">Nama harus diisi dong</p>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-select item-text="Nat_QcLevelName" return-object :items="xlevels" v-model="xlevel" label="Level Control*"></v-select>
|
||||
<p v-if="checkError('requirelevel')" class="error pl-2 pr-2" style="color:#fff">Level Control harus diisi dong</p>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="xlotnumber" label="Lot Number*"></v-text-field>
|
||||
<p v-if="checkError('requirelotnumber')" class="error pl-2 pr-2" style="color:#fff">Lot Number harus diisi dong</p>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-menu class="xs3 pr-2" v-model="menufilterdateexp" :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="filterComputedDateFormattedExp" label="Tanggal Kadaluarsa*" readonly v-on="on" @blur="date = deFormatedDateExp(filterComputedDateFormattedExp)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xexpdate" no-title @input="menufilterdateexp = false"></v-date-picker>
|
||||
</v-menu>
|
||||
<p v-if="checkError('requireexp')" class="error pl-2 pr-2" style="color:#fff">Tanggal Kadaluarsa harus diisi dong</p>
|
||||
</v-flex>
|
||||
<v-flex>
|
||||
<p v-for="(xerror,idx) in xerrors" class="error pl-2 pr-2" style="color:#fff">{{xerror.msg}}</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogFormControl()">Tutup</v-btn>
|
||||
<v-btn v-if="xact === 'new'" color="blue darken-1" flat @click="saveFormControl()">Simpan</v-btn>
|
||||
<v-btn v-if="xact === 'edit'" color="blue darken-1" flat @click="updateFormControl()">Simpan Perubahan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<v-flex xs12>
|
||||
<v-card>
|
||||
<v-toolbar color="blue lighten-3" dark height="50px">
|
||||
<v-toolbar-title>INSTRUMENT</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<!-- <v-btn @click="openFormControl(0)" icon>
|
||||
<v-icon>library_add</v-icon>
|
||||
</v-btn> -->
|
||||
</v-toolbar>
|
||||
<v-snackbar v-model="snackbar" :timeout="5000" :multi-line="false" :vertical="false" :top="true">
|
||||
{{msgsnackbar}}
|
||||
<v-btn flat @click="updateAlert_success(false)">
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
<v-layout row style="background:#bbdefb;padding-top:5px;" justify-left>
|
||||
<v-list-tile>
|
||||
<input type="text" v-model="xsearch" @click="selectMe(0)" class="textinput" label="Nama Station" placeholder="Cari ..." />
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
<div>
|
||||
|
||||
<v-layout row class="scroll-container" style="max-height:600px;overflow: auto;">
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table :headers="headers" :items="vcontrols" :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.Nat_InstrumentName}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<p style="color:black" class="mb-0 font-weight-bold caption">{{props.item.Nat_QcInstrumentQcCode}}</p>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
|
||||
|
||||
<v-divider></v-divider>
|
||||
<v-pagination style="margin-top:10px;margin-bottom:10px" v-model="curr_page" :length="xtotal_page"></v-pagination>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</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;
|
||||
}
|
||||
|
||||
.textinput {
|
||||
-webkit-transition: width 0.4s ease-in-out;
|
||||
transition: width 0.4s ease-in-out;
|
||||
background-color: white;
|
||||
background-position: 10px 10px;
|
||||
background-repeat: no-repeat;
|
||||
padding-left: 40px;
|
||||
width: 100%;
|
||||
padding: 8px 10px;
|
||||
margin-bottom: 5px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #607d8b;
|
||||
|
||||
}
|
||||
|
||||
.textinput:focus {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.textinput:focus::-webkit-input-placeholder {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.textinput:focus::-moz-placeholder {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.textinput:-moz-placeholder {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.boxoutline {
|
||||
color: red;
|
||||
border: 1px solid red;
|
||||
justify-content: center;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
padding-left: 10px;
|
||||
background: #ffffff;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border-radius: 1px
|
||||
}
|
||||
|
||||
.boxoutline:hover {
|
||||
background: rgba(0, 0, 0, 0.07) !important;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.boxsolid {
|
||||
color: #ffffff;
|
||||
border: 1px solid #ffffff;
|
||||
justify-content: center;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
padding-left: 10px;
|
||||
background: #f44336;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border-radius: 1px
|
||||
}
|
||||
|
||||
.boxsolid:hover {
|
||||
background: #f44336de;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
scroll-padding: 50px 0 0 50px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
}
|
||||
|
||||
/* this targets the default scrollbar (compulsory) */
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #73baf3;
|
||||
}
|
||||
|
||||
/* the new scrollbar will have a flat appearance with the set background color */
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #2196f3;
|
||||
}
|
||||
|
||||
/* this will style the thumb, ignoring the track */
|
||||
|
||||
::-webkit-scrollbar-button {
|
||||
background-color: #0079da;
|
||||
}
|
||||
|
||||
/* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
/* if both the vertical and the horizontal bars appear, then perhaps the right bottom corner also needs to be styled */
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
dialogdeletealert: false,
|
||||
msgalert: "",
|
||||
valid: false,
|
||||
xid: 0,
|
||||
search_instrument: '',
|
||||
items: [],
|
||||
xname: '',
|
||||
xcode: '',
|
||||
xlotnumber: '',
|
||||
xnameRules: [
|
||||
v => !!v || 'Nama harus diisi'
|
||||
],
|
||||
instrumentRules: [
|
||||
v => !!v || 'Instrument harus dipilih'
|
||||
],
|
||||
name: '',
|
||||
isdefault: false,
|
||||
scode: '',
|
||||
search_doctor: '',
|
||||
search_testheader: '',
|
||||
search_template: '',
|
||||
page: 1,
|
||||
menufilterdateexp: false,
|
||||
headers: [{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "20%",
|
||||
class: "blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KODE QC",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "10%",
|
||||
class: "blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination: {
|
||||
descending: true,
|
||||
page: 1,
|
||||
rowsPerPage: 100,
|
||||
sortBy: 'id DESC',
|
||||
totalItems: this.$store.state.control.total_filter_controls
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("control/selectlevel")
|
||||
this.$store.dispatch("qc/selectaddressdoctor", {
|
||||
id: 0
|
||||
})
|
||||
this.$store.dispatch("control/lookupbyname", {
|
||||
control: this.xsearch,
|
||||
instrument: this.$store.state.instrument.x_search,
|
||||
qc: this.$store.state.qc.x_search,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.dispatch("instrument/lookupbyname", {
|
||||
control: this.xsearch,
|
||||
instrument: this.$store.state.instrument.x_search,
|
||||
qc: this.$store.state.qc.x_search,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.dispatch("qc/lookupbyname", {
|
||||
control: this.xsearch,
|
||||
instrument: this.$store.state.instrument.x_search,
|
||||
qc: this.$store.state.qc.x_search,
|
||||
sdate: this.$store.state.qc.startdate,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
xact() {
|
||||
return this.$store.state.control.act
|
||||
},
|
||||
xerrors() {
|
||||
return this.$store.state.control.errors
|
||||
},
|
||||
xshowall() {
|
||||
return this.$store.state.control.show_all
|
||||
},
|
||||
vcontrols() {
|
||||
return this.$store.state.control.controls
|
||||
},
|
||||
xtotalcontrols() {
|
||||
return this.$store.state.control.total_controls
|
||||
},
|
||||
xtotalfiltercontrols() {
|
||||
return this.$store.state.control.total_filter_controls
|
||||
},
|
||||
xlevels() {
|
||||
return this.$store.state.control.levels
|
||||
},
|
||||
xlevel: {
|
||||
get() {
|
||||
return this.$store.state.control.level
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_level", val)
|
||||
}
|
||||
|
||||
},
|
||||
filterComputedDateFormattedExp() {
|
||||
return this.formatDateExp(this.xexpdate)
|
||||
},
|
||||
xexpdate: {
|
||||
get() {
|
||||
return this.$store.state.control.xexpdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_xexpdate", val)
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
xsearch: {
|
||||
get() {
|
||||
return this.$store.state.control.x_search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_x_search", val)
|
||||
}
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.control.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_current_page", val)
|
||||
this.$store.dispatch("control/lookupbyname", {
|
||||
control: this.xsearch,
|
||||
qc: this.$store.state.qc.x_search,
|
||||
current_page: val,
|
||||
lastid: -1
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.control.total_controls
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_total_controls", val)
|
||||
}
|
||||
},
|
||||
dialogcontrol() {
|
||||
return this.$store.state.control.dialog_form_control
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.control.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
msgsnackbar() {
|
||||
return this.$store.state.control.msg_success
|
||||
},
|
||||
lookupstatus() {
|
||||
return this.$store.state.control.lookup_control
|
||||
},
|
||||
xcontroltypes() {
|
||||
return this.$store.state.control.controltypes
|
||||
},
|
||||
xcontroltype: {
|
||||
get() {
|
||||
return this.$store.state.control.controltype
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_controltype", val)
|
||||
}
|
||||
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.control.search_status == 1
|
||||
},
|
||||
xnonlabs() {
|
||||
return this.$store.state.control.nonlabs
|
||||
},
|
||||
xnonlab: {
|
||||
get() {
|
||||
return this.$store.state.control.selected_nonlab
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_selected_nonlab", val)
|
||||
}
|
||||
},
|
||||
xcities() {
|
||||
return this.$store.state.control.cities
|
||||
},
|
||||
qcaddress: {
|
||||
get() {
|
||||
return this.$store.state.control.qc_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_qc_address", val)
|
||||
this.$store.dispatch("control/getdistrict", this.$store.state.control.qc_address)
|
||||
}
|
||||
},
|
||||
xdoctors() {
|
||||
return this.$store.state.control.doctors
|
||||
},
|
||||
doctor: {
|
||||
get() {
|
||||
return this.$store.state.control.doctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_doctor", val)
|
||||
}
|
||||
},
|
||||
xinstruments() {
|
||||
return this.$store.state.control.instruments
|
||||
},
|
||||
xinstrument: {
|
||||
get() {
|
||||
return this.$store.state.control.instrument
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_instrument", val)
|
||||
}
|
||||
},
|
||||
xautotemplates() {
|
||||
return this.$store.state.control.autotemplates
|
||||
},
|
||||
xautotemplate: {
|
||||
get() {
|
||||
return this.$store.state.control.autotemplate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_autotemplate", val)
|
||||
}
|
||||
},
|
||||
xdistricts() {
|
||||
return this.$store.state.control.districts
|
||||
},
|
||||
districtaddress: {
|
||||
get() {
|
||||
return this.$store.state.control.district_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_district_address", val)
|
||||
this.$store.dispatch("control/getkelurahan", this.$store.state.control.district_address)
|
||||
}
|
||||
},
|
||||
xkelurahans() {
|
||||
return this.$store.state.control.kelurahans
|
||||
},
|
||||
kelurahanaddress: {
|
||||
get() {
|
||||
return this.$store.state.control.kelurahan_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("control/update_kelurahan_address", val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateShowAll(val) {
|
||||
this.$store.commit("control/update_show_all", val)
|
||||
this.$store.dispatch("control/lookupbyname", {
|
||||
control: this.xsearch,
|
||||
qc: this.$store.state.qc.x_search,
|
||||
current_page: this.curr_page,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
searchControl() {
|
||||
this.$store.dispatch("control/lookup", {
|
||||
search: this.xsearch,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
deFormatedDateExp(date) {
|
||||
if (!date) return null
|
||||
|
||||
const [day, month, year] = date.split('-')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
formatDateExp(date) {
|
||||
console.log(date)
|
||||
if (!date) return null
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.id == this.$store.state.control.selected_control.id
|
||||
|
||||
},
|
||||
subname(name) {
|
||||
var xname = name
|
||||
if (xname.length > 18) {
|
||||
xname = xname.substring(0, 18) + '...'
|
||||
}
|
||||
return xname
|
||||
},
|
||||
checkError(value) {
|
||||
var errors = this.$store.state.control.errors
|
||||
if (errors.includes(value)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
selectMe(sc) {
|
||||
if (this.$store.state.qc.no_save == 1) {
|
||||
this.$store.commit("qc/update_open_alert_confirmation", true)
|
||||
} else {
|
||||
if (sc == '0') {
|
||||
this.$store.commit("control/update_selected_control", {
|
||||
name: "Belum Pilih Instrument"
|
||||
})
|
||||
this.$store.commit("instrument/update_selected_instrument", {
|
||||
name: "Belum Pilih Control"
|
||||
})
|
||||
this.$store.commit("qc/update_selected_qc", {
|
||||
name: ""
|
||||
})
|
||||
this.$store.dispatch("control/lookupbyname", {
|
||||
control: this.xsearch,
|
||||
instrument: this.$store.state.instrument.x_search,
|
||||
qc: this.$store.state.qc.x_search,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.dispatch("qc/lookupbyname", {
|
||||
control: this.xsearch,
|
||||
qc: this.$store.state.qc.x_search,
|
||||
instrument: this.$store.state.instrument.x_search,
|
||||
sdate: this.$store.state.qc.startdate,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.dispatch("instrument/lookupbyname", {
|
||||
control: this.xsearch,
|
||||
qc: this.$store.state.qc.x_search,
|
||||
instrument: this.$store.state.instrument.x_search,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
} else {
|
||||
console.log('control')
|
||||
console.log(sc.name)
|
||||
this.$store.commit("control/update_selected_control", sc)
|
||||
this.$store.dispatch("instrument/lookupbyid", {
|
||||
id: this.$store.state.control.selected_control.id,
|
||||
instrument: this.$store.state.instrument.x_search,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.dispatch("qc/lookupbyid", {
|
||||
instrumentid: this.$store.state.control.selected_control.id,
|
||||
controlid: 0,
|
||||
px: this.$store.state.qc.x_search,
|
||||
sdate: this.$store.state.qc.startdate,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.commit("instrument/update_autocontrols", [{
|
||||
Nat_QcControlID: this.$store.state.control.selected_control.id,
|
||||
Nat_QcControlName: this.$store.state.control.selected_control.name
|
||||
}])
|
||||
this.$store.commit("instrument/update_autocontrol", {
|
||||
Nat_QcControlID: this.$store.state.control.selected_control.id,
|
||||
Nat_QcControlName: this.$store.state.control.selected_control.name
|
||||
})
|
||||
this.$store.commit("instrument/update_selected_instrument", {
|
||||
name: "Belum Pilih Control"
|
||||
})
|
||||
this.$store.commit("qc/update_selected_qc", {
|
||||
name: ""
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
updateDialogFormControl() {
|
||||
this.$store.commit("control/update_dialog_form_control", false)
|
||||
},
|
||||
openFormControl() {
|
||||
this.xlotnumber = ""
|
||||
this.xname = ""
|
||||
this.xexpdate = moment(new Date()).format('YYYY-MM-DD')
|
||||
this.$store.commit("control/update_level", {})
|
||||
this.$refs.formcontrol.reset()
|
||||
this.$refs.formcontrol.resetValidation()
|
||||
this.$store.commit("control/update_act", 'new')
|
||||
this.$store.commit("control/update_dialog_form_control", true)
|
||||
},
|
||||
thr_search_instrument: _.debounce(function () {
|
||||
this.$store.dispatch("control/searchinstrument", {
|
||||
tes: this.search_instrument
|
||||
})
|
||||
}, 2000),
|
||||
saveFormControl() {
|
||||
this.$store.commit("control/update_errors", [])
|
||||
var errors = this.$store.state.control.errors
|
||||
|
||||
if (_.isEmpty(this.xname)) {
|
||||
errors.push("requirename")
|
||||
}
|
||||
if (_.isEmpty(this.xlotnumber)) {
|
||||
errors.push("requirelotnumber")
|
||||
}
|
||||
if (_.isEmpty(this.xlevel)) {
|
||||
errors.push("requirelevel")
|
||||
}
|
||||
if (this.xexpdate === '') {
|
||||
errors.push("requireexp")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
this.$store.dispatch("control/save", {
|
||||
name: this.xname,
|
||||
level: this.xlevel.Nat_QcLevelID,
|
||||
lotnumber: this.xlotnumber,
|
||||
exp: this.xexpdate,
|
||||
scontrol: this.xsearch,
|
||||
sinstrument: this.$store.state.instrument.x_search,
|
||||
sqc: this.$store.state.qc.x_search
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
updateFormControl() {
|
||||
this.$store.commit("control/update_errors", [])
|
||||
var errors = this.$store.state.control.errors
|
||||
|
||||
if (_.isEmpty(this.xname)) {
|
||||
errors.push("requirename")
|
||||
}
|
||||
if (_.isEmpty(this.xlotnumber)) {
|
||||
errors.push("requirelotnumber")
|
||||
}
|
||||
if (_.isEmpty(this.xlevel)) {
|
||||
errors.push("requirelevel")
|
||||
}
|
||||
if (this.xexpdate === '') {
|
||||
errors.push("requireexp")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
this.$store.dispatch("control/update", {
|
||||
id: this.xid,
|
||||
name: this.xname,
|
||||
level: this.xlevel.Nat_QcLevelID,
|
||||
lotnumber: this.xlotnumber,
|
||||
exp: this.xexpdate,
|
||||
scontrol: this.xsearch,
|
||||
sinstrument: this.$store.state.instrument.x_search,
|
||||
sqc: this.$store.state.qc.x_search
|
||||
})
|
||||
}
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("control/update_alert_success", val)
|
||||
},
|
||||
editControl(data) {
|
||||
this.xid = data.id
|
||||
this.xname = data.name
|
||||
this.xlotnumber = data.Nat_QcControlLotNumber
|
||||
this.xexpdate = data.Nat_QcControlExpired
|
||||
this.$store.commit("control/update_level", {
|
||||
Nat_QcLevelID: data.Nat_QcLevelID,
|
||||
Nat_QcLevelName: data.Nat_QcLevelName
|
||||
})
|
||||
this.$store.commit("control/update_act", 'edit')
|
||||
this.$store.commit("control/update_dialog_form_control", true)
|
||||
},
|
||||
deleteControl(data) {
|
||||
this.xid = data.id
|
||||
var xdata = {
|
||||
id: data.id,
|
||||
name: data.name,
|
||||
qcs: 'xxx'
|
||||
}
|
||||
this.$store.commit("control/update_selected_control", xdata)
|
||||
this.msgalert = "Yakin, mau hapus control " + data.name + " ?"
|
||||
this.dialogdeletealert = true
|
||||
},
|
||||
changeNewControlType(value) {
|
||||
this.readonlytypecontrol = value === true ? true : false
|
||||
this.readonlytypecontrolnew = value === true ? false : true
|
||||
},
|
||||
newControlType() {
|
||||
readonlytypecontrol: true
|
||||
readonlytypecontrolnew: false
|
||||
},
|
||||
closeDeleteAlert() {
|
||||
this.$store.dispatch("control/delete", {
|
||||
controlid: this.$store.state.control.selected_control.id,
|
||||
xname: this.$store.state.control.selected_control.name,
|
||||
scontrol: this.xsearch,
|
||||
sinstrument: this.$store.state.instrument.x_search,
|
||||
sqc: this.$store.state.qc.x_search
|
||||
})
|
||||
this.dialogdeletealert = false
|
||||
},
|
||||
thr_search: _.debounce(function () {
|
||||
this.$store.dispatch("control/lookupbyname", {
|
||||
control: this.xsearch,
|
||||
qc: this.$store.state.qc.x_search,
|
||||
instrument: this.$store.state.instrument.x_search,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.dispatch("qc/lookupbyname", {
|
||||
control: this.xsearch,
|
||||
qc: this.$store.state.qc.x_search,
|
||||
instrument: this.$store.state.instrument.x_search,
|
||||
sdate: this.$store.state.qc.startdate,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.dispatch("instrument/lookupbyname", {
|
||||
control: this.xsearch,
|
||||
qc: this.$store.state.qc.x_search,
|
||||
instrument: this.$store.state.instrument.x_search,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
}, 1000)
|
||||
},
|
||||
watch: {
|
||||
xsearch(val, old) {
|
||||
console.log(val)
|
||||
this.xsearch = val
|
||||
this.thr_search()
|
||||
|
||||
},
|
||||
search_instrument(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.control.update_autocomplete_status == 1) return
|
||||
this.thr_search_instrument()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
1016
test/vuex/one-futurelog/components/oneMdQcList-backup.vue
Normal file
1016
test/vuex/one-futurelog/components/oneMdQcList-backup.vue
Normal file
File diff suppressed because it is too large
Load Diff
1426
test/vuex/one-futurelog/components/oneRegisterList.vue
Normal file
1426
test/vuex/one-futurelog/components/oneRegisterList.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user