This commit is contained in:
wangshiming
2022-02-15 14:35:20 +08:00
parent 8b3bec3c95
commit 68fd65f6dc
4 changed files with 187 additions and 135 deletions

View File

@ -1,142 +1,192 @@
<!-- 页头 -->
<page-header-wrapper [logo]="logo" [title]="'车队长详情'" [content]="content">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
<ng-template #content>
<nz-skeleton [nzLoading]="service.http.loading">
<div class="user-info">
<img [src]="userDetail?.avatar" />
<div style="flex: 1">
<div style="display: flex;width: 100%;justify-content: space-between;">
<p style="padding-right: 80px; width: 400px;">{{ userDetail?.name }}
<nz-badge nzStatus="success" nzText="正常" *ngIf="!userDetail?.stateLocked" class="ml-xl">
</nz-badge>
<nz-badge nzStatus="warning" nzText="冻结" *ngIf="userDetail?.stateLocked" class="ml-xl">
</nz-badge>
</p>
<div style="margin-right: 24px;">
<button *ngIf="userDetail?.stateLocked" [nzLoading]="service.http.loading" nz-button
nzType="primary" nzGhost (click)="userAction(1)">
启用
</button>
<button *ngIf="!userDetail?.stateLocked" [nzLoading]="service.http.loading" nz-button
nzDanger nzGhost (click)="userAction(0)">
冻结
</button>
</div>
</div>
<div style="display: flex;">
<p style="padding-right: 80px; width: 400px;">手机号:{{ userDetail?.phone }}
</p>
<p>注册时间:{{ userDetail?.createTime }}</p>
</div>
</div>
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
<ng-template #content>
<nz-skeleton [nzLoading]="service.http.loading">
<div class="user-info">
<img [src]="userDetail?.avatar" />
<div style="flex: 1">
<div style="display: flex; width: 100%; justify-content: space-between">
<p style="padding-right: 80px; width: 400px"
>{{ userDetail?.name }}
<nz-badge nzStatus="success" nzText="正常" *ngIf="!userDetail?.stateLocked" class="ml-xl"> </nz-badge>
<nz-badge nzStatus="warning" nzText="冻结" *ngIf="userDetail?.stateLocked" class="ml-xl"> </nz-badge>
</p>
<div style="margin-right: 24px">
<button
*ngIf="userDetail?.stateLocked"
[nzLoading]="service.http.loading"
nz-button
nzType="primary"
nzGhost
(click)="userAction(1)"
acl
[acl-ability]="['USERCENTER-DRIVER-CAPTAIN-DETAIL-lock']"
>
启用
</button>
<button
*ngIf="!userDetail?.stateLocked"
[nzLoading]="service.http.loading"
nz-button
nzDanger
nzGhost
(click)="userAction(0)"
acl
[acl-ability]="['USERCENTER-DRIVER-CAPTAIN-DETAIL-lock']"
>
冻结
</button>
</div>
</nz-skeleton>
</ng-template>
</div>
<div style="display: flex">
<p style="padding-right: 80px; width: 400px">手机号:{{ userDetail?.phone }} </p>
<p>注册时间:{{ userDetail?.createTime }}</p>
</div>
</div>
</div>
</nz-skeleton>
</ng-template>
</page-header-wrapper>
<nz-card [nzLoading]="service.http.loading">
<div [class]="isEditUser?'edit-box':'readOnly-box'">
<sv-container col="2">
<sv-title>个人信息
<label *ngIf="userIdentityDetail?.certificationStatus===1" style="color: #52c41a;" class="ml-md"><i
nz-icon nzType="check-circle" nzTheme="fill" class="mr-xs"></i>审核通过
</label>
<label *ngIf="userIdentityDetail?.certificationStatus===2" style="color: #ff4d4f;" class="ml-md"><i
nz-icon nzType="close-circle" nzTheme="fill" class="mr-xs"></i>驳回
</label>
<div style="float: right;">
<ng-container *ngIf="isEditUser; else elseTemplate">
<button [nzLoading]="service.http.loading" nz-button (click)="reset()">
取消
</button>
<button [nzLoading]="service.http.loading" nz-button nzDanger (click)="saveUser()">
保存
</button>
</ng-container>
<ng-template #elseTemplate>
<button nz-button nzType="default" nzDanger (click)="approveUser()"
*ngIf="userIdentityDetail?.certificationStatus===0">审核通过</button>
<button nz-button nzType="default" nzDanger (click)="rejectedUser()"
*ngIf="userIdentityDetail?.certificationStatus===0">驳回审核</button>
<button nz-button nzType="default" nzDanger (click)="ratify()">修改</button>
</ng-template>
</div>
</sv-title>
<sv label="姓名">
<input nz-input type="text" [(ngModel)]="userIdentityDetail.name" [readonly]="!isEditUser"
[nzBorderless]="!isEditUser" [placeholder]="isEditUser?'':'-'">
</sv>
<sv label="身份证号">
<input nz-input type="text" [(ngModel)]="userIdentityDetail.certificateNumber" [readonly]="!isEditUser"
[nzBorderless]="!isEditUser" [placeholder]="isEditUser?'':'-'">
</sv>
<sv label="身份证照" col="1">
<div class="d-flex">
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:userIdentityDetail,status:isEditUser,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'certificateBackFront'}">
</ng-container>
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:userIdentityDetail,status:isEditUser,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'certificateBack'}">
</ng-container>
</div>
</sv>
</sv-container>
</div>
<sv-container col="3" class="mt-md">
<sv-title>银行结算信息</sv-title>
<sv label="开户银行">
<!-- {{ detailData?.name }} -->
</sv>
<sv label="银行卡号">
<!-- {{ detailData?.certificateNumber }} -->
</sv>
<div [class]="isEditUser ? 'edit-box' : 'readOnly-box'">
<sv-container col="2">
<sv-title
>个人信息
<label *ngIf="userIdentityDetail?.certificationStatus === 1" style="color: #52c41a" class="ml-md"
><i nz-icon nzType="check-circle" nzTheme="fill" class="mr-xs"></i>审核通过
</label>
<label *ngIf="userIdentityDetail?.certificationStatus === 2" style="color: #ff4d4f" class="ml-md"
><i nz-icon nzType="close-circle" nzTheme="fill" class="mr-xs"></i>驳回
</label>
<div style="float: right">
<ng-container *ngIf="isEditUser; else elseTemplate">
<button [nzLoading]="service.http.loading" nz-button (click)="reset()"> 取消 </button>
<button [nzLoading]="service.http.loading" nz-button nzDanger (click)="saveUser()"> 保存 </button>
</ng-container>
<ng-template #elseTemplate>
<button nz-button nzType="default" nzDanger (click)="approveUser()" *ngIf="userIdentityDetail?.certificationStatus === 0"
acl [acl-ability]="['USERCENTER-DRIVER-CAPTAIN-DETAIL-audit']">审核通过</button
>
<button nz-button nzType="default" nzDanger (click)="rejectedUser()" *ngIf="userIdentityDetail?.certificationStatus === 0"
acl [acl-ability]="['USERCENTER-DRIVER-CAPTAIN-DETAIL-audit']" >驳回审核</button
>
<button nz-button nzType="default" nzDanger (click)="ratify()" acl [acl-ability]="['USERCENTER-DRIVER-CAPTAIN-DETAIL-edit']">修改</button>
</ng-template>
</div>
</sv-title>
<sv label="姓名">
<input
nz-input
type="text"
[(ngModel)]="userIdentityDetail.name"
[readonly]="!isEditUser"
[nzBorderless]="!isEditUser"
[placeholder]="isEditUser ? '' : '-'"
/>
</sv>
<sv label="身份证号">
<input
nz-input
type="text"
[(ngModel)]="userIdentityDetail.certificateNumber"
[readonly]="!isEditUser"
[nzBorderless]="!isEditUser"
[placeholder]="isEditUser ? '' : '-'"
/>
</sv>
<sv label="身份证照" col="1">
<div class="d-flex">
<ng-container
*ngTemplateOutlet="
uploadTemplate;
context: {
data: userIdentityDetail,
status: isEditUser,
key: 'certificatePhotoFrontWatermark',
key2: 'certificatePhotoFront',
hover: 'certificateBackFront'
}
"
>
</ng-container>
<ng-container
*ngTemplateOutlet="
uploadTemplate;
context: {
data: userIdentityDetail,
status: isEditUser,
key: 'certificatePhotoBackWatermark',
key2: 'certificatePhotoBack',
hover: 'certificateBack'
}
"
>
</ng-container>
</div>
</sv>
</sv-container>
</div>
<sv-container col="3" class="mt-md">
<sv-title>银行结算信息</sv-title>
<sv label="开户银行">
<!-- {{ detailData?.name }} -->
</sv>
<sv label="银行卡号">
<!-- {{ detailData?.certificateNumber }} -->
</sv>
</sv-container>
</nz-card>
<ng-template #redectModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="姓名">
{{ userIdentityDetail?.name }}
</se>
<se [col]="1" label="备注" required>
<textarea nz-input rows="3" style="width: 325px;margin-left: 14px;"
[(ngModel)]="approvalOpinion"></textarea>
</se>
</div>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="姓名">
{{ userIdentityDetail?.name }}
</se>
<se [col]="1" label="备注" required>
<textarea nz-input rows="3" style="width: 325px; margin-left: 14px" [(ngModel)]="approvalOpinion"></textarea>
</se>
</div>
</div>
</ng-template>
<ng-template #uploadTemplate let-data="data" let-status="status" let-key="key" let-key2="key2" let-hover="hover">
<nz-upload class="avatar-uploader" [nzAction]="uploadURl" nzName="multipartFile" nzListType="picture-card"
[nzShowUploadList]="false" nzFileType="image/png,image/jpeg,image/jpg,image/gif"
[nzDisabled]="!status || disabledUpload" (nzChange)="changeUpload($event,data,key,key2)">
<ng-container *ngIf="!data[key] && status">
<i class="upload-icon" nz-icon [nzType]="service.http.loading ? 'loading' : 'plus'"></i>
<div class="ant-upload-text">上传</div>
</ng-container>
<div *ngIf="data[key]" (mouseover)="data[hover]=true" (mouseleave)="data[hover]=false"
(click)="$event.cancelBubble=true" class="image-hover">
<img [src]="data[key]" style="width: 200px;height: 160px;" (click)="showImg(data[key])" />
<div class="mask" *ngIf="data[hover] && status"></div>
<div class="mask-over" *ngIf="data[hover] && status">
<i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon"
(click)="deleteImg(data,key,key2)"></i>
<div style="display: flex;align-items: center;">
<i nz-icon nzType="eye" nzTheme="fill" class="show-icon" (click)="showImg(data[key])"></i>
</div>
</div>
<nz-upload
class="avatar-uploader"
[nzAction]="uploadURl"
nzName="multipartFile"
nzListType="picture-card"
[nzShowUploadList]="false"
nzFileType="image/png,image/jpeg,image/jpg,image/gif"
[nzDisabled]="!status || disabledUpload"
(nzChange)="changeUpload($event, data, key, key2)"
>
<ng-container *ngIf="!data[key] && status">
<i class="upload-icon" nz-icon [nzType]="service.http.loading ? 'loading' : 'plus'"></i>
<div class="ant-upload-text">上传</div>
</ng-container>
<div
*ngIf="data[key]"
(mouseover)="data[hover] = true"
(mouseleave)="data[hover] = false"
(click)="$event.cancelBubble = true"
class="image-hover"
>
<img [src]="data[key]" style="width: 200px; height: 160px" (click)="showImg(data[key])" />
<div class="mask" *ngIf="data[hover] && status"></div>
<div class="mask-over" *ngIf="data[hover] && status">
<i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon" (click)="deleteImg(data, key, key2)"></i>
<div style="display: flex; align-items: center">
<i nz-icon nzType="eye" nzTheme="fill" class="show-icon" (click)="showImg(data[key])"></i>
</div>
</nz-upload>
</ng-template>
</div>
</div>
</nz-upload>
</ng-template>

View File

@ -16,8 +16,8 @@
<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)="st?.load(1)">查询</button>
<button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportList()">导出</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl [acl-ability]="['USERCENTER-DRIVER-CAPTAIN-list']">查询</button>
<button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportList()" acl [acl-ability]="['USERCENTER-DRIVER-CAPTAIN-export']">导出</button>
<button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
@ -36,7 +36,7 @@
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading">
<ng-template st-row="promotersTelephone" let-item let-index="index">
<a (click)="addPromoter(item)">
<a (click)="addPromoter(item)" acl [acl-ability]="['USERCENTER-DRIVER-CAPTAIN-promoter']">
{{ item.promotersTelephone ||'添加' }}
</a>
</ng-template>

View File

@ -217,11 +217,13 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit {
text: '查看',
click: item => {
this.router.navigate(['/usercenter/driver/captain/detail', item.appUserId]);
}
},
acl: { ability: ['USERCENTER-DRIVER-CAPTAIN-view'] },
},
{
text: '基础设置',
click: item => this.settingAction(item)
click: item => this.settingAction(item),
acl: { ability: ['USERCENTER-DRIVER-CAPTAIN-basicSetting'] },
}
]
}

View File

@ -82,7 +82,7 @@
*ngIf="userIdentityDetail?.certificationStatus===0" acl [acl-ability]="['USERCENTER-DRIVER-LIST-DETAIL-auditUser']">审核通过</button>
<button nz-button nzType="default" nzDanger (click)="rejectedUser()"
*ngIf="userIdentityDetail?.certificationStatus===0" acl [acl-ability]="['USERCENTER-DRIVER-LIST-DETAIL-auditUser']">驳回审核</button>
<button nz-button nzType="default" nzDanger (click)="ratify(0)">修改</button>
<button nz-button nzType="default" nzDanger (click)="ratify(0)" acl [acl-ability]="['USERCENTER-DRIVER-LIST-DETAIL-editUser']">修改</button>
</ng-template>
</div>
</sv-title>
@ -128,10 +128,10 @@
</ng-container>
<ng-template #editDriverButton>
<button *ngIf="driverDetail?.approvalStatus==10" nz-button nzType="default" nzDanger
(click)="approveDriver()">审核通过</button>
(click)="approveDriver()" acl [acl-ability]="['USERCENTER-DRIVER-LIST-DETAIL-auditDriver']">审核通过</button>
<button *ngIf="driverDetail?.approvalStatus==10" nz-button nzType="default" nzDanger
(click)="rejectedDriver()">驳回审核</button>
<button nz-button nzType="default" nzDanger (click)="ratify(1)">修改</button>
(click)="rejectedDriver()" acl [acl-ability]="['USERCENTER-DRIVER-LIST-DETAIL-auditDriver']">驳回审核</button>
<button nz-button nzType="default" nzDanger (click)="ratify(1)" acl [acl-ability]="['USERCENTER-DRIVER-LIST-DETAIL-editDriver']">修改</button>
</ng-template>
</div>
</sv-title>