|
|
@ -92,7 +92,6 @@ |
|
|
|
<el-table v-loading="loading" :data="userRegisterList" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
|
<el-table-column label="登录账号" align="center" prop="account" /> |
|
|
|
<el-table-column label="电话" align="center" prop="phone" /> |
|
|
|
<el-table-column label="用户状态" align="center" prop="status" > |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-tag type="primary" v-if="scope.row.status == '0'">发起</el-tag> |
|
|
@ -114,15 +113,22 @@ |
|
|
|
<span v-if="scope.row.userLevel == '2'">商企用户</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="联系电话" align="center" prop="phone" /> |
|
|
|
<el-table-column label="地址" align="center"> |
|
|
|
<template #default="scope"> |
|
|
|
<span v-if="scope.row.userType == '0'">{{ scope.row.addressInfo }}</span> |
|
|
|
<span v-if="scope.row.userType == '1'">{{ scope.row.address }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button v-if="(scope.row.name == null && scope.row.userType == '0') || (scope.row.address == null && scope.row.userType == '1')" |
|
|
|
<el-button v-if="(scope.row.addressInfo == '' && scope.row.userType == '0') || (scope.row.address == '' && scope.row.userType == '1')" |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
icon="el-icon-edit" |
|
|
|
icon="el-icon-document-add" |
|
|
|
@click="handleAddInfo(scope.row)" |
|
|
|
>补充</el-button> |
|
|
|
<el-button v-if="(scope.row.name != null && scope.row.userType == '0') || (scope.row.address != null && scope.row.userType == '1')" |
|
|
|
<el-button v-if="(scope.row.addressInfo != '' && scope.row.userType == '0') || (scope.row.address != '' && scope.row.userType == '1')" |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
icon="el-icon-view" |
|
|
@ -142,6 +148,13 @@ |
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
v-hasPermi="['business:userRegister:remove']" |
|
|
|
>删除</el-button> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
icon="el-icon-refresh" |
|
|
|
@click="passwordReset(scope.row)" |
|
|
|
v-hasPermi="['business:userRegister:edit']" |
|
|
|
>重置</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -183,12 +196,6 @@ |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="登录密码" prop="passwd"> |
|
|
|
<el-input v-model="form.passwd" show-password placeholder="请输入密码" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="确认密码" prop="passwd_re"> |
|
|
|
<el-input v-model="form.passwd_re" show-password placeholder="请再次输入密码" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
|
|
@ -283,7 +290,7 @@ |
|
|
|
{{formDetail.userInfoVo.addr}} |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="联系电话:"> |
|
|
|
{{formDetail.phone}} |
|
|
|
{{formDetail.userInfoVo.phone}} |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="用户类型:"> |
|
|
|
<template slot-scope="scope"> |
|
|
@ -334,7 +341,16 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { listUserRegister, getUserRegister, delUserRegister, addUserRegister, updateUserRegister ,addUserInfo ,addUserInfoBus} from "@/api/business/userRegister"; |
|
|
|
import { |
|
|
|
listUserRegister, |
|
|
|
getUserRegister, |
|
|
|
delUserRegister, |
|
|
|
addUserRegister, |
|
|
|
updateUserRegister, |
|
|
|
addUserInfo, |
|
|
|
addUserInfoBus, |
|
|
|
resetUserPassword |
|
|
|
} from "@/api/business/userRegister"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "UserRegister", |
|
|
@ -415,12 +431,6 @@ export default { |
|
|
|
userLevel: [ |
|
|
|
{ required: true, message: "用户级别不能为空", trigger: "change" } |
|
|
|
], |
|
|
|
passwd: [ |
|
|
|
{ required: true, message: "登录密码不能为空", trigger: "change" } |
|
|
|
], |
|
|
|
passwd_re: [ |
|
|
|
{ required: true, message: "登录密码确认不能为空", trigger: "change" } |
|
|
|
], |
|
|
|
legalPerson: [ |
|
|
|
{ required: true, message: "法人姓名不能为空", trigger: "blur" } |
|
|
|
], |
|
|
@ -430,6 +440,24 @@ export default { |
|
|
|
operateAddr: [ |
|
|
|
{ required: true, message: "经营地址不能为空", trigger: "blur" } |
|
|
|
], |
|
|
|
name: [ |
|
|
|
{ required: true, message: "登录账号不能为空", trigger: "blur" } |
|
|
|
], |
|
|
|
gender: [ |
|
|
|
{ required: true, message: "登录账号不能为空", trigger: "blur" } |
|
|
|
], |
|
|
|
idCard: [ |
|
|
|
{ required: true, message: "登录账号不能为空", trigger: "blur" } |
|
|
|
], |
|
|
|
phone: [ |
|
|
|
{ required: true, message: "登录账号不能为空", trigger: "blur" } |
|
|
|
], |
|
|
|
age: [ |
|
|
|
{ required: true, message: "登录账号不能为空", trigger: "blur" } |
|
|
|
], |
|
|
|
addr: [ |
|
|
|
{ required: true, message: "登录账号不能为空", trigger: "blur" } |
|
|
|
], |
|
|
|
}, |
|
|
|
options_userType: [{ |
|
|
|
value: '0', |
|
|
@ -547,9 +575,6 @@ export default { |
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.buttonLoading = true; |
|
|
|
if (this.form.passwd != this.form.passwd_re){ |
|
|
|
this.$modal.msgError("修改失败,两次输入的密码不同"); |
|
|
|
}else{ |
|
|
|
if (this.form.id != null) { |
|
|
|
updateUserRegister(this.form).then(response => { |
|
|
|
this.$modal.msgSuccess("修改成功"); |
|
|
@ -568,7 +593,6 @@ export default { |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
/** 用户信息-提交按钮-个人 */ |
|
|
@ -631,6 +655,24 @@ export default { |
|
|
|
this.openInfoBus = true; |
|
|
|
} |
|
|
|
this.title = this.$t('business.userInfo.addTitle'); |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 密码重置 |
|
|
|
* @param row |
|
|
|
*/ |
|
|
|
passwordReset(row) { |
|
|
|
this.$modal.confirm('是否确认重置登录密码?').then(() => { |
|
|
|
this.loading = true; |
|
|
|
return resetUserPassword(row.id); |
|
|
|
}).then(() => { |
|
|
|
this.loading = false; |
|
|
|
this.getList(); |
|
|
|
this.$modal.msgSuccess("重置成功"); |
|
|
|
}).catch(() => { |
|
|
|
}).finally(() => { |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|