|
@@ -1,9 +1,9 @@
|
|
|
-//库点库存
|
|
|
+//仓储费
|
|
|
<template>
|
|
|
<div class="container">
|
|
|
<el-row class="row_top">
|
|
|
<el-col :span="12">
|
|
|
- <h2 class="bg-left title">库存分布</h2>
|
|
|
+ <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="" />返回
|
|
@@ -12,13 +12,17 @@
|
|
|
<div class="center">
|
|
|
<el-row style='margin-bottom:10px;'>
|
|
|
<el-col :span="12">
|
|
|
- <el-select v-model="warehouseName" filterable clearable placeholder="" @change="selectwarehouse" :value="searchType">
|
|
|
+ <el-select v-model="warehouseName" filterable clearable placeholder="选择仓库" @change="selectwarehouse" :value="searchType">
|
|
|
+ <el-option key="0" label="全部仓库" value=""
|
|
|
+ style="color: #8890b1" />
|
|
|
<el-option v-for="item in warehouse" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
|
|
|
style="color: #8890b1" />
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <div class="datascreen">
|
|
|
+ <div style="text-align:right;padding-right:10px;" >
|
|
|
+ 仓储费分摊金额:{{allotmentofMoney.value}}元/(吨·天) <el-button class="bg-bottom" type="primary" size="small" @click="edit()">修改
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -30,10 +34,12 @@
|
|
|
<span v-else>{{ scope.$index + 1 }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="warehouse" label="所属仓库"></el-table-column>
|
|
|
- <el-table-column prop="locusWarehouse" label="所在仓库"></el-table-column>
|
|
|
- <el-table-column prop="goodsName" label="货名"></el-table-column>
|
|
|
- <el-table-column prop="inventory" label="剩余库存(吨)"></el-table-column>
|
|
|
+ <el-table-column prop="warehouseName" label="仓库名称"></el-table-column>
|
|
|
+ <el-table-column prop="agent" label="请款人"></el-table-column>
|
|
|
+ <el-table-column prop="amountMoney" label="金额(元)"></el-table-column>
|
|
|
+ <el-table-column prop="money" label="已分配(元)"></el-table-column>
|
|
|
+ <el-table-column prop="unallocatedAmount" label="未分配(元)"></el-table-column>
|
|
|
+ <el-table-column prop="paymentDate" label="付款日期"></el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
@@ -41,13 +47,25 @@
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
+ <el-dialog width='50%' :visible.sync="interestrateshow" title="设置分摊金额" top="20vh">
|
|
|
+ <el-input placeholder="输入分摊金额" v-model="allotmentofMoney.value"></el-input>
|
|
|
+ 元/(吨·天)
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="interestrateshow=false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="interestratesubmit">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import {
|
|
|
- getinventoryinfo,
|
|
|
+ getexenseinfo,
|
|
|
getwarehouse
|
|
|
} from '@/model/profitable/index'
|
|
|
+ import {
|
|
|
+ getenabledinfo,
|
|
|
+ setenabledinfo
|
|
|
+} from '@/model/warehouse/index'
|
|
|
export default {
|
|
|
components: {},
|
|
|
data() {
|
|
@@ -60,6 +78,7 @@
|
|
|
deptCircularPage: {},
|
|
|
taskTypeList:[],
|
|
|
warehouse:[],
|
|
|
+ interestrateshow:false,
|
|
|
searchType:"",
|
|
|
searchKeyWord:"",
|
|
|
startDate:"",
|
|
@@ -71,15 +90,18 @@
|
|
|
expenseIncome:0,
|
|
|
expensesPay:0,
|
|
|
currentProfit:0,
|
|
|
- warehouseName:'',
|
|
|
+ warehouseName:'全部仓库',
|
|
|
+ allotmentofMoney:{}
|
|
|
}
|
|
|
},
|
|
|
activated() {
|
|
|
// this.getPassYearFormatDate()
|
|
|
- this.warehouseName=this.$route.query.warehouseName
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ edit(){
|
|
|
+ this.interestrateshow=true
|
|
|
+ },
|
|
|
typeChange(num){
|
|
|
this.searchType = num
|
|
|
this.getList()
|
|
@@ -87,6 +109,16 @@
|
|
|
returnsales(){
|
|
|
this.$router.go(-1)
|
|
|
},
|
|
|
+ interestratesubmit(){
|
|
|
+ setenabledinfo({id:this.allotmentofMoney.id,value:this.allotmentofMoney.value}).toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$message({
|
|
|
+ message: '修改利率成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.interestrateshow=false
|
|
|
+ })
|
|
|
+ },
|
|
|
getPassYearFormatDate () {
|
|
|
var nowDate = new Date()
|
|
|
var _date = new Date()
|
|
@@ -115,7 +147,11 @@
|
|
|
this.value=[this.startDate,this.endDate]
|
|
|
},
|
|
|
selectwarehouse(e){
|
|
|
- this.warehouseName=e
|
|
|
+ if(e=='全部仓库'){
|
|
|
+ this.warehouseName=''
|
|
|
+ }else{
|
|
|
+ this.warehouseName=e
|
|
|
+ }
|
|
|
this.getList()
|
|
|
},
|
|
|
getList() {
|
|
@@ -124,40 +160,32 @@
|
|
|
this.warehouse = response
|
|
|
|
|
|
})
|
|
|
- getinventoryinfo({
|
|
|
+ getenabledinfo({functionType:3}).toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.allotmentofMoney=response
|
|
|
+ })
|
|
|
+ getexenseinfo({
|
|
|
+ // warehouseType: 1,
|
|
|
compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ searchKeyWord:this.searchKeyWord,
|
|
|
currentPage: this.currentPage,
|
|
|
- warehouse:this.warehouseName,
|
|
|
+ searchTypeFee:1,
|
|
|
+ warehouseName:this.warehouseName,
|
|
|
pageSize:this.pageSize ,
|
|
|
- inventoryType:3,
|
|
|
+ searchType:this.searchType
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then(response => {
|
|
|
- this.tableData = response.records
|
|
|
- if(this.tableData){
|
|
|
- this.foodExpenditure=0
|
|
|
- this.grainIncome=0
|
|
|
- this.expenseIncome=0
|
|
|
- this.expensesPay=0
|
|
|
- this.currentProfit=0
|
|
|
- for (let i = 0; i < this.tableData.length; i++) {
|
|
|
- if(this.tableData[i].foodExpenditure){
|
|
|
- this.foodExpenditure+=Number(this.tableData[i].foodExpenditure)
|
|
|
- }
|
|
|
- if(this.tableData[i].grainIncome){
|
|
|
- this.grainIncome+=Number(this.tableData[i].grainIncome)
|
|
|
- }
|
|
|
- if(this.tableData[i].expenseIncome){
|
|
|
- this.expenseIncome+=Number(this.tableData[i].expenseIncome)
|
|
|
- }
|
|
|
- if(this.tableData[i].expensesPay){
|
|
|
- this.expensesPay+=Number(this.tableData[i].expensesPay)
|
|
|
- }
|
|
|
- if(this.tableData[i].currentProfit){
|
|
|
- this.currentProfit+=Number(this.tableData[i].currentProfit)
|
|
|
+ if(response.records.length>0){
|
|
|
+ for (let i = 0; i < response.records.length; i++) {
|
|
|
+ response.records[i].money=response.records[i].amountMoney-response.records[i].unallocatedAmount
|
|
|
+ if(response.records[i].paymentDate){
|
|
|
+ response.records[i].paymentDate=response.records[i].paymentDate.split(' ')[0]
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.tableData = response.records
|
|
|
+
|
|
|
|
|
|
this.deptBudgetTotal = response.total
|
|
|
})
|
|
@@ -266,4 +294,7 @@
|
|
|
.bg-right{
|
|
|
padding-top:15px;
|
|
|
}
|
|
|
+ /deep/.el-input{
|
|
|
+ width:90%;
|
|
|
+ }
|
|
|
</style>
|