720 lines
35 KiB
Vue
720 lines
35 KiB
Vue
<template>
|
|
<v-layout v-if="xact !== 'new'" column>
|
|
<v-dialog v-model="dialogconfirmationdeletepat" persistent max-width="290">
|
|
<v-card>
|
|
<v-card-title dark class="headline error pt-2 pb-2" primary-title style="color:white">
|
|
<h4 dark>Konfirmasi</h4>
|
|
</v-card-title>
|
|
<v-card-text>
|
|
{{msgconfirmationdeletepat}}
|
|
</v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn small color="error darken-1 text-sm-left" flat @click="doDeletePat()">Hapus</v-btn>
|
|
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationdeletepat = false">Batal</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-dialog v-model="dialogconfirmationsend" persistent max-width="290">
|
|
<v-card>
|
|
<v-card-title dark class="headline success pt-2 pb-2" primary-title style="color:white">
|
|
<h4 dark>Konfirmasi</h4>
|
|
</v-card-title>
|
|
<v-card-text>
|
|
{{msgconfirmationsend}}
|
|
</v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn small color="success darken-1 text-sm-left" flat @click="doOrderMethode()">Kirim</v-btn>
|
|
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationsend = false">Batal</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-dialog v-model="dialogformmethode" persistent max-width="650">
|
|
<v-card>
|
|
<v-card-title>
|
|
<span class="headline">FORM JADWAL SWAB </span> <span class="headline" style="color:#2196F3"> [ {{xsubcategoryname}} ]</span>
|
|
</v-card-title>
|
|
<v-card-text class="pt-0 pb-0">
|
|
<v-layout wrap>
|
|
<v-flex xs12>
|
|
<v-layout>
|
|
<v-flex xs6 pa-2>
|
|
|
|
<v-select item-text="M_RegDayName" readonly return-object :items="xmethodees" v-model="xmethode" label="Hari"></v-select>
|
|
</v-flex>
|
|
<v-flex xs6 pa-2>
|
|
<v-text-field label="Jumlah Max Pasien Dalam 1 Jam" v-model="xkuota"></v-text-field>
|
|
<p v-if="checkError('requirekuota')" class="error pl-2 pr-2" style="color:#fff">Jumlan Max harus diisi</p>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<span>Jam :</span>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<v-btn class="mt-1 mb-2" v-for="(vst,idx) in xorderregtimes" :key="vst.id" @click="changeDay(idx)" small :color="vst.isregtime === 'N' ? 'yellow' : 'green'">{{vst.M_RegTimeName}}
|
|
</v-btn>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<span></span>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<span>Keterangan :</span>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<span>Pilih :</span>
|
|
<v-btn class="mt-1 mb-2" small :color="'green'">
|
|
</v-btn>
|
|
<span>Tidak Dipilih :</span>
|
|
<v-btn class="mt-1 mb-2" small :color="'yellow'">
|
|
</v-btn>
|
|
</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-layout row>
|
|
</v-layout>
|
|
<v-divider></v-divider>
|
|
</v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="blue darken-1" flat @click="dialogformmethode = false">Tutup</v-btn>
|
|
<v-btn v-if="xactpat === 'edit'" :disabled="in_saving" color="blue darken-1" flat @click="saveEditMethode()">Simpan</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-card>
|
|
<v-layout row>
|
|
<v-flex xs12>
|
|
<v-subheader red--text text--lighten-1>
|
|
</v-subheader>
|
|
<v-divider></v-divider>
|
|
<v-layout>
|
|
<v-flex xs12>
|
|
<v-card class="mb-2" color="white" style="min-height:90px">
|
|
<v-toolbar class="mb-1" color="blue lighten-3" dark height="50px">
|
|
<v-toolbar-title></v-toolbar-title>
|
|
<v-spacer></v-spacer>
|
|
</v-toolbar>
|
|
<v-layout wrap>
|
|
<v-flex xs12>
|
|
<v-layout>
|
|
<v-flex xs3 pa-1>
|
|
<v-checkbox v-model="iswork" label="Centang Jika Mengerjakan PCR Sendiri"></v-checkbox>
|
|
</v-flex>
|
|
<v-flex xs7 class="right" pa-1>
|
|
<span class="headline" style="color:red" v-if="xcheck != 0"> Ada Perubahan Data Lhoo , Jangan Lupa Disimpan Yaaa</span>
|
|
</v-flex>
|
|
<v-flex xs2 class="text-xs-right d-flex align-right">
|
|
<spacer/>
|
|
<v-icon style="font-size: 45px;" :color="xcheck != 0 ? 'blue':'#757575'" :disabled="xcheck == 0" @click="undoData()">undo</v-icon>
|
|
<v-icon style="font-size: 45px;" :color="xcheck != 0 ? 'blue':'#757575'" :disabled="in_saving || this.xcheck == 0" @click="saveEditMethode()">save</v-icon>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<v-layout>
|
|
<v-flex xs6 pa-1>
|
|
<v-flex xs6 pa-2>
|
|
<span>DEFAULT KUOTA PER HARI</span>
|
|
<v-text-field :disabled="iswork === false" label="Cito" v-model="xcito"></v-text-field>
|
|
<p v-if="checkError('requirecito')" class="error pl-2 pr-2" style="color:#fff">Jumlan Max harus diisi</p>
|
|
</v-flex>
|
|
<v-flex xs6 pa-2>
|
|
<v-text-field :disabled="iswork === false" label="Reguler" v-model="xreguler"></v-text-field>
|
|
<p v-if="checkError('requirekuota')" class="error pl-2 pr-2" style="color:#fff">Jumlan Max harus diisi</p>
|
|
</v-flex>
|
|
</v-flex>
|
|
<v-flex xs6 pa-1>
|
|
<v-flex xs6 pa-2>
|
|
<span>BATAS PENGERJAAN CITO</span>
|
|
<v-text-field v-on:change="changeCito1" :disabled="iswork === false" mask="##:##" label="Same Day (HH:MM)" v-model="xcito1"></v-text-field>
|
|
<p v-if="checkError('requirecito1')" class="error pl-2 pr-2" style="color:#fff">Jumlan Max harus diisi</p>
|
|
</v-flex>
|
|
<v-flex xs6 pa-2>
|
|
<v-text-field v-on:change="changeCito2" label="H+1 (HH:MM)" mask="##:##" v-model="xcito2"></v-text-field>
|
|
<p v-if="checkError('requirecito2')" class="error pl-2 pr-2" style="color:#fff">Jumlan Max harus diisi</p>
|
|
</v-flex>
|
|
<v-flex xs6 pa-2>
|
|
<p>H+2 s/d H+4 (sesuai dengan maks jadwal swab)</p>
|
|
</v-flex>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<v-layout>
|
|
<v-flex xs4 pa-2>
|
|
</v-flex>
|
|
<v-flex xs4 pa-2>
|
|
<p>KETERSEDIAAN KUOTA PCR CITO</p>
|
|
</v-flex>
|
|
<v-flex xs4 pa-2>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<v-layout>
|
|
<v-flex xs4 pa-2 v-for="(vst,idx) in xorderregtimes" :key="vst.id">
|
|
<v-text-field v-on:change="changeKuotaCito(idx)" :disabled="iswork === false" class="mt-1 mb-2" :label="vst.M_RegKuotaLogLabel"
|
|
outline v-model="vst.M_RegKuotaLogCito"></v-text-field>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<v-layout>
|
|
<v-flex xs4 pa-2>
|
|
</v-flex>
|
|
<v-flex xs4 pa-2>
|
|
<p>KETERSEDIAAN KUOTA PCR REGULER</p>
|
|
</v-flex>
|
|
<v-flex xs4 pa-2>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<v-layout>
|
|
<v-flex xs4 pa-2 v-for="(vst,idx) in xorderregtimesreguler" :key="vst.id">
|
|
<v-text-field v-on:change="changeKuotaRegule(idx)" :disabled="iswork === false" class="mt-1 mb-2" :label="vst.M_RegKuotaLogLabel"
|
|
outline v-model="vst.M_RegKuotaLogReguler"></v-text-field>
|
|
</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>
|
|
</v-flex>
|
|
</v-layout>
|
|
|
|
</v-flex>
|
|
</v-flex>
|
|
</v-card>
|
|
</v-layout>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.flex-item {
|
|
border: 1px solid lightblue;
|
|
transition: .7s;
|
|
display: flex;
|
|
align-items: flex-end;
|
|
}
|
|
|
|
.flex-container {
|
|
overflow: hidden;
|
|
position: relative;
|
|
display: -webkit-flex;
|
|
display: flex;
|
|
width: 400px;
|
|
height: 350px;
|
|
background-color: lightblue;
|
|
flex-wrap: wrap;
|
|
padding: 10px;
|
|
justify-content: flex-start;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
module.exports = {
|
|
data: () => ({
|
|
oldlabel: '',
|
|
search_regtime: '',
|
|
xkuota: '',
|
|
xsubcategoryid: 0,
|
|
xsubcategoryname: '',
|
|
xdayid: 0,
|
|
xdayname: '',
|
|
xinstrument: '',
|
|
headers: [
|
|
|
|
{
|
|
text: "HARI",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "mr",
|
|
width: "10%",
|
|
class: "pa-1 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "JUMLAH MAX PASIEN DALAM 1 JAM",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "mr",
|
|
width: "10%",
|
|
class: "pa-1 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "JAM",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "lab",
|
|
width: "60%",
|
|
class: "pa-1 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "AKSI",
|
|
align: "center",
|
|
sortable: false,
|
|
value: "action",
|
|
width: "10%",
|
|
class: "pa-1 blue lighten-3 white--text"
|
|
}
|
|
]
|
|
}),
|
|
mounted() {
|
|
this.$store.dispatch("methodepriority/getkuota")
|
|
this.$store.dispatch("methodepriority/getsubcategory")
|
|
this.$store.dispatch("methodepriority/getday")
|
|
},
|
|
computed: {
|
|
dialogconfirmationdeletepat: {
|
|
get() {
|
|
return this.$store.state.methodepriority.dialog_confirmation_delete_meth
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_dialog_confirmation_delete_meth", val)
|
|
}
|
|
},
|
|
xmethodeprioritys() {
|
|
return this.$store.state.methodepriority.selected_methodepriority
|
|
},
|
|
msgconfirmationdeletepat() {
|
|
return this.$store.state.methodepriority.msg_confirmation_delete_meth
|
|
},
|
|
xerrors() {
|
|
return this.$store.state.methodepriority.errors
|
|
},
|
|
dialogconfirmationsend: {
|
|
get() {
|
|
return this.$store.state.methodepriority.dialog_confirmation_send
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_dialog_confirmation_send", val)
|
|
}
|
|
},
|
|
msgconfirmationsend() {
|
|
return this.$store.state.methodepriority.msg_confirmation_send
|
|
},
|
|
xact() {
|
|
return this.$store.state.methodepriority.act
|
|
},
|
|
xactpat() {
|
|
return this.$store.state.methodepriority.act_meth
|
|
},
|
|
xactsend() {
|
|
return this.$store.state.methodepriority.act_send
|
|
},
|
|
|
|
dialogformmethode: {
|
|
get() {
|
|
return this.$store.state.methodepriority.dialog_form_methode
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_dialog_form_methode", val)
|
|
}
|
|
},
|
|
isLoading() {
|
|
return this.$store.state.methodepriority.search_status == 1
|
|
},
|
|
xmethodes(p) {
|
|
return this.$store.state.methodepriority.methodes
|
|
},
|
|
xnoref: {
|
|
get() {
|
|
return this.$store.state.methodepriority.noref
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_noref", val)
|
|
}
|
|
},
|
|
namamethode: {
|
|
get() {
|
|
return this.$store.state.methodepriority.namamethode
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_nama_methode", val)
|
|
}
|
|
},
|
|
xdob: {
|
|
get() {
|
|
return this.$store.state.methodepriority.dob
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_dob", val)
|
|
}
|
|
},
|
|
xid: {
|
|
get() {
|
|
return this.$store.state.methodepriority.xid
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_xid", val)
|
|
}
|
|
},
|
|
xcheck: {
|
|
get() {
|
|
return this.$store.state.methodepriority.xcheck
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_xcheck", val)
|
|
}
|
|
},
|
|
xcito: {
|
|
get() {
|
|
return this.$store.state.methodepriority.cito
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_cito", val)
|
|
var arrOrders = this.$store.state.methodepriority.orderregtimes
|
|
var i = 0;
|
|
for (var obj in arrOrders) {
|
|
arrOrders[i].M_RegKuotaLogCito = val
|
|
this.$store.commit("methodepriority/update_orderregtimes", arrOrders)
|
|
i++
|
|
}
|
|
let cek = this.$store.state.methodepriority.xcheck + 1
|
|
this.$store.commit("methodepriority/update_xcheck", cek)
|
|
}
|
|
},
|
|
xreguler: {
|
|
get() {
|
|
return this.$store.state.methodepriority.reguler
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_reguler", val)
|
|
var arrOrdersReguler = this.$store.state.methodepriority.orderregtimesreguler
|
|
var i = 0;
|
|
for (var obj in arrOrdersReguler) {
|
|
arrOrdersReguler[i].M_RegKuotaLogReguler = val
|
|
this.$store.commit("methodepriority/update_orderregtimesreguler", arrOrdersReguler)
|
|
i++
|
|
}
|
|
let cek = this.$store.state.methodepriority.xcheck + 1
|
|
this.$store.commit("methodepriority/update_xcheck", cek)
|
|
|
|
}
|
|
},
|
|
xcito1: {
|
|
get() {
|
|
return this.$store.state.methodepriority.cito1
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_cito1", val)
|
|
}
|
|
},
|
|
xcito2: {
|
|
get() {
|
|
return this.$store.state.methodepriority.cito2
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_cito2", val)
|
|
|
|
}
|
|
},
|
|
iswork: {
|
|
get() {
|
|
return this.$store.state.methodepriority.iswork
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_iswork", val)
|
|
if (val === false) {
|
|
this.$store.commit("methodepriority/update_cito", '')
|
|
this.$store.commit("methodepriority/update_reguler", '')
|
|
this.$store.commit("methodepriority/update_cito1", '')
|
|
var arrOrdersReguler = this.$store.state.methodepriority.orderregtimesreguler
|
|
var i = 0;
|
|
for (var obj in arrOrdersReguler) {
|
|
arrOrdersReguler[i].M_RegKuotaLogReguler = ''
|
|
this.$store.commit("methodepriority/update_orderregtimesreguler", arrOrdersReguler)
|
|
i++
|
|
}
|
|
var arrOrders = this.$store.state.methodepriority.orderregtimes
|
|
var i = 0;
|
|
for (var obj in arrOrders) {
|
|
arrOrders[i].M_RegKuotaLogCito = ''
|
|
this.$store.commit("methodepriority/update_orderregtimes", arrOrders)
|
|
i++
|
|
}
|
|
let cek = this.$store.state.methodepriority.xcheck + 1
|
|
this.$store.commit("methodepriority/update_xcheck", cek)
|
|
} else {
|
|
let cek = this.$store.state.methodepriority.xcheck + 1
|
|
this.$store.commit("methodepriority/update_xcheck", cek)
|
|
}
|
|
}
|
|
},
|
|
xmethodees() {
|
|
return this.$store.state.methodepriority.methodees
|
|
},
|
|
xmethode: {
|
|
get() {
|
|
return this.$store.state.methodepriority.selected_methode
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_selected_methode", val)
|
|
}
|
|
},
|
|
xsubcategoryes() {
|
|
return this.$store.state.methodepriority.subcategoryes
|
|
},
|
|
xsubcategory: {
|
|
get() {
|
|
return this.$store.state.methodepriority.selected_subcategory
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_selected_subcategory", val)
|
|
this.$store.dispatch("methodepriority/getschedule", {
|
|
idsubcategory: val.T_SubCategoryID
|
|
})
|
|
}
|
|
},
|
|
in_saving: {
|
|
get() {
|
|
return this.$store.state.methodepriority.in_saving
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_in_saving", val)
|
|
}
|
|
},
|
|
xorderautoregtimes() {
|
|
return this.$store.state.methodepriority.orderautoregtimes
|
|
},
|
|
xorderautoregtime: {
|
|
get() {
|
|
return this.$store.state.methodepriority.orderautoregtime
|
|
},
|
|
set(val) {
|
|
this.$store.commit("methodepriority/update_orderautoregtime", val)
|
|
}
|
|
},
|
|
xorderregtimes() {
|
|
|
|
xregtimes = this.$store.state.methodepriority.orderregtimes;
|
|
console.log('xregtimes', xregtimes)
|
|
return xregtimes
|
|
},
|
|
xorderregtimesreguler() {
|
|
|
|
xregtimesreguler = this.$store.state.methodepriority.orderregtimesreguler;
|
|
return xregtimesreguler
|
|
},
|
|
sub_total() {
|
|
let regtimes = this.xorderregtimes
|
|
sub_total = 0
|
|
regtimes.forEach(function (vpx, idx) {
|
|
let total = parseInt(vpx.total)
|
|
sub_total = sub_total + total
|
|
})
|
|
return sub_total
|
|
},
|
|
dp() {
|
|
let mindp = this.$store.state.methodepriority.selected_methodepriority.M_MouMinDP
|
|
let dp = mindp / 100 * this.sub_total
|
|
return dp
|
|
},
|
|
isbill() {
|
|
let isbill = this.$store.state.methodepriority.selected_methodepriority.M_MouIsBill
|
|
return isbill
|
|
},
|
|
isagingonhold() {
|
|
let isagingonhold = this.$store.state.methodepriority.selected_methodepriority.M_MouIsAgingOnHold
|
|
return isagingonhold
|
|
},
|
|
agingonhold() {
|
|
let agingonhold = this.$store.state.methodepriority.selected_methodepriority.M_MouIsAgingOnHoldNote
|
|
return agingonhold
|
|
}
|
|
},
|
|
methods: {
|
|
createNewMethode() {
|
|
this.$store.commit("methodepriority/update_act_meth", 'new')
|
|
this.xnoref = ''
|
|
this.namamethode = ''
|
|
this.$store.commit("methodepriority/update_selected_methode", [])
|
|
this.xdob = ''
|
|
this.$store.commit("methodepriority/update_orderregtimes", [])
|
|
this.$store.commit("methodepriority/update_dialog_form_methode", true)
|
|
},
|
|
checkError(value) {
|
|
var errors = this.$store.state.methodepriority.errors
|
|
if (errors.includes(value)) {
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
},
|
|
changeDay(idx) {
|
|
var arrOrders = this.$store.state.methodepriority.orderregtimes
|
|
arrOrders[idx].isregtime = arrOrders[idx].isregtime === 'N' ? 'Y' : 'N'
|
|
|
|
this.$store.commit("methodepriority/update_orderregtimes", arrOrders)
|
|
},
|
|
changeCito1() {
|
|
let cek = this.$store.state.methodepriority.xcheck + 1
|
|
this.$store.commit("methodepriority/update_xcheck", cek)
|
|
},
|
|
changeCito2() {
|
|
let cek = this.$store.state.methodepriority.xcheck + 1
|
|
this.$store.commit("methodepriority/update_xcheck", cek)
|
|
},
|
|
changeKuotaCito(idx) {
|
|
var arrOrders = this.$store.state.methodepriority.orderregtimes
|
|
arrOrders[idx].M_RegKuotaLogCito = arrOrders[idx].M_RegKuotaLogCito
|
|
this.$store.commit("methodepriority/update_orderregtimes", arrOrders)
|
|
let cek = this.$store.state.methodepriority.xcheck + 1
|
|
this.$store.commit("methodepriority/update_xcheck", cek)
|
|
},
|
|
changeKuotaRegule(idx) {
|
|
var arrOrders = this.$store.state.methodepriority.orderregtimesreguler
|
|
arrOrders[idx].M_RegKuotaLogReguler = arrOrders[idx].M_RegKuotaLogReguler
|
|
this.$store.commit("methodepriority/update_orderregtimesreguler", arrOrders)
|
|
let cek = this.$store.state.methodepriority.xcheck + 1
|
|
this.$store.commit("methodepriority/update_xcheck", cek)
|
|
},
|
|
undoData() {
|
|
this.$store.dispatch("methodepriority/getkuota")
|
|
},
|
|
saveNewMethode() {
|
|
var prm = {}
|
|
prm.M_MethodePriorityNat_TestID = this.$store.state.methodepriority.selected_methodepriority
|
|
.Nat_TestID
|
|
prm.Nat_MethodeName = this.$store.state.methodepriority.selected_methodepriority.Nat_MethodeName
|
|
prm.M_MethodePriorityNat_MethodeID = this.$store.state.methodepriority.selected_methode.Nat_MethodeID
|
|
prm.M_RegScheduleLimit = this.xkuota
|
|
prm.orderregtimes = this.xorderregtimes
|
|
this.$store.dispatch("methodepriority/savenewmethode", prm)
|
|
|
|
},
|
|
editMethode(value) {
|
|
this.xid = value.M_RegScheduleID
|
|
this.$store.commit("methodepriority/update_act_meth", 'edit')
|
|
this.$store.commit("methodepriority/update_x_meth_id", value.M_MethodePriorityID)
|
|
this.xdayid = value.M_RegDayID
|
|
this.xsubcategoryid = value.T_SubCategoryID
|
|
this.xsubcategoryname = value.T_SubCategoryName
|
|
this.xdayname = value.M_RegDayName
|
|
this.xkuota = value.M_RegScheduleLimit
|
|
this.$store.commit("methodepriority/update_selected_methode", {
|
|
M_RegDayID: value.M_RegDayID,
|
|
M_RegDayName: value.M_RegDayName
|
|
})
|
|
this.isregtime = value.isregtime === 'N' ? false : true
|
|
if (value.M_RegTimeName == "Belum Ada Settingan Waktu") {
|
|
value.regtimes.forEach(function (d, idx) {
|
|
if (value.regtimes[idx].M_RegTimeIsDefault == 'Y') {
|
|
value.regtimes[idx].isregtime = 'Y';
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
this.$store.commit("methodepriority/update_orderregtimes", value.regtimes)
|
|
this.$store.commit("methodepriority/update_dialog_form_methode", true)
|
|
},
|
|
saveEditMethode() {
|
|
this.$store.commit("methodepriority/update_errors", [])
|
|
var errors = this.$store.state.methodepriority.errors
|
|
if (this.iswork === "true" && this.xreguler === "") {
|
|
errors.push("requirereguler")
|
|
}
|
|
if (this.iswork === "true" && this.xcito === "") {
|
|
errors.push("requirecito")
|
|
}
|
|
if (errors.length === 0) {
|
|
if (this.in_saving) return;
|
|
this.in_saving = true;
|
|
var prm = {}
|
|
prm.xid = this.xid
|
|
prm.M_RegKuotaReguler = this.xreguler
|
|
prm.M_RegKuotaCito = this.xcito
|
|
prm.M_RegKuotaCito1Day = moment(this.xcito1, 'HHmm').format('HH:mm')
|
|
prm.M_RegKuotaCito2Day = moment(this.xcito2, 'HHmm').format('HH:mm')
|
|
prm.M_RegKuotaIsWork = this.iswork === true ? "Y" : "N"
|
|
prm.orderregtimes = this.xorderregtimes
|
|
prm.orderregtimesreguler = this.xorderregtimesreguler
|
|
this.$store.dispatch("methodepriority/saveeditmethode", prm)
|
|
}
|
|
},
|
|
thr_search_regtime: _.debounce(function () {
|
|
this.$store.dispatch("methodepriority/searchregtime", {
|
|
regtime: this.search_regtime,
|
|
mouid: this.$store.state.methodepriority.selected_methodepriority.Nat_TestM_MouID
|
|
})
|
|
}, 2000),
|
|
deleteMethode(value) {
|
|
this.$store.commit("methodepriority/update_act_meth", 'delete')
|
|
this.$store.commit("methodepriority/update_x_meth_id", value.M_MethodePriorityID)
|
|
this.$store.commit("methodepriority/update_errors", [])
|
|
var errors = this.$store.state.methodepriority.errors
|
|
var msg = ''
|
|
msg = "Yakin, akan menghapus data methode " + value.M_MethodePriorityName + " ?"
|
|
this.$store.commit("methodepriority/update_msg_confirmation_delete_meth", msg)
|
|
this.$store.commit("methodepriority/update_dialog_confirmation_delete_meth", true)
|
|
},
|
|
doDeletePat() {
|
|
var prm = {}
|
|
prm.M_MethodePriorityNat_TestID = this.$store.state.methodepriority.selected_methodepriority
|
|
.Nat_TestID
|
|
prm.M_MethodePriorityID = this.$store.state.methodepriority.x_meth_id
|
|
prm.M_MethodePriorityName = this.namamethode
|
|
prm.M_CompanyName = this.$store.state.methodepriority.selected_methodepriority.M_CompanyName
|
|
this.$store.dispatch("methodepriority/deletemethode", prm)
|
|
},
|
|
sendOrderMethode(value) {
|
|
let msg = "Yakin, akan mengirim permintaan nomor " + this.$store.state.methodepriority.selected_methodepriority
|
|
.Nat_TestNumber + " ?"
|
|
this.$store.commit("methodepriority/update_msg_confirmation_send", msg)
|
|
this.$store.commit("methodepriority/update_dialog_confirmation_send", true)
|
|
},
|
|
doOrderMethode() {
|
|
var prm = {}
|
|
prm.Nat_TestID = this.$store.state.methodepriority.selected_methodepriority
|
|
.Nat_TestID
|
|
prm.Nat_TestNumber = this.$store.state.methodepriority.selected_methodepriority
|
|
.Nat_TestNumber
|
|
this.$store.dispatch("methodepriority/sendorder", prm)
|
|
},
|
|
convertMoney(money) {
|
|
return one_money(money)
|
|
},
|
|
addTest() {
|
|
var oldArr = this.$store.state.methodepriority.orderregtimes
|
|
oldArr.push(this.$store.state.methodepriority.orderautoregtime)
|
|
this.searchregtime = ''
|
|
this.$store.commit("methodepriority/update_orderautoregtimes", [])
|
|
this.$store.commit("methodepriority/update_orderautoregtime", {})
|
|
},
|
|
deleteDataPx(idx) {
|
|
var inx = parseInt(idx);
|
|
var xrow = this.$store.state.methodepriority.orderregtimes[inx]
|
|
if (parseInt(xrow.xid) !== 0) {
|
|
var xdelregtime = this.$store.state.methodepriority.deleted_orderregtimes
|
|
xdelregtime.push(xrow)
|
|
this.$store.commit("methodepriority/update_deleted_orderregtimes", xdelregtime)
|
|
}
|
|
var oldArr = this.$store.state.methodepriority.orderregtimes
|
|
oldArr.splice(inx, 1)
|
|
this.$store.commit("methodepriority/update_orderregtimes", oldArr)
|
|
},
|
|
},
|
|
watch: {
|
|
search_city(val, old) {
|
|
if (val == old) return
|
|
if (!val) return
|
|
if (val.length < 1) return
|
|
if (this.$store.state.methodepriority.update_autocomplete_status == 1) return
|
|
this.thr_search_city()
|
|
},
|
|
search_regtime(val, old) {
|
|
if (val == old) return
|
|
if (!val) return
|
|
if (val.length < 1) return
|
|
if (this.$store.state.methodepriority.update_autocomplete_status == 1) return
|
|
this.thr_search_regtime()
|
|
}
|
|
}
|
|
}
|
|
</script> |