车辆对接
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
</ng-template>
|
||||
<ng-template #content>
|
||||
<sv-container col="1">
|
||||
<sv-title style="font-weight: 700;">待审核
|
||||
<sv-title style="font-weight: 700;">
|
||||
<div style="float: right;">
|
||||
<ng-container *ngIf="!isEdit">
|
||||
<button nz-button nzType="default" nzDanger (click)="ratify()">修改</button>
|
||||
@ -82,7 +82,7 @@
|
||||
<sv label="车头照">
|
||||
<!-- <app-imagelist [imgList]="[detailData?.carFrontPhotoWatermark, detailData?.carFrontPhotoWatermark]"></app-imagelist> -->
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.carFrontPhoto,key:'carFrontPhoto'}">
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.carFrontPhotoWatermark,key:'carFrontPhotoWatermark',hover: 'PhotoWatermark2'}">
|
||||
</ng-container>
|
||||
</sv>
|
||||
</sv-container>
|
||||
@ -152,9 +152,11 @@
|
||||
</sv-container>
|
||||
<sv-container col="1">
|
||||
<sv label="行驶证照片">
|
||||
<!-- <app-imagelist [imgList]="[detailData?.certificatePhotoFront,detailData?.certificatePhotoBack,detailData?.certificatePhotoFrontWatermark,detailData?.certificatePhotoBackWatermark]"></app-imagelist> -->
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFront,key:'certificatePhotoFront'}">
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFrontWatermark,key:'certificatePhotoFrontWatermark',hover: 'FrontWatermark'}">
|
||||
</ng-container>
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoBackWatermark,key:'certificatePhotoBackWatermark',hover: 'BackWatermark'}">
|
||||
</ng-container>
|
||||
</sv>
|
||||
</sv-container>
|
||||
@ -184,7 +186,7 @@
|
||||
<sv label="道路运输证照片">
|
||||
<!-- <app-imagelist [imgList]="[detailData?.roadTransportPhoto,detailData?.roadTransportPhotoWatermark ]"></app-imagelist> -->
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.roadTransportPhoto,key:'roadTransportPhoto'}">
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.roadTransportPhotoWatermark,key:'roadTransportPhotoWatermark', hover: 'Watermark'}" >
|
||||
</ng-container>
|
||||
</sv>
|
||||
</sv-container>
|
||||
@ -204,11 +206,14 @@
|
||||
size="small"
|
||||
[page]="{ show: false }"
|
||||
>
|
||||
<ng-template st-row="isSelf" let-item let-index="index">
|
||||
<div nz-tooltip [nzTooltipTitle]="item.enterpriseName">
|
||||
<div>
|
||||
{{ item?.isSelf ? '是' : '否' }}
|
||||
</div>
|
||||
<ng-template st-row="auditStatusEnum" let-item let-index="index">
|
||||
<div>
|
||||
<span *ngIf="item?.auditStatusEnum === -1 || item?.auditStatusEnum === '-1'">未上传</span>
|
||||
<span *ngIf="item?.auditStatusEnum === 0 || item?.auditStatusEnum === '0'">草稿</span>
|
||||
<span *ngIf="item?.auditStatusEnum === 10 || item?.auditStatusEnum === '10'">待审核</span>
|
||||
<span *ngIf="item?.auditStatusEnum === 20 || item?.auditStatusEnum === '20'">已审核</span>
|
||||
<span *ngIf="item?.auditStatusEnum === 30 || item?.auditStatusEnum === '30'">已驳回</span>
|
||||
<span *ngIf="item?.auditStatusEnum === 40 || item?.auditStatusEnum === '40'">证件过期</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
</st>
|
||||
@ -247,7 +252,7 @@
|
||||
</ng-container>
|
||||
<div *ngIf="image" (mouseover)="detailData[hover]=true" (mouseleave)="detailData[hover]=false"
|
||||
(click)="$event.cancelBubble=true" class="image-hover">
|
||||
<img [src]="image" style="width: 200px;height: 160px;" />
|
||||
<img (click)="showImg(image)" [src]="image" style="width: 200px;height: 160px;" />
|
||||
<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(key)"></i>
|
||||
|
||||
@ -19,7 +19,6 @@ import { EADateUtil } from '@shared';
|
||||
})
|
||||
export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
i: any;
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
@ViewChild('st', { static: false }) st!: STComponent;
|
||||
isShow = false;
|
||||
isVisible = false;
|
||||
@ -89,10 +88,10 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
}
|
||||
initST() {
|
||||
this.columns =[
|
||||
{ title: '认证司机', index: 'name', width: 300, className: 'text-center' },
|
||||
{ title: '司机姓名', index: 'name', width: 300, className: 'text-center' },
|
||||
{ title: '司机手机号', index: 'mobile', width: 300, className: 'text-center' },
|
||||
{ title: '是否挂靠', render: 'isSelf', width: 300, className: 'text-center' },
|
||||
{ title: '录入人员', index: 'totalPrice', width: 300, className: 'text-center' },
|
||||
{ title: '挂靠协议', render: 'auditStatusEnum', className: 'text-center' },
|
||||
{ title: '录入人员', index: 'saveUser', className: 'text-center' },
|
||||
{
|
||||
title: '车主申明/挂靠协议',
|
||||
fixed: 'right',
|
||||
@ -102,10 +101,12 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
{
|
||||
text: '查看协议',
|
||||
click: (_record) => this.viewEvaluate(_record),
|
||||
iif: item => item.auditStatusEnum == 10 || item.auditStatusEnum == 20,
|
||||
},
|
||||
{
|
||||
text: '上传协议',
|
||||
click: (_record) => this.updateEvaluate(_record),
|
||||
iif: item => item.auditStatusEnum == -1,
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -172,7 +173,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
})
|
||||
return value;
|
||||
}
|
||||
// 获取录单员
|
||||
//
|
||||
getDetailList() {
|
||||
console.log( this.route.snapshot?.params?.id)
|
||||
const params = {
|
||||
@ -198,7 +199,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
*/
|
||||
viewEvaluate(item: any) {
|
||||
this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe(() => {
|
||||
// this.st.reload();
|
||||
this.st.reload();
|
||||
});
|
||||
}
|
||||
/**
|
||||
@ -206,8 +207,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
*/
|
||||
updateEvaluate(item: any) {
|
||||
this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe(() => {
|
||||
// this.st.reload();
|
||||
// this.getInfo();
|
||||
this.st.reload();
|
||||
});
|
||||
}
|
||||
handleOK() {
|
||||
@ -260,13 +260,15 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
this.detailData.roadTransportStartTime = EADateUtil.yearToDate(this.detailData?.roadTransportStartTime)
|
||||
|
||||
this.detailData.roadTransportEndTime = EADateUtil.yearToDate(this.detailData?.roadTransportEndTime)
|
||||
// EADateUtil.timestampToDate('')
|
||||
console.log(this.detailData)
|
||||
this.service.request(this.service.$api_get_update, this.detailData).subscribe((res)=>{
|
||||
console.log(res)
|
||||
if(res) {
|
||||
this.getDetailList()
|
||||
}
|
||||
})
|
||||
}
|
||||
// if(typeof(this.validateForm1.value.unloadingTime) !== 'string' ) {
|
||||
// var c = new Date(this.validateForm1.value.unloadingTime);
|
||||
// this.validateForm1.value.unloadingTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds())
|
||||
// }
|
||||
|
||||
private initData() {
|
||||
return {
|
||||
carNo: '',
|
||||
|
||||
@ -1,15 +1,14 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-07 17:20:23
|
||||
* @LastEditTime: 2021-12-07 17:22:40
|
||||
* @LastEditors: your name
|
||||
* @LastEditTime: 2021-12-16 16:16:27
|
||||
* @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\vehicle\components\list\edit\edit.component.html
|
||||
-->
|
||||
<div class="modal-header">
|
||||
<div class="modal-title">{{ i.typeName }}</div>
|
||||
</div>
|
||||
<!-- <nz-spin *ngIf="!i" class="modal-spin"></nz-spin> -->
|
||||
<div>
|
||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'" [formData]="formData">
|
||||
</sf>
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
import { Params } from '@angular/router';
|
||||
import { Component, OnInit, ViewChild, Type } from '@angular/core';
|
||||
import { SFComponent, SFSchema, SFUISchema, SFUploadWidgetSchema, SFTextareaWidgetSchema } from '@delon/form';
|
||||
import { EAEnvironmentService, CaptchaComponent, EAUserService } from '@shared';
|
||||
import { Observable, Observer } from 'rxjs';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
import { VehicleService } from '../../../services/vehicle.service';
|
||||
@Component({
|
||||
selector: 'app-setting-components-info-edit',
|
||||
@ -34,16 +36,16 @@ export class VehicleComponentsListEditComponent implements OnInit {
|
||||
this.initSF();
|
||||
}
|
||||
initInfo() {
|
||||
if (this.infoData.enterpriseLogo) {
|
||||
if (this.infoData.carProtocal) {
|
||||
this.formData = {
|
||||
enterpriseLogo: [
|
||||
carProtocal: [
|
||||
{
|
||||
uid: 'logo',
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: this.infoData.enterpriseLogo,
|
||||
url: this.infoData.carProtocal,
|
||||
response: {
|
||||
url: this.infoData.enterpriseLogo,
|
||||
url: this.infoData.carProtocal,
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -54,41 +56,25 @@ export class VehicleComponentsListEditComponent implements OnInit {
|
||||
// 依据类型初始表单
|
||||
this.schema = {
|
||||
properties: {
|
||||
enterpriseLogo: {
|
||||
carProtocal: {
|
||||
type: 'string',
|
||||
title: 'Logo',
|
||||
title: '车主申明/挂靠协议',
|
||||
ui: {
|
||||
widget: 'upload',
|
||||
action: `/cms/upload/multipartFile/fileModel`,
|
||||
// fileType: 'image/png,image/jpeg,image/gif,image/bmp',
|
||||
action: apiConf.fileUpload,
|
||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'url',
|
||||
urlReName: 'url',
|
||||
descriptionI18n: '支持JPG、GIF、PNG、JPEG格式,图片小于2M',
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
||||
data: {
|
||||
appId: this.envSrv.env.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
change: (args) => {
|
||||
if (args.type === 'success') {
|
||||
const avatar = [
|
||||
{
|
||||
uid: 'logo',
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: args.fileList[0].response.url,
|
||||
response: {
|
||||
url: args.fileList[0].response.url,
|
||||
},
|
||||
},
|
||||
];
|
||||
this.sf?.setValue('/enterpriseLogo', avatar);
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt1M = file.size / 1024 / 1024 < 2;
|
||||
const isLt1M = file.size / 1024 / 1024 < 5;
|
||||
const fileType = 'image/png,image/jpeg';
|
||||
if (fileType.indexOf(file.type) === -1) {
|
||||
this.service.msgSrv.warning('图片格式不正确!');
|
||||
@ -96,7 +82,7 @@ export class VehicleComponentsListEditComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
if (!isLt1M) {
|
||||
this.service.msgSrv.warning('图片大小超过2M!');
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
@ -110,7 +96,7 @@ export class VehicleComponentsListEditComponent implements OnInit {
|
||||
} as SFUploadWidgetSchema,
|
||||
},
|
||||
},
|
||||
required: ['enterpriseLogo'],
|
||||
required: ['carProtocal'],
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
@ -124,6 +110,17 @@ export class VehicleComponentsListEditComponent implements OnInit {
|
||||
this.modal.destroy();
|
||||
}
|
||||
sure() {
|
||||
|
||||
const params ={
|
||||
carProtocal: this.sf.value.carProtocal?.data?.fullFilePath,
|
||||
id: this.i.id
|
||||
}
|
||||
this.service.request(this.service.$api_get_upLoadCarProtocal, params).subscribe((res) => {
|
||||
if(res) {
|
||||
this.modal.destroy();
|
||||
this.service.msgSrv.success('上传协议成功!')
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-07 17:30:18
|
||||
* @LastEditTime: 2021-12-15 17:39:01
|
||||
* @LastEditTime: 2021-12-16 15:19:12
|
||||
* @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\vehicle\components\list\img-view\img-view.component.html
|
||||
@ -18,13 +18,14 @@
|
||||
<div class="modal-title">查看协议</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
{{this.i?.carProtocal}}
|
||||
<div class="text-center"><img [src]="i?.carProtocal" /></div>
|
||||
</div>
|
||||
<div *nzModalFooter>
|
||||
<button nz-button nzType="default" (click)="cancel">取消</button>
|
||||
<button nz-button nzType="primary" (click)="cancel">确定</button>
|
||||
<button nz-button nzType="default" >驳回</button>
|
||||
<button nz-button nzType="primary" (click)="cancel">通过</button>
|
||||
<button *ngIf="i?.auditStatusEnum == 20 || i?.auditStatusEnum == 30" nz-button nzType="default" (click)="cancel()">取消</button>
|
||||
<button *ngIf="i?.auditStatusEnum == 20 || i?.auditStatusEnum == 30" nz-button nzType="primary" (click)="cancel()">确定</button>
|
||||
|
||||
<button *ngIf="i?.auditStatusEnum == 10" nz-button nzType="default" (click)="reject()">驳回</button>
|
||||
<button *ngIf="i?.auditStatusEnum == 10" nz-button nzType="primary" (click)="okCancel()">通过</button>
|
||||
</div>
|
||||
<style>
|
||||
.text-center img {
|
||||
|
||||
@ -1,7 +1,16 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-07 17:30:18
|
||||
* @LastEditTime: 2021-12-16 15:31:13
|
||||
* @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\vehicle\components\list\img-view\img-view.component.ts
|
||||
*/
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { VehicleService } from '../../../services/vehicle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-setting-components-info-img-view',
|
||||
@ -11,15 +20,43 @@ export class VehicleImgViewComponent implements OnInit {
|
||||
record: any = {};
|
||||
i: any;
|
||||
|
||||
constructor(private modal: NzModalRef, public msgSrv: NzMessageService, public http: _HttpClient) {}
|
||||
constructor(private modal: NzModalRef, public msgSrv: NzMessageService, public http: _HttpClient, public service: VehicleService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.i?.carProtocal, 66666666666);
|
||||
|
||||
// this.http.get(`/user/${this.record.id}`).subscribe(res => this.i = res);
|
||||
console.log(this.i);
|
||||
}
|
||||
|
||||
cancel() {
|
||||
this.modal.destroy();
|
||||
}
|
||||
// 驳回
|
||||
reject() {
|
||||
const params ={
|
||||
approvalStatus: 30,
|
||||
id: this.i.id
|
||||
}
|
||||
this.service.request(this.service.$api_get_auditCarProtocal_audit, params).subscribe((res) => {
|
||||
if(res) {
|
||||
this.modal.destroy();
|
||||
this.service.msgSrv.success('已驳回')
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 通过
|
||||
okCancel() {
|
||||
const params ={
|
||||
approvalStatus: 20,
|
||||
id: this.i.id
|
||||
}
|
||||
this.service.request(this.service.$api_get_auditCarProtocal_audit, params).subscribe((res) => {
|
||||
if(res) {
|
||||
this.modal.destroy();
|
||||
this.service.msgSrv.success('已通过')
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -218,7 +218,7 @@ export class VehicleComponentsListComponent implements OnInit {
|
||||
{
|
||||
text: '查看',
|
||||
click: (item) => {
|
||||
this.router.navigate(['./detail', item.id], { relativeTo: this.ar });
|
||||
this.router.navigate(['./detail', item.id], { relativeTo: this.ar,queryParams: { carId: item.carId } });
|
||||
// this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } });
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user