From 2c5ae95157789ddcb7111abfbf268ad896aa03bb Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Tue, 28 Oct 2025 16:59:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(oa/crm=E3=80=81router):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=8A=A5=E4=BB=B7=E5=8D=95=E4=BF=A1=E6=81=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=92=8C=E5=8D=95=E7=8B=AC=E7=BC=96=E8=BE=91=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 注册路由并配置动态导入以支持页面访问 - 创建报价单基本信息表单,包含编号、名称、日期等字段 - 实现客户方与供货方信息分区布局及联系人选择联动 - 添加附件上传与备注信息独立分区- 开发报价明细表格,支持物料选择与价格计算- 集成API接口用于报价单的增删改查操作 - 实现表单验证规则与数据回填逻辑 - 提供含税与未税价格自动计算功能 - 支持报价单编号自动生成机制- 构建物料行项目管理功能,包括新增、删除与小计统计- 添加页面返回与保存操作按钮交互逻辑 - 设计附件上传对话框与相关状态控制 - 实现税率与价格联动计算逻辑 - 优化表单布局与样式以提升用户体验 --- src/api/oa/crm/crmQuoteInfo/index.ts | 98 +++ src/api/oa/crm/crmQuoteInfo/types.ts | 560 +++++++++++++++ src/api/oa/crm/crmQuoteMaterial/index.ts | 76 +++ src/api/oa/crm/crmQuoteMaterial/types.ts | 246 +++++++ src/router/index.ts | 12 + src/views/oa/crm/crmQuoteInfo/edit.vue | 610 +++++++++++++++++ src/views/oa/crm/crmQuoteInfo/index.vue | 720 ++++++++++++++++++++ src/views/oa/crm/crmQuoteMaterial/index.vue | 373 ++++++++++ 8 files changed, 2695 insertions(+) create mode 100644 src/api/oa/crm/crmQuoteInfo/index.ts create mode 100644 src/api/oa/crm/crmQuoteInfo/types.ts create mode 100644 src/api/oa/crm/crmQuoteMaterial/index.ts create mode 100644 src/api/oa/crm/crmQuoteMaterial/types.ts create mode 100644 src/views/oa/crm/crmQuoteInfo/edit.vue create mode 100644 src/views/oa/crm/crmQuoteInfo/index.vue create mode 100644 src/views/oa/crm/crmQuoteMaterial/index.vue diff --git a/src/api/oa/crm/crmQuoteInfo/index.ts b/src/api/oa/crm/crmQuoteInfo/index.ts new file mode 100644 index 0000000..6a73639 --- /dev/null +++ b/src/api/oa/crm/crmQuoteInfo/index.ts @@ -0,0 +1,98 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { CrmQuoteInfoVO, CrmQuoteInfoForm, CrmQuoteInfoQuery } from '@/api/oa/crm/crmQuoteInfo/types'; + +/** + * 查询报价单信息列表 + * @param query + * @returns {*} + */ + +export const listCrmQuoteInfo = (query?: CrmQuoteInfoQuery): AxiosPromise => { + return request({ + url: '/oa/crm/crmQuoteInfo/list', + method: 'get', + params: query + }); +}; + +/** + * 查询报价单信息详细 + * @param quoteId + */ +export const getCrmQuoteInfo = (quoteId: string | number): AxiosPromise => { + return request({ + url: '/oa/crm/crmQuoteInfo/' + quoteId, + method: 'get' + }); +}; + +/** + * 新增报价单信息 + * @param data + */ +export const addCrmQuoteInfo = (data: CrmQuoteInfoForm) => { + return request({ + url: '/oa/crm/crmQuoteInfo', + method: 'post', + data: data + }); +}; + +/** + * 修改报价单信息 + * @param data + */ +export const updateCrmQuoteInfo = (data: CrmQuoteInfoForm) => { + return request({ + url: '/oa/crm/crmQuoteInfo', + method: 'put', + data: data + }); +}; + +/** + * 删除报价单信息 + * @param quoteId + */ +export const delCrmQuoteInfo = (quoteId: string | number | Array) => { + return request({ + url: '/oa/crm/crmQuoteInfo/' + quoteId, + method: 'delete' + }); +}; + +/** + * 下拉框查询报价单信息列表 + * @param query + * @returns {*} + */ +export function getCrmQuoteInfoList (query) { + return request({ + url: '/oa/crm/crmQuoteInfo/getCrmQuoteInfoList', + method: 'get', + params: query + }); +}; + +/** + * 查看同一次的多轮报价集合 + * @param quoteId + */ +export const listQuoteRounds = (quoteId: string | number): AxiosPromise => { + return request({ + url: '/oa/crm/crmQuoteInfo/rounds/' + quoteId, + method: 'get' + }); +}; + +/** + * 根据报价明细回写主表金额汇总 + * @param quoteId + */ +export const recalcQuoteTotals = (quoteId: string | number): AxiosPromise => { + return request({ + url: '/oa/crm/crmQuoteInfo/recalc/' + quoteId, + method: 'post' + }); +}; diff --git a/src/api/oa/crm/crmQuoteInfo/types.ts b/src/api/oa/crm/crmQuoteInfo/types.ts new file mode 100644 index 0000000..b85bf92 --- /dev/null +++ b/src/api/oa/crm/crmQuoteInfo/types.ts @@ -0,0 +1,560 @@ +export interface CrmQuoteInfoVO { + /** + * 报价ID + */ + quoteId: string | number; + + /** + * 报价单号 + */ + quoteCode: string; + + /** + * 报价单名称 + */ + quoteName: string; + + /** + * 报价轮次 + */ + quoteRound: number; + + /** + * 报价大类(1橡机板块 2非橡机板块) + */ + quoteCategory: string; + + /** + * 报价类型(1对内 2对外) + */ + quoteType: string; + + /** + * 业务方向(1智能轮胎 2轮胎工厂 3快递物流 4锂电 5工业软件 6智能制造 7新行业及零售) + */ + businessDirection: string; + + /** + * 部门 + */ + quoteDeptId: string | number; + + /** + * 报价日期 + */ + quoteDate: string; + + /** + * 报价有效期起 + */ + validFrom: string | number; + + /** + * 报价有效期(天) + */ + validDays: string | number; + + /** + * 报价有效期止 + */ + validTo: string | number; + + /** + * 交货期(天) + */ + deliveryPeriod: number; + + /** + * 交付/交货方式 + */ + deliveryMethod: string; + + /** + * 付款方式(1电汇 2承兑) + */ + paymentMethod: string; + + /** + * 币种(字典类型) + */ + currencyType: string; + + /** + * 含税信息(如:含13%增值税) + */ + taxIncludedInfo: string; + + /** + * 税率(默认按明细可覆盖) + */ + taxRate: number; + + /** + * 总报价 + */ + totalPrice: number; + + /** + * 未税总价 + */ + totalBeforeTax: number; + + /** + * 税额 + */ + totalTax: number; + + /** + * 含税总价 + */ + totalIncludingTax: number; + + /** + * 客户方联系人ID + */ + customerContactId: string | number; + + /** + * 客户方联系人 + */ + customerContactName: string; + + /** + * 客户方联系电话 + */ + customerContactPhone: string; + + /** + * 客户方电子邮箱 + */ + customerContactEmail: string; + + /** + * 供货方联系人ID + */ + supplierContactId: string | number; + + /** + * 供货方联系人 + */ + supplierContactName: string; + + /** + * 供货方联系电话 + */ + supplierContactPhone: string; + + /** + * 供货方电子邮箱 + */ + supplierContactEmail: string; + + /** + * 项目ID(可选) + */ + projectId: string | number; + + /** + * 打印模板ID(可选) + */ + templateId: string | number; + + /** + * 附件ID + */ + ossId: string | number; + + /** + * 报价单状态(1暂存 2审批中 3可用) + */ + quoteStatus: string; + + /** + * 流程状态 + */ + flowStatus: string; + + /** + * 备注 + */ + remark: string; + + /** + * 报价单子表-物料明细 + */ + itemsVo?: CrmQuoteMaterialVO[]; + +} + +export interface CrmQuoteInfoForm extends BaseEntity { + /** + * 报价ID + */ + quoteId?: string | number; + + /** + * 报价单号 + */ + quoteCode?: string; + + /** + * 报价单名称 + */ + quoteName?: string; + + /** + * 报价轮次 + */ + quoteRound?: number; + + /** + * 报价大类(1橡机板块 2非橡机板块) + */ + quoteCategory?: string; + + /** + * 报价类型(1对内 2对外) + */ + quoteType?: string; + + /** + * 业务方向(1智能轮胎 2轮胎工厂 3快递物流 4锂电 5工业软件 6智能制造 7新行业及零售) + */ + businessDirection?: string; + + /** + * 部门 + */ + quoteDeptId?: string | number; + + /** + * 报价日期 + */ + quoteDate?: string; + + /** + * 报价有效期起 + */ + validFrom?: string | number; + + /** + * 报价有效期(天) + */ + validDays?: string | number; + + /** + * 报价有效期止 + */ + validTo?: string | number; + + /** + * 交货期(天) + */ + deliveryPeriod?: number; + + /** + * 交付/交货方式 + */ + deliveryMethod?: string; + + /** + * 付款方式(1电汇 2承兑) + */ + paymentMethod?: string; + + /** + * 币种(字典类型) + */ + currencyType?: string; + + /** + * 含税信息(如:含13%增值税) + */ + taxIncludedInfo?: string; + + /** + * 税率(默认按明细可覆盖) + */ + taxRate?: number; + + /** + * 总报价 + */ + totalPrice?: number; + + /** + * 未税总价 + */ + totalBeforeTax?: number; + + /** + * 税额 + */ + totalTax?: number; + + /** + * 含税总价 + */ + totalIncludingTax?: number; + + /** + * 客户方联系人ID + */ + customerContactId?: string | number; + + /** + * 客户方联系人 + */ + customerContactName?: string; + + /** + * 客户方联系电话 + */ + customerContactPhone?: string; + + /** + * 客户方电子邮箱 + */ + customerContactEmail?: string; + + /** + * 供货方联系人ID + */ + supplierContactId?: string | number; + + /** + * 供货方联系人 + */ + supplierContactName?: string; + + /** + * 供货方联系电话 + */ + supplierContactPhone?: string; + + /** + * 供货方电子邮箱 + */ + supplierContactEmail?: string; + + /** + * 项目ID(可选) + */ + projectId?: string | number; + + /** + * 打印模板ID(可选) + */ + templateId?: string | number; + + /** + * 附件ID + */ + ossId?: string | number; + + /** + * 报价单状态(1暂存 2审批中 3可用) + */ + quoteStatus?: string; + + /** + * 流程状态 + */ + flowStatus?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 报价单子表-物料明细 + */ + itemsBo?: CrmQuoteMaterialForm[]; + +} + +export interface CrmQuoteInfoQuery extends PageQuery { + + /** + * 报价单号 + */ + quoteCode?: string; + + /** + * 报价单名称 + */ + quoteName?: string; + + /** + * 报价轮次 + */ + quoteRound?: number; + + /** + * 报价大类(1橡机板块 2非橡机板块) + */ + quoteCategory?: string; + + /** + * 报价类型(1对内 2对外) + */ + quoteType?: string; + + /** + * 业务方向(1智能轮胎 2轮胎工厂 3快递物流 4锂电 5工业软件 6智能制造 7新行业及零售) + */ + businessDirection?: string; + + /** + * 部门 + */ + quoteDeptId?: string | number; + + /** + * 报价日期 + */ + quoteDate?: string; + + /** + * 报价有效期起 + */ + validFrom?: string | number; + + /** + * 报价有效期(天) + */ + validDays?: string | number; + + /** + * 报价有效期止 + */ + validTo?: string | number; + + /** + * 交货期(天) + */ + deliveryPeriod?: number; + + /** + * 交付/交货方式 + */ + deliveryMethod?: string; + + /** + * 付款方式(1电汇 2承兑) + */ + paymentMethod?: string; + + /** + * 币种(字典类型) + */ + currencyType?: string; + + /** + * 含税信息(如:含13%增值税) + */ + taxIncludedInfo?: string; + + /** + * 税率(默认按明细可覆盖) + */ + taxRate?: number; + + /** + * 总报价 + */ + totalPrice?: number; + + /** + * 未税总价 + */ + totalBeforeTax?: number; + + /** + * 税额 + */ + totalTax?: number; + + /** + * 含税总价 + */ + totalIncludingTax?: number; + + /** + * 客户方联系人ID + */ + customerContactId?: string | number; + + /** + * 客户方联系人 + */ + customerContactName?: string; + + /** + * 客户方联系电话 + */ + customerContactPhone?: string; + + /** + * 客户方电子邮箱 + */ + customerContactEmail?: string; + + /** + * 供货方联系人ID + */ + supplierContactId?: string | number; + + /** + * 供货方联系人 + */ + supplierContactName?: string; + + /** + * 供货方联系电话 + */ + supplierContactPhone?: string; + + /** + * 供货方电子邮箱 + */ + supplierContactEmail?: string; + + /** + * 项目ID(可选) + */ + projectId?: string | number; + + /** + * 打印模板ID(可选) + */ + templateId?: string | number; + + /** + * 附件ID + */ + ossId?: string | number; + + /** + * 报价单状态(1暂存 2审批中 3可用) + */ + quoteStatus?: string; + + /** + * 流程状态 + */ + flowStatus?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + +import type { CrmQuoteMaterialVO, CrmQuoteMaterialForm } from '@/api/oa/crm/crmQuoteMaterial/types'; + + + diff --git a/src/api/oa/crm/crmQuoteMaterial/index.ts b/src/api/oa/crm/crmQuoteMaterial/index.ts new file mode 100644 index 0000000..d32e16e --- /dev/null +++ b/src/api/oa/crm/crmQuoteMaterial/index.ts @@ -0,0 +1,76 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { CrmQuoteMaterialVO, CrmQuoteMaterialForm, CrmQuoteMaterialQuery } from '@/api/oa/crm/crmQuoteMaterial/types'; + +/** + * 查询报价单物料明细列表 + * @param query + * @returns {*} + */ + +export const listCrmQuoteMaterial = (query?: CrmQuoteMaterialQuery): AxiosPromise => { + return request({ + url: '/oa/crm/crmQuoteMaterial/list', + method: 'get', + params: query + }); +}; + +/** + * 查询报价单物料明细详细 + * @param quoteMaterialId + */ +export const getCrmQuoteMaterial = (quoteMaterialId: string | number): AxiosPromise => { + return request({ + url: '/oa/crm/crmQuoteMaterial/' + quoteMaterialId, + method: 'get' + }); +}; + +/** + * 新增报价单物料明细 + * @param data + */ +export const addCrmQuoteMaterial = (data: CrmQuoteMaterialForm) => { + return request({ + url: '/oa/crm/crmQuoteMaterial', + method: 'post', + data: data + }); +}; + +/** + * 修改报价单物料明细 + * @param data + */ +export const updateCrmQuoteMaterial = (data: CrmQuoteMaterialForm) => { + return request({ + url: '/oa/crm/crmQuoteMaterial', + method: 'put', + data: data + }); +}; + +/** + * 删除报价单物料明细 + * @param quoteMaterialId + */ +export const delCrmQuoteMaterial = (quoteMaterialId: string | number | Array) => { + return request({ + url: '/oa/crm/crmQuoteMaterial/' + quoteMaterialId, + method: 'delete' + }); +}; + +/** + * 下拉框查询报价单物料明细列表 + * @param query + * @returns {*} + */ +export function getCrmQuoteMaterialList (query) { + return request({ + url: '/oa/crm/crmQuoteMaterial/getCrmQuoteMaterialList', + method: 'get', + params: query + }); +}; diff --git a/src/api/oa/crm/crmQuoteMaterial/types.ts b/src/api/oa/crm/crmQuoteMaterial/types.ts new file mode 100644 index 0000000..4854824 --- /dev/null +++ b/src/api/oa/crm/crmQuoteMaterial/types.ts @@ -0,0 +1,246 @@ +export interface CrmQuoteMaterialVO { + /** + * 报价物料ID + */ + quoteMaterialId: string | number; + + /** + * 报价ID + */ + quoteId: string | number; + + /** + * 序号(ERP风格) + */ + itemNo: number; + + /** + * 产品/服务名称 + */ + productName: string; + + /** + * 规格描述 + */ + specificationDescription: string; + + /** + * 物料ID(SAP) + */ + materialId: string | number; + + /** + * 销售物料ID(关联名) + */ + relationMaterialId: string | number; + + /** + * 数量 + */ + amount: number; + + /** + * 单位ID + */ + unitId: string | number; + + /** + * 单位名称 + */ + unitName: string; + + /** + * 未税单价 + */ + beforePrice: number; + + /** + * 税率 + */ + taxRate: number; + + /** + * 含税单价 + */ + includingPrice: number; + + /** + * 小计(含税) + */ + subtotal: number; + + /** + * 备注 + */ + remark: string; + + /** + * 激活标识(1是 0否) + */ + activeFlag: string; + +} + +export interface CrmQuoteMaterialForm extends BaseEntity { + /** + * 报价物料ID + */ + quoteMaterialId?: string | number; + + /** + * 报价ID + */ + quoteId?: string | number; + + /** + * 序号(ERP风格) + */ + itemNo?: number; + + /** + * 产品/服务名称 + */ + productName?: string; + + /** + * 规格描述 + */ + specificationDescription?: string; + + /** + * 物料ID(SAP) + */ + materialId?: string | number; + + /** + * 销售物料ID(关联名) + */ + relationMaterialId?: string | number; + + /** + * 数量 + */ + amount?: number; + + /** + * 单位ID + */ + unitId?: string | number; + + /** + * 单位名称 + */ + unitName?: string; + + /** + * 未税单价 + */ + beforePrice?: number; + + /** + * 税率 + */ + taxRate?: number; + + /** + * 含税单价 + */ + includingPrice?: number; + + /** + * 小计(含税) + */ + subtotal?: number; + + /** + * 备注 + */ + remark?: string; + + /** + * 激活标识(1是 0否) + */ + activeFlag?: string; + +} + +export interface CrmQuoteMaterialQuery extends PageQuery { + + /** + * 报价ID + */ + quoteId?: string | number; + + /** + * 序号(ERP风格) + */ + itemNo?: number; + + /** + * 产品/服务名称 + */ + productName?: string; + + /** + * 规格描述 + */ + specificationDescription?: string; + + /** + * 物料ID(SAP) + */ + materialId?: string | number; + + /** + * 销售物料ID(关联名) + */ + relationMaterialId?: string | number; + + /** + * 数量 + */ + amount?: number; + + /** + * 单位ID + */ + unitId?: string | number; + + /** + * 单位名称 + */ + unitName?: string; + + /** + * 未税单价 + */ + beforePrice?: number; + + /** + * 税率 + */ + taxRate?: number; + + /** + * 含税单价 + */ + includingPrice?: number; + + /** + * 小计(含税) + */ + subtotal?: number; + + /** + * 激活标识(1是 0否) + */ + activeFlag?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/router/index.ts b/src/router/index.ts index 4329014..e3983a2 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -106,6 +106,18 @@ export const constantRoutes: RouteRecordRaw[] = [ } ] }, + { + path: '/oa/crm', + component: Layout, + hidden: true, + children: [ + { + path: 'crmQuoteInfo/edit', + component: () => import('@/views/oa/crm/crmQuoteInfo/edit.vue'), + name: 'crmQuoteInfoEdit', + } + ] + }, ]; // 动态路由,基于用户权限动态去加载 diff --git a/src/views/oa/crm/crmQuoteInfo/edit.vue b/src/views/oa/crm/crmQuoteInfo/edit.vue new file mode 100644 index 0000000..40183b9 --- /dev/null +++ b/src/views/oa/crm/crmQuoteInfo/edit.vue @@ -0,0 +1,610 @@ + + + + + diff --git a/src/views/oa/crm/crmQuoteInfo/index.vue b/src/views/oa/crm/crmQuoteInfo/index.vue new file mode 100644 index 0000000..de0bea8 --- /dev/null +++ b/src/views/oa/crm/crmQuoteInfo/index.vue @@ -0,0 +1,720 @@ + + + diff --git a/src/views/oa/crm/crmQuoteMaterial/index.vue b/src/views/oa/crm/crmQuoteMaterial/index.vue new file mode 100644 index 0000000..f0e4013 --- /dev/null +++ b/src/views/oa/crm/crmQuoteMaterial/index.vue @@ -0,0 +1,373 @@ + + +