master
commit
011d8cf7f6
@ -0,0 +1,34 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function getList(params,isLoading){
|
||||
return request({
|
||||
method:'get',
|
||||
url:'/api/admin/pay_unit/get-list',
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function getForm(id,params){
|
||||
return request({
|
||||
method:'get',
|
||||
url:`/api/admin/pay_unit/get-form/${id}`,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data){
|
||||
return request({
|
||||
method:'post',
|
||||
url:'/api/admin/pay_unit/save',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(id,data){
|
||||
return request({
|
||||
method:'post',
|
||||
url:`/api/admin/pay_unit/delete/${id}`,
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -1,29 +1,312 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<div class="statistics">
|
||||
<el-card>
|
||||
<template v-slot:header>
|
||||
<i class="el-icon-data-line"></i>
|
||||
<span class="statistics-title">营业统计</span>
|
||||
</template>
|
||||
<div class="statistics-content">
|
||||
<div class="statistics-content-top">
|
||||
<div class="statistics-content-top__num">¥40.5万</div>
|
||||
<div class="statistics-content-top__name">服务金额</div>
|
||||
</div>
|
||||
<div class="statistics-content-bottom">
|
||||
<div class="statistics-content-bottom-left">
|
||||
<div class="statistics-content-bottom-left__num">¥26.9万</div>
|
||||
<div class="statistics-content-bottom-left__name">护工金额</div>
|
||||
</div>
|
||||
<div class="statistics-content-bottom-right">
|
||||
<div class="statistics-content-bottom-right__num">¥13.6万</div>
|
||||
<div class="statistics-content-bottom-right__name">留存金额</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<template v-slot:header>
|
||||
<i class="el-icon-user"></i>
|
||||
<span class="statistics-title">人效统计</span>
|
||||
</template>
|
||||
<div class="statistics-content">
|
||||
<div class="statistics-content-top">
|
||||
<div class="statistics-content-top__num">120人</div>
|
||||
<div class="statistics-content-top__name">照护人员</div>
|
||||
</div>
|
||||
<div class="statistics-content-bottom">
|
||||
<div class="statistics-content-bottom-left">
|
||||
<div class="statistics-content-bottom-left__num">8小时/天</div>
|
||||
<div class="statistics-content-bottom-left__name">预期照护时长</div>
|
||||
</div>
|
||||
<div class="statistics-content-bottom-right">
|
||||
<div class="statistics-content-bottom-right__num">6.3小时/天</div>
|
||||
<div class="statistics-content-bottom-right__name">人均照护时长</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<template v-slot:header>
|
||||
<i class="el-icon-s-custom"></i>
|
||||
<span class="statistics-title">客户统计</span>
|
||||
</template>
|
||||
<div class="statistics-content">
|
||||
<div class="statistics-content-top">
|
||||
<div class="statistics-content-top__num">800人</div>
|
||||
<div class="statistics-content-top__name">活跃客户</div>
|
||||
</div>
|
||||
<div class="statistics-content-bottom">
|
||||
<div class="statistics-content-bottom-left">
|
||||
<div class="statistics-content-bottom-left__num">100</div>
|
||||
<div class="statistics-content-bottom-left__name">新增</div>
|
||||
</div>
|
||||
<div class="statistics-content-bottom-right">
|
||||
<div class="statistics-content-bottom-right__num">20</div>
|
||||
<div class="statistics-content-bottom-right__name">流失</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<template v-slot:header>
|
||||
<i class="el-icon-document"></i>
|
||||
<span class="statistics-title">订单统计</span>
|
||||
</template>
|
||||
<div class="statistics-content">
|
||||
<div class="statistics-content-top">
|
||||
<div class="statistics-content-top__num">500</div>
|
||||
<div class="statistics-content-top __name">服务订单</div>
|
||||
</div>
|
||||
<div class="statistics-content-bottom">
|
||||
<div class="statistics-content-bottom-left">
|
||||
<div class="statistics-content-bottom-left__num">450</div>
|
||||
<div class="statistics-content-bottom-left__name">周期性订单</div>
|
||||
</div>
|
||||
<div class="statistics-content-bottom-right">
|
||||
<div class="statistics-content-bottom-right__num">50</div>
|
||||
<div class="statistics-content-bottom-right__name">单次订单</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<div class="chart">
|
||||
<div id="col-chart"></div>
|
||||
<div id="line-chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
import echarts from "echarts"
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
},
|
||||
methods: {
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
col:'',
|
||||
line:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.col = echarts.init(document.getElementById('col-chart'))
|
||||
this.col.setOption({
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
},
|
||||
position:'bottom'
|
||||
},
|
||||
legend: {},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
boundaryGap: [0, 0.01]
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['第一周', '第二周', '第三周', '第四周']
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '服务金额',
|
||||
type: 'bar',
|
||||
data: [18203, 23489, 29034, 104970],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: 'rgb(42,182,252)'
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '收款',
|
||||
type: 'bar',
|
||||
data: [19325, 23438, 31000, 121594],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: 'rgb(34,228,255)'
|
||||
},
|
||||
},
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
this.line = echarts.init(document.getElementById('line-chart'))
|
||||
this.line.setOption({
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: ['活跃客户', '服务订单']
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '6%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
toolbox: {
|
||||
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: ['第一周', '第二周', '第三周', '第四周']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '活跃客户',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: [120, 132, 101, 134],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: 'rgb(42,182,252)'
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '服务订单',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: [220, 182, 191, 234],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: 'rgb(34,228,255)'
|
||||
},
|
||||
},
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
|
||||
window.onresize = () => {
|
||||
this.col.resize()
|
||||
this.line.resize()
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
window.onresize = null
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.statistics{
|
||||
display: flex;
|
||||
|
||||
margin-top: 20px;
|
||||
&-title{
|
||||
|
||||
padding-left: 6px;
|
||||
}
|
||||
&-content{
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
&-top{
|
||||
|
||||
&__num{
|
||||
font-weight: 600;
|
||||
}
|
||||
&__name{
|
||||
font-size: 10px;
|
||||
color: rgb(140,140,140);
|
||||
}
|
||||
}
|
||||
&-bottom{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
&-left{
|
||||
|
||||
&__num{
|
||||
font-weight: 600;
|
||||
}
|
||||
&__name{
|
||||
font-size: 10px;
|
||||
color: rgb(140,140,140);
|
||||
}
|
||||
}
|
||||
&-right{
|
||||
|
||||
&__num{
|
||||
font-weight: 600;
|
||||
}
|
||||
&__name{
|
||||
font-size: 10px;
|
||||
color: rgb(140,140,140);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&>div{
|
||||
flex: 1;
|
||||
margin-right: 20px;
|
||||
|
||||
&:last-child{
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.chart{
|
||||
display: flex;
|
||||
|
||||
margin-top: 50px;
|
||||
#col-chart {
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
flex: 1;
|
||||
height: 300px;
|
||||
margin-right: 30px;
|
||||
}
|
||||
#line-chart {
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
flex: 1;
|
||||
height: 300px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<div>
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="第三方结算对象">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<Input v-model="select.keyword" placeholder="关键字搜索" style="width: 200px; margin-right: 10px"/>
|
||||
<Button style="margin-left: 10px" type="primary" @click="select.page = 1,getList()">查询</Button>
|
||||
<Button style="margin-left: 10px" type="primary" @click="$refs['addobjects'].type = 'add',$refs['addobjects'].isShow = true">新建</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
|
||||
<xy-table
|
||||
:total="total"
|
||||
:list="list"
|
||||
:table-item="table"
|
||||
@editor="editor"
|
||||
@delete="destroy"></xy-table>
|
||||
|
||||
<add ref="addobjects" @refresh="getList" :types="types" :areas="areas"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getList,destroy} from '@/api/payUnit'
|
||||
import {getList as typeList} from '@/api/productType'
|
||||
import {getparameter} from '@/api/system/dictionary'
|
||||
|
||||
import add from "./component/addobjects"
|
||||
|
||||
export default {
|
||||
components:{
|
||||
add
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select:{
|
||||
page:1,
|
||||
page_size:10,
|
||||
keyword:''
|
||||
},
|
||||
types:[],
|
||||
areas:[],
|
||||
|
||||
total:0,
|
||||
list:[],
|
||||
table:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getTypes(){
|
||||
const res = await typeList({page:1,page_size:9999},false)
|
||||
this.types = res.data
|
||||
},
|
||||
async getAreas(){
|
||||
const res = await getparameter({number:'serveArea'},false)
|
||||
this.areas = res.detail
|
||||
},
|
||||
|
||||
async getList(){
|
||||
const res = await getList(this.select)
|
||||
this.total = res.total
|
||||
this.list = res.data
|
||||
console.log(this.list)
|
||||
},
|
||||
|
||||
editor(row){
|
||||
this.$refs['addobjects'].type = 'editor'
|
||||
this.$refs['addobjects'].id = row.id
|
||||
this.$refs['addobjects'].isShow = true
|
||||
},
|
||||
destroy(row){
|
||||
destroy(row.id).then(res => {
|
||||
this.$successMessage('destroy','')
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getTypes()
|
||||
this.getAreas()
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<div>
|
||||
<Modal :value="isShow" title="排班" width="48" @on-visible-change="e => $emit('update:isShow',e)">
|
||||
<template v-slot:default>
|
||||
<el-form ref="elForm" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="时间选择" prop="end_time">
|
||||
<div style="font-weight: 600">{{ date }}</div>
|
||||
<el-time-picker
|
||||
v-model="time"
|
||||
arrow-control
|
||||
end-placeholder="结束时间"
|
||||
is-range
|
||||
placeholder="选择时间范围"
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
style="width: 300px;"
|
||||
value-format="hh:mm:ss"
|
||||
@change="timePick">
|
||||
</el-time-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="护工选择" prop="nurse_id">
|
||||
<el-select v-model="form.nurse_id" placeholder="请选择护工" style="width: 300px;">
|
||||
<el-option v-for="(item,index) in nurses" :key="item.index" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务项目" prop="schedule_list_skus">
|
||||
<el-checkbox-group v-model="form.schedule_list_skus">
|
||||
<template v-for="(item) in skus">
|
||||
<el-checkbox :label="item.id">{{ item.name }}</el-checkbox>
|
||||
</template>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<template v-slot:footer>
|
||||
<Button @click="$emit('update:isShow',false)">取消</Button>
|
||||
<Button type="primary" @click="submit">确认</Button>
|
||||
</template>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {parseTime} from '@/utils'
|
||||
import {scheduleSave} from '@/api/schedule'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
customerId: [Number, String],
|
||||
orderId: [Number, String],
|
||||
productId: [Number, String],
|
||||
date: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
skus: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
nurses: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
customer_id: '',
|
||||
product_id: '',
|
||||
order_id: '',
|
||||
nurse_id: '',
|
||||
start_time:'',
|
||||
end_time: '',
|
||||
schedule_list_skus: []
|
||||
},
|
||||
time: [new Date(),new Date()],
|
||||
rules: {
|
||||
nurse_id: [
|
||||
{required: true, message: '请选择护工'}
|
||||
],
|
||||
start_time: [
|
||||
{required: true, message: '请选择开始时间'}
|
||||
],
|
||||
end_time: [
|
||||
{required: true, message: '请选择结束时间'}
|
||||
],
|
||||
schedule_list_skus: [
|
||||
{required: true, message: '请选择护理项目'}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
timePick(e) {
|
||||
this.form.start_time = `${this.date} ${e[0]}`
|
||||
this.form.end_time = `${this.date} ${e[1]}`
|
||||
},
|
||||
submit() {
|
||||
this.form.customer_id = this.customerId
|
||||
this.form.product_id = this.productId
|
||||
this.form.order_id = this.orderId
|
||||
let temp = this.form.schedule_list_skus.map(item => {
|
||||
return {sku_id: item}
|
||||
})
|
||||
this.form.schedule_list_skus = temp
|
||||
this.$refs['elForm'].validate().then(valid => {
|
||||
console.log(valid)
|
||||
if (valid) {
|
||||
scheduleSave(this.form).then(res => {
|
||||
this.$successMessage('add', '排班')
|
||||
this.$emit('update:isShow', false)
|
||||
}).catch(err => {
|
||||
this.$emit('update:isShow', false)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isShow(val) {
|
||||
if(val){
|
||||
this.form.start_time = `${this.date} ${parseTime(new Date(),'{h}:{i}:{s}')}`
|
||||
this.form.end_time = `${this.date} ${parseTime(new Date(),'{h}:{i}:{s}')}`
|
||||
}else{
|
||||
this.$refs['elForm'].resetFields()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
::v-deep .el-form-item__error {
|
||||
transform: none !important;
|
||||
left: 0 !important;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue