车辆对接

This commit is contained in:
wangshiming
2021-12-16 11:23:34 +08:00
parent 1a8468a8a9
commit fc53095c17
15 changed files with 450 additions and 140 deletions

View File

@ -0,0 +1,46 @@
<page-header-wrapper [title]="''" [logo]="logo">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
</page-header-wrapper>
<nz-card nzTitle="运单信息">
<sv-container labelWidth="150" col="2">
<sv label="订单号">{{i?.billCode}}</sv>
<sv label="申诉状态">{{i?.representationsStatus}}</sv>
<sv label="承运司机">{{i?.driverName}} / {{i?.driverPhoneNumber}} / {{i?.carId}}</sv>
<sv label="收款人"> {{i?.payeeName}} / {{i?.payeePhoneNumber}} </sv>
<sv label="装货时间">{{i?.loadTime}}</sv>
<sv label="卸货时间">{{i?.unloadTime}}</sv>
<sv label="装货地">{{i?.loadingPlace}}</sv>
<sv label="卸货地">{{i?.dischargePlace}}</sv>
<sv label="异常原因" col="1">
<div class="bg-grey-lighter p-sm">
<div *ngFor="let item of abnormalReason">{{item}}</div>
</div>
</sv>
</sv-container>
</nz-card>
<nz-card nzTitle="申诉信息" [nzExtra]="extraTemplate">
<ng-template #extraTemplate>
<button nzType="primary" (click)="edit(i)" nzGhost nz-button>编辑</button>
</ng-template>
<sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'" *ngIf="schema" [formData]="i">
<ng-template sf-template="enterpriseQualificationCe" let-schema="schema" let-me let-ui="ui">
<app-imagelist [imgList]="me.value"></app-imagelist>
</ng-template>
</sf>
</nz-card>
<nz-card class="dealBox" nzTitle="申诉处理">
<nz-timeline nzMode="left">
<nz-timeline-item nzLabel="2015-09-01" nzColor="green">申诉成功</nz-timeline-item>
<nz-timeline-item nzLabel="2015-09-01 09:12:11">重新提交申诉申请<div class="info">操作人员:张三</div>
</nz-timeline-item>
<nz-timeline-item nzLabel="2015-09-01 09:12:11">驳回<div class="info">操作人员:张三</div>
</nz-timeline-item>
<nz-timeline-item nzLabel="2015-09-01 09:12:11">提交申诉申请<div class="info">操作人员:张三</div>
</nz-timeline-item>
</nz-timeline>
</nz-card>

View File

@ -0,0 +1,10 @@
.info{
color: #666;
}
:host{
::ng-deep{
.dealBox .ant-card-body{
width: 500px;
}
}
}

View File

@ -0,0 +1,24 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { OrderManagementRiskDetailComponent } from './risk-detail.component';
describe('OrderManagementRiskDetailComponent', () => {
let component: OrderManagementRiskDetailComponent;
let fixture: ComponentFixture<OrderManagementRiskDetailComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ OrderManagementRiskDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OrderManagementRiskDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,124 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { SupplyManagementService } from '../../services/order-management.service';
// import { RiskOrderService } from '../../services/risk-order.service';
// import { CtcAppealComponent } from '../appeal/appeal.component';
@Component({
selector: 'app-oder-management-component-risk-detail',
templateUrl: './risk-detail.component.html',
styleUrls: ['./risk-detail.component.less']
})
export class OrderManagementRiskDetailComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
ui: SFUISchema = {};
schema: SFSchema = {};
abnormalReason = [
'司机装货轨迹异常',
'司机卸货轨迹异常',
'车辆装货轨迹异常',
'司机位置未移动或运输途中未打开APP',
'运单轨迹严重异常'
]
i: any;
id: string = '';
constructor(private modal: NzModalService, public service: SupplyManagementService, public ar: ActivatedRoute) {
this.id = this.ar.snapshot.queryParams.id;
}
ngOnInit(): void {
this.initSF();
if (this.id) this.getDetail(this.id);
}
initSF() {
this.schema = {
properties: {
enterpriseType: {
title: '申诉原因',
type: 'string',
maxLength: 30,
ui: {
widget: 'text',
change: (value, orgData) => console.log(value, orgData),
} as SFSelectWidgetSchema,
},
enterpriseTyp: {
title: '申诉描述',
type: 'string',
ui: {
widget: 'textarea',
placeholder: '请输入',
autosize: {
minRows: 4,
maxRows: 4
}
},
readOnly: true
} as SFTextareaWidgetSchema,
enterpriseQualificationCe: {
type: 'string',
title: '上传凭证',
ui: {
widget: 'custom'
}
},
},
};
this.ui = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
},
$title1: {
spanLabelFixed: 0,
},
$title2: {
spanLabelFixed: 0,
},
$title3: {
spanLabelFixed: 0,
},
$unit: {
spanLabelFixed: 20,
grid: { span: 3 },
},
};
}
getDetail(id: string) {
// this.service.request(this.service.$api_get_risk_order_detail, { id }).subscribe(res => {
// if (res) {
// this.i = res;
// }
// })
}
edit(item: any): void {
const modalRef = this.modal.create({
nzTitle: '申诉',
nzWidth: '40%',
// nzContent: CtcAppealComponent,
nzComponentParams: {
i: item
},
nzFooter: null
});
modalRef.afterClose.subscribe(res => {
if (res) {
}
})
}
goBack() {
window.history.go(-1)
}
}