Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -1,11 +1,9 @@
|
||||
<nz-layout class="layout">
|
||||
<nz-header>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="8" style="display: flex;align-items: center;">
|
||||
<img width="95" height="32" src="./assets/images/user/logo.png" [routerLink]="['/']" />
|
||||
</div>
|
||||
<div nz-col nzSpan="8" class="text-center">
|
||||
<label class="title">运营管理平台</label>
|
||||
<div nz-col nzSpan="24" style="display: flex;align-items: center;">
|
||||
<img width="32" height="32" src="./assets/images/user/logo.svg" [routerLink]="['/']" />
|
||||
<label class="title ml-sm">运营管理平台</label>
|
||||
</div>
|
||||
</div>
|
||||
</nz-header>
|
||||
|
||||
@ -10,12 +10,13 @@
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 5px 5px #d1d1d1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
color : #1890ff;
|
||||
font-weight: 800;
|
||||
font-size : 28px;
|
||||
text-align : center;
|
||||
font-size : 18px;
|
||||
font-weight: 600;
|
||||
color : #26282A;
|
||||
}
|
||||
@ -1,56 +1,81 @@
|
||||
<div class="body-box">
|
||||
<div></div>
|
||||
<div>
|
||||
<img class="box-header" [src]="imageUrl" alt="" srcset="" />
|
||||
<div nz-row class="box-content">
|
||||
<div nz-col nzXs="0" nzSm="0" nzMd="0" nzLg="12"
|
||||
[style]="{ 'background-image': 'url(./assets/images/user/login-image.png)', 'background-size': '100%' }"></div>
|
||||
<div nz-col nzXs="22" nzSm="20" nzMd="16" nzLg="12" class="form-box">
|
||||
<h1 class="title">运营管理后台</h1>
|
||||
<nz-tabset (nzSelectChange)="switch($event)">
|
||||
<nz-tab nzTitle="手机号登录">
|
||||
<sf #captchaSF [layout]="'vertical'" [schema]="captchaSchema" [ui]="captchaUI" [button]="'none'">
|
||||
<ng-template sf-template="smsCode" let-me let-ui="ui" let-schema="schema">
|
||||
<nz-input-group nzSearch [nzPrefix]="prefixTemplateMail" [nzSuffix]="suffixTemplateInfo">
|
||||
<input nz-input type="text" placeholder="请输入验证码" [attr.id]="me.id" [disabled]="me.disabled"
|
||||
[attr.disabled]="me.disabled" [nzSize]="ui.size" [ngModel]="me.formProperty.value"
|
||||
(ngModelChange)="me.setValue($event)" />
|
||||
</nz-input-group>
|
||||
<ng-template #prefixTemplateMail>
|
||||
<i nz-icon nzType="mail"></i>
|
||||
<div class="box-content d-flex">
|
||||
<img src="./assets/images/user/login-image.png" class="login-logo" alt="">
|
||||
<div class="login-box">
|
||||
<div class="login-box-content">
|
||||
<nz-tabset (nzSelectChange)="switch($event)">
|
||||
<nz-tab nzTitle="密码登录">
|
||||
<sf #accountSF [layout]="'vertical'" [schema]="accountSchema" [ui]="accountUI" [button]="'none'">
|
||||
<ng-template sf-template="username" let-i let-ui="ui" let-schema="schema">
|
||||
<nz-input-group [nzSuffix]="inputClearTpl">
|
||||
<input type="text" nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)"
|
||||
placeholder="请输入手机号" />
|
||||
</nz-input-group>
|
||||
<ng-template #inputClearTpl>
|
||||
<i nz-icon class="ant-input-clear-icon" nzTheme="fill" nzType="close-circle" *ngIf="i.value"
|
||||
style="font-size: 16px;" (click)="i.setValue(null)"></i>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</sf>
|
||||
</nz-tab>
|
||||
<nz-tab nzTitle="账户密码登录">
|
||||
<sf #accountSF [layout]="'vertical'" [schema]="accountSchema" [ui]="accountUI" [button]="'none'"></sf>
|
||||
</nz-tab>
|
||||
</nz-tabset>
|
||||
<button nz-button type="button" nzType="primary" nzSize="large" (click)="submit()"
|
||||
[nzLoading]="userSrv?.http?.loading" nzBlock style="border-radius: 4px">
|
||||
登录
|
||||
</button>
|
||||
<div class="other">
|
||||
<p>
|
||||
<ng-template sf-template="password" let-i let-ui="ui" let-schema="schema">
|
||||
<nz-input-group [nzSuffix]="inputClearTpl">
|
||||
<input [type]="isPasswordType?'password':'text'" nz-input [ngModel]="i.value"
|
||||
(ngModelChange)="i.setValue($event)" placeholder="请输入密码" />
|
||||
</nz-input-group>
|
||||
<ng-template #inputClearTpl>
|
||||
<i *ngIf="i.value && isPasswordType" nz-icon class="ant-input-clear-icon" style="font-size: 18px;"
|
||||
nzType="eye" nzTheme="fill" (click)="isPasswordType=false"></i>
|
||||
<i *ngIf="i.value && !isPasswordType" nz-icon class="ant-input-clear-icon" style="font-size: 18px;"
|
||||
nzType="eye-invisible" nzTheme="fill" (click)="isPasswordType=true"></i>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</sf>
|
||||
</nz-tab>
|
||||
<nz-tab nzTitle="验证码登录">
|
||||
<sf #captchaSF [layout]="'vertical'" [schema]="captchaSchema" [ui]="captchaUI" [button]="'none'">
|
||||
<ng-template sf-template="phone" let-i let-ui="ui" let-schema="schema">
|
||||
<nz-input-group [nzSuffix]="inputClearTpl">
|
||||
<input type="text" nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)"
|
||||
placeholder="请输入手机号" />
|
||||
</nz-input-group>
|
||||
<ng-template #inputClearTpl>
|
||||
<i nz-icon class="ant-input-clear-icon" nzTheme="fill" nzType="close-circle" *ngIf="i.value"
|
||||
style="font-size: 16px;" (click)="i.setValue(null)"></i>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
<ng-template sf-template="smsCode" let-me let-ui="ui" let-schema="schema">
|
||||
<nz-input-group nzSearch [nzSuffix]="suffixTemplateInfo">
|
||||
<input nz-input type="text" placeholder="验证码" [attr.id]="me.id" [disabled]="me.disabled"
|
||||
[attr.disabled]="me.disabled" [nzSize]="ui.size" [ngModel]="me.formProperty.value"
|
||||
(ngModelChange)="me.setValue($event)" />
|
||||
</nz-input-group>
|
||||
</ng-template>
|
||||
</sf>
|
||||
</nz-tab>
|
||||
</nz-tabset>
|
||||
<button nz-button type="button" nzType="primary" nzSize="large" (click)="submit()"
|
||||
[nzLoading]="userSrv?.http?.loading" nzBlock class="mt-md">
|
||||
登录
|
||||
</button>
|
||||
<p class="forgetPwd mt-xl" routerLink="/passport/retrieve-password">忘记密码</p>
|
||||
<p class="agreement">
|
||||
登录即代表您同意 <a target="_blank" [routerLink]="['/passport/agreement']" [queryParams]="{ type: 1 }">《平台服务协议》</a>
|
||||
<a target="_blank" [queryParams]="{ type: 2 }" [routerLink]="['/passport/agreement']">《隐私政策》</a>
|
||||
</p>
|
||||
<div class="other text-right">
|
||||
<a class="forgetPwd" routerLink="/passport/retrieve-password">忘记密码</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<!-- Copyright © 2015-2020 星链380star.com 版权所有 | 粤ICP备16120630号 -->
|
||||
深圳市怡亚通供应链股份有限公司 版权所有
|
||||
<p [innerHTML]="copyright"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-template #suffixTemplateInfo>
|
||||
<ng-container *ngIf="count < 1; else intervalTemplate">
|
||||
<span class="msg-btn" style="color: #3370ff; cursor: pointer" (click)="getCaptcha()">获取验证码</span>
|
||||
<span class="msg-btn" style="color: #26282A; cursor: pointer;font-size: 14px;" (click)="getCaptcha()">获取验证码</span>
|
||||
</ng-container>
|
||||
<ng-template #intervalTemplate> 请等待{{ count }}s </ng-template>
|
||||
</ng-template>
|
||||
@ -5,26 +5,36 @@
|
||||
flex-direction : column;
|
||||
justify-content : space-between;
|
||||
width : 100%;
|
||||
max-width : 1080px;
|
||||
height : 100%;
|
||||
max-width : 960px;
|
||||
height : calc(100vh - 64px);
|
||||
margin : auto;
|
||||
padding : 50px 0 80px;
|
||||
-webkit-box-orient : vertical;
|
||||
|
||||
.box-header {
|
||||
max-width : 240px;
|
||||
max-height : 48px;
|
||||
margin-bottom: 36px;
|
||||
}
|
||||
|
||||
.box-content {
|
||||
width : 100%;
|
||||
height: 560px;
|
||||
width : 100%;
|
||||
height : 600px;
|
||||
border-radius: 0px 16px 16px 0px;
|
||||
|
||||
.login-logo {
|
||||
width : 310px;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
.login-box {
|
||||
flex : 1;
|
||||
background-color: #fff;
|
||||
|
||||
.login-box-content {
|
||||
max-width: 434px;
|
||||
margin : auto;
|
||||
padding : 88px 0 38px;
|
||||
}
|
||||
}
|
||||
|
||||
.form-box {
|
||||
margin : 0 auto;
|
||||
padding : 40px 88px 40px;
|
||||
background-color: #fff;
|
||||
margin : 0 auto;
|
||||
padding: 40px 88px 40px;
|
||||
|
||||
|
||||
.title {
|
||||
margin-bottom: 30px;
|
||||
@ -51,9 +61,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
.forgetPwd {
|
||||
font-weight: 400;
|
||||
color : #26282A;
|
||||
font-size : 14px;
|
||||
text-align : center;
|
||||
cursor : pointer;
|
||||
}
|
||||
|
||||
.agreement {
|
||||
text-align: center;
|
||||
font-size : 12px;
|
||||
color : #86909C;
|
||||
margin-top: 88px;
|
||||
|
||||
a {
|
||||
color: #E60012;
|
||||
}
|
||||
}
|
||||
|
||||
::ng-deep {
|
||||
passport-login {
|
||||
background-color: #f0f4f7;
|
||||
background-color: #F8FBFD;
|
||||
}
|
||||
|
||||
.pro-passport {
|
||||
min-height: calc(100vh - 64px);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,33 +104,90 @@
|
||||
|
||||
// tabs样式调整
|
||||
.ant-tabs-nav-list {
|
||||
justify-content: space-between;
|
||||
width : 281px;
|
||||
margin : auto;
|
||||
width: 281px;
|
||||
|
||||
.ant-tabs-tab-btn {
|
||||
font-size: 18px;
|
||||
font-size : 24px;
|
||||
color : #86909C;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.ant-tabs-tab {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
|
||||
color: #26282A;
|
||||
}
|
||||
|
||||
.ant-tabs-tab {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.ant-tabs-top>.ant-tabs-nav {
|
||||
margin: 0 0 30px 0;
|
||||
margin: 0 0 38px 0;
|
||||
|
||||
.ant-tabs-ink-bar {
|
||||
height: 4px;
|
||||
background: #26282A;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-tabs-top>.ant-tabs-nav::before {
|
||||
border-bottom: 0;
|
||||
// input 框样式修改
|
||||
nz-input-group {
|
||||
height : 44px;
|
||||
font-size : 14px;
|
||||
border-radius: 4px;
|
||||
border-color : #E5E6EB;
|
||||
box-shadow : none;
|
||||
}
|
||||
|
||||
nz-input-group {
|
||||
height : 50px;
|
||||
font-size: 16px;
|
||||
.ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover {
|
||||
border-color: #E5E6EB;
|
||||
}
|
||||
|
||||
.ant-input {
|
||||
padding : 10px 16px;
|
||||
border-color : #E5E6EB;
|
||||
border-radius: 4px;
|
||||
font-size : 14px;
|
||||
box-shadow : none;
|
||||
}
|
||||
|
||||
.ant-form-item {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.ant-form-item-with-help {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.ant-form-item-explain,
|
||||
.ant-form-item-extra {
|
||||
min-height : 32px;
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
// 按钮样式修改
|
||||
.ant-btn {
|
||||
padding: 0 16px 12px;
|
||||
}
|
||||
|
||||
.ant-btn-primary {
|
||||
color : #fff;
|
||||
background : #26282A;
|
||||
border-color : #26282A;
|
||||
font-size : 14px;
|
||||
line-height : 40px;
|
||||
height : 44px;
|
||||
border-radius: 4px
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 990px) {
|
||||
.box-content {
|
||||
|
||||
.login-logo {
|
||||
width : 0px !important;
|
||||
height: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -33,9 +33,10 @@ export class UserLoginComponent implements OnInit, OnDestroy {
|
||||
captchaUI!: SFUISchema;
|
||||
count = 0;
|
||||
type = 0;
|
||||
|
||||
isPasswordType = true;
|
||||
// vcode = null;
|
||||
|
||||
imageUrl = './assets/images/user/logo.png';
|
||||
copyright = '';
|
||||
constructor(
|
||||
public userSrv: EAUserService,
|
||||
@ -69,22 +70,21 @@ export class UserLoginComponent implements OnInit, OnDestroy {
|
||||
username: {
|
||||
title: '',
|
||||
type: 'string',
|
||||
maxLength: 30,
|
||||
maxLength: 11,
|
||||
ui: {
|
||||
placeholder: '请输入您的账号',
|
||||
prefixIcon: 'user',
|
||||
size: 'large'
|
||||
} as SFStringWidgetSchema
|
||||
widget: 'custom',
|
||||
size: 'large',
|
||||
errors: { required: '请输入手机号', format: '手机号格式错误' }
|
||||
}
|
||||
},
|
||||
password: {
|
||||
title: '',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入您的密码',
|
||||
prefixIcon: 'lock',
|
||||
type: 'password',
|
||||
size: 'large'
|
||||
} as SFStringWidgetSchema
|
||||
widget: 'custom',
|
||||
size: 'large',
|
||||
errors: { required: '请输入密码' }
|
||||
}
|
||||
}
|
||||
// sc: {
|
||||
// title: '',
|
||||
@ -117,11 +117,11 @@ export class UserLoginComponent implements OnInit, OnDestroy {
|
||||
format: 'mobile',
|
||||
maxLength: 11,
|
||||
ui: {
|
||||
placeholder: '请输入您的手机号',
|
||||
prefixIcon: 'mobile',
|
||||
placeholder: '请输入手机号',
|
||||
widget: 'custom',
|
||||
size: 'large',
|
||||
errors: { required: '请输入手机号!', format: '手机号格式错误' }
|
||||
} as SFStringWidgetSchema
|
||||
}
|
||||
},
|
||||
smsCode: {
|
||||
title: '',
|
||||
@ -184,17 +184,17 @@ export class UserLoginComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
submit(): void {
|
||||
if (this.type === 0) {
|
||||
this.captchaSF.validator({ emitError: true });
|
||||
if (!this.captchaSF.valid) {
|
||||
return;
|
||||
}
|
||||
this.userSrv.loginByMobile(this.captchaSF.value.phone, this.captchaSF.value.smsCode, this.captchaSF.value.sc);
|
||||
} else {
|
||||
this.accountSF.validator({ emitError: true });
|
||||
if (!this.accountSF.valid) {
|
||||
return;
|
||||
}
|
||||
this.userSrv.loginByAccount(this.accountSF.value.username, this.accountSF.value.password);
|
||||
} else {
|
||||
this.captchaSF.validator({ emitError: true });
|
||||
if (!this.captchaSF.valid) {
|
||||
return;
|
||||
}
|
||||
this.userSrv.loginByMobile(this.captchaSF.value.phone, this.captchaSF.value.smsCode, this.captchaSF.value.sc);
|
||||
}
|
||||
// this.router.navigateByUrl('/');
|
||||
/* if (!this.accountSF.valid && !this.captchaSF.valid) {
|
||||
@ -212,6 +212,10 @@ export class UserLoginComponent implements OnInit, OnDestroy {
|
||||
|
||||
ngOnDestroy(): void {}
|
||||
|
||||
changeInputType(a: any) {
|
||||
console.log(a);
|
||||
}
|
||||
|
||||
private createInterval() {
|
||||
this.count = 59;
|
||||
interval(1000)
|
||||
|
||||
@ -12,6 +12,11 @@ const routes: Routes = [
|
||||
path: 'passport',
|
||||
component: LayoutPassportComponent,
|
||||
children: [
|
||||
{
|
||||
path: 'login',
|
||||
component: UserLoginComponent,
|
||||
data: { title: '登录' }
|
||||
},
|
||||
{
|
||||
path: 'agreement',
|
||||
component: OrderAgreementComponent,
|
||||
@ -23,11 +28,6 @@ const routes: Routes = [
|
||||
data: { title: '忘记密码' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'passport/login',
|
||||
component: UserLoginComponent,
|
||||
data: { title: '登录' }
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@ -34,19 +34,19 @@
|
||||
</div>
|
||||
<div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right mt-sm">
|
||||
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="enable"
|
||||
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked === 1">
|
||||
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked === 1">
|
||||
启用
|
||||
</button>
|
||||
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="frozen"
|
||||
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked === 0">
|
||||
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked === 0">
|
||||
冻结
|
||||
</button>
|
||||
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payfrozen"
|
||||
(nzOnConfirm)="PayOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 0">
|
||||
(nzOnConfirm)="PayOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 1">
|
||||
开通支付权限
|
||||
</button>
|
||||
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payenable"
|
||||
(nzOnConfirm)="PayOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 1">
|
||||
(nzOnConfirm)="PayOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 0">
|
||||
关闭支付权限
|
||||
</button>
|
||||
</div>
|
||||
@ -176,16 +176,16 @@
|
||||
<sv-container col="3" class="mt16">
|
||||
<sv-title>企业开票信息</sv-title>
|
||||
<sv label="开户银行">
|
||||
{{ detailData?.name }}
|
||||
{{ detailData?.createBank }}
|
||||
</sv>
|
||||
<sv label="银行账户">
|
||||
{{ detailData?.bankAccount }}
|
||||
</sv>
|
||||
<sv label="注册电话">
|
||||
{{ detailData?.validStartTime }}
|
||||
{{ detailData?.registerPhone }}
|
||||
</sv>
|
||||
<sv label="注册地址">
|
||||
{{ detailData?.validStartTime }}
|
||||
{{ detailData?.registerAddress }}
|
||||
</sv>
|
||||
</sv-container>
|
||||
</nz-card>
|
||||
|
||||
@ -108,45 +108,41 @@ export class FreightComponentsListDetailComponent implements OnInit {
|
||||
* 冻结
|
||||
*/
|
||||
freezeOrResume(type: number) {
|
||||
console.log(type);
|
||||
// this.service.http
|
||||
// .post(this.service.$api_set_freezeOrResume, {
|
||||
// tenantId: this.route.snapshot.params.id,
|
||||
// // tenantId: this.route.snapshot.queryParams.tenantId,
|
||||
// status: type,
|
||||
// })
|
||||
// .subscribe((res) => {
|
||||
// if (res.data === true) {
|
||||
// if (type === 0) {
|
||||
// this.service.msgSrv.success(`启用成功!`);
|
||||
// } else if (type === 1) {
|
||||
// this.service.msgSrv.success(`冻结成功!`);
|
||||
// }
|
||||
// this.ngOnInit();
|
||||
// } else {
|
||||
// this.service.msgSrv.error(res.msg || '操作失败!');
|
||||
// }
|
||||
// });
|
||||
this.service.http
|
||||
.post(this.service.$api_lock_freight, {
|
||||
id: this.route.snapshot.params.id,
|
||||
statedLocked: !!type
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res.data === true) {
|
||||
if (type === 1) {
|
||||
this.service.msgSrv.success(`启用成功!`);
|
||||
} else {
|
||||
this.service.msgSrv.success(`冻结成功!`);
|
||||
}
|
||||
this.initData();
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg || '操作失败!');
|
||||
}
|
||||
});
|
||||
}
|
||||
PayOrResume(type: number) {
|
||||
console.log(type);
|
||||
// this.service.http
|
||||
// .post(this.service.$api_set_freezeOrResume, {
|
||||
// tenantId: this.route.snapshot.params.id,
|
||||
// // tenantId: this.route.snapshot.queryParams.tenantId,
|
||||
// status: type,
|
||||
// })
|
||||
// .subscribe((res) => {
|
||||
// if (res.data === true) {
|
||||
// if (type === 0) {
|
||||
// this.service.msgSrv.success(`启用成功!`);
|
||||
// } else if (type === 1) {
|
||||
// this.service.msgSrv.success(`冻结成功!`);
|
||||
// }
|
||||
// this.ngOnInit();
|
||||
// } else {
|
||||
// this.service.msgSrv.error(res.msg || '操作失败!');
|
||||
// }
|
||||
// });
|
||||
this.service.http
|
||||
.post(this.service.$api_lock_freight, {
|
||||
id: this.route.snapshot.params.id,
|
||||
statedLocked: !!type
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res.data === true) {
|
||||
if (type === 1) {
|
||||
this.service.msgSrv.success(`开启成功!`);
|
||||
} else {
|
||||
this.service.msgSrv.success(`关闭成功!`);
|
||||
}
|
||||
this.initData();
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg || '操作失败!');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,12 +12,12 @@
|
||||
<!-- 搜索区 -->
|
||||
<!-- 搜索表单 -->
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="creat()">新建</button>
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button>
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="creat()">新增企业</button>
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="exportList()">导出</button>
|
||||
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
|
||||
(click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
@ -46,11 +46,21 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="promotersTelephone" let-item let-index="index">
|
||||
<a (click)="daoyun(item)">{{ item.promotersTelephone }}</a>
|
||||
<a (click)="addPromoter(item)">{{ item.promotersTelephone || '添加' }}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="stateCol" let-item let-index="index">
|
||||
<nz-tag *ngIf="item.stateLocked" nzColor="error">冻结</nz-tag>
|
||||
<nz-tag *elseBlock nzColor="success">正常</nz-tag>
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
</nz-card>
|
||||
|
||||
<ng-template #promoterModal>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col nzSpan="24" se-container [labelWidth]="80">
|
||||
<se [col]="1" label="手机号">
|
||||
<input nz-input [(ngModel)]="promotersTelephone" />
|
||||
</se>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -16,7 +16,10 @@ export class FreightComponentsListComponent implements OnInit {
|
||||
columns!: STColumn[];
|
||||
@ViewChild('st', { static: false }) st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
@ViewChild('promoterModal', { static: false })
|
||||
promoterModal!: any;
|
||||
|
||||
promotersTelephone = '';
|
||||
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
|
||||
|
||||
/**
|
||||
@ -36,10 +39,6 @@ export class FreightComponentsListComponent implements OnInit {
|
||||
return params;
|
||||
}
|
||||
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter(item => item.checked) || [];
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
@ -189,6 +188,30 @@ export class FreightComponentsListComponent implements OnInit {
|
||||
daoyun(item: any) {
|
||||
this.router.navigate(['./view', item.tenantId], { relativeTo: this.ar });
|
||||
}
|
||||
|
||||
addPromoter(item?: any) {
|
||||
this.promotersTelephone = item?.promotersTelephone;
|
||||
const modal = this.modal.create({
|
||||
nzTitle: '推广业务员',
|
||||
nzContent: this.promoterModal,
|
||||
nzOnOk: () => {
|
||||
if (!!!this.promotersTelephone) {
|
||||
return false;
|
||||
}
|
||||
if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) {
|
||||
return false;
|
||||
}
|
||||
this.service.request(this.service.$api_add_salesman, { ids: [item.id], salesmanMobile: this.promotersTelephone }).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success(item?.promotersTelephone ? '添加推广员成功' : '修改推广员成功');
|
||||
}
|
||||
this.st.load();
|
||||
});
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
expandToggle() {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/expand', this._$expand);
|
||||
@ -196,11 +219,24 @@ export class FreightComponentsListComponent implements OnInit {
|
||||
creat() {
|
||||
this.router.navigate(['./new'], { relativeTo: this.ar });
|
||||
}
|
||||
|
||||
exportList() {
|
||||
const params = this.reqParams;
|
||||
this.service
|
||||
.request(this.service.$api_export_freight_list, { ...params, pageSize: this.st.ps, pageIndex: this.st.pi })
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('导出成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
this._$expand = false;
|
||||
this.st.reload();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<page-header-wrapper [title]="'企业认证'"></page-header-wrapper>
|
||||
<page-header-wrapper [title]="'新增企业'"></page-header-wrapper>
|
||||
<nz-card>
|
||||
<ng-container>
|
||||
<sf #sf1 [compact]="true" [ui]="ui" [schema]="schema1" [button]="'none'" [formData]="infoData1">
|
||||
<ng-template sf-template="title1" let-me let-ui="ui" let-schema="schema">
|
||||
<div class="form-title">营业执照基本信息</div>
|
||||
<div class="form-title">企业基本信息</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="title2" let-me let-ui="ui" let-schema="schema">
|
||||
<div class="form-title" style="margin-top: 40px">营业执照法人信息</div>
|
||||
|
||||
@ -19,9 +19,18 @@ export class UsermanageService extends BaseService {
|
||||
// 查询企业列表
|
||||
$api_get_freight_list = '/api/mdc/cuc/enterpriseInfo/operate/list/page';
|
||||
|
||||
// 导出企业列表
|
||||
$api_export_freight_list = '/api/mdc/cuc/enterpriseInfo/operate/export';
|
||||
|
||||
// 查询企业详情
|
||||
$api_get_freight_detail = '/api/mdc/cuc/enterpriseInfo/operate/detail';
|
||||
|
||||
// 添加企业业务员
|
||||
$api_add_salesman = '/api/mdc/cuc/enterpriseInfo/operate/addSalesman';
|
||||
|
||||
// 冻结/启用企业业
|
||||
$api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock';
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user