修改
This commit is contained in:
parent
3a33bc8ab1
commit
393de5baa9
44
src/api/system/revenue.js
Normal file
44
src/api/system/revenue.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询护理员订单佣金收益信息列表
|
||||||
|
export function listRevenue(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/revenue/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询护理员订单佣金收益信息详细
|
||||||
|
export function getRevenue(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/revenue/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增护理员订单佣金收益信息
|
||||||
|
export function addRevenue(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/revenue',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改护理员订单佣金收益信息
|
||||||
|
export function updateRevenue(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/revenue',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除护理员订单佣金收益信息
|
||||||
|
export function delRevenue(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/revenue/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
249
src/views/system/revenue/index.vue
Normal file
249
src/views/system/revenue/index.vue
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-form-item label="护理人员名称" prop="nursePersonName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.nursePersonName"
|
||||||
|
placeholder="请输入护理人员名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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>
|
||||||
|
<!-- <el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>-->
|
||||||
|
<el-table v-loading="loading" :data="revenueList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column label="护理站名称" align="center" prop="nurseStationName" />
|
||||||
|
<el-table-column label="护理人员名称" align="center" prop="nursePersonName" />
|
||||||
|
<el-table-column label="总订单" align="center" prop="orderCount" />
|
||||||
|
<el-table-column label="总收益" align="center" prop="orderTotalPrice" />
|
||||||
|
<el-table-column label="今日订单" align="center" prop="todayOrderCount" />
|
||||||
|
<el-table-column label="今日订单收益" align="center" prop="todayOrderPrice" />
|
||||||
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:revenue:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:revenue:remove']"
|
||||||
|
>删除</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="80px">
|
||||||
|
<el-form-item label="护理站人员表id" prop="nurseStationPersonId">
|
||||||
|
<el-input v-model="form.nurseStationPersonId" placeholder="请输入护理站人员表id" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="预约订单表id" prop="appointmentOrderId">
|
||||||
|
<el-input v-model="form.appointmentOrderId" placeholder="请输入预约订单表id" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="收益金额" prop="revenueAmount">
|
||||||
|
<el-input v-model="form.revenueAmount" placeholder="请输入收益金额" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="预约订单完成时间" prop="finishOrderTime">
|
||||||
|
<el-date-picker
|
||||||
|
clearable
|
||||||
|
v-model="form.finishOrderTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择预约订单完成时间"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listRevenue,
|
||||||
|
getRevenue,
|
||||||
|
delRevenue,
|
||||||
|
addRevenue,
|
||||||
|
updateRevenue
|
||||||
|
} from "@/api/system/revenue.js";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Revenue",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 护理员订单佣金收益信息表格数据
|
||||||
|
revenueList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
nurseStationPersonId: null,
|
||||||
|
appointmentOrderId: null,
|
||||||
|
revenueAmount: null,
|
||||||
|
finishOrderTime: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询护理员订单佣金收益信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listRevenue(this.queryParams).then(response => {
|
||||||
|
this.revenueList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
nurseStationPersonId: null,
|
||||||
|
appointmentOrderId: null,
|
||||||
|
revenueAmount: null,
|
||||||
|
finishOrderTime: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id);
|
||||||
|
this.single = selection.length !== 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加护理员订单佣金收益信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getRevenue(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改护理员订单佣金收益信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateRevenue(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addRevenue(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal
|
||||||
|
.confirm(
|
||||||
|
'是否确认删除护理员订单佣金收益信息编号为"' + ids + '"的数据项?'
|
||||||
|
)
|
||||||
|
.then(function() {
|
||||||
|
return delRevenue(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download(
|
||||||
|
"system/revenue/export",
|
||||||
|
{
|
||||||
|
...this.queryParams
|
||||||
|
},
|
||||||
|
`revenue_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user