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.

254 lines
6.5 KiB

3 years ago
<!--我的报销,报销列表,其他支出-->
3 years ago
<template>
<div style="padding: 0 20px">
<lx-header
icon="md-apps"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
text="我的报销"
>
<div slot="content"></div>
<slot>
3 years ago
<div class="select-bar">
<div>
<span style="padding: 0 6px">创建日期</span>
<span>
3 years ago
<DatePicker
:value="select.year"
3 years ago
placeholder="选择开始日期"
3 years ago
placement="bottom"
3 years ago
style="width: 114px"
type="date"
@on-change="(e) => (select.year = e)"
></DatePicker>
<DatePicker
:value="select.year"
placeholder="选择结束日期"
placement="bottom"
style="width: 114px;margin-left: 6px;"
type="date"
3 years ago
@on-change="(e) => (select.year = e)"
></DatePicker>
</span>
3 years ago
</div>
<div>
<span style="padding: 0 6px"> 项目类型 </span>
<span>
<Select
v-model="select.type"
clearable
placeholder="选择项目类型"
style="width: 130px"
>
<Option v-for="item in types" :key="item.id" :value="item.id">{{
item.value }}
</Option>
</Select>
</span>
</div>
<div>
<span style="padding: 0 6px"> 科室 </span>
<span>
<Select
placeholder="科室选择"
clearable
v-model="select.department"
style="width: 130px"
>
<Option v-for="item in departments" :key="item.id" :value="item.id">{{ item.name }}</Option>
</Select>
</span>
</div>
3 years ago
3 years ago
<div>
<span style="padding: 0 6px"> 报销类型 </span>
<span>
3 years ago
<Select
v-model="select.type"
clearable
3 years ago
placeholder="选择报销类型"
3 years ago
style="width: 130px"
>
<Option v-for="item in types" :key="item.id" :value="item.id">{{
item.value
}}</Option>
</Select>
</span>
3 years ago
</div>
3 years ago
3 years ago
<div>
<span style="padding: 0 6px"> 报销金额 </span>
<span>
<InputNumber
style="width: 110px;"
placeholder="最低价"
v-model="select.end_money"
:formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="value => value.replace(/\s?|(,*)/g, '')"></InputNumber>
<InputNumber
style="width: 110px;margin-left: 6px;"
placeholder="最高价"
v-model="select.end_money"
:formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="value => value.replace(/\s?|(,*)/g, '')"></InputNumber>
</span>
</div>
<div>
<span style="padding: 0 6px"> 状态 </span>
<span>
<Select
v-model="select.type"
3 years ago
clearable
3 years ago
placeholder="选择状态"
style="width: 110px"
3 years ago
>
3 years ago
<Option v-for="item in types" :key="item.id" :value="item.id">{{
item.value
}}</Option>
</Select>
3 years ago
</span>
3 years ago
</div>
3 years ago
3 years ago
<Button style="margin-left: 10px" type="primary" @click="$refs['addExpenseAccount'].type= 'add',$refs['addExpenseAccount'].show()"
3 years ago
>新增</Button
>
<Button style="margin-left: 10px" type="primary" @click=""
>查询</Button
>
<Button
style="margin-left: 10px"
type="primary"
@click="
() => (select = { page: 1, year: '', type: '', department: '' })
"
>重置
</Button>
</div>
</slot>
</lx-header>
<xy-table></xy-table>
<div style="display: flex;justify-content: flex-end;padding: 10px 0;">
<Page :total="total" @on-change="" show-elevator show-sizer @on-page-size-change="" />
</div>
3 years ago
<addExpenseAccount :other_types="otherType" :departments="departments" ref="addExpenseAccount"></addExpenseAccount>
3 years ago
</div>
</template>
<script>
3 years ago
import { getparameter } from '@/api/system/dictionary'
3 years ago
import { listdeptNoAuth } from '@/api/system/department'
3 years ago
import addExpenseAccount from '@/views/inOut/component/addExpenseAccount.vue'
3 years ago
export default {
3 years ago
components: {
addExpenseAccount
},
3 years ago
data() {
return {
3 years ago
otherType: [],
3 years ago
total: 0,
select: {
},
types: [],
departments: [],
table: [
{
prop: '',
label: '项目名称',
width: 180,
fixed: 'left'
},
{
prop: '',
label: '报销类型',
width: 160,
},
{
prop: '',
label: '资金来源',
width: 160,
},
{
prop: '',
label: '报销金额(元)',
width: 140,
align: 'right'
},
{
prop: '',
label: '实际报销金额(元)',
width: 140,
align: 'right'
},
{
prop: '',
label: '已付金额',
width: 140,
align: 'right'
},
{
prop: 'department.name',
label: '业务科室',
width: 140
},
{
prop: '',
label: '状态',
width: 140
},
{
prop: 'admin.name',
label: '经办人',
width: 140
},
{
prop: 'created_at',
label: '创建日期',
width: 180
}
]
}
},
methods: {
async getDepartment() {
this.departments = await listdeptNoAuth()
},
3 years ago
async getOtherType () {
const res = await getparameter({
number: 'other_type'
})
this.otherType = res.detail
}
3 years ago
},
computed: {},
created() {
this.getDepartment()
3 years ago
this.getOtherType()
3 years ago
},
beforeRouteEnter (to, from , next) {
console.log(to.path.split('_')[1])
next()
}
}
</script>
<style scoped lang="scss">
3 years ago
.select-bar {
display: flex;
flex-wrap: wrap;
align-items: center;
& > div {
margin: 4px;
}
}
3 years ago
</style>