费用推送审核修改

This commit is contained in:
syruan 2025-08-30 22:17:52 +08:00
parent 5305aa1169
commit 1116b9a9a5
2 changed files with 62 additions and 20 deletions

View File

@ -30,7 +30,7 @@ export function submitFee(params){
// 查询费用推送审核租赁列表
export function getLeaseList(query) {
return request({
url: '/material/iws_cost_push/getLeaseCostsByAgreementIdAndMonth',
url: '/material/slt_agreement_info/leasePeriodCostDetails',
method: 'get',
params: query
})

View File

@ -111,13 +111,19 @@
</span>
</template>
</el-table-column>
<el-table-column label="费用所属" align="center" prop="settlementType" width="100" >
<template slot-scope="scope" >
<el-tag v-if="scope.row.settlementType == 1" type="primary" size="small">工器具</el-tag>
<el-tag v-if="scope.row.settlementType == 2" type="warning" size="small">安全用品</el-tag>
</template>
</el-table-column>
<el-table-column label="租赁费用" align="center" prop="leaseMoney" >
<template slot-scope="scope" >
<span class="clickText" v-if="scope.row.leaseMoney!=null && scope.$index!=pushReviewList.length-1" @click="openLease(scope.row)">
{{scope.row.leaseMoney}}
</span>
<span v-if="scope.row.leaseMoney!=null && scope.$index==pushReviewList.length-1" >
{{scope.row.leaseMoney}}
{{Number(scope.row.leaseMoney).toFixed(3)}}
</span>
</template>
</el-table-column>
@ -127,7 +133,7 @@
{{scope.row.repairMoney}}
</span>
<span v-if="scope.row.repairMoney!=null && scope.$index==pushReviewList.length-1" >
{{scope.row.repairMoney}}
{{Number(scope.row.repairMoney).toFixed(3)}}
</span>
</template>
</el-table-column>
@ -137,7 +143,7 @@
{{scope.row.scrapMoney}}
</span>
<span v-if="scope.row.scrapMoney!=null && scope.$index==pushReviewList.length-1" >
{{scope.row.scrapMoney}}
{{Number(scope.row.scrapMoney).toFixed(3)}}
</span>
</template>
</el-table-column>
@ -147,13 +153,16 @@
{{scope.row.lostMoney}}
</span>
<span v-if="scope.row.lostMoney!=null && scope.$index==pushReviewList.length-1" >
{{scope.row.lostMoney}}
{{Number(scope.row.lostMoney).toFixed(3)}}
</span>
</template>
</el-table-column>
<el-table-column label="合计费用" align="center" prop="money" show-overflow-tooltip >
<template slot-scope="scope" >
<span v-if="scope.row.money!=null" >
<span v-if="scope.row.money!=null && scope.$index==pushReviewList.length-1" >
{{Number(scope.row.money).toFixed(3)}}
</span>
<span v-if="scope.row.money!=null && scope.$index!=pushReviewList.length-1" >
{{scope.row.money}}
</span>
</template>
@ -184,7 +193,7 @@
</div> -->
<!-- 租赁费用弹窗-->
<el-dialog :title="title" :visible.sync="showLease" width="1200px" append-to-body>
<el-dialog :title="title" :visible.sync="showLease" width="1300px" append-to-body>
<el-form :model="dialogLease" ref="dialogLease" size="small" :inline="true" label-width="80px">
<el-form-item label="物资名称" prop="typeName">
<el-input
@ -220,15 +229,22 @@
<el-table-column label="序号" align="center" width="80" type="index" />
<el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="mtUnitName" :show-overflow-tooltip="true"/>
<el-table-column label="租赁单价" align="center" prop="leasePrice" :show-overflow-tooltip="true"/>
<el-table-column label="租赁数量" align="center" prop="leaseNum" :show-overflow-tooltip="true"/>
<el-table-column label="租赁日期" align="center" prop="leaseDate" width="170px"/>
<el-table-column label="归还日期" align="center" prop="backDate" width="170px"/>
<el-table-column label="租赁天数" align="center" prop="leaseDays" :show-overflow-tooltip="true"/>
<el-table-column label="租赁费用" align="center" width="126px" prop="leaseMoney" :show-overflow-tooltip="true">
<el-table-column label="租赁数量" align="center" prop="num" :show-overflow-tooltip="true"/>
<el-table-column label="计算开始时间" align="center" prop="calcStartTime" width="120px"/>
<el-table-column label="计算结束时间" align="center" prop="calcEndTime" width="120px"/>
<el-table-column label="实际开始时间" align="center" prop="startTime" width="120px"/>
<el-table-column label="实际结束时间" align="center" prop="endTime" width="120px">
<template slot-scope="scope">
{{ scope.row.leaseMoney.toFixed(2) }}
<span v-if="scope.row.endTime">{{ scope.row.endTime }}</span>
<span v-else style="color: #909399;">未归还</span>
</template>
</el-table-column>
<el-table-column label="租赁天数" align="center" prop="leaseDays" :show-overflow-tooltip="true"/>
<el-table-column label="租赁费用" align="center" width="126px" prop="leaseCost" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.leaseCost.toFixed(2) }}
</template>
</el-table-column>
</el-table>
@ -492,6 +508,7 @@ export default {
},
dialogLeaseTotal: 0,
leaseAllMoney: 0,
currentLeaseRow: null, //
//
showRepair: false,
@ -630,6 +647,13 @@ export default {
/** 查询列表 */
getList() {
this.loading = true;
//
this.leaseAll = 0;
this.repairAll = 0;
this.scrapAll = 0;
this.loseAll = 0;
this.moneyAll = 0;
console.log(this.queryParams.month)
getPushReviewList(this.queryParams).then((response) => {
this.pushReviewList = response.rows;
@ -653,12 +677,17 @@ export default {
this.pushReviewList.push(obj)
this.loading = false;
});
this.loading = false;
},
/** 重置按钮操作 */
resetQuery() {
//
this.leaseAll = 0;
this.repairAll = 0;
this.scrapAll = 0;
this.loseAll = 0;
this.moneyAll = 0;
this.queryParams = {
pageNum: 1,
pageSize: 10,
@ -702,13 +731,26 @@ export default {
this.dialogLease.typeName = ""
this.dialogLease.modelName = ""
this.dialogLease.id = row.id;
this.currentLeaseRow = row; //
this.getLeaseList(row)
},
//
getLeaseList(row) {
this.loading = true;
//
const selectedMonth = this.queryParams.month; // : "2024-08"
const startDate = selectedMonth + '-01'; //
//
const year = parseInt(selectedMonth.split('-')[0]);
const month = parseInt(selectedMonth.split('-')[1]);
const endDate = new Date(year, month, 0).toISOString().split('T')[0]; //
let params = {
month: this.queryParams.month,
startDate: startDate,
endDate: endDate,
agreementId: row.agreementId,
typeName: this.dialogLease.typeName,
modelName: this.dialogLease.modelName,
@ -717,14 +759,14 @@ export default {
this.dialogLeaseList = response.rows;
this.leaseAllMoney = 0;
this.dialogLeaseList.forEach(item => {
this.leaseAllMoney += Number(item.leaseMoney);
this.leaseAllMoney += Number(item.leaseCost);
})
this.dialogLeaseTotal = response.total;
this.loading = false;
});
},
handleQueryLease() {
this.getLeaseList()
this.getLeaseList(this.currentLeaseRow)
},
//
handleExportLease() {
@ -875,13 +917,13 @@ export default {
objectSpanMethod ({ row, column, rowIndex, columnIndex }) {
if (rowIndex === this.pushReviewList.length-1 && columnIndex == 1) {
let rowspan = 2
let colspan = 6
let colspan = 7 // 67
return { rowspan, colspan }
}
//
// else if
// 使
else if (rowIndex === this.pushReviewList.length-1 && columnIndex < 6) {
else if (rowIndex === this.pushReviewList.length-1 && columnIndex < 7) { // 67
return {
rowspan: 0,
colspan: 0