master
xy 9 months ago
parent f97091b251
commit e24aada42c

@ -6,7 +6,9 @@
type="normal" type="normal"
title="出差审批" title="出差审批"
> >
<xy-table :table-item="table"></xy-table> <xy-table :table-item="table" :list="records">
<template #btns> </template>
</xy-table>
</xy-dialog> </xy-dialog>
</div> </div>
</template> </template>
@ -18,34 +20,38 @@ export default {
isShow: false, isShow: false,
table: [ table: [
{ {
prop: '', prop: 'plan',
label: '资金来源' label: '资金来源'
}, },
{ {
prop: '', prop: 'title',
label: '年份' label: '事由',
minWidth: 180,
align: 'left'
}, },
{ {
prop: '', prop: 'start_date',
label: '科室' label: '开始日期',
width: 120
}, },
{ {
prop: '', prop: 'end_date',
label: '姓名' label: '结束日期',
width: 120
}, },
{ {
prop: '', prop: 'flow_title',
label: '报销金额' label: '编号',
width: 140,
formatter: (row) => row.away_flow_links?.find(i => i.tag === "chuchaibaoxiao")?.flow_title
}, },
{ {
prop: '', prop: 'totalAmt',
label: '日期区间' label: '金额',
}, formatter: (row) => row.away_flow_links?.find(i => i.tag === "chuchaibaoxiao")?.flow_data?.totalAmt
{ }
prop: '', ],
label: '状态' records: []
},
]
} }
}, },
methods: { methods: {
@ -55,6 +61,10 @@ export default {
hidden() { hidden() {
this.isShow = false; this.isShow = false;
}, },
setRecords(records = []) {
this.records = records
console.log(this.records)
}
}, },
computed: {}, computed: {},
} }

@ -20,16 +20,23 @@
</span> </span>
</div> </div>
<div>
<span>部门</span>
<Select v-model="select.department_id" style="width:120px" clearable>
<Option v-for="item in departments" :key="item.id" :value="item.id">{{ item.name }}</Option>
</Select>
</div>
<div> <div>
<span>开始时间</span> <span>开始时间</span>
<span> <span>
<DatePicker <DatePicker
:value="select.start_year" :value="select.search_start_date"
placeholder="选择开始时间" placeholder="选择开始时间"
placement="bottom" placement="bottom"
format="yyyy-MM-dd" format="yyyy-MM-dd"
style="width: 120px" style="width: 120px"
@on-change="(e) => (select.start_year = $moment(e).format('YYYY-MM-DD'))" @on-change="(e) => (select.search_start_date = $moment(e).format('YYYY-MM-DD'))"
></DatePicker> ></DatePicker>
</span> </span>
</div> </div>
@ -38,12 +45,12 @@
<span>结束时间</span> <span>结束时间</span>
<span> <span>
<DatePicker <DatePicker
:value="select.end_year" :value="select.search_end_date"
placeholder="选择结束时间" placeholder="选择结束时间"
placement="bottom" placement="bottom"
format="yyyy-MM-dd" format="yyyy-MM-dd"
style="width: 120px" style="width: 120px"
@on-change="(e) => (select.end_year = $moment(e).format('YYYY-MM-DD'))" @on-change="(e) => (select.search_end_date = $moment(e).format('YYYY-MM-DD'))"
></DatePicker> ></DatePicker>
</span> </span>
</div> </div>
@ -92,7 +99,7 @@
<div> <div>
<Button type="primary" @click="getList"></Button> <Button type="primary" @click="getList"></Button>
</div> </div>
<div> <div v-if="!/Finance/g.test($route.path)">
<Button <Button
type="primary" type="primary"
@click="goExpense()" @click="goExpense()"
@ -102,7 +109,7 @@
<div v-if="/Finance/g.test($route.path)"> <div v-if="/Finance/g.test($route.path)">
<Button <Button
type="primary" type="primary"
@click="$refs['MultiExamine'].show()" @click="showMulti"
>批量确认 >批量确认
</Button> </Button>
</div> </div>
@ -269,6 +276,7 @@ import addAway from "@/views/away/component/addAway.vue"
import { index, destroy, save } from "@/api/away"; import { index, destroy, save } from "@/api/away";
import {getToken} from "@/utils/auth"; import {getToken} from "@/utils/auth";
import {flowStatusConfig} from "@/api/common"; import {flowStatusConfig} from "@/api/common";
import {listdeptNoAuth} from "@/api/system/department";
export default { export default {
components: { components: {
@ -287,14 +295,16 @@ export default {
top: 0, top: 0,
left: 0, left: 0,
}, },
departments: [],
select: { select: {
keyword: '', keyword: '',
start_year: "", search_start_date: "",
end_year: "", search_end_date: "",
auth_type: 1, auth_type: 1,
page: 1, page: 1,
page_size: 10, page_size: 10,
flow_link: [] flow_link: [],
department_id: '',
}, },
total: 0, total: 0,
list: [], list: [],
@ -317,7 +327,7 @@ export default {
type: 'selection', type: 'selection',
width: 54, width: 54,
reserveSelection: true, reserveSelection: true,
selectable: row => row.FLOWSTATUS.expense.isEnabled(), selectable: row => row.FLOWSTATUS.expense.getStatus() === 1 && row.FLOWSTATUS.financial.getStatus() !== 2,
fixed: "left" fixed: "left"
}, },
{ {
@ -355,51 +365,6 @@ export default {
{ {
label: "流程状态", label: "流程状态",
multiHd: [ multiHd: [
// {
// width: 100,
// label: "",
// customFn:row => {
// if (!row.use_car) {
// return (
// <span style="color: rgb(140, 140, 140);">-</span>
// )
// }
// return (
// <div>
// <span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.useCar.getStatus()) }}>{ this.flowStatus.get(row.FLOWSTATUS.useCar.getStatus()) || '' }</span>
// <br/>
// {
// (row.FLOWSTATUS.useCar.getStatus() > 1) ? <a style="color: #333" on={{['click']:()=>{
// this.toOaDetail('useCar',row,)
// }}}></a> : ''
// }
// </div>
// )
// }
// },
// {
// width: 100,
// label: "",
// customFn:row => {
// if (!row.is_subsidize) {
// return (
// <span style="color: rgb(140, 140, 140);">-</span>
// )
// }
// return (
// <div>
// <span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.subsidize.getStatus()) }}>{ this.flowStatus.get(row.FLOWSTATUS.subsidize.getStatus()) || '' }</span>
// <br/>
// {
// (row.FLOWSTATUS.subsidize.getStatus() > 1) ? <a style="color: #333" on={{['click']:()=>{
// this.toOaDetail('subsidize',row)
// }}}></a> : ''
// }
// </div>
// )
// }
//
// },
{ {
width: 100, width: 100,
label: "出差审批", label: "出差审批",
@ -472,6 +437,13 @@ export default {
} }
}, },
methods: { methods: {
showMulti() {
this.$refs['MultiExamine'].setRecords(this.$refs['xyTable'].getSelection())
this.$refs['MultiExamine'].show()
},
async getDepartment() {
this.departments = (await listdeptNoAuth())?.data;
},
async getFlowConfig() { async getFlowConfig() {
try { try {
const res = await flowStatusConfig() const res = await flowStatusConfig()
@ -710,6 +682,7 @@ export default {
} }
}, },
created() { created() {
this.getDepartment();
this.getFlowConfig(); this.getFlowConfig();
this.window.width = screen.availWidth * 0.95; this.window.width = screen.availWidth * 0.95;
this.window.height = screen.availHeight * 0.95; this.window.height = screen.availHeight * 0.95;

Loading…
Cancel
Save