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 new file mode 100644 index 0000000..6c2e359 --- /dev/null +++ b/test/vuex/acc-one-po-asset/components/dialog-create-order.vue @@ -0,0 +1,70 @@ + + + + BUAT ORDER ASET + + + + + + FORM ORDER ASET + + + + FORM KONTRAK ASET + + + + ITEM ORDER ASET + + + + + + + + + + + + + + + + + + + + + + Batal + Simpan + + + + + + 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 new file mode 100644 index 0000000..136a879 --- /dev/null +++ b/test/vuex/acc-one-po-asset/components/form-kontrak-asset.vue @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 0000000..8babe44 --- /dev/null +++ b/test/vuex/acc-one-po-asset/components/form-order-asset.vue @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 7b7983a..4c55f54 100644 --- a/test/vuex/acc-one-po-asset/components/main-layout.vue +++ b/test/vuex/acc-one-po-asset/components/main-layout.vue @@ -1,160 +1,131 @@ - - - PURCHASE ORDER ASET - - - add_box - - - add_box - - + + + PURCHASE ORDER ASET + + + add_box + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - {{ props.item.PurchaseOrderNumber }} - {{ props.item.PurchaseOrderDate }} - {{ props.item.SupplierName }} - {{ props.item.M_BranchName }} - {{ props.item.PurchaseOrderNote }} - - Rp. {{ formatCurrency(props.item.PurchaseOrderGrandTotal) }} - - {{ props.item.PurchaseOrderStatus }} - - - - - - send - - - Buat Request PO - - - - - edit - - - Edit Request PO - - - - - delete - - - Delete Request PO - - - - - - - visibility - - Detail PO - - - - - - - - - - - - + + + + + {{ props.item.PurchaseOrderNumber }} + {{ props.item.PurchaseOrderDate }} + {{ props.item.SupplierName }} + {{ props.item.M_BranchName }} + {{ props.item.PurchaseOrderNote }} + + Rp. {{ formatCurrency(props.item.PurchaseOrderGrandTotal) }} + + {{ props.item.PurchaseOrderStatus }} + + + + + + send + + + Buat Request PO + + + + + edit + + + Edit Request PO + + + + + delete + + + Delete Request PO + + + + + + + visibility + + Detail PO + + + + + + + + + + + + - - {{ snackbar.msg }} - Tutup - + + {{ snackbar.msg }} + Tutup + - - - - + + + - - + + + + \ No newline at end of file + 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 e69de29..cdcb0f2 100644 --- a/test/vuex/acc-one-receive-order-asset/api/api.js +++ b/test/vuex/acc-one-receive-order-asset/api/api.js @@ -0,0 +1,20 @@ +const URL = ""; + +async function request(endpoint, param) { + try { + const resp = await axios.post(URL + endpoint, param); + if (resp.status !== 200) { + throw new Error(resp.statusText); + } + return resp.data; + } catch (e) { + return { + status: "ERR", + message: e.message + }; + } +} + +export async function lookupOrderAssetReceived(param) { + return request("/lookupOrderAssetReceived", param); +} 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 new file mode 100644 index 0000000..cadddaa --- /dev/null +++ b/test/vuex/acc-one-receive-order-asset/components/dialog-add-attachment.vue @@ -0,0 +1,198 @@ + + + + + + UPLOAD BUKTI TERIMA ASET + + + + + + + + + + + + + + + close + + + + + + + Batal + Simpan + + + + + + + + {{ viewtitle }} + + + close + + + + + + + + + + + Tutup + + + + + + + + + + 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 new file mode 100644 index 0000000..f180a30 --- /dev/null +++ b/test/vuex/acc-one-receive-order-asset/components/dialog-delete-order-asset.vue @@ -0,0 +1,64 @@ + + + + DELETE RECEIVE ORDER ASSET + + Tanggal + : {{ }} + + Nomor + : {{ }} + + Nomor Referensi + : {{ }} + + Supplier + : {{ }} + + Catatan + : {{ }} + + + + Batal + Hapus + + + + + + + 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 new file mode 100644 index 0000000..7b2b7c8 --- /dev/null +++ b/test/vuex/acc-one-receive-order-asset/components/dialog-pick-contract.vue @@ -0,0 +1,81 @@ + + + + PILIH KONTRAK ORDER ASET + + + + + + + + + + + {{ }} + + + {{ }} + + + {{ }} + + + + + + + + + + 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 new file mode 100644 index 0000000..1f94f37 --- /dev/null +++ b/test/vuex/acc-one-receive-order-asset/components/dialog-receive-order-asset.vue @@ -0,0 +1,159 @@ + + + + FORM TERIMA ASET + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PILIH KONTRAK + + + + + + + + + + + + + + + + + + + + Batal + Simpan + + + + + + diff --git a/test/vuex/acc-one-receive-order-asset/components/main-layout.vue b/test/vuex/acc-one-receive-order-asset/components/main-layout.vue index bc392ed..866101c 100644 --- a/test/vuex/acc-one-receive-order-asset/components/main-layout.vue +++ b/test/vuex/acc-one-receive-order-asset/components/main-layout.vue @@ -3,7 +3,7 @@ RECEIVE ORDER ASET - + add_box @@ -11,20 +11,22 @@ - + - + - + - + @@ -42,7 +44,48 @@ - + + + + + {{ props.item.date }} + + + {{ props.item.receiveordernumber }} + {{ props.item.purchaseordernumber }} + + + {{ props.item.suppliername }} + + + + + Total tagihan : {{ props.item.totaltagihan }} + Besar uang muka : {{ props.item.uangmuka }} + + + Status cicilan : {{ props.item.cicilanterbayar }} / {{ props.item.numbercicilan }} + Besar cicilan : {{ props.item.besarcicilan }} + + + + + {{ props.item.status }} + + + + + + attachment + + + Upload Bukti + + + + + @@ -53,43 +96,53 @@ {{ snackbar.msg }} Tutup + + + + + diff --git a/test/vuex/acc-one-receive-order-asset/modules/roasset.js b/test/vuex/acc-one-receive-order-asset/modules/roasset.js index 6813dcb..2de5791 100644 --- a/test/vuex/acc-one-receive-order-asset/modules/roasset.js +++ b/test/vuex/acc-one-receive-order-asset/modules/roasset.js @@ -22,7 +22,32 @@ export default { records: [], total: 0 }, - currpage: 1 + currpage: 1, + selected_roasset: {}, + + /* form receive */ + dialog_receive_aset: false, + form_receive: { + date: moment(new Date()).format('YYYY-MM-DD'), + supplier: "", + reference: "", + ponumber: "", + contractlength: 0, + datepayment: "", + cicilan: 0, + downpayment: 0, + totalbill: 0, + catatan: "" + }, + item_receive: [], + dialog_pick_contract: false, + + /* upload attachment */ + dialog_attachment: false, + preview_attachment: [], + + /* delete */ + dialog_delete: false }, mutations: { /* common */ @@ -45,7 +70,75 @@ export default { }, update_currpage(state, val) { state.currpage = val + }, + update_selected_roasset(state, val) { + state.selected_roasset = val + }, + + /* form receive */ + update_dialog_receive_aset(state, val) { + state.dialog_receive_aset = val + }, + update_form_receive(state, val) { + state.form_receive = val + }, + update_item_receive(state, val) { + state.item_receive = val + }, + update_dialog_pick_contract(state, val) { + state.dialog_pick_contract = val + }, + + /* attachment */ + update_dialog_attachment(state, val) { + state.dialog_attachment = val + }, + update_preview_attachment(state, val) { + state.preview_attachment = val + }, + + /* delete */ + update_dialog_delete(state, val) { + state.dialog_delete = val } }, - actions: {} + actions: { + async lookupOrderAssetReceived(context) { + try { + // const param = { + // token: one_token(), + // } + + // const resp = await api.lookupOrderAssetReceived(param); + // if (resp.status != "OK") { + // throw new Error(resp.message); + // } + + // context.commit("update_list_roasset", resp.data); + + const dummy = { + records: [ + { + date: moment(new Date()).format('YYYY-MM-DD'), + receiveordernumber: "GR-003/SDM-14/SM-1/VI/2026", + purchaseordernumber: "PO-002/OPR-RL/SM-2/VI/2026", + suppliername: "PT MEJA ABADI", + uangmuka: 4000000, + totaltagihan: 10000000, + besarcicilan: 500000, + numbercicilan: 12, + cicilanterbayar: 0, + status: "Unconfirmed" + } + ], + total: 1 + } + + context.commit("update_list_roasset", dummy); + } catch (e) { + const snac = { color: 'error', msg: e.message, state: false }; + context.commit("update_snackbar", snac); + } + } + } }