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.
106 lines
2.2 KiB
106 lines
2.2 KiB
<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">查询</Button>
|
|
</div>
|
|
</slot>
|
|
</lx-header>
|
|
</div>
|
|
|
|
<xy-table
|
|
:total="total"
|
|
:list="list"
|
|
:table-item="table">
|
|
<template v-slot:btns>
|
|
<div></div>
|
|
</template>
|
|
</xy-table>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {salaryList as getList} from '@/api/worker'
|
|
import {parseTime} from "@/utils"
|
|
|
|
export default {
|
|
|
|
data() {
|
|
return {
|
|
select:{
|
|
page:1,
|
|
page_size:10,
|
|
keyword:''
|
|
},
|
|
types:[],
|
|
|
|
total:0,
|
|
list:[],
|
|
table:[
|
|
{
|
|
label:'姓名',
|
|
width:140,
|
|
fixed:'left',
|
|
prop:'name'
|
|
},
|
|
{
|
|
label:'明细',
|
|
customFn:(row)=>{
|
|
return (
|
|
<div style={{'display':'flex'}}>
|
|
{
|
|
row.data.map(item => {
|
|
return (
|
|
<div style={{'border':'1px #000 solid'}}>
|
|
<div style={{'border-bottom':'1px #000 solid'}}>{item.date}</div>
|
|
<div>{item.money}元</div>
|
|
</div>
|
|
)
|
|
})
|
|
}
|
|
</div>
|
|
)
|
|
}
|
|
},
|
|
{
|
|
label:'合计',
|
|
width: 160,
|
|
align:'right',
|
|
customFn:(row)=>{
|
|
let total = 0;
|
|
row.data.map(item => {
|
|
total += item.money
|
|
})
|
|
return (
|
|
<div>
|
|
{total}
|
|
</div>
|
|
)
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
methods: {
|
|
|
|
async getList(){
|
|
const res = await getList(this.select)
|
|
console.log(res)
|
|
this.total = res.length ?? 0
|
|
this.list = res
|
|
},
|
|
},
|
|
mounted() {
|
|
this.getList()
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
</style>
|