Flatten nested repos
This commit is contained in:
825
test/vuex/one-admin-mcu/components/oneAdminMcuLeft.vue
Normal file
825
test/vuex/one-admin-mcu/components/oneAdminMcuLeft.vue
Normal file
@@ -0,0 +1,825 @@
|
||||
<template>
|
||||
<v-layout>
|
||||
<v-dialog v-model="dialog_data_edit" width="500">
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Perhatian
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<span class="text-center pt-5">{{ text_not_edit }}</span>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog_data_edit = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<!-- Alert dialog -->
|
||||
<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="deleteRow()">
|
||||
Yakin lah
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<!-- End alert dialog -->
|
||||
|
||||
<!-- ERROR DIALOG -->
|
||||
<v-dialog v-model="dialog_error" max-width="500px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span>ERROR !</span>
|
||||
<v-spacer></v-spacer>
|
||||
</v-card-title>
|
||||
<v-divider></v-divider>
|
||||
<div class="ma-3 red--text">{{ msgError }}</div>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" flat @click="dialog_error = false">Close</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<!-- END ERROR DIALOG -->
|
||||
<!-- Snackbar -->
|
||||
<v-snackbar v-model="snackbar" :timeout="5000" :multi-line="false" :vertical="false" :top="true" :color="clr"
|
||||
:value="snackbar">
|
||||
{{ msgsnackbar }}
|
||||
<v-btn flat @click="snackbar = false"> Tutup </v-btn>
|
||||
</v-snackbar>
|
||||
<!-- End Snackbar -->
|
||||
<!-- Form Dialog -->
|
||||
<v-dialog v-model="dialog_form" persistent width="50%">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="title">Form Admin MCU</span>
|
||||
</v-card-title>
|
||||
<v-divider></v-divider>
|
||||
<v-progress-linear v-if="loading_save" :indeterminate="true"></v-progress-linear>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-autocomplete label="Company*" :items="xcompany" v-model="vcompany"
|
||||
:search-input.sync="search_item_company"
|
||||
auto-select-first no-filter item-text="M_CompanyName" return-object
|
||||
no-data-text="Pilih Nama Company" clearable
|
||||
:error="company_error_message !== ''"
|
||||
:error-messages="company_error_message"
|
||||
@blur="companyValidation">
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.M_CompanyName"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<!-- <v-card-text class="pt-0 pb-0">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-text-field disabled label="Number* (automation)" required></v-text-field>
|
||||
</v-flex xs12>
|
||||
</v-layout>
|
||||
</v-card-text> -->
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="vnationalNumber" label="National Number"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-text class="pt-2 pb-0">
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-menu v-model="menufilterdatestart" :close-on-content-click="false" :nudge-right="40" lazy
|
||||
transition="scale-transition" offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field class="mr-2" v-model="filterComputedDateFormattedStart" label="Start Date"
|
||||
hide-details readonly v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedStart)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xdatestart" no-title @input="menufilterdatestart = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-text class="pt-2 pb-0">
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-menu v-model="menufilterdateend" :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="mr-2" v-model="filterComputedDateFormattedEnd" label="End Date"
|
||||
hide-details readonly v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedEnd)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xdateend" no-title @input="menufilterdateend = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-text class="pt-2 pb-0">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<!-- <v-select
|
||||
label="Agreement*"
|
||||
item-text="M_MouName"
|
||||
return-object
|
||||
:items="xmou"
|
||||
v-model="vmou"
|
||||
multiple
|
||||
chips
|
||||
small-chips
|
||||
clearable
|
||||
item-value="M_MouID"
|
||||
no-data-text="Pilih Company Dulu"
|
||||
:error="mou_error_message !== ''"
|
||||
:error-messages="mou_error_message"
|
||||
@blur="mouValidation"
|
||||
>
|
||||
</v-select> -->
|
||||
|
||||
<!-- <v-autocomplete label="Agreement*"
|
||||
:items="xmou"
|
||||
v-model="vmou"
|
||||
multiple chips deletable-chips
|
||||
item-text="M_MouName"
|
||||
item-value="M_MouID" return-object
|
||||
no-data-text="Pilih Company Dulu" clearable
|
||||
:error="mou_error_message !== ''"
|
||||
:error-messages="mou_error_message"
|
||||
@blur="mouValidation">
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.M_MouName"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete> -->
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-text class="pt-2 pb-0">
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="vparticipant" label="Partisipan"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" flat @click="dialog_form = false" :disabled="loading_save">Tutup</v-btn>
|
||||
<v-btn v-if="xact === 'add'" color="primary" flat :disabled="loading_save"
|
||||
@click="saveAdd()">Simpan</v-btn>
|
||||
<v-btn v-if="xact === 'edit'" color="primary" flat :disabled="loading_save" @click="saveEdit()">Simpan
|
||||
Perubahan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<!-- End Form Dialog -->
|
||||
|
||||
<v-flex xs12>
|
||||
<v-card class="mb-2" color="white">
|
||||
<v-toolbar color="blue lighten-3" dark height="50px">
|
||||
<v-toolbar-title>Master Pola Kelainan MCU</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn @click="openForm(0)" icon>
|
||||
<v-icon>library_add</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
<v-layout row style="background:#bbdefb;padding-top:5px;" justify-left>
|
||||
<v-list-tile>
|
||||
<input type="text" class="textinput" label="Deskripsi Harga"
|
||||
v-model="xsearch"
|
||||
placeholder="Cari ..." />
|
||||
</v-list-tile>
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row class="scroll-container" style="max-height:645px;overflow: auto;">
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table :headers="headers" :items="vmcu" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-center pa-2" v-bind:class="{ 'amber lighten-4': isSelected(props.item) }"
|
||||
@click="selectMe(props.item)">{{ props.item.Mgm_McuNumber }}
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{ 'amber lighten-4': isSelected(props.item) }"
|
||||
@click="selectMe(props.item)">{{ props.item.M_CompanyName }}
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{ 'amber lighten-4': isSelected(props.item) }"
|
||||
@click="selectMe(props.item)">{{ formatDateUI(props.item.Mgm_McuStartDate) }} - {{ formatDateUI(props.item.Mgm_McuEndDate) }}
|
||||
</td>
|
||||
<!-- <td class="text-xs-center pa-2" v-bind:class="{ 'amber lighten-4': isSelected(props.item) }"
|
||||
@click="selectMe(props.item)">{{ props.item.M_MouName }}
|
||||
</td> -->
|
||||
<td class="text-xs-center pa-2" v-bind:class="{ 'amber lighten-4': isSelected(props.item) }"
|
||||
@click="selectMe(props.item)">{{ props.item.Mgm_McuTotalParticipant }}
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<v-tooltip bottom>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
small class="ml-3"
|
||||
@click="openEdit(props.item)"
|
||||
color="primary">edit
|
||||
</v-icon>
|
||||
</template>
|
||||
<span>Edit</span>
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
small
|
||||
class="ml-3"
|
||||
@click="confirmDelete(props.item)"
|
||||
color="error">clear
|
||||
</v-icon>
|
||||
</template>
|
||||
<span>Hapus</span>
|
||||
</v-tooltip>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-divider></v-divider>
|
||||
<v-layout>
|
||||
<v-flex>
|
||||
<v-pagination style="margin-top:10px;margin-bottom:10px" v-model="curr_page" :length="xtotal_page">
|
||||
</v-pagination>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
menufilterdatestart: false,
|
||||
menufilterdateend: false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
search_item_company: "",
|
||||
company_error_message: "",
|
||||
vnationalNumber: "",
|
||||
// mou_error_message: "",
|
||||
clr: "success",
|
||||
vparticipant: "",
|
||||
dialog_data_edit: false,
|
||||
text_not_edit: "",
|
||||
xid: "",
|
||||
dialogdeletealert: false,
|
||||
msgalert: "",
|
||||
headers: [{
|
||||
text: "NUMBER",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "COMPANY",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "STAR DATE - END DATE",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
// {
|
||||
// text: "AGREEMENT",
|
||||
// align: "Center",
|
||||
// sortable: false,
|
||||
// value: "mr",
|
||||
// width: "20%",
|
||||
// class: "pa-2 blue lighten-3 white--text"
|
||||
// },
|
||||
{
|
||||
text: "PARTISIPAN",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}]
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("admin/search")
|
||||
},
|
||||
computed: {
|
||||
vmcu() {
|
||||
return this.$store.state.admin.mcu
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.admin.search_status == 1
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.admin.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("admin/update_current_page", val)
|
||||
this.$store.commit("admin/update_last_id", -1)
|
||||
this.$store.dispatch("admin/search")
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.admin.total_mcu
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("admin/update_total_mcu", val)
|
||||
}
|
||||
},
|
||||
xsearch: {
|
||||
get() {
|
||||
return this.$store.state.admin.x_search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("admin/update_x_search", val)
|
||||
}
|
||||
},
|
||||
xact: {
|
||||
get() {
|
||||
return this.$store.state.admin.act
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("admin/update_act", val)
|
||||
}
|
||||
},
|
||||
dialog_form: {
|
||||
get() {
|
||||
return this.$store.state.admin.dialog_form
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("admin/update_dialog_form", val)
|
||||
},
|
||||
},
|
||||
loading_save: {
|
||||
get() {
|
||||
return this.$store.state.admin.loading_save
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("admin/update_loading_save", val)
|
||||
},
|
||||
},
|
||||
filterComputedDateFormattedStart() {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
filterComputedDateFormattedEnd() {
|
||||
return this.formatDate(this.xdateend)
|
||||
},
|
||||
xdatestart: {
|
||||
get() {
|
||||
return this.$store.state.admin.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("admin/update_start_date", val)
|
||||
}
|
||||
},
|
||||
xdateend: {
|
||||
get() {
|
||||
return this.$store.state.admin.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("admin/update_end_date", val)
|
||||
}
|
||||
},
|
||||
xcompany() {
|
||||
return this.$store.state.admin.companys
|
||||
},
|
||||
vcompany: {
|
||||
get() {
|
||||
return this.$store.state.admin.selected_company
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("admin/update_selected_company", val)
|
||||
// if (this.vcompany != undefined) {
|
||||
// this.$store.dispatch("admin/search_mou_multiple",
|
||||
// this.vcompany.M_CompanyID
|
||||
// )
|
||||
// }
|
||||
}
|
||||
},
|
||||
// xmou() {
|
||||
// return this.$store.state.admin.mous
|
||||
// },
|
||||
// vmou: {
|
||||
// get() {
|
||||
// return this.$store.state.admin.selected_mou_multiple
|
||||
// },
|
||||
// set(val) {
|
||||
// this.$store.commit("admin/update_selected_mou_multiple", val)
|
||||
// }
|
||||
// },
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.admin.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("admin/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
msgsnackbar() {
|
||||
return this.$store.state.admin.msg_success
|
||||
},
|
||||
dialog_error: {
|
||||
get() {
|
||||
return this.$store.state.admin.alert_error
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("admin/update_alert_error", val)
|
||||
},
|
||||
},
|
||||
msgError() {
|
||||
return this.$store.state.admin.error_message
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isSelected(p) {
|
||||
return p.Mgm_McuID == this.$store.state.admin.selected_mcu.Mgm_McuID
|
||||
},
|
||||
selectMe(selected) {
|
||||
this.$store.commit("admin/update_selected_mcu", selected)
|
||||
this.$store.commit("order/update_selected_mcu_id", selected.Mgm_McuID)
|
||||
this.$store.commit("order/update_readyconfirm", selected.readyconfirm)
|
||||
// set value selected company
|
||||
this.$store.commit("admin/update_companys", [
|
||||
{
|
||||
M_CompanyID: selected.M_CompanyID,
|
||||
M_CompanyName: selected.M_CompanyName
|
||||
}
|
||||
])
|
||||
this.$store.commit("admin/update_selected_company", {
|
||||
M_CompanyID: selected.M_CompanyID,
|
||||
M_CompanyName: selected.M_CompanyName
|
||||
})
|
||||
|
||||
// // Split string menjadi array berdasarkan koma
|
||||
// const mouIdArray = selected.M_MouID.split(", ");
|
||||
|
||||
// // Split string M_MouName menjadi array berdasarkan koma
|
||||
// const mouNameArray = selected.M_MouName.split(", ");
|
||||
|
||||
// Membuat array objek untuk diupdate
|
||||
// const mousArray = mouIdArray.map((id, index) => ({
|
||||
// M_MouID: id,
|
||||
// M_MouName: mouNameArray[index]
|
||||
// }));
|
||||
|
||||
// // Update state dengan array objek
|
||||
// this.$store.commit("admin/update_mous", mousArray);
|
||||
// this.$store.commit("admin/update_selected_mou_multiple", mousArray);
|
||||
},
|
||||
thr_search: _.debounce(function () {
|
||||
this.$store.dispatch("admin/search")
|
||||
}, 1000),
|
||||
thr_search_company: _.debounce(function () {
|
||||
this.$store.dispatch("admin/search_company", this.search_item_company)
|
||||
}, 2000),
|
||||
// thr_search_mou: _.debounce(function () {
|
||||
// this.$store.dispatch("admin/search_mou_multiple", this.vcompany.M_CompanyID)
|
||||
// }, 1000),
|
||||
companyValidation() {
|
||||
if (_.isEmpty(this.vcompany)) {
|
||||
this.company_error_message = 'Anda belum memilih company'
|
||||
}
|
||||
if (this.vcompany) {
|
||||
this.company_error_message = ""
|
||||
}
|
||||
},
|
||||
// mouValidation() {
|
||||
// if (_.isEmpty(this.vmou)) {
|
||||
// this.mou_error_message = 'Anda belum mengisi'
|
||||
// }
|
||||
// if (this.vmou) {
|
||||
// this.mou_error_message = ""
|
||||
// }
|
||||
// },
|
||||
resetAllInput() {
|
||||
this.vcompany = ""
|
||||
this.vnationalNumber = ""
|
||||
// this.vmou = ""
|
||||
this.vparticipant = ""
|
||||
this.company_error_message = ""
|
||||
// this.mou_error_message = ""
|
||||
},
|
||||
resetAllError() {
|
||||
this.company_error_message = ""
|
||||
// this.mou_error_message = ""
|
||||
},
|
||||
openForm() {
|
||||
this.$store.commit("admin/update_act", "add")
|
||||
this.$store.commit("admin/update_last_id", -1)
|
||||
this.resetAllInput()
|
||||
this.dialog_form = true
|
||||
},
|
||||
saveAdd() {
|
||||
this.companyValidation()
|
||||
// this.mouValidation()
|
||||
if (this.company_error_message === ""){
|
||||
// &&
|
||||
// this.mou_error_message === "") {
|
||||
|
||||
// let arrMouID = []
|
||||
// for (let i = 0; i < this.vmou.length; i++) {
|
||||
// const item = this.vmou[i];
|
||||
// // console.log(item)
|
||||
// arrMouID.push(item.M_MouID);
|
||||
// }
|
||||
// console.log(arrMouID)
|
||||
|
||||
let prm = {
|
||||
companyId: this.vcompany.M_CompanyID,
|
||||
nationalNumber: this.vnationalNumber,
|
||||
startdate: this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
// selectedMou: arrMouID,
|
||||
participant: this.vparticipant
|
||||
}
|
||||
|
||||
// console.log('cek prm', prm)
|
||||
this.$store.dispatch("admin/addMcu", prm)
|
||||
|
||||
}
|
||||
},
|
||||
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')}`
|
||||
},
|
||||
formatDateUI(dateStr) {
|
||||
if (!dateStr) return null;
|
||||
const [year, month, day] = dateStr.split('-');
|
||||
return `${day}-${month}-${year}`;
|
||||
},
|
||||
openEdit(data) {
|
||||
if (this.$store.state.order.total_mcuorder > 0) {
|
||||
this.text_not_edit = "Tidak bisa di edit karena sudah melakukan generate order!"
|
||||
this.dialog_data_edit = true
|
||||
} else {
|
||||
this.selectMe(data);
|
||||
this.dialog_form = true
|
||||
this.$store.commit("admin/update_act", "edit")
|
||||
this.xid = data.Mgm_McuID
|
||||
this.vcompany = data.M_CompanyID
|
||||
this.vnationalNumber = data.Mgm_McuNumberNational
|
||||
this.xdatestart = data.Mgm_McuStartDate
|
||||
this.xdateend = data.Mgm_McuEndDate
|
||||
// this.vmou = data.M_MouID
|
||||
// this.vmou = data.M_MouID.split(", ").map(Number)
|
||||
// console.log('data ouid',data.M_MouID.split(", ").map(Number))
|
||||
this.vparticipant = data.Mgm_McuTotalParticipant
|
||||
this.resetAllError()
|
||||
this.$store.commit("admin/update_last_id", data.Mgm_McuID)
|
||||
}
|
||||
},
|
||||
saveEdit() {
|
||||
this.companyValidation()
|
||||
// this.mouValidation()
|
||||
if (this.company_error_message === "" ){
|
||||
// &&
|
||||
// this.mou_error_message === "") {
|
||||
// let arrMouID = []
|
||||
// for (let i = 0; i < this.vmou.length; i++) {
|
||||
// const item = this.vmou[i];
|
||||
// // console.log(item)
|
||||
// arrMouID.push(item.M_MouID);
|
||||
// }
|
||||
// console.log(arrMouID)
|
||||
|
||||
let prm = {
|
||||
mgmmcuid: this.$store.state.admin.selected_mcu.Mgm_McuID,
|
||||
companyId: this.vcompany.M_CompanyID,
|
||||
nationalNumber: this.vnationalNumber,
|
||||
startdate: this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
// selectedMou: arrMouID,
|
||||
participant: this.vparticipant
|
||||
}
|
||||
|
||||
// console.log('cek prm', prm)
|
||||
this.$store.dispatch("admin/editMcu", prm)
|
||||
}
|
||||
},
|
||||
confirmDelete(data) {
|
||||
if (this.$store.state.order.total_mcuorder > 0) {
|
||||
this.text_not_edit = "Tidak bisa di hapus karena sudah melakukan generate order!"
|
||||
this.dialog_data_edit = true
|
||||
} else {
|
||||
this.selectMe(data)
|
||||
this.xid = data.Mgm_McuID
|
||||
this.msgalert = "Yakin, mau hapus mcu ?"
|
||||
|
||||
this.dialogdeletealert = true
|
||||
}
|
||||
},
|
||||
deleteRow() {
|
||||
this.$store.commit("admin/update_last_id", -1)
|
||||
let prm = {
|
||||
mgmmcuid: this.xid
|
||||
}
|
||||
this.$store.dispatch("admin/deleteMcu", prm)
|
||||
this.dialogdeletealert = false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
xsearch(val, old) {
|
||||
this.xsearch = val
|
||||
this.thr_search()
|
||||
},
|
||||
|
||||
search_item_company(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
|
||||
if (val.length < 1) {
|
||||
this.$store.dispatch("admin/search_company", this.search_item_company)
|
||||
return this.thr_search_company()
|
||||
}
|
||||
|
||||
if (val.length > 2) {
|
||||
this.$store.dispatch("admin/search_company", this.search_item_company)
|
||||
return this.thr_search_company()
|
||||
}
|
||||
},
|
||||
|
||||
// vmou(val, old) {
|
||||
// // console.log('val mou',val)
|
||||
// // console.log('old mou',old)
|
||||
// if (val == old) return
|
||||
// if (!val) return
|
||||
|
||||
// if (val.length < 1) {
|
||||
// this.$store.dispatch("admin/search_mou_multiple",
|
||||
// this.vcompany.M_CompanyID
|
||||
// )
|
||||
// return this.thr_search_mou()
|
||||
// }
|
||||
|
||||
// if (val.length > 2) {
|
||||
// this.$store.dispatch("admin/search_mou_multiple",
|
||||
// this.vcompany.M_CompanyID
|
||||
// )
|
||||
// return this.thr_search_mou()
|
||||
// }
|
||||
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
509
test/vuex/one-admin-mcu/components/oneAdminMcuRight.vue
Normal file
509
test/vuex/one-admin-mcu/components/oneAdminMcuRight.vue
Normal file
@@ -0,0 +1,509 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="dialog_data_empty" width="500">
|
||||
<v-card>
|
||||
<v-card-title class="headline grey lighten-2 pt-2 pb-2" primary-title>
|
||||
Perhatian
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<h6 class="display-1 text-center"><span class="blue--text">{{ text_data_empty }}</span></h6>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" flat @click="dialog_data_empty = false">
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<!-- ERROR DIALOG -->
|
||||
<v-dialog v-model="dialog_error" max-width="500px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span>ERROR !</span>
|
||||
<v-spacer></v-spacer>
|
||||
</v-card-title>
|
||||
<v-divider></v-divider>
|
||||
<div class="ma-3 red--text">{{ msgError }}</div>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" flat @click="dialog_error = false">Close</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<!-- END ERROR DIALOG -->
|
||||
<!-- Snackbar -->
|
||||
<v-snackbar v-show="this.total_order === 0 ? false : true" v-model="snackbar" :timeout="5000"
|
||||
:multi-line="false" :vertical="false" :top="true" :color="clr" :value="snackbar">
|
||||
{{ msgsnackbar }}
|
||||
<v-btn flat @click="snackbar = false"> Tutup </v-btn>
|
||||
</v-snackbar>
|
||||
<!-- End Snackbar -->
|
||||
<!-- Alert dialog -->
|
||||
<v-dialog v-model="dialogalert" 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="dialogalert = false">
|
||||
Tutup
|
||||
</v-btn>
|
||||
<v-btn color="primary" flat @click="saveGenerate()">
|
||||
Yakin lah
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<!-- End alert dialog -->
|
||||
<!-- Alert dialog -->
|
||||
<v-dialog v-model="dialogalertconfirm" max-width="30%">
|
||||
<v-card>
|
||||
<v-card-title class="headline green lighten-2 pt-2 pb-2" primary-title>
|
||||
Konfirmasi
|
||||
</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>
|
||||
{{ msgalertconfirm }}
|
||||
</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="dialogalertconfirm = false">
|
||||
Tutup
|
||||
</v-btn>
|
||||
<v-btn color="primary" flat @click="saveConfirm()">
|
||||
Yakin lah
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<!-- End alert dialog -->
|
||||
|
||||
<v-card class="mb-2 pa-2 ">
|
||||
<v-layout align-center row>
|
||||
<v-flex xs4>
|
||||
<v-text-field style="font-size:14px" label="No Lab / Nama" class="mr-1" v-model="xsearch"
|
||||
hide-details></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex v-show="Object.keys(this.$store.state.admin.selected_mcu).length != 0 ? true : false"
|
||||
text-md-right>
|
||||
<v-btn @click="doPrintPersentase()" color="primary" dark>Persentase <v-icon right
|
||||
dark>print</v-icon></v-btn>
|
||||
</v-flex>
|
||||
<v-flex v-show="Object.keys(this.$store.state.admin.selected_mcu).length != 0 ? true : false"
|
||||
text-md-right>
|
||||
<v-btn @click="doPrintExecutive()" color="orange" dark>Executive <v-icon right
|
||||
dark>print</v-icon></v-btn>
|
||||
</v-flex>
|
||||
<v-flex
|
||||
v-show="Object.keys(this.$store.state.admin.selected_mcu).length != 0 && this.$store.state.order.mcuorder.length === 0 ? true : false"
|
||||
text-md-right>
|
||||
<v-btn class="ma-2" color="secondary" @click="openOrder()">
|
||||
Generate Order
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex
|
||||
v-show="this.$store.state.order.readyconfirm == 'Y' ? true : false"
|
||||
text-md-right>
|
||||
<v-btn class="ma-2" color="success" @click="confirmOrder()">
|
||||
Konfirmasi
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
|
||||
<v-card class="mb-2" color="white">
|
||||
<v-layout align-center row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table :headers="headers" :items="vmcuorder" :loading="isLoading" hide-actions
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" @click="selectMe(props.item)"
|
||||
v-html="props.item.T_OrderHeaderLabNumber">
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" @click="selectMe(props.item)"
|
||||
v-html="props.item.M_PatientName">
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" @click="selectMe(props.item)">
|
||||
<v-chip v-if="props.item.Mcu_OrderStatus === 'N'" color="blue" text-color="white" small
|
||||
dark>NEW
|
||||
</v-chip>
|
||||
<v-chip v-if="props.item.Mcu_OrderStatus === 'S'" color="green" text-color="white" small
|
||||
dark>SENT
|
||||
</v-chip>
|
||||
<v-chip v-if="props.item.Mcu_OrderStatus === 'C'" color="orange" text-color="white"
|
||||
small dark>CONFIRM
|
||||
</v-chip>
|
||||
<v-chip v-if="props.item.Mcu_OrderStatus === 'P'" color="teal" text-color="white" small
|
||||
dark>PROCESSING
|
||||
</v-chip>
|
||||
<v-chip v-if="props.item.Mcu_OrderStatus === 'D'" color="secondary" text-color="white"
|
||||
small dark>PROCESSING LAB DONE
|
||||
</v-chip>
|
||||
<v-chip v-if="props.item.Mcu_OrderStatus === 'E'" color="red" text-color="white" small
|
||||
dark>ERROR
|
||||
</v-chip>
|
||||
<v-chip v-if="props.item.Mcu_OrderStatus === 'R'" color="primary" text-color="white"
|
||||
small dark>RE-SEND
|
||||
</v-chip>
|
||||
<v-chip v-if="props.item.Mcu_OrderStatus === 'F'" color="secondary" text-color="white"
|
||||
small dark>DONE NONLAB
|
||||
</v-chip>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-divider></v-divider>
|
||||
<v-layout>
|
||||
<v-flex>
|
||||
<v-pagination style="margin-top:10px;margin-bottom:10px" v-model="curr_page"
|
||||
:length="xtotal_page">
|
||||
</v-pagination>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card>
|
||||
|
||||
<one-dialog-print :title="printtitle" :width="printwidth" :height="550" :status="openprintpersentase"
|
||||
:urlprint="urlprintpersentase" @close-dialog-print="openprintpersentase = false"></one-dialog-print>
|
||||
<one-dialog-print :title="printtitle" :width="printwidth" :height="550" :status="openprintexecutive"
|
||||
:urlprint="urlprintexecutive" @close-dialog-print="openprintexecutive = false"></one-dialog-print>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
.searchbox .v-btn {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
table.v-table tbody td,
|
||||
table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
'one-dialog-print': httpVueLoader('../../common/oneDialogPrintX.vue')
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
msgalert: "",
|
||||
msgalertconfirm: "",
|
||||
clr: "success",
|
||||
urlprintpersentase: "",
|
||||
printtitle: '',
|
||||
printwidth: '80%',
|
||||
urlprintexecutive: "",
|
||||
headers: [{
|
||||
text: "NOMOR LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PASIEN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "STATUS",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}]
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
computed: {
|
||||
vmcuorder() {
|
||||
return this.$store.state.order.mcuorder
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.order.search_status == 1
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.order.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("order/update_current_page", val)
|
||||
this.$store.commit("order/update_last_id", -1)
|
||||
this.$store.dispatch("order/list_mcu_order")
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.order.total_mcuorder_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("order/update_total_mcuorder_page", val)
|
||||
}
|
||||
},
|
||||
xsearch: {
|
||||
get() {
|
||||
return this.$store.state.order.x_search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("order/update_x_search", val)
|
||||
}
|
||||
},
|
||||
selected_mcu_id() {
|
||||
return this.$store.state.order.selected_mcu_id
|
||||
},
|
||||
dialogalert: {
|
||||
get() {
|
||||
return this.$store.state.order.dialogalert
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("order/update_dialogalert", val)
|
||||
},
|
||||
},
|
||||
dialogalertconfirm: {
|
||||
get() {
|
||||
return this.$store.state.order.dialogalertconfirm
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("order/update_dialogalertconfirm", val)
|
||||
},
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.order.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("order/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
msgsnackbar() {
|
||||
return this.$store.state.order.msg_success
|
||||
},
|
||||
dialog_error: {
|
||||
get() {
|
||||
return this.$store.state.order.alert_error
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("order/update_alert_error", val)
|
||||
},
|
||||
},
|
||||
msgError() {
|
||||
return this.$store.state.order.error_message
|
||||
},
|
||||
text_data_empty() {
|
||||
return this.$store.state.order.text_empty
|
||||
},
|
||||
dialog_data_empty: {
|
||||
get() {
|
||||
return this.$store.state.order.dialog_is_active
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("order/update_dialog_is_active", val)
|
||||
}
|
||||
},
|
||||
total_order: {
|
||||
get() {
|
||||
return this.$store.state.order.total_order
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("order/update_total_order", val)
|
||||
}
|
||||
},
|
||||
openprintpersentase: {
|
||||
get() {
|
||||
return this.$store.state.order.open_print_persentase
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("order/update_open_print_persentase", false)
|
||||
}
|
||||
},
|
||||
openprintexecutive: {
|
||||
get() {
|
||||
return this.$store.state.order.open_print_executive
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("order/update_open_print_executive", false)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectMe(selected) {
|
||||
this.$store.commit("order/update_selected_mcuorder", selected)
|
||||
this.$store.commit("order/update_last_id", selected.Mcu_OrderID)
|
||||
},
|
||||
thr_search: _.debounce(function () {
|
||||
this.$store.dispatch("order/list_mcu_order")
|
||||
}, 1000),
|
||||
thr_search_mcu_order: _.debounce(function () {
|
||||
this.$store.dispatch("order/list_mcu_order")
|
||||
}, 1000),
|
||||
openOrder() {
|
||||
this.msgalert = "Yakin, Mau Generate Order ?"
|
||||
this.dialogalert = true
|
||||
},
|
||||
saveGenerate() {
|
||||
let prm = {
|
||||
mgmmcuid: this.$store.state.admin.selected_mcu.Mgm_McuID
|
||||
}
|
||||
|
||||
// console.log(mgmmcuid)
|
||||
this.$store.dispatch('order/insert_mcu_order', prm)
|
||||
},
|
||||
confirmOrder() {
|
||||
this.msgalertconfirm = "Yakin, Mau Dikonfirmasi ? Pastikan semua hasil resume individu sudah divalidasi."
|
||||
this.dialogalertconfirm = true
|
||||
},
|
||||
saveConfirm() {
|
||||
let prm = {
|
||||
mgmmcuid: this.$store.state.admin.selected_mcu.Mgm_McuID
|
||||
}
|
||||
|
||||
// console.log(mgmmcuid)
|
||||
this.$store.dispatch('order/confirm_mcu_order', prm)
|
||||
},
|
||||
doPrintPersentase() {
|
||||
id = this.$store.state.admin.selected_mcu.Mgm_McuID
|
||||
let user = one_user()
|
||||
this.printwidth = 1200
|
||||
this.printtitle = ""
|
||||
let rpt = 'pola_kelainan_mcu_001'
|
||||
this.urlprintpersentase = "/birt/run?__report=report/one/rekap/" + rpt + ".rptdesign&__format=pdf&PID=" + id + "&username=" + user.M_StaffName
|
||||
this.$store.commit("order/update_open_print_persentase", true)
|
||||
},
|
||||
doPrintExecutive() {
|
||||
id = this.$store.state.admin.selected_mcu.Mgm_McuID
|
||||
let user = one_user()
|
||||
this.printwidth = 1200
|
||||
this.printtitle = ""
|
||||
let rpt = 'executive_summary_mcu_001'
|
||||
this.urlprintexecutive = "/birt/run?__report=report/one/rekap/" + rpt + ".rptdesign&__format=pdf&PID=" + id + "&username=" + user.M_StaffName
|
||||
this.$store.commit("order/update_open_print_executive", true)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
xsearch(val, old) {
|
||||
this.xsearch = val
|
||||
this.thr_search()
|
||||
},
|
||||
selected_mcu_id(val, old) {
|
||||
this.thr_search_mcu_order()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user