feat:【antd】【erp 系统】sale 重构代码风格(处理文案等)

This commit is contained in:
YunaiV
2025-10-04 16:29:36 +08:00
parent a9c9e0f8b2
commit 888a6d9ec8
10 changed files with 26 additions and 23 deletions

View File

@@ -111,7 +111,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
},
{
fieldName: 'items',
label: '产品清单',
label: '销售产品清单',
component: 'Input',
formItemClass: 'col-span-3',
},

View File

@@ -19,13 +19,13 @@ import {
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';
import SaleOrderForm from './modules/form.vue';
import Form from './modules/form.vue';
/** ERP 销售订单列表 */
defineOptions({ name: 'ErpSaleOrder' });
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: SaleOrderForm,
connectedComponent: Form,
destroyOnClose: true,
});

View File

@@ -308,7 +308,7 @@ onMounted(async () => {
class="mt-2 flex justify-center"
:actions="[
{
label: '添加产品',
label: '添加销售产品',
type: 'default',
onClick: handleAdd,
},

View File

@@ -125,7 +125,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
},
{
fieldName: 'items',
label: '产品清单',
label: '出库产品清单',
component: 'Input',
formItemClass: 'col-span-3',
},
@@ -495,6 +495,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
},
];
}
/** 列表的搜索表单 */
export function useOrderGridFormSchema(): VbenFormSchema[] {
return [

View File

@@ -19,13 +19,13 @@ import {
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';
import SaleOutForm from './modules/form.vue';
import Form from './modules/form.vue';
/** ERP 销售出库列表 */
defineOptions({ name: 'ErpSaleOut' });
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: SaleOutForm,
connectedComponent: Form,
destroyOnClose: true,
});

View File

@@ -39,7 +39,7 @@ const emit = defineEmits([
'update:total-price',
]);
const tableData = ref<ErpSaleOutApi.SaleOutItem[]>([]);
const tableData = ref<ErpSaleOutApi.SaleOutItem[]>([]); // 表格数据
const productOptions = ref<any[]>([]); // 产品下拉选项
const warehouseOptions = ref<any[]>([]); // 仓库下拉选项

View File

@@ -72,15 +72,15 @@ const [Grid] = useVbenVxeGrid({
},
});
/** 选择采购订单 */
/** 选择销售订单 */
function handleSelectOrder(selectOrder: ErpSaleOrderApi.SaleOrder) {
order.value = selectOrder;
}
/** 确认选择采购订单 */
/** 确认选择销售订单 */
const handleOk = () => {
if (!order.value) {
message.warning('请选择一个采购订单');
message.warning('请选择一个销售订单');
return;
}
emit('update:order', order.value);

View File

@@ -125,7 +125,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
},
{
fieldName: 'items',
label: '产品清单',
label: '退货产品清单',
component: 'Input',
formItemClass: 'col-span-3',
},
@@ -143,10 +143,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
},
{
fieldName: 'discountPrice',
label: '款优惠',
label: '退款优惠',
component: 'InputNumber',
componentProps: {
placeholder: '付款优惠',
precision: 2,
formatter: erpPriceInputFormatter,
disabled: true,
@@ -241,17 +240,21 @@ export function useFormItemColumns(): VxeTableGridOptions['columns'] {
minWidth: 150,
slots: { default: 'remark' },
},
// TODO @AIformData[0]?.outCount != null
{
field: 'totalCount',
title: '原数量',
title: '已出库',
formatter: 'formatAmount3',
minWidth: 120,
fixed: 'right',
},
// TODO @AIformData[0]?.returnCount != null
{
field: 'returnCount',
title: '已退货数量',
title: '已退货',
formatter: 'formatAmount3',
minWidth: 120,
fixed: 'right',
},
{
field: 'count',
@@ -444,7 +447,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
},
{
field: 'productNames',
title: '产品信息',
title: '退货产品信息',
showOverflow: 'tooltip',
minWidth: 120,
},

View File

@@ -19,13 +19,13 @@ import {
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';
import SaleReturnForm from './modules/form.vue';
import Form from './modules/form.vue';
/** ERP 销售退货列表 */
defineOptions({ name: 'ErpSaleReturn' });
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: SaleReturnForm,
connectedComponent: Form,
destroyOnClose: true,
});

View File

@@ -197,16 +197,15 @@ onMounted(async () => {
<Grid class="w-full">
<template #warehouseId="{ row }">
<Select
v-if="!disabled"
v-model:value="row.warehouseId"
:options="warehouseOptions"
:field-names="{ label: 'name', value: 'id' }"
class="w-full"
placeholder="请选择仓库"
:disabled="disabled"
show-search
class="w-full"
@change="handleWarehouseChange(row)"
/>
<span v-else>{{ row.warehouseName || '-' }}</span>
</template>
<template #productId="{ row }">
<Select
@@ -288,4 +287,4 @@ onMounted(async () => {
</div>
</template>
</Grid>
</template>
</template>