fixes
This commit is contained in:
parent
8100579231
commit
f387e947a5
|
@ -1 +1 @@
|
||||||
{"branch_name":"dev","last_commit_date":"2022-02-16T06:31:09.000Z","last_commit_author":"anjujangid","last_commit_hash":"19d58cff7a503d3ffb27b38c96bb5bd7ab0385d5"}
|
{"branch_name":"dev","last_commit_date":"2022-02-16T07:16:41.000Z","last_commit_author":"anjujangid","last_commit_hash":"81005792316765eb143e3e6adafeabc98eb93f1f"}
|
|
@ -71,6 +71,7 @@
|
||||||
readonly
|
readonly
|
||||||
v-bind="attrs"
|
v-bind="attrs"
|
||||||
v-on="on"
|
v-on="on"
|
||||||
|
:disabled="!createdFrom"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
</template>
|
</template>
|
||||||
<v-date-picker
|
<v-date-picker
|
||||||
|
@ -151,9 +152,7 @@
|
||||||
<template v-slot:item.order="{ item }">
|
<template v-slot:item.order="{ item }">
|
||||||
<span>{{ item.incrementId }}</span>
|
<span>{{ item.incrementId }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:item.retailername="{ item }">
|
|
||||||
<span>{{ userInfo.firstname + "" + userInfo.lastname }}</span>
|
|
||||||
</template>
|
|
||||||
<template v-slot:item.salesrepname="{ item }">
|
<template v-slot:item.salesrepname="{ item }">
|
||||||
<span>{{ userInfo.firstname + "" + userInfo.lastname }}</span>
|
<span>{{ userInfo.firstname + "" + userInfo.lastname }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -677,31 +677,21 @@ export const doFetchProductTags = wrapRequest((sku) => {
|
||||||
|
|
||||||
|
|
||||||
export const doFetchOrderHistory = wrapRequest((obj) => {
|
export const doFetchOrderHistory = wrapRequest((obj) => {
|
||||||
debugger
|
|
||||||
let query = "";
|
let query = "";
|
||||||
query = `searchCriteria[pageSize]=5000&searchCriteria[currentPage]=1&searchCriteria[sortOrders][0][field]=created_at&searchCriteria[sortOrders][0][direction]=DESC&searchCriteria[filter_groups][0][filters][0][field]=customer_id&searchCriteria[filter_groups][0][filters][0][value]=${obj.customerId}&searchCriteria[filter_groups][0][filters][0][condition_type]=eq`;
|
query = `searchCriteria[pageSize]=5000&searchCriteria[currentPage]=1&searchCriteria[sortOrders][0][field]=created_at&searchCriteria[sortOrders][0][direction]=DESC&searchCriteria[filter_groups][0][filters][0][field]=customer_id&searchCriteria[filter_groups][0][filters][0][value]=${obj.customerId}&searchCriteria[filter_groups][0][filters][0][condition_type]=eq`;
|
||||||
|
|
||||||
if(obj.incrementId){
|
if(obj.incrementId){
|
||||||
query = `searchCriteria[filter_groups][1][filters][0][field]=increment_id&searchCriteria[filter_groups][1][filters][0][value]=${obj.incrementId}&searchCriteria[filter_groups][1][filters][0][condition_type]=eq`
|
query = query +`&searchCriteria[filter_groups][1][filters][0][field]=increment_id&searchCriteria[filter_groups][1][filters][0][value]=${obj.incrementId}&searchCriteria[filter_groups][1][filters][0][condition_type]=eq`
|
||||||
}
|
}
|
||||||
|
|
||||||
if(obj.createdAt){
|
if(obj.createdAt){
|
||||||
query = `searchCriteria[filter_groups][2][filters][0][field]=created_at&
|
query = query+`&searchCriteria[filter_groups][2][filters][0][value]=${obj.createdAt}&searchCriteria[filter_groups][2][filters][0][condition_type]=gteq&searchCriteria[filter_groups][2][filters][0][field]=created_at`
|
||||||
searchCriteria[filter_groups][2][filters][0][value]=${obj.createdAt}&searchCriteria[filter_groups][2][filters][0][condition_type]=gteq`
|
|
||||||
}
|
}
|
||||||
if(obj.createdTo ){
|
if(obj.createdTo ){
|
||||||
query = `searchCriteria[filter_groups][3][filters][0][field]=created_at&searchCriteria[filter_groups][3][filters][0][value]=${obj.createdTo}&searchCriteria[filter_groups][3][filters][0][condition_type]=lteq`
|
query = query+`&searchCriteria[filter_groups][3][filters][0][field]=created_at&searchCriteria[filter_groups][3][filters][0][value]=${obj.createdTo}&searchCriteria[filter_groups][3][filters][0][condition_type]=lteq`
|
||||||
}
|
|
||||||
if(obj.createdAt && obj.createdTo ){
|
|
||||||
query = `searchCriteria[filter_groups][2][filters][0][value]=${obj.createdAt}&searchCriteria[filter_groups][2][filters][0][condition_type]=gteq&searchCriteria[filter_groups][3][filters][0][field]=created_at&searchCriteria[filter_groups][3][filters][0][value]=${obj.createdTo}&searchCriteria[filter_groups][3][filters][0][condition_type]=lteq&searchCriteria[filter_groups][2][filters][0][field]=created_at`
|
|
||||||
}
|
|
||||||
if(obj.createdAt && obj.createdTo && obj.incrementId ){
|
|
||||||
query = `searchCriteria[filter_groups][1][filters][0][field]=increment_id&searchCriteria[filter_groups][1][filters][0][value]=${obj.incrementId}&searchCriteria[filter_groups][1][filters][0][condition_type]=eq
|
|
||||||
&searchCriteria[filter_groups][2][filters][0][value]=${obj.createdAt}&searchCriteria[filter_groups][2][filters][0][condition_type]=gteq&searchCriteria[filter_groups][3][filters][0][field]=created_at&searchCriteria[filter_groups][3][filters][0][value]=${obj.createdTo}&searchCriteria[filter_groups][3][filters][0][condition_type]=lteq&searchCriteria[filter_groups][2][filters][0][field]=created_at`
|
|
||||||
}
|
|
||||||
if(obj.incrementId && obj.createdAt ){
|
|
||||||
query = `searchCriteria[filter_groups][1][filters][0][field]=increment_id&searchCriteria[filter_groups][1][filters][0][value]=${obj.incrementId}&searchCriteria[filter_groups][1][filters][0][condition_type]=eq&searchCriteria[filter_groups][2][filters][0][field]=created_at&
|
|
||||||
searchCriteria[filter_groups][2][filters][0][value]=${obj.createdAt}&searchCriteria[filter_groups][2][filters][0][condition_type]=gteq`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
@ -30,41 +30,23 @@ export const orderlist = {
|
||||||
state.OrderHistory = orderhistorydata
|
state.OrderHistory = orderhistorydata
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
/* eslint-disable no-alert, no-console , no-debugger */
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
fetchOrderList: async ({ state, commit }, customerId) => {
|
fetchOrderList: async ({ state, commit }, customerId) => {
|
||||||
debugger
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
//let newDateTo='';
|
||||||
|
|
||||||
|
if(state.createdTo)
|
||||||
|
{
|
||||||
|
|
||||||
|
debugger
|
||||||
|
}
|
||||||
|
|
||||||
commit('inProgress', true);
|
commit('inProgress', true);
|
||||||
|
|
||||||
let createdTo = state.createdTo
|
|
||||||
if(createdTo){
|
|
||||||
console.log(createdTo,"full value")
|
|
||||||
// let date = new Date(Date.now()+(3600 * 1000 *24));
|
|
||||||
// console.log(date)
|
|
||||||
// let To= date.getFullYear()+"-"+date.getDay()+"-"+date.getDate()
|
|
||||||
// console.log(To+"too")
|
|
||||||
|
|
||||||
// console.log(state.createdTo)
|
|
||||||
|
|
||||||
// // console.log( createdTo.setDate(createdTo.getDate() + 1),"full value")
|
|
||||||
// // console.log( state.createdTo,"full value")
|
|
||||||
// let createdTo = new Date();
|
|
||||||
|
|
||||||
// createdTo.setDate(createdTo.getDate() + 1);
|
|
||||||
|
|
||||||
// console.log( createdTo.setDate(createdTo.getDate() + 1),"full value")
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
console.log(createdTo,"null value")
|
|
||||||
// let createdTo = new Date();
|
|
||||||
// console.log(createdTo.setDate(createdTo.getDate() + 1)," null value")
|
|
||||||
|
|
||||||
// createdTo.setDate(createdTo.getDate() + 1);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
let OrderHistory = await doFetchOrderHistory({
|
let OrderHistory = await doFetchOrderHistory({
|
||||||
customerId: customerId,
|
customerId: customerId,
|
||||||
incrementId: state.orderNumber,
|
incrementId: state.orderNumber,
|
||||||
|
@ -77,6 +59,7 @@ export const orderlist = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
commit('setOrderHistory', []);
|
||||||
commit('inProgress', false);
|
commit('inProgress', false);
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue