车辆对接

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;
}
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2022-01-10 13:40:12
* @LastEditTime: 2022-01-12 10:50:31
* @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\supply-management\components\vehicle\vehicle.component.html
@ -39,7 +39,7 @@
<nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" >
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name + ' (' + tab.count + ') '" (nzClick)="tabChange(i)">
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name" (nzClick)="tabChange(i)">
</nz-tab>
</nz-tabset>
<div style="margin-top: 15px;">
@ -58,38 +58,6 @@
<ng-template st-row="complaintCode" let-item let-index="index">
<a [routerLink]="'/order-management/complaint-detail/'+item.id">{{item.complaintCode}}</a>
</ng-template>
<ng-template st-row="complainant" let-item let-index="index">
<div>
{{item?.complainant?.name}}
</div>
</ng-template>
<ng-template st-row="complainant" let-item let-index="index">
<div>
{{item?.complainant?.name}}
</div>
</ng-template>
<!-- <ng-template st-row="externalSn" let-item let-index="index">
<span class="mr-xs">{{111111}}</span>
<a (click)="editEnternalSn(item)">编辑</a>
</ng-template> -->
<ng-template st-row="enStatusStr27878" let-item let-index="index">
<div class="mr-xs" nzPopoverTitle="Title" nz-popover [nzPopoverContent]="contentTemplate">{{item.no}}</div>
</ng-template>
<ng-template st-row="feiong" let-item let-index="index">
<div style="color: aqua;" >
{{item.no}}
</div>
</ng-template>
<ng-template #contentTemplate>
<div>
<p>预付¥200.00</p>
<p>到付¥200.00</p>
<p>油卡¥200.00</p>
<p>回单付¥200.00</p>
<p>小计¥200.00</p>
<p>附加费¥200.00</p>
</div>
</ng-template>
</st>
</div>
</nz-card>

View File

@ -22,6 +22,7 @@ export class OrderManagementComplaintComponent implements OnInit {
isVisibleRE = false;
_$expand = false;
channelId: any;
resourceStatus: any;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
@ -42,23 +43,19 @@ export class OrderManagementComplaintComponent implements OnInit {
];
tabs = [ {
name: '全部',
type: 5,
count: 0,
type: 0,
},
{
name: '待处理',
type: 5,
count: 0,
type: 1,
},
{
name: '已处理',
type: 5,
count: 0,
type: 2,
},
{
name: '已撤销',
type: 5,
count: 0,
type: 3,
}
];
constructor(
@ -71,7 +68,12 @@ export class OrderManagementComplaintComponent implements OnInit {
* 查询参数
*/
get reqParams() {
const a:any = {};
if(this.resourceStatus) {
a.complaintStatus = this.resourceStatus
}
return {
...a,
...this.sf?.value,
};
}
@ -162,7 +164,7 @@ export class OrderManagementComplaintComponent implements OnInit {
title: '投诉人',
className: 'text-center',
width: '120px',
render: 'complainant'
index: 'complainantName'
},
{
title: '操作',
@ -173,6 +175,7 @@ export class OrderManagementComplaintComponent implements OnInit {
{
text: '处理',
click: (_record) => this.viewEvaluate(_record),
iif: (item) => item.complaintStatus == 1
},
{
text: '查看',
@ -241,6 +244,11 @@ export class OrderManagementComplaintComponent implements OnInit {
selectChange(e: number) {
console.log(e);
this.resourceStatus = e;
this.initST();
setTimeout(() => {
this.st.load();
}, 500);
}
/**
* 导入货源
@ -269,6 +277,7 @@ export class OrderManagementComplaintComponent implements OnInit {
if(res) {
this.service.msgSrv.success('已拒绝!')
this.isVisibleRE = false
this.st.reload(1)
} else{
this.service.msgSrv.error(res?.msg)
}
@ -287,6 +296,7 @@ export class OrderManagementComplaintComponent implements OnInit {
if(res) {
this.service.msgSrv.success('已拒绝!')
this.isVisibleRE = false
this.st.reload(1)
} else{
this.service.msgSrv.error(res?.msg)
}
@ -307,6 +317,7 @@ export class OrderManagementComplaintComponent implements OnInit {
if(res) {
this.service.msgSrv.success('已通过!')
this.isVisibleRE = false
this.st.reload(1)
} else{
this.service.msgSrv.error(res?.msg)
}