lion 5 months ago
parent a3529db7fc
commit 4c68c89a14

@ -20,19 +20,26 @@
</span>
</div>
<div>
<div v-if="/Finance/g.test($route.path)">
<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>
<span>状态</span>
<div v-if="/Finance/g.test($route.path)">
<span>数据类型</span>
<span>
<Select v-model="select.check_type" style="width:80px">
<Option v-for="item in canCheck" :key="item.value" :value="item.value">{{ item.label }}</Option>
</Select>
</span>
</div>
<div v-if="/Finance/g.test($route.path)">
<span>财务审核状态</span>
<Select multiple @on-change="changeStatus" v-model="financial_status_options" style="width:240px" clearable>
<Option v-for="item in financialStatusList" :key="item.id" :value="item.id">{{ item.name }}</Option>
</Select>
</div>
<div>
<span>开始时间</span>
<span>
@ -61,7 +68,7 @@
</span>
</div>
<div>
<div v-if="!/Finance/g.test($route.path)">
<span>数据类型</span>
<span>
<Select v-model="select.auth_type" style="width:70px">
@ -103,7 +110,7 @@
@click="$router.push('/away/addAway')">新增</Button>
</div>
<div>
<Button type="primary" @click="getList"></Button>
<Button type="primary" @click="$refs.xyTable.clearSelection(),getList()"></Button>
</div>
<div v-if="!/Finance/g.test($route.path)">
<Button
@ -220,7 +227,7 @@
</Button>
</template> -->
<template v-if="/Finance/g.test($route.path)">
<Button
<!-- <Button
v-if="isAuthCanExpense(row)"
style="margin: 2px;"
size="small"
@ -236,7 +243,7 @@
ghost
@click="canExpense(row,0)"
>关闭报销
</Button>
</Button> -->
</template>
</template>
</el-table-column>
@ -278,7 +285,7 @@
</div>
</Modal>
<MultiExamine ref="MultiExamine" @refresh="$refs.xyTable.clearSelection(),getList"></MultiExamine>
<MultiExamine ref="MultiExamine" @refresh="$refs.xyTable.clearSelection(),getList()"></MultiExamine>
<MultiExamineList ref="MultiExamineList"></MultiExamineList>
</div>
</template>
@ -316,12 +323,12 @@ export default {
financialStatusList:[{
id:1,
name:'待确认'
},{
id:3,
name:'确认中'
},{
id:2,
name:'已确认'
},{
id:3,
name:'部分确认'
}],
select: {
keyword: '',
@ -330,9 +337,11 @@ export default {
auth_type: 1,
page: 1,
page_size: 10,
flow_link: [],
// flow_link: [],
check_type:1,
department_id: '',
financial_status:'1,3'
financial_status:/Finance/g.test(this.$route.path)?'1,3':'',
},
total: 0,
list: [],
@ -436,27 +445,55 @@ export default {
width: 100,
label: "财务审核",
customFn:row => {
return (row.FLOWSTATUS.financial.getStatus() === 2) ?
(<span style="color: green;">已确认</span>) :
(<span style="color: #666;">待审核</span>)
}
if(row.financial_status===1){
return (<span style="color:rgb(96, 109, 241)">待确认1</span>)
}else if(row.financial_status===3){
return (<span style="color:rgb(219, 122, 122)">确认中3</span>)
}else if(row.financial_status===2){
return (<span style="color:rgb(147, 201, 134)">已确认2</span>)
}else{
}
]
},
{
label: "状态",
width: 160,
prop: "financial_status",
customFn:row => {
return (
this.financialStatusList.map(i=>{
if(i.id===row.financial_status){
return (<span style="color: green;">{i.name}</span>)
// return (row.FLOWSTATUS.financial.getStatus() === 2) ?
// (<span style="color: green;"></span>) :
// (<span style="color: #666;"></span>)
// [-2, "rgb(140, 140, 140)"],
// [-1, "#dca550"],
// [2, "rgb(96, 109, 241)"],
// [0, "rgb(219, 122, 122)"],
// [1, "rgb(147, 201, 134)"]
// return (
// row.financial_status===1?(<span style="rgb(96, 109, 241)"></span>):
// (row.financial_status===3?(<span style="rgb(219, 122, 122)"></span>):
// (row.financial_status===2?(<span style="rgb(147, 201, 134)"></span>):'')
// )
// this.financialStatusList.map(i=>{
// if(i.id===row.financial_status){
// return (<span style="color: green;">{i.name}</span>)
// }
// })
// )
}
})
)
}
]
},
// {
// label: "",
// width: 160,
// prop: "financial_status",
// customFn:row => {
// return (
// this.financialStatusList.map(i=>{
// if(i.id===row.financial_status){
// return (<span style="color: green;">{i.name}</span>)
// }
// })
// )
// }
// },
{
label: "创建日期",
width: 160,
@ -602,6 +639,7 @@ export default {
},
async getList (isFirst) {
class Flow {
status = 0
executable = false
@ -627,7 +665,11 @@ export default {
return this.executable && (this.status === 2 || this.status === "")
}
}
const res = await index(this.select,!isFirst);
const res = await index({
...this.select,
"flow_link[0][custom_model_id]":/Finance/g.test(this.$route.path)&&this.select.check_type===1?78:'',
"flow_link[0][flow_status]": /Finance/g.test(this.$route.path)&&this.select.check_type===1?1:''
},!isFirst);
delete this.select.id;
this.total = res.total;
this.list = res.data;
@ -692,6 +734,18 @@ export default {
},
},
computed: {
canCheck(){
return [
{
value: 0,
label: '全部'
},
{
value: 1,
label: '可审核'
}
]
},
auths() {
if (/Finance/g.test(this.$route.path)) {
return [
@ -749,17 +803,20 @@ export default {
this.window.top = (window.screen.height - 30 - this.window.height) / 2;
this.window.left = (window.screen.width - 10 - this.window.width) / 2;
this.select.id = this.$route.query.awayId ?? '';
if (/Finance/g.test(this.$route.path)) {
this.select.auth_type = 0
this.select.check_type = 1
} else {
this.select.auth_type = 1
this.select.check_type = 0
}
this.getList(true)
window.onfocus = () => {
this.getList()
}
if (/Finance/g.test(this.$route.path)) {
this.select.auth_type = 0
} else {
this.select.auth_type = 1
}
},
destroyed() {
window.onfocus = null;

@ -7,18 +7,8 @@
>
<div slot="content"></div>
<slot>
<span style="padding: 0 6px; word-break: keep-all">创建日期</span>
<span>
<DatePicker
:value="selectDate"
placeholder="请选择日期"
type="date"
placement="bottom-start"
style="width: 180px"
@on-change="(e) => (selectDate = e)"
></DatePicker>
</span>
<div class="selects">
<div>
<span style="padding: 0 6px; word-break: keep-all">关键字</span>
<span>
<Input
@ -27,9 +17,15 @@
style="width: 180px"
></Input>
</span>
</div>
<div>
<span style="padding: 0 6px; word-break: keep-all">部门</span>
<el-select style="width: 140px" size="small" clearable v-model="select.department_id" placeholder="部门选择">
<el-option v-for="dept in departments" :value="dept.id" :label="dept.name"></el-option>
</el-select>
</div>
<div>
<span style="padding: 0 6px; word-break: keep-all">预算计划</span>
<span>
<Input
v-model="select.plan_name"
@ -40,7 +36,9 @@
@on-clear="clearSelectForSearch"
/>
</span>
<span style="padding: 0 6px; word-break: keep-all"> 状态 </span>
</div>
<div>
<span style="padding: 0 6px; word-break: keep-all"> 财务确认状态 </span>
<Select
v-model="status"
clearable
@ -58,23 +56,45 @@
{{ item.label }}
</Option>
</Select>
</div>
<div>
<span style="padding: 0 6px; word-break: keep-all">流转状态</span>
<el-select style="width: 100px" size="small" clearable v-model="select.flow_status" placeholder="状态选择">
<el-option value="" label="待申请"></el-option>
<el-option :value="0" label="流转中"></el-option>
<el-option :value="1" label="已办结"></el-option>
</el-select>
<span style="padding: 0 6px; word-break: keep-all">部门</span>
<el-select style="width: 140px" size="small" clearable v-model="select.department_id" placeholder="部门选择">
<el-option v-for="dept in departments" :value="dept.id" :label="dept.name"></el-option>
</el-select>
<Button type="primary" style="margin-left: 10px" ghost>重置</Button>
<Button type="primary" style="margin-left: 10px" @click="doSearch()"
</div>
<div>
<span style="padding: 0 6px; word-break: keep-all">创建日期</span>
<span>
<DatePicker
:value="selectDate"
placeholder="请选择日期"
type="date"
placement="bottom-start"
style="width: 180px"
@on-change="(e) => (selectDate = e)"
></DatePicker>
</span>
</div>
<div>
<Button type="primary" @click="doSearch()"
>查询</Button
>
<Button type="primary" @click="toExport()" style="margin-left: 10px"
</div>
<div>
<Button type="primary" ghost>重置</Button>
</div>
<div>
<Button type="primary" @click="toExport()"
>导出</Button
>
</div>
</div>
</slot>
</lx-header>
@ -155,7 +175,7 @@
>审核确认</Button
>
</template>
<template v-else>
<!-- <template v-else>
<Button
size="small"
type="error"
@ -164,7 +184,7 @@
@click="cancelExamine(scope.row)"
>审核撤销</Button
>
</template>
</template> -->
</template>
</el-table-column>
</template>
@ -267,6 +287,13 @@ export default {
[0, "流转中"],
[1, "已办结"]
]),
flowStatusColor: new Map([
[-2, "rgb(140, 140, 140)"],
[-1, "#dca550"],
[2, "rgb(96, 109, 241)"],
[0, "rgb(219, 122, 122)"],
[1, "rgb(147, 201, 134)"]
]),
pageIndex: 1,
pageSize: 10,
table: [
@ -327,22 +354,31 @@ export default {
prop: "type",
width: 120,
},
{
prop: "status",
label: "状态",
width: 100,
formatter: (cell, data, value) => {
if (value === 0) return "待审核";
else return "已审核";
},
},
{
prop: 'fund_log_flow_links',
label: '流程状态',
formatter: (cell, data, value) => {
return this.flowStatus.get(value.find(i => i.tag === 'pay')?.flow_status)
customFn:row => {
return (
<span style={'color:'+this.flowStatusColor.get(row.fund_log_flow_links.find(i => i.tag === 'pay')?.flow_status)
}>{this.flowStatus.get(row.fund_log_flow_links.find(i => i.tag === 'pay')?.flow_status)}</span>)
}
// formatter: (cell, data, value) => {
// return this.flowStatus.get(value.find(i => i.tag === 'pay')?.flow_status)
// }
},
{
prop: "status",
label: "财务确认状态",
width: 100,
customFn:row => {
return (row.status === 0) ?
(<span style="color:rgb(96, 109, 241)">待审核</span>) :
(<span style="color: rgb(147, 201, 134)">已审核</span>)
}
},
{
label: "次数",
prop: "pay_count",
@ -415,7 +451,7 @@ export default {
this.getBudgets();
},
doSearch() {
this.pageIndex = 0;
this.pageIndex = 1;
this.getFundLogs();
},
confirmPlanForSearch() {
@ -575,4 +611,19 @@ export default {
};
</script>
<style scoped lang="scss"></style>
<style scoped lang="scss">
.selects {
display: flex;
flex-wrap: wrap;
& > div {
margin-bottom: 6px;
margin-right: 4px;
& > span {
word-break: keep-all;
padding: 0 4px ;
}
}
}
</style>

Loading…
Cancel
Save