feat: 福安德智慧报价平台 - 完整业务模块
基于RuoYi-Vue2构建的智慧采购报价平台,包含: 后端(Spring Boot + MyBatis): - 物料管理 (BizMaterial) - 供应商管理 (BizSupplier) - 报价请求RFQ (BizRfq) - 供应商报价单 (BizQuotation) - 智慧比价分析 (BizComparison) - 采购单 (BizPurchaseOrder) - 供应商评价 (BizSupplierEvaluation) - 订单异议 (BizOrderObjection) - 交易记录 (BizTransaction) - 租户管理-SaaS数据隔离 (BizTenant) 前端(Vue2 + Element UI): - 10个业务模块完整页面 - ERPNext风格主题(蓝色系) - 福安德品牌logo 部署: - Docker Compose一键部署 - MySQL 8.0 + Redis 7 + Nginx - 前端端口 10031
This commit is contained in:
78
ruoyi-ui/src/views/bid/tenant/index.vue
Normal file
78
ruoyi-ui/src/views/bid/tenant/index.vue
Normal file
@@ -0,0 +1,78 @@
|
||||
<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">新增租户</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column label="租户ID" prop="tenantId" width="80" />
|
||||
<el-table-column label="租户名称" prop="tenantName" />
|
||||
<el-table-column label="联系人" prop="contact" width="100" />
|
||||
<el-table-column label="手机" prop="phone" width="130" />
|
||||
<el-table-column label="邮箱" prop="email" />
|
||||
<el-table-column label="状态" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.status==='0' ? 'success' : 'danger'">{{ scope.row.status==='0' ? '正常' : '停用' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="createTime" width="160" />
|
||||
<el-table-column label="操作" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
<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" @click="handleDelete(scope.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" />
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
||||
<el-form-item label="租户名称" prop="tenantName"><el-input v-model="form.tenantName" /></el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12"><el-form-item label="联系人" prop="contact"><el-input v-model="form.contact" /></el-form-item></el-col>
|
||||
<el-col :span="12"><el-form-item label="手机" prop="phone"><el-input v-model="form.phone" /></el-form-item></el-col>
|
||||
</el-row>
|
||||
<el-form-item label="邮箱" prop="email"><el-input v-model="form.email" /></el-form-item>
|
||||
<el-form-item label="备注" prop="remark"><el-input v-model="form.remark" type="textarea" rows="2" /></el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer">
|
||||
<el-button @click="open=false">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { listTenant, getTenant, addTenant, updateTenant, delTenant } from "@/api/bid/tenant";
|
||||
export default {
|
||||
name: "Tenant",
|
||||
data() {
|
||||
return {
|
||||
loading: false, total: 0, list: [], open: false, title: "",
|
||||
queryParams: { pageNum: 1, pageSize: 10 },
|
||||
form: {},
|
||||
rules: { tenantName: [{ required: true, message: "租户名称不能为空", trigger: "blur" }] }
|
||||
};
|
||||
},
|
||||
created() { this.getList(); },
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listTenant(this.queryParams).then(r => { this.list = r.rows; this.total = r.total; this.loading = false; });
|
||||
},
|
||||
handleAdd() { this.form = { status: "0" }; this.open = true; this.title = "新增租户"; },
|
||||
handleUpdate(row) { getTenant(row.tenantId).then(r => { this.form = r.data; this.open = true; this.title = "修改租户"; }); },
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm("确认删除?").then(() => delTenant(row.tenantId)).then(() => { this.getList(); this.$modal.msgSuccess("删除成功"); });
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(v => {
|
||||
if (!v) return;
|
||||
const action = this.form.tenantId ? updateTenant : addTenant;
|
||||
action(this.form).then(() => { this.$modal.msgSuccess("操作成功"); this.open = false; this.getList(); });
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user