add notice bar for HomeTab.vue
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { pendingNoticeEvents } from "@/utils/pendingNoticeEvents";
|
||||
import { axios } from "timi-web-api";
|
||||
import type { PageResult } from "timi-web-api";
|
||||
import type { CustomerEventRankView, EventOptionStat, EventRecord, EventRecordPage, EventRecordPageResult, EventRecordRankPage } from "@/types/EventRecord";
|
||||
import type { Customer } from "@/types/Customer.ts";
|
||||
import { withCurrentStoreId } from "@/utils/store";
|
||||
import { getCurrentStoreId, withCurrentStoreId } from "@/utils/store";
|
||||
|
||||
const BASE_URI = "/gao/event/record";
|
||||
|
||||
@@ -33,9 +34,11 @@ async function update(record: EventRecord): Promise<void> {
|
||||
}
|
||||
|
||||
async function verify(id: string): Promise<void> {
|
||||
const storeId = getCurrentStoreId();
|
||||
await axios.post(`${BASE_URI}/verify`, undefined, {
|
||||
params: { id }
|
||||
});
|
||||
pendingNoticeEvents.emit("changed", storeId);
|
||||
}
|
||||
|
||||
async function remove(id: string): Promise<void> {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { pendingNoticeEvents } from "@/utils/pendingNoticeEvents";
|
||||
import { axios } from "timi-web-api";
|
||||
import { withCurrentStoreId } from "@/utils/store";
|
||||
import { getCurrentStoreId, withCurrentStoreId } from "@/utils/store";
|
||||
import type {
|
||||
FulfillmentActionRequest,
|
||||
FulfillmentPage,
|
||||
@@ -37,10 +38,16 @@ async function quickCreate(request: QuickFulfillmentCreateRequest): Promise<Orde
|
||||
return await axios.post(`${URI}/quick/create`, request);
|
||||
}
|
||||
async function prepareStock(request: FulfillmentPrepareStockRequest): Promise<OrderFulfillment> {
|
||||
return await axios.post(`${URI}/prepare-stock`, request);
|
||||
const storeId = getCurrentStoreId();
|
||||
const result = await axios.post(`${URI}/prepare-stock`, request);
|
||||
pendingNoticeEvents.emit("changed", storeId);
|
||||
return result;
|
||||
}
|
||||
async function verify(request: FulfillmentActionRequest): Promise<OrderFulfillment> {
|
||||
return await axios.post(`${URI}/verify`, request);
|
||||
const storeId = getCurrentStoreId();
|
||||
const result = await axios.post(`${URI}/verify`, request);
|
||||
pendingNoticeEvents.emit("changed", storeId);
|
||||
return result;
|
||||
}
|
||||
async function reject(request: FulfillmentActionRequest): Promise<OrderFulfillment> {
|
||||
return await axios.post(`${URI}/reject`, request);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { pendingNoticeEvents } from "@/utils/pendingNoticeEvents";
|
||||
import { axios } from "timi-web-api";
|
||||
import { withCurrentStoreId } from "@/utils/store";
|
||||
import { getCurrentStoreId, withCurrentStoreId } from "@/utils/store";
|
||||
import type {
|
||||
DirectProductOrderCreateRequest,
|
||||
FundRecord,
|
||||
@@ -45,7 +46,10 @@ async function receivePaymentAndVerify(request: OrderPaymentReceiveRequest): Pro
|
||||
return await axios.post(`${ORDER_URI}/payment/receive-and-verify`, request);
|
||||
}
|
||||
async function verifyPayment(id: string): Promise<FundRecord> {
|
||||
return await axios.post(`${ORDER_URI}/payment/verify`, undefined, { params: { id } });
|
||||
const storeId = getCurrentStoreId();
|
||||
const result = await axios.post(`${ORDER_URI}/payment/verify`, undefined, { params: { id } });
|
||||
pendingNoticeEvents.emit("changed", storeId);
|
||||
return result;
|
||||
}
|
||||
async function rejectPayment(request: OrderPaymentActionRequest): Promise<FundRecord> {
|
||||
return await axios.post(`${ORDER_URI}/payment/reject`, request);
|
||||
|
||||
Reference in New Issue
Block a user