diff --git a/src/services/OrderService.ts b/src/services/OrderService.ts index e687ce32..c18f4017 100644 --- a/src/services/OrderService.ts +++ b/src/services/OrderService.ts @@ -1,5 +1,4 @@ import { api } from '@/adapter'; -import store from '@/store'; const findOrder = async (payload: any): Promise => { return api({ @@ -21,7 +20,7 @@ const releaseItems = async (payload: any): Promise => { return api({ url: "uploadJsonFile", method: "post", - data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId}, + data: payload.data, headers: payload.headers }); } @@ -30,7 +29,7 @@ const cancelItems = async (payload: any): Promise => { return api({ url: "uploadJsonFile", method: "post", - data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId}, + data: payload.data, headers: payload.headers }); } @@ -39,7 +38,7 @@ const updatePromiseDateItems = async (payload: any): Promise => { return api({ url: "uploadJsonFile", method: "post", - data: {...payload.data, "productStoreId": store.state.user.currentEComStore.productStoreId}, + data: payload.data, headers: payload.headers }); } diff --git a/src/views/orders.vue b/src/views/orders.vue index f85d2297..40716658 100644 --- a/src/views/orders.vue +++ b/src/views/orders.vue @@ -285,6 +285,7 @@ export default defineComponent({ selectedItemsCount: 'order/getSelectedItemsCount', userProfile: 'user/getUserProfile', query: 'order/getQuery', + currentEComStore: 'user/getCurrentEComStore', }), }, async ionViewWillEnter() { @@ -326,6 +327,7 @@ export default defineComponent({ const fileName = "ReleaseItems_" + Date.now() +".json"; formData.append("uploadedFile", blob, fileName); formData.append("configId", "MDM_REL_ORD_ITM_JSON"); + formData.append("param_productStoreId", this.currentEComStore.productStoreId); this.deselectSelectedItems(); return this.store.dispatch("order/releaseItems", { headers: { @@ -346,6 +348,7 @@ export default defineComponent({ const fileName = "CancelItems_" + Date.now() +".json"; formData.append("uploadedFile", blob, fileName); formData.append("configId", "MDM_CAN_ORD_ITM_JSON"); + formData.append("param_productStoreId", this.currentEComStore.productStoreId); this.deselectSelectedItems(); return this.store.dispatch("order/cancelItems", { headers: { diff --git a/src/views/product-details.vue b/src/views/product-details.vue index 5df0ab15..a0fc84b4 100644 --- a/src/views/product-details.vue +++ b/src/views/product-details.vue @@ -447,6 +447,8 @@ export default defineComponent({ const fileName = "ReleaseItems_" + Date.now() +".json"; formData.append("uploadedFile", blob, fileName); formData.append("configId", "MDM_REL_ORD_ITM_JSON"); + formData.append("param_productStoreId", this.currentEComStore.productStoreId); + return this.store.dispatch("order/releaseItems", { headers: { 'Content-Type': 'multipart/form-data;' @@ -475,6 +477,7 @@ export default defineComponent({ const fileName = "CancelItems_" + Date.now() +".json"; formData.append("uploadedFile", blob, fileName); formData.append("configId", "MDM_CAN_ORD_ITM_JSON"); + formData.append("param_productStoreId", this.currentEComStore.productStoreId); return this.store.dispatch("order/cancelItems", { headers: { 'Content-Type': 'multipart/form-data;' diff --git a/src/views/promise-date-modal.vue b/src/views/promise-date-modal.vue index 7582adf0..7dfcf474 100644 --- a/src/views/promise-date-modal.vue +++ b/src/views/promise-date-modal.vue @@ -53,6 +53,7 @@ export default defineComponent({ ...mapGetters({ jobTotal: 'job/getTotal', getSelectedItemsToUpdatePromiseDate: 'order/getSelectedItemsToUpdatePromiseDate', + currentEComStore: 'user/getCurrentEComStore', }), disableUpdate(): boolean { return this.promisedDatetime === '' || (this.item && this.item.promisedDatetime && DateTime.fromFormat(this.item.promisedDatetime, "yyyy-MM-dd hh:mm:ss.SSS").toFormat("yyyy-MM-dd") === this.promisedDatetime); @@ -94,6 +95,7 @@ export default defineComponent({ const fileName = "UpdatePromiseDateItems_" + Date.now() +".json"; formData.append("uploadedFile", blob, fileName); formData.append("configId", "MDM_UPD_ORD_ITM_JSON"); + formData.append("param_productStoreId", this.currentEComStore.productStoreId); return this.store.dispatch("order/updatePromiseDateItems", { headers: { 'Content-Type': 'multipart/form-data;' diff --git a/src/views/warehouse-modal.vue b/src/views/warehouse-modal.vue index 31492143..3a3579b1 100644 --- a/src/views/warehouse-modal.vue +++ b/src/views/warehouse-modal.vue @@ -145,6 +145,7 @@ export default defineComponent({ const fileName = "ReleaseItemsToWarehouse_" + Date.now() +".json"; formData.append("uploadedFile", blob, fileName); formData.append("configId", "MDM_REL_ORD_ITM_JSON"); + formData.append("param_productStoreId", this.currentEComStore.productStoreId); return this.store.dispatch("order/releaseItems", { headers: { 'Content-Type': 'multipart/form-data;'