|
|
@@ -1,41 +1,45 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-breadcrumb class="heading">
|
|
|
+ <!--<el-breadcrumb class="heading">
|
|
|
<el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>银行账单</el-breadcrumb-item>
|
|
|
- </el-breadcrumb>
|
|
|
+ </el-breadcrumb>-->
|
|
|
<el-card class="box-card">
|
|
|
<div slot="header">
|
|
|
<span>
|
|
|
- <i class="icon icon-table2"></i> 供应商账单
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" size="mini" icon="el-icon-search" @click="handleSearch">获取账单</el-button>
|
|
|
+ <el-row>
|
|
|
+ <el-col>
|
|
|
+ <el-form ref="form" :inline="true">
|
|
|
+ <el-form-item label="">
|
|
|
+ <el-input v-model="searchForm.commercialNo" placeholder="组织机构代码" style="width: 300px"></el-input>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
- <!--<el-button type="warning" size="mini" icon="el-icon-search" @click="handleCheckBill">对账功能</el-button>-->
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="plain" plain icon="el-icon-search" @click="handleSearch">获取账单</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-money" @click="handleGetMoneyConfirm">确认收款</el-button>
|
|
|
+ <!--<el-button type="warning" size="mini" icon="el-icon-search" @click="handleCheckBill">对账功能</el-button>-->
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
|
|
|
- <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-col>
|
|
|
+ <el-form label-width="120px" :inline="true">
|
|
|
+ <el-form-item label="企业名称">
|
|
|
+ <span>{{supplierEntity.SupplierName}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="组织机构代码">
|
|
|
+ <span>{{supplierEntity.CommercialNo}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="缴费总金额">
|
|
|
+ <span style="font-weight: bold; color: red;">{{amountSum()}} 元</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</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">
|
|
|
@@ -63,6 +67,7 @@
|
|
|
mapGetters
|
|
|
} from 'vuex'
|
|
|
import api from '@/api/oilsupplier/paymentinfo'
|
|
|
+ import apiSupplier from '@/api/oilsupplier/supplier'
|
|
|
|
|
|
export default {
|
|
|
computed: {
|
|
|
@@ -79,6 +84,7 @@
|
|
|
// 列表数据
|
|
|
selectsupplierlist: [],
|
|
|
entityList: [],
|
|
|
+ supplierEntity: [],
|
|
|
// 分页参数
|
|
|
size: 10,
|
|
|
currentPage: 1,
|
|
|
@@ -124,9 +130,7 @@
|
|
|
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 => {
|
|
|
@@ -185,6 +189,38 @@
|
|
|
rnd+=Math.floor(Math.random()*10);
|
|
|
return rnd;
|
|
|
},
|
|
|
+ handleGetMoneyConfirm() {
|
|
|
+ let idlist = ''
|
|
|
+ let sumMoeny = 0.0
|
|
|
+ for (let idx in this.entityList) {
|
|
|
+ idlist += this.entityList[idx].Id + ','
|
|
|
+ sumMoeny += this.entityList[idx].Amount + 0.0
|
|
|
+ }
|
|
|
+ if (idlist.length <= 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请先获取账单,再确认收款'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (sumMoeny <= 0) {
|
|
|
+ this.$confirm('账单总金额小于等于0, 是否继续确认收款?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.handleGetMoney()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$confirm('确认收款吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'info'
|
|
|
+ }).then(() => {
|
|
|
+ this.handleGetMoney()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
handleGetMoney () {
|
|
|
let idlist = ''
|
|
|
let sumMoeny = 0.0
|
|
|
@@ -256,8 +292,16 @@
|
|
|
handleSearch () {
|
|
|
this.currentPage = 1
|
|
|
this.dialogVisible = false
|
|
|
+ this.showSupplierInfo()
|
|
|
this.initDatas()
|
|
|
},
|
|
|
+ showSupplierInfo () {
|
|
|
+ apiSupplier.getEntityByCommercialNo(this.searchForm.commercialNo, this.$axios).then(res => {
|
|
|
+ this.supplierEntity = res.data
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
handleCheckBill () {
|
|
|
let params = {
|
|
|
startTime: new Date('2019-1-1'),
|
|
|
@@ -330,13 +374,13 @@
|
|
|
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--) {
|
|
|
+ let s = 0
|
|
|
+ if (this.entityList && this.entityList != null) {
|
|
|
+ for (let i = this.entityList.length - 1; i >= 0; i--) {
|
|
|
s += parseInt(this.entityList[i].Amount)
|
|
|
}
|
|
|
- return s
|
|
|
}
|
|
|
+ return s
|
|
|
},
|
|
|
getUSCCode () {
|
|
|
if (this.entityList != null && this.entityList.length > 0) {
|