Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
wangshiming
2021-12-16 20:28:32 +08:00
24 changed files with 982 additions and 397 deletions

View File

@ -0,0 +1,142 @@
<!-- 页头 -->
<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>
</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>
</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>
</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>
</div>
</nz-upload>
</ng-template>

View File

@ -0,0 +1,24 @@
@import '../../../../less/edit.less';
:host {
::ng-deep {
.sv__title {
font-weight: 600;
}
.user-info {
display : flex;
font-size: 16px;
img {
width : 64px;
height : 64px;
margin-right : 15px;
border-radius: 50%;
}
}
}
}

View File

@ -0,0 +1,215 @@
import { DatePipe } from '@angular/common';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { apiConf } from '@conf/api.conf';
import { NzModalService } from 'ng-zorro-antd/modal';
import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service';
import { ImageViewComponent } from 'src/app/shared/components/imagelist';
@Component({
selector: 'app-captain-detail',
templateUrl: './captain-detail.component.html',
styleUrls: ['./captain-detail.component.less'],
providers: [DatePipe]
})
export class CaptainDetailComponent implements OnInit {
userDetail: any;
userIdentityDetail: any = {};
tempalateUserIdentityDetail = { ...this.userIdentityDetail };
@ViewChild('redectModal', { static: false })
redectModal!: any;
@ViewChild('rejectedDriverModal', { static: false })
rejectedDriverModal!: any;
approvalOpinion = '';
isEditUser = false;
uploadURl = apiConf.waterFileUpload;
disabledUpload = false;
constructor(
private nzModalService: NzModalService,
public service: UsermanageService,
private route: ActivatedRoute,
private datePipe: DatePipe
) {}
ngOnInit() {
this.initData();
}
initData() {
// 获取司机头部信息
this.service
.request(this.service.$api_get_user_detail, {
appUserId: this.route.snapshot.params.id
})
.subscribe(res => {
if (res) {
this.userDetail = res;
}
});
// 获取用户个人信息
this.service
.request(this.service.$api_get_user_identity, {
id: this.route.snapshot.params.id
})
.subscribe(res => {
if (res) {
this.userIdentityDetail = res;
this.tempalateUserIdentityDetail = { ...this.userIdentityDetail };
}
});
}
/** 启用/冻结司机 */
userAction(status: number) {
console.log(this.userDetail);
this.nzModalService.warning({
nzTitle: status === 1 ? '确定启用该司机吗?' : '确定冻结该司机吗?',
nzContent: status === 1 ? '启用后,该司机将恢复正常使用功能,请再次确认!' : '冻结后,司机将被限制使用,无法登陆,请谨慎操作!',
nzOnOk: () => {
this.service
.request(this.service.$api_lock_or_free_user, {
appUserId: [this.userDetail.appUserId],
freezeOrResume: !!!status,
pageName: '司机详情',
telephone: this.userDetail.phone
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('操作成功');
}
this.initData();
});
}
});
}
/** 审核通过个人信息 */
approveUser() {
this.nzModalService.confirm({
nzTitle: '审核通过',
nzContent: `是否确认通过(姓名:${this.userIdentityDetail.name})审核`,
nzOnOk: () => {
this.adjuctUser({ auditStatus: 0, auditType: 0, identityId: this.userIdentityDetail?.id }, '审核通过');
}
});
}
/** 驳回个人信息 */
rejectedUser() {
this.approvalOpinion = '';
this.nzModalService.create({
nzTitle: '审核驳回',
nzContent: this.redectModal,
nzOnOk: () => {
if (!this.approvalOpinion) {
return false;
}
this.adjuctUser(
{
auditStatus: 1,
auditType: 0,
identityId: this.userIdentityDetail?.id,
certificationOpinions: this.approvalOpinion
},
'审核驳回成功'
);
return;
}
});
}
/** 个人信息审核 */
private adjuctUser(params: any, msg: string) {
this.service.request(this.service.$api_approve_identity, { ...params }).subscribe(res => {
if (res) {
this.service.msgSrv.success(msg);
}
this.initData();
});
}
/**
* 开启修改
*/
ratify() {
this.isEditUser = true;
}
/**
* 需求修改
*/
reset() {
this.userIdentityDetail = { ...this.tempalateUserIdentityDetail };
this.isEditUser = false;
}
saveUser() {
const userIdentity = this.userIdentityDetail;
const params = {
certificateNumber: userIdentity.certificateNumber,
certificatePhotoBack: userIdentity.certificatePhotoBack,
certificatePhotoBackWatermark: userIdentity.certificatePhotoBackWatermark,
certificatePhotoFront: userIdentity.certificatePhotoFront,
certificatePhotoFrontWatermark: userIdentity.certificatePhotoFrontWatermark,
certificateType: userIdentity.certificateType,
handCertificate: userIdentity.handCertificate,
id: userIdentity.id,
name: userIdentity.name,
souceType: userIdentity.souceType,
sourceAppId: userIdentity.sourceAppId,
tenantId: userIdentity.tenantId,
userId: userIdentity.userId,
validEndTime:
userIdentity.validEndTime?.length === 10
? userIdentity.validEndTime
: this.datePipe.transform(userIdentity.validEndTime, 'yyyy-MM-dd'),
validStartTime:
userIdentity.validStartTime?.length === 10
? userIdentity.validStartTime
: this.datePipe.transform(userIdentity.validStartTime, 'yyyy-MM-dd')
};
this.service.request(this.service.$api_update_driver_identity, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('修改成功');
this.isEditUser = false;
this.initData();
}
});
}
changeUpload({ file, fileList, type }: any, data: any, key: string, key2: string) {
if (type === 'success') {
data[key] = file.response.data?.fullFileWatermarkPath;
data[key2] = file.response.data?.fullFilePath;
}
}
showImg(url: any) {
const params = {
imgList: [url],
index: 0
};
this.nzModalService.create({ nzContent: ImageViewComponent, nzComponentParams: { params } });
}
deleteImg(data: any, key: string, key2: string) {
this.nzModalService.warning({
nzTitle: '是否确认删除该图片',
nzOnOk: () => {
this.disabledUpload = true;
data[key] = '';
data[key2] = '';
setTimeout(() => {
this.disabledUpload = false;
}, 100);
}
});
}
goBack() {
window.history.go(-1);
}
}

View File

