diff --git a/test/vuex/acc-one-approval-po-asset/api/api.js b/test/vuex/acc-one-approval-po-asset/api/api.js
new file mode 100644
index 0000000..7990b68
--- /dev/null
+++ b/test/vuex/acc-one-approval-po-asset/api/api.js
@@ -0,0 +1,64 @@
+const URL = "/one-api/mockup/purchase/order/PurchaseOrderAset";
+const URLRO = "/one-api/mockup/receive-item-po/ReceiveItemPOAsset";
+
+async function request(endpoint, params) {
+ try {
+ const resp = await axios.post(URL + endpoint, params)
+ if (resp.status !== 200) {
+ throw new Error(resp.statusText);
+ }
+ return resp.data;
+ } catch (error) {
+ return {
+ status: "ERR",
+ message: error.message
+ }
+ }
+}
+
+export async function getListSupplier(params) {
+ return request("/getListSupplier", params);
+}
+
+export async function getListCabang(params) {
+ return request("/getListCabang", params);
+}
+
+export async function getListGudang(params) {
+ return request("/getListGudang", params);
+}
+
+export async function getDaftarPoAset(params) {
+ return request("/getDaftarPoAset", params);
+}
+
+export async function getDaftarAttachment(params) {
+ return request("/getDaftarAttachment", params);
+}
+
+export async function getUserApproveLevel(params) {
+ return request("/getUserApproveLevel", params);
+}
+
+export async function updateApprovalPO(params) {
+ return request("/updateApprovalPO", params);
+}
+
+export async function getDataKontrakPoAset(params) {
+ return request("/getDataKontrakPoAset", params);
+}
+
+export async function generatePOItemReceive(params) {
+ try {
+ const resp = await axios.post(URLRO + "/generatePOItemReceive", params)
+ if (resp.status !== 200) {
+ throw new Error(resp.statusText);
+ }
+ return resp.data;
+ } catch (error) {
+ return {
+ status: "ERR",
+ message: error.message
+ }
+ }
+}
diff --git a/test/vuex/acc-one-approval-po-asset/components/dialog-attachment.vue b/test/vuex/acc-one-approval-po-asset/components/dialog-attachment.vue
new file mode 100644
index 0000000..f6b7266
--- /dev/null
+++ b/test/vuex/acc-one-approval-po-asset/components/dialog-attachment.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+ VIEW ATTACHMENT
+
+
+
+
+
+
+
+
+
+
+
+
+ Tutup
+
+
+
+
+
+
+
+ {{ view_title }}
+
+
+
+
+
+
+
+
+
+ Tutup
+
+
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-approval-po-asset/components/dialog-confirm.vue b/test/vuex/acc-one-approval-po-asset/components/dialog-confirm.vue
new file mode 100644
index 0000000..92defec
--- /dev/null
+++ b/test/vuex/acc-one-approval-po-asset/components/dialog-confirm.vue
@@ -0,0 +1,186 @@
+
+
+
+ KONFIRMASI ORDER ASET
+
+
+
+
+
+ FORM ORDER ASET
+
+
+
+ FORM KONTRAK ASET
+
+
+
+ ITEM ORDER ASET
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+ Rp. {{ formatCurrency(item.value) }}
+
+
+
+
+
+
+ Lampiran
+
+ Batal
+
+ {{ user.M_UserM_ApproveLevelID == '1' ? "Verifikasi" : "Approve" }}
+
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-approval-po-asset/components/dialog-select-request-asset.vue b/test/vuex/acc-one-approval-po-asset/components/dialog-select-request-asset.vue
new file mode 100644
index 0000000..76618e9
--- /dev/null
+++ b/test/vuex/acc-one-approval-po-asset/components/dialog-select-request-asset.vue
@@ -0,0 +1,95 @@
+
+
+
+
+ TAMBAH ITEM REQUEST
+
+
+
+
+
+
+
+
+
+ | {{ props.item.PurchaseRequestNumber }} |
+
+ {{ props.item.Requestedby }}
+ {{ props.item.M_BranchName }}
+ |
+
+ {{ props.item.M_ItemCode }}
+ {{ props.item.M_ItemDesc }}
+ |
+ {{ props.item.ItemUnitName }} |
+ {{ props.item.RequestQty }} |
+
+
+
+
+
+
+
+ Tutup
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-approval-po-asset/components/form-item-request-asset.vue b/test/vuex/acc-one-approval-po-asset/components/form-item-request-asset.vue
new file mode 100644
index 0000000..d018db2
--- /dev/null
+++ b/test/vuex/acc-one-approval-po-asset/components/form-item-request-asset.vue
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+ |
+ {{ props.expanded
+ ? "keyboard_arrow_down"
+ : "keyboard_arrow_right"
+ }}
+ |
+ {{ props.item.M_ItemDesc }} |
+ {{ props.item.RequestQty }} |
+
+ Rp. {{ formatCurrency(props.item.SupplierPrice) }}
+ |
+
+
+ {{ props.item.DiskonAmount }}%
+
+
+ Rp. {{ formatCurrency(props.item.DiskonAmount) }}
+
+ |
+
+ Rp. {{ formatCurrency(props.item.EndPrice) }}
+ |
+
+ Rp. {{ formatCurrency(props.item.TempTotal) }}
+ |
+
+
+
+
+
+
+
+
+
+ | {{ det.item.M_ItemDesc }} |
+ {{ det.item.PurchaseRequestNumber }} |
+ {{ det.item.M_BranchName }} |
+ {{ det.item.RequestQty }} |
+ {{ det.item.ItemUnitName }} |
+
+ Rp. {{ formatCurrency(det.item.SupplierPrice) }}
+ |
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-approval-po-asset/components/form-kontrak-asset.vue b/test/vuex/acc-one-approval-po-asset/components/form-kontrak-asset.vue
new file mode 100644
index 0000000..df8868d
--- /dev/null
+++ b/test/vuex/acc-one-approval-po-asset/components/form-kontrak-asset.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-approval-po-asset/components/form-order-asset.vue b/test/vuex/acc-one-approval-po-asset/components/form-order-asset.vue
new file mode 100644
index 0000000..474e50d
--- /dev/null
+++ b/test/vuex/acc-one-approval-po-asset/components/form-order-asset.vue
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-approval-po-asset/components/main-layout.vue b/test/vuex/acc-one-approval-po-asset/components/main-layout.vue
new file mode 100644
index 0000000..eeff884
--- /dev/null
+++ b/test/vuex/acc-one-approval-po-asset/components/main-layout.vue
@@ -0,0 +1,269 @@
+
+
+
+ APPROVE PURCHASE ORDER ASET
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | {{ props.item.PurchaseOrderNumber }} |
+ {{ props.item.PurchaseOrderDate }} |
+ {{ props.item.SupplierName }} |
+ {{ props.item.M_BranchName }} |
+ {{ props.item.PurchaseOrderNote }} |
+
+ Rp. {{ formatCurrency(props.item.PurchaseOrderGrandTotal) }}
+ |
+ {{ props.item.PurchaseOrderStatus }} |
+
+
+
+
+ detail
+ list_alt
+
+
+ APPROVED
+
+
+
+
+ verifikasi
+ done
+
+
+ approve
+ done_all
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+ {{ snackbar.msg }}
+ Tutup
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-approval-po-asset/index.php b/test/vuex/acc-one-approval-po-asset/index.php
new file mode 100644
index 0000000..1b59d1a
--- /dev/null
+++ b/test/vuex/acc-one-approval-po-asset/index.php
@@ -0,0 +1,60 @@
+
+
+
+
|
GRAND TOTAL
diff --git a/test/vuex/acc-one-faktur-v4/module/data.js b/test/vuex/acc-one-faktur-v4/module/data.js
index b4f9461..3551e34 100644
--- a/test/vuex/acc-one-faktur-v4/module/data.js
+++ b/test/vuex/acc-one-faktur-v4/module/data.js
@@ -177,7 +177,7 @@ export default {
let duedate = moment(po.PurchaseOrderDate).add(Number(po.PurchaseOrderPaymentTerm), 'days').format("YYYY-MM-DD")
form.form_duedate = duedate
- form.form_refnumber = po.PurchaseOrderRefNumber
+ form.form_refnumber = po.SupplierInvoiceDeliveryOrderNumber
form.form_tax_percent_pph = po.PurchaseOrderTaxPercentPph
form.form_tax_percent_ppn = po.PurchaseOrderTaxPercentPpn
form.form_disc_po = po.DiscountType == 'R' ? po.SupplierInvoiceDiscountAmount : po.SupplierInvoiceDiscountPercent
@@ -288,7 +288,7 @@ export default {
let po = faktur.form_po
console.log(po)
context.commit("update_list_po", po)
- faktur.form_refnumber = temp.SupplierInvoiceRefNumber
+ faktur.form_refnumber = temp.SupplierInvoiceDeliveryOrderNumber
faktur.form_supplier_invoicenum = temp.SupplierInvoiceSupplierInvoiceNumber
faktur.form_supplier_invoicedate = temp.SupplierInvoiceSupplierInvoiceDate
faktur.form_tax_percent_pph = temp.SupplierInvoiceTaxPercentPph
@@ -300,6 +300,8 @@ export default {
faktur.form_adjust_note = temp.SupplierInvoiceAdjustmentNote
faktur.form_shipping_cost = temp.SupplierInvoiceShippingCost
faktur.fakturID = temp.SupplierInvoiceID
+ faktur.type_purchase = temp.typePurchase
+ faktur.dp_amount = temp.dp_amount
context.commit("form/update_form_faktur", faktur, {root: true})
diff --git a/test/vuex/acc-one-faktur-v4/module/form.js b/test/vuex/acc-one-faktur-v4/module/form.js
index 513814f..53f0826 100644
--- a/test/vuex/acc-one-faktur-v4/module/form.js
+++ b/test/vuex/acc-one-faktur-v4/module/form.js
@@ -96,7 +96,7 @@ export default {
let price = Number(ite.ReceiveOrderPoDetailPrice)
let disc = Number(ite.Discount)
let qty = Number(ite.ReceiveOrderPoDetailQty)
-
+
if (ite.PurchaseOrderSummaryDiscountType == 'P') {
disc = (price * Number(ite.Discount)) / 100
}
@@ -107,8 +107,18 @@ export default {
let pph = (sub - podisc) * (Number(faktur.form_tax_percent_pph) / 100)
let ppn = (sub - podisc) * (Number(faktur.form_tax_percent_ppn) / 100)
- let grandtotal = (sub - podisc + pph + ppn) + Number(faktur.form_adjust_amount) + Number(faktur.form_shipping_cost)
-
+
+ let grandtotal = 0;
+ let dpamount = Number(faktur.dp_amount);
+ if (faktur.type_purchase == 'aset') {
+ grandtotal = (sub - podisc) + ( pph + ppn) - dpamount
+ grandtotal = grandtotal + Number(faktur.form_adjust_amount) + Number(faktur.form_shipping_cost)
+ } else {
+ grandtotal = (sub - podisc + pph + ppn) + Number(faktur.form_adjust_amount) + Number(faktur.form_shipping_cost)
+ }
+
+
+
// Store exact values with 2 decimal places using floor instead of rounding
// This prevents rounding errors in financial calculations
faktur.form_subtotal = sub
@@ -124,6 +134,7 @@ export default {
faktur.form_tax_amount_ppn = 0.00
faktur.form_adjust_amount = 0.00
faktur.form_adjust_note = ""
+ faktur.dp_amount = 0.00
}
context.commit("update_form_faktur", faktur)
@@ -136,7 +147,7 @@ export default {
try {
let item = context.state.form_item
let para_item = []
-
+
let param = {
SIPoID: context.state.form_faktur.form_po.PurchaseOrderID,
SIDate: context.state.form_faktur.form_date,
@@ -342,4 +353,4 @@ export default {
}
}
}
-}
\ No newline at end of file
+}
diff --git a/test/vuex/acc-one-map-inventaris-coa/api/api.js b/test/vuex/acc-one-map-inventaris-coa/api/api.js
new file mode 100644
index 0000000..27b352d
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/api/api.js
@@ -0,0 +1,62 @@
+const URL = "/one-api/map/InventarisCoaMapping";
+
+async function request(endpoint, params) {
+ try {
+ const resp = await axios.post(URL + endpoint, params)
+ if (resp.status !== 200) {
+ throw new Error(resp.statusText);
+ }
+ return resp.data;
+ } catch (error) {
+ return {
+ status: "ERR",
+ message: error.message
+ }
+ }
+}
+
+export async function getListCoa(params) {
+ return request("/getListCoa", params);
+}
+
+export async function getListingInventarisGol(params) {
+ return request("/getListInventarisGol", params);
+}
+
+export async function getListItemInventaris(params) {
+ return request("/getListItemInventaris", params);
+}
+
+export async function getListInventorygolMapping(params) {
+ return request("/getListInventorygolMapping", params);
+}
+
+export async function getInvCoaMappingDetail(params) {
+ return request("/getInvCoaMappingDetail", params);
+}
+
+export async function createInvCoaMapping(params) {
+ return request("/createInvCoaMapping", params);
+}
+
+export async function editInvCoaMapping(params) {
+ return request("/editInvCoaMapping", params);
+}
+
+export async function deleteInvCoaMapping(params) {
+ return request("/deleteInvCoaMapping", params);
+}
+
+
+/* item inventory */
+export async function createInvItemCoaMapping(params) {
+ return request("/createInvItemCoaMapping", params);
+}
+
+export async function editInvItemCoaMapping(params) {
+ return request("/editInvItemCoaMapping", params);
+}
+
+export async function deleteInvItemCoaMapping(params) {
+ return request("/deleteInvItemCoaMapping", params);
+}
\ No newline at end of file
diff --git a/test/vuex/acc-one-map-inventaris-coa/components/dialog-add-mapping-def.vue b/test/vuex/acc-one-map-inventaris-coa/components/dialog-add-mapping-def.vue
new file mode 100644
index 0000000..b9faae9
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/components/dialog-add-mapping-def.vue
@@ -0,0 +1,248 @@
+
+
+
+ Add Form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Batal
+ Simpan
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-map-inventaris-coa/components/dialog-add-mapping-item.vue b/test/vuex/acc-one-map-inventaris-coa/components/dialog-add-mapping-item.vue
new file mode 100644
index 0000000..e44bd80
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/components/dialog-add-mapping-item.vue
@@ -0,0 +1,251 @@
+
+
+
+
+ {{ selected_inventaris_item.itemCoaMapID > 0
+ ? "Edit Account Item"
+ : "Add Account Item"
+ }} {{ selected_inventaris_item.M_ItemDesc }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Batal
+ Simpan
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-map-inventaris-coa/components/dialog-add-mapping.vue b/test/vuex/acc-one-map-inventaris-coa/components/dialog-add-mapping.vue
new file mode 100644
index 0000000..cbf3b53
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/components/dialog-add-mapping.vue
@@ -0,0 +1,41 @@
+
+
+
+ Add Form
+
+
+
+
+
+ Batal
+ Simpan
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-map-inventaris-coa/components/dialog-confirm-item.vue b/test/vuex/acc-one-map-inventaris-coa/components/dialog-confirm-item.vue
new file mode 100644
index 0000000..273e661
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/components/dialog-confirm-item.vue
@@ -0,0 +1,72 @@
+
+
+
+ Konfirmasi Hapus
+
+
+
+
+ Apakah anda yakin akan menghapus data mapping item coa inventaris golongan
+ : {{ selected_inventaris_item.M_ItemDesc }} ?
+
+
+
+
+
+
+ Batal
+ Konfirmasi
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-map-inventaris-coa/components/dialog-confirm.vue b/test/vuex/acc-one-map-inventaris-coa/components/dialog-confirm.vue
new file mode 100644
index 0000000..01c5239
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/components/dialog-confirm.vue
@@ -0,0 +1,69 @@
+
+
+
+ Konfirmasi Hapus
+
+
+
+
+ Apakah anda yakin akan menghapus data mapping coa inventaris golongan
+ : {{ selected_inventaris_gol.M_InventarisGolName }} ?
+
+
+
+
+
+
+ Batal
+ Konfirmasi
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-map-inventaris-coa/components/left-layout.vue b/test/vuex/acc-one-map-inventaris-coa/components/left-layout.vue
new file mode 100644
index 0000000..91a45d2
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/components/left-layout.vue
@@ -0,0 +1,192 @@
+
+
+
+ Inventaris Category
+
+
+ add_box
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ {{ props.index + 1 }}
+ |
+
+ {{ props.item.M_InventarisGolName }}
+ |
+
+
+
+
+ edit
+
+
+ Edit
+
+
+
+
+ delete
+
+
+ Delete
+
+ |
+
+
+
+
+
+
+ {{ snackbar.msg }}
+ Tutup
+
+
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-map-inventaris-coa/components/right-layout.vue b/test/vuex/acc-one-map-inventaris-coa/components/right-layout.vue
new file mode 100644
index 0000000..486f1d5
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/components/right-layout.vue
@@ -0,0 +1,227 @@
+
+
+
+ Inventaris Item
+
+
+
+
+
+
+ Setting Default Akun Inventaris
+
+
+ Akun Inventaris:
+ {{ selected_inventaris_gol.CoaInventarisAccountNo }}
+ {{ selected_inventaris_gol.CoaInventarisDescription }}
+
+
+ Akun Inventaris Hutang:
+ {{ selected_inventaris_gol.CoaHutangAccountNo }}
+ {{ selected_inventaris_gol.CoaHutangDescription }}
+
+
+ Akun Inventaris Beban Depresiasi:
+ {{ selected_inventaris_gol.CoaBebanPenyusutanAccountNo }}
+ {{ selected_inventaris_gol.CoaBebanPenyusutanDescription }}
+
+
+ Akun Inventaris Akumulasi Depresiasi:
+ {{ selected_inventaris_gol.CoaAkumulasiPenyusutanAccountNo }}
+ {{ selected_inventaris_gol.CoaAkumulasiPenyusutanDescription }}
+
+
+ Akun Inventaris Laba Pelepasan:
+ {{ selected_inventaris_gol.CoaLabaPelepasanAccountNo }}
+ {{ selected_inventaris_gol.CoaLabaPelepasanDescription }}
+
+
+ Akun Inventaris Rugi Pelepasan:
+ {{ selected_inventaris_gol.CoaRugiPelepasanAccountNo }}
+ {{ selected_inventaris_gol.CoaRugiPelepasanDescription }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ {{ props.index + 1 }}
+ |
+
+ {{ props.item.M_ItemDesc }}
+ |
+
+
+
+ Akun Inventaris:
+ {{ props.item.CoaInventarisAccountNo }}
+ {{ props.item.CoaInventarisDescription }}
+
+
+ Akun Inventaris Hutang:
+ {{ props.item.CoaHutangAccountNo }}
+ {{ props.item.CoaHutangDescription }}
+
+
+ Akun Inventaris Beban Depresiasi:
+ {{ props.item.CoaBebanPenyusutanAccountNo }}
+ {{ props.item.CoaBebanPenyusutanDescription }}
+
+
+ Akun Inventaris Akumulasi Depresiasi:
+ {{ props.item.CoaAkumulasiPenyusutanAccountNo }}
+ {{ props.item.CoaAkumulasiPenyusutanDescription }}
+
+
+ Akun Inventaris Laba Pelepasan:
+ {{ props.item.CoaLabaPelepasanAccountNo }}
+ {{ props.item.CoaLabaPelepasanDescription }}
+
+
+ Akun Inventaris Rugi Pelepasan:
+ {{ props.item.CoaRugiPelepasanAccountNo }}
+ {{ props.item.CoaRugiPelepasanDescription }}
+
+
+ |
+
+
+
+
+ edit
+
+
+ Edit
+
+
+
+
+ delete
+
+
+ Delete
+
+ |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-map-inventaris-coa/index.php b/test/vuex/acc-one-map-inventaris-coa/index.php
new file mode 100644
index 0000000..242eca9
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/index.php
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+ ONE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-map-inventaris-coa/modules/datacoa.js b/test/vuex/acc-one-map-inventaris-coa/modules/datacoa.js
new file mode 100644
index 0000000..bf377e5
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/modules/datacoa.js
@@ -0,0 +1,53 @@
+import * as api from "../api/api.js";
+
+export default {
+ namespaced: true,
+ state: {
+ invCoa: [],
+ debtCoa: [],
+ bebanCoa: [],
+ accumCoa: [],
+ labaCoa: [],
+ rugiCoa: []
+ },
+ mutations: {
+ update_invCoa(state, val) {
+ state.invCoa = val
+ },
+ update_debtCoa(state, val) {
+ state.debtCoa = val
+ },
+ update_bebanCoa(state, val) {
+ state.bebanCoa = val
+ },
+ update_accumCoa(state, val) {
+ state.accumCoa = val
+ },
+ update_labaCoa(state, val) {
+ state.labaCoa = val
+ },
+ update_rugiCoa(state, val) {
+ state.rugiCoa = val
+ }
+ },
+ actions: {
+ async getListCoa(context, param) {
+ try {
+ let params = {
+ token: one_token(),
+ keyword: param.keyword
+ }
+ const resp = await api.getListCoa(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ let update = "update_" + param.key;
+ context.commit(update, resp.data);
+ } catch (e) {
+ const snac = { state: true, msg: e.message, color: "error" };
+ context.commit('invMap/update_snackbar', snac, { root: true });
+ }
+ },
+ }
+}
diff --git a/test/vuex/acc-one-map-inventaris-coa/modules/invItemMap.js b/test/vuex/acc-one-map-inventaris-coa/modules/invItemMap.js
new file mode 100644
index 0000000..f456116
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/modules/invItemMap.js
@@ -0,0 +1,113 @@
+import * as api from "../api/api.js";
+
+export default {
+ namespaced: true,
+ state: {
+ list_item_inventaris: {
+ records: [],
+ total: 0
+ },
+ dialog_add_mapping_item: false,
+ selected_inventaris_item: {},
+ form: {
+ invCoaID: 0,
+ debtCoaID: 0,
+ bebanCoaID: 0,
+ accumCoaID: 0,
+ labaCoaID: 0,
+ rugiCoaID: 0
+ },
+ dialog_confirm_item: false
+ },
+ mutations: {
+ update_dialog_add_mapping_item(state, val) {
+ state.dialog_add_mapping_item = val
+ },
+ update_selected_inventaris_item(state, val) {
+ state.selected_inventaris_item = val
+ },
+ update_list_item_inventaris(state, val) {
+ state.list_item_inventaris = val;
+ },
+ update_form(state, val) {
+ state.form = val
+ },
+ update_dialog_confirm_item(state, val) {
+ state.dialog_confirm_item = val
+ }
+ },
+ actions: {
+ async createInvItemCoaMapping(context, params) {
+ try {
+ context.commit("invMap/update_loading_process", true, {root: true});
+ params.token = one_token();
+ const resp = await api.createInvItemCoaMapping(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ const snac = { state: true, msg: resp.data, color: "success" };
+ context.commit('invMap/update_snackbar', snac, {root: true});
+
+ const golID = context.state.selected_inventaris_item.itemGolID;
+ context.dispatch("invMap/getListItemInventaris", golID, {root: true});
+
+ context.commit("update_selected_inventaris_item", {});
+ context.commit("invMap/update_loading_process", false, {root: true});
+ context.commit('update_dialog_add_mapping_item', false);
+ } catch (error) {
+ context.commit("invMap/update_loading_process", false, {root: true});
+ const snac = { state: true, msg: error.message, color: "error" };
+ context.commit('invMap/update_snackbar', snac, {root: true});
+ }
+ },
+ async editInvItemCoaMapping(context, params) {
+ try {
+ context.commit("invMap/update_loading_process", true, {root: true});
+ params.token = one_token();
+ const resp = await api.editInvItemCoaMapping(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ const snac = { state: true, msg: resp.data, color: "success" };
+ context.commit('invMap/update_snackbar', snac, {root: true});
+
+ const golID = context.state.selected_inventaris_item.itemGolID;
+ context.dispatch("invMap/getListItemInventaris", golID, {root: true});
+
+ context.commit("update_selected_inventaris_item", {});
+ context.commit("invMap/update_loading_process", false, {root: true});
+ context.commit('update_dialog_add_mapping_item', false);
+ } catch (error) {
+ context.commit("invMap/update_loading_process", false, {root: true});
+ const snac = { state: true, msg: error.message, color: "error" };
+ context.commit('invMap/update_snackbar', snac, {root: true});
+ }
+ },
+ async deleteInvItemCoaMapping(context, params) {
+ try {
+ context.commit("invMap/update_loading_process", true, {root: true});
+ params.token = one_token();
+ const resp = await api.deleteInvItemCoaMapping(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ const snac = { state: true, msg: resp.data, color: "success" };
+ context.commit('invMap/update_snackbar', snac, {root: true});
+
+ const golID = context.state.selected_inventaris_item.itemGolID;
+ context.dispatch("invMap/getListItemInventaris", golID, {root: true});
+
+ context.commit("update_selected_inventaris_item", {});
+ context.commit("invMap/update_loading_process", false, {root: true});
+ context.commit("update_dialog_confirm_item", false);
+ } catch (error) {
+ context.commit("invMap/update_loading_process", false, {root: true});
+ const snac = { state: true, msg: error.message, color: "error" };
+ context.commit('invMap/update_snackbar', snac, {root: true});
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/vuex/acc-one-map-inventaris-coa/modules/invMap.js b/test/vuex/acc-one-map-inventaris-coa/modules/invMap.js
new file mode 100644
index 0000000..19b08e5
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/modules/invMap.js
@@ -0,0 +1,179 @@
+import * as api from "../api/api.js";
+
+export default {
+ namespaced: true,
+ state: {
+ snackbar: {
+ state: false,
+ msg: "",
+ color: "error"
+ },
+ loading_process: false,
+ list_inventarisMapping: {
+ records: [],
+ total: 0
+ },
+ selected_inventaris_gol: {},
+
+ /* dialog inventaris gol for default */
+ dialog_add_mapping_default: false,
+ form_gol: {
+ golID: 0,
+ invCoaID: 0,
+ debtCoaID: 0,
+ bebanCoaID: 0,
+ accumCoaID: 0,
+ labaCoaID: 0,
+ rugiCoaID: 0
+ },
+ list_gol_inventaris: {
+ records: [],
+ total: 0
+ },
+
+ dialog_confirm: false
+ },
+ mutations: {
+ update_snackbar(state, val) {
+ state.snackbar = val;
+ },
+ update_loading_process(state, val) {
+ state.loading_process = val;
+ },
+ update_list_inventarisMapping(state, val) {
+ state.list_inventarisMapping = val
+ },
+ update_selected_inventaris_gol(state, val) {
+ state.selected_inventaris_gol = val
+ },
+
+ /* dialog invetaris gol for default */
+ update_dialog_add_mapping_default(state, val) {
+ state.dialog_add_mapping_default = val
+ },
+ update_form_gol(state, val) {
+ state.form_gol = val
+ },
+ update_list_gol_inventaris(state, val) {
+ state.list_gol_inventaris = val;
+ },
+ update_dialog_confirm(state, val) {
+ state.dialog_confirm = val
+ }
+ },
+ actions: {
+ async getListingInventarisGol(context) {
+ try {
+ let params = { token: one_token() }
+ const resp = await api.getListingInventarisGol(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ context.commit('update_list_gol_inventaris', resp.data);
+ } catch (e) {
+ const snac = { state: true, msg: e.message, color: "error" };
+ context.commit('update_snackbar', snac);
+ }
+ },
+ async getListItemInventaris(context, id) {
+ try {
+ let params = {
+ token: one_token(),
+ golID: id
+ }
+ const resp = await api.getListItemInventaris(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ context.commit('invItemMap/update_list_item_inventaris', resp.data, {root: true});
+ } catch (e) {
+ const snac = { state: true, msg: e.message, color: "error" };
+ context.commit('update_snackbar', snac);
+ }
+ },
+ async getListInventorygolMapping(context, keyword) {
+ try {
+ let params = {
+ token: one_token(),
+ keyword: keyword,
+ currpage: 1
+ }
+ const resp = await api.getListInventorygolMapping(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ context.commit("update_list_inventarisMapping", resp.data);
+ } catch (e) {
+ const snac = { state: true, msg: e.message, color: "error" };
+ context.commit('update_snackbar', snac);
+ }
+ },
+ async createInventarisGolMapping(context, params) {
+ try {
+ context.state.loading_process = true;
+ params.token = one_token();
+ const resp = await api.createInvCoaMapping(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ const snac = { state: true, msg: resp.data, color: "success" };
+ context.commit('update_snackbar', snac);
+ context.dispatch("getListInventorygolMapping");
+
+ context.state.loading_process = false;
+ context.state.dialog_add_mapping_default = false;
+ } catch (e) {
+ context.state.loading_process = false;
+ const snac = { state: true, msg: e.message, color: "error" };
+ context.commit('update_snackbar', snac);
+ }
+ },
+ async editInventarisGolMapping(context, params) {
+ try {
+ context.state.loading_process = true;
+ params.token = one_token();
+ const resp = await api.editInvCoaMapping(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ const snac = { state: true, msg: resp.data, color: "success" };
+ context.commit('update_snackbar', snac);
+
+ context.state.loading_process = false;
+ context.state.dialog_add_mapping_default = false;
+ } catch (e) {
+ context.state.loading_process = false;
+ const snac = { state: true, msg: e.message, color: "error" };
+ context.commit('update_snackbar', snac);
+ }
+ },
+ async deleteInventarisGolMapping(context, id) {
+ try {
+ context.state.loading_process = true;
+ params = {
+ token: one_token(),
+ M_InventarisCoaMappingID: id
+ };
+ const resp = await api.deleteInvCoaMapping(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ const snac = { state: true, msg: resp.data, color: "success" };
+ context.commit('update_snackbar', snac);
+
+ context.state.loading_process = false;
+ context.state.dialog_add_mapping_default = false;
+ } catch (e) {
+ context.state.loading_process = false;
+ const snac = { state: true, msg: e.message, color: "error" };
+ context.commit('update_snackbar', snac);
+ }
+ }
+ }
+}
diff --git a/test/vuex/acc-one-map-inventaris-coa/store.js b/test/vuex/acc-one-map-inventaris-coa/store.js
new file mode 100644
index 0000000..399a693
--- /dev/null
+++ b/test/vuex/acc-one-map-inventaris-coa/store.js
@@ -0,0 +1,16 @@
+import system from "../../../apps/modules/system/system.js";
+import datacoa from "./modules/datacoa.js";
+import invItemMap from "./modules/invItemMap.js";
+import invMap from "./modules/invMap.js";
+
+export const store = new Vuex.Store({
+ modules: {
+ system: system,
+ invMap: invMap,
+ datacoa: datacoa,
+ invItemMap: invItemMap
+ },
+ state: {},
+ mutations: {},
+ actions: {}
+})
diff --git a/test/vuex/acc-one-po-asset/api/api.js b/test/vuex/acc-one-po-asset/api/api.js
index ff825a9..a8c7a4c 100644
--- a/test/vuex/acc-one-po-asset/api/api.js
+++ b/test/vuex/acc-one-po-asset/api/api.js
@@ -1,81 +1,68 @@
-const URL = "/one-api/mockup/purchase/order/PurchaseOrderAset/";
+const URL = "/one-api/mockup/purchase/order/PurchaseOrderAset";
+
+async function request(endpoint, params) {
+ try {
+ const resp = await axios.post(URL + endpoint, params);
+ if (resp.status !== 200) {
+ throw new Error(resp.statusText);
+ }
+ return resp.data;
+ } catch (e) {
+ return {
+ status: "ERR",
+ message: e.message
+ }
+ }
+}
export async function getListSupplier(params) {
- try {
- var response = await axios.post(URL + "getListSupplier", params)
- if (response.status !== 200) {
- return {
- status: 'ERR',
- message: responsep.statusText
- };
- }
-
- let data = response.data
- return data
- } catch (error) {
- return {
- status: 'ERR',
- message: error.message
- };
- }
+ return request("/getListSupplier", params);
}
export async function getListCabang(params) {
- try {
- var response = await axios.post(URL + "getListCabang", params)
- if (response.status !== 200) {
- return {
- status: 'ERR',
- message: responsep.statusText
- };
- }
+ return request("/getListCabang", params);
+}
- let data = response.data
- return data
- } catch (error) {
- return {
- status: 'ERR',
- message: error.message
- };
- }
+export async function getListGudang(params) {
+ return request("/getListGudang", params);
}
export async function searchRequestAset(params) {
- try {
- var response = await axios.post(URL + "searchRequestAset", params)
- if (response.status !== 200) {
- return {
- status: 'ERR',
- message: responsep.statusText
- };
- }
+ return request("/searchRequestAset", params);
+}
- let data = response.data
- return data
- } catch (error) {
- return {
- status: 'ERR',
- message: error.message
- };
- }
+export async function getDaftarPoAset(params) {
+ return request("/getDaftarPoAset", params);
+}
+
+export async function getDaftarAttachment(params) {
+ return request("/getDaftarAttachment", params);
+}
+
+export async function getDataKontrakPoAset(params) {
+ return request("/getDataKontrakPoAset", params);
+}
+
+export async function createPoAsset(params) {
+ return request("/createPoAsset", params);
+}
+
+export async function editPoAsset(params) {
+ return request("/editPoAsset", params);
+}
+
+export async function deletePoAsset(params) {
+ return request("/deletePoAsset", params);
+}
+
+export async function updateApprovalPO(params) {
+ return request("/updateApprovalPO", params);
}
export async function getUserApproveLevel(params) {
- try {
- var response = await axios.post(URL + "getUserApproveLevel", params)
- if (response.status !== 200) {
- return {
- status: 'ERR',
- message: responsep.statusText
- };
- }
+ return request("/getUserApproveLevel", params);
+}
- let data = response.data
- return data
- } catch (error) {
- return {
- status: 'ERR',
- message: error.message
- };
- }
-}
\ No newline at end of file
+export async function uploadAttachment(params) {
+ return request("/uploadAttachment", params);
+}
diff --git a/test/vuex/acc-one-po-asset/components/dialog-add-attachment.vue b/test/vuex/acc-one-po-asset/components/dialog-add-attachment.vue
index 8339348..e12ea9e 100644
--- a/test/vuex/acc-one-po-asset/components/dialog-add-attachment.vue
+++ b/test/vuex/acc-one-po-asset/components/dialog-add-attachment.vue
@@ -8,18 +8,19 @@
-
-
@@ -33,9 +34,9 @@
:src="url" aspect-ratio="1" contain
class="grey lighten-2" @click="fullview(url, index)"
>
- close
@@ -44,7 +45,7 @@
Batal
- Simpan
+ Simpan
@@ -90,25 +91,28 @@ module.exports = {
computed: {
dialog_attachment: {
get() {
- return this.$store.state.poasset.dialog_attachment
+ return this.$store.state.common.dialog_attachment
},
set(val) {
- this.$store.commit("poasset/update_dialog_attachment", val)
+ this.$store.commit("common/update_dialog_attachment", val)
}
},
selected_orderaset: {
get() {
- return this.$store.state.poasset.selected_orderaset
+ return this.$store.state.common.selected_orderaset
},
set(val) {
- this.$store.commit("poasset/update_selected_orderaset", val)
+ this.$store.commit("common/update_selected_orderaset", val)
}
},
prview_attachment() {
- return this.$store.state.poasset.prview_attachment
+ return this.$store.state.common.assets_attachment
},
loading_process() {
- return this.$store.state.poasset.loading_process
+ return this.$store.state.common.loading_process
+ },
+ viewonlymode() {
+ return this.$store.state.common.viewonlymode;
}
},
methods: {
@@ -128,7 +132,7 @@ module.exports = {
},
makeImageUrl(docs) {
const year = new Date(docs.created).getFullYear();
- const baseURL = BASE_URL + `/one-media/order-aset/${year}`;
+ const baseURL = BASE_URL + `/one-media/order-asset/${year}/`;
return baseURL + docs.img_url;
},
fullview(docs, index) {
@@ -150,6 +154,7 @@ module.exports = {
cancel_file() {
this.tempdocs_file = [];
this.tempdocs_view = [];
+ this.$store.commit("common/update_viewonlymode", false);
this.dialog_attachment = false;
},
save_file() {
@@ -163,15 +168,16 @@ module.exports = {
form_data.append(`files[${index}]`, file);
}
- form_data.append('KontrakAsetID', orderaset.T_KontrakAsetID);
- form_data.append('POrderID', orderaset.PurchaseOrderID);
- form_data.append('POnumber', orderaset.PurchaseOrderNumber);
+ form_data.append('contractID', orderaset.contractID);
+ form_data.append('poID', orderaset.PurchaseOrderID);
+ form_data.append('ponumber', orderaset.PurchaseOrderNumber);
+ form_data.append('contractDate', orderaset.contractDate);
form_data.append('token', one_token());
- this.$store.dispatch('poasset/');
+ this.$store.dispatch('common/uploadAttachment', form_data);
} else {
const snac = { color: 'warning', msg: 'proses sedang berjalan', state: true };
- this.$store.commit('poasset/update_snackbar', snac);
+ this.$store.commit('common/update_snackbar', snac);
}
}
},
@@ -190,4 +196,4 @@ module.exports = {
}
},
}
-
\ No newline at end of file
+
diff --git a/test/vuex/acc-one-po-asset/components/dialog-add-item-aset.vue b/test/vuex/acc-one-po-asset/components/dialog-add-item-aset.vue
deleted file mode 100644
index 5071ba8..0000000
--- a/test/vuex/acc-one-po-asset/components/dialog-add-item-aset.vue
+++ /dev/null
@@ -1,244 +0,0 @@
-
-
-
-
- TAMBAH REQUEST ASET
-
-
-
-
-
-
-
-
-
-
- |
-
- |
- {{ header.text }} |
-
-
-
-
- |
-
- |
-
- {{ props.item.PurchaseRequestNumber }}
- |
-
- {{ props.item.M_ItemCode }}
- |
-
- {{ props.item.M_ItemDesc }}
- |
-
- {{ props.item.ItemUnitName }}
- |
-
- {{ props.item.RequestQty }}
- |
-
-
-
-
-
-
-
-
- Batal
- Simpan
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/vuex/acc-one-po-asset/components/dialog-create-contract.vue b/test/vuex/acc-one-po-asset/components/dialog-create-contract.vue
deleted file mode 100644
index 00eedcb..0000000
--- a/test/vuex/acc-one-po-asset/components/dialog-create-contract.vue
+++ /dev/null
@@ -1,259 +0,0 @@
-
-
-
- BUAT KONTRAK BARU
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TAMBAH ITEM
-
-
-
-
-
-
- |
- |
- |
- |
- |
- |
-
-
-
-
-
-
-
-
-
- Batal
- Simpan
-
-
-
-
-
-
diff --git a/test/vuex/acc-one-po-asset/components/dialog-create-order.vue b/test/vuex/acc-one-po-asset/components/dialog-create-order.vue
index 6c2e359..835e972 100644
--- a/test/vuex/acc-one-po-asset/components/dialog-create-order.vue
+++ b/test/vuex/acc-one-po-asset/components/dialog-create-order.vue
@@ -1,9 +1,16 @@
-
- BUAT ORDER ASET
+
+
+ {{ viewonlymode
+ ? "VIEW ORDER ASSET"
+ : selected_orderaset.PurchaseOrderID
+ ? "EDIT ORDER ASET"
+ : "BUAT ORDER ASET"
+ }}
+
-
+
@@ -29,21 +36,48 @@
-
+
+
+
+
+
+ {{ item.label }}
+
+
+
+ Rp. {{ formatCurrency(item.value) }}
+
+
+
- Batal
- Simpan
+ Batal
+ Simpan
+
+
diff --git a/test/vuex/acc-one-po-asset/components/dialog-delete-order.vue b/test/vuex/acc-one-po-asset/components/dialog-delete-order.vue
index ee87e44..122fc61 100644
--- a/test/vuex/acc-one-po-asset/components/dialog-delete-order.vue
+++ b/test/vuex/acc-one-po-asset/components/dialog-delete-order.vue
@@ -33,20 +33,23 @@
module.exports = {
data() {
return {
-
+
}
},
computed: {
dialog_deleteorder: {
get() {
- return this.$store.state.poasset.dialog_deleteorder
+ return this.$store.state.common.dialog_deleteorder
},
set(val) {
- this.$store.commit('update_dialog_deleteorder', val)
+ this.$store.commit('common/update_dialog_deleteorder', val)
}
},
selected_orderaset() {
- return this.$store.state.poasset.selected_orderaset
+ return this.$store.state.common.selected_orderaset
+ },
+ loading_process() {
+ return this.$store.state.common.loading_process
}
},
methods: {
@@ -54,8 +57,13 @@ module.exports = {
this.dialog_deleteorder = false
},
hapusorder() {
-
+ if (!this.loading_process) {
+ this.$store.dispatch("common/deleteOrderAsset")
+ } else {
+ const snac = { color: 'warning', msg: 'proses sedang berjalan', state: true };
+ this.$store.commit('common/update_snackbar', snac);
+ }
}
},
}
-
\ No newline at end of file
+
diff --git a/test/vuex/acc-one-po-asset/components/dialog-form-order-aset.vue b/test/vuex/acc-one-po-asset/components/dialog-form-order-aset.vue
deleted file mode 100644
index 9470838..0000000
--- a/test/vuex/acc-one-po-asset/components/dialog-form-order-aset.vue
+++ /dev/null
@@ -1,601 +0,0 @@
-
-
-
- FORM PO ASET
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TAMBAH ITEM
-
-
-
-
-
-
-
-
-
- |
- {{ props.expanded
- ? "keyboard_arrow_down"
- : "keyboard_arrow_right"
- }}
- |
-
- {{ props.item.M_ItemDesc }}
- |
-
- {{ props.item.RequestQty }}
- |
-
- Rp. {{ formatCurrency(props.item.SupplierPrice) }}
- |
-
-
-
-
- Rp
- %
-
-
-
-
- {{ name }}
-
-
-
-
-
-
- |
-
- Rp. {{ formatCurrency(props.item.EndPrice) }}
- |
-
- Rp. {{ formatCurrency(props.item.TempTotal) }}
- |
-
-
- delete
-
- |
-
-
-
-
-
-
-
-
-
-
- |
- {{ detail.item.M_ItemDesc }}
- |
-
- {{ detail.item.PurchaseRequestNumber }}
- |
-
- {{ detail.item.M_BranchName }}
- |
-
- {{ detail.item.RequestQty }}
- |
-
- {{ detail.item.ItemUnitName }}
- |
-
- Rp. {{ formatCurrency(detail.item.SupplierPrice) }}
- |
-
-
- delete
-
- |
-
-
-
-
-
-
-
-
-
-
- |
-
- JUMLAH
- |
-
-
- Rp. {{ formatCurrency(summary_orderaset.subtotal) }}
-
- |
- |
-
-
- |
-
- DISKON
- |
-
-
- Rp. {{ formatCurrency(summary_orderaset.diskon) }}
-
- |
- |
-
-
- |
-
- PAJAK
- |
-
-
- Rp. {{ formatCurrency(summary_orderaset.pajak) }}
-
- |
- |
-
-
- |
-
- TOTAL
- |
-
-
- Rp. {{ formatCurrency(summary_orderaset.total) }}
-
- |
- |
-
-
-
-
-
-
-
-
-
- Batal
- Simpan
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/vuex/acc-one-po-asset/components/dialog-select-request-asset.vue b/test/vuex/acc-one-po-asset/components/dialog-select-request-asset.vue
new file mode 100644
index 0000000..5c44a80
--- /dev/null
+++ b/test/vuex/acc-one-po-asset/components/dialog-select-request-asset.vue
@@ -0,0 +1,246 @@
+
+
+
+
+ TAMBAH ITEM REQUEST
+
+
+
+
+
+
+
+
+
+ |
+
+ |
+
+ {{ header.text }}
+ |
+
+
+
+
+ |
+
+ |
+ {{ props.item.PurchaseRequestNumber }} |
+
+ {{ props.item.Requestedby }}
+ {{ props.item.M_BranchName }}
+ |
+
+ {{ props.item.M_ItemCode }}
+ {{ props.item.M_ItemDesc }}
+ |
+ {{ props.item.ItemUnitName }} |
+ {{ props.item.RequestQty }} |
+
+
+
+
+
+
+
+ Batal
+ Simpan
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-po-asset/components/form-item-request-asset.vue b/test/vuex/acc-one-po-asset/components/form-item-request-asset.vue
new file mode 100644
index 0000000..ffb5ed1
--- /dev/null
+++ b/test/vuex/acc-one-po-asset/components/form-item-request-asset.vue
@@ -0,0 +1,337 @@
+
+
+
+
+ Tambah Item
+
+
+
+
+
+
+ |
+ {{ props.expanded
+ ? "keyboard_arrow_down"
+ : "keyboard_arrow_right"
+ }}
+ |
+ {{ props.item.M_ItemDesc }} |
+ {{ props.item.RequestQty }} |
+
+
+ |
+
+
+
+
+ Rp
+ %
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+ |
+
+ Rp. {{ formatCurrency(props.item.EndPrice) }}
+ |
+
+ Rp. {{ formatCurrency(props.item.TempTotal) }}
+ |
+
+
+ delete
+
+ |
+
+
+
+
+
+
+
+
+
+
+ | {{ det.item.M_ItemDesc }} |
+ {{ det.item.PurchaseRequestNumber }} |
+ {{ det.item.M_BranchName }} |
+
+
+ |
+ {{ det.item.ItemUnitName }} |
+
+ Rp. {{ formatCurrency(det.item.SupplierPrice) }}
+ |
+
+
+ delete
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-po-asset/components/form-kontrak-asset.vue b/test/vuex/acc-one-po-asset/components/form-kontrak-asset.vue
index 136a879..933f1d4 100644
--- a/test/vuex/acc-one-po-asset/components/form-kontrak-asset.vue
+++ b/test/vuex/acc-one-po-asset/components/form-kontrak-asset.vue
@@ -3,7 +3,7 @@
+ placeholder="masukan nama kontrak" :readonly="viewonlymode">
+ @input="menuKontrakDate = false" :readonly="viewonlymode">
@@ -24,7 +24,7 @@
label="Tanggal Mulai Kontrak" readonly>
+ @input="menuKontrakStartdate = false" :readonly="viewonlymode">
@@ -35,7 +35,7 @@
label="Tanggal Akhir Kontrak" readonly>
+ @input="menuKontrakEnddate = false" :readonly="viewonlymode">
@@ -47,26 +47,32 @@
+ label="Jumlah Cicilan" :readonly="viewonlymode">
+ label="Tanggal Bayar Cicilan" :readonly="viewonlymode">
-
+
-
+ @change="$store.dispatch('orderAsset/recalculateOrderSummary')" outline>
-
-
+
+
@@ -82,9 +88,6 @@ module.exports = {
};
},
computed: {
- supplier_list() {
- return [];
- },
form_kontrak: {
get() {
return this.$store.state.kontrakAsset.form_kontrak
@@ -102,6 +105,9 @@ module.exports = {
formattedEnddateKontrak() {
return this.formatDate(this.form_kontrak.tanggalAkhir_kontrak);
},
+ viewonlymode() {
+ return this.$store.state.common.viewonlymode;
+ }
},
methods: {
formatDate(date) {
@@ -120,15 +126,69 @@ module.exports = {
return Math.max(months, 1);
},
+ updateDurasiCicilan() {
+ const form = this.form_kontrak;
+ if (!form.tanggalAwal_kontrak || !form.tanggalAkhir_kontrak) return;
+
+ form.durasi_cicilan = this.countMonths(
+ form.tanggalAwal_kontrak,
+ form.tanggalAkhir_kontrak
+ );
+
+ this.form_kontrak = form;
+ },
changeTypeAmount(name) {
let form = this.form_kontrak;
if (name == 'DP') {
- form.jumlah_downpayment = 0;
+ form.besarNilai_downpayment = 0;
}
- }
+
+ this.$store.dispatch('orderAsset/recalculateOrderSummary');
+ },
+ formatCurrency(value) {
+ const num = parseFloat(value);
+ if (isNaN(num)) return 0;
+ return num.toFixed(2).replace('.', ',').replace(/\B(?=(\d{3})+(?!\d))/g, ".");
+ },
+ parseCurrency(value) {
+ let cleanValue = String(value).replace(/\./g, '');
+ cleanValue = cleanValue.replace(',', '.');
+ return parseFloat(cleanValue) || 0;
+ },
+ handleFocus(item, field) {
+ if (field == 'dp') {
+ const currprice = item.besarNilai_downpayment;
+ const parsedprice = this.parseCurrency(currprice);
+ item.besarNilai_downpayment = parsedprice;
+ }
+
+ if (field == 'cicil') {
+ const currdisc = item.besarNilai_cicilan;
+ const parseddisc = this.parseCurrency(currdisc);
+ item.besarNilai_cicilan = parseddisc;
+ }
+ },
+ handleBlur(item, field) {
+ if (field == 'dp') {
+ const currprice = item.besarNilai_downpayment;
+ const parsedprice = this.parseCurrency(currprice);
+ item.besarNilai_downpayment = this.formatCurrency(parsedprice);
+ }
+
+ if (field == 'cicil') {
+ const currdisc = item.besarNilai_cicilan;
+ const parseddisc = this.parseCurrency(currdisc);
+ item.besarNilai_cicilan = this.formatCurrency(parseddisc);
+ }
+ },
},
watch: {
-
+ "form_kontrak.tanggalAwal_kontrak"() {
+ this.updateDurasiCicilan();
+ },
+ "form_kontrak.tanggalAkhir_kontrak"() {
+ this.updateDurasiCicilan();
+ }
}
}
diff --git a/test/vuex/acc-one-po-asset/components/form-order-asset.vue b/test/vuex/acc-one-po-asset/components/form-order-asset.vue
index 8babe44..27212a9 100644
--- a/test/vuex/acc-one-po-asset/components/form-order-asset.vue
+++ b/test/vuex/acc-one-po-asset/components/form-order-asset.vue
@@ -16,13 +16,13 @@
@@ -37,50 +37,71 @@
-
+
+
+
+
+
+
+
+
@@ -108,6 +129,12 @@ module.exports = {
},
list_cabang() {
return this.$store.state.orderAsset.list_cabang;
+ },
+ list_gudang() {
+ return this.$store.state.orderAsset.list_gudang;
+ },
+ viewonlymode() {
+ return this.$store.state.common.viewonlymode;
}
},
methods: {
@@ -116,6 +143,10 @@ module.exports = {
const [year, month, day] = date.split('-');
return `${day}-${month}-${year}`;
},
+ onChangeCabang(branchID) {
+ if (!branchID) return;
+ this.$store.dispatch("orderAsset/listingGudang", branchID);
+ }
}
}
diff --git a/test/vuex/acc-one-po-asset/components/main-layout.vue b/test/vuex/acc-one-po-asset/components/main-layout.vue
index 4c55f54..b05472f 100644
--- a/test/vuex/acc-one-po-asset/components/main-layout.vue
+++ b/test/vuex/acc-one-po-asset/components/main-layout.vue
@@ -6,12 +6,6 @@
add_box
-
@@ -66,8 +60,17 @@
-
+
+ attachment
+
+
+ Upload Attachment
+
+
+
+
send
@@ -75,8 +78,8 @@
-
+
edit
@@ -84,8 +87,8 @@
-
+
delete
@@ -95,12 +98,21 @@
-
+
+ attachment
+
+
+ Upload Attachment
+
+
+
+
visibility
- Detail PO
+ Detail PO
|
@@ -119,11 +131,7 @@
-
-
-
-
@@ -131,8 +139,9 @@
diff --git a/test/vuex/acc-one-po-asset/modules/common.js b/test/vuex/acc-one-po-asset/modules/common.js
new file mode 100644
index 0000000..5812e66
--- /dev/null
+++ b/test/vuex/acc-one-po-asset/modules/common.js
@@ -0,0 +1,165 @@
+import * as api from '../api/api.js';
+
+export default {
+ namespaced: true,
+ state: {
+ /* common */
+ snackbar: {
+ color: 'success',
+ msg: '',
+ state: false
+ },
+ loading_process: false,
+ selected_orderaset: {},
+ viewonlymode: false,
+
+ /* main layout */
+ filterpo: {
+ startdate: moment(new Date()).format('YYYY-MM-DD'),
+ enddate: moment(new Date()).format('YYYY-MM-DD'),
+ status: 'All',
+ search: ''
+ },
+ list_status: ['All', 'Draft', 'Pending', 'Approved', 'Rejected', 'Completed'],
+ list_asetpo: {
+ records: [],
+ total: 0
+ },
+ currpage: 1,
+
+ /* delete order */
+ dialog_deleteorder: false,
+
+ /* attachment */
+ dialog_attachment: false,
+ assets_attachment: []
+ },
+ mutations: {
+ /* common */
+ update_snackbar(state, val) {
+ state.snackbar = val
+ },
+ update_loading_process(state, val) {
+ state.loading_process = val
+ },
+ update_selected_orderaset(state, val) {
+ state.selected_orderaset = val
+ },
+ update_viewonlymode(state, val) {
+ state.viewonlymode = val
+ },
+
+ /* main layout */
+ update_filterpo(state, val) {
+ state.filterpo = val
+ },
+ update_list_status(state, val) {
+ state.list_status = val
+ },
+ update_list_asetpo(state, val) {
+ state.list_asetpo = val
+ },
+ update_currpage(state, val) {
+ state.currpage = val
+ },
+
+ /* delete order */
+ update_dialog_deleteorder(state, val) {
+ state.dialog_deleteorder = val
+ },
+
+ /* attachment */
+ update_dialog_attachment(state, val) {
+ state.dialog_attachment = val
+ },
+ update_assets_attachment(state, val) {
+ state.assets_attachment = val
+ }
+ },
+ actions: {
+ async getListingPOAsset(context) {
+ try {
+ const params = {
+ token: one_token(),
+ currpage: context.state.currpage,
+ ...context.state.filterpo
+ };
+ const resp = await api.getDaftarPoAset(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ context.commit('update_list_asetpo', resp.data);
+ } catch (e) {
+ const snac = { color: 'error', msg: e.message, state: true };
+ context.commit("update_snackbar", snac);
+ }
+ },
+ async getAssetAttachment(context, param) {
+ try {
+ const params = {
+ token: one_token(),
+ contractID: param.contractID,
+ poID: param.poID
+ };
+ const resp = await api.getDaftarAttachment(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ context.commit('update_assets_attachment', resp.data);
+ } catch (e) {
+ const snac = { color: 'error', msg: e.message, state: true };
+ context.commit("update_snackbar", snac);
+ }
+ },
+ async uploadAttachment(context, params) {
+ try {
+ context.state.loading_process = true;
+ const resp = await api.uploadAttachment(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ const snac = { color: 'success', msg: resp.data, state: true };
+ context.commit("update_snackbar", snac);
+
+ context.dispatch('getListingPOAsset');
+ context.state.loading_process = false;
+ context.state.dialog_attachment = false;
+ } catch (e) {
+ context.state.loading_process = false;
+ const snac = { color: 'error', msg: e.message, state: true };
+ context.commit("update_snackbar", snac);
+ }
+ },
+ async deleteOrderAsset(context) {
+ try {
+ context.state.loading_process = true;
+ const order = context.state.selected_orderaset;
+ const params = {
+ token: one_token(),
+ poID: order.PurchaseOrderID,
+ contractID: order.contractID,
+ ponumber: order.PurchaseOrderNumber,
+ SupplierDownpaymentID: order.SupplierDownpaymentID
+ };
+ const resp = await api.deletePoAsset(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ const snac = { color: 'success', msg: resp.data, state: true };
+ context.commit("update_snackbar", snac);
+
+ context.dispatch('getListingPOAsset');
+ context.state.loading_process = false;
+ context.state.dialog_deleteorder = false;
+ } catch (e) {
+ context.state.loading_process = false;
+ const snac = { color: 'error', msg: e.message, state: true };
+ context.commit("update_snackbar", snac);
+ }
+ }
+ }
+}
diff --git a/test/vuex/acc-one-po-asset/modules/kontrak-asset.js b/test/vuex/acc-one-po-asset/modules/kontrak-asset.js
index ae94773..12539d7 100644
--- a/test/vuex/acc-one-po-asset/modules/kontrak-asset.js
+++ b/test/vuex/acc-one-po-asset/modules/kontrak-asset.js
@@ -1,7 +1,8 @@
+import * as api from '../api/api.js';
+
export default {
namespaced: true,
state: {
- dialog_create_contract: false,
form_kontrak: {
nama_kontrak: '',
tanggal_kontrak: moment(new Date()).format('YYYY-MM-DD'),
@@ -11,17 +12,136 @@ export default {
jumlah_cicilan: 1,
tanggalBayar_cicilan: 1,
besarNilai_cicilan: 0,
- type_downpayment: 'persen',
+ type_downpayment: 'percent',
besarNilai_downpayment: 0
}
},
mutations: {
- update_dialog_create_contract(state, val) {
- state.dialog_create_contract = val
- },
update_form_kontrak(state, val) {
state.form_kontrak = val
}
},
- actions: {}
+ actions: {
+ async saveOrderAsset(context, params) {
+ try {
+ context.commit("common/update_loading_process", true, { root: true });
+ params.token = one_token();
+ const resp = await api.createPoAsset(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+ const snac = { color: 'success', msg: resp.data, state: true };
+ context.commit("common/update_snackbar", snac, { root: true });
+
+ context.commit("common/update_loading_process", false, { root: true });
+ context.commit("orderAsset/update_dialog_create_order", false, { root: true });
+ context.dispatch('common/getListingPOAsset', {}, { root: true });
+ } catch (error) {
+ context.commit("common/update_loading_process", false, { root: true });
+ const snac = { color: 'error', msg: error.message, state: true };
+ context.commit("common/update_snackbar", snac, { root: true });
+ }
+ },
+ async editOrderAsset(context, params) {
+ try {
+ context.commit("common/update_loading_process", true, { root: true });
+ params.token = one_token();
+ const resp = await api.editPoAsset(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+ const snac = { color: 'success', msg: resp.data, state: true };
+ context.commit("common/update_snackbar", snac, { root: true });
+
+ context.commit("common/update_loading_process", false, { root: true });
+ context.commit("orderAsset/update_dialog_create_order", false, { root: true });
+ context.dispatch('common/getListingPOAsset', {}, { root: true });
+ } catch (error) {
+ context.commit("common/update_loading_process", false, { root: true });
+ const snac = { color: 'error', msg: error.message, state: true };
+ context.commit("common/update_snackbar", snac, { root: true });
+ }
+ },
+ async sendRequestPO(context, poID) {
+ try {
+ context.commit("common/update_loading_process", true, { root: true });
+ let params = {
+ token: one_token(),
+ approvelevel: "0",
+ poID: poID,
+ }
+ const resp = await api.updateApprovalPO(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+ const snac = { color: 'success', msg: resp.data, state: true };
+ context.commit("common/update_snackbar", snac, { root: true });
+
+ context.commit("common/update_loading_process", false, { root: true });
+ context.commit("orderAsset/update_dialog_create_order", false, { root: true });
+ context.dispatch('common/getListingPOAsset', {}, { root: true });
+ } catch (error) {
+ context.commit("common/update_loading_process", false, { root: true });
+ const snac = { color: 'error', msg: error.message, state: true };
+ context.commit("common/update_snackbar", snac, { root: true });
+ }
+ },
+ async getDetailDataPO(context, poID) {
+ try {
+ let params = {
+ token: one_token(),
+ poID: poID,
+ }
+ const resp = await api.getDataKontrakPoAset(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ let formOrder = {
+ podate: resp.data.podate,
+ supplierID: resp.data.supplierID,
+ reference: resp.data.reference,
+ branchID: resp.data.branchID,
+ gudangID: resp.data.gudangID,
+ typepajak: resp.data.typepajak,
+ valuepajak: parseFloat(resp.data.valuepajak),
+ typediskon: resp.data.typediskon,
+ valuediskon: parseFloat(resp.data.valuediskon),
+ catatan: resp.data.catatan
+ };
+ let formKontrak = {
+ nama_kontrak: resp.data.contractName,
+ tanggal_kontrak: resp.data.contractDate,
+ tanggalAwal_kontrak: resp.data.contractStart,
+ tanggalAkhir_kontrak: resp.data.contractEnd,
+ durasi_cicilan: resp.data.contractDuration,
+ jumlah_cicilan: resp.data.installmentNumber,
+ tanggalBayar_cicilan: resp.data.installmentDate,
+ besarNilai_cicilan: parseFloat(resp.data.installmentPayAmount),
+ type_downpayment: resp.data.installmentDownPaymentType,
+ besarNilai_downpayment: parseFloat(resp.data.installmentDownPayment),
+ };
+ let summary = resp.data.summary;
+ let selected_request = resp.data.detail;
+ selected_request.forEach(item => {
+ item.SupplierPrice = parseFloat(item.SupplierPrice)
+ item.DiskonAmount = parseFloat(item.DiskonAmount)
+ });
+
+ context.dispatch('orderAsset/listingGudang', resp.data.branchID, { root: true });
+
+ context.commit('update_form_kontrak', formKontrak);
+ context.commit('orderAsset/update_form_order_asset', formOrder, { root: true });
+ context.commit('orderAsset/update_selected_request_asset', selected_request, { root: true });
+ context.commit('orderAsset/update_summary_order', summary, { root: true });
+ context.commit('common/update_selected_orderaset', resp.data, { root: true });
+
+ context.dispatch('orderAsset/recalculateOrderSummary', {}, { root: true });
+ context.commit('orderAsset/update_dialog_create_order', true, { root: true });
+ } catch (error) {
+ const snac = { color: 'error', msg: error.message, state: true };
+ context.commit("common/update_snackbar", snac, { root: true });
+ }
+ }
+ }
}
diff --git a/test/vuex/acc-one-po-asset/modules/order-asset.js b/test/vuex/acc-one-po-asset/modules/order-asset.js
index 9f17a34..8f09f71 100644
--- a/test/vuex/acc-one-po-asset/modules/order-asset.js
+++ b/test/vuex/acc-one-po-asset/modules/order-asset.js
@@ -1,3 +1,5 @@
+import * as api from '../api/api.js';
+
export default {
namespaced: true,
state: {
@@ -8,13 +10,32 @@ export default {
supplierID: "",
reference: "",
branchID: "",
- typepajak: "persen",
+ gudangID: "",
+ typepajak: "percent",
valuepajak: 0,
- typediskon: "persen",
- valuediskon: 0
+ typediskon: "percent",
+ valuediskon: 0,
+ catatan: ""
},
list_supplier: [],
- list_cabang: []
+ list_cabang: [],
+ list_gudang: [],
+
+ /* item request */
+ dialog_select_asset: false,
+ requested_asset: {
+ records: [],
+ total: 0,
+ },
+ selected_request_asset: [],
+ summary_order: {
+ subtotal: 0,
+ diskon: 0,
+ pajak: 0,
+ downpayment: 0,
+ total_before_downpayment: 0,
+ total: 0
+ }
},
mutations: {
update_dialog_create_order(state, val) {
@@ -28,9 +49,176 @@ export default {
},
update_list_cabang(state, val) {
state.list_cabang = val
+ },
+ update_list_gudang(state, val) {
+ state.list_gudang = val
+ },
+ update_dialog_select_asset(state, val) {
+ state.dialog_select_asset = val
+ },
+ update_requested_asset(state, val) {
+ state.requested_asset = val
+ },
+ update_selected_request_asset(state, val) {
+ state.selected_request_asset = val
+ },
+ update_summary_order(state, val) {
+ state.summary_order = val
}
},
actions: {
+ async listingCabang(context) {
+ try {
+ let param = { token: one_token() }
+ const resp = await api.getListCabang(param);
+ if (resp.status != "OK") {
+ throw new Error(resp.message);
+ }
+
+ context.commit('update_list_cabang', resp.data);
+ } catch (e) {
+ const snac = { color: 'error', msg: e.message, state: true };
+ context.commit("common/update_snackbar", snac, { root: true });
+ }
+ },
+ async listingGudang(context, branchID) {
+ try {
+ let param = {
+ token: one_token(),
+ M_BranchID: branchID
+ }
+
+ const resp = await api.getListGudang(param);
+ if (resp.status != "OK") {
+ throw new Error(resp.message);
+ }
+
+ context.commit('update_list_gudang', resp.data);
+ } catch (e) {
+ const snac = { color: 'error', msg: e.message, state: true };
+ context.commit("common/update_snackbar", snac, { root: true });
+ }
+ },
+ async listingSupplier(context) {
+ try {
+ const params = { token: one_token() };
+ const resp = await api.getListSupplier(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ context.commit('update_list_supplier', resp.data);
+ } catch (e) {
+ const snac = { color: 'error', msg: e.message, state: true };
+ context.commit("update_snackbar", snac, { root: true });
+ }
+ },
+ async searchItemRequest(context, keyword) {
+ try {
+ const form = context.state.form_order_asset;
+ const params = {
+ token: one_token(),
+ search: keyword,
+ branchID: form.branchID,
+ supplierID: form.supplierID
+ };
+ const resp = await api.searchRequestAset(params);
+ if (resp.status != 'OK') {
+ throw new Error(resp.message);
+ }
+
+ context.commit('update_requested_asset', resp.data)
+ } catch (e) {
+ const snac = { color: 'error', msg: e.message, state: true };
+ context.commit("update_snackbar", snac, { root: true });
+ }
+ },
+ async recalculateOrderSummary(context) {
+ const formOrder = context.state.form_order_asset;
+ const formKontrak = context.rootState.kontrakAsset.form_kontrak;
+ const items = JSON.parse(JSON.stringify(context.state.selected_request_asset));
+
+ const calculatedItems = items.map(item => {
+ const supplierPrice = parseCurrency(item.SupplierPrice);
+ const requestQty = item.detail.reduce((sum, detail) => {
+ return sum + parseCurrency(detail.RequestQty);
+ }, 0);
+
+ let itemDiscount = 0;
+
+ if (item.DiskonType == 'P') {
+ itemDiscount = supplierPrice * parseCurrency(item.DiskonAmount) / 100;
+ } else {
+ itemDiscount = parseCurrency(item.DiskonAmount);
+ }
+
+ const endPrice = Math.max(supplierPrice - itemDiscount, 0);
+ const tempTotal = requestQty * endPrice;
+
+ return {
+ ...item,
+ RequestQty: requestQty,
+ EndPrice: endPrice,
+ TempTotal: tempTotal,
+ detail: item.detail.map(detail => ({
+ ...detail,
+ SupplierPrice: supplierPrice
+ }))
+ };
+ });
+
+ const subtotal = calculatedItems.reduce((sum, item) => {
+ return sum + parseCurrency(item.TempTotal);
+ }, 0);
+
+ const diskon = calculateByType(
+ formOrder.typediskon,
+ formOrder.valuediskon,
+ subtotal
+ );
+ const subtotalAfterDiskon = Math.max(subtotal - diskon, 0);
+
+ const pajak = calculateByType(
+ formOrder.typepajak,
+ formOrder.valuepajak,
+ subtotalAfterDiskon
+ );
+ const totalBeforeDownpayment = subtotalAfterDiskon + pajak;
+
+ const downpayment = calculateByType(
+ formKontrak.type_downpayment,
+ formKontrak.besarNilai_downpayment,
+ totalBeforeDownpayment
+ );
+
+ const total = Math.max(totalBeforeDownpayment - downpayment, 0);
+
+ context.commit('update_selected_request_asset', calculatedItems);
+ context.commit('update_summary_order', {
+ subtotal: subtotal,
+ diskon: diskon,
+ pajak: pajak,
+ downpayment: downpayment,
+ total_before_downpayment: totalBeforeDownpayment,
+ total: total
+ });
+ }
}
}
+
+function parseCurrency(value) {
+ let cleanValue = String(value || 0).replace(/\./g, '');
+ cleanValue = cleanValue.replace(',', '.');
+ return parseFloat(cleanValue) || 0;
+}
+
+function calculateByType(type, value, base) {
+ const amount = parseCurrency(value);
+
+ if (type == 'percent') {
+ return base * amount / 100;
+ }
+
+ return amount;
+}
diff --git a/test/vuex/acc-one-po-asset/modules/poasset.js b/test/vuex/acc-one-po-asset/modules/poasset.js
deleted file mode 100644
index 5b3e1e4..0000000
--- a/test/vuex/acc-one-po-asset/modules/poasset.js
+++ /dev/null
@@ -1,179 +0,0 @@
-import * as api from '../api/api.js';
-
-export default {
- namespaced: true,
- state: {
- /* common */
- snackbar: {
- color: 'success',
- msg: '',
- state: false
- },
- loading_process: false,
- selected_orderaset: {},
-
- /* main layout */
- filterpo: {
- startdate: moment(new Date()).format('YYYY-MM-DD'),
- enddate: moment(new Date()).format('YYYY-MM-DD'),
- status: 'All',
- search: ''
- },
- list_status: ['All', 'Draft', 'Pending', 'Approved', 'Rejected', 'Completed'],
- list_asetpo: {
- records: [],
- total: 0
- },
- currpage: 1,
-
- /* form order aset */
- dialog_form_orderaset: false,
- list_supplier: [],
- list_branch: [],
- form_orderaset: {
- podate: moment(new Date()).format('YYYY-MM-DD'),
- supplierID: "",
- reference: "",
- branchcode: "",
- typepajak: "persen",
- valuepajak: 0,
- typediskon: "persen",
- valuediskon: 0
- },
- item_orderaset: [],
- summary_orderaset: {
- subtotal: 0,
- diskon: 0,
- pajak: 0,
- total: 0
- },
-
- dialog_add_itemaset: false,
- list_requestaset: {
- records: [],
- total: 0
- },
-
- /* delete order */
- dialog_deleteorder: false,
-
- /* attachment */
- dialog_attachment: false,
- prview_attachment: [],
-
- },
- mutations: {
- /* common */
- update_snackbar(state, val) {
- state.snackbar = val
- },
- update_loading_process(state, val) {
- state.loading_process = val
- },
- update_selected_orderaset(state, val) {
- state.selected_orderaset = val
- },
-
- /* main layout */
- update_filterpo(state, val) {
- state.filterpo = val
- },
- update_list_status(state, val) {
- state.list_status = val
- },
- update_list_asetpo(state, val) {
- state.list_asetpo = val
- },
- update_currpage(state, val) {
- state.currpage = val
- },
-
- /* form order aset */
- update_dialog_form_orderaset(state, val) {
- state.dialog_form_orderaset = val
- },
- update_list_supplier(state, val) {
- state.list_supplier = val
- },
- update_list_branch(state, val) {
- state.list_branch = val
- },
- update_form_orderaset(state, val) {
- state.form_orderaset = val
- },
- update_item_orderaset(state, val) {
- state.item_orderaset = val
- },
- update_summary_orderaset(state, val) {
- state.summary_orderaset = val
- },
- update_dialog_add_itemaset(state, val) {
- state.dialog_add_itemaset = val
- },
- update_list_requestaset(state, val) {
- state.list_requestaset = val
- },
-
- /* delete order */
- update_dialog_deleteorder(state, val) {
- state.dialog_deleteorder = val
- },
-
- /* attachment */
- update_dialog_attachment(state, val) {
- state.dialog_attachment = val
- },
- update_prview_attachment(state, val) {
- state.prview_attachment = val
- }
- },
- actions: {
- async lookupVendor(context) {
- try {
- const resp = await api.getListSupplier({token: one_token()});
- if (resp.status != 'OK') {
- throw new Error(resp.message);
- } else {
- context.commit('update_list_supplier', resp.data)
- }
- } catch (error) {
- let snac = {color: 'error', msg: error.message, state: true}
- context.commit('update_snackbar', snac)
- }
- },
- async lookupCabang(context) {
- try {
- const resp = await api.getListCabang({token: one_token()});
- if (resp.status != 'OK') {
- throw new Error(resp.message);
- }
-
- context.commit('update_list_branch', resp.data)
- } catch (error) {
- let snac = {color: 'error', msg: error.message, state: true}
- context.commit('update_snackbar', snac)
- }
- },
- async lookupOrderRequest(context, keyword) {
- try {
- const form = context.state.form_orderaset
- let param = {
- token: one_token(),
- branchcode: form.branchcode,
- search: keyword,
- currpage: 1,
- supplierID: form.supplierID
- }
- const resp = await api.searchRequestAset(param)
- if (resp.status != 'OK') {
- throw new Error(resp.message);
- }
-
- context.commit('update_list_requestaset', resp.data)
- } catch (error) {
- let snac = {color: 'error', msg: error.message, state: true}
- context.commit('update_snackbar', snac)
- }
- }
- }
-}
diff --git a/test/vuex/acc-one-po-asset/store.js b/test/vuex/acc-one-po-asset/store.js
index 7025cd9..a25b24b 100644
--- a/test/vuex/acc-one-po-asset/store.js
+++ b/test/vuex/acc-one-po-asset/store.js
@@ -1,11 +1,12 @@
import system from "../../../apps/modules/system/system.js";
+import common from "./modules/common.js";
import kontrakAsset from "./modules/kontrak-asset.js";
import orderAsset from "./modules/order-asset.js";
-import poasset from "./modules/poasset.js";
+
export const store = new Vuex.Store({
modules: {
system: system,
- poasset: poasset,
+ common: common,
kontrakAsset: kontrakAsset,
orderAsset: orderAsset
},
diff --git a/test/vuex/acc-one-receive-order-asset/api/api.js b/test/vuex/acc-one-receive-order-asset/api/api.js
index cdcb0f2..56f146c 100644
--- a/test/vuex/acc-one-receive-order-asset/api/api.js
+++ b/test/vuex/acc-one-receive-order-asset/api/api.js
@@ -1,8 +1,8 @@
-const URL = "";
+const URL = "/one-api/mockup/receive-item-po/ReceiveItemPOAsset";
-async function request(endpoint, param) {
+async function request(endpoint, params) {
try {
- const resp = await axios.post(URL + endpoint, param);
+ const resp = await axios.post(URL + endpoint, params);
if (resp.status !== 200) {
throw new Error(resp.statusText);
}
@@ -11,10 +11,62 @@ async function request(endpoint, param) {
return {
status: "ERR",
message: e.message
- };
+ }
}
}
-export async function lookupOrderAssetReceived(param) {
- return request("/lookupOrderAssetReceived", param);
+export async function getListSupplier(params) {
+ return request("/getListSupplier", params);
+}
+
+export async function getListCabang(params) {
+ return request("/getListCabang", params);
+}
+
+export async function getListGudang(params) {
+ return request("/getListGudang", params);
+}
+
+export async function getListStaff(params) {
+ return request("/getListStaff", params);
+}
+
+export async function searchOrderAsset(params) {
+ return request("/searchOrderAsset", params);
+}
+
+export async function getListingROAsset(params) {
+ return request("/getListingROAsset", params);
+}
+
+export async function generatePOItemReceive(params) {
+ return request("/generatePOItemReceive", params);
+}
+
+export async function createReceiveOrder(params) {
+ return request("/createReceiveOrder", params);
+}
+
+export async function editReceiveOrder(params) {
+ return request("/editReceivedOrder", params);
+}
+
+export async function deleteReceiveOrder(params) {
+ return request("/deleteReceiveOrder", params);
+}
+
+export async function confirmReceiveOrder(params) {
+ return request("/confirmReceiveOrder", params);
+}
+
+export async function uploadAttachment(params) {
+ return request("/uploadAttachment", params)
+}
+
+export async function getListAttachment(params) {
+ return request("/getListAttachment", params)
+}
+
+export async function getDetailDataROAsset(params) {
+ return request("/getDetailDataROAsset", params)
}
diff --git a/test/vuex/acc-one-receive-order-asset/components/dialog-add-attachment.vue b/test/vuex/acc-one-receive-order-asset/components/dialog-add-attachment.vue
index cadddaa..727b89a 100644
--- a/test/vuex/acc-one-receive-order-asset/components/dialog-add-attachment.vue
+++ b/test/vuex/acc-one-receive-order-asset/components/dialog-add-attachment.vue
@@ -174,7 +174,21 @@ module.exports = {
},
SimpanAttachment() {
if (!this.loading_process) {
+ let formdata = new FormData();
+ let listfiles = this.attachFiles;
+ let received = this.selected_roasset;
+ for (let index = 0; index < listfiles.length; index++) {
+ const file = listfiles[index];
+ formdata.append('files['+index+']', file);
+ }
+
+ formdata.append('token', one_token());
+ formdata.append('ronumber', received.ReceiveOrderPoNumber);
+ formdata.append('contractID', received.PurchaseOrderAssetContractID);
+ formdata.append('roID', received.ReceiveOrderPoID);
+
+ this.$store.dispatch("roasset/uploadAttachment", formdata);
} else {
let snac = { color: 'warning', msg: 'proses sedang berjalan', state: true };
this.$store.commit("roasset/update_snackbar", snac);
diff --git a/test/vuex/acc-one-receive-order-asset/components/dialog-confirm-receive.vue b/test/vuex/acc-one-receive-order-asset/components/dialog-confirm-receive.vue
new file mode 100644
index 0000000..f153b4e
--- /dev/null
+++ b/test/vuex/acc-one-receive-order-asset/components/dialog-confirm-receive.vue
@@ -0,0 +1,89 @@
+
+
+
+ KONFIRMASI RECEIVE ORDER ASSET
+
+
+ Tanggal
+ : {{ selected_roasset.ReceiveOrderPoIDate }}
+
+ Nomor
+ : {{ selected_roasset.ReceiveOrderPoNumber }}
+
+ Nomor Referensi
+ : {{ selected_roasset.ReceiveOrderPoRefNumber }}
+
+ Supplier
+ : {{ selected_roasset.SupplierName }}
+
+ Catatan
+ : {{ selected_roasset.ReceiveOrderPoNote }}
+
+
+
+
+ Batal
+ Konfirmasi
+
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-receive-order-asset/components/dialog-delete-order-asset.vue b/test/vuex/acc-one-receive-order-asset/components/dialog-delete-order-asset.vue
index f180a30..2cd51ad 100644
--- a/test/vuex/acc-one-receive-order-asset/components/dialog-delete-order-asset.vue
+++ b/test/vuex/acc-one-receive-order-asset/components/dialog-delete-order-asset.vue
@@ -3,20 +3,22 @@
DELETE RECEIVE ORDER ASSET
- Tanggal
- : {{ }}
+
+ Tanggal
+ : {{ selected_roasset.ReceiveOrderPoIDate }}
- Nomor
- : {{ }}
+ Nomor
+ : {{ selected_roasset.ReceiveOrderPoNumber }}
- Nomor Referensi
- : {{ }}
+ Nomor Referensi
+ : {{ selected_roasset.ReceiveOrderPoRefNumber }}
- Supplier
- : {{ }}
+ Supplier
+ : {{ selected_roasset.SupplierName }}
- Catatan
- : {{ }}
+ Catatan
+ : {{ selected_roasset.ReceiveOrderPoNote }}
+
@@ -38,26 +40,39 @@ module.exports = {
computed: {
dialog_delete: {
get() {
- return this.$store.state.roasset.dialog_delete
+ return this.$store.state.roasset.dialog_delete;
},
set(val) {
- this.$store.commit("roasset/update_dialog_delete", val)
+ this.$store.commit("roasset/update_dialog_delete", val);
}
},
selected_roasset: {
get() {
- return this.$store.state.roasset.selected_roasset
+ return this.$store.state.roasset.selected_roasset;
},
set(val) {
- this.$store.commit("roasset/update_selected_roasset", val)
+ this.$store.commit("roasset/update_selected_roasset", val);
}
+ },
+ loading_process() {
+ return this.$store.state.roasset.loading_process;
}
},
methods: {
batalDelete() {
+ this.selected_roasset = {}
this.dialog_delete = false
},
- confirmDelete() { }
+ confirmDelete() {
+ if (!this.loading_process) {
+ const received = this.selected_roasset;
+ this.$store.dispatch("roasset/deleteReceiveAsset", received.ReceiveOrderPoID);
+ } else {
+ const msg = "Masih terdapat proses lain yang berjalan";
+ const snac = { color: 'error', msg: msg, state: false };
+ this.$store.commit("roasset/update_snackbar", snac);
+ }
+ }
},
watch: {}
}
diff --git a/test/vuex/acc-one-receive-order-asset/components/dialog-inspeksi.vue b/test/vuex/acc-one-receive-order-asset/components/dialog-inspeksi.vue
new file mode 100644
index 0000000..443ab6e
--- /dev/null
+++ b/test/vuex/acc-one-receive-order-asset/components/dialog-inspeksi.vue
@@ -0,0 +1,185 @@
+
+
+
+
+ FORM INSPEKSI ASET {{ selected_item_received.M_ItemDesc }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tutup
+ Simpan
+
+
+
+
+
+
diff --git a/test/vuex/acc-one-receive-order-asset/components/dialog-pick-contract.vue b/test/vuex/acc-one-receive-order-asset/components/dialog-pick-contract.vue
index 7b2b7c8..5d17e97 100644
--- a/test/vuex/acc-one-receive-order-asset/components/dialog-pick-contract.vue
+++ b/test/vuex/acc-one-receive-order-asset/components/dialog-pick-contract.vue
@@ -1,61 +1,153 @@
-
-
- PILIH KONTRAK ORDER ASET
-
+
+
+ PILIH ORDER ASET
+
-
+
-
+
-
- |
- {{ }}
+ |
+ |
+ {{ props.expanded
+ ? "keyboard_arrow_down"
+ : "keyboard_arrow_right"
+ }}
|
- {{ }}
+ {{ props.item.PurchaseOrderNumber }}
|
- {{ }}
+ {{ props.item.PurchaseOrderAssetContractDate }}
+ |
+
+ {{ props.item.PurchaseOrderAssetContractName }}
+ |
+
+ {{ props.item.SupplierCode }}
+ {{ props.item.SupplierName }}
+ |
+
+ {{ props.item.PurchaseOrderNote }}
|
+
+
+
+
+
+
+
+ |
+ {{ expnd.item.M_ItemCode }}
+ |
+
+ {{ expnd.item.M_ItemDesc }}
+ |
+
+ {{ expnd.item.ItemUnitName }}
+ |
+
+ {{ expnd.item.qty }}
+ |
+
+
+
+
+
+
- Batal
- Simpan
+ Batal
+ Simpan
+
+
diff --git a/test/vuex/acc-one-receive-order-asset/components/dialog-receive-order-asset.vue b/test/vuex/acc-one-receive-order-asset/components/dialog-receive-order-asset.vue
index 1f94f37..af1a45e 100644
--- a/test/vuex/acc-one-receive-order-asset/components/dialog-receive-order-asset.vue
+++ b/test/vuex/acc-one-receive-order-asset/components/dialog-receive-order-asset.vue
@@ -1,77 +1,128 @@
-
+
FORM TERIMA ASET
-
+
-
+
-
-
-
+
+
-
+
+ v-model="form_receive.reference" label="Referensi" :readonly="readonly_mode"
+ >
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+ v-model="form_receive.catatan" :readonly="readonly_mode">
-
-
-
- PILIH KONTRAK
+
+
+ PILIH ORDER ASSET
-
-
-
+
+
- |
+
+ {{ props.item.M_ItemCode }}
+ {{ props.item.M_ItemDesc }}
+ |
+
+ {{ props.item.qty }}
+ |
+
+ {{ props.item.ItemUnitName }}
+ |
+
+
+
+ Diterima
+
+
+ Ditolak
+ {{ props.item.inspeksi.catatan }}
+
+
+ Diterima dengan catatan
+ {{ props.item.inspeksi.catatan }}
+
+
+ |
+
+
+
+
+ note_add
+
+
+ Inspeksi Jasa
+
+
+
+
+
+ cancel
+
+
+ Batal Order
+
+ |
@@ -80,13 +131,27 @@
- Batal
- Simpan
+ Batal
+ Simpan
+
+
\ No newline at end of file
+
diff --git a/test/vuex/acc-one-supplier-payment-v4/components/oneBillPaymentManual.vue b/test/vuex/acc-one-supplier-payment-v4/components/oneBillPaymentManual.vue
index ea57a9d..9a011a6 100644
--- a/test/vuex/acc-one-supplier-payment-v4/components/oneBillPaymentManual.vue
+++ b/test/vuex/acc-one-supplier-payment-v4/components/oneBillPaymentManual.vue
@@ -23,7 +23,7 @@
-
+
@@ -194,7 +193,7 @@
-
+
@@ -275,7 +274,7 @@
-
+
@@ -954,11 +953,11 @@
const [day, month, year] = date.split('-')
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
},
- changeBayar() {
+ changeBayar() {
var bayar = this.xbayar
let str = this.restbill
var tagihan = parseInt(Number(str.replace(/,/g, '')))
-
+
if (bayar > tagihan){
alert('Jumlah bayar melebihi tagihan , bayar : ' + bayar + ' tagihan: ' + tagihan )
this.xbayar = 0
@@ -966,7 +965,7 @@
this.xdisable_btn_pay = 'Y'
}
console.log(this.xdisable_btn_pay)
-
+
},
colorbginp(value) {
if (value.chex === false) {
@@ -994,7 +993,7 @@
el.chex = value
el.tagihan_bayar = value == true ? el.tagihan_tagihan : 0
})
-
+
var selected = _.filter(arr, function (o) {
return o.chex;
})
@@ -1017,7 +1016,7 @@
el.chex = false
el.tagihan_bayar = 0
})
-
+
var selected = _.filter(arr, function (o) {
return o.chex;
})
@@ -1030,7 +1029,7 @@
})
let totpaid = valx
this.$store.commit("paymentmanual/update_total_payment", totpaid)
-
+
}
},
checkTop(pat) {
@@ -1079,31 +1078,31 @@
toRupiah(data) {
// Input validation
if (!data) return '0,00'
-
+
// Ensure we're working with a number
if (typeof data !== 'number') {
data = parseFloat(data)
}
-
+
// Handle invalid numbers
if (isNaN(data)) return '0,00'
-
+
// Convert to string with exactly 2 decimal places without rounding
// This preserves the exact value for display
const parts = data.toString().split('.')
const wholePart = parts[0]
let decimalPart = parts.length > 1 ? parts[1] : '00'
-
+
// Ensure we have exactly 2 decimal digits for display
if (decimalPart.length > 2) {
decimalPart = decimalPart.substring(0, 2)
} else if (decimalPart.length < 2) {
decimalPart = decimalPart.padEnd(2, '0')
}
-
+
// Format the whole number part with dots as thousand separators
const formatted = wholePart.replace(/\B(?=(\d{3})+(?!\d))/g, ".")
-
+
// Return the formatted number
return `${formatted},${decimalPart}`
},
@@ -1152,12 +1151,12 @@
},
async pay() {
// alert(this.xbayar)
-
+
if (this.in_saving) return;
this.in_saving = true;
- var go_pay = true
- var xmsginfo = ''
- let prm = {
+ var go_pay = true
+ var xmsginfo = ''
+ let prm = {
orderid: this.$store.state.bill.selected_bill.SupplierInvoiceID,
amount: this.xbayar,
paymenttype: this.xpaymenttype.coaID,
@@ -1165,21 +1164,24 @@
bills: this.$store.state.paymentmanual.selected_tagihan,
totalbill : this.$store.state.bill.selected_bill.totalbill,
paid : this.$store.state.bill.selected_bill.paid,
- tanggalbayar : this.xtanggalbayar
+ tanggalbayar: this.xtanggalbayar,
+ type: this.$store.state.bill.selected_bill.type
+ }
+ // console.log(prm)
+
+ if (this.$store.state.bill.selected_bill.type == 'DP') {
+ this.$store.dispatch("paymentmanual/payDownpayment", prm)
+ } else {
+ this.$store.dispatch("paymentmanual/pay", prm)
}
- //console.log(prm.amount)
- this.$store.dispatch("paymentmanual/pay", prm)
-
-
},
async editpay() {
// alert(this.xbayar)
-
if (this.in_saving) return;
this.in_saving = true;
- var go_pay = true
- var xmsginfo = ''
- let prm = {
+ var go_pay = true
+ var xmsginfo = ''
+ let prm = {
orderid: this.$store.state.bill.selected_bill.SupplierInvoiceID,
headerid: this.$store.state.bill.selected_bill.SupplierPaymentID,
xnumber: this.$store.state.bill.selected_bill.SupplierPaymentNumber,
@@ -1187,8 +1189,6 @@
}
//console.log(prm.amount)
this.$store.dispatch("paymentmanual/editpay", prm)
-
-
},
deleteNote(note, idx) {
this.$store.commit("paymentmanual/update_note_delete", "")
@@ -1369,4 +1369,4 @@
},
}
}
-
\ No newline at end of file
+
diff --git a/test/vuex/acc-one-supplier-payment-v4/modules/paymentmanual.js b/test/vuex/acc-one-supplier-payment-v4/modules/paymentmanual.js
index add03a5..59b4434 100644
--- a/test/vuex/acc-one-supplier-payment-v4/modules/paymentmanual.js
+++ b/test/vuex/acc-one-supplier-payment-v4/modules/paymentmanual.js
@@ -210,6 +210,7 @@ export default {
context.commit("update_lookup_error_message", e.message)
}
},
+
async lookup_banks(context) {
context.commit("bill/update_get_data_status", 1, {
root: true
@@ -243,6 +244,7 @@ export default {
console.log(e)
}
},
+
async lookup_accounts(context) {
context.commit("update_lookup_status", 1)
try {
@@ -264,6 +266,7 @@ export default {
context.commit("update_lookup_error_message", e.message)
}
},
+
async searchcard(context, prm) {
context.commit("update_lookup_status", 1)
try {
@@ -282,6 +285,7 @@ export default {
context.commit("update_lookup_status", 3)
}
},
+
async pay(context, prm) {
context.commit("update_lookup_status", 1)
try {
@@ -312,6 +316,38 @@ export default {
context.commit("update_lookup_error_message", e.message)
}
},
+
+ async payDownpayment(context, prm) {
+ context.commit("update_lookup_status", 1)
+ try {
+ prm.token = one_token()
+ let resp = await api.payDownpayment(prm)
+ if (resp.status != "OK") {
+ context.commit("update_lookup_status", 3)
+ context.commit("update_lookup_error_message", resp.message)
+ } else {
+ context.commit("update_lookup_status", 2)
+ context.commit("update_lookup_error_message", "")
+ let data = {
+ records: resp.data.records.types,
+ total: resp.data.total
+ }
+ let xnumber = resp.data.records.data.numberx
+ let id = resp.data.records.data.idx
+ context.commit("update_disable_btn_pay", 'Y')
+ context.commit("update_idx", id)
+ context.commit("update_total_payment", 0)
+ context.commit("update_paynumber", "Payment Instruction nomor " + xnumber + " telah berhasil")
+ context.commit("update_dialog_pay_success", true)
+ context.commit("update_in_saving", false)
+ context.commit("update_xbayar", 0)
+ }
+ } catch (e) {
+ context.commit("update_lookup_status", 3)
+ context.commit("update_lookup_error_message", e.message)
+ }
+ },
+
async editpay(context, prm) {
context.commit("update_lookup_status", 1)
try {
@@ -342,6 +378,7 @@ export default {
context.commit("update_lookup_error_message", e.message)
}
},
+
async edit_note(context, prm) {
context.commit("update_lookup_status", 1)
try {
@@ -363,6 +400,7 @@ export default {
context.commit("update_lookup_error_message", e.message)
}
},
+
async delete_note(context, prm) {
context.commit("update_lookup_status", 1)
try {
@@ -384,6 +422,7 @@ export default {
context.commit("update_lookup_error_message", e.message)
}
},
+
async selectpaymenttype(context,payload) {
context.commit("bill/update_get_data_status", 1, {
root: true
@@ -421,6 +460,7 @@ export default {
console.log(e)
}
},
+
async selectpaymenttypeold(context) {
context.commit("bill/update_get_data_status", 1, {
root: true
@@ -456,6 +496,7 @@ export default {
console.log(e)
}
},
+
async selectcard(context) {
context.commit("bill/update_get_data_status", 1, {
root: true
@@ -488,6 +529,7 @@ export default {
console.log(e)
}
},
+
async selectedc(context) {
context.commit("bill/update_get_data_status", 1, {
root: true
@@ -522,4 +564,4 @@ export default {
}
}
}
-}
\ No newline at end of file
+}