edit
This commit is contained in:
@ -1,22 +1,17 @@
|
||||
<div class="modal-header">
|
||||
<div class="modal-title">超级管理员转授</div>
|
||||
</div>
|
||||
<form nz-form #f="ngForm" se-container="1">
|
||||
<se label="转授员工">张三(13411223344)</se>
|
||||
<form nz-form #f="ngForm" se-container="1" labelWidth="100">
|
||||
<se label="转授对象">{{i.name}}({{i.telephone}})</se>
|
||||
<se style="margin:0">
|
||||
<div class="code">为了账户安全,需超管手机验证({{ superPhone }})</div>
|
||||
</se>
|
||||
<se label="验证码">
|
||||
<div class="inputBox">
|
||||
<div nz-row [nzGutter]="8">
|
||||
<div nz-col [nzSpan]="12">
|
||||
<input nz-input name="smsVerifyCode" [(ngModel)]="smsVerifyCode" maxlength="6" placeholder="请输入短信验证码" />
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<button nz-button (click)="sendCode()" [disabled]="count > 0">
|
||||
{{ count > 0 ? '请等待' + count + 's' : '发送验证码' }}
|
||||
</button>
|
||||
</div>
|
||||
<div nz-row [nzGutter]="8">
|
||||
<div nz-col [nzSpan]="12">
|
||||
<input nz-input name="smsVerifyCode" [(ngModel)]="smsVerifyCode" maxlength="6" placeholder="请输入短信验证码" />
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<button nz-button (click)="sendCode()" [disabled]="count > 0">
|
||||
{{ count > 0 ? '请等待' + count + 's' : '发送验证码' }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</se>
|
||||
|
||||
@ -4,24 +4,21 @@ import { interval } from 'rxjs';
|
||||
import { take } from 'rxjs/operators';
|
||||
import { DunHelper } from 'src/app/shared/components/captcha/dun.helper';
|
||||
import { EACaptchaService } from 'src/app/shared/services/business/captcha.service';
|
||||
import { SystemService } from '../../../services/system.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-buyer-transpower',
|
||||
templateUrl: './transpower.component.html',
|
||||
styleUrls: ['./transpower.less']
|
||||
templateUrl: './transpower.component.html'
|
||||
})
|
||||
export class BuyerTranspowerComponent implements OnInit {
|
||||
record: any = {};
|
||||
count = 0;
|
||||
interval$: any;
|
||||
i: any;
|
||||
smsVerifyCode = '';
|
||||
superPhone = '';
|
||||
staffId = 1;
|
||||
staffList: any = [];
|
||||
constructor(
|
||||
private modal: NzModalRef,
|
||||
public captchaService: EACaptchaService,
|
||||
public service: SystemService,
|
||||
public eACaptchaService: EACaptchaService,
|
||||
private dunHelper: DunHelper,
|
||||
private cdr: ChangeDetectorRef
|
||||
) {}
|
||||
@ -30,24 +27,24 @@ export class BuyerTranspowerComponent implements OnInit {
|
||||
this.getPhone();
|
||||
}
|
||||
getPhone() {
|
||||
// this.service.request(this.service.$api_getAppLesseeAdmin).subscribe((res) => {
|
||||
// console.log(res);
|
||||
// if (res) {
|
||||
// this.superPhone = res.telephone;
|
||||
// }
|
||||
// });
|
||||
this.service.request(this.service.$api_get_app_admin_info).subscribe(res => {
|
||||
if (res) {
|
||||
this.superPhone = res.telephone;
|
||||
}
|
||||
});
|
||||
}
|
||||
sure() {
|
||||
const params = {
|
||||
appUserId: this.i.appUserId,
|
||||
smsVerifyCode: this.smsVerifyCode
|
||||
smsVerifyCode: this.smsVerifyCode,
|
||||
telephone: this.i.telephone
|
||||
};
|
||||
// this.service.request(this.service.$api_shiftResellerAdmin, params).subscribe((res) => {
|
||||
// if (res) {
|
||||
// this.service.msgSrv.success('操作成功!');
|
||||
// this.modal.close(true);
|
||||
// }
|
||||
// });
|
||||
this.service.request(this.service.$api_set_shift_admin, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('操作成功!');
|
||||
this.modal.close(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
close() {
|
||||
this.modal.destroy();
|
||||
@ -56,9 +53,9 @@ export class BuyerTranspowerComponent implements OnInit {
|
||||
* 获取手机验证码
|
||||
*/
|
||||
sendCode() {
|
||||
this.captchaService.getAppLesseeAdminSMVerificationCode().subscribe(res => {
|
||||
this.eACaptchaService.request(this.eACaptchaService.$api_getAppLesseeAdminSMVerificationCode).subscribe(res => {
|
||||
if (res.success && res.data.code === '1') {
|
||||
this.captchaService.msgSrv.success('发送验证码成功');
|
||||
this.eACaptchaService.msgSrv.success('发送验证码成功');
|
||||
this.createInterval();
|
||||
} else if (res.data.code === '503046') {
|
||||
this.dunHelper.popUp().subscribe(_ => {
|
||||
@ -66,7 +63,7 @@ export class BuyerTranspowerComponent implements OnInit {
|
||||
this.dunHelper.destory();
|
||||
});
|
||||
} else {
|
||||
this.captchaService.msgSrv.warning(res.msg);
|
||||
this.eACaptchaService.msgSrv.warning(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
.info {
|
||||
width : 90%;
|
||||
margin : 0 auto;
|
||||
color : #333;
|
||||
text-indent: 24px;
|
||||
}
|
||||
|
||||
.staffBox {
|
||||
display : flex;
|
||||
align-items: center;
|
||||
|
||||
img {
|
||||
width : 30px;
|
||||
height : 30px;
|
||||
overflow : hidden;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin: 0 0 0 5px;
|
||||
|
||||
dt {
|
||||
font-size : 14px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
dd {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.inputBox {
|
||||
position: relative;
|
||||
|
||||
a {
|
||||
position: absolute;
|
||||
top : 0;
|
||||
right : 5px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user