车辆对接

This commit is contained in:
wangshiming
2022-01-04 21:05:44 +08:00
parent 630813359b
commit 8618108b81
9 changed files with 316 additions and 23 deletions

View File

@ -0,0 +1,42 @@
<!--
* @Author: your name
* @Date: 2021-12-16 10:19:08
* @LastEditTime: 2022-01-04 17:58:06
* @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\order-management\components\risk-detail\risk-detail.component.html
-->
<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>
<!-- [nzExtra]="extraTemplate" -->
<nz-card nzTitle="投诉信息" >
<h2>投诉单号:{{datailList?.id}}</h2>
<sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'" *ngIf="schema" [formData]="datailList">
<ng-template sf-template="imgUrls" let-schema="schema" let-item let-ui="ui">
<app-imagelist [imgList]="datailList?.imgUrls"></app-imagelist>
</ng-template>
</sf>
</nz-card>
<nz-card class="dealBox" nzTitle="投诉处理">
<nz-timeline class="d-block pl-md pt-md">
<nz-timeline-item *ngFor="let i of datailList" [nzDot]="dotTpl">
<ng-template #dotTpl>
<div class="md-sm p-sm icon-sm rounded-circle text-white bg-{{ i.dot.bg }}">
<i nz-icon [nzType]="i.dot.icon"></i>
</div>
</ng-template>
<div class="pl-lg">
<strong>{{ i.time }}</strong>
<div class="py-sm" [innerHTML]="i.content | html"></div>
<div class="text-grey">{{ i.tags }}</div>
</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,32 @@
/*
* @Author: your name
* @Date: 2022-01-04 17:29:18
* @LastEditTime: 2022-01-04 17:31:21
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\components\complaint-detail\complaint-detail.component.spec.ts
*/
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { OrderManagementComplaintDetailComponent } from './complaint-detail.component';
describe('OrderManagementComplaintDetailComponent', () => {
let component: OrderManagementComplaintDetailComponent;
let fixture: ComponentFixture<OrderManagementComplaintDetailComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ OrderManagementComplaintDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OrderManagementComplaintDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,128 @@
import { Component, OnInit, ViewChild, ɵɵsetComponentScope } 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 { OrderManagementService } 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: './complaint-detail.component.html',
styleUrls: ['./complaint-detail.component.less']
})
export class OrderManagementComplaintDetailComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
ui: SFUISchema = {};
schema: SFSchema = {};
// abnormalReason = [
// '司机装货轨迹异常',
// '司机卸货轨迹异常',
// '车辆装货轨迹异常',
// '司机位置未移动或运输途中未打开APP',
// '运单轨迹严重异常'
// ]
i: any;
datailList: any;
id: string = '';
constructor(private modal: NzModalService, public service: OrderManagementService, public ar: ActivatedRoute) {
this.id = this.ar.snapshot.params.id;
}
ngOnInit(): void {
if (this.id)
{
this.getDetail(this.id);
this.initSF();
}
}
initSF() {
this.schema = {
properties: {
complaintCause: {
title: '投诉原因',
type: 'string',
maxLength: 30,
ui: {
widget: 'text',
change: (value, orgData) => console.log(value, orgData),
} as SFSelectWidgetSchema,
},
complaintDetails: {
title: '投诉详情',
type: 'string',
ui: {
widget: 'textarea',
placeholder: '请输入',
autosize: {
minRows: 4,
maxRows: 4
}
},
readOnly: true
} as SFTextareaWidgetSchema,
imgUrls: {
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_getComplaintDriverDetails, { id }).subscribe(res => {
if (res) {
this.datailList = 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) {
}
})
}
kkk(value: any) {
console.log(value)
}
goBack() {
window.history.go(-1)
}
}