From 010f5e5fcd93fcc32d407d6610119eb8a5b80dc5 Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Fri, 20 Mar 2026 11:02:27 +0800 Subject: [PATCH] =?UTF-8?q?change(CrmQuoteMaterial):=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E6=8A=A5=E4=BB=B7=E5=8D=95=E7=89=A9=E6=96=99=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E5=AD=90=E8=A1=A8=E7=9A=84=E6=9F=A5=E8=AF=A2=E4=B8=8E=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/oa/crm/crmQuoteMaterial/types.ts | 80 ++++++++++++ src/views/oa/crm/crmQuoteMaterial/index.vue | 131 +++++++++++++++----- 2 files changed, 181 insertions(+), 30 deletions(-) diff --git a/src/api/oa/crm/crmQuoteMaterial/types.ts b/src/api/oa/crm/crmQuoteMaterial/types.ts index 8c5bad8..9205cec 100644 --- a/src/api/oa/crm/crmQuoteMaterial/types.ts +++ b/src/api/oa/crm/crmQuoteMaterial/types.ts @@ -9,6 +9,76 @@ export interface CrmQuoteMaterialVO { */ quoteId: string | number; + /** + * 报价单号 + */ + quoteCode: string; + + /** + * 报价单名称 + */ + quoteName: string; + + /** + * 报价轮次 + */ + quoteRound: number; + + /** + * 报价日期 + */ + quoteDate: string; + + /** + * 报价类型 + */ + quoteType: string; + + /** + * 业务方向 + */ + businessDirection: string; + + /** + * 报价单状态 + */ + quoteStatus: string; + + /** + * 付款方式 + */ + paymentMethod: string; + + /** + * 币种 + */ + currencyType: string; + + /** + * 含税信息 + */ + taxIncludedInfo: string; + + /** + * 总报价 + */ + totalPrice: number; + + /** + * 未税总价 + */ + totalBeforeTax: number; + + /** + * 税额 + */ + totalTax: number; + + /** + * 含税总价 + */ + totalIncludingTax: number; + /** * 序号(ERP风格) */ @@ -203,6 +273,16 @@ export interface CrmQuoteMaterialForm extends BaseEntity { } export interface CrmQuoteMaterialQuery extends PageQuery { + /** + * 报价单号 + */ + quoteCode?: string; + + /** + * 报价单名称 + */ + quoteName?: string; + /** * 标准物料标识(1标准物料 2非标物料) */ diff --git a/src/views/oa/crm/crmQuoteMaterial/index.vue b/src/views/oa/crm/crmQuoteMaterial/index.vue index 35fd2a3..370a98e 100644 --- a/src/views/oa/crm/crmQuoteMaterial/index.vue +++ b/src/views/oa/crm/crmQuoteMaterial/index.vue @@ -5,8 +5,11 @@
- - + + + + + @@ -43,53 +46,96 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - + + - + - + - + - + @@ -104,6 +150,7 @@ import { CrmQuoteMaterialQuery, CrmQuoteMaterialVO } from '@/api/oa/crm/crmQuote const { proxy } = getCurrentInstance() as ComponentInternalInstance; const route = useRoute(); +const { quote_status, payment_method, currency_type } = toRefs(proxy?.useDict('quote_status', 'payment_method', 'currency_type')); const crmQuoteMaterialList = ref([]); const loading = ref(true); @@ -116,35 +163,56 @@ const detailQuoteId = computed(() => route.query.quoteId as string | undefined); const detailQuoteTitle = computed(() => { const quoteCode = route.query.quoteCode as string | undefined; const quoteName = route.query.quoteName as string | undefined; + // 从报价主表按上下文跳进来时,优先展示业务可识别的单号/名称; + // 不回退展示 quoteId,是为了避免把技术字段暴露给业务用户。 if (quoteCode && quoteName) { return `当前查看报价明细:${quoteCode} / ${quoteName}`; } if (quoteCode) { return `当前查看报价明细:${quoteCode}`; } - return `当前查看报价明细,报价ID:${detailQuoteId.value}`; + return '当前按指定报价单查看明细'; }); const columns = ref([ - { key: 0, label: `序号`, visible: true }, - { key: 1, label: `产品名称`, visible: true }, - { key: 2, label: `规格描述`, visible: true }, - { key: 3, label: `物料编号`, visible: true }, - { key: 4, label: `SAP物料名称`, visible: true }, - { key: 5, label: `销售物料名称`, visible: true }, - { key: 6, label: `数量`, visible: true }, - { key: 7, label: `单位`, visible: true }, - { key: 8, label: `未税单价`, visible: true }, - { key: 9, label: `税率(%)`, visible: true }, - { key: 10, label: `含税单价`, visible: true }, - { key: 11, label: `小计`, visible: true }, - { key: 12, label: `备注`, visible: true } + // 列顺序按“先主表概览、后明细行项目”组织: + // 业务人员在明细页先看整单背景,再看物料行,认知负担更低。 + { key: 0, label: `报价单号`, visible: true }, + { key: 1, label: `报价单名称`, visible: true }, + // 下面三个字段按你的要求隐藏;保留在列配置中只是为了不打乱既有 right-toolbar 键位顺序。 + { key: 2, label: `报价轮次`, visible: false }, + { key: 3, label: `报价日期`, visible: true }, + { key: 4, label: `报价类型`, visible: false }, + { key: 5, label: `业务方向`, visible: false }, + { key: 6, label: `报价单状态`, visible: true }, + { key: 7, label: `付款方式`, visible: true }, + { key: 8, label: `币种`, visible: true }, + { key: 9, label: `含税信息`, visible: true }, + { key: 10, label: `总报价`, visible: true }, + { key: 11, label: `未税总价`, visible: true }, + { key: 12, label: `税额`, visible: true }, + { key: 13, label: `含税总价`, visible: true }, + { key: 14, label: `序号`, visible: true }, + { key: 15, label: `产品名称`, visible: true }, + { key: 16, label: `规格描述`, visible: true }, + { key: 17, label: `物料编号`, visible: true }, + { key: 18, label: `SAP物料名称`, visible: true }, + { key: 19, label: `销售物料名称`, visible: true }, + { key: 20, label: `数量`, visible: true }, + { key: 21, label: `单位`, visible: true }, + { key: 22, label: `未税单价`, visible: true }, + { key: 23, label: `税率(%)`, visible: true }, + { key: 24, label: `含税单价`, visible: true }, + { key: 25, label: `小计`, visible: true }, + { key: 26, label: `备注`, visible: true } ]); const initQueryParams: CrmQuoteMaterialQuery = { pageNum: 1, pageSize: 10, quoteId: undefined, + quoteCode: undefined, + quoteName: undefined, itemNo: undefined, productName: undefined, materialCode: undefined, @@ -183,7 +251,8 @@ const handleQuery = () => { }; const resetQuery = () => { - // 明细页重置后仍保持当前报价上下文,避免用户误切到全量明细列表。 + // 明细页重置后仍保持当前报价上下文: + // 否则用户从某张报价单点进来后点“重置”,会突然看到全量明细,业务上非常容易误判数据归属。 Object.assign(queryParams, { ...initQueryParams, quoteId: detailQuoteId.value @@ -193,6 +262,8 @@ const resetQuery = () => { }; const handleExport = () => { + // 导出直接复用当前查询条件,确保“页面看到什么口径,导出就是什么口径”。 + // 这样业务筛过报价单号/产品名称后,导出的 Excel 不会出现与页面结果不一致的问题。 proxy?.download( 'oa/crm/crmQuoteMaterial/export', {