车辆对接

This commit is contained in:
wangshiming
2022-01-12 10:52:46 +08:00
parent bb5006f723
commit 7465b4f643
5 changed files with 134 additions and 55 deletions

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-16 10:19:08
* @LastEditTime: 2022-01-05 09:40:31
* @LastEditTime: 2022-01-12 10:42:22
* @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
@ -15,7 +15,10 @@
</ng-template>
</page-header-wrapper>
<!-- [nzExtra]="extraTemplate" -->
<nz-card nzTitle="投诉信息" >
<nz-card nzTitle="投诉信息" [nzExtra]="cardTemplate">
<ng-template #cardTemplate>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="viewEvaluate()" *ngIf="datailList?.complaintStatus == 1">处理</button>
</ng-template>
<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">
@ -46,8 +49,20 @@
</nz-timeline-item>
<nz-timeline-item [nzLabel]="datailList?.handleTime">运多星运营后台
<div class="info">操作人员:{{datailList?.complainantIdLabel}}</div>
<div class="info">处理状态:{{datailList?.complaintStatusLabel}}</div>
<div class="info">处理详情:{{datailList?.handleDetails}}</div>
<div class="info">处理结果:{{datailList?.handleResult}}</div>
</nz-timeline-item>
</nz-timeline>
</nz-card>
<nz-modal [(nzVisible)]="isVisibleRE" [nzWidth]="600" [nzFooter]="nzModalFooterview2" (nzOnOk)="handleOK()" nzTitle="处理" (nzOnCancel)="Cancel()">
<ng-container *nzModalContent>
<sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'">
</sf>
</ng-container>
<ng-template #nzModalFooterview2>
<button nz-button nzType="default" (click)="handleCancel('1')">拒绝</button>
<button nz-button nzType="primary" (click)="handleOK()">通过</button>
<button nz-button nzType="primary" (click)="handleCancel2()">强制取消</button>
</ng-template>
</nz-modal>

View File

@ -14,15 +14,13 @@ import { OrderManagementService } from '../../services/order-management.service'
})
export class OrderManagementComplaintDetailComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
ui: SFUISchema = {};
uiView: SFUISchema = {};
isVisibleRE = false;
channelId: any;
schema: SFSchema = {};
// abnormalReason = [
// '司机装货轨迹异常',
// '司机卸货轨迹异常',
// '车辆装货轨迹异常',
// '司机位置未移动或运输途中未打开APP',
// '运单轨迹严重异常'
// ]
schemaView: SFSchema = {};
i: any;
datailList: any;
id: string = '';
@ -35,13 +33,32 @@ export class OrderManagementComplaintDetailComponent implements OnInit {
{
this.getDetail(this.id);
this.initSF();
this.initSTAudit()
}
}
initSTAudit() {
this.schemaView = {
properties: {
handleResult: {
title: '处理结果',
type: 'string',
maxLength: 50,
ui: {
placeholder: '最多不超过50字',
widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 }
},
},
},
required: ['handleResult']
};
this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } };
}
initSF() {
this.schema = {
properties: {
complaintCause: {
complaintCauseLabel: {
title: '投诉原因',
type: 'string',
maxLength: 30,
@ -124,5 +141,73 @@ export class OrderManagementComplaintDetailComponent implements OnInit {
goBack() {
window.history.go(-1)
}
/*
* 审核关闭弹窗
view: 1
浮动费用: 0
查看评价: 3
*/
handleCancel(type: string) {
const paramsa = {
...this.sfView.value,
handleStatus: 0,
id: this.channelId
}
this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{
console.log(res)
if(res) {
this.service.msgSrv.success('已拒绝!')
this.isVisibleRE = false
this.getDetail(this.id);
} else{
this.service.msgSrv.error(res?.msg)
}
})
this.isVisibleRE = false
}
Cancel() {
this.isVisibleRE = false
}
handleCancel2() {
const paramsa = {
id: this.channelId
}
this.service.request(this.service.$api_get_canelComplaint, paramsa).subscribe((res: any) =>{
console.log(res)
if(res) {
this.service.msgSrv.success('已拒绝!')
this.isVisibleRE = false
this.getDetail(this.id);
} else{
this.service.msgSrv.error(res?.msg)
}
})
this.isVisibleRE = false
}
/**
* 审核通过按钮
*/
handleOK() {
const paramsa = {
...this.sfView.value,
handleStatus: 1,
id: this.channelId
}
this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{
console.log(res)
if(res) {
this.service.msgSrv.success('已通过!')
this.isVisibleRE = false
this.getDetail(this.id);
} else{
this.service.msgSrv.error(res?.msg)
}
})
}
viewEvaluate() {
this.isVisibleRE = true
this.channelId = this.id;
}
}