lion 5 months ago
parent a3529db7fc
commit 4c68c89a14

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

@ -7,74 +7,94 @@
> >
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<span style="padding: 0 6px; word-break: keep-all">创建日期</span> <div class="selects">
<span> <div>
<DatePicker <span style="padding: 0 6px; word-break: keep-all">关键字</span>
:value="selectDate" <span>
placeholder="请选择日期" <Input
type="date" v-model="keyword"
placement="bottom-start" placeholder="请输入关键字"
style="width: 180px" style="width: 180px"
@on-change="(e) => (selectDate = e)" ></Input>
></DatePicker> </span>
</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"
clearable
placeholder="请选择预算计划"
@on-focus="showPlanForSearch"
style="width: 200px"
@on-clear="clearSelectForSearch"
/>
</span>
</div>
<div>
<span style="padding: 0 6px; word-break: keep-all"> 财务确认状态 </span>
<Select
v-model="status"
clearable
placeholder="请选择"
style="width: 100px"
>
<Option
v-for="item in [
{ label: '待审核', value: 0 },
{ label: '已审核', value: 1 },
]"
:key="item.value"
:value="item.value"
>
{{ 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>
</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
>
</div>
<div>
<Button type="primary" ghost>重置</Button>
</div>
<div>
<Button type="primary" @click="toExport()"
>导出</Button
>
</div>
</div>
<span style="padding: 0 6px; word-break: keep-all">关键字</span>
<span>
<Input
v-model="keyword"
placeholder="请输入关键字"
style="width: 180px"
></Input>
</span>
<span style="padding: 0 6px; word-break: keep-all">预算计划</span>
<span>
<Input
v-model="select.plan_name"
clearable
placeholder="请选择预算计划"
@on-focus="showPlanForSearch"
style="width: 200px"
@on-clear="clearSelectForSearch"
/>
</span>
<span style="padding: 0 6px; word-break: keep-all"> 状态 </span>
<Select
v-model="status"
clearable
placeholder="请选择"
style="width: 100px"
>
<Option
v-for="item in [
{ label: '待审核', value: 0 },
{ label: '已审核', value: 1 },
]"
:key="item.value"
:value="item.value"
>
{{ item.label }}
</Option>
</Select>
<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()"
>查询</Button
>
<Button type="primary" @click="toExport()" style="margin-left: 10px"
>导出</Button
>
</slot> </slot>
</lx-header> </lx-header>
@ -155,7 +175,7 @@
>审核确认</Button >审核确认</Button
> >
</template> </template>
<template v-else> <!-- <template v-else>
<Button <Button
size="small" size="small"
type="error" type="error"
@ -164,7 +184,7 @@
@click="cancelExamine(scope.row)" @click="cancelExamine(scope.row)"
>审核撤销</Button >审核撤销</Button
> >
</template> </template> -->
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
@ -267,6 +287,13 @@ export default {
[0, "流转中"], [0, "流转中"],
[1, "已办结"] [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, pageIndex: 1,
pageSize: 10, pageSize: 10,
table: [ table: [
@ -327,22 +354,31 @@ export default {
prop: "type", prop: "type",
width: 120, width: 120,
}, },
{
prop: "status",
label: "状态",
width: 100,
formatter: (cell, data, value) => {
if (value === 0) return "待审核";
else return "已审核";
},
},
{ {
prop: 'fund_log_flow_links', prop: 'fund_log_flow_links',
label: '流程状态', label: '流程状态',
formatter: (cell, data, value) => { customFn:row => {
return this.flowStatus.get(value.find(i => i.tag === 'pay')?.flow_status) 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: "次数", label: "次数",
prop: "pay_count", prop: "pay_count",
@ -415,7 +451,7 @@ export default {
this.getBudgets(); this.getBudgets();
}, },
doSearch() { doSearch() {
this.pageIndex = 0; this.pageIndex = 1;
this.getFundLogs(); this.getFundLogs();
}, },
confirmPlanForSearch() { confirmPlanForSearch() {
@ -575,4 +611,19 @@ export default {
}; };
</script> </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