master
271556543@qq.com 3 years ago
parent 4457094c83
commit 6022c6161d

@ -191,7 +191,7 @@ export default {
}
::v-deep .el-input__clear{
position: relative;
right: 30px;
right: 46px;
z-index: 2;
}
}

@ -240,7 +240,7 @@ export default {
setSchedule(array){
this.form.schedule_links = array
this.form.account_id = array[0]?.orders.account_id
this.form.account_id = Number(array[0]?.orders.account_id)
array.forEach(item => {
this.form.money += Number(item.orders.unit_price)
})

@ -82,8 +82,8 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>服务次数
</div>
<div class="xy-table-item-content">
<el-input-number v-model="form.service_times" :controls="false" :precision="0" clearable
placeholder="请输入服务次数" style="width: 300px;"/>
<el-input-number v-model="form.service_times" :controls="false" :precision="0"
placeholder="请输入服务次数" style="width: 300px;" @blur="totalComputed"/>
</div>
</div>
</template>
@ -94,8 +94,8 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>单次单价
</div>
<div class="xy-table-item-content xy-table-item-price">
<el-input-number v-model="form.unit_price" :controls="false" :precision="2" clearable
placeholder="请输入单次单价" style="width: 300px;"/>
<el-input-number v-model="form.unit_price" :controls="false" :precision="2"
placeholder="请输入单次单价" style="width: 300px;" @blur="totalComputed"/>
</div>
</div>
</template>
@ -105,8 +105,8 @@
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>总计时长
</div>
<div class="xy-table-item-content">
<el-input v-model="form.total_time" clearable
<div class="xy-table-item-content xy-table-item-min">
<el-input v-model="form.total_time"
placeholder="请输入总计时长" style="width: 300px;"/>
</div>
</div>
@ -118,7 +118,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>总计金额
</div>
<div class="xy-table-item-content xy-table-item-price">
<el-input v-model="form.total_money" clearable
<el-input-number :precision="2" :controls="false" v-model="form.total_money"
placeholder="请输入总计金额" style="width: 300px;"/>
</div>
</div>
@ -289,6 +289,13 @@ export default {
this.customSelect.page++
this.getCustomers()
},
totalComputed(){
if(this.form.service_times && this.form.unit_price){
this.form.total_money = this.form.service_times * this.form.unit_price
}
},
async getCustomers() {
const res = await customList(this.customSelect, false)
if (res.data.data.length === 0) {

@ -67,7 +67,25 @@ export default {
{
prop:'cycle',
label:'服务周期',
width: 160
width: 160,
formatter:(cell,data,value)=>{
switch (value){
case 1:
return '年'
break;
case 2:
return '月'
break;
case 3:
return '周'
break;
case 4:
return '次'
break;
default:
return value
}
}
},
{
prop:'purchase_price',

@ -113,6 +113,7 @@
</template>
<script>
import moment from 'moment'
import {parseTime} from '@/utils'
import {customerDetail} from '@/api/schedule'
@ -202,7 +203,7 @@ export default {
},
computed: {
ageComputed() {
return new Date().getFullYear() - new Date(this.detail.customer.birthday).getFullYear()
return moment().diff(moment(this.detail.customer.birthday).format(),'year')
},
defaultAddress(){
return function (adds){

@ -9,7 +9,6 @@
size="small"
value-format="HH:mm:ss"
v-model="form.start_time"
arrow-control
:picker-options="{
selectableRange: '00:00:00 - 23:59:59'
}"
@ -20,7 +19,6 @@
size="small"
value-format="HH:mm:ss"
v-model="form.end_time"
arrow-control
:picker-options="{
selectableRange: '00:00:00 - 23:59:59'
}"

@ -0,0 +1,121 @@
<template>
<div class="box">
<div>
<i class="el-icon-data-line"></i>
<span>产品收入统计</span>
</div>
<div id="bar-chart"></div>
<div class="detail">
<div>长护险重症: 100000</div>
<div>长护险中度: 150000</div>
<div>残疾人照护: 200000</div>
<div> 80+老人照护: 400000</div>
<div>自营单次: 5000</div>
<div>自营月度4次包: 6000</div>
</div>
</div>
</template>
<script>
import echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
export default {
data() {
return {
chart: null
}
},
mounted() {
this.$nextTick(() => {
this.init()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
init() {
this.chart = echarts.init(document.getElementById('bar-chart'))
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {},
grid: {
top: '6%',
left: '3%',
right: '6%',
bottom: '12%',
containLabel: true
},
xAxis: {
type: 'value',
axisLabel: {
color: '#B7B9BF'
},
axisLine: {
show: false,
}
},
yAxis: {
type: 'category',
axisLine: {
lineStyle: {
color: '#B7B9BF',
width: '2'
}
},
data: ['自营月度4次包', '自营单次', '80岁+老人照护', '残疾人照护', '长护险中度', '长护险重症']
},
series: [
{
type: 'bar',
data: [6003, 5041, 4237, 3751, 2001, 1096],
itemStyle: {
normal: {
color: '#009DFF',
},
},
}
]
})
}
}
}
</script>
<style lang="scss" scoped>
.box {
flex: 1;
background: #fff;
border-radius: 10px;
padding: 20px;
#bar-chart {
box-sizing: border-box;
min-height: 240px;
}
.detail{
&>div{
border-bottom: 1px rgba(210,210,210,0.7) solid;
padding: 6px 8px;
margin: 0 20px;
}
}
}
</style>

@ -0,0 +1,156 @@
<template>
<div class="box">
<div>
<i class="el-icon-coin"></i>
<span>板块收入统计</span>
</div>
<div id="doughnut-chart"/>
<div class="detail">
<div>
长护险: 10000
</div>
<div>
80+老人照护: 10000
</div>
<div>
自营商业: 10000
</div>
<div>
总计: 30000
</div>
</div>
</div>
</template>
<script>
import echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
export default {
data() {
return {
chart: null
}
},
mounted() {
this.$nextTick(() => {
this.init()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
init() {
this.chart = echarts.init(document.getElementById('doughnut-chart'))
this.chart.setOption({
tooltip: {
trigger: 'item'
},
legend: {
top: '3%',
left: 'center'
},
series: [
{
type: 'pie',
radius: ['46%', '70%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: '15',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{
value: 10408,
name: '长护险',
itemStyle: {
normal: {
color: '#00A82A'
},
},
},
{
value: 20000,
name: '残疾人照护',
itemStyle: {
normal: {
color: '#FF8522'
},
},
},
{
value: 9622,
name: '80岁+老人照护',
itemStyle: {
normal: {
color: '#2B50FF'
},
},
},
{
value: 4842,
name: '自营商业',
itemStyle: {
normal: {
color: '#F2A300'
},
},
},
]
}
]
})
}
}
}
</script>
<style lang="scss" scoped>
.box {
flex: 1;
background: #fff;
border-radius: 10px;
padding: 20px;
margin-right: 40px;
#doughnut-chart {
box-sizing: border-box;
min-height: 240px;
}
.detail{
&>div{
border-bottom: 1px rgba(210,210,210,0.7) solid;
padding: 6px 8px;
margin: 0 20px;
}
}
}
</style>

@ -0,0 +1,27 @@
<template>
<div>
<div style="display: flex;margin-top: 20px">
<doughnutChart></doughnutChart>
<barChart></barChart>
</div>
</div>
</template>
<script>
import doughnutChart from './components/doughnutChart'
import barChart from "./components/barChart";
export default {
components:{
doughnutChart,
barChart
},
data() {
return {}
},
methods: {},
}
</script>
<style scoped lang="scss">
</style>

@ -0,0 +1,17 @@
<template>
<div>
</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
}
</script>
<style scoped lang="scss">
</style>
Loading…
Cancel
Save