|
@@ -0,0 +1,216 @@
|
|
|
+//煤款
|
|
|
+<template>
|
|
|
+ <div class="container">
|
|
|
+ <el-row class="row_top">
|
|
|
+ <el-col :span="12">
|
|
|
+ <h2 class="bg-left title">煤款</h2>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" class="bg-right">
|
|
|
+ <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6"
|
|
|
+ height="10" style="vertion-align: bottom; margin-right: 3px"
|
|
|
+ src="../../../public/img/lujing.png" alt="" />返回
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="center">
|
|
|
+ <!-- <el-input placeholder="可按费用名称、流向、经办人查找" class="input_css" v-model="searchKeyWord" clearable></el-input> -->
|
|
|
+ <el-select v-model="searchKeyWord" filterable placeholder="按仓库筛选" clearable @change="getList"
|
|
|
+ class="options_css">
|
|
|
+ <el-option label="全部仓库" value=""></el-option>
|
|
|
+ <el-option v-for="item in warehousNameList" :key="item.id" :label="item.warehouseName"
|
|
|
+ :value="item.warehouseName"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-table :data="tableData" stripe class="table_css" align="center">
|
|
|
+ <el-table-column type="index" label="序号" align="center">
|
|
|
+ <template scope="scope">
|
|
|
+ <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
|
|
|
+ <span v-else>{{ scope.$index + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="warehouseName" label="仓库名称"></el-table-column>
|
|
|
+ <el-table-column prop="distributableAmount" label="可分配金额(元)"></el-table-column>
|
|
|
+ <el-table-column prop="currentAverageAllocatedCost" label="当前平均分配成本(元/吨)"></el-table-column>
|
|
|
+ <el-table-column prop="costNo" label="请款记录">
|
|
|
+ <template scope="scope">
|
|
|
+ <el-link @click="lookCost(scope.row)" type="primary" :underline="false">查看</el-link>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
+ style="text-align: center" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="deptBudgetTotal">
|
|
|
+ </el-pagination>
|
|
|
+ <el-dialog title="请款记录" :visible.sync="dialogVisible" width="550px" :before-close="handleClose">
|
|
|
+ <div>
|
|
|
+ <el-table :data="recordData" stripe class="table_css">
|
|
|
+ <el-table-column prop="amountMoney" label="金额(元)" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="coalPrice" label="分配成本(元/吨)" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="paymentDate" label="付款日期" align="center"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1"
|
|
|
+ :current-page="currentPage" style="text-align: center" :page-size="pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="handleClose">取 消</el-button>
|
|
|
+ <!-- <el-button type="primary" @click="querenbazheng">确 定</el-button> -->
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+
|
|
|
+import { coalPayment, coalPaymentRecord } from '@/model/profitable/index'
|
|
|
+import { getwarehousName } from '@/model/warehouse/index'
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableData: [],
|
|
|
+ warehousNameList: [],
|
|
|
+ searchKeyWord: '',
|
|
|
+ dialogVisible: false,
|
|
|
+ deptBudgetTotal: 0,
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ recordData: [],
|
|
|
+ record: {
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ this.getList()
|
|
|
+ this.xiala()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getList() {
|
|
|
+ coalPayment({
|
|
|
+ searchKeyWord: this.searchKeyWord,
|
|
|
+ currentPage: this.currentPage,
|
|
|
+ pageSize: this.pageSize
|
|
|
+ }).toPromise().then((response) => {
|
|
|
+ this.tableData = response.records
|
|
|
+ this.deptBudgetTotal = response.total
|
|
|
+ })
|
|
|
+ },
|
|
|
+ lookCost(row) {
|
|
|
+ this.record.warehouseId = row.warehouseId
|
|
|
+ coalPaymentRecord(this.record).toPromise().then((response) => {
|
|
|
+ this.recordData = response.records
|
|
|
+ this.deptBudgetTotal1 = response.total
|
|
|
+ })
|
|
|
+ this.dialogVisible = true
|
|
|
+ },
|
|
|
+ handleClose() {
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.recordData = []
|
|
|
+ },
|
|
|
+ xiala() {
|
|
|
+ //仓库筛选
|
|
|
+ getwarehousName({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ }).toPromise().then((response) => {
|
|
|
+ this.warehousNameList = response
|
|
|
+ })
|
|
|
+ },
|
|
|
+ returnsales() {
|
|
|
+ this.$router.go(-1)
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ console.log(`每页 ${val} 条`)
|
|
|
+ this.pageSize = val
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.currentPage = val
|
|
|
+ console.log(`当前页: ${val}`)
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ handleSizeChange1(val) {
|
|
|
+ console.log(`每页 ${val} 条`)
|
|
|
+ this.record.pageSize = val
|
|
|
+ this.lookCost(this.record)
|
|
|
+ },
|
|
|
+ handleCurrentChange1(val) {
|
|
|
+ this.record.currentPage = val
|
|
|
+ console.log(`当前页: ${val}`)
|
|
|
+ this.lookCost(this.record)
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.container {
|
|
|
+ background: #E8ECF6;
|
|
|
+}
|
|
|
+
|
|
|
+.center {
|
|
|
+ margin: 0 auto;
|
|
|
+ background: #ffffff;
|
|
|
+ // height: calc(100vh - 13vh);
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 20px 0;
|
|
|
+
|
|
|
+ /deep/.el-table td,
|
|
|
+ /deep/.el-table th {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.options_css {
|
|
|
+ margin: 0 5px;
|
|
|
+}
|
|
|
+
|
|
|
+.row_top {
|
|
|
+ background: #f6f7fc;
|
|
|
+ border-radius: 4px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+
|
|
|
+ .bg-left {
|
|
|
+ padding-left: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bg-right {
|
|
|
+ padding-top: 15px;
|
|
|
+ padding-right: 10px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title::before {
|
|
|
+ content: '';
|
|
|
+ display: inline-block;
|
|
|
+ width: 5px;
|
|
|
+ height: 30px;
|
|
|
+ background: #5473e8;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.datascreen {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ .data_css {
|
|
|
+ width: 40%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .input_css {
|
|
|
+ width: 50%;
|
|
|
+ margin: 0 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .find {
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.table_css {
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
+</style>
|