Browse Source

完善单车返利核对待核对

master
yunuo970428 3 years ago
parent
commit
214f274c0b
  1. 81
      anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatetobechecked.vue

81
anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatetobechecked.vue

@ -118,7 +118,7 @@
</el-table-column> </el-table-column>
<el-table-column label="上传金额" align="center" width="150"> <el-table-column label="上传金额" align="center" width="150">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="二次上传日期" align="center" width="120"> <el-table-column label="二次上传日期" align="center" width="120">
@ -133,12 +133,12 @@
</el-table-column> </el-table-column>
<el-table-column label="待确定金额" align="center" width="150"> <el-table-column label="待确定金额" align="center" width="150">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="费用" align="center" width="150"> <el-table-column label="费用" align="center" width="150">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否调整" align="center" width="100"> <el-table-column label="是否调整" align="center" width="100">
@ -150,8 +150,8 @@
</el-table-column> </el-table-column>
<el-table-column label="调整金额" align="center" width="150"> <el-table-column label="调整金额" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input :disabled="scope.row.isAdjustment === '' || scope.row.isAdjustment === '否'" v-model="scope.row.adjustmentMoney" clearable placeholder=""></el-input> <!-- <el-input :disabled="scope.row.isAdjustment === '' || scope.row.isAdjustment === '否'" v-model="scope.row.adjustmentMoney" clearable placeholder=""></el-input>-->
<!-- <span>{{ scope.row.adjustmentMoney }}</span>--> <span>{{ scope.row.adjustmentMoney }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="调整说明" align="center" width="300"> <el-table-column label="调整说明" align="center" width="300">
@ -258,7 +258,7 @@
<span>调整金额合计</span> <span>调整金额合计</span>
</el-col> </el-col>
<el-col :span="20"> <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-col>
</el-row> </el-row>
</div> </div>
@ -489,36 +489,41 @@ export default {
} }
this.init() 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 !== '-') {
// 0102
console.log(e.target.value)
e.target.value = parseFloat(e.target.value)
}
},
changeIsAdjustment(row) { changeIsAdjustment(row) {
// if (row.isAdjustment === '') { if (row.isAdjustment === '是') {
// if (row.uploadMoney === '') { if (row.uploadMoney === '') {
// row.isAdjustment = '' row.isAdjustment = ''
// this.$message({ showClose: true, type: 'error', message: '' }) this.$message({ showClose: true, type: 'error', message: '上传金额不能为空' })
// return return
// } }
// if (row.money === '') { if (row.money === '') {
// row.isAdjustment = '' row.isAdjustment = ''
// this.$message({ showClose: true, type: 'error', message: '' }) this.$message({ showClose: true, type: 'error', message: '费用不能为空' })
// return return
// } }
// if (row.stayDetermineMoney === '') { if (row.stayDetermineMoney === '') {
// row.isAdjustment = '' row.isAdjustment = ''
// this.$message({ showClose: true, type: 'error', message: '' }) this.$message({ showClose: true, type: 'error', message: '待确定金额不能为空' })
// return return
// } }
// if (row.uploadMoney !== '' && row.money !== '' && row.stayDetermineMoney !== '') { if (row.uploadMoney !== '' && row.money !== '' && row.stayDetermineMoney !== '') {
// row.adjustmentMoney = parseInt(row.uploadMoney) - parseInt(row.money) - parseInt(row.stayDetermineMoney) - parseInt(row.estimateRebate) row.adjustmentMoney = parseInt(row.uploadMoney) - parseInt(row.money) - parseInt(row.stayDetermineMoney) - parseInt(row.estimateRebate)
// } }
// } else { } else if (row.isAdjustment === '否') {
// row.adjustmentMoney = 0
// row.adjustmentRemarks = ''
// }
if (row.isAdjustment === '否') {
row.adjustmentMoney = 0 row.adjustmentMoney = 0
row.adjustmentRemarks = '' row.adjustmentRemarks = ''
} }
}, },
adjustmentMoney() { adjustmentMoneyAdd() {
this.formobj.adjustmentMoney = parseInt(this.formobj.firstRebate - 0) + parseInt(this.formobj.secondRebate - 0) - parseInt(this.formobj.surplusRebate - 0) this.formobj.adjustmentMoney = parseInt(this.formobj.firstRebate - 0) + parseInt(this.formobj.secondRebate - 0) - parseInt(this.formobj.surplusRebate - 0)
return this.formobj.adjustmentMoney return this.formobj.adjustmentMoney
}, },
@ -575,6 +580,14 @@ export default {
this.$refs['divCheckAdd'].showAdd(this.listQuery.params.createOrgSid) this.$refs['divCheckAdd'].showAdd(this.listQuery.params.createOrgSid)
}, },
toSave(row) { 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 === '') { if (row.stayDetermineMoney === '') {
this.$message({ showClose: true, type: 'error', message: '待确定金额不能为空' }) this.$message({ showClose: true, type: 'error', message: '待确定金额不能为空' })
return return
@ -592,8 +605,10 @@ export default {
} }
} else if (row.adjustmentMoney !== '0') { } else if (row.adjustmentMoney !== '0') {
if (row.isAdjustment === '否') { if (row.isAdjustment === '否') {
this.$message({ showClose: true, type: 'error', message: '因待确定金额等于0且调整金额大于0,是否调整选项需选择是' }) if ((parseInt(row.uploadMoney) - parseInt(row.estimateRebate)) > 0) {
return this.$message({ showClose: true, type: 'error', message: '因待确定金额等于0且调整金额大于0,是否调整选项需选择是' })
return
}
} }
} else if (row.adjustmentMoney === '0') { } else if (row.adjustmentMoney === '0') {
if (row.isAdjustment === '否') { if (row.isAdjustment === '否') {

Loading…
Cancel
Save