Initial import
This commit is contained in:
348
one-ui/test_x_old/vuex/one-mcu-agreement/api/samplecall.js
Normal file
348
one-ui/test_x_old/vuex/one-mcu-agreement/api/samplecall.js
Normal file
@@ -0,0 +1,348 @@
|
||||
const URL = "/one-api/mockup/mcu/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/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 getstationstatus(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/getstationstatus',{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 getagreementtype(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/getagreementtype',{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 searchcompany(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/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 saveagreement(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/saveagreement',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 save(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/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 newmcu_agreement(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/newmcu_agreement',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(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/getmou',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 + 'mcu_agreement/deletemcu_agreement',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 getaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/getaddress',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 searchcity(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/searchcity',{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 getdistrict(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/getdistrict',{id:prm.M_CityID,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 getkelurahan(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/getkelurahan',{token:token,id:prm.M_DistrictID});
|
||||
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 savenewaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/savenewaddress',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 saveeditaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/saveeditaddress',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 deleteaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/deleteaddress',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 getsampletypes(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/getsampletypes',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 doaction(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_agreement/doaction',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
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,755 @@
|
||||
<template>
|
||||
<v-layout class="mb-2" column>
|
||||
<v-card class="mb-2">
|
||||
<v-layout align-center row>
|
||||
<v-flex mt-1 mb-1 xs6>
|
||||
<v-subheader font-weight-bold> BERITA ACARA [ <span style="color:#2196F3;font-weight: 900;">{{xnumbering}}</span> ]</v-subheader>
|
||||
</v-flex>
|
||||
<v-flex mt-1 align-right class="text-xs-right align-center" mb-1 xs6>
|
||||
<v-btn small @click="saveAgreement()" color="info">SIMPAN</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2">
|
||||
<v-layout row>
|
||||
<v-flex mt-1 mb-1 xs12>
|
||||
<v-subheader>PERUSAHAAN</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-1 row>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-autocomplete
|
||||
label="PERUSAHAAN"
|
||||
v-model="selected_company"
|
||||
:items="xcompanies"
|
||||
:search-input.sync="search_company"
|
||||
auto-select-first
|
||||
no-filter
|
||||
item-text="name"
|
||||
return-object
|
||||
:loading="isLoading"
|
||||
no-data-text="Tidak ada data perusahaan"
|
||||
>
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.name"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs3>
|
||||
<v-text-field v-model="company_cpname" label="CP [NAMA]"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs3>
|
||||
<v-text-field v-model="company_cphp" label="CP [HP]"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2">
|
||||
<v-layout row>
|
||||
<v-flex mt-1 mb-1 xs12>
|
||||
<v-subheader>LINGKUP PEKERJAAN</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-select
|
||||
hide-details
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="xagreementtypes"
|
||||
v-model="selected_agreementtype"
|
||||
label="TIPE AGREEMENT"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-select
|
||||
hide-details
|
||||
:readonly="_.isEmpty(selected_company)"
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="xmou"
|
||||
v-model="selected_mou"
|
||||
label="MOU"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex pa-1 xs4>
|
||||
<v-textarea v-model="participants" label="JUMLAH PESERTA" auto-grow outlined rows="1"></v-textarea>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs4>
|
||||
<v-textarea v-model="resulttype_report" auto-grow outlined rows="1" label="SISTEM PELAPORAN HASIL"></v-textarea>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs4>
|
||||
<v-textarea v-model="special_requirement" auto-grow outlined rows="1" label="PERSYARATAN LAINNYA"></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2">
|
||||
<v-layout row>
|
||||
<v-flex mt-1 mb-1 xs12>
|
||||
<v-subheader>PELAKSANAAN</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-text-field v-model="implementation_date" label="TANGGAL PELAKSANAAN" hide-details></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-text-field v-model="implementation_time" label="WAKTU PELAKSANAAN" hide-details></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-text-field v-model="implementation_place" label="TEMPAT PELAKSANAAN"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-text-field v-model="setupinstrument_time" label="WAKTU PASANG ALAT"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2">
|
||||
<v-layout row>
|
||||
<v-flex mt-1 mb-1 xs12>
|
||||
<v-subheader>KESEPAKATAN HARGA</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex pa-1 xs4>
|
||||
<v-text-field v-model="normal_price" hide-details label="HARGA NORMAL"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs4>
|
||||
<v-text-field v-model="agreement_price" hide-details label="HARGA KESEPAKATAN"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs4>
|
||||
<v-text-field v-model="discount_price" hide-details label="DISKON"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-text-field v-model="billing_system" label="SISTEM PENAGIHAN"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-text-field v-model="duedate" label="JATUH TEMPO [HARI]" hint="maks. setelah invoice diterima"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2">
|
||||
<v-layout row>
|
||||
<v-flex mt-1 mb-1 xs12>
|
||||
<v-subheader>FASILITAS</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex pa-1 xs12>
|
||||
<v-text-field v-model="foods" label="MAKAN PAGI / SNACK"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2">
|
||||
<v-layout row>
|
||||
<v-flex mt-1 mb-1 xs12>
|
||||
<v-subheader>PENYERAHAN HASIL PEKERJAAN</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-text-field v-model="sendresult_date" hint="maks. setelah MCU" label="WAKTU PENYERAHAN [HARI]"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-text-field v-model="sendresult_place" label="TEMPAT PENAGIHAN"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-text-field v-model="sendresult_cpname" label="CP [NAMA]"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-text-field v-model="sendresult_cphp" label="CP [HP]" ></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2">
|
||||
<v-layout row>
|
||||
<v-flex mt-1 mb-1 xs12>
|
||||
<v-subheader>JANJI HASIL SISTEM</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex xs6 pa-1>
|
||||
<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
|
||||
v-model="filterComputedDateFormattedStart"
|
||||
label="Tanggal Pelaksanaan"
|
||||
|
||||
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-flex xs6 pa-1>
|
||||
<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
|
||||
v-model="filterComputedDateFormattedEnd"
|
||||
label="Tanggal Selesai"
|
||||
|
||||
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-layout pa-2 row>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-text-field
|
||||
label="Bulan"
|
||||
v-model="xmonth"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-text-field
|
||||
label="Minggu"
|
||||
v-model="xweek"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-text-field
|
||||
label="Hari"
|
||||
v-model="xday"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-text-field
|
||||
label="Jam (hh:mm)"
|
||||
v-model="attime"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4 pa-1>
|
||||
<v-checkbox v-model="flagattime" label="Pada Jam ?"></v-checkbox>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2">
|
||||
<v-layout row>
|
||||
<v-flex mt-1 mb-1 xs12>
|
||||
<v-subheader>PELAKSANA PEMASARAN</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex pa-1 xs12>
|
||||
<v-text-field v-model="marketing_staff" label="NAMA STAF"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2">
|
||||
<v-layout row>
|
||||
<v-flex mt-1 mb-1 xs12>
|
||||
<v-subheader>CATATAN</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex pa-1 pt-1 xs12>
|
||||
<v-textarea v-model="notes" style="padding-top:0" auto-grow outlined rows="1" single-line></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
search_company: "",
|
||||
isLoading: false,
|
||||
days: [
|
||||
{ id: "1", name: "Minggu" },
|
||||
{ id: "2", name: "Senin" },
|
||||
{ id: "3", name: "Selasa" },
|
||||
{ id: "4", name: "Rabu" },
|
||||
{ id: "5", name: "Kamis" },
|
||||
{ id: "6", name: "Jumat" },
|
||||
{ id: "7", name: "Sabtu" }
|
||||
],
|
||||
weeks: [
|
||||
{ id: "1", name: "Pertama" },
|
||||
{ id: "2", name: "Kedua" },
|
||||
{ id: "3", name: "Ketiga" },
|
||||
{ id: "4", name: "Keempat" }
|
||||
],
|
||||
months:[
|
||||
{ id: "1", name: "Januari" },
|
||||
{ id: "2", name: "Pebruari" },
|
||||
{ id: "3", name: "Maret" },
|
||||
{ id: "4", name: "April" },
|
||||
{ id: "5", name: "Mei" },
|
||||
{ id: "6", name: "Juni" },
|
||||
{ id: "7", name: "Juli" },
|
||||
{ id: "8", name: "Agustus" },
|
||||
{ id: "9", name: "September" },
|
||||
{ id: "10", name: "Oktober" },
|
||||
{ id: "11", name: "Nopember" },
|
||||
{ id: "12", name: "Desember" }
|
||||
],
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
}),
|
||||
computed: {
|
||||
seletedmonth: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_month
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_month", val)
|
||||
}
|
||||
},
|
||||
seletedweek: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_week
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_week", val)
|
||||
}
|
||||
},
|
||||
seletedday: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_day
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_day", val)
|
||||
}
|
||||
},
|
||||
xmonth: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.xmonth
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_xmonth", val)
|
||||
}
|
||||
},
|
||||
xweek: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.xweek
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_xweek", val)
|
||||
}
|
||||
},
|
||||
xday: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.xday
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_xday", val)
|
||||
}
|
||||
},
|
||||
xhour: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.xhour
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_xhour", val)
|
||||
}
|
||||
},
|
||||
flagattime: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.flagattime
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_flagattime", val)
|
||||
}
|
||||
},
|
||||
attime: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.attime
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_attime", val)
|
||||
}
|
||||
},
|
||||
xnumbering() {
|
||||
return this.$store.state.samplecall.trx_numbering;
|
||||
},
|
||||
xstatus() {
|
||||
return this.$store.state.samplecall.selected_status;
|
||||
},
|
||||
xcompanies() {
|
||||
return this.$store.state.samplecall.companies;
|
||||
},
|
||||
selected_company: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_company;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_company", val);
|
||||
this.$store.dispatch("samplecall/getmou", { company: val });
|
||||
}
|
||||
},
|
||||
xagreementtypes() {
|
||||
return this.$store.state.samplecall.agreement_types;
|
||||
},
|
||||
selected_agreementtype: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_agreement_type;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_agreement_type", val);
|
||||
}
|
||||
},
|
||||
xmou() {
|
||||
return this.$store.state.samplecall.mou
|
||||
},
|
||||
selected_mou: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_mou
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_mou", val);
|
||||
},
|
||||
},
|
||||
company_cpname : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.company_cpname
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_company_cpname", val);
|
||||
},
|
||||
},
|
||||
company_cphp : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.company_cphp
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_company_cphp", val)
|
||||
},
|
||||
},
|
||||
participants : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.participants
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_participants", val)
|
||||
},
|
||||
},
|
||||
resulttype_report : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.resulttype_report
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_resulttype_report", val)
|
||||
},
|
||||
},
|
||||
special_requirement : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.special_requirement
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_special_requirement", val)
|
||||
},
|
||||
},
|
||||
implementation_date : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.implementation_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_implementation_date", val)
|
||||
},
|
||||
},
|
||||
implementation_time : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.implementation_time
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_implementation_time", val)
|
||||
},
|
||||
},
|
||||
implementation_place : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.implementation_place
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_implementation_place", val)
|
||||
},
|
||||
},
|
||||
setupinstrument_time : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.setupinstrument_time
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_setupinstrument_time", val)
|
||||
},
|
||||
},
|
||||
normal_price : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.normal_price
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_normal_price", val)
|
||||
},
|
||||
},
|
||||
agreement_price : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.agreement_price
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_agreement_price", val)
|
||||
},
|
||||
},
|
||||
discount_price : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.discount_price
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_discount_price", val)
|
||||
},
|
||||
},
|
||||
duedate : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.duedate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_duedate", val)
|
||||
},
|
||||
},
|
||||
sendresult_date : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.sendresult_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_sendresult_date", val)
|
||||
},
|
||||
},
|
||||
sendresult_place : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.sendresult_place
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_sendresult_place", val)
|
||||
},
|
||||
},
|
||||
billing_system : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.billing_system
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_billing_system", val)
|
||||
},
|
||||
},
|
||||
sendresult_cpname : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.sendresult_cpname
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_sendresult_cpname", val)
|
||||
},
|
||||
},
|
||||
sendresult_cphp : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.sendresult_cphp
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_sendresult_cphp", val)
|
||||
},
|
||||
},
|
||||
marketing_staff : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.marketing_staff
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_marketing_staff", val)
|
||||
},
|
||||
},
|
||||
notes : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.notes
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_notes", val)
|
||||
},
|
||||
},
|
||||
foods : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.foods
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_foods", val)
|
||||
},
|
||||
},
|
||||
readonlyhour: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.readonlyhour
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_readonlyhour", val)
|
||||
},
|
||||
},
|
||||
readonlyattime: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.readonlyattime
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_readonlyattime", val)
|
||||
},
|
||||
},
|
||||
xdatestart : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_start_date",val)
|
||||
}
|
||||
},
|
||||
xdateend : {
|
||||
get() {
|
||||
return this.$store.state.samplecall.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_end_date",val)
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart () {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
filterComputedDateFormattedEnd () {
|
||||
return this.formatDate(this.xdateend)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
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')}`
|
||||
},
|
||||
changeAttime(value){
|
||||
this.xhour = value === true ? 0:this.xhour
|
||||
this.readonlyhour = value === true ? true:false
|
||||
this.attime = value === true ? this.attime:""
|
||||
this.readonlyattime = value === true ? false:true
|
||||
},
|
||||
processSample(sampletype) {
|
||||
var patient = this.$store.state.samplecall.selected_patient;
|
||||
var msg =
|
||||
"Anda yakin akan melakukan proses untuk " +
|
||||
sampletype.T_SampleTypeName +
|
||||
" dari " +
|
||||
patient.patient_fullname +
|
||||
" ? ";
|
||||
this.$store.commit("samplecall/update_msg_action", msg);
|
||||
this.$store.commit("samplecall/update_act", "samplingprocess");
|
||||
this.$store.commit("samplecall/update_selected_sampletype", sampletype);
|
||||
this.$store.commit("samplecall/update_dialog_action", true);
|
||||
},
|
||||
doneSample(sampletype) {
|
||||
var patient = this.$store.state.samplecall.selected_patient;
|
||||
var msg =
|
||||
"Anda yakin proses untuk " +
|
||||
sampletype.T_SampleTypeName +
|
||||
" dari " +
|
||||
patient.patient_fullname +
|
||||
" telah selesai ? ";
|
||||
this.$store.commit("samplecall/update_msg_action", msg);
|
||||
this.$store.commit("samplecall/update_act", "samplingdone");
|
||||
this.$store.commit("samplecall/update_selected_sampletype", sampletype);
|
||||
this.$store.commit("samplecall/update_dialog_action", true);
|
||||
},
|
||||
thr_search_company: _.debounce(function() {
|
||||
this.$store.dispatch("samplecall/searchcompany", this.search_company);
|
||||
}, 2000),
|
||||
saveAgreement(){
|
||||
prm = {
|
||||
trx_id:this.$store.state.samplecall.trx_id,
|
||||
company:this.selected_company,
|
||||
agreement_type:this.selected_agreementtype,
|
||||
mou:this.selected_mou,
|
||||
company_cpname:this.company_cpname,
|
||||
company_cphp:this.company_cphp,
|
||||
participants:this.participants,
|
||||
resulttype_report:this.resulttype_report,
|
||||
special_requirement:this.special_requirement,
|
||||
implementation_date:this.implementation_date,
|
||||
implementation_time:this.implementation_time,
|
||||
implementation_place:this.implementation_place,
|
||||
setupinstrument_time:this.setupinstrument_time,
|
||||
normal_price:this.normal_price,
|
||||
agreement_price:this.agreement_price,
|
||||
discount_price:this.discount_price,
|
||||
billing_system:this.billing_system,
|
||||
duedate:this.duedate,
|
||||
sendresult_date:this.sendresult_date,
|
||||
sendresult_place:this.sendresult_place,
|
||||
sendresult_cpname:this.sendresult_cpname,
|
||||
sendresult_cphp:this.sendresult_cphp,
|
||||
marketing_staff:this.marketing_staff,
|
||||
notes:this.notes,
|
||||
foods:this.foods,
|
||||
xmonth:this.xmonth,
|
||||
xweek:this.xweek,
|
||||
xday:this.xday,
|
||||
flagattime:this.flagattime === true ? 'Y':'N',
|
||||
attime:this.attime,
|
||||
startdate:this.xdatestart,
|
||||
enddate:this.xdateend
|
||||
}
|
||||
this.$store.dispatch("samplecall/saveagreement", prm);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
search_company(val, old) {
|
||||
if (val == old) return;
|
||||
if (!val) return;
|
||||
if (val.length < 1) return;
|
||||
if (this.$store.state.samplecall.update_autocomplete_status == 1) return;
|
||||
this.thr_search_company();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-dialog v-model="xdialogaction" persistent max-width="350">
|
||||
<v-card>
|
||||
<v-card-title color="warning" class="headline">Konfirmasi</v-card-title>
|
||||
<v-card-text v-html="xmsgaction">
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary darken-1" flat @click="closeDialogAction()">OK</v-btn>
|
||||
<v-btn color="error darken-1" flat @click="xdialogaction = false">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout align-center>
|
||||
<v-flex xs2>
|
||||
<v-img
|
||||
src="https://www.sgm-inc.com/wp-content/uploads/2014/06/no-profile-male-img.gif"
|
||||
aspect-ratio="1"
|
||||
class="grey lighten-2 elevation-2"
|
||||
>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs10 pl-2 pt-1>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs4>
|
||||
<v-layout column>
|
||||
<v-flex>
|
||||
<h3 style="font-size:x-large" class="font-weight-bold">{{ xselected_patient.T_OrderHeaderLabNumber }}</h3>
|
||||
</v-flex>
|
||||
<v-flex pt-3>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.M_PatientNoReg"
|
||||
label="No RM"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.M_PatientName"
|
||||
label="Nama"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs8 pl-2>
|
||||
<v-layout column>
|
||||
<v-flex >
|
||||
<v-layout row>
|
||||
<v-flex xs6>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.patient_dob"
|
||||
label="Tanggal lahir"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs6 pl-1>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.T_OrderHeaderM_PatientAge"
|
||||
label="Umur"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex pt-1>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.M_PatientHP"
|
||||
label="HP"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex v-if="xselected_patient.statusid === '0' || xselected_patient.statusid === '2'">
|
||||
<v-btn
|
||||
|
||||
color="primary"
|
||||
class="mt-3"
|
||||
@click="callPatient()"
|
||||
block
|
||||
>
|
||||
CALL
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
|
||||
<v-layout v-if="xselected_patient.statusid === '1'" row>
|
||||
<v-flex pl-2 pr-2 xs6>
|
||||
<v-btn
|
||||
|
||||
color="warning"
|
||||
class="mt-3"
|
||||
@click="processNow()"
|
||||
block
|
||||
>
|
||||
PROCESS
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex pl-2 pr-2 xs6>
|
||||
<v-btn
|
||||
|
||||
color="error"
|
||||
class="mt-3"
|
||||
@click="skip()"
|
||||
block
|
||||
>
|
||||
SKIP
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-flex>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
|
||||
}),
|
||||
computed: {
|
||||
xselected_patient:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_patient",val)
|
||||
}
|
||||
},
|
||||
xdialogaction:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.dialog_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_dialog_action",val)
|
||||
}
|
||||
},
|
||||
xmsgaction:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.msg_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_msg_action",val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
closeDialogAction(){
|
||||
var act = this.$store.state.samplecall.act
|
||||
var sample = this.$store.state.samplecall.selected_sampletype
|
||||
var status = 1
|
||||
if(act === 'process'){
|
||||
status = 3
|
||||
}
|
||||
if(act === 'skip'){
|
||||
status = 2
|
||||
}
|
||||
if(act === 'samplingprocess'){
|
||||
status = 3
|
||||
}
|
||||
if(act === 'samplingdone'){
|
||||
status = 4
|
||||
}
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
this.$store.dispatch("samplecall/doaction",{
|
||||
act:act,
|
||||
id:patient.T_OrderHeaderID,
|
||||
name:this.name,
|
||||
nolab:this.nolab,
|
||||
stationid: patient.T_SampleStationID,
|
||||
statusid:this.$store.state.samplecall.selected_status.id,
|
||||
statusnextid : status,
|
||||
sample:sample
|
||||
})
|
||||
|
||||
},
|
||||
callPatient(){
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
var msg = "Anda yakin akan melakukan panggilan kepada pasien "+patient.patient_fullname+" ? "
|
||||
this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'call')
|
||||
this.$store.commit("samplecall/update_dialog_action",true)
|
||||
},
|
||||
processNow(){
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
var msg = "Anda yakin akan merubah status <span style='color:ff5252;font-weight:bold'>PROCESS</span> untuk pasien "+patient.patient_fullname+" ? "
|
||||
this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'process')
|
||||
this.$store.commit("samplecall/update_dialog_action",true)
|
||||
},
|
||||
skip(){
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
var msg = "Anda yakin akan merubah status <span style='color:ff5252;font-weight:bold'>SKIP</span> untuk pasien "+patient.patient_fullname+" ? "
|
||||
this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'skip')
|
||||
this.$store.commit("samplecall/update_dialog_action",true)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,351 @@
|
||||
<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-autocomplete
|
||||
class="mt-1"
|
||||
label="FILTER PERUSAHAAN"
|
||||
v-model="filter_selected_company"
|
||||
:items="xcompanies"
|
||||
:search-input.sync="filter_search_company"
|
||||
auto-select-first
|
||||
no-filter
|
||||
outline
|
||||
hide-details
|
||||
item-text="name"
|
||||
placeholder="Cari..."
|
||||
return-object
|
||||
:loading="isLoading"
|
||||
no-data-text="Tidak ada data perusahaan"
|
||||
>
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.name"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
<!--<v-btn class="xs3 ma-1" color="success" @click="searchtransaction" >Cari</v-btn>-->
|
||||
<span @click="searchtransaction" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>
|
||||
<span @click="setNewTransaction" class="icon-medium-fill-base xs1 white--text primary ml-1 icon-add"></span>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="transactions"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.trx_numbering }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.trx_date}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.M_CompanyName}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.M_MouName}}</td>
|
||||
</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>
|
||||
</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;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
|
||||
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("samplecall/getstationstatus",{
|
||||
filter_company:{id:0,name:'Semua Perusahaan'},
|
||||
// current_page:1,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.dispatch("samplecall/getagreementtype")
|
||||
|
||||
},
|
||||
methods : {
|
||||
isSelected(p) {
|
||||
return p.trx_id == this.$store.state.samplecall.selected_transaction.trx_id
|
||||
},
|
||||
searchtransaction() {
|
||||
this.$store.dispatch("samplecall/search",{
|
||||
filter_company:this.filter_selected_company,
|
||||
//current_page:1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(trx) {
|
||||
if(this.$store.state.samplecall.no_save == 0 ){
|
||||
this.$store.commit("samplecall/update_selected_transaction",trx)
|
||||
this.$store.commit("samplecall/update_trx_id",trx.trx_id)
|
||||
this.$store.commit("samplecall/update_trx_numbering",trx.trx_numbering)
|
||||
this.$store.commit("samplecall/update_companies",[{id:trx.Mcu_AgreementCustomerM_CompanyID,name:trx.M_CompanyName}])
|
||||
this.$store.commit("samplecall/update_selected_company", {id:trx.Mcu_AgreementCustomerM_CompanyID,name:trx.M_CompanyName})
|
||||
this.$store.commit("samplecall/update_selected_agreement_type", {id:trx.Mcu_AgreementScopeWorkMcu_AgreementTypeID,name:trx.Mcu_AgreementTypeName})
|
||||
this.$store.commit("samplecall/update_mou", trx.mou)
|
||||
this.$store.commit("samplecall/update_selected_mou", {id:trx.Mcu_AgreementCustomerM_MouID,name:trx.M_MouName})
|
||||
this.$store.commit("samplecall/update_company_cpname", trx.Mcu_AgreementCustomerCpName)
|
||||
this.$store.commit("samplecall/update_company_cphp", trx.Mcu_AgreementCustomerCpHp)
|
||||
this.$store.commit("samplecall/update_participants", trx.Mcu_AgreementScopeWorkParticipants)
|
||||
this.$store.commit("samplecall/update_resulttype_report", trx.Mcu_AgreementScopeWorkResultTypeReport)
|
||||
this.$store.commit("samplecall/update_special_requirement", trx.Mcu_AgreementScopeWorkSpecialRequirements)
|
||||
this.$store.commit("samplecall/update_implementation_date", trx.Mcu_AgreementImplementationDate)
|
||||
this.$store.commit("samplecall/update_implementation_time", trx.Mcu_AgreementImplementationTime)
|
||||
this.$store.commit("samplecall/update_implementation_place", trx.Mcu_AgreementImplementationPlace)
|
||||
this.$store.commit("samplecall/update_setupinstrument_time", trx.Mcu_AgreementImplementationSetupInstumentTime)
|
||||
this.$store.commit("samplecall/update_normal_price", trx.Mcu_AgreementPriceNormalPrice)
|
||||
this.$store.commit("samplecall/update_agreement_price", trx.Mcu_AgreementPriceAgreementPrice)
|
||||
this.$store.commit("samplecall/update_discount_price", trx.Mcu_AgreementPriceDiscount)
|
||||
this.$store.commit("samplecall/update_duedate", trx.Mcu_AgreementPriceDueDate)
|
||||
this.$store.commit("samplecall/update_billing_system", trx.Mcu_AgreementPriceBillingSystem)
|
||||
this.$store.commit("samplecall/update_sendresult_date", trx.Mcu_AgreementSendResultDate)
|
||||
this.$store.commit("samplecall/update_sendresult_place", trx.Mcu_AgreementSendResultPlace)
|
||||
this.$store.commit("samplecall/update_sendresult_cpname", trx.Mcu_AgreementSendResultCPName)
|
||||
this.$store.commit("samplecall/update_sendresult_cphp", trx.Mcu_AgreementSendResultCPHP)
|
||||
this.$store.commit("samplecall/update_marketing_staff", trx.Mcu_AgreementMarketingName)
|
||||
this.$store.commit("samplecall/update_notes", trx.Mcu_AgrrementNotesValue)
|
||||
this.$store.commit("samplecall/update_foods", trx.Mcu_AgreementFacilityFood)
|
||||
|
||||
}else{
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",true)
|
||||
}
|
||||
|
||||
},
|
||||
closeAlertConfirmation(){
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",false)
|
||||
},
|
||||
forgetAlertConfirmation(){
|
||||
this.$store.commit("samplecall/update_no_save",0)
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",false)
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("samplecall/update_alert_success",val)
|
||||
},
|
||||
setNewtransaction(){
|
||||
//this.$store.commit("samplecall/update_selected_transaction",{})
|
||||
|
||||
},
|
||||
closeDialogSuccess(){
|
||||
this.$store.commit("samplecall/update_dialog_success",false)
|
||||
this.$store.dispatch("samplecall/search",{
|
||||
filter_company:this.filter_selected_company,
|
||||
//current_page:1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
setNewTransaction(){
|
||||
this.$store.commit("samplecall/update_selected_transaction",{})
|
||||
this.$store.commit("samplecall/update_trx_id",'0')
|
||||
this.$store.commit("samplecall/update_trx_numbering",'No. TRANSAKSI')
|
||||
this.$store.commit("samplecall/update_companies",[])
|
||||
this.$store.commit("samplecall/update_selected_company", {})
|
||||
this.$store.commit("samplecall/update_selected_agreement_type", {})
|
||||
this.$store.commit("samplecall/update_mou", [])
|
||||
this.$store.commit("samplecall/update_selected_mou", {})
|
||||
this.$store.commit("samplecall/update_company_cpname", "")
|
||||
this.$store.commit("samplecall/update_company_cphp", "")
|
||||
this.$store.commit("samplecall/update_participants", "")
|
||||
this.$store.commit("samplecall/update_resulttype_report", "")
|
||||
this.$store.commit("samplecall/update_special_requirement", "")
|
||||
this.$store.commit("samplecall/update_implementation_date", "")
|
||||
this.$store.commit("samplecall/update_implementation_time", "")
|
||||
this.$store.commit("samplecall/update_implementation_place", "")
|
||||
this.$store.commit("samplecall/update_setupinstrument_time", "")
|
||||
this.$store.commit("samplecall/update_normal_price", "")
|
||||
this.$store.commit("samplecall/update_agreement_price","")
|
||||
this.$store.commit("samplecall/update_discount_price", "")
|
||||
this.$store.commit("samplecall/update_duedate", "")
|
||||
this.$store.commit("samplecall/update_billing_system", "")
|
||||
this.$store.commit("samplecall/update_sendresult_date", "")
|
||||
this.$store.commit("samplecall/update_sendresult_place", "")
|
||||
this.$store.commit("samplecall/update_sendresult_cpname", "")
|
||||
this.$store.commit("samplecall/update_sendresult_cphp", "")
|
||||
this.$store.commit("samplecall/update_marketing_staff", "")
|
||||
this.$store.commit("samplecall/update_notes", "")
|
||||
this.$store.commit("samplecall/update_foods", "")
|
||||
},
|
||||
thr_filter_search_company: _.debounce(function() {
|
||||
this.$store.dispatch("samplecall/filtersearchcompany", this.filter_search_company);
|
||||
}, 2000),
|
||||
},
|
||||
computed: {
|
||||
xcompanies() {
|
||||
return this.$store.state.samplecall.filter_companies;
|
||||
},
|
||||
filter_selected_company: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.filter_selected_company;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_filter_selected_company", val);
|
||||
}
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_dialog_success",val)
|
||||
}
|
||||
},
|
||||
msgsuccess(){
|
||||
return this.$store.state.samplecall.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.samplecall.search_status == 1
|
||||
},
|
||||
xstations() {
|
||||
return this.$store.state.samplecall.stations
|
||||
},
|
||||
xselectedstation: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_station
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_station",val)
|
||||
}
|
||||
},
|
||||
xstatuses() {
|
||||
return this.$store.state.samplecall.statuses
|
||||
},
|
||||
xselectedstatus: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_status
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_status",val)
|
||||
}
|
||||
},
|
||||
transactions() {
|
||||
return this.$store.state.samplecall.transactions
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",val)
|
||||
}
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_current_page",val)
|
||||
this.$store.dispatch("samplecall/search",{
|
||||
name:this.name,
|
||||
nolab:this.nolab,
|
||||
stationid: this.xselectedstation.id,
|
||||
statusid: this.xselectedstatus.id,
|
||||
current_page:val,
|
||||
lastid: idx
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.total_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_total_page",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
filter_search_company(val, old) {
|
||||
if (val == old) return;
|
||||
if (!val) return;
|
||||
if (val.length < 1) return;
|
||||
if (this.$store.state.samplecall.update_autocomplete_status == 1) return;
|
||||
this.thr_filter_search_company();
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
name: '',
|
||||
nolab:'',
|
||||
page:1,
|
||||
filter_search_company: "",
|
||||
headers: [
|
||||
{
|
||||
text: "NO TRANSAKSI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TANGGAL TRANSAKSI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PERUSAHAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "35%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "MOU",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "35%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
94
one-ui/test_x_old/vuex/one-mcu-agreement/index.php
Normal file
94
one-ui/test_x_old/vuex/one-mcu-agreement/index.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<!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 style="background:#F5E8DF!important" >
|
||||
<v-container fluid fill-height class="pl-1 pr-1 pt-2 pb-2">
|
||||
<v-layout row wrap >
|
||||
<v-flex xs6 class="left" fill-height pa-1>
|
||||
<one-sample-call-so-list></one-sample-call-so-list>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="right" fill-height pa-1>
|
||||
<one-sample-call-so-detail></one-sample-call-so-detail>
|
||||
</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">
|
||||
window.calculate_age = function (inp_dob) {
|
||||
var now = moment(new Date())
|
||||
var dob = moment(new Date(inp_dob))
|
||||
var year = now.diff(dob,'years')
|
||||
dob.add(year,'years')
|
||||
var month = now.diff(dob,'months')
|
||||
dob.add(month,'months')
|
||||
var day = now.diff(dob,'days')
|
||||
if (isNaN(year)) return ''
|
||||
return `${year} tahun ${month} bulan ${day} hari`
|
||||
}
|
||||
|
||||
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for testing
|
||||
window.store = store;
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
methods: {
|
||||
tab_selected : function(tab) {
|
||||
return this.$store.state.tab_selected == tab
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
|
||||
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
|
||||
'one-sample-call-so-list': httpVueLoader('./components/oneSampleCallSOList.vue'),
|
||||
'one-sample-call-so-info': httpVueLoader('./components/oneSampleCallSOInfo.vue'),
|
||||
'one-sample-call-so-detail': httpVueLoader('./components/oneSampleCallSODetail.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
918
one-ui/test_x_old/vuex/one-mcu-agreement/modules/samplecall.js
Normal file
918
one-ui/test_x_old/vuex/one-mcu-agreement/modules/samplecall.js
Normal file
@@ -0,0 +1,918 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/samplecall.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
trx_id:0,
|
||||
trx_numbering:'NO.TRANSAKSI',
|
||||
last_id:-1,
|
||||
last_saved_id:-1,
|
||||
x_addr_id:0,
|
||||
act:'edit',
|
||||
act_addr:'new',
|
||||
get_data_status:0,
|
||||
search_transaction: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
preffix:'',
|
||||
transaction_name:'',
|
||||
suffix:'',
|
||||
transactions: [],
|
||||
selected_transaction: {},
|
||||
companies:[],
|
||||
selected_company:{},
|
||||
filter_companies:[],
|
||||
filter_selected_company:{id:0,name:'Semua Perusahaan'},
|
||||
sampletypes:[],
|
||||
selected_sampletype:{},
|
||||
total_transactions:0,
|
||||
transaction_address: [],
|
||||
stations:[],
|
||||
selected_station:{},
|
||||
statuses:[],
|
||||
selected_status:{},
|
||||
transaction_date:moment(new Date()).format('DD-MM-YYYY'),
|
||||
transaction_time:moment(new Date()).format("hh:mm"),
|
||||
phone:'',
|
||||
hp:'',
|
||||
email:'',
|
||||
pj:'N',
|
||||
dpj:'N',
|
||||
clinic:'N',
|
||||
is_default:'N',
|
||||
marketing_confirm:'N',
|
||||
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_delete_addr: false,
|
||||
msg_confirmation_delete_addr: "",
|
||||
autocomplete_status:0,
|
||||
dialog_form_address: false,
|
||||
label_address:'',
|
||||
addresses:[],
|
||||
cities:[],
|
||||
city_address:{},
|
||||
districts:[],
|
||||
district_address:{},
|
||||
kelurahans:[],
|
||||
kelurahan_address:{},
|
||||
description_address:'',
|
||||
errors:[],
|
||||
dialog_action:false,
|
||||
msg_action:'',
|
||||
current_page:1,
|
||||
total_page:1,
|
||||
autocomplete_status:0,
|
||||
agreement_types:[],
|
||||
selected_agreement_type:{},
|
||||
mou:[],
|
||||
selected_mou:{},
|
||||
company_cpname:"",
|
||||
company_cphp:"",
|
||||
participants:"",
|
||||
resulttype_report:"",
|
||||
special_requirement:"",
|
||||
implementation_date:"",
|
||||
implementation_time:"",
|
||||
implementation_place:"",
|
||||
setupinstrument_time:"",
|
||||
normal_price:"",
|
||||
agreement_price:"",
|
||||
discount_price:"",
|
||||
billing_system:"",
|
||||
duedate:"",
|
||||
sendresult_date:"",
|
||||
sendresult_place:"",
|
||||
sendresult_cpname:"",
|
||||
sendresult_cphp:"",
|
||||
marketing_staff:"",
|
||||
notes:"",
|
||||
foods:"",
|
||||
selected_month: { id: 1, name: "Januari" },
|
||||
selected_week: { id: 1, name: "Pertama" },
|
||||
selected_day: { id: 1, name: "Minggu" },
|
||||
xmonth:0,
|
||||
xweek:0,
|
||||
xday:0,
|
||||
xhour:"",
|
||||
flagattime:false,
|
||||
attime:"12:00",
|
||||
readonlyattime:true,
|
||||
readonlyhour:false,
|
||||
formulas:[{'code':'BMI','fx':'count_bmi'}],
|
||||
start_date:moment(new Date()).format('YYYY-MM-DD'),
|
||||
end_date:moment(new Date()).format('YYYY-MM-DD'),
|
||||
},
|
||||
mutations: {
|
||||
update_formulas(state,val){
|
||||
state.formulas = val
|
||||
},
|
||||
update_xmonth(state,val){
|
||||
state.xmonth = val
|
||||
},
|
||||
update_xmonth(state,val){
|
||||
state.xmonth = val
|
||||
},
|
||||
update_xweek(state,val){
|
||||
state.xweek = val
|
||||
},
|
||||
update_xday(state,val){
|
||||
state.xday = val
|
||||
},
|
||||
update_xhour(state,val){
|
||||
state.xhour = val
|
||||
},
|
||||
update_flagattime(state,val){
|
||||
state.flagattime = val
|
||||
},
|
||||
update_attime(state,val){
|
||||
state.attime = val
|
||||
},
|
||||
update_readonlyattime(state,val){
|
||||
state.readonlyattime = val
|
||||
},
|
||||
update_readonlyhour(state,val){
|
||||
state.readonlyhour = val
|
||||
},
|
||||
update_selected_month(state,val){
|
||||
state.selected_month = val
|
||||
},
|
||||
update_selected_week(state,val){
|
||||
state.selected_week = val
|
||||
},
|
||||
update_selected_day(state,val){
|
||||
state.selected_day = val
|
||||
},
|
||||
update_trx_id(state,val){
|
||||
state.trx_id = val
|
||||
},
|
||||
update_trx_numbering(state,val){
|
||||
state.trx_numbering = val
|
||||
},
|
||||
update_foods(state,val){
|
||||
state.foods = val
|
||||
},
|
||||
update_notes(state,val){
|
||||
state.notes = val
|
||||
},
|
||||
update_marketing_staff(state,val){
|
||||
state.marketing_staff = val
|
||||
},
|
||||
update_sendresult_cphp(state,val){
|
||||
state.sendresult_cphp = val
|
||||
},
|
||||
update_sendresult_cpname(state,val){
|
||||
state.sendresult_cpname = val
|
||||
},
|
||||
update_sendresult_place(state,val){
|
||||
state.sendresult_place = val
|
||||
},
|
||||
update_sendresult_date(state,val){
|
||||
state.sendresult_date = val
|
||||
},
|
||||
update_duedate(state,val){
|
||||
state.duedate = val
|
||||
},
|
||||
update_billing_system(state,val){
|
||||
state.billing_system = val
|
||||
},
|
||||
update_discount_price(state,val){
|
||||
state.discount_price = val
|
||||
},
|
||||
update_agreement_price(state,val){
|
||||
state.agreement_price = val
|
||||
},
|
||||
update_normal_price(state,val){
|
||||
state.normal_price = val
|
||||
},
|
||||
update_setupinstrument_time(state,val){
|
||||
state.setupinstrument_time = val
|
||||
},
|
||||
update_implementation_place(state,val){
|
||||
state.implementation_place = val
|
||||
},
|
||||
update_implementation_time(state,val){
|
||||
state.implementation_time = val
|
||||
},
|
||||
update_implementation_date(state,val){
|
||||
state.implementation_date = val
|
||||
},
|
||||
update_special_requirement(state,val){
|
||||
state.special_requirement = val
|
||||
},
|
||||
update_resulttype_report(state,val){
|
||||
state.resulttype_report = val
|
||||
},
|
||||
update_participants(state,val){
|
||||
state.participants = val
|
||||
},
|
||||
update_company_cphp(state,val){
|
||||
state.company_cphp = val
|
||||
},
|
||||
update_company_cpname(state,val){
|
||||
state.company_cpname = val
|
||||
},
|
||||
update_mou(state,val){
|
||||
state.mou = val
|
||||
},
|
||||
update_selected_mou(state,val){
|
||||
state.selected_mou = val
|
||||
},
|
||||
update_agreement_types(state,val){
|
||||
state.agreement_types = val
|
||||
},
|
||||
update_selected_agreement_type(state,val){
|
||||
state.selected_agreement_type = val
|
||||
},
|
||||
update_autocomplete_status(state,val){
|
||||
state.autocomplete_status = val
|
||||
},
|
||||
update_companies(state, val) {
|
||||
state.companies = val
|
||||
},
|
||||
update_selected_company(state, val) {
|
||||
state.selected_company = val
|
||||
},
|
||||
update_filter_companies(state, val) {
|
||||
state.filter_companies = val
|
||||
},
|
||||
update_filter_selected_company(state, val) {
|
||||
state.filter_selected_company = val
|
||||
},
|
||||
update_total_page(state, val) {
|
||||
state.total_page = val
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val
|
||||
},
|
||||
update_x_addr_id(state, val) {
|
||||
state.x_addr_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_addr(state, val) {
|
||||
state.act_addr = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_search_error_message(state, transaction) {
|
||||
state.search_error_message = transaction
|
||||
},
|
||||
update_search_transaction(state, transaction) {
|
||||
state.search_transaction = transaction
|
||||
},
|
||||
update_preffix(state, val) {
|
||||
state.preffix = val
|
||||
},
|
||||
update_transaction_name(state, val) {
|
||||
state.transaction_name = val
|
||||
},
|
||||
update_suffix(state, val) {
|
||||
state.suffix = val
|
||||
},
|
||||
update_transactions(state, data) {
|
||||
state.transactions = data
|
||||
},
|
||||
update_selected_transaction(state, val) {
|
||||
state.selected_transaction = val
|
||||
},
|
||||
update_sampletypes(state, data) {
|
||||
state.sampletypes = data
|
||||
},
|
||||
update_selected_sampletype(state, val) {
|
||||
state.selected_sampletype = val
|
||||
},
|
||||
update_stations(state, val) {
|
||||
state.stations = val
|
||||
},
|
||||
update_selected_station(state, val) {
|
||||
state.selected_station = val
|
||||
},
|
||||
update_statuses(state, val) {
|
||||
state.statuses = val
|
||||
},
|
||||
update_selected_status(state, val) {
|
||||
state.selected_status = val
|
||||
},
|
||||
update_phone(state, val) {
|
||||
state.phone = val
|
||||
},
|
||||
update_email(state, val) {
|
||||
state.email = val
|
||||
},
|
||||
update_hp(state, val) {
|
||||
state.hp = val
|
||||
},
|
||||
update_pj(state, val) {
|
||||
state.pj = val
|
||||
},
|
||||
update_dpj(state, val) {
|
||||
state.dpj = val
|
||||
},
|
||||
update_clinic(state, val) {
|
||||
state.clinic = val
|
||||
},
|
||||
update_marketing_confirm(state, val) {
|
||||
state.marketing_confirm = val
|
||||
},
|
||||
update_is_default(state, val) {
|
||||
state.is_default = 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_delete_addr(state, val) {
|
||||
state.dialog_confirmation_delete_addr = val
|
||||
},
|
||||
update_msg_confirmation_delete_addr(state, val) {
|
||||
state.msg_confirmation_delete_addr = val
|
||||
},
|
||||
update_addresses(state, val) {
|
||||
state.addresses = val
|
||||
},
|
||||
update_autocomplete_status(state,val){
|
||||
state.autocomplete_status = val
|
||||
},
|
||||
update_dialog_form_address(state, val) {
|
||||
state.dialog_form_address = val
|
||||
},
|
||||
update_label_address(state, val) {
|
||||
state.label_address = val
|
||||
},
|
||||
update_cities(state, val) {
|
||||
state.cities = val
|
||||
},
|
||||
update_city_address(state, val) {
|
||||
state.city_address = val
|
||||
},
|
||||
update_districts(state, val) {
|
||||
state.districts = val
|
||||
},
|
||||
update_district_address(state, val) {
|
||||
state.district_address = val
|
||||
},
|
||||
update_kelurahans(state, val) {
|
||||
state.kelurahans = val
|
||||
},
|
||||
update_kelurahan_address(state, val) {
|
||||
state.kelurahan_address = val
|
||||
},
|
||||
update_description_address(state, val) {
|
||||
state.description_address = val
|
||||
},
|
||||
update_search_status(state, val) {
|
||||
state.search_status = val
|
||||
},
|
||||
update_errors(state, val) {
|
||||
state.errors = val
|
||||
},
|
||||
update_total_transactions(state, val) {
|
||||
state.total_transactions = val
|
||||
},
|
||||
update_dialog_action(state, val) {
|
||||
state.dialog_action = val
|
||||
},
|
||||
update_msg_action(state, val) {
|
||||
state.msg_action = val
|
||||
},
|
||||
update_start_date(state, val) {
|
||||
state.start_date = val
|
||||
},
|
||||
update_end_date(state, val) {
|
||||
state.end_date = val
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_transaction", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_transaction", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_transaction", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_transactions", data.records)
|
||||
context.commit("update_total_transactions", data.total)
|
||||
//context.commit("update_total_page", data.total)
|
||||
context.commit("update_no_save", 0)
|
||||
if(prm.lastid === -1){
|
||||
var pat = data.records[0]
|
||||
if(data.records.length === 0){
|
||||
context.commit("update_selected_transaction",{})
|
||||
context.commit("update_trx_id",'0')
|
||||
context.commit("update_trx_numbering","NO.TRANSAKSI")
|
||||
context.commit("update_companies",[])
|
||||
context.commit("update_selected_company", {})
|
||||
context.commit("update_selected_agreement_type", {})
|
||||
context.commit("update_mou", [])
|
||||
context.commit("update_selected_mou", {})
|
||||
context.commit("update_company_cpname", "")
|
||||
context.commit("update_company_cphp", "")
|
||||
context.commit("update_participants", "")
|
||||
context.commit("update_resulttype_report", "")
|
||||
context.commit("update_special_requirement", "")
|
||||
context.commit("update_implementation_date", "")
|
||||
context.commit("update_implementation_time", "")
|
||||
context.commit("update_implementation_place", "")
|
||||
context.commit("update_setupinstrument_time","")
|
||||
context.commit("update_normal_price", "")
|
||||
context.commit("update_agreement_price","")
|
||||
context.commit("update_discount_price","")
|
||||
context.commit("update_duedate", "")
|
||||
context.commit("update_billing_system","")
|
||||
context.commit("update_sendresult_date","")
|
||||
context.commit("update_sendresult_place","")
|
||||
context.commit("update_sendresult_cpname","")
|
||||
context.commit("update_sendresult_cphp", "")
|
||||
context.commit("update_marketing_staff", "")
|
||||
context.commit("update_notes","")
|
||||
context.commit("update_foods", "")
|
||||
context.commit("update_xmonth", 0)
|
||||
context.commit("update_xweek", 0)
|
||||
context.commit("update_xday", 0)
|
||||
context.commit("update_flagattime", false)
|
||||
context.commit("update_attime","12:00")
|
||||
context.commit("update_start_date",moment(new Date()).format('YYYY-MM-DD') )
|
||||
context.commit("update_end_date",moment(new Date()).format('YYYY-MM-DD'))
|
||||
}else{
|
||||
var trx = data.records[0]
|
||||
context.commit("update_selected_transaction",trx)
|
||||
context.commit("update_trx_numbering",trx.trx_numbering)
|
||||
context.commit("update_trx_id",trx.trx_id)
|
||||
context.commit("update_companies",[{id:trx.Mcu_AgreementCustomerM_CompanyID,name:trx.M_CompanyName}])
|
||||
context.commit("update_selected_company", {id:trx.Mcu_AgreementCustomerM_CompanyID,name:trx.M_CompanyName})
|
||||
context.commit("update_selected_agreement_type", {id:trx.Mcu_AgreementScopeWorkMcu_AgreementTypeID,name:trx.Mcu_AgreementTypeName})
|
||||
context.commit("update_mou", trx.mou)
|
||||
context.commit("update_selected_mou", {id:trx.Mcu_AgreementCustomerM_MouID,name:trx.M_MouName})
|
||||
context.commit("update_company_cpname", trx.Mcu_AgreementCustomerCpName)
|
||||
context.commit("update_company_cphp", trx.Mcu_AgreementCustomerCpHp)
|
||||
context.commit("update_participants", trx.Mcu_AgreementScopeWorkParticipants)
|
||||
context.commit("update_resulttype_report", trx.Mcu_AgreementScopeWorkResultTypeReport)
|
||||
context.commit("update_special_requirement", trx.Mcu_AgreementScopeWorkSpecialRequirements)
|
||||
context.commit("update_implementation_date", trx.Mcu_AgreementImplementationDate)
|
||||
context.commit("update_implementation_time", trx.Mcu_AgreementImplementationTime)
|
||||
context.commit("update_implementation_place", trx.Mcu_AgreementImplementationPlace)
|
||||
context.commit("update_setupinstrument_time", trx.Mcu_AgreementImplementationSetupInstumentTime)
|
||||
context.commit("update_normal_price", trx.Mcu_AgreementPriceNormalPrice)
|
||||
context.commit("update_agreement_price", trx.Mcu_AgreementPriceAgreementPrice)
|
||||
context.commit("update_discount_price", trx.Mcu_AgreementPriceDiscount)
|
||||
context.commit("update_duedate", trx.Mcu_AgreementPriceDueDate)
|
||||
context.commit("update_billing_system", trx.Mcu_AgreementPriceBillingSystem)
|
||||
context.commit("update_sendresult_date", trx.Mcu_AgreementSendResultDate)
|
||||
context.commit("update_sendresult_place", trx.Mcu_AgreementSendResultPlace)
|
||||
context.commit("update_sendresult_cpname", trx.Mcu_AgreementSendResultCPName)
|
||||
context.commit("update_sendresult_cphp", trx.Mcu_AgreementSendResultCPHP)
|
||||
context.commit("update_marketing_staff", trx.Mcu_AgreementMarketingName)
|
||||
context.commit("update_notes", trx.Mcu_AgrrementNotesValue)
|
||||
context.commit("update_foods", trx.Mcu_AgreementFacilityFood)
|
||||
|
||||
var flag_attime = trx.Mcu_AgreementPromiseFlagAtTime === 'N'?false:true
|
||||
var xattime = trx.promise_time
|
||||
|
||||
context.commit("update_xmonth", trx.Mcu_AgreementPromiseMonth)
|
||||
context.commit("update_xweek", trx.Mcu_AgreementPromiseWeek)
|
||||
context.commit("update_xday", trx.Mcu_AgreementPromiseDay)
|
||||
context.commit("update_flagattime", flag_attime)
|
||||
context.commit("update_attime", xattime)
|
||||
context.commit("update_start_date",trx.Mcu_AgreementPromiseStartDate )
|
||||
context.commit("update_end_date",trx.Mcu_AgreementPromiseEndDate)
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
context.commit("update_selected_transaction", data.records[prm.lastid])
|
||||
var pat = data.records[prm.lastid]
|
||||
context.dispatch("getsampletypes",{
|
||||
orderid:pat.T_OrderHeaderID,
|
||||
stationid: pat.T_SampleStationID,
|
||||
statusid: pat.statusid
|
||||
})
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_transaction", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async getstationstatus(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
let resp= await api.getstationstatus(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_stations",data.records.stations)
|
||||
context.commit("update_selected_station",data.records.stations[0])
|
||||
context.commit("update_statuses",data.records.statuses)
|
||||
context.commit("update_selected_status",data.records.statuses[0])
|
||||
prm.stationid = data.records.stations[0].id
|
||||
prm.statusid = data.records.statuses[0].id
|
||||
console.log(prm)
|
||||
context.dispatch("search",prm)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getagreementtype(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
let resp= await api.getagreementtype(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_agreement_types",data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getmou(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getmou(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_mou",data.records)
|
||||
context.commit("update_selected_mou",{})
|
||||
}
|
||||
} 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.M_transactionID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data dokter " + prm.M_transactionName + " sudah terupdate dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async saveagreement(context,prm){
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.saveagreement(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_last_id", prm.M_transactionID)
|
||||
var msg = "Data transaksi " + data.records.numbering + " sudah tersimpan dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_dialog_success", true)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_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 filtersearchcompany(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_filter_companies",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
}
|
||||
},
|
||||
async newtransaction(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.newtransaction(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 dokter " + prm.M_transactionName + " sudah tersimpan dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} 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 dokter " + prm.M_transactionName + " sudah dihapus dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_preffix",'')
|
||||
context.commit("update_transaction_name",'')
|
||||
context.commit("update_suffix",'')
|
||||
context.commit("update_selected_sex",{})
|
||||
context.commit("update_selected_religion",{})
|
||||
context.commit("update_phone",'')
|
||||
context.commit("update_email",'')
|
||||
context.commit("update_hp",'')
|
||||
context.commit("update_pj",'N')
|
||||
context.commit("update_dpj",'N')
|
||||
context.commit("update_clinic",'N')
|
||||
context.commit("update_marketing_confirm",'N')
|
||||
context.commit("update_is_default",'N')
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async getaddress(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getaddress(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_addresses",data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async searchcity(context,prm) {
|
||||
context.commit("update_autocomplete_status",1)
|
||||
try {
|
||||
let resp= await api.searchcity(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_cities",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
}
|
||||
},
|
||||
async getdistrict(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
let resp= await api.getdistrict(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_districts",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getkelurahan(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
let resp= await api.getkelurahan(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_kelurahans",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async savenewaddress(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.savenewaddress(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_dialog_form_address",false)
|
||||
context.commit("update_last_id", prm.M_transactionAddressM_transactionID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan data alamat dokter " + prm.M_transactionName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async saveeditaddress(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.saveeditaddress(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_dialog_form_address",false)
|
||||
context.commit("update_last_id", prm.M_transactionAddressM_transactionID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Perubahan data alamat dokter " + prm.M_transactionName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async deleteaddress(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.deleteaddress(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_dialog_confirmation_delete_addr",false)
|
||||
context.commit("update_last_id", prm.M_transactionAddressM_transactionID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penghapusan data alamat "+prm.M_transactionAddressNote+" dari dokter " + prm.M_transactionName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async getsampletypes(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getsampletypes(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_sampletypes",data.records)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async doaction(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.doaction(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_act",'-')
|
||||
context.commit("update_dialog_action",false)
|
||||
prm.lastid = -1
|
||||
context.dispatch("search",prm)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
27
one-ui/test_x_old/vuex/one-mcu-agreement/store.js
Normal file
27
one-ui/test_x_old/vuex/one-mcu-agreement/store.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import samplecall from "./modules/samplecall.js";
|
||||
import system from "../../../apps/modules/system/system.js";
|
||||
export const store = new Vuex.Store({
|
||||
modules: {
|
||||
samplecall: samplecall,
|
||||
system: system
|
||||
},
|
||||
state: {
|
||||
tab_selected: 'pasien-dokter'
|
||||
},
|
||||
mutations: {
|
||||
change_tab(state, ntab) {
|
||||
state.tab_selected = ntab
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
change_tab(context, ntab) {
|
||||
context.commit('change_tab', ntab)
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user