|
|
@@ -0,0 +1,357 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-breadcrumb class="heading">
|
|
|
+ <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item>银行账单</el-breadcrumb-item>
|
|
|
+ </el-breadcrumb>
|
|
|
+ <el-card class="box-card">
|
|
|
+ <div slot="header">
|
|
|
+ <span>
|
|
|
+ <i class="icon icon-table2"></i> 供应商账单
|
|
|
+ </span>
|
|
|
+ <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
|
|
|
+ <el-form-item label="组织机构代码">
|
|
|
+ <el-input v-model="searchForm.commercialNo" size="small" placeholder="请输入" style="width: 100%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-search" @click="handleSearch">获取账单</el-button>
|
|
|
+
|
|
|
+ <!--<el-button type="warning" size="mini" icon="el-icon-search" @click="handleCheckBill">对账功能</el-button>-->
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-form label-width="120px" :inline="true">
|
|
|
+ <el-form-item label="企业名称">
|
|
|
+ <span>{{getSupplierName()}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="组织机构代码">
|
|
|
+ <span>{{getUSCCode()}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="缴费总金额">
|
|
|
+ <span style="font-weight: bold; color: red;">{{amountSum()}} 元</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="">
|
|
|
+ <el-button type="primary" icon="el-icon-money" @click="handleGetMoney">收款成功</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card" style="height: calc(100vh - 115px);">
|
|
|
+ <el-table :data="entityList" size="mini" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby">
|
|
|
+
|
|
|
+ <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="SupplierName" label="企业名称"></el-table-column>
|
|
|
+ <!--<el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="SupplierTypeName" label="项目类型"></el-table-column>-->
|
|
|
+ <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="PayType" label="缴费类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ transferStr(scope.row.PayType) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Amount" label="缴费金额">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
+ :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="currentItemCount">
|
|
|
+ </el-pagination>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import {
|
|
|
+ mapGetters
|
|
|
+ } from 'vuex'
|
|
|
+ import api from '@/api/oilsupplier/paymentinfo'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ authUser: 'authUser'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ name: 'paymentinfo',
|
|
|
+
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ dialogVisible: false,
|
|
|
+ delevisble: false,
|
|
|
+ // 列表数据
|
|
|
+ selectsupplierlist: [],
|
|
|
+ entityList: [],
|
|
|
+ // 分页参数
|
|
|
+ size: 10,
|
|
|
+ currentPage: 1,
|
|
|
+ currentItemCount: 0,
|
|
|
+ // 列表排序
|
|
|
+ Column: {
|
|
|
+ Order: '',
|
|
|
+ Prop: ''
|
|
|
+ },
|
|
|
+ // 工作流
|
|
|
+ entrydetail: {
|
|
|
+ process: 'oil_audit_apply',
|
|
|
+ business: '',
|
|
|
+ instance: ''
|
|
|
+ },
|
|
|
+ // 查询时间
|
|
|
+ CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
|
|
|
+ // 查询项
|
|
|
+ searchFormReset: {},
|
|
|
+ entityForm: {
|
|
|
+ Id: '',
|
|
|
+ SupplierName: '',
|
|
|
+ SupplierId: '',
|
|
|
+ SupplierTypeName: ''
|
|
|
+ },
|
|
|
+ searchForm: {
|
|
|
+ commercialNo: ''
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ // 查询条件初始值备份
|
|
|
+ // Object.assign(this.searchFormReset, this.searchForm)
|
|
|
+ // 查询列表
|
|
|
+ // this.initDatas()
|
|
|
+ // this.getDictOptions()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ initDatas () {
|
|
|
+ // 分页及列表条件
|
|
|
+ let params = {
|
|
|
+ commercialNo: this.searchForm.commercialNo
|
|
|
+ }
|
|
|
+ // 访问接口
|
|
|
+ console.log(params)
|
|
|
+ api.getBillListbc(params, this.$axios).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.entityList = res.data.items
|
|
|
+ this.currentItemCount = res.data.currentItemCount
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getDictOptions () {
|
|
|
+ api.getDictList(this.$axios).then(res => {
|
|
|
+ // this.dictOptions.customerList = res.data.items['customerList']
|
|
|
+ // this.dictOptions.projectList = res.data.items['projectList']
|
|
|
+
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ searchCommand (command) {
|
|
|
+ if (command === 'search') {
|
|
|
+ this.dialogVisible = true
|
|
|
+ } else if (command === 'clear') {
|
|
|
+ this.clearSearch()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 列表排序功能
|
|
|
+ orderby (column) {
|
|
|
+ if (column.order === 'ascending') {
|
|
|
+ this.Column.Order = 'asc'
|
|
|
+ } else if (column.order === 'descending') {
|
|
|
+ this.Column.Order = 'desc'
|
|
|
+ }
|
|
|
+ this.Column.Prop = column.prop
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ clearSearch () {
|
|
|
+ Object.assign(this.searchForm, this.searchFormReset)
|
|
|
+ // this.searchForm = this.searchFormReset;
|
|
|
+ this.CreateOn = ''
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+
|
|
|
+ transferStr (val) {
|
|
|
+ if (val === '1') {
|
|
|
+ return '准入缴费'
|
|
|
+ }else if (val === '2') {
|
|
|
+ return '年审缴费'
|
|
|
+ }else if (val === '3') {
|
|
|
+ return '增项缴费'
|
|
|
+ } else {
|
|
|
+ return val
|
|
|
+ }
|
|
|
+ },
|
|
|
+ RndNum(n){
|
|
|
+ let rnd="";
|
|
|
+ for(var i=0;i<n;i++)
|
|
|
+ rnd+=Math.floor(Math.random()*10);
|
|
|
+ return rnd;
|
|
|
+ },
|
|
|
+ handleGetMoney () {
|
|
|
+ let idlist = ''
|
|
|
+ let sumMoeny = 0.0
|
|
|
+ for (let idx in this.entityList) {
|
|
|
+ idlist += this.entityList[idx].Id + ','
|
|
|
+ sumMoeny += this.entityList[idx].Amount + 0.0
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ ids: idlist,
|
|
|
+ receiveAmount: sumMoeny,
|
|
|
+ bankName: '现场缴费',
|
|
|
+ bankSerialNum: this.RndNum(11) + '_SD',
|
|
|
+ payDate: new Date(),
|
|
|
+ payMode: '现金'
|
|
|
+ }
|
|
|
+ // 下面调用接口修改状态
|
|
|
+ api.receiveMoneyBillList(params, this.$axios).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.initDatas()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleGetMoneyAgain () {
|
|
|
+ let idlist = ''
|
|
|
+ let sumMoeny = 0.0
|
|
|
+ for (let idx in this.entityList) {
|
|
|
+ idlist += this.entityList[idx].Id + ','
|
|
|
+ sumMoeny += this.entityList[idx].Amount + 0.0
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ ids: idlist,
|
|
|
+ receiveAmount: sumMoeny,
|
|
|
+ bankName: '工商银行',
|
|
|
+ bankSerialNum: '111222',
|
|
|
+ payDate: new Date(),
|
|
|
+ payMode: '银行现金'
|
|
|
+ }
|
|
|
+ //下面调用接口修改状态
|
|
|
+ api.receiveMoneyAgain(params, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.initDatas()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ handleSearch () {
|
|
|
+ this.currentPage = 1
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ handleCheckBill () {
|
|
|
+ let params = {
|
|
|
+ startTime: new Date('2019-1-1'),
|
|
|
+ endTime: new Date('2019-10-10')
|
|
|
+ }
|
|
|
+ // 访问接口
|
|
|
+ api.checkMoneyList(params, this.$axios).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleCurrentChange (value) {
|
|
|
+ this.currentPage = value
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ handleSizeChange (value) {
|
|
|
+ this.size = value
|
|
|
+ this.currentPage = 1
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ deleteEntity (row) {
|
|
|
+ api.deleteEntity(row.Id, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.initDatas()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ GetCommand (cmdType, row) {
|
|
|
+ let cmd = {}
|
|
|
+ cmd.Command = cmdType
|
|
|
+ cmd.row = row
|
|
|
+ return cmd
|
|
|
+ },
|
|
|
+
|
|
|
+ jstimehandle (val) {
|
|
|
+ if (val === '') {
|
|
|
+ return '----'
|
|
|
+ } else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
+ return '----'
|
|
|
+ } else if (val === '5000-01-01T23:59:59+08:00') {
|
|
|
+ return '永久'
|
|
|
+ } else {
|
|
|
+ val = val.replace('T', ' ')
|
|
|
+ return val.substring(0, 10)
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ formatDateTime (date) {
|
|
|
+ var y = date.getFullYear()
|
|
|
+ var m = date.getMonth() + 1
|
|
|
+ m = m < 10 ? ('0' + m) : m
|
|
|
+ var d = date.getDate()
|
|
|
+ d = d < 10 ? ('0' + d) : d
|
|
|
+ var h = date.getHours()
|
|
|
+ var minute = date.getMinutes()
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute
|
|
|
+ return y + '-' + m + '-' + d + ' ' + h + ':' + minute
|
|
|
+ },
|
|
|
+ amountSum () {
|
|
|
+ var s = 0
|
|
|
+ if (this.entityList || this.entityList != null) {
|
|
|
+ for (var i = this.entityList.length - 1; i >= 0; i--) {
|
|
|
+ s += parseInt(this.entityList[i].Amount)
|
|
|
+ }
|
|
|
+ return s
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getUSCCode () {
|
|
|
+ if (this.entityList != null && this.entityList.length > 0) {
|
|
|
+ return this.entityList[0].USCCode
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getSupplierName () {
|
|
|
+ if (this.entityList != null && this.entityList.length > 0) {
|
|
|
+ return this.entityList[0].SupplierName
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+
|
|
|
+</style>
|