add
This commit is contained in:
@@ -11,7 +11,13 @@
|
||||
<el-table-column prop="elderId" label="长者ID" width="100" />
|
||||
<el-table-column prop="month" label="月份" />
|
||||
<el-table-column prop="total" label="金额" />
|
||||
<el-table-column prop="status" label="状态" />
|
||||
<el-table-column label="状态" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="statusTag(scope.row.status)">
|
||||
{{ statusLabel(scope.row.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog title="新建账单" :visible.sync="showCreate">
|
||||
@@ -47,6 +53,16 @@ export default {
|
||||
this.load();
|
||||
},
|
||||
methods: {
|
||||
statusLabel(status) {
|
||||
if (status === "PAID") return "已支付";
|
||||
if (status === "UNPAID") return "未支付";
|
||||
return status || "-";
|
||||
},
|
||||
statusTag(status) {
|
||||
if (status === "PAID") return "success";
|
||||
if (status === "UNPAID") return "warning";
|
||||
return "info";
|
||||
},
|
||||
async load() {
|
||||
try {
|
||||
const res = await billsList(this.filterElderId || null);
|
||||
|
||||
@@ -4,9 +4,21 @@
|
||||
<el-table :data="items" stripe>
|
||||
<el-table-column prop="id" label="编号" width="80" />
|
||||
<el-table-column prop="elderId" label="长者ID" />
|
||||
<el-table-column prop="type" label="类型" />
|
||||
<el-table-column label="类型" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="typeTag(scope.row.type)">
|
||||
{{ typeLabel(scope.row.type) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="content" label="内容" />
|
||||
<el-table-column prop="status" label="状态" width="120" />
|
||||
<el-table-column label="状态" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="statusTag(scope.row.status)">
|
||||
{{ statusLabel(scope.row.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="openReply(scope.row)">回复</el-button>
|
||||
@@ -50,6 +62,30 @@ export default {
|
||||
this.load();
|
||||
},
|
||||
methods: {
|
||||
typeLabel(type) {
|
||||
if (type === "SUGGESTION") return "建议";
|
||||
if (type === "COMPLAINT") return "投诉";
|
||||
if (type === "PRAISE") return "表扬";
|
||||
return type || "-";
|
||||
},
|
||||
typeTag(type) {
|
||||
if (type === "SUGGESTION") return "info";
|
||||
if (type === "COMPLAINT") return "danger";
|
||||
if (type === "PRAISE") return "success";
|
||||
return "info";
|
||||
},
|
||||
statusLabel(status) {
|
||||
if (status === "NEW") return "新建";
|
||||
if (status === "PROCESSING") return "处理中";
|
||||
if (status === "CLOSED") return "已关闭";
|
||||
return status || "-";
|
||||
},
|
||||
statusTag(status) {
|
||||
if (status === "NEW") return "warning";
|
||||
if (status === "PROCESSING") return "";
|
||||
if (status === "CLOSED") return "success";
|
||||
return "info";
|
||||
},
|
||||
async load() {
|
||||
try {
|
||||
const res = await feedbackList();
|
||||
|
||||
@@ -7,7 +7,13 @@
|
||||
<el-table :data="items" stripe>
|
||||
<el-table-column prop="id" label="编号" width="80" />
|
||||
<el-table-column prop="title" label="标题" />
|
||||
<el-table-column prop="targetRole" label="对象" width="120" />
|
||||
<el-table-column label="对象" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="targetTag(scope.row.targetRole)">
|
||||
{{ targetLabel(scope.row.targetRole) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createdAt" label="创建时间" />
|
||||
</el-table>
|
||||
|
||||
@@ -47,6 +53,18 @@ export default {
|
||||
this.load();
|
||||
},
|
||||
methods: {
|
||||
targetLabel(role) {
|
||||
if (role === "ALL") return "全部";
|
||||
if (role === "NURSE") return "护工";
|
||||
if (role === "FAMILY") return "家属";
|
||||
return role || "-";
|
||||
},
|
||||
targetTag(role) {
|
||||
if (role === "ALL") return "";
|
||||
if (role === "NURSE") return "success";
|
||||
if (role === "FAMILY") return "info";
|
||||
return "info";
|
||||
},
|
||||
async load() {
|
||||
try {
|
||||
const res = await noticeList();
|
||||
|
||||
@@ -16,7 +16,13 @@
|
||||
<el-table-column prop="id" label="编号" width="80" />
|
||||
<el-table-column prop="username" label="账号" />
|
||||
<el-table-column prop="name" label="姓名" />
|
||||
<el-table-column prop="role" label="角色" width="100" />
|
||||
<el-table-column label="角色" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="roleTag(scope.row.role)">
|
||||
{{ roleLabel(scope.row.role) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.status === 1 ? 'success' : 'info'">
|
||||
@@ -89,6 +95,18 @@ export default {
|
||||
this.loadUsers();
|
||||
},
|
||||
methods: {
|
||||
roleLabel(role) {
|
||||
if (role === "ADMIN") return "管理员";
|
||||
if (role === "NURSE") return "护工";
|
||||
if (role === "FAMILY") return "家属";
|
||||
return role || "-";
|
||||
},
|
||||
roleTag(role) {
|
||||
if (role === "ADMIN") return "danger";
|
||||
if (role === "NURSE") return "success";
|
||||
if (role === "FAMILY") return "info";
|
||||
return "info";
|
||||
},
|
||||
async loadUsers() {
|
||||
try {
|
||||
const res = await adminUsers(this.role || null);
|
||||
|
||||
@@ -9,7 +9,13 @@
|
||||
<el-table :data="items" stripe>
|
||||
<el-table-column prop="month" label="月份" />
|
||||
<el-table-column prop="total" label="金额" />
|
||||
<el-table-column prop="status" label="状态" />
|
||||
<el-table-column label="状态" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="statusTag(scope.row.status)">
|
||||
{{ statusLabel(scope.row.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="pay(scope.row)" :disabled="scope.row.status === 'PAID'">
|
||||
@@ -37,6 +43,16 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
statusLabel(status) {
|
||||
if (status === "PAID") return "已支付";
|
||||
if (status === "UNPAID") return "未支付";
|
||||
return status || "-";
|
||||
},
|
||||
statusTag(status) {
|
||||
if (status === "PAID") return "success";
|
||||
if (status === "UNPAID") return "warning";
|
||||
return "info";
|
||||
},
|
||||
async load() {
|
||||
if (!this.elderId) return;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user