49 changed files with 1036 additions and 338 deletions
@ -0,0 +1,378 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<!-- Start 列表页面 --> |
||||
|
<div> |
||||
|
<button-bar view-title="待付款列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
||||
|
<el-form-item label="状态"> |
||||
|
<el-select v-model="listQuery.params.state" placeholder="请选择" clearable class="addinputw"> |
||||
|
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="款项类别"> |
||||
|
<el-select v-model="listQuery.params.costTypeKey" placeholder="请选择" clearable class="addinputw"> |
||||
|
<el-option v-for="item in costType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="款项名称"> |
||||
|
<el-select v-model="listQuery.params.costTitleKey" placeholder="请选择" clearable class="addinputw"> |
||||
|
<el-option v-for="item in costTitle_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="审批日期"> |
||||
|
<el-date-picker v-model="listQuery.params.createStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
||||
|
<span style="padding: 0 8px">至</span> |
||||
|
<el-date-picker v-model="listQuery.params.createEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" @click="handleFilter" icon="el-icon-search" size="small">查询</el-button> |
||||
|
<el-button type="primary" @click="handleReset" icon="el-icon-refresh" size="small">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">待付款列表</div> |
||||
|
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
||||
|
</div> |
||||
|
<div class=""> |
||||
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column width="50" fixed type="selection" align="center"/> |
||||
|
<el-table-column width="80" fixed label="序号" type="index" :index="indexMethod" align="center"/> |
||||
|
<el-table-column label="操作" fixed width="100" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="handlePrint(scope.row)">审批下载</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="状态" width="80" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.state }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="审批日期" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.createTime }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="款项类别" align="center" width="90"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.costTypeValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="款项名称" align="center" width="90"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.costTitleValue }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="收款单位名称" align="center" min-width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.receiveCompany }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="收款账号" align="center" width="130"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.receiveBankAccount }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="收款账户开户行" align="center" min-width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.receiveBank }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="金额" align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.cost }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="开户名称" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.payBank }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="付款账号" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.payBankAccount }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="付款备注" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.payRemark }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="付款人" align="center" width="90"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.name }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="付款日期" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.payDate }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="付款凭证" align="center" class-name="small-padding fixed-width" width="90"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button v-show="scope.row.payFiles" size="mini" type="primary" @click="handleGetCheck(scope.row)">查看</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<div class="pages"> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 列表页面 --> |
||||
|
<!-- 照片弹窗 --> |
||||
|
<el-dialog title="" :visible.sync="dialogImgVisible" :append-to-body="true"> |
||||
|
<el-form> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-form-item> |
||||
|
<el-image style="width: 178px;height: 178px;" v-for="(item) in url_list" @click="open(item)" :src="item"></el-image> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
</el-dialog> |
||||
|
<el-dialog :visible.sync="dialogUrlVisible" :append-to-body="true"> |
||||
|
<img width="100%" :src="dialogUrl" alt=""> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import { typeValues } from '@/api/jichuxinxi/dictcommons' |
||||
|
import req from '@/api/anruifinmanagement/chunafukuan/cashier' |
||||
|
import { getStorage } from '@/utils/auth' |
||||
|
|
||||
|
export default { |
||||
|
name: 'DaiFuKuan', |
||||
|
components: { |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
ButtonBar |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
submitdisabled: false, |
||||
|
btnList: [ |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
dialogImgVisible: false, |
||||
|
dialogUrlVisible: false, |
||||
|
// 查询条件 ----------- |
||||
|
tableKey: 0, |
||||
|
list: [], |
||||
|
dialogUrl: '', |
||||
|
url_list: [], |
||||
|
sids: [], |
||||
|
state_list: [ |
||||
|
{ |
||||
|
dictKey: 1, |
||||
|
dictValue: '未支付' |
||||
|
}, |
||||
|
{ |
||||
|
dictKey: 2, |
||||
|
dictValue: '已支付' |
||||
|
}, |
||||
|
{ |
||||
|
dictKey: 3, |
||||
|
dictValue: '已作废' |
||||
|
} |
||||
|
], |
||||
|
costType_list: [], |
||||
|
costTitle_list: [], |
||||
|
FormLoading: false, |
||||
|
listLoading: false, |
||||
|
listQuery: { |
||||
|
params: { |
||||
|
costTitleKey: '', |
||||
|
costTypeKey: '', |
||||
|
createEndDate: '', |
||||
|
createStartDate: '', |
||||
|
state: '', |
||||
|
userSid: '', |
||||
|
orgPath: '' |
||||
|
}, |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0 |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
// 初始化变量 |
||||
|
this.init() |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
||||
|
switch (btnKey) { |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
init() { |
||||
|
typeValues({ type: 'payCostType' }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.costType_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
typeValues({ type: 'payCostTitle' }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.costTitle_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
this.getList() |
||||
|
}, |
||||
|
handleSelectionChange(row) { |
||||
|
console.log('aaa', row) |
||||
|
const aa = [] |
||||
|
row.forEach(element => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
console.log('获取sids数组', this.sids) |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
// 查询列表信息 |
||||
|
getList() { |
||||
|
this.listLoading = true |
||||
|
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
||||
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
||||
|
req.listPageCJCX(this.listQuery).then((response) => { |
||||
|
console.log('列表查询结果:', response) |
||||
|
this.listLoading = false |
||||
|
if (response.success) { |
||||
|
this.list = response.data.records |
||||
|
this.listQuery.total = response.data.total |
||||
|
} else { |
||||
|
this.list = [] |
||||
|
this.listQuery.total = 0 |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 查询按钮 |
||||
|
handleFilter() { |
||||
|
this.listQuery.current = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
handleReset() { |
||||
|
this.listQuery = { |
||||
|
params: { |
||||
|
costTitleKey: '', |
||||
|
costTypeKey: '', |
||||
|
createEndDate: '', |
||||
|
createStartDate: '', |
||||
|
state: '', |
||||
|
userSid: '', |
||||
|
orgPath: '' |
||||
|
}, |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0 |
||||
|
} |
||||
|
this.getList() |
||||
|
}, |
||||
|
handleGetCheck(row) { |
||||
|
this.dialogImgVisible = true |
||||
|
this.url_list = row.payFiles |
||||
|
}, |
||||
|
handlePrint(row) { |
||||
|
req.createPdf({ sid: row.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => { |
||||
|
if (resp.success && resp.data.pdfPath !== '') { |
||||
|
var xhr = new XMLHttpRequest() |
||||
|
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.data.pdfPath + '&outFileName=' + '出纳', true) |
||||
|
xhr.setRequestHeader('token', getStorage()) |
||||
|
xhr.responseType = 'blob' |
||||
|
xhr.onload = function(e) { |
||||
|
// 如果请求执行成功 |
||||
|
var blob = this.response |
||||
|
var filename = '预付款申请.pdf' |
||||
|
var a = document.createElement('a') |
||||
|
// blob.type="application/octet-stream"; |
||||
|
// 创键临时url对象 |
||||
|
var url = URL.createObjectURL(blob) |
||||
|
a.href = url |
||||
|
a.download = filename |
||||
|
a.click() |
||||
|
// 释放之前创建的URL对象 |
||||
|
window.URL.revokeObjectURL(url) |
||||
|
} |
||||
|
// 发送请求 |
||||
|
xhr.send() |
||||
|
} |
||||
|
if (resp.success && resp.data.fjPath !== '' && resp.data.fjType !== '') { |
||||
|
var FJ = new XMLHttpRequest() |
||||
|
FJ.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.data.fjPath + '&outFileName=' + '车辆外采合同附件', true) |
||||
|
FJ.setRequestHeader('token', getStorage()) |
||||
|
FJ.responseType = 'blob' |
||||
|
FJ.onload = function(e) { |
||||
|
// 如果请求执行成功 |
||||
|
var blob = this.response |
||||
|
var filename = '申请附件' + resp.data.fjType |
||||
|
var a = document.createElement('a') |
||||
|
// blob.type="application/octet-stream"; |
||||
|
// 创键临时url对象 |
||||
|
var url = URL.createObjectURL(blob) |
||||
|
a.href = url |
||||
|
a.download = filename |
||||
|
a.click() |
||||
|
// 释放之前创建的URL对象 |
||||
|
window.URL.revokeObjectURL(url) |
||||
|
} |
||||
|
// 发送请求 |
||||
|
FJ.send() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
open(value) { |
||||
|
this.dialogUrlVisible = true |
||||
|
this.dialogUrl = value |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
Loading…
Reference in new issue