|
|
@ -118,7 +118,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="上传金额" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.uploadMoney" clearable placeholder=""></el-input> |
|
|
|
<el-input v-model="scope.row.uploadMoney" @keyup.native="UpNumber" @keydown.native="UpNumber" clearable placeholder=""></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="二次上传日期" align="center" width="120"> |
|
|
@ -133,12 +133,12 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="待确定金额" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.stayDetermineMoney" clearable placeholder=""></el-input> |
|
|
|
<el-input v-model="scope.row.stayDetermineMoney" @keyup.native="UpNumber" @keydown.native="UpNumber" clearable placeholder=""></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="费用" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.money" clearable placeholder=""></el-input> |
|
|
|
<el-input v-model="scope.row.money" @keyup.native="UpNumber" @keydown.native="UpNumber" clearable placeholder=""></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="是否调整" align="center" width="100"> |
|
|
@ -150,8 +150,8 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="调整金额" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input :disabled="scope.row.isAdjustment === '' || scope.row.isAdjustment === '否'" v-model="scope.row.adjustmentMoney" clearable placeholder=""></el-input> |
|
|
|
<!-- <span>{{ scope.row.adjustmentMoney }}</span>--> |
|
|
|
<!-- <el-input :disabled="scope.row.isAdjustment === '' || scope.row.isAdjustment === '否'" v-model="scope.row.adjustmentMoney" clearable placeholder=""></el-input>--> |
|
|
|
<span>{{ scope.row.adjustmentMoney }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="调整说明" align="center" width="300"> |
|
|
@ -258,7 +258,7 @@ |
|
|
|
<span>调整金额合计</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item><span>{{ adjustmentMoney() }}</span></el-form-item> |
|
|
|
<el-form-item><span>{{ adjustmentMoneyAdd() }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
@ -489,36 +489,41 @@ export default { |
|
|
|
} |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
UpNumber(e) { |
|
|
|
e.target.value = e.target.value.replace(/[^\d]/g, '') // 清除“数字”和“.”"-"以外的字符 |
|
|
|
e.target.value = e.target.value.replace(/^00/, '0') // 开头不能有两个0 |
|
|
|
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') { |
|
|
|
// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 |
|
|
|
console.log(e.target.value) |
|
|
|
e.target.value = parseFloat(e.target.value) |
|
|
|
} |
|
|
|
}, |
|
|
|
changeIsAdjustment(row) { |
|
|
|
// if (row.isAdjustment === '是') { |
|
|
|
// if (row.uploadMoney === '') { |
|
|
|
// row.isAdjustment = '' |
|
|
|
// this.$message({ showClose: true, type: 'error', message: '上传金额不能为空' }) |
|
|
|
// return |
|
|
|
// } |
|
|
|
// if (row.money === '') { |
|
|
|
// row.isAdjustment = '' |
|
|
|
// this.$message({ showClose: true, type: 'error', message: '费用不能为空' }) |
|
|
|
// return |
|
|
|
// } |
|
|
|
// if (row.stayDetermineMoney === '') { |
|
|
|
// row.isAdjustment = '' |
|
|
|
// this.$message({ showClose: true, type: 'error', message: '待确定金额不能为空' }) |
|
|
|
// return |
|
|
|
// } |
|
|
|
// if (row.uploadMoney !== '' && row.money !== '' && row.stayDetermineMoney !== '') { |
|
|
|
// row.adjustmentMoney = parseInt(row.uploadMoney) - parseInt(row.money) - parseInt(row.stayDetermineMoney) - parseInt(row.estimateRebate) |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// row.adjustmentMoney = 0 |
|
|
|
// row.adjustmentRemarks = '' |
|
|
|
// } |
|
|
|
if (row.isAdjustment === '否') { |
|
|
|
if (row.isAdjustment === '是') { |
|
|
|
if (row.uploadMoney === '') { |
|
|
|
row.isAdjustment = '' |
|
|
|
this.$message({ showClose: true, type: 'error', message: '上传金额不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (row.money === '') { |
|
|
|
row.isAdjustment = '' |
|
|
|
this.$message({ showClose: true, type: 'error', message: '费用不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (row.stayDetermineMoney === '') { |
|
|
|
row.isAdjustment = '' |
|
|
|
this.$message({ showClose: true, type: 'error', message: '待确定金额不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (row.uploadMoney !== '' && row.money !== '' && row.stayDetermineMoney !== '') { |
|
|
|
row.adjustmentMoney = parseInt(row.uploadMoney) - parseInt(row.money) - parseInt(row.stayDetermineMoney) - parseInt(row.estimateRebate) |
|
|
|
} |
|
|
|
} else if (row.isAdjustment === '否') { |
|
|
|
row.adjustmentMoney = 0 |
|
|
|
row.adjustmentRemarks = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
adjustmentMoney() { |
|
|
|
adjustmentMoneyAdd() { |
|
|
|
this.formobj.adjustmentMoney = parseInt(this.formobj.firstRebate - 0) + parseInt(this.formobj.secondRebate - 0) - parseInt(this.formobj.surplusRebate - 0) |
|
|
|
return this.formobj.adjustmentMoney |
|
|
|
}, |
|
|
@ -575,6 +580,14 @@ export default { |
|
|
|
this.$refs['divCheckAdd'].showAdd(this.listQuery.params.createOrgSid) |
|
|
|
}, |
|
|
|
toSave(row) { |
|
|
|
if (row.uploadDate === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '上传日期不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (row.uploadMoney === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '上传金额不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (row.stayDetermineMoney === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '待确定金额不能为空' }) |
|
|
|
return |
|
|
@ -592,8 +605,10 @@ export default { |
|
|
|
} |
|
|
|
} else if (row.adjustmentMoney !== '0') { |
|
|
|
if (row.isAdjustment === '否') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '因待确定金额等于0且调整金额大于0,是否调整选项需选择是' }) |
|
|
|
return |
|
|
|
if ((parseInt(row.uploadMoney) - parseInt(row.estimateRebate)) > 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '因待确定金额等于0且调整金额大于0,是否调整选项需选择是' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (row.adjustmentMoney === '0') { |
|
|
|
if (row.isAdjustment === '否') { |
|
|
|