feat(@vben/web-antd): erp-采购订单明细表
- 优化了产品变更、价格计算和表单验证逻辑 - 更新了表格列定义和单元格模板 - 删除了冗余的组件挂载逻辑pull/181/head
parent
7c2c249e5d
commit
f9407ca8bc
|
|
@ -1,15 +1,11 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ErpPurchaseOrderApi } from '#/api/erp/purchase/order';
|
import type { ErpPurchaseOrderApi } from '#/api/erp/purchase/order';
|
||||||
|
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
|
||||||
import {
|
import { erpPriceMultiply } from '@vben/utils';
|
||||||
erpCountInputFormatter,
|
|
||||||
erpPriceInputFormatter,
|
|
||||||
erpPriceMultiply,
|
|
||||||
} from '@vben/utils';
|
|
||||||
|
|
||||||
import { Button, InputNumber, Select, Table, Textarea } from 'ant-design-vue';
|
import { Button, Input, InputNumber, Select, Table } from 'ant-design-vue';
|
||||||
|
|
||||||
import { getProductSimpleList } from '#/api/erp/product/product';
|
import { getProductSimpleList } from '#/api/erp/product/product';
|
||||||
import { getStockCountByProductId } from '#/api/erp/stock/stock';
|
import { getStockCountByProductId } from '#/api/erp/stock/stock';
|
||||||
|
|
@ -19,11 +15,6 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 计算数组总和的工具函数
|
|
||||||
const getSumValue = (values: (number | undefined)[]): number => {
|
|
||||||
return values.reduce((sum, value) => sum + (value || 0), 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
items?: ErpPurchaseOrderApi.PurchaseOrderItem[];
|
items?: ErpPurchaseOrderApi.PurchaseOrderItem[];
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
|
@ -32,7 +23,6 @@ interface Props {
|
||||||
const formData = ref<ErpPurchaseOrderApi.PurchaseOrderItem[]>([]);
|
const formData = ref<ErpPurchaseOrderApi.PurchaseOrderItem[]>([]);
|
||||||
const productList = ref<any[]>([]);
|
const productList = ref<any[]>([]);
|
||||||
|
|
||||||
/** 监听 props.items 变化,重新设置 formData */
|
|
||||||
watch(
|
watch(
|
||||||
() => props.items,
|
() => props.items,
|
||||||
(val) => {
|
(val) => {
|
||||||
|
|
@ -41,39 +31,87 @@ watch(
|
||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
/** 监听 formData 变化,计算相关价格 */
|
// 初始化时加载产品列表
|
||||||
watch(
|
const initProductList = async () => {
|
||||||
formData,
|
if (productList.value.length === 0) {
|
||||||
(val) => {
|
productList.value = await getProductSimpleList();
|
||||||
if (!val) return;
|
}
|
||||||
val.forEach((item) => {
|
};
|
||||||
if (item.productPrice && item.count) {
|
|
||||||
item.totalPrice = erpPriceMultiply(item.productPrice, item.count);
|
// 组件挂载时加载产品列表
|
||||||
item.taxPrice = erpPriceMultiply(
|
initProductList();
|
||||||
item.totalPrice,
|
|
||||||
(item.taxPercent || 0) / 100,
|
const onChangeProduct = async (productId: number, index: number) => {
|
||||||
);
|
const product = productList.value.find((item) => item.id === productId);
|
||||||
item.totalTaxPrice = item.totalPrice + item.taxPrice;
|
if (!product) return;
|
||||||
}
|
|
||||||
});
|
const stockCount = await getStockCountByProductId(productId);
|
||||||
},
|
|
||||||
{ deep: true },
|
const item = formData.value[index];
|
||||||
);
|
if (item) {
|
||||||
|
item.productId = productId;
|
||||||
|
item.productUnitId = product.unitId;
|
||||||
|
item.productBarCode = product.barCode;
|
||||||
|
item.productUnitName = product.unitName;
|
||||||
|
item.productName = product.name;
|
||||||
|
item.stockCount = stockCount || 0;
|
||||||
|
item.productPrice = product.purchasePrice;
|
||||||
|
|
||||||
|
calculatePrice(index);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const calculatePrice = (index: number) => {
|
||||||
|
const item = formData.value[index];
|
||||||
|
if (item && item.productPrice && item.count) {
|
||||||
|
item.totalProductPrice = erpPriceMultiply(item.productPrice, item.count);
|
||||||
|
item.taxPrice = erpPriceMultiply(
|
||||||
|
item.totalProductPrice,
|
||||||
|
(item.taxPercent || 0) / 100,
|
||||||
|
);
|
||||||
|
item.totalPrice = item.totalProductPrice + item.taxPrice;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const onCountChange = (value: null | number, index: number) => {
|
||||||
|
const item = formData.value[index];
|
||||||
|
if (item) {
|
||||||
|
item.count = value || 0;
|
||||||
|
calculatePrice(index);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const onPriceChange = (value: null | number, index: number) => {
|
||||||
|
const item = formData.value[index];
|
||||||
|
if (item) {
|
||||||
|
item.productPrice = value || 0;
|
||||||
|
calculatePrice(index);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const onTaxPercentChange = (value: null | number, index: number) => {
|
||||||
|
const item = formData.value[index];
|
||||||
|
if (item) {
|
||||||
|
item.taxPercent = value || 0;
|
||||||
|
calculatePrice(index);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const onRemarkChange = (value: string, index: number) => {
|
||||||
|
const item = formData.value[index];
|
||||||
|
if (item) {
|
||||||
|
item.remark = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/** 表格列定义 */
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '产品名称',
|
title: '产品名称',
|
||||||
dataIndex: 'productId',
|
dataIndex: 'productName',
|
||||||
key: 'productId',
|
key: 'productName',
|
||||||
width: 200,
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{ title: '库存', dataIndex: 'stockCount', key: 'stockCount', width: 80 },
|
||||||
title: '库存',
|
|
||||||
dataIndex: 'stockCount',
|
|
||||||
key: 'stockCount',
|
|
||||||
width: 80,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '条码',
|
title: '条码',
|
||||||
dataIndex: 'productBarCode',
|
dataIndex: 'productBarCode',
|
||||||
|
|
@ -86,12 +124,7 @@ const columns = [
|
||||||
key: 'productUnitName',
|
key: 'productUnitName',
|
||||||
width: 80,
|
width: 80,
|
||||||
},
|
},
|
||||||
{
|
{ title: '数量', dataIndex: 'count', key: 'count', width: 120 },
|
||||||
title: '数量',
|
|
||||||
dataIndex: 'count',
|
|
||||||
key: 'count',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '产品单价',
|
title: '产品单价',
|
||||||
dataIndex: 'productPrice',
|
dataIndex: 'productPrice',
|
||||||
|
|
@ -100,111 +133,72 @@ const columns = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '金额',
|
title: '金额',
|
||||||
dataIndex: 'totalPrice',
|
dataIndex: 'totalProductPrice',
|
||||||
key: 'totalPrice',
|
key: 'totalProductPrice',
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{ title: '税率(%)', dataIndex: 'taxPercent', key: 'taxPercent', width: 100 },
|
||||||
title: '税率(%)',
|
{ title: '税额', dataIndex: 'taxPrice', key: 'taxPrice', width: 120 },
|
||||||
dataIndex: 'taxPercent',
|
{ title: '税额合计', dataIndex: 'totalPrice', key: 'totalPrice', width: 120 },
|
||||||
key: 'taxPercent',
|
{ title: '备注', dataIndex: 'remark', key: 'remark', width: 150 },
|
||||||
width: 100,
|
{ title: '操作', key: 'operation', width: 120 },
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '税额',
|
|
||||||
dataIndex: 'taxPrice',
|
|
||||||
key: 'taxPrice',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '税额合计',
|
|
||||||
dataIndex: 'totalTaxPrice',
|
|
||||||
key: 'totalTaxPrice',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '备注',
|
|
||||||
dataIndex: 'remark',
|
|
||||||
key: 'remark',
|
|
||||||
width: 150,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
key: 'operation',
|
|
||||||
width: 80,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/** 合计行 */
|
const getSummaries = (): {
|
||||||
const getSummaries = () => {
|
count: number;
|
||||||
const sums: any = {};
|
productName: string;
|
||||||
sums.productId = '合计';
|
taxPrice: number;
|
||||||
sums.count = getSumValue(formData.value.map((item) => item.count));
|
totalPrice: number;
|
||||||
sums.totalPrice = getSumValue(formData.value.map((item) => item.totalPrice));
|
totalProductPrice: number;
|
||||||
sums.taxPrice = getSumValue(formData.value.map((item) => item.taxPrice));
|
} => {
|
||||||
sums.totalTaxPrice = getSumValue(
|
const sums = {
|
||||||
formData.value.map((item) => item.totalTaxPrice),
|
productName: '合计',
|
||||||
);
|
count: formData.value.reduce((sum, item) => sum + (item.count || 0), 0),
|
||||||
|
totalProductPrice: formData.value.reduce(
|
||||||
|
(sum, item) => sum + (item.totalProductPrice || 0),
|
||||||
|
0,
|
||||||
|
),
|
||||||
|
taxPrice: formData.value.reduce(
|
||||||
|
(sum, item) => sum + (item.taxPrice || 0),
|
||||||
|
0,
|
||||||
|
),
|
||||||
|
totalPrice: formData.value.reduce(
|
||||||
|
(sum, item) => sum + (item.totalPrice || 0),
|
||||||
|
0,
|
||||||
|
),
|
||||||
|
};
|
||||||
return sums;
|
return sums;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 新增行 */
|
const handleAdd = async () => {
|
||||||
const handleAdd = () => {
|
await initProductList();
|
||||||
const row = {
|
|
||||||
|
const newItem: ErpPurchaseOrderApi.PurchaseOrderItem = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
|
orderId: undefined,
|
||||||
productId: undefined,
|
productId: undefined,
|
||||||
productUnitId: undefined,
|
productUnitId: undefined,
|
||||||
productPrice: undefined,
|
productPrice: undefined,
|
||||||
count: 1,
|
count: 1,
|
||||||
totalPrice: undefined,
|
totalProductPrice: 0,
|
||||||
taxPercent: 0,
|
taxPercent: 0,
|
||||||
taxPrice: 0,
|
taxPrice: 0,
|
||||||
totalTaxPrice: 0,
|
totalPrice: 0,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
// 显示字段
|
|
||||||
productName: undefined,
|
productName: undefined,
|
||||||
productBarCode: undefined,
|
productBarCode: undefined,
|
||||||
productUnitName: undefined,
|
productUnitName: undefined,
|
||||||
stockCount: 0,
|
stockCount: 0,
|
||||||
};
|
};
|
||||||
formData.value.push(row);
|
|
||||||
|
formData.value.push(newItem);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 删除行 */
|
|
||||||
const handleDelete = (index: number) => {
|
const handleDelete = (index: number) => {
|
||||||
formData.value.splice(index, 1);
|
formData.value.splice(index, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 产品变更 */
|
const validate = async (): Promise<void> => {
|
||||||
const onChangeProduct = async (productId: number, index: number) => {
|
|
||||||
// 获得产品
|
|
||||||
const product = productList.value.find((item) => item.id === productId);
|
|
||||||
if (!product) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 设置产品信息
|
|
||||||
formData.value[index].productUnitId = product.unitId;
|
|
||||||
formData.value[index].productBarCode = product.barCode;
|
|
||||||
formData.value[index].productUnitName = product.unitName;
|
|
||||||
formData.value[index].productPrice = product.purchasePrice;
|
|
||||||
// 加载库存
|
|
||||||
await setStockCount(index);
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 设置库存 */
|
|
||||||
const setStockCount = async (index: number) => {
|
|
||||||
const row = formData.value[index];
|
|
||||||
if (!row.productId) {
|
|
||||||
row.stockCount = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const stockCount = await getStockCountByProductId(row.productId);
|
|
||||||
row.stockCount = stockCount || 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 表单校验 */
|
|
||||||
const validate = async () => {
|
|
||||||
// 校验表单
|
|
||||||
for (let i = 0; i < formData.value.length; i++) {
|
for (let i = 0; i < formData.value.length; i++) {
|
||||||
const item = formData.value[i];
|
const item = formData.value[i];
|
||||||
if (!item.productId) {
|
if (!item.productId) {
|
||||||
|
|
@ -219,30 +213,13 @@ const validate = async () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 获取表单数据 */
|
const getData = (): ErpPurchaseOrderApi.PurchaseOrderItem[] => formData.value;
|
||||||
const getData = () => {
|
const init = (
|
||||||
return formData.value;
|
items: ErpPurchaseOrderApi.PurchaseOrderItem[] | undefined,
|
||||||
};
|
): void => {
|
||||||
|
|
||||||
/** 初始化 */
|
|
||||||
const init = (items: ErpPurchaseOrderApi.PurchaseOrderItem[]) => {
|
|
||||||
formData.value = items || [];
|
formData.value = items || [];
|
||||||
// 如果没有数据,默认添加一行
|
|
||||||
if (formData.value.length === 0) {
|
|
||||||
handleAdd();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 组件挂载时 */
|
|
||||||
onMounted(async () => {
|
|
||||||
// 加载产品列表
|
|
||||||
productList.value = await getProductSimpleList();
|
|
||||||
// 默认添加一行
|
|
||||||
if (formData.value.length === 0) {
|
|
||||||
handleAdd();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
defineExpose({ validate, getData, init });
|
defineExpose({ validate, getData, init });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -263,100 +240,84 @@ defineExpose({ validate, getData, init });
|
||||||
:scroll="{ x: 1400 }"
|
:scroll="{ x: 1400 }"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column, record, index }">
|
<template #bodyCell="{ column, record, index }">
|
||||||
<template v-if="column.dataIndex === 'productId'">
|
<!-- 产品名称 -->
|
||||||
|
<template v-if="column.key === 'productName'">
|
||||||
<Select
|
<Select
|
||||||
|
v-if="!disabled"
|
||||||
v-model:value="record.productId"
|
v-model:value="record.productId"
|
||||||
placeholder="请选择产品"
|
placeholder="请选择产品"
|
||||||
allow-clear
|
|
||||||
show-search
|
show-search
|
||||||
:disabled="disabled"
|
:filter-option="false"
|
||||||
@change="onChangeProduct($event, index)"
|
@change="(value) => onChangeProduct(value, index)"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
>
|
||||||
<Select.Option
|
<Select.Option
|
||||||
v-for="item in productList"
|
v-for="product in productList"
|
||||||
:key="item.id"
|
:key="product.id"
|
||||||
:value="item.id"
|
:value="product.id"
|
||||||
>
|
>
|
||||||
{{ item.name }}
|
{{ product.name }}
|
||||||
</Select.Option>
|
</Select.Option>
|
||||||
</Select>
|
</Select>
|
||||||
|
<span v-else>{{ record.productName || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.dataIndex === 'stockCount'">
|
|
||||||
<span>{{ record.stockCount || 0 }}</span>
|
<!-- 数量 -->
|
||||||
</template>
|
<template v-if="column.key === 'count'">
|
||||||
<template v-else-if="column.dataIndex === 'productBarCode'">
|
|
||||||
<span>{{ record.productBarCode }}</span>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.dataIndex === 'productUnitName'">
|
|
||||||
<span>{{ record.productUnitName }}</span>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.dataIndex === 'count'">
|
|
||||||
<InputNumber
|
<InputNumber
|
||||||
|
v-if="!disabled"
|
||||||
v-model:value="record.count"
|
v-model:value="record.count"
|
||||||
:formatter="erpCountInputFormatter"
|
|
||||||
placeholder="请输入数量"
|
|
||||||
:disabled="disabled"
|
|
||||||
:min="1"
|
|
||||||
class="w-full"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.dataIndex === 'productPrice'">
|
|
||||||
<InputNumber
|
|
||||||
v-model:value="record.productPrice"
|
|
||||||
:formatter="erpPriceInputFormatter"
|
|
||||||
placeholder="请输入单价"
|
|
||||||
:disabled="disabled"
|
|
||||||
:min="0"
|
:min="0"
|
||||||
|
:precision="2"
|
||||||
|
@change="(value: number | null) => onCountChange(value, index)"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
/>
|
/>
|
||||||
|
<span v-else>{{ record.count || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.dataIndex === 'totalPrice'">
|
|
||||||
|
<!-- 产品单价 -->
|
||||||
|
<template v-if="column.key === 'productPrice'">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
v-model:value="record.totalPrice"
|
v-if="!disabled"
|
||||||
:formatter="erpPriceInputFormatter"
|
v-model:value="record.productPrice"
|
||||||
placeholder="金额"
|
:min="0"
|
||||||
:disabled="true"
|
:precision="2"
|
||||||
|
@change="(value: number | null) => onPriceChange(value, index)"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
/>
|
/>
|
||||||
|
<span v-else>{{ record.productPrice || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.dataIndex === 'taxPercent'">
|
|
||||||
|
<!-- 税率 -->
|
||||||
|
<template v-if="column.key === 'taxPercent'">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
|
v-if="!disabled"
|
||||||
v-model:value="record.taxPercent"
|
v-model:value="record.taxPercent"
|
||||||
placeholder="请输入税率"
|
|
||||||
:disabled="disabled"
|
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="100"
|
:max="100"
|
||||||
|
:precision="2"
|
||||||
|
@change="(value: number | null) => onTaxPercentChange(value, index)"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
/>
|
/>
|
||||||
|
<span v-else>{{ record.taxPercent || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.dataIndex === 'taxPrice'">
|
|
||||||
<InputNumber
|
<!-- 备注 -->
|
||||||
v-model:value="record.taxPrice"
|
<template v-if="column.key === 'remark'">
|
||||||
:formatter="erpPriceInputFormatter"
|
<Input
|
||||||
placeholder="税额"
|
v-if="!disabled"
|
||||||
:disabled="true"
|
|
||||||
class="w-full"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.dataIndex === 'totalTaxPrice'">
|
|
||||||
<InputNumber
|
|
||||||
v-model:value="record.totalTaxPrice"
|
|
||||||
:formatter="erpPriceInputFormatter"
|
|
||||||
placeholder="税额合计"
|
|
||||||
:disabled="true"
|
|
||||||
class="w-full"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.dataIndex === 'remark'">
|
|
||||||
<Textarea
|
|
||||||
v-model:value="record.remark"
|
v-model:value="record.remark"
|
||||||
placeholder="请输入备注"
|
@change="
|
||||||
:disabled="disabled"
|
(e: Event) =>
|
||||||
:rows="1"
|
onRemarkChange((e.target as HTMLInputElement).value, index)
|
||||||
|
"
|
||||||
|
class="w-full"
|
||||||
/>
|
/>
|
||||||
|
<span v-else>{{ record.remark || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'operation'">
|
|
||||||
|
<!-- 操作 -->
|
||||||
|
<template v-if="column.key === 'operation'">
|
||||||
<Button
|
<Button
|
||||||
v-if="!disabled"
|
v-if="!disabled"
|
||||||
type="link"
|
type="link"
|
||||||
|
|
@ -376,9 +337,9 @@ defineExpose({ validate, getData, init });
|
||||||
<span class="font-medium">合计:</span>
|
<span class="font-medium">合计:</span>
|
||||||
<div class="flex space-x-4">
|
<div class="flex space-x-4">
|
||||||
<span>数量:{{ getSummaries().count }}</span>
|
<span>数量:{{ getSummaries().count }}</span>
|
||||||
<span>金额:{{ getSummaries().totalPrice }}</span>
|
<span>金额:{{ getSummaries().totalProductPrice }}</span>
|
||||||
<span>税额:{{ getSummaries().taxPrice }}</span>
|
<span>税额:{{ getSummaries().taxPrice }}</span>
|
||||||
<span>税额合计:{{ getSummaries().totalTaxPrice }}</span>
|
<span>税额合计:{{ getSummaries().totalPrice }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -129,11 +129,19 @@ defineExpose({ modalApi });
|
||||||
>
|
>
|
||||||
<Form />
|
<Form />
|
||||||
|
|
||||||
<!-- 子表的表单 -->
|
<!-- Tab卡片 -->
|
||||||
<PurchaseOrderItemForm
|
<div class="mt-4 rounded-lg border border-gray-200 p-2">
|
||||||
ref="itemFormRef"
|
<a-tabs default-active-key="1">
|
||||||
:items="formData?.items || []"
|
<a-tab-pane key="1" tab="订单产品清单">
|
||||||
:disabled="formType === 'detail'"
|
<div class="p-4">
|
||||||
/>
|
<PurchaseOrderItemForm
|
||||||
|
ref="itemFormRef"
|
||||||
|
:items="formData?.items || []"
|
||||||
|
:disabled="formType === 'detail'"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</a-tab-pane>
|
||||||
|
</a-tabs>
|
||||||
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue