added ponumber in order page table
This commit is contained in:
parent
74d3d0c4fa
commit
1a7f74b26a
|
@ -1 +1 @@
|
|||
{"branch_name":"dev","last_commit_date":"2022-02-03T07:51:08.000Z","last_commit_author":"rakesh","last_commit_hash":"d5f0c96eb734aa04ebb26447e10f4b25a34a6f05"}
|
||||
{"branch_name":"dev","last_commit_date":"2022-02-05T10:19:06.000Z","last_commit_author":"anjujangid","last_commit_hash":"74d3d0c4faa541b6dfdfa28e187885658ae11448"}
|
|
@ -145,6 +145,9 @@
|
|||
</template>
|
||||
<template v-slot:item.status="{ item }">
|
||||
<span>{{ item.status }}</span>
|
||||
</template>
|
||||
<template v-slot:item.POnumber="{ item }">
|
||||
<span>{{ item.payment.poNumber }}</span>
|
||||
</template>
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-hover v-slot:default="{ hover }">
|
||||
|
@ -168,6 +171,7 @@
|
|||
<!-- <ul v-for="(listorder, index) in OrderHistory" v-bind:key="index">
|
||||
<li> {{ listorder.items[0].orderId}}</li>
|
||||
</ul> -->
|
||||
|
||||
</v-container>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -187,6 +191,7 @@ export default {
|
|||
{ text: "Status", value: "status" },
|
||||
{ text: "PO Number", value: "POnumber" },
|
||||
{ text: "Action", value: "action" },
|
||||
|
||||
],
|
||||
}),
|
||||
computed: {
|
||||
|
@ -198,6 +203,9 @@ export default {
|
|||
},
|
||||
OrderHistory() {
|
||||
return this.$store.state.orderlist.OrderHistory.items;
|
||||
},
|
||||
customerId() {
|
||||
return this.$store.state.accountOne.one;
|
||||
},
|
||||
inProgress() {
|
||||
return this.$store.state.orderlist.inProgress;
|
||||
|
@ -231,7 +239,8 @@ export default {
|
|||
},
|
||||
},
|
||||
created() {
|
||||
this.$store.dispatch("orderlist/fetchOrderList");
|
||||
this.$store.dispatch("orderlist/fetchOrderList",this.customerId.id);
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -676,7 +676,7 @@ export const doFetchProductTags = wrapRequest((sku) => {
|
|||
})
|
||||
|
||||
|
||||
export const doFetchOrderHistory = wrapRequest(() => {
|
||||
export const doFetchOrderHistory = wrapRequest((customerId) => {
|
||||
const requestOptions = {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
|
@ -684,6 +684,5 @@ export const doFetchOrderHistory = wrapRequest(() => {
|
|||
'Access-Control-Allow-Origin': '*',
|
||||
}
|
||||
};
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crorders?searchCriteria[filter_groups][0][filters][0][field]=customer_id&searchCriteria[filter_groups][0][filters][0][value]=124160&searchCriteria[filter_groups][0][filters][0][condition_type]=eq&searchCriteria[filter_groups][1][filters][0][field]=status&searchCriteria[filter_groups][1][filters][0][value]=complete&searchCriteria[filter_groups][1][filters][0][condition_type]=eq&searchCriteria[pageSize]=10&searchCriteria[currentPage]=1&searchCriteria[sortOrders][0][field]=created_at&searchCriteria[sortOrders][0][direction]=DESC`, requestOptions)
|
||||
|
||||
});
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crorders?searchCriteria[filter_groups][0][filters][0][field]=customer_id&searchCriteria[filter_groups][0][filters][0][value]=${customerId}&searchCriteria[filter_groups][0][filters][0][condition_type]=eq&searchCriteria[pageSize]=100&searchCriteria[currentPage]=1&searchCriteria[sortOrders][0][field]=created_at&searchCriteria[sortOrders][0][direction]=DESC`, requestOptions)
|
||||
});
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
/* eslint-disable no-alert, no-console , no-debugger */
|
||||
import { doFetchOrderHistory } from '@/services/product.service';
|
||||
import { getField, updateField } from 'vuex-map-fields';
|
||||
import humps from 'lodash-humps';
|
||||
|
@ -7,7 +9,7 @@ export const orderlist = {
|
|||
state: {
|
||||
inProgress: true,
|
||||
OrderHistory: {},
|
||||
|
||||
|
||||
// orderNumber: "",
|
||||
// createdDate: "",
|
||||
// toDate: "",
|
||||
|
@ -28,17 +30,17 @@ export const orderlist = {
|
|||
// } ,
|
||||
setOrderHistory(state, orderhistorydata) {
|
||||
state.OrderHistory = orderhistorydata
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
actions: {
|
||||
searchOrder: ({ commit }, orderItem) => {
|
||||
commit('SetOrderlist', orderItem);
|
||||
},
|
||||
fetchOrderList: async ({ commit }) => {
|
||||
fetchOrderList: async ({ commit },customerId) => {
|
||||
try {
|
||||
commit('inProgress', true);
|
||||
let OrderHistory = await doFetchOrderHistory();
|
||||
let OrderHistory = await doFetchOrderHistory(customerId);
|
||||
if (OrderHistory) {
|
||||
commit('inProgress', false);
|
||||
commit('setOrderHistory', humps(OrderHistory));
|
||||
|
@ -48,7 +50,9 @@ export const orderlist = {
|
|||
commit('inProgress', false);
|
||||
throw error
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue