<el-table-column align="center" prop="credit.income" show-overflow-tooltip
label="推算收入" width="150">
<template slot-scope="scope" >
<div @dblclick="changeincome(scope.$index)" style="height: 40px;line-height: 40px;">
<span v-show="!isEdit">{{scope.row.credit.income}}</span>
<el-input :ref='"incomeinput"+scope.$index' @blur="incomeblur(scope.$index,scope.row.credit.income)"
@keyup.enter.native="$event.target.blur" clearable v-show="isEdit" size="small"
v-model="scope.row.credit.income" placeholder="请输入推算收入"
@change="updateincome(scope.row.user_profiles.user_id,scope.row.credit.income)"></el-input>
</div>
</template>
</el-table-column>
updateincome(user_id,income) {
var newParam={}
newParam.user_id=user_id
newParam.income=Number(income)
var pattern = /^[1-9][0-9]*$|0/
if (!pattern.test(newParam.income)) {
this.$message({
type: 'info',
message: "请输入正整数", })
return
}