add refund
This commit is contained in:
@@ -49,12 +49,15 @@
|
||||
:can-receive="canReceive"
|
||||
:can-fulfill="canCreateFulfillment"
|
||||
:can-cancel="canCancel"
|
||||
:can-refund="canRefund"
|
||||
:can-store-manager="canStoreManager"
|
||||
v-entrance-transition="index * 30"
|
||||
@click="toDetail(item)"
|
||||
@cancel="toCancel(item)"
|
||||
@receive="toPayment(item)"
|
||||
@fulfill="toFulfillment(item)"
|
||||
@refund="toRefund(item)"
|
||||
@confirm-no-refund="toNoRefund(item)"
|
||||
/>
|
||||
</div>
|
||||
<div v-else class="center-tips" v-text="loading ? '正在加载销售订单' : '暂无销售订单'" />
|
||||
@@ -87,6 +90,7 @@ const canCreatePackageOrder = computed(() => userStore.hasPermissions(permission
|
||||
const canReceive = computed(() => userStore.hasPermissions(permissionCodes.fundReceive.create));
|
||||
const canCreateFulfillment = computed(() => userStore.hasPermissions(permissionCodes.orderFulfillment.create));
|
||||
const canCancel = computed(() => userStore.hasPermissions(permissionCodes.salesOrder.cancel));
|
||||
const canRefund = computed(() => userStore.hasPermissions(permissionCodes.fund.refund));
|
||||
const canStoreManager = computed(() => userStore.hasRoles(gaoRoleCodes.storeManager));
|
||||
const actions = computed(() => [
|
||||
...(canCreate.value ? [{
|
||||
@@ -234,6 +238,14 @@ async function toCancel(item: SalesOrder): Promise<void> {
|
||||
if (item.id) await router.push(`/management/sales-orders/${item.id}/cancel`);
|
||||
}
|
||||
|
||||
async function toRefund(item: SalesOrder): Promise<void> {
|
||||
if (item.id) await router.push(`/management/sales-orders/${item.id}/refund`);
|
||||
}
|
||||
|
||||
async function toNoRefund(item: SalesOrder): Promise<void> {
|
||||
if (item.id) await router.push(`/management/sales-orders/${item.id}/no-refund`);
|
||||
}
|
||||
|
||||
async function toFulfillment(item: SalesOrder): Promise<void> {
|
||||
if (item.id) await router.push({ path: "/management/order-fulfillments/create", query: { salesOrderId: item.id } });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user