feat: 路由跳转重构 + 甲方报价单 + 物料分类 + 比价选择方案 + 规格型号拆分

- 比价页改为列表→路由跳转到 comparison/detail,支持勾选物料行生成采购方案PDF
- 新增甲方报价单模块(clientquote):列表+详情路由,含成本价/报价/毛利率,导出PDF
- 新增物料分类管理(category):树形结构,CRUD,物料页面关联分类筛选
- BizMaterial 拆分 spec(规格) + modelNo(型号) 两个字段
- Logo 修复:新PNG + 内联样式确保完整显示
- sys_menu 新增 2012(物料分类)、2013(甲方报价单)、2014(报价单详情)、2015(比价详情)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 13:49:11 +08:00
parent 608ee0ed61
commit 54a421aa36
25 changed files with 1614 additions and 502 deletions

View File

@@ -0,0 +1,113 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item label="报价单号" prop="quoteNo">
<el-input v-model="queryParams.quoteNo" placeholder="请输入报价单号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="客户名称" prop="clientName">
<el-input v-model="queryParams.clientName" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="全部" clearable style="width:110px">
<el-option label="草稿" value="draft" />
<el-option label="已发送" value="sent" />
<el-option label="已确认" value="confirmed" />
<el-option label="已拒绝" value="rejected" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新建报价单</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="quoteList" border>
<el-table-column label="报价单号" prop="quoteNo" width="160" />
<el-table-column label="客户名称" prop="clientName" min-width="160" show-overflow-tooltip />
<el-table-column label="关联询价单" prop="rfqNo" width="140" />
<el-table-column label="总金额" prop="totalAmount" width="120" align="right">
<template slot-scope="s">
<strong style="color:#409EFF">¥{{ s.row.totalAmount | money }}</strong>
</template>
</el-table-column>
<el-table-column label="币种" prop="currency" width="70" align="center" />
<el-table-column label="有效期" prop="validityDate" width="110" align="center">
<template slot-scope="s">{{ s.row.validityDate | date }}</template>
</el-table-column>
<el-table-column label="状态" width="90" align="center">
<template slot-scope="s">
<el-tag :type="statusType(s.row.status)" size="mini">{{ statusLabel(s.row.status) }}</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime" width="160" align="center" />
<el-table-column label="操作" align="center" width="200">
<template slot-scope="s">
<el-button size="mini" type="text" icon="el-icon-view" @click="goDetail(s.row)">详情/编辑</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#f56c6c" @click="handleDelete(s.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
</template>
<script>
import { listClientQuote, delClientQuote, addClientQuote } from "@/api/bid/clientquote";
export default {
name: "ClientQuote",
filters: {
money(v) { return v ? Number(v).toFixed(2) : "0.00"; },
date(v) { return v ? v.substring(0, 10) : "-"; }
},
data() {
return {
loading: false,
quoteList: [],
total: 0,
queryParams: { pageNum: 1, pageSize: 10, quoteNo: null, clientName: null, status: null }
};
},
created() { this.getList(); },
methods: {
getList() {
this.loading = true;
listClientQuote(this.queryParams).then(res => {
this.quoteList = res.rows || [];
this.total = res.total || 0;
this.loading = false;
}).catch(() => { this.loading = false; });
},
handleQuery() { this.queryParams.pageNum = 1; this.getList(); },
resetQuery() { this.resetForm("queryForm"); this.handleQuery(); },
handleAdd() {
// Create draft then navigate
addClientQuote({ status: "draft", currency: "CNY", items: [] }).then(res => {
const id = res.data && res.data.quoteId;
if (id) this.$router.push({ path: "/bid/clientquote/detail", query: { quoteId: id } });
else this.$router.push({ path: "/bid/clientquote/detail", query: { quoteId: "__new__" } });
}).catch(() => {
this.$router.push({ path: "/bid/clientquote/detail", query: { quoteId: "__new__" } });
});
},
goDetail(row) {
this.$router.push({ path: "/bid/clientquote/detail", query: { quoteId: row.quoteId } });
},
handleDelete(row) {
this.$modal.confirm("确认删除报价单【" + row.quoteNo + "】?").then(() => {
return delClientQuote(row.quoteId);
}).then(() => {
this.$modal.msgSuccess("删除成功");
this.getList();
});
},
statusType(s) { return { draft: "info", sent: "primary", confirmed: "success", rejected: "danger" }[s] || "info"; },
statusLabel(s) { return { draft: "草稿", sent: "已发送", confirmed: "已确认", rejected: "已拒绝" }[s] || s; }
}
};
</script>