diff --git a/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.html b/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.html new file mode 100644 index 00000000..c2e0a3d9 --- /dev/null +++ b/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.html @@ -0,0 +1,42 @@ + + + + + + + + + +

投诉单号:{{datailList?.id}}

+ + + + + +
+ + + + + +
+ +
+
+
+ {{ i.time }} +
+
{{ i.tags }}
+
+
+
+
diff --git a/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.less b/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.less new file mode 100644 index 00000000..0df0abc9 --- /dev/null +++ b/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.less @@ -0,0 +1,10 @@ +.info{ + color: #666; +} +:host{ + ::ng-deep{ + .dealBox .ant-card-body{ + width: 500px; + } + } +} \ No newline at end of file diff --git a/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.spec.ts b/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.spec.ts new file mode 100644 index 00000000..4e7dc35e --- /dev/null +++ b/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.spec.ts @@ -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; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ OrderManagementComplaintDetailComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(OrderManagementComplaintDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.ts b/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.ts new file mode 100644 index 00000000..061230ad --- /dev/null +++ b/src/app/routes/order-management/components/complaint-detail/complaint-detail.component.ts @@ -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) + } + +} diff --git a/src/app/routes/order-management/components/complaint/complaint.component.html b/src/app/routes/order-management/components/complaint/complaint.component.html index 6cc34634..a8c16e90 100644 --- a/src/app/routes/order-management/components/complaint/complaint.component.html +++ b/src/app/routes/order-management/components/complaint/complaint.component.html @@ -1,7 +1,7 @@ - - - {{item.no}} + + + {{item.complaintCode}} + + +
+ {{item?.complainant?.name}} +
+
+ +
+ {{item?.complainant?.name}} +