Browse Source

完善收款单

master
yunuo970428 2 months ago
parent
commit
5168e095ec
  1. 6
      anrui-buscenter/anrui-finmanage-ui/src/router/modules/codemenu.js
  2. 479
      anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/paymentConfirmation/receipt.vue

6
anrui-buscenter/anrui-finmanage-ui/src/router/modules/codemenu.js

@ -77,6 +77,12 @@ const codemenu = [
component: () => import('@/views/anruifinmanagement/paymentConfirmation/cashierConfirmation.vue'),
name: 'chunakuanxiangquerenguanli',
meta: { title: '出纳款项确认管理', noCache: true }
},
{
path: '/anruifinmanagement/receipt',
component: () => import('@/views/anruifinmanagement/paymentConfirmation/receipt.vue'),
name: 'Receipt',
meta: { title: '收款单', noCache: true }
}
]
},

479
anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/paymentConfirmation/receipt.vue

@ -0,0 +1,479 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<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="付款方名称:" class="searchlist">
<el-input v-model="listQuery.params.payerName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="收款方式:" class="searchlist">
<el-select v-model="listQuery.params.collectionTypeKey" placeholder="请选择" filterable clearable>
<el-option v-for="item in collectionType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="收款银行:" class="searchlist">
<el-select v-model="listQuery.params.collectionBank" placeholder="请选择" style="width: 300px" filterable clearable>
<el-option v-for="item in receiptBank_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="审核状态:" class="searchlist">
<el-select v-model="listQuery.params.auditState" placeholder="请选择" filterable clearable>
<el-option v-for="item in auditState_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="盖章日期:" class="searchlist">
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.collectionStartDate" clearable style="width: 160px" type="date" placeholder="开始日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.collectionEndDate" clearable style="width: 160px" type="date" placeholder="结束日期"/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handReset">重置</el-button>
</div>
</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" type="selection" align="center"/>
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button v-show="scope.row.auditState == 3" type="primary" size="mini" @click="handleDownLoad(scope.row)">下载</el-button>
<el-button type="primary" size="small" @click="handLook(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="审核状态" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.auditState == 1 ? '待审核' : scope.row.auditState == 2 ? '已驳回' : scope.row.auditState ==3 ? '已审核' : '其他' }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="认款状态" align="center" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.subscriptionState == 1 ? '未认款' : scope.row.subscriptionState == 2 ? '部分认款' : scope.row.subscriptionState == 3 ? '已认款' : '其他' }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="下载次数" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.downNum }}</span>
</template>
</el-table-column>
<el-table-column label="收款单号" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.billNo }}</span>
</template>
</el-table-column>
<el-table-column label="申请人" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.createByName }}</span>
</template>
</el-table-column>
<el-table-column label="申请日期" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.createDate }}</span>
</template>
</el-table-column>
<el-table-column label="收款日期" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.collectionDate }}</span>
</template>
</el-table-column>
<el-table-column label="收款银行" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.collectionBank }}</span>
</template>
</el-table-column>
<el-table-column label="收款银行账号" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.collectionBankNum }}</span>
</template>
</el-table-column>
<el-table-column label="收款方式" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.collectionTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="收款金额" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.collectionMoney }}</span>
</template>
</el-table-column>
<el-table-column label="付款方" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.payerName }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
<span>{{ scope.row.remarks }}</span>
</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>
</div>
<el-dialog center :visible.sync="dialogVisible" width="40%">
<el-form class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="6" class="tleftb">
<span>打印机类型</span>
</el-col>
<el-col :span="18">
<el-form-item>
<el-radio-group v-model="print">
<el-radio label="针孔式打印机">针孔式打印机</el-radio>
<el-radio label="激光打印机">激光打印机</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" :disabled="visibleDisabled" type="primary" @click="handleConfirm">确定</el-button>
<el-button size="small" :disabled="visibleDisabled" @click="dialogVisible = false">取消</el-button>
</span>
</el-dialog>
<!-- 销售 -- 出款收款确认 -->
<cashierConfirmationInfo v-show="viewState == 2 || viewState == 3" ref="divInfo" @doback="resetState" @reloadlist="getList"/>
<!-- 金融 -- 出款收款确认 -->
<cashierConfirmationByFinancial v-show="viewState == 4 || viewState == 5" ref="divFinancial" @doback="resetState" @reloadlist="getList"/>
<!-- 售后-- 出款收款确认 -->
<cashierConfirmationBySubscriptionAfter v-show="viewState == 6 || viewState == 7" ref="divSub" @doback="resetState" @reloadlist="getList" />
</div>
</template>
<script>
import { createPdf, createPdfRsk, listPage } from '@/api/anruifinmanagement/paymentConfirmation.js'
import req from '@/api/anruifinmanagement/subscriptionAfterSale'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import { typeValues, getButtonPermissions } from '@/api/jichuxinxi/dictcommons'
import cashierConfirmationInfo from './cashierConfirmationInfo.vue'
import cashierConfirmationByFinancial from './cashierConfirmationByFinancial'
import cashierConfirmationBySubscriptionAfter from './cashierConfirmationBySubscriptionAfter'
import { getStorage } from '@/utils/auth'
export default {
name: 'Receipt',
components: {
Pagination,
pageye,
ButtonBar,
cashierConfirmationInfo,
cashierConfirmationByFinancial,
cashierConfirmationBySubscriptionAfter
},
data() {
return {
dialogVisible: false,
visibleDisabled: false,
printSid: '',
print: '',
printSource: '',
btndisabled: false,
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
viewState: 1,
tableKey: 0,
list: [],
sids: [],
receiptBank_list: [],
collectionType_list: [],
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
auditState_list: [
{
dictKey: 1,
dictValue: '待审核'
},
{
dictKey: 2,
dictValue: '已驳回'
},
{
dictKey: 3,
dictValue: '已审核'
}
],
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
payerName: '',
collectionStartDate: '',
collectionEndDate: '',
collectionBank: '',
collectionTypeKey: '',
subscriptionState: '',
useOrgSid: '',
createBySid: '',
state: '',
orgPath: '',
auditState: 1
},
total: 0
}
}
},
mounted() {
getButtonPermissions({ userSid: window.sessionStorage.getItem('userSid'), url: this.$route.path, type: 0 }).then((res) => {
if (res.success) {
for (var i = 0; i < res.data.length; i++) {
for (var k = 0; k < this.btnList.length; k++) {
if (res.data[i].buttonId === this.btnList[k].btnKey) {
this.btnList.splice(k, 1)
}
}
}
this.$refs['btnbar'].setButtonList(this.btnList)
}
})
},
created() {
this.getList()
this.DataDictionary()
},
methods: {
DataDictionary() {
typeValues({ type: 'receiptBank' }).then((res) => {
if (res.success) {
this.receiptBank_list = res.data
}
})
typeValues({ type: 'customerPayType' }).then((res) => {
if (res.success) {
this.collectionType_list = res.data
}
})
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doClose':
this.doClose()
break
default:
break
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
// ------------------
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('sids', this.sids)
},
//
getList() {
this.listLoading = true
this.listQuery.params.createBySid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.state = 1
listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.code === '200') {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
},
//
handleFilter() {
this.getList()
},
handReset() {
this.listQuery = {
current: 1,
size: 10,
params: {
collectionStartDate: '',
collectionEndDate: '',
collectionBank: '',
collectionTypeKey: '',
subscriptionState: '',
useOrgSid: '',
createBySid: '',
state: '',
orgPath: '',
auditState: 1
},
total: 0
}
this.getList()
},
handleDownLoad(row) {
this.printSid = row.sid
this.printSource = row.source
this.print = ''
this.dialogVisible = true
},
handleConfirm() {
this.visibleDisabled = true
if (this.printSource === '02') {
createPdfRsk({ skdSid: this.printSid, printerType: this.print }).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()
this.dialogVisible = false
this.printSid = ''
this.printSource = ''
this.visibleDisabled = false
this.getList()
} else {
this.visibleDisabled = false
}
}).catch(() => {
this.visibleDisabled = false
})
} else if (this.printSource === '03') {
req.createPdf({ skdSid: this.printSid, printerType: this.print }).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()
this.dialogVisible = false
this.printSid = ''
this.printSource = ''
this.visibleDisabled = false
this.getList()
} else {
this.visibleDisabled = false
}
}).catch(() => {
this.visibleDisabled = false
})
} else if (this.printSource === '' || this.printSource === null) {
createPdf({ skdSid: this.printSid, printerType: this.print }).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()
this.dialogVisible = false
this.printSid = ''
this.printSource = ''
this.visibleDisabled = false
this.getList()
} else {
this.visibleDisabled = false
}
}).catch(() => {
this.visibleDisabled = false
})
}
},
handLook(row) {
if (row.source === '02') { //
this.viewState = 5
this.$refs['divFinancial'].showInfo(row, this.viewState)
} else if (row.source === '03') { //
this.viewState = 7
this.$refs['divSub'].showInfo(row, this.viewState)
} else { //
this.viewState = 3
this.$refs['divInfo'].showInfo(row, this.viewState)
}
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save