diff --git a/src/app/routes/vehicle/components/audit/detail/detail.component.ts b/src/app/routes/vehicle/components/audit/detail/detail.component.ts
index 4f715697..e746be30 100644
--- a/src/app/routes/vehicle/components/audit/detail/detail.component.ts
+++ b/src/app/routes/vehicle/components/audit/detail/detail.component.ts
@@ -12,6 +12,8 @@ import { VehicleService } from '../../../services/vehicle.service';
// import { VehicleComponentsListEditComponent } from '../edit/edit.component';
// import { VehicleImgViewComponent } from '../img-view/img-view.component';
import { EADateUtil } from '@shared';
+import { VehicleImgViewComponent } from '../../list/img-view/img-view.component';
+import { VehicleComponentsListEditComponent } from '../../list/edit/edit.component';
@Component({
selector: 'app-Vehicle-components-Audit-detail',
@@ -31,20 +33,21 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
approvalOpinion = '';
uploadURl = apiConf.waterFileUpload;
disabledUpload = false;
- constructor(public service: VehicleService, private route: ActivatedRoute, private nzModalService: NzModalService) {}
+ constructor(public service: VehicleService, private route: ActivatedRoute, private nzModalService: NzModalService, private modal: ModalHelper,) {}
ngOnInit() {
this.getSelectList();
+ console.log(this.route.snapshot.params)
this.getDetailList();
this.initST();
}
initST() {
this.columns = [
- { 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: '司机姓名', index: 'name', className: 'text-center' },
+ { title: '司机手机号', index: 'mobile', className: 'text-center' },
+ { title: '身份证号', index: 'idCardNo', className: 'text-center' },
+ { title: '挂靠协议', render: 'auditStatusEnum', className: 'text-center' },
{
title: '车主申明/挂靠协议',
fixed: 'right',
@@ -52,20 +55,22 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
className: 'text-left',
buttons: [
{
- text: '查看协议'
- // click: _record => this.viewEvaluate(_record)
+ text: '查看协议',
+ click: (_record) => this.viewEvaluate(_record),
+ iif: item => item.auditStatusEnum == 10 || item.auditStatusEnum == 20,
},
{
- text: '上传协议'
- // click: _record => this.updateEvaluate(_record)
- }
+ text: '上传协议',
+ click: (_record) => this.updateEvaluate(_record),
+ iif: item => item.auditStatusEnum == -1,
+ },
]
}
];
}
getDetailList() {
- console.log(this.route.snapshot?.params?.id);
+ console.log(this.route.snapshot.queryParams.carId);
const params = {
id: this.route.snapshot?.params?.id
};
@@ -78,11 +83,12 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
approveDriver() {
this.nzModalService.confirm({
nzTitle: '审核通过',
- nzContent: `
车牌号:${this.detailData?.licenseNo}
是否确认通过审核`,
+ nzContent: `
车牌号:${this.detailData?.carNo}
是否确认通过审核`,
nzOnOk: () => {
this.adjuctUser(
{
- auditStatus: 20
+ approvalStatus: 20,
+ id: this.route.snapshot?.params?.id,
},
'审核成功'
);
@@ -101,7 +107,8 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
}
this.adjuctUser(
{
- auditStatus: 30,
+ id: this.route.snapshot?.params?.id,
+ approvalStatus: 30,
approvalOpinion: this.approvalOpinion
},
'审核驳回成功'
@@ -147,7 +154,7 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
* 查询参数
*/
get reqParams() {
- return { id: this.route.snapshot?.params?.id };
+ return { id: this.route.snapshot.queryParams.carId };
}
showImg(url: any) {
const params = {
@@ -171,7 +178,7 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
}
private adjuctUser(params: any, msg: string) {
- this.service.request(this.service.$api_get_operate_get, { ...params }).subscribe(res => {
+ this.service.request(this.service.$api_get_operate_audit, { ...params }).subscribe(res => {
if (res) {
this.service.msgSrv.success(msg);
}
@@ -225,4 +232,14 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
})
return value;
}
+ viewEvaluate(item: any) {
+ this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe(() => {
+ this.st.reload();
+ });
+ }
+ updateEvaluate(item: any) {
+ this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe(() => {
+ this.st.reload();
+ });
+ }
}
diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.html b/src/app/routes/vehicle/components/list/detail/detail.component.html
index b76d426f..516ac7f3 100644
--- a/src/app/routes/vehicle/components/list/detail/detail.component.html
+++ b/src/app/routes/vehicle/components/list/detail/detail.component.html
@@ -8,7 +8,7 @@
- 待审核
+
@@ -82,7 +82,7 @@
+ *ngTemplateOutlet="uploadTemplate;context:{image:detailData?.carFrontPhotoWatermark,key:'carFrontPhotoWatermark',hover: 'PhotoWatermark2'}">
@@ -152,9 +152,11 @@
-
+ *ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFrontWatermark,key:'certificatePhotoFrontWatermark',hover: 'FrontWatermark'}">
+
+
@@ -184,7 +186,7 @@
+ *ngTemplateOutlet="uploadTemplate;context:{image:detailData?.roadTransportPhotoWatermark,key:'roadTransportPhotoWatermark', hover: 'Watermark'}" >
@@ -204,11 +206,14 @@
size="small"
[page]="{ show: false }"
>
-
-
-
- {{ item?.isSelf ? '是' : '否' }}
-
+
+
+ 未上传
+ 草稿
+ 待审核
+ 已审核
+ 已驳回
+ 证件过期
@@ -247,7 +252,7 @@
-
![]()
+
diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.ts b/src/app/routes/vehicle/components/list/detail/detail.component.ts
index 69121424..82bfcb6c 100644
--- a/src/app/routes/vehicle/components/list/detail/detail.component.ts
+++ b/src/app/routes/vehicle/components/list/detail/detail.component.ts
@@ -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: '',
diff --git a/src/app/routes/vehicle/components/list/edit/edit.component.html b/src/app/routes/vehicle/components/list/edit/edit.component.html
index bcb00157..3442af67 100644
--- a/src/app/routes/vehicle/components/list/edit/edit.component.html
+++ b/src/app/routes/vehicle/components/list/edit/edit.component.html
@@ -1,15 +1,14 @@
-
diff --git a/src/app/routes/vehicle/components/list/edit/edit.component.ts b/src/app/routes/vehicle/components/list/edit/edit.component.ts
index 626d3980..a4160f18 100644
--- a/src/app/routes/vehicle/components/list/edit/edit.component.ts
+++ b/src/app/routes/vehicle/components/list/edit/edit.component.ts
@@ -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) => {
- 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)
+ }
+ })
}
}
diff --git a/src/app/routes/vehicle/components/list/img-view/img-view.component.html b/src/app/routes/vehicle/components/list/img-view/img-view.component.html
index 37c315ad..9065b2fe 100644
--- a/src/app/routes/vehicle/components/list/img-view/img-view.component.html
+++ b/src/app/routes/vehicle/components/list/img-view/img-view.component.html
@@ -1,7 +1,7 @@