用户中心
This commit is contained in:
@ -0,0 +1,121 @@
|
||||
<ng-container >
|
||||
<!-- 页头 -->
|
||||
<page-header-wrapper [logo]="logo" [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>
|
||||
<div class="user-info">
|
||||
<div style="flex: 1">
|
||||
<div style="display: flex;">
|
||||
<p style="padding-right: 80px; width: 400px;">车牌号{{ detailData?.shoppFeignVO?.publicity }}</p>
|
||||
<p style="padding-right: 80px; width: 400px;">车牌颜色{{ detailData?.shoppFeignVO?.introduction }}</p>
|
||||
<p >注册日期:2021-09-02 12.53.32</p>
|
||||
</div>
|
||||
<div style="display: flex;">
|
||||
<p style="padding-right: 80px; width: 400px;">车型{{ detailData?.shoppFeignVO?.introduction }}</p>
|
||||
<p >车长:2021-09-02 12.53.32</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
<sv-container col="3">
|
||||
<sv-title>行驶证信息</sv-title>
|
||||
<sv label="档案编号">
|
||||
{{ detailData?.contactsName }}
|
||||
</sv>
|
||||
<sv label="准驾车型">
|
||||
{{ detailData?.contactsPhone }}
|
||||
</sv>
|
||||
<sv label="行驶证注册日期">
|
||||
{{ detailData?.contactsPhone }}
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
<sv-container col="2">
|
||||
<sv label="行驶证到期日">
|
||||
{{ detailData?.contactsPhone }}
|
||||
</sv>
|
||||
<sv label="行驶证签发机关">
|
||||
{{ detailData?.contactsPhone }}
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
<sv-container col="3">
|
||||
<sv label="行驶证发证日期">
|
||||
{{ detailData?.contactsName }}
|
||||
</sv>
|
||||
<sv label="车辆识别代码">
|
||||
{{ detailData?.contactsPhone }}
|
||||
</sv>
|
||||
<sv label="使用性质">
|
||||
{{ detailData?.contactsPhone }}
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
<sv-container col="3">
|
||||
<sv label="载重(吨)">
|
||||
{{ detailData?.contactsName }}
|
||||
</sv>
|
||||
<sv label="整备质量">
|
||||
{{ detailData?.contactsPhone }}
|
||||
</sv>
|
||||
<sv label="所有人">
|
||||
{{ detailData?.contactsPhone }}
|
||||
</sv>
|
||||
</sv-container>
|
||||
<sv-container col="1">
|
||||
<sv label="自有载具">
|
||||
{{ detailData?.contactsName }}
|
||||
</sv>
|
||||
<sv label="行驶证照片">
|
||||
<!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> -->
|
||||
</sv>
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
<sv-container col="3" class="mt16">
|
||||
<sv-title>道路运输证信息</sv-title>
|
||||
<sv label="道路运输证号">
|
||||
{{ detailData?.enterpriseName }}
|
||||
</sv>
|
||||
<sv label="许可证起始有效期">
|
||||
{{ detailData?.unifiedSocialCreditCode }}
|
||||
</sv>
|
||||
<sv label="许可证截至有效期">
|
||||
{{ detailData?.enterpriseType }}
|
||||
</sv>
|
||||
<sv label="营业执照">
|
||||
<!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> -->
|
||||
</sv>
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
<sv-container col="2" class="mt16">
|
||||
<sv-title>其他信息</sv-title>
|
||||
<sv label="车头照">
|
||||
{{ detailData?.name }}
|
||||
</sv>
|
||||
<sv label="车主申明或挂靠协议" >
|
||||
<!-- <app-imagelist [imgList]="detailData?.certificatePhoto"></app-imagelist> -->
|
||||
</sv>
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
<st
|
||||
#st
|
||||
[bordered]="true"
|
||||
[columns]="columns"
|
||||
[data]="detailData.goodsList"
|
||||
[ngStyle]="{ margin: '1rem 0' }"
|
||||
multiSort
|
||||
size="small"
|
||||
[page]="{ show: false }"
|
||||
>
|
||||
</st>
|
||||
</nz-card>
|
||||
</ng-container>
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
@import '~@delon/theme/index';
|
||||
: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 {
|
||||
color: @error-color;
|
||||
}
|
||||
}
|
||||
.mt16 {
|
||||
margin-top: 16px;
|
||||
}
|
||||
.user-info {
|
||||
display: flex;
|
||||
font-size: 16px;
|
||||
.enterprise-name {
|
||||
margin-right: 15px;
|
||||
}
|
||||
.user-info-des {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-11-29 20:19:08
|
||||
* @LastEditTime: 2021-11-29 20:31:00
|
||||
* @LastEditors: your name
|
||||
* @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\detail\detail.component.spec.ts
|
||||
*/
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { FreightComponentsListDetailComponent } from './detail.component';
|
||||
|
||||
describe('FreightComponentsListDetailComponent', () => {
|
||||
let component: FreightComponentsListDetailComponent;
|
||||
let fixture: ComponentFixture<FreightComponentsListDetailComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [FreightComponentsListDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FreightComponentsListDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,273 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { UsermanageService } from '../../../services/vehicle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-supplier-components-list-view',
|
||||
templateUrl: './detail.component.html',
|
||||
styleUrls: ['./detail.component.less'],
|
||||
})
|
||||
export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
i: any;
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
@ViewChild('st', { static: false }) st!: STComponent;
|
||||
isShow = false;
|
||||
isVisible = false;
|
||||
modalTitle = '有效期';
|
||||
modalName = '';
|
||||
ui!: SFUISchema;
|
||||
columns: STColumn[] = [
|
||||
{ title: '认证司机', index: 'perPrice', width: 300, className: 'text-center' },
|
||||
{ title: '司机手机号', index: 'goodsQuantity', width: 300, className: 'text-center' },
|
||||
{ title: '录入人员', index: 'totalPrice', width: 300, className: 'text-center' },
|
||||
];
|
||||
detailData: any = {
|
||||
goodsList: [
|
||||
{
|
||||
perPrice: '22323',
|
||||
goodsQuantity: '项目名称',
|
||||
totalPrice: '角色',
|
||||
},
|
||||
{
|
||||
perPrice: '2259595',
|
||||
goodsQuantity: '项目名称2',
|
||||
totalPrice: '角色',
|
||||
},
|
||||
]
|
||||
};
|
||||
schema!: SFSchema;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema1!: SFSchema;
|
||||
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
|
||||
validData: any = ['suppliersType'];
|
||||
suppliersData: any = {};
|
||||
|
||||
constructor(
|
||||
private http: _HttpClient,
|
||||
private modal: ModalHelper,
|
||||
public service: UsermanageService,
|
||||
private route: ActivatedRoute,
|
||||
private modalHelper: ModalHelper,
|
||||
private msgSrv: NzMessageService,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.route.snapshot);
|
||||
// this.initData();
|
||||
this.initSF();
|
||||
this.initSF1();
|
||||
// this.launchSign();
|
||||
}
|
||||
/**
|
||||
* 初始化查询表单
|
||||
*/
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
effectiveDate: {
|
||||
title: '有效期',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
format: 'yyyy-MM-dd 00:00:00',
|
||||
// hidden: this.modalName === 'effectiveDate' ? false : true,
|
||||
} as SFDateWidgetSchema,
|
||||
},
|
||||
},
|
||||
required: ['effectiveDate'],
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
|
||||
}
|
||||
initSF1() {
|
||||
this.schema1 = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
suppliersType: {
|
||||
type: 'string',
|
||||
title: '类型',
|
||||
enum: [
|
||||
{ label: '非外部供应商', value: 0 },
|
||||
{ label: '外部供应商', value: 1 },
|
||||
],
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
change: (args: any) => {
|
||||
console.log(args, 'args');
|
||||
this.suppliersData.suppliersType = args;
|
||||
if (args === 1) {
|
||||
this.validData = ['suppliersType', 'externalSuppliersId'];
|
||||
} else {
|
||||
this.validData = ['suppliersType'];
|
||||
this.suppliersData.externalSuppliersId = '';
|
||||
}
|
||||
this.initSF1();
|
||||
},
|
||||
},
|
||||
},
|
||||
externalSuppliersId: {
|
||||
title: '外部供应商id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
ui: {
|
||||
visibleIf: { suppliersType: (value: any) => value === 1 },
|
||||
},
|
||||
},
|
||||
},
|
||||
required: this.validData,
|
||||
};
|
||||
}
|
||||
showModal(name: any) {
|
||||
this.modalName = name;
|
||||
if (name === 'effectiveDate') {
|
||||
this.isShow = true;
|
||||
} else {
|
||||
this.isVisible = true;
|
||||
}
|
||||
}
|
||||
async initData() {
|
||||
console.log(this.route.snapshot, 'this.route.snapshot');
|
||||
|
||||
const params = {
|
||||
tenantId: this.route.snapshot.params.id,
|
||||
// tenantId: this.route.snapshot.queryParams.tenantId,
|
||||
};
|
||||
const res = await this.service.asyncRequest(this.service.$api_get_supplier_info, params);
|
||||
// // 商品资质
|
||||
// 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_region_detailByCode, params, 'POST', true);
|
||||
// if (res && res.regionFullName) {
|
||||
// const arr = res.regionFullName.split(',');
|
||||
// res.regionFullName = arr.reverse().join('-');
|
||||
// }
|
||||
return res && res.regionFullName;
|
||||
}
|
||||
add() {
|
||||
// this.modal
|
||||
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||
// .subscribe(() => this.st.reload());
|
||||
}
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
/**
|
||||
* 冻结
|
||||
*/
|
||||
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 || '操作失败!');
|
||||
// }
|
||||
// });
|
||||
}
|
||||
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 || '操作失败!');
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
handleCancel(name: any) {
|
||||
if (name === 'effectiveDate') {
|
||||
this.isShow = false;
|
||||
} else {
|
||||
this.isVisible = false;
|
||||
}
|
||||
}
|
||||
handleOK(name: any) {
|
||||
const params: any = {
|
||||
tenantId: this.route.snapshot.params.id,
|
||||
// tenantId: this.route.snapshot.queryParams.tenantId,
|
||||
};
|
||||
|
||||
if (name === 'effectiveDate') {
|
||||
params.effectiveDate = this.sf?.value?.effectiveDate;
|
||||
} else {
|
||||
Object.assign(params, this.sf1?.value);
|
||||
}
|
||||
this.service.http.post(this.service.$api_set_freezeOrResume, params).subscribe((res) => {
|
||||
if (res.data === true) {
|
||||
this.service.msgSrv.success(`编辑成功!`);
|
||||
this.ngOnInit();
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg || '编辑失败!');
|
||||
}
|
||||
if (name === 'effectiveDate') {
|
||||
this.isShow = false;
|
||||
} else {
|
||||
this.isVisible = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user