@ -7,77 +7,50 @@
* @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\list.component.html * @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\list.component.html
--> -->
<!-- 页头 --> <!-- 页头 -->
<page-header-wrapper ></page-header-wrapper> <page-header-wrapper></page-header-wrapper>
<nz-card> <nz-card>
<!-- 搜索区 --> <!-- 搜索区 -->
<!-- 搜索表单 --> <!-- 搜索表单 -->
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 --> <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4"> <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
<sf </div>
#sf <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
[schema]="schema" <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button>
[ui]="ui" <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
[mode]="'search'" (click)="st?.load(1)">查询</button>
[disabled]="!sf?.valid" <button nz-button (click)="resetSF()">重置</button>
(formSubmit)="st?.load(1)" <button nz-button nzType="link" (click)="expandToggle()">
(formReset)="resetSF()" {{ !_$expand ? '展开' : '收起' }}
></sf> <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div> </div>
<!-- [loading]="service.http.loading" -->
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<ng-container *ngIf="queryFieldCount > 4">
<div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button>
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</ng-container>
</div> </div>
</nz-card> </nz-card>
<nz-card> <nz-card>
<!-- 数据列表 --> <!-- 数据列表 -->
<!-- [data]="service.$api_get_supplier_page" --> <!-- [data]="service.$api_get_supplier_page" -->
<st <st #st [columns]="columns" [data]='service.$api_get_user_expand'
#st
[bordered]="true"
[columns]="columns"
[data]='datalist'
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }" [res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500"
[loadingDelay]="500" [loading]="service.http.loading">
[loading]="service.http.loading" <ng-template st-row="promotersTelephone" let-item let-index="index">
> <a (click)="addPromoter(item)">
<ng-template st-row="enterpriseName" let-item let-index="index"> {{ item.promotersTelephone ||'添加' }}
<div nz-tooltip [nzTooltipTitle]="item.enterpriseName"> </a>
<div
style="display: inline-block; max-width: 280px; margin: 0 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis"
>
{{ item.enterpriseName }}
</div>
</div>
</ng-template>
<ng-template st-row="contactsPhone" let-item let-index="index">
<div
style="color: #52c41a;" (click)="daoyun(item)"
>
{{ item.contactsPhone }}
</div>
</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> </ng-template>
</st> </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" maxlength="11" required />
</se>
</div>
</div>
</ng-template>

View File

@ -1,22 +0,0 @@
.expend-options {
margin-top: 0px;
}
@media (min-width: 1200px) {
.expend-options {
margin-top: -40px;
max-width : 400px;
position : absolute;
right : 0;
bottom : 30px;
}
}
:host::ng-deep {
nz-range-picker {
width: 100%;
}
}

View File

