diff --git a/sgzb-ui/src/views/cost/csotSettlement/costApplyAdd.vue b/sgzb-ui/src/views/cost/csotSettlement/costApplyAdd.vue index 7cb8192b..161f70dd 100644 --- a/sgzb-ui/src/views/cost/csotSettlement/costApplyAdd.vue +++ b/sgzb-ui/src/views/cost/csotSettlement/costApplyAdd.vue @@ -352,7 +352,7 @@ title="费用结算提交" align="center" :visible.sync="applyVisible" - width="1200px" + width="80%" >
@@ -427,17 +434,24 @@ label="减免费用" align="center" prop="subCost" - :show-overflow-tooltip="true" - width="150" + width="180" > @@ -453,6 +467,8 @@ v-model="scope.row.remark" style="width: 100%" maxlength="50" + type="textarea" + :rows="6" > @@ -633,6 +649,10 @@ export default { this.applyList = response.data.relations 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 = Number(item.leaseCost) + Number(item.repairCost) + @@ -647,7 +667,8 @@ export default { Number(this.repairCost) + Number(this.scrapCost) + Number(this.loseCost) - this.costAll = costSum.toFixed(2) + this.costAll = costSum + this.subCostFlag = costSum }) }, //计算金额1 @@ -661,10 +682,12 @@ export default { arrCost = arrCost + Number(item.costs) } }) + return arrCost.toFixed(2) }, //提交按钮 handleAdd() { + this.getDataAll() this.applyVisible = true }, //el-table-合计总费用 @@ -707,6 +730,50 @@ export default { 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() { let costAll = 0 diff --git a/sgzb-ui/vue.config.js b/sgzb-ui/vue.config.js index c51fe257..050a6644 100644 --- a/sgzb-ui/vue.config.js +++ b/sgzb-ui/vue.config.js @@ -43,11 +43,11 @@ module.exports = { // target: `https://test-cc.zhgkxt.com`,//线上环境-南网 // 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://192.168.2.82: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`, //王 //******** 注意事项 ********* */