diff --git a/test/vuex/cpone-setup-mcu-v7/api/patient.js b/test/vuex/cpone-setup-mcu-v7/api/patient.js
index b258348..1b7f9e9 100644
--- a/test/vuex/cpone-setup-mcu-v7/api/patient.js
+++ b/test/vuex/cpone-setup-mcu-v7/api/patient.js
@@ -22,7 +22,7 @@ const URL = "/one-api/cpone/mcuoffline/";
-export async function getmultitemplates(prm) {
+export async function getmultitemplates(prm) {
try {
var resp = await axios.post(URL + 'setupmcu/setupmcucponev7/getmultitemplates', prm);
if (resp.status != 200) {
@@ -39,10 +39,29 @@ export async function getmultitemplates(prm) {
message: e.message
};
}
-}
-
-
-export async function getCover(prm) {
+}
+
+export async function getReportUrlTemplates(prm) {
+ try {
+ var resp = await axios.post(URL + 'setupmcu/setupmcucponev7/get_report_template_mcu', 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 getCover(prm) {
try {
console.log('dadasda cover api')
var resp = await axios.post(URL + 'setupmcu/setupmcucponev7/getcover', prm);
@@ -676,4 +695,4 @@ export async function getdeliveries(prm) {
message: e.message
};
}
-}
\ No newline at end of file
+}
diff --git a/test/vuex/cpone-setup-mcu-v7/components/oneMdPatientDetail.vue b/test/vuex/cpone-setup-mcu-v7/components/oneMdPatientDetail.vue
index 1201dbc..9c35cb2 100644
--- a/test/vuex/cpone-setup-mcu-v7/components/oneMdPatientDetail.vue
+++ b/test/vuex/cpone-setup-mcu-v7/components/oneMdPatientDetail.vue
@@ -391,8 +391,8 @@
-
-
+
+
@@ -419,9 +419,14 @@
-
-
-
+
+
+
+
+
+
+
@@ -651,10 +656,11 @@ module.exports = {
components: {
"one-dialog-print": httpVueLoader("../../common/oneDialogPrintX.vue"),
},
- mounted() {
- this.$store.dispatch("patient/getTemplateFisikMapping");
- this.$store.dispatch("patient/getBranch");
- this.$store.dispatch("patient/getTPriceHeaderCurrent");
+ mounted() {
+ this.$store.dispatch("patient/getTemplateFisikMapping");
+ this.$store.dispatch("patient/getReportUrlTemplates", { Mgm_McuID: 0 });
+ this.$store.dispatch("patient/getBranch");
+ this.$store.dispatch("patient/getTPriceHeaderCurrent");
// this.$store.dispatch("patient/getPackets", {
// searchPacket : this.search_packet,
// current_page: this.current_page_packet,
@@ -738,12 +744,23 @@ module.exports = {
}
},
// cpone
- xgeneratepasswordby() {
- return this.$store.state.patient.generatepasswordby
- },
- selected_generatepasswordby: {
- get() {
- return this.$store.state.patient.selected_generatepasswordby
+ xgeneratepasswordby() {
+ return this.$store.state.patient.generatepasswordby
+ },
+ xreportUrlTemplates() {
+ return this.$store.state.patient.reportUrlTemplates
+ },
+ selected_reportUrlTemplate: {
+ get() {
+ return this.$store.state.patient.selected_reportUrlTemplate
+ },
+ set(val) {
+ this.$store.commit("patient/update_selected_reportUrlTemplate", val || {})
+ }
+ },
+ selected_generatepasswordby: {
+ get() {
+ return this.$store.state.patient.selected_generatepasswordby
},
set(val) {
this.$store.commit("patient/update_selected_generatepasswordby", val)
@@ -1458,10 +1475,11 @@ module.exports = {
// }
// this.$store.dispatch("patient/savesetup",prm)
- var prm = {
- Mgm_McuGeneratePasswordBY: this.selected_generatepasswordby.generatepasswordbycode,
- Mgm_McuReportHasil: this.reportresult,
- arrUserMcu: this.xUserMculists,
+ var prm = {
+ Mgm_McuGeneratePasswordBY: this.selected_generatepasswordby.generatepasswordbycode,
+ Mcu_ReportUrlTemplateID: this.selected_reportUrlTemplate && this.selected_reportUrlTemplate.id ? this.selected_reportUrlTemplate.id : 0,
+ Mgm_McuReportHasil: this.reportresult,
+ arrUserMcu: this.xUserMculists,
deleted_usermcus: this.$store.state.patient.deleted_usermcus,
xid: this.$store.state.patient.xid,
act: this.$store.state.patient.act,
diff --git a/test/vuex/cpone-setup-mcu-v7/components/oneMdPatientList.vue b/test/vuex/cpone-setup-mcu-v7/components/oneMdPatientList.vue
index fc9b873..fe4658e 100644
--- a/test/vuex/cpone-setup-mcu-v7/components/oneMdPatientList.vue
+++ b/test/vuex/cpone-setup-mcu-v7/components/oneMdPatientList.vue
@@ -236,9 +236,12 @@ module.exports = {
Mgm_McuID: row.Mgm_McuID
})
- this.$store.dispatch("patient/getBg", {
- Mgm_McuID: row.Mgm_McuID
- })
+ this.$store.dispatch("patient/getBg", {
+ Mgm_McuID: row.Mgm_McuID
+ })
+ this.$store.dispatch("patient/getReportUrlTemplates", {
+ Mgm_McuID: row.Mgm_McuID
+ })
this.$store.commit("patient/update_inp_Mgm_McuNote", row.Mgm_McuNote)
@@ -259,10 +262,14 @@ module.exports = {
this.$store.dispatch("patient/getusermcu", {
Mgm_McuID: this.$store.state.patient.selected_patient.Mgm_McuID
})
- this.$store.commit("patient/update_reportresult", row.Mgm_McuReportHasil)
- this.$store.commit("patient/update_selected_generatepasswordby", {
- generatepasswordbycode: row.generatepasswordbycode,
- generatepasswordbyname: row.generatepasswordbyname
+ this.$store.commit("patient/update_reportresult", row.Mgm_McuReportHasil)
+ this.$store.commit("patient/update_selected_reportUrlTemplate", {
+ id: row.Mcu_ReportUrlTemplateID || 0,
+ reportName: row.Mcu_ReportUrlTemplateName || ""
+ })
+ this.$store.commit("patient/update_selected_generatepasswordby", {
+ generatepasswordbycode: row.generatepasswordbycode,
+ generatepasswordbyname: row.generatepasswordbyname
})
// this.$store.commit("patient/update_companies", [{id:row.McuOfflinePrepareM_CompanyID,name:row.M_CompanyName}])
@@ -325,10 +332,12 @@ module.exports = {
this.$store.commit("patient/update_inp_Mgm_McuUserEmail", "")
this.$store.commit("patient/update_selected_branch", {})
this.$store.commit("patient/update_selected_tpriceheaderformCb", {})
- this.$store.commit("patient/update_userMcuLists", [])
- this.$store.commit("patient/update_reportresult", "1")
- this.$store.commit("patient/update_selected_generatepasswordby", {})
- },
+ this.$store.commit("patient/update_userMcuLists", [])
+ this.$store.commit("patient/update_reportresult", "1")
+ this.$store.commit("patient/update_selected_generatepasswordby", {})
+ this.$store.commit("patient/update_selected_reportUrlTemplate", {})
+ this.$store.dispatch("patient/getReportUrlTemplates", { Mgm_McuID: 0 })
+ },
searchMgmMcu() {
// var prm = this.default_mou
// prm.search = this.search_mgmmcu
@@ -652,4 +661,4 @@ module.exports = {
};
}
}
-
\ No newline at end of file
+
diff --git a/test/vuex/cpone-setup-mcu-v7/modules/patient.js b/test/vuex/cpone-setup-mcu-v7/modules/patient.js
index 941d444..c81fe1b 100644
--- a/test/vuex/cpone-setup-mcu-v7/modules/patient.js
+++ b/test/vuex/cpone-setup-mcu-v7/modules/patient.js
@@ -157,20 +157,28 @@ export default {
selected_cover: {code: 'DFLT', name: 'Cover Default'},
backgrounds: [],
selected_bg: {code: 'DFLT', name: 'Background Default', image: 'one-ui/BackgroundWesterindo.png'},
- multitemplates: [],
- selected_multitemplates: {},
- // cpone
- },
- mutations: {
+ multitemplates: [],
+ selected_multitemplates: {},
+ reportUrlTemplates: [],
+ selected_reportUrlTemplate: {},
+ // cpone
+ },
+ mutations: {
update_multitemplates(state, val) {
state.multitemplates = val
},
- update_selected_multitemplates(state, val) {
- state.selected_multitemplates = val
- },
- update_covers(state, val) {
- state.covers = val
- },
+ update_selected_multitemplates(state, val) {
+ state.selected_multitemplates = val
+ },
+ update_reportUrlTemplates(state, val) {
+ state.reportUrlTemplates = val
+ },
+ update_selected_reportUrlTemplate(state, val) {
+ state.selected_reportUrlTemplate = val
+ },
+ update_covers(state, val) {
+ state.covers = val
+ },
update_backgrounds(state, val) {
state.backgrounds = val
},
@@ -850,7 +858,7 @@ export default {
}
},
- async getTemplateFisikMapping(context) {
+ async getTemplateFisikMapping(context) {
context.commit("update_search_patient", 1)
try {
var prm = { token: one_token() }
@@ -867,7 +875,27 @@ export default {
} catch (e) {
context.commit("update_search_patient", 3)
}
- },
+ },
+ async getReportUrlTemplates(context, prm) {
+ context.commit("update_get_data_status", 1)
+ try {
+ var xprm = prm || {}
+ xprm.token = one_token()
+ let resp = await api.getReportUrlTemplates(xprm)
+ if (resp.status != "OK") {
+ context.commit("update_get_data_status", 3)
+ } else {
+ context.commit("update_get_data_status", 2)
+ const rows = resp.data.records || []
+ context.commit("update_reportUrlTemplates", rows)
+ if (resp.data.selected) {
+ context.commit("update_selected_reportUrlTemplate", resp.data.selected)
+ }
+ }
+ } catch (e) {
+ context.commit("update_get_data_status", 3)
+ }
+ },
async searchv0(context, prm) {
context.commit("update_search_patient", 1)
@@ -964,9 +992,10 @@ export default {
context.commit("update_userMcuLists", [])
context.commit("update_inp_Mgm_McuUserEmail", "")
context.commit("update_inp_Mgm_McuUserPassword", "")
- context.commit("update_reportresult", "1")
- context.commit("update_selected_generatepasswordby", {})
- context.commit("update_inp_Mgm_McuLowBackPainTampilSemua", false)
+ context.commit("update_reportresult", "1")
+ context.commit("update_selected_generatepasswordby", {})
+ context.commit("update_selected_reportUrlTemplate", {})
+ context.commit("update_inp_Mgm_McuLowBackPainTampilSemua", false)
// context.commit("update_total_patient_test", 0)
if (context.state.act === 'new')
@@ -1009,9 +1038,10 @@ export default {
context.commit("update_inp_Mgm_McuTotalParticipant", 0)
context.commit("update_inp_Mgm_McuPicName", "")
context.commit("update_inp_Mgm_McuPicEmail", "")
- context.commit("update_reportresult", "1")
- context.commit("update_selected_generatepasswordby", {})
- // context.commit("update_current_page_packet", 1)
+ context.commit("update_reportresult", "1")
+ context.commit("update_selected_generatepasswordby", {})
+ context.commit("update_selected_reportUrlTemplate", {})
+ // context.commit("update_current_page_packet", 1)
// context.commit("update_total_patient_packet", 0)
}
} catch (e) {
@@ -1450,4 +1480,4 @@ export default {
}
},
}
-}
\ No newline at end of file
+}