车辆对接
This commit is contained in:
@ -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: `<p>车牌号:${this.detailData?.licenseNo}</p><p>是否确认通过审核`,
|
||||
nzContent: `<p>车牌号:${this.detailData?.carNo}</p><p>是否确认通过审核`,
|
||||
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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user