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,120 @@
<template>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd(null)">新增根分类</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="categoryList" row-key="categoryId"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
border default-expand-all>
<el-table-column label="分类名称" prop="categoryName" min-width="200" />
<el-table-column label="排序" prop="sort" width="80" align="center" />
<el-table-column label="状态" width="80" align="center">
<template slot-scope="scope">
<el-tag :type="scope.row.status === '0' ? 'success' : 'danger'" size="mini">
{{ scope.row.status === '0' ? '启用' : '禁用' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)">新增子类</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#f56c6c" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog :title="dialogTitle" :visible.sync="dialogOpen" width="480px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-form-item v-if="form.parentId !== null && form.parentId !== undefined" label="父级分类">
<span style="color:#606266">{{ parentName || '根节点' }}</span>
</el-form-item>
<el-form-item label="分类名称" prop="categoryName">
<el-input v-model="form.categoryName" placeholder="请输入分类名称" />
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="排序">
<el-input-number v-model="form.sort" :min="0" :max="999" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio label="0">启用</el-radio>
<el-radio label="1">禁用</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button @click="dialogOpen = false">取消</el-button>
<el-button type="primary" @click="submitForm">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getCategoryList, addCategory, updateCategory, delCategory } from "@/api/bid/category";
export default {
name: "Category",
data() {
return {
loading: false,
categoryList: [],
dialogOpen: false,
dialogTitle: "",
parentName: "",
form: {},
rules: {
categoryName: [{ required: true, message: "分类名称不能为空", trigger: "blur" }]
}
};
},
created() { this.getList(); },
methods: {
getList() {
this.loading = true;
getCategoryList().then(res => {
this.categoryList = res.data || [];
this.loading = false;
}).catch(() => { this.loading = false; });
},
handleAdd(parent) {
this.form = { categoryName: "", parentId: parent ? parent.categoryId : 0, sort: 0, status: "0" };
this.parentName = parent ? parent.categoryName : "";
this.dialogTitle = parent ? "新增子分类(" + parent.categoryName + "" : "新增根分类";
this.dialogOpen = true;
},
handleUpdate(row) {
this.form = { categoryId: row.categoryId, categoryName: row.categoryName, sort: row.sort, status: row.status };
this.dialogTitle = "修改分类";
this.dialogOpen = true;
},
handleDelete(row) {
this.$modal.confirm("确认删除分类【" + row.categoryName + "】?子分类也将被删除!").then(() => {
return delCategory(row.categoryId);
}).then(() => {
this.$modal.msgSuccess("删除成功");
this.getList();
});
},
submitForm() {
this.$refs.form.validate(valid => {
if (!valid) return;
const action = this.form.categoryId ? updateCategory : addCategory;
action(this.form).then(() => {
this.$modal.msgSuccess("保存成功");
this.dialogOpen = false;
this.getList();
});
});
}
}
};
</script>