|
|
@ -1,12 +1,7 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<div v-show="viewState == 1"> |
|
|
|
<div class="tab-header webtop"> |
|
|
|
<div>出纳款项确认管理</div> |
|
|
|
<div> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
|
</div> |
|
|
|
</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> |
|
|
@ -48,11 +43,13 @@ |
|
|
|
<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%"> |
|
|
|
<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="180"> |
|
|
|
<el-table-column label="操作" align="center" width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button :disabled="scope.row.auditState !== 1" type="primary" size="small" @click="handUpdate(scope.row)">办理</el-button> |
|
|
|
<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> |
|
|
@ -76,12 +73,12 @@ |
|
|
|
<span>{{ scope.row.createByName }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="申请日期" align="center" width="90"> |
|
|
|
<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="90"> |
|
|
|
<el-table-column label="收款日期" align="center" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.collectionDate }}</span> |
|
|
|
</template> |
|
|
@ -125,33 +122,79 @@ |
|
|
|
</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"/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { listPage } from '@/api/anruifinmanagement/paymentConfirmation.js' |
|
|
|
import { createPdf, listPage, ctskd } from '@/api/anruifinmanagement/paymentConfirmation.js' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import { typeValues } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import { typeValues, getButtonPermissions } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import cashierConfirmationInfo from './cashierConfirmationInfo.vue' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'chunakuanxiangquerenguanli', |
|
|
|
components: { |
|
|
|
Pagination, |
|
|
|
pageye, |
|
|
|
ButtonBar, |
|
|
|
cashierConfirmationInfo |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
dialogVisible: false, |
|
|
|
visibleDisabled: false, |
|
|
|
printSid: '', |
|
|
|
print: '', |
|
|
|
btndisabled: false, |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '隐藏查询条件', |
|
|
|
viewState: 1, |
|
|
|
tableKey: 0, |
|
|
|
list: [], |
|
|
|
sids: [], |
|
|
|
receiptBank_list: [], |
|
|
|
collectionType_list: [], |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
|
icon: '', |
|
|
|
btnKey: 'toRepush', |
|
|
|
btnLabel: '重推' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'info', |
|
|
|
size: 'small', |
|
|
|
icon: 'cross', |
|
|
|
btnKey: 'doClose', |
|
|
|
btnLabel: '关闭' |
|
|
|
} |
|
|
|
], |
|
|
|
subscriptionState_list: [ |
|
|
|
{ |
|
|
|
dictKey: 1, |
|
|
@ -186,6 +229,20 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
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() |
|
|
@ -203,6 +260,19 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
btnHandle(btnKey) { |
|
|
|
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|
|
|
switch (btnKey) { |
|
|
|
case 'toRepush': |
|
|
|
this.toRepush() |
|
|
|
break |
|
|
|
case 'doClose': |
|
|
|
this.doClose() |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
|
}, |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
@ -219,6 +289,14 @@ export default { |
|
|
|
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 |
|
|
@ -260,13 +338,79 @@ export default { |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divInfo'].showInfo(row, this.viewState) |
|
|
|
}, |
|
|
|
handleDownLoad(row) { |
|
|
|
this.printSid = row.sid |
|
|
|
this.print = '' |
|
|
|
this.dialogVisible = true |
|
|
|
}, |
|
|
|
handleConfirm() { |
|
|
|
this.visibleDisabled = true |
|
|
|
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.visibleDisabled = false |
|
|
|
} else { |
|
|
|
this.visibleDisabled = false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.visibleDisabled = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
handLook(row) { |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divInfo'].showInfo(row, this.viewState) |
|
|
|
}, |
|
|
|
toRepush() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: '数据推送中', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
ctskd({ skdSid: this.sids[0] }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
loading.close() |
|
|
|
this.$message({ showClose: true, type: 'success', message: '推送成功' }) |
|
|
|
this.getList() |
|
|
|
} else { |
|
|
|
loading.close() |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行重推操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
}, |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
this.handReset() |
|
|
|
}, |
|
|
|
doClose() { |
|
|
|
this.$store.dispatch('tagsView/delView', this.$route) |
|
|
|
this.$router.go(-1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|