You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
3.3 KiB

3 years ago
<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"/>
3 years ago
<Button style="margin-left: 10px" type="primary" @click="select.page = 1,getList()">查询</Button>
3 years ago
</div>
</slot>
</lx-header>
</div>
<xy-table
:total="total"
:list="list"
3 years ago
:table-item="table"
@pageSizeChange="e => select.page_size = e"
@pageIndexChange="e => {select.page = e;getList()}">
3 years ago
<template v-slot:btns>
3 years ago
<el-table-column fixed="right" label="操作" width="68" header-align="center" align="center">
<template v-slot:default="scope">
3 years ago
<Button size="small" type="primary" @click="detail(scope)"></Button>
3 years ago
</template>
</el-table-column>
3 years ago
</template>
</xy-table>
3 years ago
3 years ago
<detailServe ref="detailServe"></detailServe>
3 years ago
</div>
</template>
<script>
import {getList} from '@/api/serveDetail'
import {parseTime} from "@/utils"
3 years ago
import detailServe from "@/views/finance/component/detailServe";
3 years ago
export default {
3 years ago
components:{
detailServe
},
3 years ago
data() {
return {
3 years ago
isShowDetail:false,
3 years ago
select:{
page:1,
page_size:10,
3 years ago
area_id:'',
3 years ago
keyword:''
},
types:[],
total:0,
list:[],
3 years ago
table:[
{
prop:'nurse.name',
label:'护工',
width:200
},
{
prop:'date',
label:'服务日期',
width: 200
},
{
label:'时间段',
3 years ago
width: 170,
3 years ago
customFn:(row) => {
return (
3 years ago
<div>{parseTime(new Date(row.start_time),'{h}:{i}')}~{parseTime(new Date(row.end_time),'{h}:{i}')}</div>
3 years ago
)
}
},
{
label:'订单编号',
prop:'no',
width: 240
},
{
prop:'customer.name',
label:'服务对象',
width: 200
},
{
label:'上门地址',
minWidth:300,
align:'left',
3 years ago
prop:'customer_address.address'
3 years ago
},
{
label:'服务状态',
prop:'status',
width: 180,
formatter:(cell,data,value) => {
switch (value){
case 0:
return '已排班未服务'
break;
case 1:
return '已排班未服务'
break;
case 2:
return '已服务'
break;
default:
return value
}
}
}
]
3 years ago
}
},
methods: {
3 years ago
detail(scope){
this.$refs['detailServe'].time = `${parseTime(new Date(scope.row.start_time),'{h}:{i}')} ~ ${parseTime(new Date(scope.row.end_time),'{h}:{i}')}`
this.$refs['detailServe'].id = scope.row.id
this.$refs['detailServe'].isShow = true
3 years ago
},
3 years ago
async getList(){
const res = await getList(this.select)
this.total = res.total
this.list = res.data
console.log(this.list)
},
},
mounted() {
this.getList()
}
}
</script>
<style scoped lang="scss">
</style>