|
|
|
@ -4,7 +4,7 @@ |
|
|
|
<el-form :inline="true" @submit.native.prevent label-position="top" label-width="100px" style="margin-top: -5px;"> |
|
|
|
<el-row> |
|
|
|
<el-form-item :label="'操作员:'"> |
|
|
|
<el-input ref="operatorId" @keyup.enter.native="saveOperatorData" |
|
|
|
<el-input ref="operatorId" @keyup.enter.native="saveOperatorData" @blur="checkOperatorId" |
|
|
|
v-model="operatorData.operatorId" |
|
|
|
style="width: 110px"> |
|
|
|
</el-input> |
|
|
|
@ -12,7 +12,7 @@ |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-form-item :label="'操作员姓名:'"> |
|
|
|
<el-input v-model="operatorData.operatorName" style="width: 110px"></el-input> |
|
|
|
<el-input class="customer-color" v-model="operatorData.operatorName" readonly="readonly" style="width: 110px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
@ -77,30 +77,65 @@ export default { |
|
|
|
saveOperatorData() { |
|
|
|
getOperatorData(this.operatorData).then(({data}) => { |
|
|
|
//判断是否存在 |
|
|
|
if(!data.row){ |
|
|
|
//判断是否存在 |
|
|
|
if(data.code == 500){ |
|
|
|
this.operatorData.operatorName = ''; |
|
|
|
this.$message.error(data.msg); |
|
|
|
return false; |
|
|
|
}else if(!data.row){ |
|
|
|
this.$message.error('账号有误!'); |
|
|
|
this.operatorData.operatorName = ''; |
|
|
|
return false; |
|
|
|
}else{ |
|
|
|
let status = data.row.status; |
|
|
|
this.operatorData.operatorName = data.row.operatorName; |
|
|
|
//重置操作员信息状态 |
|
|
|
this.operatorData.status = status; |
|
|
|
//判断是否验证通过 |
|
|
|
if (status == 'N') { |
|
|
|
this.operatorFlag = false; |
|
|
|
} else { |
|
|
|
this.operatorFlag = true; |
|
|
|
} |
|
|
|
if (!this.operatorFlag) { |
|
|
|
this.$message.error('操作员信息不可用!'); |
|
|
|
} |
|
|
|
//校验没有问题 关闭弹窗 |
|
|
|
this.closeDialog(); |
|
|
|
//调用初始化的方法 |
|
|
|
this.$emit('initOperatorData', this.operatorData) |
|
|
|
} |
|
|
|
let status = data.row.status; |
|
|
|
//判断是否验证通过 |
|
|
|
if (status == 'N') { |
|
|
|
this.operatorFlag = false; |
|
|
|
} else { |
|
|
|
this.operatorFlag = true; |
|
|
|
} |
|
|
|
//重置操作员信息状态 |
|
|
|
this.operatorData.status = status; |
|
|
|
if (!this.operatorFlag) { |
|
|
|
this.$message.error('操作员信息不可用!'); |
|
|
|
this.operatorData.operatorName = ''; |
|
|
|
} |
|
|
|
this.operatorData.operatorName = data.row.operatorName; |
|
|
|
//校验没有问题 关闭弹窗 |
|
|
|
this.closeDialog(); |
|
|
|
//调用初始化的方法 |
|
|
|
this.$emit('initOperatorData', this.operatorData); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
}) |
|
|
|
/*检查操作员的信息*/ |
|
|
|
checkOperatorId(){ |
|
|
|
getOperatorData(this.operatorData).then(({data}) => { |
|
|
|
//判断是否存在 |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
this.operatorData.operatorName = ''; |
|
|
|
return false; |
|
|
|
}else if(!data.row){ |
|
|
|
this.$message.error('账号有误!'); |
|
|
|
this.operatorData.operatorName = ''; |
|
|
|
return false; |
|
|
|
} |
|
|
|
let status = data.row.status; |
|
|
|
//判断是否验证通过 |
|
|
|
if (status == 'N') { |
|
|
|
this.operatorFlag = false; |
|
|
|
} else { |
|
|
|
this.operatorFlag = true; |
|
|
|
} |
|
|
|
//重置操作员信息状态 |
|
|
|
this.operatorData.status = status; |
|
|
|
if (!this.operatorFlag) { |
|
|
|
this.$message.error('操作员信息不可用!'); |
|
|
|
this.operatorData.operatorName = ''; |
|
|
|
} |
|
|
|
this.operatorData.operatorName = data.row.operatorName; |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
@ -109,4 +144,8 @@ export default { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
/*控制操作员的字体颜色*/ |
|
|
|
.customer-color /deep/ .el-input__inner{ |
|
|
|
color: red; |
|
|
|
} |
|
|
|
</style> |