@ -11,49 +11,18 @@ import { UsermanageService } from '../../../services/usercenter.service';
}) })
export class UserCenterComponentsDriverCaptainComponent implements OnInit { export class UserCenterComponentsDriverCaptainComponent implements OnInit {
_$expand = false; _$expand = false;
url = `/rule?_allow_anonymous=true`;
ui!: SFUISchema; ui: SFUISchema = { '*': { spanLabelFixed: 120, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } };
schema!: SFSchema; schema: SFSchema = this.initSF();
columns!: STColumn[]; columns: STColumn[] = this.initST();
datalist = [
{
storeName: '企业名称',
contactsName: '152746565',
enterpriseName: '湖南',
unifiedSocialCreditCode: '45454',
contactsPhone: '*97889461561',
effectiveDateStr: '废弃eww',
enStatusStr2: '正常',
enStatusStr3: '正常',
unifiedSocialCreditCode3: '常用服务',
unifiedSocialCreditCode2: '正常',
tenantId: 1
},
{
storeName: '企业名称',
contactsName: '152746565',
enterpriseName: '湖南',
unifiedSocialCreditCode: '45454',
contactsPhone: '*97889461561',
effectiveDateStr: '废弃eww',
enStatusStr2: '正常',
enStatusStr3: '正常',
unifiedSocialCreditCode3: '常用服务',
unifiedSocialCreditCode2: '正常',
tenantId: 2
}
];
@ViewChild('st', { static: false }) st!: STComponent; @ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent; @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) {} constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
/**
* 查询字段个数navigate
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
/** /**
* 查询参数 * 查询参数
@ -76,8 +45,6 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.initSF();
this.initST();
this.ar.url.subscribe(params => { this.ar.url.subscribe(params => {
this.st?.load(1); this.st?.load(1);
}); });
@ -88,8 +55,48 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit {
return i; return i;
}); });
} }
initSF() {
this.schema = { 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)) {
this.service.msgSrv.error('手机格式错误');
return false;
}
this.service
.request(this.service.$api_add_user_salesman, { userId: item.userId, mobile: 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);
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
private initSF(): SFSchema {
return {
properties: { properties: {
expand: { expand: {
type: 'boolean', type: 'boolean',
@ -97,31 +104,63 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit {
hidden: true hidden: true
} }
}, },
storeName: { title: '司机姓名', type: 'string', ui: { showRequired: false } }, name: { title: '司机姓名', type: 'string', ui: { placeholder: '请输入', showRequired: false } },
phone: { mobile: {
title: '手机号', title: '手机号',
type: 'string', type: 'string',
format: 'mobile', format: 'mobile',
maxLength: 11, maxLength: 11,
ui: { ui: {
placeholder: '请输入手机号' placeholder: '请输入'
} }
}, },
phon747e: { identityNo: {
title: '银行卡号', title: '身份证号',
type: 'string', type: 'string',
ui: { ui: {
placeholder: '请输入银行卡号' placeholder: '请输入'
} }
}, },
promotersTelephone: {
phone2: {
title: '业务员手机号', title: '业务员手机号',
type: 'string', type: 'string',
format: 'mobile', format: 'mobile',
maxLength: 11, maxLength: 11,
ui: { ui: {
placeholder: '请输入手机号', placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
identityStatus: {
type: 'string',
title: '实名认证状态',
enum: [
{ label: '全部', value: '' },
{ label: '待审核', value: 0 },
{ label: '审核通过', value: 1 },
{ label: '驳回', value: 2 }
],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => value
}
}
},
source: {
type: 'string',
title: '注册渠道',
enum: [
{ label: '全部', value: '' },
{ label: '自己录入', value: 1 },
{ label: '货主录', value: 2 }
],
default: '',
ui: {
widget: 'select',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
@ -129,18 +168,28 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit {
} }
} }
}; };
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } };
} }
initST() { private initST(): STColumn[] {
this.columns = [ return [
// { title: '', type: 'checkbox', className: 'text-center' }, // { title: '', type: 'checkbox', className: 'text-center' },
{ title: '司机姓名', className: 'text-center', index: 'storeName' }, { title: '司机姓名', className: 'text-center', index: 'name' },
{ title: '手机号', className: 'text-center', index: 'contactsName' }, { title: '手机号', className: 'text-center', index: 'mobile' },
{ title: '承运总单量', className: 'text-center', render: 'enterpriseName' }, { title: '身份证号', className: 'text-center', index: 'identityNo' },
{ title: '当前车辆', className: 'text-center', index: 'unifiedSocialCreditCode' }, {
{ title: '银行卡号', className: 'text-center', index: 'unifiedSocialCreditCode' }, title: '实名认证状态',
{ title: '推广业务员', className: 'text-center', index: 'unifiedSocialCreditCode2' }, className: 'text-center',
index: 'identityStatus',
type: 'badge',
badge: {
'-1': { text: '未提交', color: 'default' },
0: { text: '待审核', color: 'processing' },
1: { text: '审核通过', color: 'success' },
2: { text: '驳回', color: 'warning' }
}
},
{ title: '推广业务员', className: 'text-center', render: 'promotersTelephone' },
{ title: '注册渠道', className: 'text-center', index: 'source', type: 'enum', enum: { 1: '自己录入', 2: '货主录入' } },
{ title: '注册时间', className: 'text-center', index: 'unifiedSocialCreditCode3' }, { title: '注册时间', className: 'text-center', index: 'unifiedSocialCreditCode3' },
{ {
title: '操作', title: '操作',
@ -150,29 +199,11 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit {
{ {
text: '查看', text: '查看',
click: item => { click: item => {
this.router.navigate(['/usercenter/driver/detail', item.tenantId], { relativeTo: this.ar }); this.router.navigate(['/usercenter/driver/captain/detail', item.appUserId]);
// this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } });
} }
} }
] ]
} }
]; ];
} }
daoyun(item: any) {
this.router.navigate(['./view', item.tenantId], { relativeTo: this.ar });
}
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
creat() {
this.router.navigate(['./new'], { relativeTo: this.ar });
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
} }

View File

@ -94,11 +94,9 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
/** 启用/冻结司机 */ /** 启用/冻结司机 */
userAction(status: number) { userAction(status: number) {
console.log( this.userDetail );
this.nzModalService.warning({ this.nzModalService.warning({
nzTitle: status === 1 ? '确定启用该司机吗?' : '确定冻结该司机吗?', nzTitle: status === 1 ? '确定启用该司机吗?' : '确定冻结该司机吗?',
nzContent: status === 1 ? '用后,司机将被限制使用,无法登陆,请谨慎操作' : '启用后,司机将恢复正常使用功能,请再次确认', nzContent: status === 1 ? '用后,司机将恢复正常使用功能,请再次确认' : '冻结后,司机将被限制使用,无法登陆,请谨慎操作',
nzOnOk: () => { nzOnOk: () => {
this.service this.service
.request(this.service.$api_lock_or_free_user, { .request(this.service.$api_lock_or_free_user, {

View File

@ -23,7 +23,7 @@
<!-- 数据列表 --> <!-- 数据列表 -->
<!-- [data]="service.$api_get_supplier_page" --> <!-- [data]="service.$api_get_supplier_page" -->
<st #st [bordered]="true" [columns]="columns" [data]='service.$api_get_driver_list' <st #st [columns]="columns" [data]='service.$api_get_driver_list'
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500"
@ -38,7 +38,7 @@
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80"> <div nz-col nzSpan="24" se-container [labelWidth]="80">
<se [col]="1" label="手机号"> <se [col]="1" label="手机号">
<input nz-input [(ngModel)]="promotersTelephone" /> <input nz-input [(ngModel)]="promotersTelephone" maxlength="11" required />
</se> </se>
</div> </div>
</div> </div>

View File

@ -61,14 +61,17 @@ export class UserCenterComponentsDriverComponent implements OnInit {
return false; return false;
} }
if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) { if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) {
this.service.msgSrv.error('手机格式错误');
return false; return false;
} }
this.service.request(this.service.$api_add_salesman, { ids: [item.id], salesmanMobile: this.promotersTelephone }).subscribe(res => { this.service
if (res) { .request(this.service.$api_add_user_salesman, { userId: item.userId, mobile: this.promotersTelephone })
this.service.msgSrv.success(item?.promotersTelephone ? '添加推广员成功' : '修改推广员成功'); .subscribe(res => {
} if (res) {
this.st.load(); this.service.msgSrv.success(item?.promotersTelephone ? '添加推广员成功' : '修改推广员成功');
}); }
this.st.load();
});
return; return;
} }
}); });

View File

@ -21,7 +21,7 @@
<nz-card> <nz-card>
<!-- 数据列表 --> <!-- 数据列表 -->
<st #st multiSort [data]="tabType===1?service.$api_get_freight_list:service.$api_get_enterprise_admin_list" <st #st multiSort [data]="service.$api_get_freight_list"
[columns]="tabType===1?enterColumns:adminColumns" [columns]="tabType===1?enterColumns:adminColumns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"

View File

@ -32,7 +32,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
isActived: false isActived: false
} }
]; ];
constructor(public service: UsermanageService, private router: Router, private modal: NzModalService, private ar: ActivatedRoute) {} constructor(public service: UsermanageService, private router: Router, private modal: NzModalService) {}
/** /**
* 查询参数 * 查询参数
@ -120,9 +120,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
} }
View(record: any) { View(record: any) {
this.router.navigate(['./view', record.id], { this.router.navigate([`/usercenter/freight/enterprise/detail/${record.id}`]);
relativeTo: this.ar
});
} }
// 切换Tab // 切换Tab
@ -130,17 +128,18 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
this.tabType = item.type; this.tabType = item.type;
this.expandToggle(false); this.expandToggle(false);
this.sf?.reset(); this.sf?.reset();
// setTimeout(() => { this.st.data = this.tabType === 1 ? this.service.$api_get_freight_list : this.service.$api_get_enterprise_admin_list;
// this.st.load(1); setTimeout(() => {
// }, 100); this.st.load(1);
}, 100);
} }
private adminAuditUser(params: any, modal: any) { private adminAuditUser(params: any, modal: any) {
this.service.request(this.service.$api_audit_enterprise_admin, params, 'POST', false).subscribe(res => { this.service.request(this.service.$api_audit_enterprise_admin, params).subscribe(res => {
console.log(res);
if (res) { if (res) {
this.service.msgSrv.success('审核成功'); this.service.msgSrv.success('审核成功');
modal.destroy(); modal.destroy();
this.st.load(1);
} }
}); });
} }
@ -207,7 +206,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
fixed: 'right', fixed: 'right',
width: '180px', width: '180px',
className: 'text-center', className: 'text-center',
buttons: [{ text: '审核', click: _record => this.ViewAdimin(_record) }] buttons: [{ text: '审核', click: _record => this.ViewAdimin(_record), iif: (item: any) => item.approvalStatus === 10 }]
} }
]; ];
} }

View File

@ -1,5 +1,5 @@
<!-- 页头 --> <!-- 页头 -->
<page-header-wrapper [logo]="logo" [content]="content"> <page-header-wrapper [logo]="logo" [content]="content" title="企业详情">
<ng-template #logo> <ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()"> <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i> <i nz-icon nzType="left" nzTheme="outline"></i>
@ -65,7 +65,7 @@
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="身份证号"> <sv label="身份证号">
<input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.certificateNumber" [readonly]="!isEdit" <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="身份证照" col="2"> <sv label="身份证照" col="2">
@ -150,12 +150,14 @@
</ng-template> </ng-template>
</sv> </sv>
<sv label="公司详细地址" col="2"> <sv label="公司详细地址" col="2">
{{ detailData?.enterpriseAddress }} <input nz-input type="text" [(ngModel)]="detailData.enterpriseAddress" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv> </sv>
</sv-container> </sv-container>
<sv-container col="1" class="mt16"> <sv-container col="1" class="mt16">
<sv label="经营范围"> <sv label="经营范围">
{{ detailData?.businessScope }} <input nz-input type="text" [(ngModel)]="detailData.businessScope" [readonly]="!isEdit" [nzBorderless]="!isEdit"
[placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="税务机关" col="2"> <sv label="税务机关" col="2">
<input nz-input type="text" [(ngModel)]="detailData.taxAuthority" [readonly]="!isEdit" [nzBorderless]="!isEdit" <input nz-input type="text" [(ngModel)]="detailData.taxAuthority" [readonly]="!isEdit" [nzBorderless]="!isEdit"
@ -203,15 +205,14 @@
<sv label="银行账户"> <sv label="银行账户">
<input nz-input type="text" [(ngModel)]="detailData.bankAccount" [readonly]="!isEdit" [nzBorderless]="!isEdit" <input nz-input type="text" [(ngModel)]="detailData.bankAccount" [readonly]="!isEdit" [nzBorderless]="!isEdit"
[placeholder]="isEdit?'':'-'"> [placeholder]="isEdit?'':'-'">
{{ detailData?.bankAccount }}
</sv> </sv>
<sv label="注册电话"> <sv label="注册电话">
<input nz-input type="text" [(ngModel)]="detailData.registerPhone" [readonly]="!isEdit" [nzBorderless]="!isEdit" <input nz-input type="text" [(ngModel)]="detailData.registerPhone" [readonly]="!isEdit" [nzBorderless]="!isEdit"
[placeholder]="isEdit?'':'-'"> [placeholder]="isEdit?'':'-'">
{{ detailData?.registerPhone }}
</sv> </sv>
<sv label="注册地址"> <sv label="注册地址">
{{ detailData?.registerAddress }} <input nz-input type="text" [(ngModel)]="detailData.registerAddress" [readonly]="!isEdit" [nzBorderless]="!isEdit"
[placeholder]="isEdit?'':'-'">
</sv> </sv>
</sv-container> </sv-container>
</nz-card> </nz-card>

View File

@ -1,12 +1,12 @@
<!-- 页头 --> <!-- 页头 -->
<page-header-wrapper [logo]="logo" [content]="content"> <page-header-wrapper [logo]="logo" [content]="content" [title]="'企业详情'">
<ng-template #logo> <ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()"> <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i> <i nz-icon nzType="left" nzTheme="outline"></i>
</button> </button>
</ng-template> </ng-template>
<ng-template #content> <ng-template #content>
<nz-skeleton [nzLoading]="service.http.loading"> <nz-skeleton [nzLoading]="false">
<div class="user-info" nz-row> <div class="user-info" nz-row>
<div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="d-flex"> <div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="d-flex">
<img [src]="detailData?.enterpriseLogo" /> <img [src]="detailData?.enterpriseLogo" />
@ -34,22 +34,47 @@
</div> </div>
</div> </div>
<div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right mt-sm"> <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" <ng-container *ngIf="isEdit;else editButton">
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked"> <button [nzLoading]="service.http.loading" nz-button (click)="reset()">
启用 取消
</button> </button>
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="frozen" <button [nzLoading]="service.http.loading" nz-button nzDanger (click)="save()">
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="!detailData?.stateLocked"> 保存
冻结 </button>
</button> </ng-container>
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payfrozen" <ng-template #editButton>
(nzOnConfirm)="PayOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 1"> <ng-container *ngIf="detailData?.approvalStatus===10">
开通支付权限 <button [nzLoading]="service.http.loading" nz-button nzDanger (click)="auditPass()">
</button> 通过
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payenable" </button>
(nzOnConfirm)="PayOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 0"> <button [nzLoading]="service.http.loading" nz-button nzDanger (click)="auditNo()">
关闭支付权限 驳回
</button> </button>
</ng-container>
<ng-container *ngIf="detailData?.approvalStatus!=10">
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="enable"
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked">
启用
</button>
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="frozen"
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="!detailData?.stateLocked">
冻结
</button>
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm
[nzPopconfirmTitle]="Payfrozen" (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 === 0">
关闭支付权限
</button>
</ng-container>
<button [nzLoading]="service.http.loading" nz-button nzDanger (click)="ratify()">
修改
</button>
</ng-template>
</div> </div>
</div> </div>
</nz-skeleton> </nz-skeleton>
@ -76,27 +101,37 @@
</ng-template> </ng-template>
</page-header-wrapper> </page-header-wrapper>
<nz-card [nzLoading]="service.http.loading"> <nz-card [class]="isEdit?'edit-box':'readOnly-box'">
<sv-container col="3"> <sv-container col="3">
<sv-title>企业管理员信息</sv-title> <sv-title>企业管理员信息</sv-title>
<sv label="姓名"> <sv label="姓名">
{{ detailData?.adminUserInfo?.name }} <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.name" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="手机号"> <sv label="手机号">
{{ detailData?.adminUserInfo?.mobile }} {{detailData.adminUserInfo?.mobile}}
</sv> </sv>
<sv label="身份证号"> <sv label="身份证号">
{{ detailData?.adminUserInfo?.certificateNumber }} <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="身份证照" col="2"> <sv label="身份证照" col="2">
<app-imagelist <div class="d-flex">
[imgList]="[detailData?.adminUserInfo?.certificatePhotoFrontWatermark,detailData?.adminUserInfo?.certificatePhotoBackWatermark]"> <ng-container
</app-imagelist> *ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'certificateBackFront'}">
</ng-container>
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'certificateBack'}">
</ng-container>
</div>
</sv> </sv>
<sv label="企业授权函" col="2"> <sv label="企业授权函" col="2">
<app-imagelist [imgList]="[detailData?.adminUserInfo?.certificatePhotoBackWatermark]"></app-imagelist> <ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'creditPhotoWatermark',key2:'creditPhoto',hover:'adminPhoto'}">
</ng-container>
</sv> </sv>
</sv-container> </sv-container>
<nz-divider></nz-divider> <nz-divider></nz-divider>
<sv-container col="3" class="mt16"> <sv-container col="3" class="mt16">
<sv-title> <sv-title>
@ -112,85 +147,137 @@
</label> </label>
</sv-title> </sv-title>
<sv label="公司名称"> <sv label="公司名称">
{{ detailData?.enterpriseName }} <input nz-input type="text" [(ngModel)]="detailData.enterpriseName" [readonly]="!isEdit" [nzBorderless]="!isEdit"
[placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="统一社会信用代码"> <sv label="统一社会信用代码">
{{ detailData?.unifiedSocialCreditCode }} <input nz-input type="text" [(ngModel)]="detailData.unifiedSocialCreditCode" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="公司类型"> <sv label="公司类型">
{{ detailData?.enterpriseType }} <input nz-input type="text" [(ngModel)]="detailData.enterpriseType" [readonly]="!isEdit" [nzBorderless]="!isEdit"
[placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="注册资本"> <sv label="注册资本">
{{ detailData?.registrationCapital }} <ng-container *ngIf="isEdit; else registrationCapitalTemplate">
<input nz-input type="number" [(ngModel)]="detailData.registrationCapital" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'" class="mr-sm">
</ng-container>
<ng-template #registrationCapitalTemplate>
{{detailData?.registrationCapital}}
</ng-template>
<span *ngIf="detailData?.registrationCapital">万元</span> <span *ngIf="detailData?.registrationCapital">万元</span>
</sv> </sv>
<sv label="成立日期"> <sv label="成立日期">
{{ detailData?.enterpriseRegistrationTime }} <nz-date-picker [(ngModel)]="detailData.enterpriseRegistrationTime" [nzDisabled]="!isEdit"
[nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''"></nz-date-picker>
</sv> </sv>
<sv label="营业期限"> <sv label="营业期限">
<div *ngIf="!!detailData?.operatingStartTime && !!detailData?.operatingEndTime"> <nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
{{ detailData?.operatingStartTime }} 至 {{ detailData?.operatingEndTime }} [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar">
</div> </nz-date-picker>
<div *ngIf="!detailData?.operatingStartTime && !detailData?.operatingEndTime">长期</div> -
<div *ngIf="!!detailData?.operatingStartTime && !detailData?.operatingEndTime">{{ detailData?.operatingStartTime <ng-container *ngIf="!isEdit && !detailData?.operatingEndTime && detailData?.operatingStartTime">
}} 至 长期</div> <label style="padding-left: 11px;">长期</label>
</ng-container>
<nz-date-picker [(ngModel)]="detailData.operatingEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar">
</nz-date-picker>
<ng-container *ngIf="isEdit">
<label nz-checkbox [ngModel]="!!!detailData.operatingEndTime"
(ngModelChange)="$event?detailData.operatingEndTime='':''" class="ml-sm">长期</label>
</ng-container>
</sv> </sv>
</sv-container>
<sv-container col="2" class="mt16">
<sv label="公司所在地" col="3"> <sv label="公司所在地" col="3">
{{ detailData?.fullRegionVO?.provinceName }}{{ detailData?.fullRegionVO?.cityName }}{{ <ng-container *ngIf="isEdit; else cascaderelseTemplate">
detailData?.fullRegionVO?.areaName }} <nz-cascader [(ngModel)]="enterpriseAddressCode" [nzLoadData]="loadRegionData">
</nz-cascader>
</ng-container>
<ng-template #cascaderelseTemplate>
{{ detailData?.fullRegionVO?.provinceName }}{{ detailData?.fullRegionVO?.cityName }}{{
detailData?.fullRegionVO?.areaName }}
</ng-template>
</sv> </sv>
<sv label="公司详细地址"> <sv label="公司详细地址" col="2">
{{ detailData?.enterpriseAddress }} <input nz-input type="text" [(ngModel)]="detailData.enterpriseAddress" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv> </sv>
</sv-container> <sv label="经营范围" col="1">
<sv-container col="1" class="mt16"> <input nz-input type="text" [(ngModel)]="detailData.businessScope" [readonly]="!isEdit" [nzBorderless]="!isEdit"
<sv label="经营范围"> [placeholder]="isEdit?'':'-'">
{{ detailData?.businessScope }}
</sv> </sv>
</sv-container> <sv label="税务机关" col="2">
<sv-container col="2" class="mt16"> <input nz-input type="text" [(ngModel)]="detailData.taxAuthority" [readonly]="!isEdit" [nzBorderless]="!isEdit"
<sv label="税务机关"> [placeholder]="isEdit?'':'-'">
{{ detailData?.taxAuthority }}
</sv> </sv>
<sv label="营业执照"> <sv label="营业执照" col="2">
<app-imagelist [imgList]="[detailData?.licensePhotoWatermark]"></app-imagelist> <ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'licensePhotoWatermark',key2:'licensePhoto',hover:'detailPhoto'}">
</ng-container>
</sv> </sv>
</sv-container> </sv-container>
<nz-divider></nz-divider> <nz-divider></nz-divider>
<sv-container col="3" class="mt16"> <sv-container col="3" class="mt16">
<sv-title>法人信息</sv-title> <sv-title>法人信息</sv-title>
<sv label="法定代表人"> <sv label="法定代表人">
{{ detailData?.legalPersonIdentityVO?.name }} <input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.name" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="身份证号码"> <sv label="身份证号码">
{{ detailData?.legalPersonIdentityVO?.certificateNumber }} <input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.certificateNumber" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="身份证有效期"> <sv label="身份证有效期">
{{ detailData?.legalPersonIdentityVO?.validStartTime }} - <nz-date-picker [(ngModel)]="detailData.legalPersonIdentityVO.validStartTime" [nzDisabled]="!isEdit"
{{ detailData?.legalPersonIdentityVO?.validEndTime || '长期' }} nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;"
class="calendar"></nz-date-picker>
-
<ng-container
*ngIf="!isEdit && !detailData?.legalPersonIdentityVO?.validEndTime && detailData.legalPersonIdentityVO.validStartTime">
<label style="padding-left: 11px;">长期</label>
</ng-container>
<nz-date-picker [(ngModel)]="detailData.legalPersonIdentityVO.validEndTime" [nzDisabled]="!isEdit"
nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;"
class="calendar"></nz-date-picker>
<ng-container *ngIf="isEdit">
<label nz-checkbox [ngModel]="!!!detailData.legalPersonIdentityVO.validEndTime"
(ngModelChange)="$event?detailData.legalPersonIdentityVO.validEndTime='':''" class="ml-sm">长期</label>
</ng-container>
</sv> </sv>
<sv label="身份证照" col="1"> <sv label="身份证照" col="1">
<app-imagelist <div class="d-flex">
[imgList]="[detailData?.legalPersonIdentityVO?.certificatePhotoFrontWatermark,detailData?.legalPersonIdentityVO?.certificatePhotoBackWatermark]"> <ng-container
</app-imagelist> *ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'licensePhotoWatermark',key2:'licensePhoto',hover:'detailPhoto'}">
</ng-container>
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.legalPersonIdentityVO,status:isEdit,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'legalFront'}">
</ng-container>
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.legalPersonIdentityVO,status:isEdit,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'legalBack'}">
</ng-container>
</div>
</sv> </sv>
</sv-container> </sv-container>
<nz-divider></nz-divider> <nz-divider></nz-divider>
<sv-container col="3" class="mt16"> <sv-container col="3" class="mt16">
<sv-title>企业开票信息</sv-title> <sv-title>企业开票信息</sv-title>
<sv label="开户银行"> <sv label="开户银行">
{{ detailData?.createBank }} <input nz-input type="text" [(ngModel)]="detailData.createBank" [readonly]="!isEdit" [nzBorderless]="!isEdit"
[placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="银行账户"> <sv label="银行账户">
{{ detailData?.bankAccount }} <input nz-input type="text" [(ngModel)]="detailData.bankAccount" [readonly]="!isEdit" [nzBorderless]="!isEdit"
[placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="注册电话"> <sv label="注册电话">
{{ detailData?.registerPhone }} <input nz-input type="text" [(ngModel)]="detailData.registerPhone" [readonly]="!isEdit" [nzBorderless]="!isEdit"
[placeholder]="isEdit?'':'-'">
</sv> </sv>
<sv label="注册地址"> <sv label="注册地址">
{{ detailData?.registerAddress }} <input nz-input type="text" [(ngModel)]="detailData.registerAddress" [readonly]="!isEdit" [nzBorderless]="!isEdit"
[placeholder]="isEdit?'':'-'">
</sv> </sv>
</sv-container> </sv-container>
</nz-card> </nz-card>
@ -204,4 +291,55 @@
{{content}} {{content}}
</div> </div>
</div> </div>
</ng-template>
<ng-template #approvedModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="公司名称">
{{ detailData?.enterpriseName }}
</se>
<se [col]="1" label="网络货运人" required>
<nz-select nzPlaceHolder="请选择" [(ngModel)]="networkTransporter">
<nz-option [nzValue]="1" nzLabel="Jack"></nz-option>
<nz-option [nzValue]="2" nzLabel="Lucy"></nz-option>
</nz-select>
</se>
</div>
</div>
</ng-template>
<ng-template #redectModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="公司名称">
{{ detailData?.enterpriseName }}
</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]="!isEdit || disabledUpload" (nzChange)="changeUpload($event,data,key,key2)">
<ng-container *ngIf="!data[key] && isEdit">
<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)="detailData[hover]=true" (mouseleave)="detailData[hover]=false"
(click)="$event.cancelBubble=true" class="image-hover">
<img [src]="data[key]" style="width: 200px;height: 160px;" (click)="service.showImg(data[key])" />
<div class="mask" *ngIf="detailData[hover] && isEdit"></div>
<div class="mask-over" *ngIf="detailData[hover] && isEdit">
<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)="service.showImg(data[key])"></i>
</div>
</div>
</div>
</nz-upload>
</ng-template> </ng-template>

View File

@ -1,45 +1,21 @@
@import '~@delon/theme/index'; @import '../../../../less/edit.less';
:host {
::ng-deep {
.ant-steps-dot {
.ant-steps-item-content {
width: 200px;
}
.ant-steps-item-icon {
margin-left: 96px;
}
.ant-steps-item-tail::after {
margin-left: 40px;
}
}
.success {
color: @success-color;
}
.warning {
color: @warning-color;
}
.error { .user-info {
color: @error-color; font-size: 16px;
}
.enterprise-name {
margin-right: 15px;
} }
.mt16 {
margin-top: 16px; img {
width : 64px;
height : 64px;
margin-right : 15px;
border-radius: 50%;
} }
.user-info {
font-size: 16px; .user-info-des {
.enterprise-name { margin-bottom: 5px;
margin-right: 15px;
}
img {
width: 64px;
height: 64px;
margin-right: 15px;
border-radius: 50%;
}
.user-info-des {
margin-bottom: 5px;
}
} }
} }

View File

@ -1,21 +1,43 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { apiConf } from '@conf/api.conf';
import { STColumn, STComponent } from '@delon/abc/st'; import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { DatePipe, ModalHelper, _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message'; import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { UsermanageService } from '../../../../services/usercenter.service'; import { UsermanageService } from '../../../../services/usercenter.service';
@Component({ @Component({
selector: 'app-supplier-components-list-view', selector: 'app-supplier-components-list-view',
templateUrl: './detail.component.html', templateUrl: './detail.component.html',
styleUrls: ['./detail.component.less'] styleUrls: ['./detail.component.less'],
providers: [DatePipe]
}) })
export class FreightComponentsListDetailComponent implements OnInit { export class FreightComponentsListDetailComponent implements OnInit {
detailData: any; @ViewChild('approvedModal', { static: false })
approvedModal!: any;
@ViewChild('redectModal', { static: false })
redectModal!: any;
detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentityVO: { name: '' } };
tempalateData = { ...this.detailData };
suppliersData: any = {}; suppliersData: any = {};
constructor(public service: UsermanageService, private route: ActivatedRoute) {} isEdit = false;
uploadURl = apiConf.waterFileUpload;
disabledUpload = false;
enterpriseAddressCode: any = [];
approvalOpinion = '';
networkTransporter = null;
constructor(
public service: UsermanageService,
private route: ActivatedRoute,
private nzModalService: NzModalService,
private datePipe: DatePipe
) {}
ngOnInit() { ngOnInit() {
this.initData(); this.initData();
@ -28,55 +50,17 @@ export class FreightComponentsListDetailComponent implements OnInit {
.subscribe(res => { .subscribe(res => {
if (res) { if (res) {
this.detailData = res; this.detailData = res;
this.tempalateData = { ...this.detailData };
this.enterpriseAddressCode = [
Number(this.detailData.fullRegionVO?.provinceCode),
Number(this.detailData.fullRegionVO?.cityCode),
Number(this.detailData.fullRegionVO?.areaCode)
];
} }
console.log(res); console.log(res);
}); });
// // 商品资质
// if (res.enterpriseBusinessJson) {
// res.enterpriseBusinessJson.aptitudes = res.enterpriseBusinessJson?.aptitudes ? res.enterpriseBusinessJson.aptitudes.split(',') : [];
// }
// // // 申请人身份证证件
// // res.applyUserJson.imagelist = [];
// // res.applyUserJson.imagelist.push(res.applyUserJson.certificatePhotoFront);
// // res.applyUserJson.imagelist.push(res.applyUserJson.certificatePhotoBack);
// // res.applyUserJson.imagelist.push(res.applyUserJson.handCertificate);
// 法人身份证证件
// const imagelist = [];
// imagelist.push(res?.certificatePhotoFront);
// imagelist.push(res?.certificatePhotoBack);
// res.certificatePhoto = imagelist;
// // 营业执照
// res.enterpriseQualificationCertificate = res.enterpriseQualificationCertificate
// ? res.enterpriseQualificationCertificate.split(',')
// : [];
// // 返回所在地
// res.enterpriseAddressCodeStr = await this.getRegionFullName(res.enterpriseAddressCode);
// this.detailData = res;
// this.suppliersData = {
// suppliersType: res?.suppliersType,
// externalSuppliersId: res?.externalSuppliersId
// };
} }
/**
* 根据地区code查询地区详情
* @param code 地区代码
*/
async getRegionFullName(code: any) {
const params = {
regionCode: code
};
const res = await this.service.asyncRequest(this.service.$api_get_one, params, 'POST', true);
// if (res && res.regionFullName) {
// const arr = res.regionFullName.split(',');
// res.regionFullName = arr.reverse().join('-');
// }
return res && res.regionFullName;
}
goBack() { goBack() {
window.history.go(-1); window.history.go(-1);
} }
@ -125,4 +109,144 @@ export class FreightComponentsListDetailComponent implements OnInit {
} }
}); });
} }
auditPass() {
this.networkTransporter = null;
this.nzModalService.create({
nzTitle: '审核通过',
nzContent: this.approvedModal,
nzOnOk: () => {
if (!this.networkTransporter) {
return false;
}
this.auditEnterprise(20);
return;
}
});
}
auditNo() {
this.approvalOpinion = '';
this.nzModalService.create({
nzTitle: '审核驳回',
nzContent: this.redectModal,
nzOnOk: () => {
if (!this.approvalOpinion) {
return false;
}
this.auditEnterprise(30);
return;
}
});
}
private auditEnterprise(status: number) {
this.service
.request(this.service.$api_audit_freight, {
approvalStatus: status,
id: this.detailData.id,
approvalOpinion: this.approvalOpinion,
networkTransporter: this.networkTransporter
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success(status === 20 ? '审核通过' : '驳回成功');
}
this.initData();
});
}
ratify() {
this.isEdit = true;
}
deleteImg(data: any, key: string, key2: string) {
this.nzModalService.warning({
nzTitle: '是否确认删除该图片',
nzOnOk: () => {
this.disabledUpload = true;
data[key] = '';
data[key2] = '';
setTimeout(() => {
this.disabledUpload = false;
}, 100);
}
});
}
changeUpload({ file, fileList, type }: any, data: any, key: string, key2: string) {
if (type === 'success') {
data[key] = file.response.data?.fullFileWatermarkPath;
data[key2] = file.response.data?.fullFilePath;
}
}
/**
* 级联获取地区数据
* @param node 节点
* @param index 层级
* @returns
*/
loadRegionData = (node: any, index: number) => {
return new Promise(resolve => {
this.service.request(this.service.$api_get_region_by_code, { regionCode: node?.regionCode || '' }).subscribe(
res => {
node.children = res.map((item: any) => ({ ...item, isLeaf: index === 1, value: item.regionCode, label: item.name }));
},
_ => {},
() => {
resolve(node);
}
);
});
};
reset() {
this.detailData = { ...this.tempalateData };
this.isEdit = false;
}
save() {
const dateil = { ...this.detailData };
Object.assign(dateil.legalPersonIdentityVO, {
validStartTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validStartTime, 'yyyy-MM-dd'),
validEndTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validEndTime, 'yyyy-MM-dd')
});
const params = {};
Object.assign(params, {
adminMobile: dateil.adminMobile,
adminAppUserId: dateil.adminAppUserId,
adminUserInfo: { ...dateil.adminUserInfo },
bankAccount: dateil.bankAccount,
businessScope: dateil.businessScope,
createBank: dateil.createBank,
creditPhoto: dateil.creditPhoto,
creditPhotoWatermark: dateil.creditPhotoWatermark,
enterpriseAddress: dateil.enterpriseAddress,
enterpriseAddressCode: this.enterpriseAddressCode[2],
enterpriseLogo: dateil.enterpriseLogo,
enterpriseName: dateil.enterpriseName,
enterpriseRegistrationTime: this.datePipe.transform(dateil.enterpriseRegistrationTime, 'yyyy-MM-dd'),
enterpriseType: dateil.enterpriseType,
id: dateil.id,
legalPersonIdentityDTO: { ...dateil.legalPersonIdentityVO },
licensePhoto: dateil.licensePhoto,
licensePhotoWatermark: dateil.licensePhotoWatermark,
networkTransporter: dateil.networkTransporter,
oftenUsedServices: dateil.oftenUsedServices,
operatingEndTime: this.datePipe.transform(dateil.operatingEndTime, 'yyyy-MM-dd'),
operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd'),
promotersTelephone: dateil.promotersTelephone,
registerAddress: dateil.registerAddress,
registerPhone: dateil.registerPhone,
registrationCapital: dateil.registrationCapital,
taxAuthority: dateil.taxAuthority,
unifiedSocialCreditCode: dateil.unifiedSocialCreditCode
});
this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('企业修改成功');
this.initData();
this.isEdit = false;
}
});
}
} }

