Flatten nested repos
This commit is contained in:
482
test/vuex/one-barcode-nonlab/api/groupresult.js
Normal file
482
test/vuex/one-barcode-nonlab/api/groupresult.js
Normal file
@@ -0,0 +1,482 @@
|
||||
const URL = "/one-api/mockup/barcodenonlab/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/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 searchcompany(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/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 saverequirement(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/saverequirement',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 saveprintlog(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/saveprintlog',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 saveprintalllog(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/saveprintalllog',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 receivesample(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/receivesample',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 savedoctor(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/savedoctor',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 search_staff(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/search_staff',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 search_patient(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/search_patient',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 searchdoctor(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/searchdoctor',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 getrequirements(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/getrequirements',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(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/getstationstatus',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 getdoctorbystation(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/getdoctorbystation',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 + 'groupresult/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 newgroupresult(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'groupresult/newgroupresult',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 + 'groupresult/deletegroupresult',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 + 'groupresult/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 + 'groupresult/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 + 'groupresult/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 + 'groupresult/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 + 'groupresult/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 + 'groupresult/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 + 'groupresult/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 + 'groupresult/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 + 'groupresult/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
|
||||
};
|
||||
}
|
||||
}
|
||||
482
test/vuex/one-barcode-nonlab/api/labnumber.js
Normal file
482
test/vuex/one-barcode-nonlab/api/labnumber.js
Normal file
@@ -0,0 +1,482 @@
|
||||
const URL = "/one-api/mockup/barcodenonlab/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/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 searchcompany(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/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 saverequirement(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/saverequirement',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 saveprintlog(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/saveprintlog',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 saveprintalllog(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/saveprintalllog',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 receivesample(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/receivesample',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 savedoctor(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/savedoctor',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 search_staff(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/search_staff',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 search_patient(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/search_patient',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 searchdoctor(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/searchdoctor',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 getrequirements(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/getrequirements',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(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/getstationstatus',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 getdoctorbystation(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/getdoctorbystation',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 + 'labnumber/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 newlabnumber(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'labnumber/newlabnumber',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 + 'labnumber/deletelabnumber',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 + 'labnumber/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 + 'labnumber/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 + 'labnumber/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 + 'labnumber/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 + 'labnumber/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 + 'labnumber/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 + 'labnumber/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 + 'labnumber/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 + 'labnumber/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
|
||||
};
|
||||
}
|
||||
}
|
||||
883
test/vuex/one-barcode-nonlab/components/oneGroupResultList.vue
Normal file
883
test/vuex/one-barcode-nonlab/components/oneGroupResultList.vue
Normal file
@@ -0,0 +1,883 @@
|
||||
<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-dialog v-model="dialog_doctor" persistent max-width="45%">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Pilih dokter pembaca</v-card-title>
|
||||
<v-card-text>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-switch v-model="flagdoctorinoffice" label="Dokter Pramita"></v-switch>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs6 pa-1>
|
||||
<v-select item-text="name" return-object :items="doctors" v-model="selected_doctor" label="Dokter"></v-select>
|
||||
<p v-if="errors.require_doctor" class="error pl-2 pr-2" style="color:#fff">Ayo pilih salah satu</p>
|
||||
</v-flex>
|
||||
<v-flex xs6 pa-1>
|
||||
<v-select item-text="M_DoctorAddressDescription" return-object :items="doctor_address" v-model="selected_doctor_address"
|
||||
label="Alamat Dokter"></v-select>
|
||||
<p v-if="errors.require_doctor_address" class="error pl-2 pr-2" style="color:#fff">Mau tau dong alamatnya</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="black" flat @click="dialog_doctor = false">Tutup</v-btn>
|
||||
<v-btn color="green darken-1" flat @click="saveDoctor">Simpan</v-btn>
|
||||
<!--<v-btn color="green darken-1" flat @click="saveRequirement()">Simpan</v-btn>-->
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout align-center row>
|
||||
<v-flex xs4>
|
||||
<v-menu v-model="menufilterdatestart" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field class="mr-2" v-model="filterComputedDateFormattedStart" label="Tanggal Awal" outline hide-details readonly
|
||||
v-on="on" @blur="date = deFormatedDate(filterComputedDateFormattedStart)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="init_sdate" no-title @input="menufilterdatestart = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<v-menu v-model="menufilterdateend" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field class="mr-2" v-model="filterComputedDateFormattedEnd" label="Tanggal Akhir" outline hide-details readonly v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedEnd)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="init_edate" no-title @input="menufilterdateend = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<v-text-field style="font-size:14px" class="mr-1" label="No Reg / Nama" outline v-model="nolab" hide-details></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs5>
|
||||
<v-autocomplete label="Kel. Pelanggan" v-model="xselectedcompany" class="ma-1" :items="xcompanys" :search-input.sync="search_company"
|
||||
auto-select-first hide-details style="font-size:14px" outline no-filter item-text="name" return-object
|
||||
:loading="isLoading" no-data-text="Semua Kel. Pelanggan">
|
||||
<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 xs3>
|
||||
<v-select class="mini-select ma-1" :items="xgresults" item-text="name" return-object style="font-size:14px" v-model="xselectedgresult"
|
||||
label="Grup Hasil" outline hide-details></v-select>
|
||||
</v-flex>
|
||||
<v-flex text-xs-right 1>
|
||||
<!-- <span title="pilih dokter pembaca" v-if="btn_hide === false" @click="opendialogdoctor" class="icon-medium-fill-base white--text brown"><v-icon large dark>assignment_ind</v-icon></span> -->
|
||||
<span title="print all barcode" @click="printMultipleBarcode" class="icon-medium-fill-base xs1 white--text grey darken-1 ml-1 icon-print"></span>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card>
|
||||
<v-card>
|
||||
<v-layout style="max-height:610px;overflow-y:scroll" row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table :headers="headers" :items="patients" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template v-slot:headers="props">
|
||||
<tr>
|
||||
<th class="text-xs-left blue lighten-3 white--text">
|
||||
<v-checkbox style="padding-top:0;margin-top:0" hide-details color="blue lighten-1" :indeterminate="indeterminatex" @change="changeCbxAll(bar_chx_all)"
|
||||
v-model="bar_chx_all"></v-checkbox>
|
||||
</th>
|
||||
<th v-for="header in props.headers" :key="header.text" :class="header.class" :width="header.width">
|
||||
{{ header.text }}
|
||||
</th>
|
||||
</tr>
|
||||
</template>
|
||||
<template v-slot:items="props">
|
||||
<td style="width:15px" class="text-xs-left" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<v-checkbox style="padding-top:0;margin-top:0" color="blue lighten-1" hide-details v-model="props.item.chex" @change="checkTop()"></v-checkbox>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
{{ props.item.order_date}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<span class="font-weight-black caption">{{ props.item.T_OrderHeaderLabNumber }}</span>
|
||||
<span style="color:#800000" class="font-weight-bold caption">{{props.item.T_OrderHeaderLabNumberExt}}</span>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<p class="mb-0">{{fullname(props.item.patient_fullname)}}</p>
|
||||
<p style="cursor:pointer" class="mb-0" :title="props.item.umur">{{ props.item.patient_dob}}</p>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<p class="mb-0">{{ props.item.testname}}</p>
|
||||
<p class="mb-0 caption">{{ props.item.doctor_sender}}</p>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<p class="mb-0">{{ props.item.companyname}}</p>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<span v-if="props.item.status_print === '0'" title="print barcode" @click="printSingleBarcode(props.item)" class="icon-medium-fill-base-small xs1 white--text grey darken-1 ml-1 icon-print"></span>
|
||||
<span v-if="props.item.status_print !== '0'" title="print barcode" @click="printSingleBarcode(props.item)" class="icon-medium-fill-base-small xs1 white--text success darken-1 ml-1 icon-print"></span>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
|
||||
<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'),
|
||||
'one-x-check': httpVueLoader('../../common/onexcheck.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("groupresult/getstationstatus", {
|
||||
sdate: this.$store.state.groupresult.init_sdate,
|
||||
edate: this.$store.state.groupresult.init_edate,
|
||||
name: this.name,
|
||||
nolab: this.nolab,
|
||||
companyid: this.xselectedcompany.id,
|
||||
gresultid: this.xselectedgresult.id,
|
||||
// current_page:1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
changeCbxAllPrint(value) {
|
||||
var arr = this.barcodes_print
|
||||
this.indeterminatex_print = false
|
||||
arr.forEach((el) => {
|
||||
el.chex = value
|
||||
})
|
||||
var selected = _.filter(arr, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.selected_barcode_print = selected
|
||||
},
|
||||
checkTopPrint() {
|
||||
var barcodes = this.barcodes_print
|
||||
var selected = _.filter(barcodes, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.bar_chx_all_print = false
|
||||
this.indeterminatex_print = false
|
||||
if (selected.length > 0 && barcodes.length === selected.length) {
|
||||
this.bar_chx_all_print = true
|
||||
this.indeterminatex_print = false
|
||||
}
|
||||
if (selected.length > 0 && barcodes.length > selected.length) {
|
||||
this.bar_chx_all_print = false
|
||||
this.indeterminatex_print = true
|
||||
}
|
||||
this.selected_barcode_print = selected
|
||||
|
||||
},
|
||||
openbarcodeprint(value) {
|
||||
this.bar_chx_all_print = false
|
||||
this.indeterminatex_print = false
|
||||
this.dialogbarcode = true
|
||||
this.selected_barcode_print = []
|
||||
this.barcodes_print = value.barcodes
|
||||
console.log(value)
|
||||
//this.$store.dispatch("patient/lookup_barcodes",value)
|
||||
},
|
||||
fullname(value) {
|
||||
var xx = value.length
|
||||
if (xx > 25)
|
||||
return value.substring(0, 23) + '...'
|
||||
else
|
||||
return value
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.T_BarcodeLabID == this.$store.state.groupresult.selected_patient.T_BarcodeLabID
|
||||
},
|
||||
searchPatient() {
|
||||
this.$store.dispatch("groupresult/search", {
|
||||
sdate: this.$store.state.groupresult.init_sdate,
|
||||
edate: this.$store.state.groupresult.init_edate,
|
||||
name: this.name,
|
||||
nolab: this.nolab,
|
||||
companyid: this.xselectedcompany.id,
|
||||
gresultid: this.xselectedgresult.id,
|
||||
//current_page:1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(pat) {
|
||||
if (this.$store.state.groupresult.no_save == 0) {
|
||||
var patients = this.$store.state.groupresult.patients
|
||||
this.$store.commit("groupresult/update_selected_patient", pat)
|
||||
var idx = _.findIndex(patients, function (o) {
|
||||
return o.T_BarcodeLabID == pat.T_BarcodeLabID
|
||||
})
|
||||
this.$store.commit("groupresult/update_last_id", idx)
|
||||
} else {
|
||||
this.$store.commit("groupresult/update_open_alert_confirmation", true)
|
||||
}
|
||||
|
||||
},
|
||||
closeAlertConfirmation() {
|
||||
this.$store.commit("groupresult/update_open_alert_confirmation", false)
|
||||
},
|
||||
forgetAlertConfirmation() {
|
||||
this.$store.commit("groupresult/update_no_save", 0)
|
||||
this.$store.commit("groupresult/update_open_alert_confirmation", false)
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("groupresult/update_alert_success", val)
|
||||
},
|
||||
setNewPatient() {
|
||||
//this.$store.commit("groupresult/update_selected_Patient",{})
|
||||
|
||||
},
|
||||
openDialogRequirement(value) {
|
||||
//console.log(value)
|
||||
var trx = this.$store.state.groupresult.patients
|
||||
var idx = _.findIndex(trx, function (o) {
|
||||
return o.T_BarcodeLabBarcode == value.T_BarcodeLabBarcode
|
||||
})
|
||||
if (value.status === 'V' && value.requirement_status === 'Y') {
|
||||
|
||||
} else {
|
||||
this.$store.commit("groupresult/update_selected_patient", value)
|
||||
trx[idx].requirement_status = 'N'
|
||||
//console.log(trx[idx].requirements)
|
||||
this.$store.commit("groupresult/update_requirements", trx[idx].requirements)
|
||||
this.$store.commit("groupresult/update_dialog_requirement", true)
|
||||
}
|
||||
},
|
||||
checkReq(val, idx) {
|
||||
var xrequirements = this.requirements
|
||||
if (xrequirements[idx].status === 'D') {
|
||||
xrequirements[idx].chex = val
|
||||
this.$store.commit("groupresult/update_requirements", xrequirements)
|
||||
}
|
||||
},
|
||||
saveRequirement() {
|
||||
var sampletypes = this.$store.state.groupresult.patients
|
||||
var selected_sample = this.$store.state.groupresult.selected_patient
|
||||
var idx = _.findIndex(sampletypes, function (o) {
|
||||
return o.T_BarcodeLabID == selected_sample.T_BarcodeLabID
|
||||
})
|
||||
if (sampletypes[idx].status === 'D') {
|
||||
sampletypes[idx].requirements = this.$store.state.groupresult.requirements
|
||||
}
|
||||
this.$store.commit("groupresult/update_dialog_requirement", false)
|
||||
},
|
||||
confirmRequirement(value) {
|
||||
var sampletypes = this.$store.state.groupresult.patients
|
||||
var idx = _.findIndex(sampletypes, function (o) {
|
||||
return o.T_BarcodeLabID == value.T_BarcodeLabID
|
||||
})
|
||||
if (value.status === 'D') {
|
||||
sampletypes[idx].requirement_status = 'Y'
|
||||
this.$store.commit("groupresult/update_patients", sampletypes)
|
||||
|
||||
sampletypes[idx].requirements.forEach((el) => {
|
||||
el.chex = "N"
|
||||
})
|
||||
}
|
||||
},
|
||||
verify(value) {
|
||||
console.log(value)
|
||||
var goaction = true
|
||||
if (value.requirement_status === 'N') {
|
||||
var req_check = _.filter(value.requirements, function (o) {
|
||||
return o.chex === 'Y'
|
||||
})
|
||||
if (req_check.length === 0) {
|
||||
goaction = false
|
||||
}
|
||||
}
|
||||
if (value.status === 'D' && value.requirement_status !== 'X' && goaction) {
|
||||
console.log("in verify")
|
||||
this.$store.commit("groupresult/update_act", 'verify')
|
||||
this.$store.commit("groupresult/update_selected_patient", value)
|
||||
this.closeDialogAction()
|
||||
} else {
|
||||
//console.log('oeey')
|
||||
if (value.status === 'D') {
|
||||
this.$store.commit("groupresult/update_msg_info",
|
||||
"Mobil batmen ngeluarin api, ada requirement mohon dilengkapi")
|
||||
this.$store.commit("groupresult/update_open_dialog_info", true)
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
removeDoctor(value) {
|
||||
//this.selected_patient = value
|
||||
let arrPatient = this.$store.state.groupresult.patients
|
||||
var idx = _.findIndex(arrPatient, item => item.T_SamplingSoID === value.T_SamplingSoID)
|
||||
arrPatient[idx]['chex'] = true
|
||||
this.$store.commit("groupresult/update_patients", arrPatient)
|
||||
var selected = _.filter(arrPatient, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.$store.commit("groupresult/update_selected_patient", selected)
|
||||
this.$store.commit("groupresult/update_act", 'removedoctor')
|
||||
this.closeDialogAction()
|
||||
|
||||
},
|
||||
receive() {
|
||||
this.$store.commit("groupresult/update_act", 'receive')
|
||||
this.closeDialogAction()
|
||||
|
||||
},
|
||||
reject() {
|
||||
this.$store.commit("groupresult/update_act", 'reject')
|
||||
this.closeDialogAction()
|
||||
|
||||
},
|
||||
cancel() {
|
||||
this.$store.commit("groupresult/update_act", 'cancel')
|
||||
this.closeDialogAction()
|
||||
|
||||
},
|
||||
closeDialogAction() {
|
||||
console.log("closedialogaction")
|
||||
this.btn_hide = true
|
||||
var act = this.$store.state.groupresult.act
|
||||
var trx = this.$store.state.groupresult.selected_patient
|
||||
if (trx.length > 0) {
|
||||
this.$store.dispatch("groupresult/doaction", {
|
||||
act: act,
|
||||
sample: trx,
|
||||
nolab: this.nolab,
|
||||
stationid: this.xselectedstation.id,
|
||||
statusid: this.xselectedstatus.id,
|
||||
lastid: -1
|
||||
})
|
||||
} else {
|
||||
this.btn_hide = false
|
||||
this.$store.commit("groupresult/update_msg_info",
|
||||
"Tong kosong nyaring bunyinya, centang masih kosong tak ada gunanya<br/>Pilih salah satu biar ada aksi, jangan malah bengong lakukan saja"
|
||||
)
|
||||
this.$store.commit("groupresult/update_open_dialog_info", true)
|
||||
}
|
||||
|
||||
},
|
||||
closeDialogSuccess() {
|
||||
let arrPatient = this.$store.state.groupresult.patients
|
||||
var idx = _.findIndex(arrPatient, item => item.M_PatientID === this.$store.state.groupresult.last_id)
|
||||
console.log(idx)
|
||||
var xcur_page = 1
|
||||
// if(idx !== -1)
|
||||
// xcur_page = this.$store.state.groupresult.current_page
|
||||
|
||||
this.$store.dispatch("groupresult/search", {
|
||||
sdate: this.$store.state.groupresult.init_sdate,
|
||||
edate: this.$store.state.groupresult.init_edate,
|
||||
name: this.name,
|
||||
nolab: this.nolab,
|
||||
companyid: this.xselectedcompany.id,
|
||||
gresultid: this.xselectedgresult.id,
|
||||
// current_page:xcur_page,
|
||||
lastid: idx
|
||||
})
|
||||
|
||||
this.$store.commit("groupresult/update_dialog_success", false)
|
||||
},
|
||||
closeDialogInfo() {
|
||||
this.$store.commit("groupresult/update_open_dialog_info", false)
|
||||
},
|
||||
checkTop() {
|
||||
var barcodes = this.patients
|
||||
var selected = _.filter(barcodes, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.bar_chx_all = false
|
||||
this.indeterminatex = false
|
||||
if (selected.length > 0 && barcodes.length === selected.length) {
|
||||
this.bar_chx_all = true
|
||||
this.indeterminatex = false
|
||||
}
|
||||
if (selected.length > 0 && barcodes.length > selected.length) {
|
||||
this.bar_chx_all = false
|
||||
this.indeterminatex = true
|
||||
}
|
||||
this.$store.commit("groupresult/update_selected_patient", selected)
|
||||
console.log(selected)
|
||||
},
|
||||
changeCbxAll(value) {
|
||||
var arr = this.patients
|
||||
this.indeterminatex = false
|
||||
//arr.forEach((el)=>{el.chex = value})
|
||||
arr.forEach(function (entry) {
|
||||
entry.chex = value
|
||||
})
|
||||
var selected = _.filter(arr, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.$store.commit("groupresult/update_selected_patient", selected)
|
||||
},
|
||||
thr_search_company: _.debounce(function () {
|
||||
this.$store.dispatch("groupresult/searchcompany", this.search_company)
|
||||
}, 2000),
|
||||
thr_search_doctor: _.debounce(function () {
|
||||
this.$store.dispatch("groupresult/searchdoctor", {
|
||||
search: this.search_doctor
|
||||
})
|
||||
}, 2000),
|
||||
saveDoctor() {
|
||||
this.errors = {
|
||||
require_doctor: false,
|
||||
require_doctor_address: false
|
||||
}
|
||||
if (!_.isEmpty(this.selected_doctor, true) && !_.isEmpty(this.selected_doctor_address, true)) {
|
||||
var barcodes = this.patients
|
||||
var selected = _.filter(barcodes, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
var prm = {}
|
||||
prm.selected_doctor = this.selected_doctor
|
||||
prm.selected_doctor_address = this.selected_doctor_address
|
||||
prm.flagdoctorinoffice = this.flagdoctorinoffice
|
||||
prm.selected_patient = selected
|
||||
prm.search = {
|
||||
name: this.name,
|
||||
nolab: this.nolab,
|
||||
stationid: this.xselectedstation.id,
|
||||
statusid: this.xselectedstatus.id,
|
||||
// current_page:1,
|
||||
lastid: -1
|
||||
}
|
||||
this.$store.dispatch("groupresult/savedoctor", prm)
|
||||
} else {
|
||||
if (_.isEmpty(this.selected_doctor, true)) {
|
||||
this.errors.require_doctor = true
|
||||
}
|
||||
if (_.isEmpty(this.selected_doctor_address, true)) {
|
||||
this.errors.require_doctor_address = true
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
opendialogdoctor() {
|
||||
this.errors = {
|
||||
require_doctor: false,
|
||||
require_doctor_address: false
|
||||
}
|
||||
var trx = this.$store.state.groupresult.selected_patient
|
||||
if (trx.length > 0) {
|
||||
this.flagdoctorinoffice = false
|
||||
this.selected_doctor = {}
|
||||
this.selected_doctor_address = {}
|
||||
this.$store.commit("groupresult/update_doctors", [])
|
||||
this.$store.commit("groupresult/update_doctor_address", [])
|
||||
//this.dialog_doctor = true
|
||||
this.$store.dispatch("groupresult/getdoctorbystation", {
|
||||
stationid: this.xselectedstation.id,
|
||||
})
|
||||
} else {
|
||||
this.btn_hide = false
|
||||
this.$store.commit("groupresult/update_msg_info",
|
||||
"Tong kosong nyaring bunyinya, centang masih kosong tak ada gunanya<br/>Pilih salah satu biar ada aksi, jangan malah bengong lakukan saja"
|
||||
)
|
||||
this.$store.commit("groupresult/update_open_dialog_info", true)
|
||||
}
|
||||
},
|
||||
printMultipleBarcode() {
|
||||
var trx = this.$store.state.groupresult.selected_patient
|
||||
_.forEach(trx, function (value) {
|
||||
one_print_barcode_amplop_so(value.T_OrderDetailID);
|
||||
})
|
||||
var prm = {}
|
||||
prm.selected_order = trx
|
||||
prm.search = {
|
||||
sdate: this.$store.state.groupresult.init_sdate,
|
||||
edate: this.$store.state.groupresult.init_edate,
|
||||
name: this.name,
|
||||
nolab: this.nolab,
|
||||
companyid: this.xselectedcompany.id,
|
||||
gresultid: this.xselectedgresult.id,
|
||||
// current_page:1,
|
||||
lastid: -1
|
||||
}
|
||||
this.$store.dispatch("groupresult/saveprintalllog", prm);
|
||||
},
|
||||
printSingleBarcode(value) {
|
||||
console.log(value)
|
||||
var label = value.T_BarcodeLabBarcode
|
||||
one_print_barcode_amplop_so(value.T_OrderDetailID)
|
||||
this.$store.dispatch("groupresult/saveprintlog", value)
|
||||
},
|
||||
changeFilter(e) {
|
||||
if (e.key == 'Enter') {
|
||||
////this.searchPatient()
|
||||
}
|
||||
},
|
||||
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: {
|
||||
flagdoctorinoffice: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.flag_doctor_in_office
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_flag_doctor_in_office", val)
|
||||
}
|
||||
},
|
||||
bar_chx_all: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.bar_chx_all
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_bar_chx_all", val)
|
||||
}
|
||||
},
|
||||
indeterminatex: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.indeterminatex
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_indeterminatex", val)
|
||||
}
|
||||
},
|
||||
btn_hide: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.btn_hide
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_btn_hide", val)
|
||||
}
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_dialog_success", val)
|
||||
}
|
||||
},
|
||||
msgsuccess() {
|
||||
return this.$store.state.groupresult.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.groupresult.search_status == 1
|
||||
},
|
||||
xstations() {
|
||||
return this.$store.state.groupresult.stations
|
||||
},
|
||||
xselectedstation: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.selected_station
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_selected_station", val)
|
||||
// this.searchPatient()
|
||||
}
|
||||
},
|
||||
xcompanys() {
|
||||
return this.$store.state.groupresult.companys
|
||||
},
|
||||
xselectedcompany: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.selected_company
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_selected_company", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
xgresults() {
|
||||
return this.$store.state.groupresult.gresults
|
||||
},
|
||||
xselectedgresult: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.selected_gresult
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_selected_gresult", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
xstatuses() {
|
||||
return this.$store.state.groupresult.statuses
|
||||
},
|
||||
xselectedstatus: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.selected_status
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_selected_status", val)
|
||||
//this.searchPatient()
|
||||
}
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.groupresult.patients
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_open_alert_confirmation", val)
|
||||
}
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_current_page", val)
|
||||
this.$store.dispatch("groupresult/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.groupresult.total_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_total_page", val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_open_dialog_info", false)
|
||||
}
|
||||
},
|
||||
msginfo() {
|
||||
return this.$store.state.groupresult.msg_info
|
||||
},
|
||||
name: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.name
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_name", val)
|
||||
}
|
||||
},
|
||||
nolab: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.nolab
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_nolab", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
doctors() {
|
||||
return this.$store.state.groupresult.doctors
|
||||
},
|
||||
selected_doctor: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.selected_doctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_selected_doctor", val)
|
||||
this.$store.commit("groupresult/update_doctor_address", val.address)
|
||||
//console.log(val.address)
|
||||
if (val.address)
|
||||
this.selected_doctor_address = val.address[0]
|
||||
}
|
||||
},
|
||||
selected_doctor_address: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.selected_doctor_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_selected_doctor_address", val)
|
||||
}
|
||||
},
|
||||
doctor_address() {
|
||||
return this.$store.state.groupresult.doctor_address
|
||||
},
|
||||
dialog_doctor: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.dialog_doctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_dialog_doctor", val)
|
||||
}
|
||||
},
|
||||
requirements: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.requirements
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_requirements", val)
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart() {
|
||||
return this.formatDate(this.init_sdate)
|
||||
},
|
||||
filterComputedDateFormattedEnd() {
|
||||
return this.formatDate(this.init_edate)
|
||||
},
|
||||
init_sdate: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.init_sdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_init_sdate", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
init_edate: {
|
||||
get() {
|
||||
return this.$store.state.groupresult.init_edate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("groupresult/update_init_edate", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
search_company(val, old) {
|
||||
if (val == old) return;
|
||||
if (!val) return;
|
||||
if (val.length < 1) return;
|
||||
if (this.$store.state.groupresult.update_autocomplete_status == 1) return;
|
||||
this.thr_search_company();
|
||||
},
|
||||
search_doctor(val, old) {
|
||||
//console.log(val)
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.groupresult.update_autocomplete_status == 1) return
|
||||
this.thr_search_doctor()
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
menufilterdatestart: false,
|
||||
menufilterdateend: false,
|
||||
search_company: '',
|
||||
dialogbarcode: false,
|
||||
bar_chx_all_print: false,
|
||||
// bar_chx_all:false,
|
||||
selected_barcode_print: [],
|
||||
selected_barcode: [],
|
||||
barcodes_print: [],
|
||||
barcodes: [],
|
||||
indeterminatex_print: false,
|
||||
//indeterminatex:false,
|
||||
search_doctor: '',
|
||||
errors: {
|
||||
require_doctor: false,
|
||||
require_doctor_address: false
|
||||
},
|
||||
page: 1,
|
||||
headers: [{
|
||||
text: "TGL. TRANSAKSI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "text-xs-left pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO REG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "text-xs-left pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "30%",
|
||||
class: "text-xs-left pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "25%",
|
||||
class: "text-xs-left pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KEL. PELANGGAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "20%",
|
||||
class: "text-xs-left pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
880
test/vuex/one-barcode-nonlab/components/oneLabNumberList.vue
Normal file
880
test/vuex/one-barcode-nonlab/components/oneLabNumberList.vue
Normal file
@@ -0,0 +1,880 @@
|
||||
<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-dialog v-model="dialog_doctor" persistent max-width="45%">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Pilih dokter pembaca</v-card-title>
|
||||
<v-card-text>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-switch v-model="flagdoctorinoffice" label="Dokter Pramita"></v-switch>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs6 pa-1>
|
||||
<v-select item-text="name" return-object :items="doctors" v-model="selected_doctor" label="Dokter"></v-select>
|
||||
<p v-if="errors.require_doctor" class="error pl-2 pr-2" style="color:#fff">Ayo pilih salah satu</p>
|
||||
</v-flex>
|
||||
<v-flex xs6 pa-1>
|
||||
<v-select item-text="M_DoctorAddressDescription" return-object :items="doctor_address" v-model="selected_doctor_address"
|
||||
label="Alamat Dokter"></v-select>
|
||||
<p v-if="errors.require_doctor_address" class="error pl-2 pr-2" style="color:#fff">Mau tau dong alamatnya</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="black" flat @click="dialog_doctor = false">Tutup</v-btn>
|
||||
<v-btn color="green darken-1" flat @click="saveDoctor">Simpan</v-btn>
|
||||
<!--<v-btn color="green darken-1" flat @click="saveRequirement()">Simpan</v-btn>-->
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout align-center row>
|
||||
<v-flex xs3>
|
||||
<v-menu v-model="menufilterdatestart" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field class="mr-2" v-model="filterComputedDateFormattedStart" label="Tanggal Awal" outline hide-details readonly
|
||||
v-on="on" @blur="date = deFormatedDate(filterComputedDateFormattedStart)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="init_sdate" no-title @input="menufilterdatestart = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
<v-menu v-model="menufilterdateend" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field class="mr-2" v-model="filterComputedDateFormattedEnd" label="Tanggal Akhir" outline hide-details readonly v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedEnd)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="init_edate" no-title @input="menufilterdateend = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<v-text-field style="font-size:14px" class="mr-1" label="No Reg / Nama" outline v-model="nolab" hide-details></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs5>
|
||||
<v-autocomplete label="Kel. Pelanggan" v-model="xselectedcompany" class="ma-1" :items="xcompanys" :search-input.sync="search_company"
|
||||
auto-select-first hide-details style="font-size:14px" outline no-filter item-text="name" return-object
|
||||
:loading="isLoading" no-data-text="Semua Kel. Pelanggan">
|
||||
<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 text-xs-right 1>
|
||||
<!-- <span title="pilih dokter pembaca" v-if="btn_hide === false" @click="opendialogdoctor" class="icon-medium-fill-base white--text brown"><v-icon large dark>assignment_ind</v-icon></span> -->
|
||||
<span title="print all barcode" @click="printMultipleBarcode" class="icon-medium-fill-base xs1 white--text grey darken-1 ml-1 icon-print"></span>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card>
|
||||
<v-card>
|
||||
<v-layout style="max-height:610px;overflow-y:scroll" row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table :headers="headers" :items="patients" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template v-slot:headers="props">
|
||||
<tr>
|
||||
<th class="text-xs-left blue lighten-3 white--text">
|
||||
<v-checkbox style="padding-top:0;margin-top:0" hide-details color="blue lighten-1" :indeterminate="indeterminatex" @change="changeCbxAll(bar_chx_all)"
|
||||
v-model="bar_chx_all"></v-checkbox>
|
||||
</th>
|
||||
<th v-for="header in props.headers" :key="header.text" :class="header.class" :width="header.width">
|
||||
{{ header.text }}
|
||||
</th>
|
||||
</tr>
|
||||
</template>
|
||||
<template v-slot:items="props">
|
||||
<td style="width:15px" class="text-xs-left" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<v-checkbox style="padding-top:0;margin-top:0"
|
||||
color="blue lighten-1" hide-details v-model="props.item.chex" @change="checkTop()"></v-checkbox>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
{{ props.item.order_date}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<span class="font-weight-black caption">{{ props.item.T_OrderHeaderLabNumber }}</span>
|
||||
<span style="color:#800000" class="font-weight-bold caption">{{props.item.T_OrderHeaderLabNumberExt}}</span>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<p class="mb-0">{{fullname(props.item.patient_fullname)}}</p>
|
||||
<p style="cursor:pointer" class="mb-0" :title="props.item.umur">{{ props.item.patient_dob}}</p>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<p class="mb-0">{{ props.item.testname}}</p>
|
||||
<p class="mb-0 caption">{{ props.item.doctor_sender}}</p>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<p class="mb-0">{{ props.item.companyname}}</p>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber':props.item.iscito === 'Y'}">
|
||||
<span v-if="props.item.status_print === '0'" title="print barcode" @click="printSingleBarcode(props.item)" class="icon-medium-fill-base-small xs1 white--text grey darken-1 ml-1 icon-print"></span>
|
||||
<span v-if="props.item.status_print !== '0'" title="print barcode" @click="printSingleBarcode(props.item)" class="icon-medium-fill-base-small xs1 white--text success darken-1 ml-1 icon-print"></span>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
|
||||
<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'),
|
||||
'one-x-check': httpVueLoader('../../common/onexcheck.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("labnumber/getstationstatus", {
|
||||
sdate: this.$store.state.labnumber.init_sdate,
|
||||
edate: this.$store.state.labnumber.init_edate,
|
||||
name: this.name,
|
||||
nolab: this.nolab,
|
||||
companyid: this.xselectedcompany.id,
|
||||
gresultid: this.xselectedgresult.id,
|
||||
// current_page:1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
changeCbxAllPrint(value) {
|
||||
var arr = this.barcodes_print
|
||||
this.indeterminatex_print = false
|
||||
arr.forEach((el) => {
|
||||
el.chex = value
|
||||
})
|
||||
var selected = _.filter(arr, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.selected_barcode_print = selected
|
||||
},
|
||||
checkTopPrint() {
|
||||
var barcodes = this.barcodes_print
|
||||
var selected = _.filter(barcodes, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.bar_chx_all_print = false
|
||||
this.indeterminatex_print = false
|
||||
if (selected.length > 0 && barcodes.length === selected.length) {
|
||||
this.bar_chx_all_print = true
|
||||
this.indeterminatex_print = false
|
||||
}
|
||||
if (selected.length > 0 && barcodes.length > selected.length) {
|
||||
this.bar_chx_all_print = false
|
||||
this.indeterminatex_print = true
|
||||
}
|
||||
this.selected_barcode_print = selected
|
||||
|
||||
},
|
||||
openbarcodeprint(value) {
|
||||
this.bar_chx_all_print = false
|
||||
this.indeterminatex_print = false
|
||||
this.dialogbarcode = true
|
||||
this.selected_barcode_print = []
|
||||
this.barcodes_print = value.barcodes
|
||||
console.log(value)
|
||||
//this.$store.dispatch("patient/lookup_barcodes",value)
|
||||
},
|
||||
fullname(value) {
|
||||
var xx = value.length
|
||||
if (xx > 25)
|
||||
return value.substring(0, 23) + '...'
|
||||
else
|
||||
return value
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.T_BarcodeLabID == this.$store.state.labnumber.selected_patient.T_BarcodeLabID
|
||||
},
|
||||
searchPatient() {
|
||||
this.$store.dispatch("labnumber/search", {
|
||||
sdate: this.$store.state.labnumber.init_sdate,
|
||||
edate: this.$store.state.labnumber.init_edate,
|
||||
name: this.name,
|
||||
nolab: this.nolab,
|
||||
companyid: this.xselectedcompany.id,
|
||||
gresultid: this.xselectedgresult.id,
|
||||
// current_page:1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(pat) {
|
||||
if (this.$store.state.labnumber.no_save == 0) {
|
||||
var patients = this.$store.state.labnumber.patients
|
||||
this.$store.commit("labnumber/update_selected_patient", pat)
|
||||
var idx = _.findIndex(patients, function (o) {
|
||||
return o.T_BarcodeLabID == pat.T_BarcodeLabID
|
||||
})
|
||||
this.$store.commit("labnumber/update_last_id", idx)
|
||||
} else {
|
||||
this.$store.commit("labnumber/update_open_alert_confirmation", true)
|
||||
}
|
||||
|
||||
},
|
||||
closeAlertConfirmation() {
|
||||
this.$store.commit("labnumber/update_open_alert_confirmation", false)
|
||||
},
|
||||
forgetAlertConfirmation() {
|
||||
this.$store.commit("labnumber/update_no_save", 0)
|
||||
this.$store.commit("labnumber/update_open_alert_confirmation", false)
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("labnumber/update_alert_success", val)
|
||||
},
|
||||
setNewPatient() {
|
||||
//this.$store.commit("labnumber/update_selected_Patient",{})
|
||||
|
||||
},
|
||||
openDialogRequirement(value) {
|
||||
//console.log(value)
|
||||
var trx = this.$store.state.labnumber.patients
|
||||
var idx = _.findIndex(trx, function (o) {
|
||||
return o.T_BarcodeLabBarcode == value.T_BarcodeLabBarcode
|
||||
})
|
||||
if (value.status === 'V' && value.requirement_status === 'Y') {
|
||||
|
||||
} else {
|
||||
this.$store.commit("labnumber/update_selected_patient", value)
|
||||
trx[idx].requirement_status = 'N'
|
||||
//console.log(trx[idx].requirements)
|
||||
this.$store.commit("labnumber/update_requirements", trx[idx].requirements)
|
||||
this.$store.commit("labnumber/update_dialog_requirement", true)
|
||||
}
|
||||
},
|
||||
checkReq(val, idx) {
|
||||
var xrequirements = this.requirements
|
||||
if (xrequirements[idx].status === 'D') {
|
||||
xrequirements[idx].chex = val
|
||||
this.$store.commit("labnumber/update_requirements", xrequirements)
|
||||
}
|
||||
},
|
||||
saveRequirement() {
|
||||
var sampletypes = this.$store.state.labnumber.patients
|
||||
var selected_sample = this.$store.state.labnumber.selected_patient
|
||||
var idx = _.findIndex(sampletypes, function (o) {
|
||||
return o.T_BarcodeLabID == selected_sample.T_BarcodeLabID
|
||||
})
|
||||
if (sampletypes[idx].status === 'D') {
|
||||
sampletypes[idx].requirements = this.$store.state.labnumber.requirements
|
||||
}
|
||||
this.$store.commit("labnumber/update_dialog_requirement", false)
|
||||
},
|
||||
confirmRequirement(value) {
|
||||
var sampletypes = this.$store.state.labnumber.patients
|
||||
var idx = _.findIndex(sampletypes, function (o) {
|
||||
return o.T_BarcodeLabID == value.T_BarcodeLabID
|
||||
})
|
||||
if (value.status === 'D') {
|
||||
sampletypes[idx].requirement_status = 'Y'
|
||||
this.$store.commit("labnumber/update_patients", sampletypes)
|
||||
|
||||
sampletypes[idx].requirements.forEach((el) => {
|
||||
el.chex = "N"
|
||||
})
|
||||
}
|
||||
},
|
||||
verify(value) {
|
||||
console.log(value)
|
||||
var goaction = true
|
||||
if (value.requirement_status === 'N') {
|
||||
var req_check = _.filter(value.requirements, function (o) {
|
||||
return o.chex === 'Y'
|
||||
})
|
||||
if (req_check.length === 0) {
|
||||
goaction = false
|
||||
}
|
||||
}
|
||||
if (value.status === 'D' && value.requirement_status !== 'X' && goaction) {
|
||||
console.log("in verify")
|
||||
this.$store.commit("labnumber/update_act", 'verify')
|
||||
this.$store.commit("labnumber/update_selected_patient", value)
|
||||
this.closeDialogAction()
|
||||
} else {
|
||||
//console.log('oeey')
|
||||
if (value.status === 'D') {
|
||||
this.$store.commit("labnumber/update_msg_info",
|
||||
"Mobil batmen ngeluarin api, ada requirement mohon dilengkapi")
|
||||
this.$store.commit("labnumber/update_open_dialog_info", true)
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
removeDoctor(value) {
|
||||
//this.selected_patient = value
|
||||
let arrPatient = this.$store.state.labnumber.patients
|
||||
var idx = _.findIndex(arrPatient, item => item.T_SamplingSoID === value.T_SamplingSoID)
|
||||
arrPatient[idx]['chex'] = true
|
||||
this.$store.commit("labnumber/update_patients", arrPatient)
|
||||
var selected = _.filter(arrPatient, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.$store.commit("labnumber/update_selected_patient", selected)
|
||||
this.$store.commit("labnumber/update_act", 'removedoctor')
|
||||
this.closeDialogAction()
|
||||
|
||||
},
|
||||
receive() {
|
||||
this.$store.commit("labnumber/update_act", 'receive')
|
||||
this.closeDialogAction()
|
||||
|
||||
},
|
||||
reject() {
|
||||
this.$store.commit("labnumber/update_act", 'reject')
|
||||
this.closeDialogAction()
|
||||
|
||||
},
|
||||
cancel() {
|
||||
this.$store.commit("labnumber/update_act", 'cancel')
|
||||
this.closeDialogAction()
|
||||
|
||||
},
|
||||
closeDialogAction() {
|
||||
console.log("closedialogaction")
|
||||
this.btn_hide = true
|
||||
var act = this.$store.state.labnumber.act
|
||||
var trx = this.$store.state.labnumber.selected_patient
|
||||
if (trx.length > 0) {
|
||||
this.$store.dispatch("labnumber/doaction", {
|
||||
act: act,
|
||||
sample: trx,
|
||||
nolab: this.nolab,
|
||||
stationid: this.xselectedstation.id,
|
||||
statusid: this.xselectedstatus.id,
|
||||
lastid: -1
|
||||
})
|
||||
} else {
|
||||
this.btn_hide = false
|
||||
this.$store.commit("labnumber/update_msg_info",
|
||||
"Tong kosong nyaring bunyinya, centang masih kosong tak ada gunanya<br/>Pilih salah satu biar ada aksi, jangan malah bengong lakukan saja"
|
||||
)
|
||||
this.$store.commit("labnumber/update_open_dialog_info", true)
|
||||
}
|
||||
|
||||
},
|
||||
closeDialogSuccess() {
|
||||
let arrPatient = this.$store.state.labnumber.patients
|
||||
var idx = _.findIndex(arrPatient, item => item.M_PatientID === this.$store.state.labnumber.last_id)
|
||||
console.log(idx)
|
||||
var xcur_page = 1
|
||||
// if(idx !== -1)
|
||||
// xcur_page = this.$store.state.labnumber.current_page
|
||||
|
||||
this.$store.dispatch("labnumber/search", {
|
||||
sdate: this.$store.state.labnumber.init_sdate,
|
||||
edate: this.$store.state.labnumber.init_edate,
|
||||
name: this.name,
|
||||
nolab: this.nolab,
|
||||
companyid: this.xselectedcompany.id,
|
||||
gresultid: this.xselectedgresult.id,
|
||||
// current_page:xcur_page,
|
||||
lastid: idx
|
||||
})
|
||||
|
||||
this.$store.commit("labnumber/update_dialog_success", false)
|
||||
},
|
||||
closeDialogInfo() {
|
||||
this.$store.commit("labnumber/update_open_dialog_info", false)
|
||||
},
|
||||
checkTop() {
|
||||
var barcodes = this.patients
|
||||
var selected = _.filter(barcodes, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.bar_chx_all = false
|
||||
this.indeterminatex = false
|
||||
if (selected.length > 0 && barcodes.length === selected.length) {
|
||||
this.bar_chx_all = true
|
||||
this.indeterminatex = false
|
||||
}
|
||||
if (selected.length > 0 && barcodes.length > selected.length) {
|
||||
this.bar_chx_all = false
|
||||
this.indeterminatex = true
|
||||
}
|
||||
this.$store.commit("labnumber/update_selected_patient", selected)
|
||||
console.log(selected)
|
||||
},
|
||||
changeCbxAll(value) {
|
||||
var arr = this.patients
|
||||
this.indeterminatex = false
|
||||
//arr.forEach((el)=>{el.chex = value})
|
||||
arr.forEach(function (entry) {
|
||||
entry.chex = value
|
||||
})
|
||||
var selected = _.filter(arr, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.$store.commit("labnumber/update_selected_patient", selected)
|
||||
},
|
||||
thr_search_company: _.debounce(function () {
|
||||
this.$store.dispatch("labnumber/searchcompany", this.search_company)
|
||||
}, 2000),
|
||||
thr_search_doctor: _.debounce(function () {
|
||||
this.$store.dispatch("labnumber/searchdoctor", {
|
||||
search: this.search_doctor
|
||||
})
|
||||
}, 2000),
|
||||
saveDoctor() {
|
||||
this.errors = {
|
||||
require_doctor: false,
|
||||
require_doctor_address: false
|
||||
}
|
||||
if (!_.isEmpty(this.selected_doctor, true) && !_.isEmpty(this.selected_doctor_address, true)) {
|
||||
var barcodes = this.patients
|
||||
var selected = _.filter(barcodes, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
var prm = {}
|
||||
prm.selected_doctor = this.selected_doctor
|
||||
prm.selected_doctor_address = this.selected_doctor_address
|
||||
prm.flagdoctorinoffice = this.flagdoctorinoffice
|
||||
prm.selected_patient = selected
|
||||
prm.search = {
|
||||
name: this.name,
|
||||
nolab: this.nolab,
|
||||
stationid: this.xselectedstation.id,
|
||||
statusid: this.xselectedstatus.id,
|
||||
// current_page:1,
|
||||
lastid: -1
|
||||
}
|
||||
this.$store.dispatch("labnumber/savedoctor", prm)
|
||||
} else {
|
||||
if (_.isEmpty(this.selected_doctor, true)) {
|
||||
this.errors.require_doctor = true
|
||||
}
|
||||
if (_.isEmpty(this.selected_doctor_address, true)) {
|
||||
this.errors.require_doctor_address = true
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
opendialogdoctor() {
|
||||
this.errors = {
|
||||
require_doctor: false,
|
||||
require_doctor_address: false
|
||||
}
|
||||
var trx = this.$store.state.labnumber.selected_patient
|
||||
if (trx.length > 0) {
|
||||
this.flagdoctorinoffice = false
|
||||
this.selected_doctor = {}
|
||||
this.selected_doctor_address = {}
|
||||
this.$store.commit("labnumber/update_doctors", [])
|
||||
this.$store.commit("labnumber/update_doctor_address", [])
|
||||
//this.dialog_doctor = true
|
||||
this.$store.dispatch("labnumber/getdoctorbystation", {
|
||||
stationid: this.xselectedstation.id,
|
||||
})
|
||||
} else {
|
||||
this.btn_hide = false
|
||||
this.$store.commit("labnumber/update_msg_info",
|
||||
"Tong kosong nyaring bunyinya, centang masih kosong tak ada gunanya<br/>Pilih salah satu biar ada aksi, jangan malah bengong lakukan saja"
|
||||
)
|
||||
this.$store.commit("labnumber/update_open_dialog_info", true)
|
||||
}
|
||||
},
|
||||
printSingleBarcode(value) {
|
||||
//console.log(value)
|
||||
var label = value.T_BarcodeLabBarcode
|
||||
one_print_barcode_amplop_so_group(value.T_OrderHeaderID)
|
||||
this.$store.dispatch("labnumber/saveprintlog", value)
|
||||
},
|
||||
printMultipleBarcode() {
|
||||
var trx = this.$store.state.labnumber.selected_patient
|
||||
_.forEach(trx, function (value) {
|
||||
one_print_barcode_amplop_so_group(value.T_OrderHeaderID)
|
||||
})
|
||||
var prm = {}
|
||||
prm.selected_order = trx
|
||||
prm.search = {
|
||||
sdate: this.$store.state.labnumber.init_sdate,
|
||||
edate: this.$store.state.labnumber.init_edate,
|
||||
name: this.name,
|
||||
nolab: this.nolab,
|
||||
companyid: this.xselectedcompany.id,
|
||||
gresultid: this.xselectedgresult.id,
|
||||
// current_page:1,
|
||||
lastid: -1
|
||||
}
|
||||
this.$store.dispatch("labnumber/saveprintalllog", prm);
|
||||
},
|
||||
changeFilter(e) {
|
||||
if (e.key == 'Enter') {
|
||||
////this.searchPatient()
|
||||
}
|
||||
},
|
||||
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: {
|
||||
flagdoctorinoffice: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.flag_doctor_in_office
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_flag_doctor_in_office", val)
|
||||
}
|
||||
},
|
||||
bar_chx_all: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.bar_chx_all
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_bar_chx_all", val)
|
||||
}
|
||||
},
|
||||
indeterminatex: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.indeterminatex
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_indeterminatex", val)
|
||||
}
|
||||
},
|
||||
btn_hide: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.btn_hide
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_btn_hide", val)
|
||||
}
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_dialog_success", val)
|
||||
}
|
||||
},
|
||||
msgsuccess() {
|
||||
return this.$store.state.labnumber.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.labnumber.search_status == 1
|
||||
},
|
||||
xstations() {
|
||||
return this.$store.state.labnumber.stations
|
||||
},
|
||||
xselectedstation: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.selected_station
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_selected_station", val)
|
||||
// this.searchPatient()
|
||||
}
|
||||
},
|
||||
xcompanys() {
|
||||
return this.$store.state.labnumber.companys
|
||||
},
|
||||
xselectedcompany: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.selected_company
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_selected_company", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
xgresults() {
|
||||
return this.$store.state.labnumber.gresults
|
||||
},
|
||||
xselectedgresult: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.selected_gresult
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_selected_gresult", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
xstatuses() {
|
||||
return this.$store.state.labnumber.statuses
|
||||
},
|
||||
xselectedstatus: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.selected_status
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_selected_status", val)
|
||||
//this.searchPatient()
|
||||
}
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.labnumber.patients
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_open_alert_confirmation", val)
|
||||
}
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_current_page", val)
|
||||
this.$store.dispatch("labnumber/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.labnumber.total_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_total_page", val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_open_dialog_info", false)
|
||||
}
|
||||
},
|
||||
msginfo() {
|
||||
return this.$store.state.labnumber.msg_info
|
||||
},
|
||||
name: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.name
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_name", val)
|
||||
}
|
||||
},
|
||||
nolab: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.nolab
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_nolab", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
doctors() {
|
||||
return this.$store.state.labnumber.doctors
|
||||
},
|
||||
selected_doctor: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.selected_doctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_selected_doctor", val)
|
||||
this.$store.commit("labnumber/update_doctor_address", val.address)
|
||||
//console.log(val.address)
|
||||
if (val.address)
|
||||
this.selected_doctor_address = val.address[0]
|
||||
}
|
||||
},
|
||||
selected_doctor_address: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.selected_doctor_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_selected_doctor_address", val)
|
||||
}
|
||||
},
|
||||
doctor_address() {
|
||||
return this.$store.state.labnumber.doctor_address
|
||||
},
|
||||
dialog_doctor: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.dialog_doctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_dialog_doctor", val)
|
||||
}
|
||||
},
|
||||
requirements: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.requirements
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_requirements", val)
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart() {
|
||||
return this.formatDate(this.init_sdate)
|
||||
},
|
||||
filterComputedDateFormattedEnd() {
|
||||
return this.formatDate(this.init_edate)
|
||||
},
|
||||
init_sdate: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.init_sdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_init_sdate", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
init_edate: {
|
||||
get() {
|
||||
return this.$store.state.labnumber.init_edate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("labnumber/update_init_edate", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
search_company(val, old) {
|
||||
if (val == old) return;
|
||||
if (!val) return;
|
||||
if (val.length < 1) return;
|
||||
if (this.$store.state.labnumber.update_autocomplete_status == 1) return;
|
||||
this.thr_search_company();
|
||||
},
|
||||
search_doctor(val, old) {
|
||||
//console.log(val)
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.labnumber.update_autocomplete_status == 1) return
|
||||
this.thr_search_doctor()
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
menufilterdatestart: false,
|
||||
menufilterdateend: false,
|
||||
search_company: '',
|
||||
dialogbarcode: false,
|
||||
bar_chx_all_print: false,
|
||||
// bar_chx_all:false,
|
||||
selected_barcode_print: [],
|
||||
selected_barcode: [],
|
||||
barcodes_print: [],
|
||||
barcodes: [],
|
||||
indeterminatex_print: false,
|
||||
//indeterminatex:false,
|
||||
search_doctor: '',
|
||||
errors: {
|
||||
require_doctor: false,
|
||||
require_doctor_address: false
|
||||
},
|
||||
page: 1,
|
||||
headers: [{
|
||||
text: "TGL. TRANSAKSI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "text-xs-left pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO REG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "text-xs-left pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "30%",
|
||||
class: "text-xs-left pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "25%",
|
||||
class: "text-xs-left pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KEL. PELANGGAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "20%",
|
||||
class: "text-xs-left pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
111
test/vuex/one-barcode-nonlab/index.php
Normal file
111
test/vuex/one-barcode-nonlab/index.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<!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 v-on:key="doSomething">
|
||||
<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="right" fill-height pa-1>
|
||||
<!--<one-sample-call-so-info></one-sample-call-so-info>-->
|
||||
<one-group-result-list></one-group-result-list>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="left" fill-height pa-1>
|
||||
<one-lab-number-list></one-lab-number-list>
|
||||
</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>
|
||||
<script src="../../../libs/one_print_barcode.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',
|
||||
mounted(){
|
||||
document.addEventListener('keypress',logKeyboard)
|
||||
window.key_enter = ''
|
||||
async function logKeyboard(e) {
|
||||
|
||||
window.key_enter = (window.key_enter + e.key).toUpperCase()
|
||||
if(e.key == 'Enter') {
|
||||
if(window.key_enter.includes('STF')){
|
||||
var prm = {search:window.key_enter.replace('ENTER','').trim()}
|
||||
await store.dispatch("groupresult/search_staff",prm)
|
||||
}
|
||||
window.key_enter = ''
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
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-group-result-list': httpVueLoader('./components/oneGroupResultList.vue'),
|
||||
'one-lab-number-list': httpVueLoader('./components/oneLabNumberList.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
872
test/vuex/one-barcode-nonlab/modules/groupresult.js
Normal file
872
test/vuex/one-barcode-nonlab/modules/groupresult.js
Normal file
@@ -0,0 +1,872 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/groupresult.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
last_id:-1,
|
||||
last_saved_id:-1,
|
||||
x_addr_id:0,
|
||||
btn_hide:false,
|
||||
act:'edit',
|
||||
act_addr:'new',
|
||||
get_data_status:0,
|
||||
search_patient: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
preffix:'',
|
||||
patient_name:'',
|
||||
suffix:'',
|
||||
patients: [],
|
||||
selected_patient: [],
|
||||
sampletypes:[],
|
||||
selected_sampletype:{},
|
||||
total_patients:0,
|
||||
patient_address: [],
|
||||
stations:[],
|
||||
selected_station:{},
|
||||
companys:[],
|
||||
selected_company:{},
|
||||
gresults:[],
|
||||
selected_gresult:{},
|
||||
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,
|
||||
dialog_doctor:false,
|
||||
requirements:[],
|
||||
selected_sample:{},
|
||||
open_dialog_info:false,
|
||||
msg_info:'',
|
||||
name:'',
|
||||
nolab:'',
|
||||
information_bahan:[],
|
||||
staff:{id:0,code:'',name:'BELUM ADA STAF',code:'',userid:''},
|
||||
bar_chx_all:false,
|
||||
indeterminatex:false,
|
||||
doctors:[],
|
||||
selected_doctor:{},
|
||||
doctor_address:[],
|
||||
selected_doctor_address:{},
|
||||
flag_doctor_in_office :false,
|
||||
init_sdate: moment(new Date()).format('YYYY-MM-DD'),
|
||||
init_edate: moment(new Date()).format('YYYY-MM-DD')
|
||||
},
|
||||
mutations: {
|
||||
update_init_sdate(state, val) {
|
||||
state.init_sdate = val
|
||||
},
|
||||
update_init_edate(state, val) {
|
||||
state.init_edate = val
|
||||
},
|
||||
update_flag_doctor_in_office(state, val) {
|
||||
state.flag_doctor_in_office = val
|
||||
},
|
||||
update_selected_doctor_address(state, val) {
|
||||
state.selected_doctor_address = val
|
||||
},
|
||||
update_doctor_address(state, val) {
|
||||
state.doctor_address = val
|
||||
},
|
||||
update_selected_doctor(state, val) {
|
||||
state.selected_doctor = val
|
||||
},
|
||||
update_doctors(state, val) {
|
||||
state.doctors = val
|
||||
},
|
||||
update_bar_chx_all(state, val) {
|
||||
state.bar_chx_all = val
|
||||
},
|
||||
update_indeterminatex(state, val) {
|
||||
state.indeterminatex = val
|
||||
},
|
||||
update_btn_hide(state, val) {
|
||||
state.btn_hide = val
|
||||
},
|
||||
update_staff(state, val) {
|
||||
state.staff = val
|
||||
},
|
||||
update_information_bahan(state, val) {
|
||||
state.information_bahan = val
|
||||
},
|
||||
update_name(state, val) {
|
||||
state.name = val
|
||||
},
|
||||
update_nolab(state, val) {
|
||||
state.nolab = val
|
||||
},
|
||||
update_open_dialog_info(state, val) {
|
||||
state.open_dialog_info = val
|
||||
},
|
||||
update_msg_info(state, val) {
|
||||
state.msg_info = val
|
||||
},
|
||||
update_selected_sample(state, val) {
|
||||
state.selected_sample = val
|
||||
},
|
||||
update_requirements(state, val) {
|
||||
state.requirements = val
|
||||
},
|
||||
update_dialog_doctor(state, val) {
|
||||
state.dialog_doctor = 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, patient) {
|
||||
state.search_error_message = patient
|
||||
},
|
||||
update_search_patient(state, patient) {
|
||||
state.search_patient = patient
|
||||
},
|
||||
update_preffix(state, val) {
|
||||
state.preffix = val
|
||||
},
|
||||
update_patient_name(state, val) {
|
||||
state.patient_name = val
|
||||
},
|
||||
update_suffix(state, val) {
|
||||
state.suffix = val
|
||||
},
|
||||
update_patients(state, data) {
|
||||
state.patients = data
|
||||
},
|
||||
update_selected_patient(state, val) {
|
||||
state.selected_patient = 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_companys(state, val) {
|
||||
state.companys = val
|
||||
},
|
||||
update_selected_company(state, val) {
|
||||
state.selected_company = val
|
||||
},
|
||||
update_gresults(state, val) {
|
||||
state.gresults = val
|
||||
},
|
||||
update_selected_gresult(state, val) {
|
||||
state.selected_gresult = 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_patients(state, val) {
|
||||
state.total_patients = val
|
||||
},
|
||||
update_dialog_action(state, val) {
|
||||
state.dialog_action = val
|
||||
},
|
||||
update_msg_action(state, val) {
|
||||
state.msg_action = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_patient", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_patient", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_patient", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_patients", data.records)
|
||||
context.commit("update_total_patients", data.total)
|
||||
context.commit("update_bar_chx_all",false)
|
||||
context.commit("update_indeterminatex",false)
|
||||
//context.commit("update_total_page", data.total)
|
||||
context.commit("update_no_save", 0)
|
||||
context.commit("update_selected_patient", [])
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_patient", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async getstationstatus(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getstationstatus(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_gresults",data.records.gresults)
|
||||
context.commit("update_selected_gresult",data.records.gresults[0])
|
||||
prm.companyid = 0
|
||||
prm.gresultid = data.records.gresults[0].id
|
||||
context.dispatch("search",prm)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getdoctorbystation(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getdoctorbystation(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_doctors",data.records.doctors)
|
||||
context.commit("update_selected_doctor",data.records.doctors[0])
|
||||
context.commit("update_doctor_address",data.records.doctors[0].address)
|
||||
context.commit("update_selected_doctor_address",data.records.doctors[0].address[0])
|
||||
context.commit("update_dialog_doctor",true)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getrequirements(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getrequirements(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_requirements",data.records)
|
||||
context.commit("update_dialog_doctor",true)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_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_companys",resp.data.records)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_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_patientID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data dokter " + prm.M_patientName + " sudah terupdate dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async saveprintlog(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.saveprintlog(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
var patients = context.state.patients
|
||||
var idx = _.findIndex(patients, function(o) { return o.T_SamplingSoID == prm.T_SamplingSoID })
|
||||
patients[idx].status_print = "1"
|
||||
context.commit("update_patients",patients)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async saveprintalllog(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.saveprintalllog(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.dispatch("search",prm.search)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async receivesample(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)
|
||||
prm.search.lastid = -1
|
||||
context.dispatch("search",prm.search)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async savedoctor(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.savedoctor(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_dialog_doctor",false)
|
||||
//this.dialog_doctor = false
|
||||
prm.search.lastid = -1
|
||||
context.dispatch("search",prm.search)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async saverequirement(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.saverequirement(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_dialog_doctor", false)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async newpatient(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.newpatient(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_patientName + " 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_patientName + " sudah dihapus dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_preffix",'')
|
||||
context.commit("update_patient_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 search_staff(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.search_staff(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
|
||||
}
|
||||
if(data.records)
|
||||
context.commit("update_staff",resp.data.records)
|
||||
else{
|
||||
context.commit("update_staff",{id:0,code:'',name:'STAF TIDAK DITEMUKAN',code:'',userid:''})
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async search_patient(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
prm.stationid = context.state.selected_station.id
|
||||
prm.statusid = context.state.selected_status.id
|
||||
let resp= await api.search_patient(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.rootState.px.req_status
|
||||
var rst = data.records
|
||||
if(rst){
|
||||
console.log(rst)
|
||||
context.commit("update_nolab",prm.search)
|
||||
context.commit("update_patients",rst)
|
||||
context.commit("update_bar_chx_all",true)
|
||||
context.commit("update_indeterminatex",false)
|
||||
context.commit("update_selected_patient",rst)
|
||||
}
|
||||
else{
|
||||
var msg = "Naik angkot ketemu si marni, <span class='mono' style='color:red;font-weight:bold'>"+prm.search+"</span> maaf sample-nya belum sampai di sini"
|
||||
context.commit("update_msg_info",msg)
|
||||
context.commit("update_open_dialog_info",true)
|
||||
}
|
||||
}
|
||||
} 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_patientAddressM_patientID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan data alamat dokter " + prm.M_patientName + " 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_patientAddressM_patientID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Perubahan data alamat dokter " + prm.M_patientName + " 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_patientAddressM_patientID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penghapusan data alamat "+prm.M_patientAddressNote+" dari dokter " + prm.M_patientName + " 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['sampletypes'])
|
||||
context.commit("update_information_bahan",data.records['information_bahan'])
|
||||
|
||||
}
|
||||
} 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)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_act",'-')
|
||||
context.commit("update_btn_hide",false)
|
||||
if(data.records['status'] === 'OK'){
|
||||
context.dispatch("search",prm)
|
||||
var xprm = {}
|
||||
xprm.nolab = ''
|
||||
xprm.stationid = context.rootState.samplesend.selected_station.id
|
||||
context.dispatch("samplesend/search",xprm,{root:true})
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async searchdoctor(context,prm) {
|
||||
context.commit("update_autocomplete_status",1)
|
||||
try {
|
||||
//console.log('Aye')
|
||||
prm.token = one_token()
|
||||
prm.stationid = context.state.selected_station.id
|
||||
//console.log(prm)
|
||||
let resp= await api.searchdoctor(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_doctors",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
872
test/vuex/one-barcode-nonlab/modules/labnumber.js
Normal file
872
test/vuex/one-barcode-nonlab/modules/labnumber.js
Normal file
@@ -0,0 +1,872 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/labnumber.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
last_id:-1,
|
||||
last_saved_id:-1,
|
||||
x_addr_id:0,
|
||||
btn_hide:false,
|
||||
act:'edit',
|
||||
act_addr:'new',
|
||||
get_data_status:0,
|
||||
search_patient: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
preffix:'',
|
||||
patient_name:'',
|
||||
suffix:'',
|
||||
patients: [],
|
||||
selected_patient: [],
|
||||
sampletypes:[],
|
||||
selected_sampletype:{},
|
||||
total_patients:0,
|
||||
patient_address: [],
|
||||
stations:[],
|
||||
selected_station:{},
|
||||
companys:[],
|
||||
selected_company:{},
|
||||
gresults:[],
|
||||
selected_gresult:{},
|
||||
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,
|
||||
dialog_doctor:false,
|
||||
requirements:[],
|
||||
selected_sample:{},
|
||||
open_dialog_info:false,
|
||||
msg_info:'',
|
||||
name:'',
|
||||
nolab:'',
|
||||
information_bahan:[],
|
||||
staff:{id:0,code:'',name:'BELUM ADA STAF',code:'',userid:''},
|
||||
bar_chx_all:false,
|
||||
indeterminatex:false,
|
||||
doctors:[],
|
||||
selected_doctor:{},
|
||||
doctor_address:[],
|
||||
selected_doctor_address:{},
|
||||
flag_doctor_in_office :false,
|
||||
init_sdate: moment(new Date()).format('YYYY-MM-DD'),
|
||||
init_edate: moment(new Date()).format('YYYY-MM-DD')
|
||||
},
|
||||
mutations: {
|
||||
update_init_sdate(state, val) {
|
||||
state.init_sdate = val
|
||||
},
|
||||
update_init_edate(state, val) {
|
||||
state.init_edate = val
|
||||
},
|
||||
update_flag_doctor_in_office(state, val) {
|
||||
state.flag_doctor_in_office = val
|
||||
},
|
||||
update_selected_doctor_address(state, val) {
|
||||
state.selected_doctor_address = val
|
||||
},
|
||||
update_doctor_address(state, val) {
|
||||
state.doctor_address = val
|
||||
},
|
||||
update_selected_doctor(state, val) {
|
||||
state.selected_doctor = val
|
||||
},
|
||||
update_doctors(state, val) {
|
||||
state.doctors = val
|
||||
},
|
||||
update_bar_chx_all(state, val) {
|
||||
state.bar_chx_all = val
|
||||
},
|
||||
update_indeterminatex(state, val) {
|
||||
state.indeterminatex = val
|
||||
},
|
||||
update_btn_hide(state, val) {
|
||||
state.btn_hide = val
|
||||
},
|
||||
update_staff(state, val) {
|
||||
state.staff = val
|
||||
},
|
||||
update_information_bahan(state, val) {
|
||||
state.information_bahan = val
|
||||
},
|
||||
update_name(state, val) {
|
||||
state.name = val
|
||||
},
|
||||
update_nolab(state, val) {
|
||||
state.nolab = val
|
||||
},
|
||||
update_open_dialog_info(state, val) {
|
||||
state.open_dialog_info = val
|
||||
},
|
||||
update_msg_info(state, val) {
|
||||
state.msg_info = val
|
||||
},
|
||||
update_selected_sample(state, val) {
|
||||
state.selected_sample = val
|
||||
},
|
||||
update_requirements(state, val) {
|
||||
state.requirements = val
|
||||
},
|
||||
update_dialog_doctor(state, val) {
|
||||
state.dialog_doctor = 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, patient) {
|
||||
state.search_error_message = patient
|
||||
},
|
||||
update_search_patient(state, patient) {
|
||||
state.search_patient = patient
|
||||
},
|
||||
update_preffix(state, val) {
|
||||
state.preffix = val
|
||||
},
|
||||
update_patient_name(state, val) {
|
||||
state.patient_name = val
|
||||
},
|
||||
update_suffix(state, val) {
|
||||
state.suffix = val
|
||||
},
|
||||
update_patients(state, data) {
|
||||
state.patients = data
|
||||
},
|
||||
update_selected_patient(state, val) {
|
||||
state.selected_patient = 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_companys(state, val) {
|
||||
state.companys = val
|
||||
},
|
||||
update_selected_company(state, val) {
|
||||
state.selected_company = val
|
||||
},
|
||||
update_gresults(state, val) {
|
||||
state.gresults = val
|
||||
},
|
||||
update_selected_gresult(state, val) {
|
||||
state.selected_gresult = 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_patients(state, val) {
|
||||
state.total_patients = val
|
||||
},
|
||||
update_dialog_action(state, val) {
|
||||
state.dialog_action = val
|
||||
},
|
||||
update_msg_action(state, val) {
|
||||
state.msg_action = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_patient", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_patient", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_patient", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_patients", data.records)
|
||||
context.commit("update_total_patients", data.total)
|
||||
context.commit("update_bar_chx_all",false)
|
||||
context.commit("update_indeterminatex",false)
|
||||
//context.commit("update_total_page", data.total)
|
||||
context.commit("update_no_save", 0)
|
||||
context.commit("update_selected_patient", [])
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_patient", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async getstationstatus(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getstationstatus(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_gresults",data.records.gresults)
|
||||
context.commit("update_selected_gresult",data.records.gresults[0])
|
||||
prm.companyid = 0
|
||||
prm.gresultid = data.records.gresults[0].id
|
||||
context.dispatch("search",prm)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getdoctorbystation(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getdoctorbystation(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_doctors",data.records.doctors)
|
||||
context.commit("update_selected_doctor",data.records.doctors[0])
|
||||
context.commit("update_doctor_address",data.records.doctors[0].address)
|
||||
context.commit("update_selected_doctor_address",data.records.doctors[0].address[0])
|
||||
context.commit("update_dialog_doctor",true)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getrequirements(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getrequirements(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_requirements",data.records)
|
||||
context.commit("update_dialog_doctor",true)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_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_companys",resp.data.records)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_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_patientID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data dokter " + prm.M_patientName + " sudah terupdate dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async saveprintlog(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.saveprintlog(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
var patients = context.state.patients
|
||||
var idx = _.findIndex(patients, function(o) { return o.T_SamplingSoID == prm.T_SamplingSoID })
|
||||
patients[idx].status_print = "1"
|
||||
context.commit("update_patients",patients)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async saveprintalllog(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.saveprintalllog(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.dispatch("search",prm.search)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async receivesample(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)
|
||||
prm.search.lastid = -1
|
||||
context.dispatch("search",prm.search)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async savedoctor(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.savedoctor(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_dialog_doctor",false)
|
||||
//this.dialog_doctor = false
|
||||
prm.search.lastid = -1
|
||||
context.dispatch("search",prm.search)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async saverequirement(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.saverequirement(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_dialog_doctor", false)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async newpatient(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.newpatient(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_patientName + " 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_patientName + " sudah dihapus dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_preffix",'')
|
||||
context.commit("update_patient_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 search_staff(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.search_staff(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
|
||||
}
|
||||
if(data.records)
|
||||
context.commit("update_staff",resp.data.records)
|
||||
else{
|
||||
context.commit("update_staff",{id:0,code:'',name:'STAF TIDAK DITEMUKAN',code:'',userid:''})
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async search_patient(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
prm.stationid = context.state.selected_station.id
|
||||
prm.statusid = context.state.selected_status.id
|
||||
let resp= await api.search_patient(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.rootState.px.req_status
|
||||
var rst = data.records
|
||||
if(rst){
|
||||
console.log(rst)
|
||||
context.commit("update_nolab",prm.search)
|
||||
context.commit("update_patients",rst)
|
||||
context.commit("update_bar_chx_all",true)
|
||||
context.commit("update_indeterminatex",false)
|
||||
context.commit("update_selected_patient",rst)
|
||||
}
|
||||
else{
|
||||
var msg = "Naik angkot ketemu si marni, <span class='mono' style='color:red;font-weight:bold'>"+prm.search+"</span> maaf sample-nya belum sampai di sini"
|
||||
context.commit("update_msg_info",msg)
|
||||
context.commit("update_open_dialog_info",true)
|
||||
}
|
||||
}
|
||||
} 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_patientAddressM_patientID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan data alamat dokter " + prm.M_patientName + " 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_patientAddressM_patientID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Perubahan data alamat dokter " + prm.M_patientName + " 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_patientAddressM_patientID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penghapusan data alamat "+prm.M_patientAddressNote+" dari dokter " + prm.M_patientName + " 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['sampletypes'])
|
||||
context.commit("update_information_bahan",data.records['information_bahan'])
|
||||
|
||||
}
|
||||
} 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)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_act",'-')
|
||||
context.commit("update_btn_hide",false)
|
||||
if(data.records['status'] === 'OK'){
|
||||
context.dispatch("search",prm)
|
||||
var xprm = {}
|
||||
xprm.nolab = ''
|
||||
xprm.stationid = context.rootState.samplesend.selected_station.id
|
||||
context.dispatch("samplesend/search",xprm,{root:true})
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async searchdoctor(context,prm) {
|
||||
context.commit("update_autocomplete_status",1)
|
||||
try {
|
||||
//console.log('Aye')
|
||||
prm.token = one_token()
|
||||
prm.stationid = context.state.selected_station.id
|
||||
//console.log(prm)
|
||||
let resp= await api.searchdoctor(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_doctors",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
29
test/vuex/one-barcode-nonlab/store.js
Normal file
29
test/vuex/one-barcode-nonlab/store.js
Normal file
@@ -0,0 +1,29 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import groupresult from "./modules/groupresult.js";
|
||||
import labnumber from "./modules/labnumber.js";
|
||||
import system from "../../../apps/modules/system/system.js";
|
||||
export const store = new Vuex.Store({
|
||||
modules: {
|
||||
groupresult: groupresult,
|
||||
labnumber:labnumber,
|
||||
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