导出功能修改

main
kangwenjing 2026-06-12 16:05:48 +08:00
parent b25d77c63c
commit fec99908ed
1 changed files with 3 additions and 4 deletions

View File

@ -281,10 +281,8 @@ const opportunityExportColumns: OpportunityExportColumn[] = [
{ key: "stage", label: "项目阶段", value: (item) => normalizeOpportunityExportText(item.stage) }, { key: "stage", label: "项目阶段", value: (item) => normalizeOpportunityExportText(item.stage) },
{ key: "confidence", label: "项目把握度", value: (item) => normalizeOpportunityExportText(item.confidence) }, { key: "confidence", label: "项目把握度", value: (item) => normalizeOpportunityExportText(item.confidence) },
{ key: "amount", label: "预计金额(元)", numFmt: "#,##0.00", value: (item) => normalizeOpportunityExportNumber(item.amount) ?? "" }, { key: "amount", label: "预计金额(元)", numFmt: "#,##0.00", value: (item) => normalizeOpportunityExportNumber(item.amount) ?? "" },
{ key: "actualSignedAmount", label: "实际签约金额(元)", numFmt: "#,##0.00", value: (item) => normalizeOpportunityExportNumber(item.actualSignedAmount) ?? "" },
{ key: "date", label: "预计下单时间", value: (item) => normalizeOpportunityExportText(item.date) }, { key: "date", label: "预计下单时间", value: (item) => normalizeOpportunityExportText(item.date) },
{ key: "competitorName", label: "竞争对手", value: (item) => normalizeOpportunityExportText(item.competitorName) }, { key: "competitorName", label: "竞争对手", value: (item) => normalizeOpportunityExportText(item.competitorName) },
{ key: "isPoc", label: "是否POC测试项目", value: (item) => formatOpportunityBoolean(item.isPoc, "是", "否") },
{ key: "latestProgress", label: "项目最新进展", kind: "longText", value: (item) => normalizeOpportunityExportText(item.latestProgress) }, { key: "latestProgress", label: "项目最新进展", kind: "longText", value: (item) => normalizeOpportunityExportText(item.latestProgress) },
{ key: "nextPlan", label: OPPORTUNITY_NEXT_PLAN_LABEL, kind: "longText", value: (item) => normalizeOpportunityExportText(item.nextPlan) }, { key: "nextPlan", label: OPPORTUNITY_NEXT_PLAN_LABEL, kind: "longText", value: (item) => normalizeOpportunityExportText(item.nextPlan) },
{ key: "followUps", label: "跟进记录", kind: "followup", value: (item, relatedSales, relatedChannel) => buildOpportunityFollowUpExportText(item, relatedSales, relatedChannel) }, { key: "followUps", label: "跟进记录", kind: "followup", value: (item, relatedSales, relatedChannel) => buildOpportunityFollowUpExportText(item, relatedSales, relatedChannel) },
@ -304,6 +302,8 @@ const opportunityExportColumns: OpportunityExportColumn[] = [
{ key: "updatedAt", label: "更新修改时间", value: (item) => normalizeOpportunityExportText(item.updatedAt) }, { key: "updatedAt", label: "更新修改时间", value: (item) => normalizeOpportunityExportText(item.updatedAt) },
{ key: "archived", label: "是否签单", value: (item) => formatOpportunityBoolean(item.archived, "已签单", "未签单") }, { key: "archived", label: "是否签单", value: (item) => formatOpportunityBoolean(item.archived, "已签单", "未签单") },
{ key: "pushedToOms", label: "是否推送OMS", value: (item) => formatOpportunityBoolean(item.pushedToOms, "已推送", "未推送") }, { key: "pushedToOms", label: "是否推送OMS", value: (item) => formatOpportunityBoolean(item.pushedToOms, "已推送", "未推送") },
{ key: "actualSignedAmount", label: "实际签约金额(元)", numFmt: "#,##0.00", value: (item) => normalizeOpportunityExportNumber(item.actualSignedAmount) ?? "" },
{ key: "isPoc", label: "是否POC测试项目", value: (item) => formatOpportunityBoolean(item.isPoc, "是", "否") },
]; ];
const defaultOpportunityExportFields: OpportunityExportFieldKey[] = [ const defaultOpportunityExportFields: OpportunityExportFieldKey[] = [
@ -318,13 +318,12 @@ const defaultOpportunityExportFields: OpportunityExportFieldKey[] = [
"stage", "stage",
"confidence", "confidence",
"amount", "amount",
"actualSignedAmount",
"date", "date",
"competitorName", "competitorName",
"isPoc",
"latestProgress", "latestProgress",
"nextPlan", "nextPlan",
"followUps", "followUps",
"isPoc",
]; ];
function resolveSelectedOpportunityFields(selectedFields: OpportunityExportFieldKey[] | undefined) { function resolveSelectedOpportunityFields(selectedFields: OpportunityExportFieldKey[] | undefined) {