feat(bid): 完成物料管理模块全功能开发

1. 新增物料详情页路由、菜单与接口,支持查看物料报价与信息
2. 重构物料列表页面,新增品牌筛选、表格样式优化与详情跳转
3. 扩展物料实体与数据库字段,新增材质、用途、性能参数等字段
4. 新增供应商/甲方报价查询、批量对比、同名称物料匹配接口
5. 新增物料详情组件,包含基础信息、供应商报价、甲方报价标签页
6. 修复比价路由跳转路径错误,调整数据库密码配置
7. 新增物料相关SQL脚本与初始化数据
This commit is contained in:
2026-05-29 08:58:58 +08:00
parent c718ec4076
commit e521b0dfeb
26 changed files with 4871 additions and 41 deletions

View File

@@ -1,7 +1,25 @@
import request from '@/utils/request'
const baseUrl = '/bid/material'
export const listMaterial = (params) => request({ url: baseUrl + '/list', method: 'get', params })
export const getMaterial = (id) => request({ url: baseUrl + '/' + id, method: 'get' })
export const addMaterial = (data) => request({ url: baseUrl, method: 'post', data })
export const updateMaterial = (data) => request({ url: baseUrl, method: 'put', data })
export const delMaterial = (ids) => request({ url: baseUrl + '/' + ids, method: 'delete' })
// 物料详情页
export const getSupplierQuotes = (id) => request({ url: baseUrl + '/' + id + '/supplier-quotes', method: 'get' })
export const getClientQuotes = (id) => request({ url: baseUrl + '/' + id + '/client-quotes', method: 'get' })
export const listManufacturer = () => request({ url: baseUrl + '/manufacturer/list', method: 'get' })
export const compareMaterials = (data) => request({ url: baseUrl + '/compare', method: 'post', data })
// 同类型物料横向对比
export const getSelectableMaterials = () => request({ url: baseUrl + '/selectable-for-comparison', method: 'get' })
export const getQuoteComparison = (data) => request({ url: baseUrl + '/quote-comparison', method: 'post', data })
// 同名称不同规格/品牌对比
export const getSameNameMaterials = (materialName, excludeId) => request({
url: baseUrl + '/same-name/' + encodeURIComponent(materialName),
method: 'get',
params: excludeId ? { excludeId } : undefined
})