View File

@ -1,11 +1,3 @@
<!--
* @Author: your name
* @Date: 2021-11-29 15:22:34
* @LastEditTime: 2021-11-29 20:14:00
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\list.component.html
-->
<!-- 页头 --> <!-- 页头 -->
<page-header-wrapper [title]="'企业列表'"></page-header-wrapper> <page-header-wrapper [title]="'企业列表'"></page-header-wrapper>
<nz-card> <nz-card>
@ -32,7 +24,7 @@
<!-- 数据列表 --> <!-- 数据列表 -->
<!-- [data]="service.$api_get_supplier_page" --> <!-- [data]="service.$api_get_supplier_page" -->
<st #st [bordered]="true" [columns]="columns" [data]='service.$api_get_freight_list' <st #st [columns]="columns" [data]='service.$api_get_freight_list'
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }" [res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500"
@ -59,7 +51,7 @@
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80"> <div nz-col nzSpan="24" se-container [labelWidth]="80">
<se [col]="1" label="手机号"> <se [col]="1" label="手机号">
<input nz-input [(ngModel)]="promotersTelephone" /> <input nz-input [(ngModel)]="promotersTelephone" maxlength="11" required/>
</se> </se>
</div> </div>
</div> </div>

View File

@ -16,7 +16,7 @@ export class FreightComponentsListComponent implements OnInit {
columns!: STColumn[]; columns!: STColumn[];
@ViewChild('st', { static: false }) st!: STComponent; @ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('promoterModal', { static: false }) @ViewChild('promoterModal', { static: false })
promoterModal!: any; promoterModal!: any;
promotersTelephone = ''; promotersTelephone = '';
@ -199,6 +199,7 @@ export class FreightComponentsListComponent implements OnInit {
return false; return false;
} }
if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) { if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) {
this.service.msgSrv.error('手机格式错误');
return false; return false;
} }
this.service.request(this.service.$api_add_salesman, { ids: [item.id], salesmanMobile: this.promotersTelephone }).subscribe(res => { this.service.request(this.service.$api_add_salesman, { ids: [item.id], salesmanMobile: this.promotersTelephone }).subscribe(res => {

View File

@ -123,42 +123,6 @@ export class FreightComponentsListNewComponent implements OnInit {
return this.service.request(this.service.$api_get_region_by_code, { regionCode }); return this.service.request(this.service.$api_get_region_by_code, { regionCode });
} }
longTime(i: boolean | SFSchemaEnum[], type: string) {
if (type === 'schema') {
if (i) {
// this.sf?.setValue('/validStartTime', Date);
this.sf?.setValue('/validEndTime', Date);
// this.sf.getProperty('/validStartTime').schema.readOnly = true;
this.sf.getProperty('/validEndTime')!.schema.readOnly = true;
} else {
// this.sf.getProperty('/validStartTime').schema.readOnly = false;
this.sf.getProperty('/validEndTime')!.schema.readOnly = false;
}
}
if (type === 'schema1') {
if (i) {
// this.sf1?.setValue('/operatingStartTime', Date);
this.sf1?.setValue('/operatingEndTime', Date);
// this.sf1.getProperty('/operatingStartTime').schema.readOnly = true;
this.sf1.getProperty('/operatingEndTime')!.schema.readOnly = true;
} else {
// this.sf1.getProperty('/operatingStartTime').schema.readOnly = false;
this.sf1.getProperty('/operatingEndTime')!.schema.readOnly = false;
}
}
if (type === 'schema11') {
if (i) {
// this.sf1?.setValue('/validStartTime', Date);
this.sf1?.setValue('/validEndTime', Date);
// this.sf1.getProperty('/validStartTime').schema.readOnly = true;
this.sf1.getProperty('/validEndTime')!.schema.readOnly = true;
} else {
// this.sf1.getProperty('/validStartTime').schema.readOnly = false;
this.sf1.getProperty('/validEndTime')!.schema.readOnly = false;
}
}
}
checkIdCard(imgurl: any, isFront: number, type: number) { checkIdCard(imgurl: any, isFront: number, type: number) {
// 识别身份证 参数isFront0-正面、1-背面type0-申请人身份证1-法定代表人身份证 // 识别身份证 参数isFront0-正面、1-背面type0-申请人身份证1-法定代表人身份证
const params = { const params = {

View File

@ -32,7 +32,7 @@
<!-- 数据列表 --> <!-- 数据列表 -->
<!-- [data]="service.$api_get_supplier_page" --> <!-- [data]="service.$api_get_supplier_page" -->
<st #st [bordered]="true" [columns]="columns" [data]='service.$api_get_user_list' <st #st [columns]="columns" [data]='service.$api_get_user_list'
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500"
@ -46,9 +46,9 @@
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="promotersTelephone" let-item let-index="index"> <ng-template st-row="promotersTelephone" let-item let-index="index">
<div style="color: #52c41a;cursor: pointer;" (click)="addPromoter(item)"> <a (click)="addPromoter(item)">
{{ item.promotersTelephone || '添加' }} {{ item.promotersTelephone || '添加' }}
</div> </a>
</ng-template> </ng-template>
</st> </st>
@ -58,7 +58,7 @@
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80"> <div nz-col nzSpan="24" se-container [labelWidth]="80">
<se [col]="1" label="手机号"> <se [col]="1" label="手机号">
<input nz-input [(ngModel)]="promotersTelephone" /> <input nz-input [(ngModel)]="promotersTelephone" maxlength="11" required />
</se> </se>
</div> </div>
</div> </div>

View File

@ -65,9 +65,10 @@ export class FreightComponentsUserComponent implements OnInit {
return false; return false;
} }
if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) { if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) {
this.service.msgSrv.error('手机格式错误');
return false; return false;
} }
this.service.request(this.service.$api_add_salesman, { ids: [item.id], salesmanMobile: this.promotersTelephone }).subscribe(res => { this.service.request(this.service.$api_add_user_salesman, { userId: item.userId, mobile: this.promotersTelephone }).subscribe(res => {
if (res) { if (res) {
this.service.msgSrv.success(item?.promotersTelephone ? '添加推广员成功' : '修改推广员成功'); this.service.msgSrv.success(item?.promotersTelephone ? '添加推广员成功' : '修改推广员成功');
} }

View File

@ -18,6 +18,10 @@
nz-date-picker { nz-date-picker {
min-width: 250px; min-width: 250px;
} }
.calendar {
min-width: 130px;
}
} }
.readOnly-box { .readOnly-box {

View File

@ -9,6 +9,8 @@
import { Injectable, Injector } from '@angular/core'; import { Injectable, Injector } from '@angular/core';
import { _HttpClient } from '@delon/theme'; import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message'; import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { ImageViewComponent } from 'src/app/shared/components/imagelist';
import { BaseService } from 'src/app/shared/services/core/base.service'; import { BaseService } from 'src/app/shared/services/core/base.service';
import { EAFileUtil } from 'src/app/shared/utils/file.util'; import { EAFileUtil } from 'src/app/shared/utils/file.util';
@ -25,8 +27,14 @@ export class UsermanageService extends BaseService {
// 查询企业详情 // 查询企业详情
$api_get_freight_detail = '/api/mdc/cuc/enterpriseInfo/operate/detail'; $api_get_freight_detail = '/api/mdc/cuc/enterpriseInfo/operate/detail';
// 查询车队长列表-运营后台
$api_get_user_expand = '/api/mdc/userDriverExpand/list/page';
// 添加企业业务员 // 添加企业业务员
$api_add_salesman = '/api/mdc/cuc/enterpriseInfo/operate/addSalesman'; $api_add_salesman = '/api/mdc/cuc/enterpriseInfo/operate/addSalesman';
// 添加货主,司机,车队长业务员
$api_add_user_salesman = '/api/mdc/cuc/user/addPromoter';
// 冻结/启用企业业 // 冻结/启用企业业
$api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock'; $api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock';
@ -39,7 +47,7 @@ export class UsermanageService extends BaseService {
// 冻结或恢复员工 // 冻结或恢复员工
$api_lock_staff = '/api/mdc/cuc/userApp/freezeOrResumeStaff'; $api_lock_staff = '/api/mdc/cuc/userApp/freezeOrResumeStaff';
// 冻结或恢复应用用户 // 冻结或恢复应用用户
$api_lock_app_user = '/api/mdc/cuc/userApp/freezeOrResume'; $api_lock_app_user = '/api/mdc/cuc/userApp/freezeOrResume';
@ -84,7 +92,15 @@ export class UsermanageService extends BaseService {
// 根据地区code查询列表 // 根据地区code查询列表
$api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode'; $api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode';
constructor(public injector: Injector) { constructor(public injector: Injector, private nzModalService: NzModalService) {
super(injector); super(injector);
} }
showImg(url: any) {
const params = {
imgList: [url],
index: 0
};
this.nzModalService.create({ nzContent: ImageViewComponent, nzComponentParams: { params } });
}
} }

View File

@ -8,6 +8,7 @@
*/ */
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { CaptainDetailComponent } from './components/driver/captain/captain-detail/captain-detail.component';
import { UserCenterComponentsDriverCaptainComponent } from './components/driver/captain/captain.component'; import { UserCenterComponentsDriverCaptainComponent } from './components/driver/captain/captain.component';
import { UserCenterComponentsDriverDetailComponent } from './components/driver/detail/detail.component'; import { UserCenterComponentsDriverDetailComponent } from './components/driver/detail/detail.component';
import { UserCenterComponentsDriverComponent } from './components/driver/driver.component'; import { UserCenterComponentsDriverComponent } from './components/driver/driver.component';
@ -28,13 +29,14 @@ const routes: Routes = [
{ path: 'freight/list/view/:id', component: FreightComponentsListViewComponent }, { path: 'freight/list/view/:id', component: FreightComponentsListViewComponent },
{ path: 'freight/list/new', component: FreightComponentsListNewComponent }, { path: 'freight/list/new', component: FreightComponentsListNewComponent },
{ path: 'freight/list/detail/:id', component: FreightComponentsListDetailComponent }, { path: 'freight/list/detail/:id', component: FreightComponentsListDetailComponent },
{ path: 'freight/enterprise/detail/:id', component: FreightComponentsListDetailComponent },
{ path: 'freight/enterprise', component: FreightComponentsEnterpriseAuditComponent }, { path: 'freight/enterprise', component: FreightComponentsEnterpriseAuditComponent },
{ path: 'freight/enterprise/view/:id', component: FreightComponentsEnterpriseAuditViewComponent },
{ path: 'freight/user', component: FreightComponentsUserComponent }, { path: 'freight/user', component: FreightComponentsUserComponent },
{ path: 'freight/user/view/:id', component: FreightComponentsUserDetailComponent }, { path: 'freight/user/view/:id', component: FreightComponentsUserDetailComponent },
{ path: 'driver', component: UserCenterComponentsDriverComponent }, { path: 'driver', component: UserCenterComponentsDriverComponent },
{ path: 'driver/detail/:id', component: UserCenterComponentsDriverDetailComponent }, { path: 'driver/detail/:id', component: UserCenterComponentsDriverDetailComponent },
{ path: 'driver/captain', component: UserCenterComponentsDriverCaptainComponent }, { path: 'driver/captain', component: UserCenterComponentsDriverCaptainComponent },
{ path: 'driver/captain/detail/:id', component: CaptainDetailComponent },
]; ];
@NgModule({ @NgModule({

View File

@ -21,6 +21,7 @@ import { FreightComponentsUserDetailComponent } from './components/freight/user/
import { FreightComponentsUserComponent } from './components/freight/user/user.component'; import { FreightComponentsUserComponent } from './components/freight/user/user.component';
import { UsercenterRoutingModule } from './usercenter-routing.module'; import { UsercenterRoutingModule } from './usercenter-routing.module';
import { AuditAdminComponent } from './components/freight/enterprise-audit/audit-admin/audit-admin.component'; import { AuditAdminComponent } from './components/freight/enterprise-audit/audit-admin/audit-admin.component';
import { CaptainDetailComponent } from './components/driver/captain/captain-detail/captain-detail.component';
const COMPONENTS = [ const COMPONENTS = [
FreightComponentsListComponent, FreightComponentsListComponent,
@ -33,11 +34,13 @@ const COMPONENTS = [
FreightComponentsUserDetailComponent, FreightComponentsUserDetailComponent,
UserCenterComponentsDriverComponent, UserCenterComponentsDriverComponent,
UserCenterComponentsDriverDetailComponent, UserCenterComponentsDriverDetailComponent,
UserCenterComponentsDriverCaptainComponent UserCenterComponentsDriverCaptainComponent,
CaptainDetailComponent,
AuditAdminComponent
]; ];
@NgModule({ @NgModule({
imports: [SharedModule, UsercenterRoutingModule], imports: [SharedModule, UsercenterRoutingModule],
declarations: [...COMPONENTS, AuditAdminComponent], declarations: [...COMPONENTS]
}) })
export class UsercenterModule {} export class UsercenterModule {}