Initial import
This commit is contained in:
302
one-ui/masterdata/one-md-nat-normal-value/api/normalvalue.js
Normal file
302
one-ui/masterdata/one-md-nat-normal-value/api/normalvalue.js
Normal file
@@ -0,0 +1,302 @@
|
||||
const URL = "/one-api/v1/masterdata/";
|
||||
|
||||
export async function search(token, code,name) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/search', {
|
||||
token:token,
|
||||
code: code,
|
||||
nama: name
|
||||
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function searchmethode(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/searchmethode',{token:token,search:prm});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function getsexreg(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/getsexreg',{token:token});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/save',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function newnormalvalue(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/newnormalvalue',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function xdelete(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/deletenilainormal',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function sendorder(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/sendorder',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function getnilainormal(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/getnilainormal',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function searchcompany(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/searchcompany',{token:token,search:prm});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getmou(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/getmou',{id:prm.Nat_TestID,token:token});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function savenewnilainormal(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/savenewnilainormal',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function savenewnilaiabnormal(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/savenewnilaiabnormal',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function saveeditnilainormal(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/saveeditnilainormal',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function savenormalvaluelang(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/savenormalvaluelang', prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function deletenilainormal(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/deletenilainormal',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function searchtest(token,tes,mouid) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'normalvalue/searchtest',{token:token,search:tes,mouid:mouid});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,485 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="dialogsuccess" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgsuccess}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout>
|
||||
<v-text-field class="xs4 ma-1" label="Kode" placeholder="Cari..." outline v-model="code" @keyup.enter="searchTest" hide-details></v-text-field>
|
||||
<v-text-field class="xs4 ma-1" label="Pemeriksaan" placeholder="Cari..." outline v-model="name" @keyup.enter="searchTest"
|
||||
hide-details></v-text-field>
|
||||
<!-- <span @click="searchTest" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span> -->
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="scroll-container" style="max-height:645px;overflow: auto;">
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table :headers="headers" :items="normalvalues" :loading="isLoading" :pagination.sync="pagination" 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_TestCode}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.Nat_TestName}}</td>
|
||||
</template>
|
||||
<template>
|
||||
<div class="text-xs-center">
|
||||
<v-pagination v-model="page" :length="15" :total-visible="7"></v-pagination>
|
||||
</div>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()"
|
||||
@close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
|
||||
|
||||
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="dialogformorder" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Form Perusahaan</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-form ref="formcompany">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-autocomplete label="Perusahaan*" v-model="xcompany" :items="xcompanies" :search-input.sync="search_company" auto-select-first
|
||||
no-filter item-text="M_CompanyName" return-object :loading="isLoading" no-data-text="Pilih Perusahaan">
|
||||
<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>
|
||||
<p v-if="checkError('requirexcompany')" class="error pl-2 pr-2" style="color:#fff">Pilih perusahaan dulu dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-select item-text="M_MouName" return-object :items="xmous" v-model="xmou" label="MOU*"></v-select>
|
||||
<p v-if="checkError('requirexmou')" class="error pl-2 pr-2" style="color:#fff">Pilih MOU dulu dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-menu ref="menusdate" v-model="menusdate" :close-on-content-click="false" :nudge-right="0" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field v-model="startComputedDateFormatted" label="Tgl. Order*" readonly v-on="on" @blur="date = deFormatedDate(startComputedDateFormatted)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xsdate" no-title @input="menusdate = false"></v-date-picker>
|
||||
<p v-if="checkError('requirexsdate')" class="error pl-2 pr-2" style="color:#fff">Tanggal order harus diisi dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-text-field v-model="xnote" label="Catatan"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogFormOrder()">Tutup</v-btn>
|
||||
<v-btn v-if="xact === 'new'" color="blue darken-1" flat @click="saveFormPerusahaan()">Simpan</v-btn>
|
||||
<v-btn v-if="xact === 'edit'" color="blue darken-1" flat @click="updateFormPerusahaan()">Simpan Perubahan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="dialogstatusorder" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Status</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-timeline>
|
||||
<v-timeline-item v-for="(status, i) in xstatuss" :key="i" :waktu="status.waktu" :user="status.user" small>
|
||||
<template>
|
||||
<span :class="`headline font-weight-bold cyan--text`" v-text="status.status"></span>
|
||||
</template>
|
||||
<div class="py-3">
|
||||
<h2 :class="`headline font-weight-light mb-3 cyan--text`"></h2>
|
||||
<div>
|
||||
{{status.waktu}}
|
||||
<p> [ {{status.user}} ] </p>
|
||||
</div>
|
||||
</div>
|
||||
</v-timeline-item>
|
||||
</v-timeline>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogStatusOrder()">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
</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;
|
||||
}
|
||||
|
||||
.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-dialog-info': httpVueLoader('../../../common/oneDialogInfo.vue'),
|
||||
'one-dialog-alert': httpVueLoader('../../../common/oneDialogAlert.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("normalvalue/getsexreg")
|
||||
this.$store.dispatch("normalvalue/search", {
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
checkError(value) {
|
||||
var errors = this.$store.state.normalvalue.errors
|
||||
if (errors.includes(value)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.Nat_TestID == this.$store.state.normalvalue.selected_normalvalue
|
||||
.Nat_TestID
|
||||
},
|
||||
searchTest() {
|
||||
this.$store.dispatch("normalvalue/search", {
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(pat) {
|
||||
if (this.$store.state.normalvalue.no_save == 0) {
|
||||
this.$store.commit("normalvalue/update_selected_normalvalue", pat)
|
||||
this.$store.commit("normalvalue/update_act_comp", 'edit')
|
||||
this.$store.dispatch("normalvalue/getnilainormal", {
|
||||
id: pat.Nat_TestID
|
||||
})
|
||||
} else {
|
||||
this.$store.commit("normalvalue/update_open_alert_confirmation", true)
|
||||
}
|
||||
|
||||
},
|
||||
closeAlertConfirmation() {
|
||||
this.$store.commit("normalvalue/update_open_alert_confirmation", false)
|
||||
},
|
||||
forgetAlertConfirmation() {
|
||||
this.$store.commit("normalvalue/update_no_save", 0)
|
||||
this.$store.commit("normalvalue/update_open_alert_confirmation", false)
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("normalvalue/update_alert_success", val)
|
||||
},
|
||||
updateDialogFormOrder() {
|
||||
this.$store.commit("normalvalue/update_dialog_form_order", false)
|
||||
},
|
||||
updateDialogStatusOrder() {
|
||||
this.$store.commit("normalvalue/update_dialog_status_order", false)
|
||||
},
|
||||
setNewOrder() {
|
||||
this.$store.commit("normalvalue/update_selected_normalvalue", {})
|
||||
this.$store.commit("normalvalue/update_act_comp", 'new')
|
||||
this.$store.commit("normalvalue/update_dialog_form_order", true)
|
||||
this.search_company = ''
|
||||
},
|
||||
setStatusOrder() {
|
||||
this.$store.commit("normalvalue/update_selected_normalvalue", {})
|
||||
this.$store.commit("normalvalue/update_dialog_status_order", true)
|
||||
this.search_company = ''
|
||||
},
|
||||
saveFormPerusahaan() {
|
||||
this.$store.commit("normalvalue/update_errors", [])
|
||||
var errors = this.$store.state.normalvalue.errors
|
||||
if (_.isEmpty(this.xcompany)) {
|
||||
errors.push("requirexcompany")
|
||||
}
|
||||
if (_.isEmpty(this.xmou)) {
|
||||
errors.push("requirexmou")
|
||||
}
|
||||
if (_.isEmpty(this.xsdate)) {
|
||||
errors.push("requirexsdate")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
this.$store.dispatch("normalvalue/newnormalvalue", {
|
||||
companyid: this.xcompany.M_CompanyID,
|
||||
mouid: this.xmou.M_MouID,
|
||||
sdate: this.xsdate,
|
||||
note: this.xnote
|
||||
})
|
||||
}
|
||||
},
|
||||
thr_search_company: _.debounce(function () {
|
||||
this.$store.dispatch("normalvalue/searchcompany", this.search_company)
|
||||
}, 2000),
|
||||
closeDialogSuccess() {
|
||||
let arrnormalvalue = this.$store.state.normalvalue.normalvalues
|
||||
var idx = _.findIndex(arrnormalvalue, item => item.Nat_TestID === this.$store.state
|
||||
.normalvalue.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("normalvalue/search", {
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
lastid: idx
|
||||
})
|
||||
this.$store.commit("normalvalue/update_dialog_success", false)
|
||||
},
|
||||
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')}`
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.normalvalue.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("normalvalue/update_dialog_success", val)
|
||||
}
|
||||
},
|
||||
msgsuccess() {
|
||||
return this.$store.state.normalvalue.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.normalvalue.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("normalvalue/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.normalvalue.search_status == 1
|
||||
},
|
||||
xact() {
|
||||
return this.$store.state.normalvalue.act_comp
|
||||
},
|
||||
normalvalues() {
|
||||
return this.$store.state.normalvalue.normalvalues
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.normalvalue.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("normalvalue/update_open_alert_confirmation", val)
|
||||
}
|
||||
},
|
||||
dialogformorder() {
|
||||
return this.$store.state.normalvalue.dialog_form_order
|
||||
},
|
||||
dialogstatusorder() {
|
||||
return this.$store.state.normalvalue.dialog_status_order
|
||||
},
|
||||
xdate: {
|
||||
get() {
|
||||
return this.$store.state.normalvalue.date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("normalvalue/update_date", val)
|
||||
}
|
||||
},
|
||||
xnote: {
|
||||
get() {
|
||||
return this.$store.state.normalvalue.note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("normalvalue/update_note", val)
|
||||
}
|
||||
},
|
||||
xcompanies() {
|
||||
return this.$store.state.normalvalue.companies
|
||||
},
|
||||
xcompany: {
|
||||
get() {
|
||||
return this.$store.state.normalvalue.company
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("normalvalue/update_company", val)
|
||||
this.$store.dispatch("normalvalue/getmou", this.$store.state.normalvalue.company)
|
||||
}
|
||||
},
|
||||
xmous() {
|
||||
return this.$store.state.normalvalue.mous
|
||||
},
|
||||
xmou: {
|
||||
get() {
|
||||
return this.$store.state.normalvalue.mou
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("normalvalue/update_mou", val)
|
||||
}
|
||||
},
|
||||
startComputedDateFormatted() {
|
||||
return this.formatDate(this.xsdate)
|
||||
},
|
||||
xsdate: {
|
||||
get() {
|
||||
return this.$store.state.normalvalue.sdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("normalvalue/update_sdate", val)
|
||||
}
|
||||
},
|
||||
xstatuss() {
|
||||
return this.$store.state.normalvalue.statuss
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
code: '',
|
||||
name: '',
|
||||
search_company: '',
|
||||
menusdate: false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
page: 1,
|
||||
headers: [{
|
||||
text: "KODE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "40%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination: {
|
||||
ascending: true,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'Nat_TestCode',
|
||||
totalItems: this.$store.state.normalvalue.total_normalvalues
|
||||
},
|
||||
statuss: [{
|
||||
waktu: '16-07-2019 10:00',
|
||||
status: 'Order Dibuat',
|
||||
user: 'Nagita Slavina'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 11:00',
|
||||
status: 'Order Dikirim',
|
||||
user: 'Nagita Slavina'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 12:00',
|
||||
status: 'Order dikonfirmasi',
|
||||
user: 'Chacha Frederica'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 13:00',
|
||||
status: 'Telah dibuat Surat Jalan',
|
||||
user: 'Chacha Frederica'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 14:00',
|
||||
status: 'Kurir akan mengambil sampel',
|
||||
user: 'Satria Subiantoro'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
search_company(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.normalvalue.update_autocomplete_status == 1) return
|
||||
this.thr_search_company()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
77
one-ui/masterdata/one-md-nat-normal-value/index.php
Normal file
77
one-ui/masterdata/one-md-nat-normal-value/index.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>One</title>
|
||||
<link rel="stylesheet" href="../../libs/vendor/css/google-fonts.css">
|
||||
<link rel="stylesheet" href="../../libs/vendor/css/icomoon-fonts.css">
|
||||
<link rel="stylesheet" href="../../libs/vendor/css/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
<one-navbar></one-navbar>
|
||||
<v-content class="blue lighten-5" >
|
||||
<v-container fluid fill-height class="pl-1 pr-1 pt-2 pb-2">
|
||||
<v-layout row wrap >
|
||||
<v-flex xs3 class="left" fill-height pa-1>
|
||||
<!-- komponen kiri -->
|
||||
<one-md-test-list></one-md-test-list>
|
||||
</v-flex>
|
||||
<v-flex xs9 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<one-md-normal-value></one-md-normal-value>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-content>
|
||||
<one-footer> </one-footer>
|
||||
</v-app>
|
||||
</div>
|
||||
|
||||
<!-- Vendor -->
|
||||
<script src="../../libs/vendor/moment.min.js"></script>
|
||||
<script src="../../libs/vendor/numeral.min.js"></script>
|
||||
<script src="../../libs/vendor/moment-locale-id.js"></script>
|
||||
<script src="../../libs/vendor/lodash.js"></script>
|
||||
<script src="../../libs/vendor/axios.min.js"></script>
|
||||
<script src="../../libs/vendor/vue.js"></script>
|
||||
<script src="../../libs/vendor/vuex.js"></script>
|
||||
<script src="../../libs/vendor/vuetify.js"></script>
|
||||
<script src="../../libs/vendor/httpVueLoader.js"></script>
|
||||
<script src="../../libs/one_global.js"></script>
|
||||
<!-- App Script -->
|
||||
<?php
|
||||
$ts = "?ts=" . Date("ymdhis");
|
||||
?>
|
||||
<script type="module">
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for positioning
|
||||
// window.store = store;
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../apps/components/oneNavbarComponentNoMenu.vue'),
|
||||
'one-footer': httpVueLoader('../../apps/components/oneFooter.vue'),
|
||||
'one-md-test-list': httpVueLoader('./components/mdTestList.vue'),
|
||||
'one-md-normal-value': httpVueLoader('./components/mdNormalValue.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
665
one-ui/masterdata/one-md-nat-normal-value/modules/normalvalue.js
Normal file
665
one-ui/masterdata/one-md-nat-normal-value/modules/normalvalue.js
Normal file
@@ -0,0 +1,665 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/normalvalue.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
last_id: -1,
|
||||
last_saved_id: -1,
|
||||
x_pat_id: 0,
|
||||
act: 'edit',
|
||||
act_comp: 'new',
|
||||
act_pat: 'new',
|
||||
act_pat_abnormal: 'new',
|
||||
act_send: 'N',
|
||||
get_data_status: 0,
|
||||
search_normalvalue: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
dialog_form_order: false,
|
||||
dialog_edit_form_order:false,
|
||||
dialog_status_order: false,
|
||||
norm: '',
|
||||
normalvalue_name: '',
|
||||
normalvalues: [],
|
||||
total_normalvalues: 0,
|
||||
normalvalue_nilainormal: [],
|
||||
date: '',
|
||||
note: '',
|
||||
sdate:moment(new Date()).format('YYYY-MM-DD'),
|
||||
companies: [],
|
||||
company: {},
|
||||
mous: [],
|
||||
mou: {},
|
||||
total_normalvalue: 0,
|
||||
selected_normalvalue: {},
|
||||
save_status: 0,
|
||||
btn_save_seen: true,
|
||||
pgrs_save: false,
|
||||
save_error_message: '',
|
||||
no_save: 0,
|
||||
open_alert_confirmation: false,
|
||||
alert_success: false,
|
||||
msg_success: "",
|
||||
dialog_success: false,
|
||||
dialog_confirmation_delete: false,
|
||||
msg_confirmation_delete: "",
|
||||
dialog_confirmation_send: false,
|
||||
msg_confirmation_send: "",
|
||||
dialog_confirmation_delete_pat: false,
|
||||
msg_confirmation_delete_pat: "",
|
||||
autocomplete_status: 0,
|
||||
dialog_form_nilainormal: false,
|
||||
dialog_form_nilaiabnormal: false,
|
||||
errors: [],
|
||||
nilainormals: [],
|
||||
minage: '',
|
||||
maxage: '',
|
||||
minvalue: '',
|
||||
maxvalue: '',
|
||||
note: '',
|
||||
description: '',
|
||||
sexes: [],
|
||||
selected_sex: {},
|
||||
orderautotests:[],
|
||||
orderautotest:{},
|
||||
ordertests:[],
|
||||
deleted_ordertests:[],
|
||||
statuss:[],
|
||||
open_print_note:false,
|
||||
methodes: [],
|
||||
methode: {},
|
||||
normalvaluetypees: [],
|
||||
selected_normalvaluetype: {},
|
||||
flages: [],
|
||||
selected_flag: {},
|
||||
ageunites: [],
|
||||
selected_ageunit: {},
|
||||
validdate:moment(new Date()).format('YYYY-MM-DD'),
|
||||
selected_filter_sex:{},
|
||||
selected_filter_flag:{},
|
||||
f_sexs:[],
|
||||
f_flags:[]
|
||||
|
||||
},
|
||||
mutations: {
|
||||
update_selected_filter_sex(state, val) {
|
||||
state.selected_filter_sex = val
|
||||
},
|
||||
update_selected_filter_flag(state, val) {
|
||||
state.selected_filter_flag = val
|
||||
},
|
||||
update_f_sexs(state, val) {
|
||||
state.f_sexs = val
|
||||
},
|
||||
update_f_flags(state, val) {
|
||||
state.f_flags = val
|
||||
},
|
||||
update_x_pat_id(state, val) {
|
||||
state.x_pat_id = val
|
||||
},
|
||||
update_last_id(state, val) {
|
||||
state.last_id = val
|
||||
},
|
||||
update_last_saved_id(state, val) {
|
||||
state.last_saved_id = val
|
||||
},
|
||||
update_act(state, val) {
|
||||
state.act = val
|
||||
},
|
||||
update_act_comp(state, val) {
|
||||
state.act_comp = val
|
||||
},
|
||||
update_act_pat(state, val) {
|
||||
state.act_pat = val
|
||||
},
|
||||
update_act_pat_abnormal(state, val) {
|
||||
state.act_pat_abnormal = val
|
||||
},
|
||||
update_act_send(state, val) {
|
||||
state.act_send = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_search_error_message(state, normalvalue) {
|
||||
state.search_error_message = normalvalue
|
||||
},
|
||||
update_search_normalvalue(state, normalvalue) {
|
||||
state.search_normalvalue = normalvalue
|
||||
},
|
||||
update_dialog_form_order(state, val) {
|
||||
state.dialog_form_order = val
|
||||
},
|
||||
update_dialog_edit_form_order(state, val) {
|
||||
state.dialog_edit_form_order = val
|
||||
},
|
||||
update_dialog_status_order(state, val) {
|
||||
state.dialog_status_order = val
|
||||
},
|
||||
update_normalvalue_name(state, val) {
|
||||
state.normalvalue_name = val
|
||||
},
|
||||
update_date(state, val) {
|
||||
state.date = val
|
||||
},
|
||||
update_sdate(state,val){
|
||||
state.sdate = val
|
||||
},
|
||||
update_note(state, val) {
|
||||
state.note = val
|
||||
},
|
||||
update_normalvalues(state, data) {
|
||||
state.normalvalues = data
|
||||
},
|
||||
update_selected_normalvalue(state, val) {
|
||||
state.selected_normalvalue = val
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_btn_save_seen(state, val) {
|
||||
state.btn_save_seen = val
|
||||
},
|
||||
update_pgrs_save(state, val) {
|
||||
state.pgrs_save = val
|
||||
},
|
||||
update_save_error_message(state, msg) {
|
||||
state.save_error_message = ''
|
||||
},
|
||||
update_no_save(state, val) {
|
||||
state.no_save = val
|
||||
},
|
||||
update_open_alert_confirmation(state, val) {
|
||||
state.open_alert_confirmation = val
|
||||
},
|
||||
update_alert_success(state, val) {
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_success(state, val) {
|
||||
state.msg_success = val
|
||||
},
|
||||
update_dialog_success(state, val) {
|
||||
state.dialog_success = val
|
||||
},
|
||||
update_dialog_confirmation_delete(state, val) {
|
||||
state.dialog_confirmation_delete = val
|
||||
},
|
||||
update_msg_confirmation_delete(state, val) {
|
||||
state.msg_confirmation_delete = val
|
||||
},
|
||||
update_dialog_confirmation_send(state, val) {
|
||||
state.dialog_confirmation_send = val
|
||||
},
|
||||
update_msg_confirmation_send(state, val) {
|
||||
state.msg_confirmation_send = val
|
||||
},
|
||||
update_dialog_confirmation_delete_pat(state, val) {
|
||||
state.dialog_confirmation_delete_pat = val
|
||||
},
|
||||
update_msg_confirmation_delete_pat(state, val) {
|
||||
state.msg_confirmation_delete_pat = val
|
||||
},
|
||||
update_nilainormals(state, val) {
|
||||
state.nilainormals = val
|
||||
},
|
||||
update_autocomplete_status(state, val) {
|
||||
state.autocomplete_status = val
|
||||
},
|
||||
update_dialog_form_nilainormal(state, val) {
|
||||
state.dialog_form_nilainormal = val
|
||||
},
|
||||
update_dialog_form_nilaiabnormal(state, val) {
|
||||
state.dialog_form_nilaiabnormal = val
|
||||
},
|
||||
update_label_nilainormal(state, val) {
|
||||
state.label_nilainormal = val
|
||||
},
|
||||
update_companies(state, val) {
|
||||
state.companies = val
|
||||
},
|
||||
update_company(state, val) {
|
||||
state.company = val
|
||||
},
|
||||
update_mous(state, val) {
|
||||
state.mous = val
|
||||
},
|
||||
update_mou(state, val) {
|
||||
state.mou = val
|
||||
},
|
||||
update_search_status(state, val) {
|
||||
state.search_status = val
|
||||
},
|
||||
update_errors(state, val) {
|
||||
state.errors = val
|
||||
},
|
||||
update_total_normalvalues(state, val) {
|
||||
state.total_normalvalues = val
|
||||
},
|
||||
update_minage(state, val) {
|
||||
state.minage = val
|
||||
},
|
||||
update_maxage(state, val) {
|
||||
state.maxage = val
|
||||
},
|
||||
update_minvalue(state, val) {
|
||||
state.minvalue = val
|
||||
},
|
||||
update_maxvalue(state, val) {
|
||||
state.maxvalue = val
|
||||
},
|
||||
update_note(state, val) {
|
||||
state.note = val
|
||||
},
|
||||
update_description(state, val) {
|
||||
state.description = val
|
||||
},
|
||||
update_noref(state, val) {
|
||||
state.noref = val
|
||||
},
|
||||
update_nama_pasien(state, val) {
|
||||
state.namapasien = val
|
||||
},
|
||||
update_sexes(state, val) {
|
||||
state.sexes = val
|
||||
},
|
||||
update_selected_sex(state, val) {
|
||||
state.selected_sex = val
|
||||
},
|
||||
update_orderautotests(state,data){
|
||||
state.orderautotests = data
|
||||
},
|
||||
update_orderautotest(state,val){
|
||||
state.orderautotest = val
|
||||
},
|
||||
update_ordertests(state,data){
|
||||
state.ordertests = data
|
||||
},
|
||||
update_deleted_ordertests(state,data){
|
||||
state.deleted_ordertests = data
|
||||
},
|
||||
update_statuss(state,data){
|
||||
state.statuss = data
|
||||
},
|
||||
update_open_print_note(state,val) {
|
||||
state.open_print_note=val
|
||||
},
|
||||
update_methodes(state, data) {
|
||||
state.methodes = data
|
||||
},
|
||||
update_methode(state, val) {
|
||||
state.methode = val
|
||||
},
|
||||
update_normalvaluetypees(state, val) {
|
||||
state.normalvaluetypees = val
|
||||
},
|
||||
update_selected_normalvaluetype(state, val) {
|
||||
state.selected_normalvaluetype = val
|
||||
},
|
||||
update_flages(state, val) {
|
||||
state.flages = val
|
||||
},
|
||||
update_selected_flag(state, val) {
|
||||
state.selected_flag = val
|
||||
},
|
||||
update_ageunites(state, val) {
|
||||
state.ageunites = val
|
||||
},
|
||||
update_selected_ageunit(state, val) {
|
||||
state.selected_ageunit = val
|
||||
},
|
||||
update_validdate(state,val){
|
||||
state.validdate = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_normalvalue", 1)
|
||||
try {
|
||||
let resp = await api.search(one_token(), prm.code, prm.name)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_normalvalue", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_normalvalue", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_normalvalues", data.records)
|
||||
context.commit("update_total_normalvalues", data.total)
|
||||
context.commit("update_no_save", 0)
|
||||
|
||||
context.commit("update_selected_normalvalue", data.records[0])
|
||||
var pat = data.records[0]
|
||||
context.commit("update_normalvalue_name", pat.Nat_TestName)
|
||||
context.dispatch("getnilainormal", {
|
||||
id: pat.Nat_TestID,
|
||||
methodename : '',
|
||||
sexid: 0,
|
||||
flagid: 0
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_normalvalue", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async getsexreg(context) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.getsexreg(one_token())
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status", 3)
|
||||
} else {
|
||||
context.commit("update_get_data_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_sexes", data.records.sexes)
|
||||
context.commit("update_normalvaluetypees", data.records.normalvaluetypees)
|
||||
context.commit("update_flages", data.records.flages)
|
||||
context.commit("update_ageunites", data.records.ageunites)
|
||||
context.commit("update_f_sexs",data.records.f_sexs)
|
||||
context.commit("update_f_flags",data.records.f_flags)
|
||||
context.commit("update_selected_filter_sex",data.records.f_sexs[0])
|
||||
context.commit("update_selected_filter_flag",data.records.f_flags[0])
|
||||
prm.sexid = data.records.f_sexs[0].Nat_SexID
|
||||
prm.flagid = data.records.f_flags[0].Nat_FlagID
|
||||
context.dispatch("getnilainormal",prm)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
}
|
||||
},
|
||||
async save(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_last_id", prm.Nat_TestID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data pasien " + prm.M_PatientName + " sudah terupdate dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async newnormalvalue(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.newnormalvalue(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
console.log(resp.data.id)
|
||||
context.commit("update_last_id", resp.data.id)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data berhasil disimpan"
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_dialog_form_order", false)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async delete(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.xdelete(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_last_id", 0)
|
||||
context.commit("update_dialog_confirmation_delete", false)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data pasien " + prm.M_PatientName + " sudah dihapus dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_normalvalue_name", '')
|
||||
context.commit("update_selected_title", {})
|
||||
context.commit("update_selected_sex", {})
|
||||
context.commit("update_selected_religion", {})
|
||||
context.commit("update_dob", '')
|
||||
context.commit("update_hp", '')
|
||||
context.commit("update_phone", '')
|
||||
context.commit("update_email", '')
|
||||
context.commit("update_selected_kartuidentitas", {})
|
||||
context.commit("update_noidentitas", '')
|
||||
context.commit("update_note", '')
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async sendorder(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.sendorder(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_confirmation_send", false)
|
||||
context.commit("update_last_id", prm.Nat_TestID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Permintaan nomor " + prm.Nat_TestNumber + " sudah berhasil dikirim ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async getnilainormal(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.getnilainormal(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_nilainormals", data.records)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async searchmethode(context, prm) {
|
||||
context.commit("update_autocomplete_status", 1)
|
||||
try {
|
||||
let resp = await api.searchmethode(one_token(), prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_methodes", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
}
|
||||
},
|
||||
async searchcompany(context, prm) {
|
||||
context.commit("update_autocomplete_status", 1)
|
||||
try {
|
||||
let resp = await api.searchcompany(one_token(), prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_companies", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
}
|
||||
},
|
||||
async getmou(context, prm) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.getmou(one_token(), prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status", 3)
|
||||
} else {
|
||||
context.commit("update_get_data_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_mous", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
}
|
||||
},
|
||||
async searchtest(context,prm) {
|
||||
context.commit("update_autocomplete_status",1)
|
||||
try {
|
||||
let resp= await api.searchtest(one_token(), prm.tes, prm.mouid)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_orderautotests",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
}
|
||||
},
|
||||
async savenewnilainormal(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.savenewnilainormal(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_form_nilainormal", false)
|
||||
context.commit("update_last_id", prm.Nat_NormalValueNat_TestID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan data normal value pemeriksaan " + prm.Nat_TestName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async saveeditnilainormal(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.saveeditnilainormal(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_form_nilainormal", false)
|
||||
context.commit("update_last_id", prm.Nat_NormalValueNat_TestID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan data nilai normal pemeriksaan " + prm.Nat_TestName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async savenewnilaiabnormal(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.savenewnilaiabnormal(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_form_nilaiabnormal", false)
|
||||
context.commit("update_last_id", prm.Nat_NormalValueNat_TestID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan data nilai abnormal pemeriksaan " + prm.Nat_TestName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async savenormalvaluelang(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.savenormalvaluelang(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_form_nilainormal", false)
|
||||
context.commit("update_last_id", prm.Nat_NormalValueNat_TestID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan bahasa nilai normal sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async deletenilainormal(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.deletenilainormal(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_confirmation_delete_pat", false)
|
||||
context.commit("update_last_id", prm.Nat_NormalValueNat_TestID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penghapusan data nilai normal dari pemeriksaan " + prm.Nat_TestName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
23
one-ui/masterdata/one-md-nat-normal-value/store.js
Normal file
23
one-ui/masterdata/one-md-nat-normal-value/store.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import normalvalue from "./modules/normalvalue.js";
|
||||
import system from "../../apps/modules/system/system.js";
|
||||
export const store = new Vuex.Store({
|
||||
modules: {
|
||||
normalvalue: normalvalue,
|
||||
system:system
|
||||
},
|
||||
state: {
|
||||
|
||||
},
|
||||
mutations: {
|
||||
|
||||
},
|
||||
actions: {
|
||||
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user