review:【erp 系统】purchase/order 的管理

pull/191/head^2
YunaiV 2025-08-04 22:42:59 +08:00
parent 9a305e6cbd
commit 6d99bf3a46
5 changed files with 17 additions and 1 deletions

View File

@ -32,6 +32,7 @@ const props = withDefaults(defineProps<Props>(), {
});
/** 概览数据 */
// TODO @nehc 8 4
const overviewItems = computed<AnalysisOverviewItem[]>(() => [
{
icon: SvgCardIcon,

View File

@ -35,6 +35,7 @@ function onRefresh() {
gridApi.query();
}
// TODO @nehc handleRowCheckboxChange
const checkedIds = ref<number[]>([]);
function handleRowCheckboxChange({
records,
@ -81,6 +82,7 @@ async function handleDelete(row: ErpPurchaseOrderApi.PurchaseOrder) {
}
/** 批量删除 */
// TODO @nehc handleBatchDelete
async function handleBatchDelete() {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting'),
@ -106,6 +108,7 @@ function handleUpdateStatus(
row: ErpPurchaseOrderApi.PurchaseOrder,
status: number,
) {
// TODO @nehc status
const hideLoading = message.loading({
content: `确定${status === 20 ? '审批' : '反审批'}该订单吗?`,
duration: 0,

View File

@ -1,4 +1,5 @@
<script lang="ts" setup>
// TODO @nehc erp
import type { ErpPurchaseOrderApi } from '#/api/erp/purchase/order';
import { nextTick, onMounted, ref, watch } from 'vue';
@ -25,6 +26,7 @@ const emit = defineEmits([
'update:total-price',
]);
// TODO @nehc:
interface Props {
items?: ErpPurchaseOrderApi.PurchaseOrderItem[];
disabled?: boolean;
@ -70,6 +72,7 @@ watch(
await nextTick();
tableData.value = [...items];
await nextTick();
// TODO @nehc await
gridApi.grid.reloadData(tableData.value);
},
{
@ -92,6 +95,7 @@ watch(
props.discountPercent === null
? 0
: erpPriceMultiply(totalPrice, props.discountPercent / 100);
// TODO @nehc idea
const finalTotalPrice = totalPrice - discountPrice;
//
@ -122,6 +126,7 @@ function handleAdd() {
stockCount: 0,
remark: '',
};
// TODO @nehc
tableData.value.push(newRow);
gridApi.grid.insertAt(newRow, -1);
emit('update:items', [...tableData.value]);

View File

@ -71,6 +71,7 @@ const handleUpdateTotalPrice = (totalPrice: number) => {
}
};
// TODO @nehc使 /** */
/**
* 创建或更新采购订单
*/
@ -82,6 +83,7 @@ const [Modal, modalApi] = useVbenModal({
}
await nextTick();
// TODO @nehc
const itemFormInstance = Array.isArray(itemFormRef.value)
? itemFormRef.value[0]
: itemFormRef.value;
@ -93,6 +95,7 @@ const [Modal, modalApi] = useVbenModal({
return;
}
} catch (error) {
// TODO @nehc
message.error(error.message || '子表单验证失败');
return;
}
@ -144,6 +147,7 @@ const [Modal, modalApi] = useVbenModal({
//
formData.value = { items: [] } as ErpPurchaseOrderApi.PurchaseOrder;
await nextTick();
// TODO @nehc
const itemFormInstance = Array.isArray(itemFormRef.value)
? itemFormRef.value[0]
: itemFormRef.value;
@ -156,7 +160,9 @@ const [Modal, modalApi] = useVbenModal({
modalApi.lock();
try {
formData.value = await getPurchaseOrder(data.id);
// URLFileUpload
// URL FileUpload
// TODO @nehc idea
// TODO @nehc
if (
formData.value.fileUrl &&
typeof formData.value.fileUrl === 'string'

View File

@ -1,4 +1,5 @@
<script lang="ts" setup>
// TODO @nehc
import type { ErpStockInApi } from '#/api/erp/stock/in';
import { nextTick, onMounted, ref, watch } from 'vue';