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 @@
-
-
+
+
+
+
+ {{ parseTime(scope.row.quoteDate, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.totalPrice ? Number(scope.row.totalPrice).toFixed(2) : '0.00' }}
+
+
+
+
+ {{ scope.row.totalBeforeTax ? Number(scope.row.totalBeforeTax).toFixed(2) : '0.00' }}
+
+
+
+
+ {{ scope.row.totalTax ? Number(scope.row.totalTax).toFixed(2) : '0.00' }}
+
+
+
+
+ {{ scope.row.totalIncludingTax ? Number(scope.row.totalIncludingTax).toFixed(2) : '0.00' }}
+
+
+
+
-
-
+
+
-
+
{{ scope.row.amount ? Number(scope.row.amount).toFixed(2) : '0.00' }}
-
-
+
+
{{ scope.row.beforePrice ? Number(scope.row.beforePrice).toFixed(2) : '0.00' }}
-
+
{{ scope.row.taxRate ? Number(scope.row.taxRate).toFixed(2) : '0.00' }}
-
+
{{ scope.row.includingPrice ? Number(scope.row.includingPrice).toFixed(2) : '0.00' }}
-
+
{{ scope.row.subtotal ? Number(scope.row.subtotal).toFixed(2) : '0.00' }}
-
+
@@ -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',
{