费用结算页面优化
This commit is contained in:
parent
6d7a3e9f10
commit
2ed34bec99
|
|
@ -352,7 +352,7 @@
|
||||||
title="费用结算提交"
|
title="费用结算提交"
|
||||||
align="center"
|
align="center"
|
||||||
:visible.sync="applyVisible"
|
:visible.sync="applyVisible"
|
||||||
width="1200px"
|
width="80%"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<el-table
|
<el-table
|
||||||
|
|
@ -360,6 +360,7 @@
|
||||||
show-summary
|
show-summary
|
||||||
sum-text="合计"
|
sum-text="合计"
|
||||||
:summary-method="getSummaries"
|
:summary-method="getSummaries"
|
||||||
|
border
|
||||||
>
|
>
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -384,7 +385,6 @@
|
||||||
label="租赁费用"
|
label="租赁费用"
|
||||||
align="center"
|
align="center"
|
||||||
prop="leaseCost"
|
prop="leaseCost"
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="维修费用"
|
label="维修费用"
|
||||||
|
|
@ -409,17 +409,24 @@
|
||||||
label="增项费用"
|
label="增项费用"
|
||||||
align="center"
|
align="center"
|
||||||
prop="addCost"
|
prop="addCost"
|
||||||
:show-overflow-tooltip="true"
|
width="180"
|
||||||
width="150"
|
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number
|
<!-- <el-input-number
|
||||||
v-model="scope.row.addCost"
|
v-model="scope.row.addCost"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="100000000"
|
:max="100000000"
|
||||||
@input="countNum(scope.row)"
|
@input="countNum(scope.row)"
|
||||||
|
></el-input-number> -->
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
style="width: 150px"
|
||||||
|
v-model="scope.row.addCost"
|
||||||
|
:min="0"
|
||||||
|
:max="99999999"
|
||||||
|
@change="onAddChange(scope.row)"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -427,17 +434,24 @@
|
||||||
label="减免费用"
|
label="减免费用"
|
||||||
align="center"
|
align="center"
|
||||||
prop="subCost"
|
prop="subCost"
|
||||||
:show-overflow-tooltip="true"
|
width="180"
|
||||||
width="150"
|
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number
|
<!-- <el-input-number
|
||||||
v-model="scope.row.subCost"
|
v-model="scope.row.subCost"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="scope.row.cost"
|
:max="scope.row.cost"
|
||||||
@input="countNum(scope.row)"
|
@input="countNum(scope.row)"
|
||||||
|
></el-input-number> -->
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
style="width: 150px"
|
||||||
|
v-model="scope.row.subCost"
|
||||||
|
:min="0"
|
||||||
|
:max="subCostFlag"
|
||||||
|
@change="onSubChange(scope.row)"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -453,6 +467,8 @@
|
||||||
v-model="scope.row.remark"
|
v-model="scope.row.remark"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
|
type="textarea"
|
||||||
|
:rows="6"
|
||||||
></el-input>
|
></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -633,6 +649,10 @@ export default {
|
||||||
|
|
||||||
this.applyList = response.data.relations
|
this.applyList = response.data.relations
|
||||||
this.applyList.forEach((item) => {
|
this.applyList.forEach((item) => {
|
||||||
|
item.leaseCost = Number(item.leaseCost)
|
||||||
|
item.repairCost = Number(item.repairCost)
|
||||||
|
item.scrapCost = Number(item.scrapCost)
|
||||||
|
item.loseCost = Number(item.loseCost)
|
||||||
item.cost =
|
item.cost =
|
||||||
Number(item.leaseCost) +
|
Number(item.leaseCost) +
|
||||||
Number(item.repairCost) +
|
Number(item.repairCost) +
|
||||||
|
|
@ -647,7 +667,8 @@ export default {
|
||||||
Number(this.repairCost) +
|
Number(this.repairCost) +
|
||||||
Number(this.scrapCost) +
|
Number(this.scrapCost) +
|
||||||
Number(this.loseCost)
|
Number(this.loseCost)
|
||||||
this.costAll = costSum.toFixed(2)
|
this.costAll = costSum
|
||||||
|
this.subCostFlag = costSum
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//计算金额1
|
//计算金额1
|
||||||
|
|
@ -661,10 +682,12 @@ export default {
|
||||||
arrCost = arrCost + Number(item.costs)
|
arrCost = arrCost + Number(item.costs)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return arrCost.toFixed(2)
|
return arrCost.toFixed(2)
|
||||||
},
|
},
|
||||||
//提交按钮
|
//提交按钮
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
|
this.getDataAll()
|
||||||
this.applyVisible = true
|
this.applyVisible = true
|
||||||
},
|
},
|
||||||
//el-table-合计总费用
|
//el-table-合计总费用
|
||||||
|
|
@ -707,6 +730,50 @@ export default {
|
||||||
Number(row.subCost || 0)
|
Number(row.subCost || 0)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/** 费用增项时触发的事件 */
|
||||||
|
onAddChange(row) {
|
||||||
|
if (row.addCost === undefined) {
|
||||||
|
row.addCost = 0
|
||||||
|
}
|
||||||
|
if (row.addCost >= 100000000) {
|
||||||
|
this.$message.error('增项费用不能超过1亿')
|
||||||
|
row.addCost = 99999999
|
||||||
|
}
|
||||||
|
row.cost = (
|
||||||
|
row.leaseCost +
|
||||||
|
row.repairCost +
|
||||||
|
row.scrapCost +
|
||||||
|
row.loseCost +
|
||||||
|
row.addCost -
|
||||||
|
row.subCost
|
||||||
|
).toFixed(2)
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 费用减项时触发事件 */
|
||||||
|
onSubChange(row) {
|
||||||
|
if (row.subCost === undefined) {
|
||||||
|
row.subCost = 0
|
||||||
|
}
|
||||||
|
if (row.subCost > this.costAll && this.costAll === row.cost) {
|
||||||
|
this.$message.error('减免费用不能超过小计费用')
|
||||||
|
this.subCostFlag = row.costAll
|
||||||
|
row.subCost = this.costAll
|
||||||
|
}
|
||||||
|
if (row.cost > this.costAll) {
|
||||||
|
this.$message.error('减免费用不能超过小计费用')
|
||||||
|
this.subCostFlag = row.cost
|
||||||
|
row.subCost = row.cost
|
||||||
|
}
|
||||||
|
row.cost = (
|
||||||
|
row.leaseCost +
|
||||||
|
row.repairCost +
|
||||||
|
row.scrapCost +
|
||||||
|
row.loseCost +
|
||||||
|
row.addCost -
|
||||||
|
row.subCost
|
||||||
|
).toFixed(2)
|
||||||
|
},
|
||||||
|
|
||||||
//提交按钮
|
//提交按钮
|
||||||
submitApply() {
|
submitApply() {
|
||||||
let costAll = 0
|
let costAll = 0
|
||||||
|
|
|
||||||
|
|
@ -43,11 +43,11 @@ module.exports = {
|
||||||
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
||||||
// target: `https://z.csgmall.com.cn`,
|
// target: `https://z.csgmall.com.cn`,
|
||||||
|
|
||||||
target: `http://192.168.2.160:28080`, //超
|
// target: `http://192.168.2.160:28080`, //超
|
||||||
// target: `http://10.40.92.81:28080`, //韩/
|
// target: `http://10.40.92.81:28080`, //韩/
|
||||||
// target: `http://192.168.2.82:28080`,//旭/
|
// target: `http://192.168.2.82:28080`,//旭/
|
||||||
// target: `http://192.168.2.248:28080`, //帅
|
// target: `http://192.168.2.248:28080`, //帅
|
||||||
// target: `http://192.168.2.209:28080`, //福
|
target: `http://192.168.2.218:28080`, //福
|
||||||
// target: `http://192.168.2.125:39080`, //王
|
// target: `http://192.168.2.125:39080`, //王
|
||||||
|
|
||||||
//******** 注意事项 ********* */
|
//******** 注意事项 ********* */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue