feat:【ele】【erp】finance/payment 的迁移(80%)

This commit is contained in:
YunaiV
2025-11-16 11:15:49 +08:00
parent 982fe3b964
commit 268a2d5504
12 changed files with 23 additions and 14 deletions

View File

@@ -12,4 +12,5 @@ export const ACTION_ICON = {
COPY: 'lucide:copy',
CLOSE: 'lucide:x',
BOOK: 'lucide:book',
AUDIT: 'lucide:file-check',
};

View File

@@ -385,7 +385,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
},
{
title: '操作',
width: 220,
width: 260,
fixed: 'right',
slots: { default: 'actions' },
},

View File

@@ -196,6 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
{
label: row.status === 10 ? '审批' : '反审批',
type: 'link',
icon: ACTION_ICON.AUDIT,
auth: ['erp:finance-payment:update-status'],
popConfirm: {
title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`,
@@ -210,7 +211,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
label: $t('common.delete'),
type: 'link',
danger: true,
color: 'error',
icon: ACTION_ICON.DELETE,
auth: ['erp:finance-payment:delete'],
popConfirm: {
title: $t('ui.actionMessage.deleteConfirm', [row.no]),

View File

@@ -187,6 +187,7 @@ const [Modal, modalApi] = useVbenModal({
@update:items="handleUpdateItems"
@update:total-price="handleUpdateTotalPrice"
@update:payment-price="handleUpdatePaymentPrice"
class="w-full"
/>
</template>
</Form>

View File

@@ -15,7 +15,7 @@ const emit = defineEmits<{
success: [rows: ErpPurchaseInApi.PurchaseIn[]];
}>();
const supplierId = ref<number>(); // 供应商ID
const supplierId = ref<number>(); // 供应商 ID
const open = ref<boolean>(false); // 弹窗是否打开
const selectedRows = ref<ErpPurchaseInApi.PurchaseIn[]>([]); // 选中的行

View File

@@ -15,7 +15,7 @@ const emit = defineEmits<{
success: [rows: ErpPurchaseReturnApi.PurchaseReturn[]];
}>();
const supplierId = ref<number>(); // 供应商ID
const supplierId = ref<number>(); // 供应商 ID
const open = ref<boolean>(false); // 弹窗是否打开
const selectedRows = ref<ErpPurchaseReturnApi.PurchaseReturn[]>([]); // 选中的行

View File

@@ -11,4 +11,5 @@ export const ACTION_ICON = {
VIEW: 'lucide:eye',
COPY: 'lucide:copy',
BOOK: 'lucide:book',
AUDIT: 'lucide:file-check',
};

View File

@@ -40,6 +40,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
class: '!w-full',
},
rules: 'required',
},
@@ -391,7 +392,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
},
{
title: '操作',
width: 220,
width: 260,
fixed: 'right',
slots: { default: 'actions' },
},

View File

@@ -196,6 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
label: row.status === 10 ? '审批' : '反审批',
type: 'primary',
link: true,
icon: ACTION_ICON.AUDIT,
auth: ['erp:finance-payment:update-status'],
popConfirm: {
title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`,
@@ -210,7 +211,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
label: $t('common.delete'),
type: 'danger',
link: true,
color: 'error',
icon: ACTION_ICON.DELETE,
auth: ['erp:finance-payment:delete'],
popConfirm: {
title: $t('ui.actionMessage.deleteConfirm', [row.no]),

View File

@@ -187,6 +187,7 @@ const [Modal, modalApi] = useVbenModal({
@update:items="handleUpdateItems"
@update:total-price="handleUpdateTotalPrice"
@update:payment-price="handleUpdatePaymentPrice"
class="w-full"
/>
</template>
</Form>

View File

@@ -4,7 +4,7 @@ import type { ErpPurchaseInApi } from '#/api/erp/purchase/in';
import { ref } from 'vue';
import { ElDialog, ElMessage } from 'element-plus';
import { ElButton, ElDialog, ElMessage } from 'element-plus';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getPurchaseInPage } from '#/api/erp/purchase/in';
@@ -15,7 +15,7 @@ const emit = defineEmits<{
success: [rows: ErpPurchaseInApi.PurchaseIn[]];
}>();
const supplierId = ref<number>(); // 供应商ID
const supplierId = ref<number>(); // 供应商 ID
const open = ref<boolean>(false); // 弹窗是否打开
const selectedRows = ref<ErpPurchaseInApi.PurchaseIn[]>([]); // 选中的行
@@ -99,14 +99,15 @@ defineExpose({ open: openModal });
v-model="open"
title="选择采购入库单"
@confirm="handleOk"
:append-to-body="true"
>
<Grid
class="max-h-[600px]"
table-title="采购入库单列表(仅展示可付款的单据)"
/>
<template #footer>
<el-button @click="open = false">取消</el-button>
<el-button type="primary" @click="handleOk">确定</el-button>
<ElButton @click="open = false">取消</ElButton>
<ElButton type="primary" @click="handleOk">确定</ElButton>
</template>
</ElDialog>
</template>

View File

@@ -4,7 +4,7 @@ import type { ErpPurchaseReturnApi } from '#/api/erp/purchase/return';
import { ref } from 'vue';
import { ElDialog, ElMessage } from 'element-plus';
import { ElButton, ElDialog, ElMessage } from 'element-plus';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getPurchaseReturnPage } from '#/api/erp/purchase/return';
@@ -15,7 +15,7 @@ const emit = defineEmits<{
success: [rows: ErpPurchaseReturnApi.PurchaseReturn[]];
}>();
const supplierId = ref<number>(); // 供应商ID
const supplierId = ref<number>(); // 供应商 ID
const open = ref<boolean>(false); // 弹窗是否打开
const selectedRows = ref<ErpPurchaseReturnApi.PurchaseReturn[]>([]); // 选中的行
@@ -103,14 +103,15 @@ defineExpose({ open: openModal });
v-model="open"
title="选择采购退货单"
@confirm="handleOk"
:append-to-body="true"
>
<Grid
class="max-h-[600px]"
table-title="采购退货单列表(仅展示需退款的单据)"
/>
<template #footer>
<el-button @click="open = false">取消</el-button>
<el-button type="primary" @click="handleOk">确定</el-button>
<ElButton @click="open = false">取消</ElButton>
<ElButton type="primary" @click="handleOk">确定</ElButton>
</template>
</ElDialog>
</template>