129 lines
3.2 KiB
TypeScript
129 lines
3.2 KiB
TypeScript
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 { 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;
|
||
datailList: any;
|
||
id: string = '';
|
||
constructor(private modal: NzModalService, public service: SupplyManagementService, 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: {
|
||
representationsCause: {
|
||
title: '申诉原因',
|
||
type: 'string',
|
||
maxLength: 30,
|
||
ui: {
|
||
widget: 'text',
|
||
change: (value, orgData) => console.log(value, orgData),
|
||
} as SFSelectWidgetSchema,
|
||
},
|
||
representationsDescribe: {
|
||
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_getRiskDetail, { 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) {
|
||
|
||
}
|
||
})
|
||
}
|
||
|
||
goBack() {
|
||
window.history.go(-1)
|
||
}
|
||
|
||
}
|