车辆对接
This commit is contained in:
@ -258,13 +258,12 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: '结算依据',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'goodresource:settlement:type' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.getCatalogueMember(),
|
||||
},
|
||||
},
|
||||
appId4: {
|
||||
@ -286,7 +285,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'ServiceType' },
|
||||
params: { dictKey: 'service:type' },
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
|
||||
@ -1,3 +1,11 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-16 10:19:08
|
||||
* @LastEditTime: 2021-12-16 16:52:28
|
||||
* @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()">
|
||||
@ -7,26 +15,33 @@
|
||||
</page-header-wrapper>
|
||||
<nz-card nzTitle="运单信息">
|
||||
<sv-container labelWidth="150" col="2">
|
||||
<sv label="订单号">{{i?.billCode}}</sv>
|
||||
<sv label="申诉状态">{{i?.representationsStatus}}</sv>
|
||||
<sv label="承运司机">{{i?.driverName}} / {{i?.driverPhoneNumber}} / {{i?.carId}}</sv>
|
||||
<sv label="收款人"> {{i?.payeeName}} / {{i?.payeePhoneNumber}} </sv>
|
||||
<sv label="装货时间">{{i?.loadTime}}</sv>
|
||||
<sv label="卸货时间">{{i?.unloadTime}}</sv>
|
||||
<sv label="装货地">{{i?.loadingPlace}}</sv>
|
||||
<sv label="卸货地">{{i?.dischargePlace}}</sv>
|
||||
<sv label="订单号">{{datailList?.billCode}}</sv>
|
||||
<sv label="申诉状态">
|
||||
<span *ngIf="datailList?.representationsStatus == 1">待申述</span>
|
||||
<span *ngIf="datailList?.representationsStatus == 2">申述中</span>
|
||||
<span *ngIf="datailList?.representationsStatus == 2">申述成功</span>
|
||||
<span *ngIf="datailList?.representationsStatus == 4">申诉失败</span>
|
||||
</sv>
|
||||
<sv label="承运司机">{{datailList?.driverName}} / {{datailList?.driverPhoneNumber}} / {{i?.carId}}</sv>
|
||||
<sv label="收款人"> {{datailList?.payeeName}} / {{datailList?.payeePhoneNumber}} </sv>
|
||||
<sv label="装货时间">{{datailList?.loadTime}}</sv>
|
||||
<sv label="卸货时间">{{datailList?.unloadTime}}</sv>
|
||||
<sv label="装货地">{{datailList?.loadingPlace}}</sv>
|
||||
<sv label="卸货地">{{datailList?.dischargePlace}}</sv>
|
||||
<sv label="异常原因" col="1">
|
||||
<div class="bg-grey-lighter p-sm">
|
||||
<div *ngFor="let item of abnormalReason">{{item}}</div>
|
||||
{{datailList?.abnormalCause}}
|
||||
<!-- <div *ngFor="let item of abnormalReason">{{item}}</div> -->
|
||||
</div>
|
||||
</sv>
|
||||
</sv-container>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="申诉信息" [nzExtra]="extraTemplate">
|
||||
<ng-template #extraTemplate>
|
||||
<!-- [nzExtra]="extraTemplate" -->
|
||||
<nz-card nzTitle="申诉信息" >
|
||||
<!-- <ng-template #extraTemplate>
|
||||
<button nzType="primary" (click)="edit(i)" nzGhost nz-button>编辑</button>
|
||||
</ng-template>
|
||||
<sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'" *ngIf="schema" [formData]="i">
|
||||
</ng-template> -->
|
||||
<sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'" *ngIf="schema" [formData]="datailList">
|
||||
<ng-template sf-template="enterpriseQualificationCe" let-schema="schema" let-me let-ui="ui">
|
||||
<app-imagelist [imgList]="me.value"></app-imagelist>
|
||||
</ng-template>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
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';
|
||||
@ -16,28 +16,32 @@ export class OrderManagementRiskDetailComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
ui: SFUISchema = {};
|
||||
schema: SFSchema = {};
|
||||
abnormalReason = [
|
||||
'司机装货轨迹异常',
|
||||
'司机卸货轨迹异常',
|
||||
'车辆装货轨迹异常',
|
||||
'司机位置未移动,或运输途中未打开APP',
|
||||
'运单轨迹严重异常'
|
||||
]
|
||||
// abnormalReason = [
|
||||
// '司机装货轨迹异常',
|
||||
// '司机卸货轨迹异常',
|
||||
// '车辆装货轨迹异常',
|
||||
// '司机位置未移动,或运输途中未打开APP',
|
||||
// '运单轨迹严重异常'
|
||||
// ]
|
||||
i: any;
|
||||
datailList: any;
|
||||
id: string = '';
|
||||
constructor(private modal: NzModalService, public service: SupplyManagementService, public ar: ActivatedRoute) {
|
||||
this.id = this.ar.snapshot.queryParams.id;
|
||||
this.id = this.ar.snapshot.params.id;
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
if (this.id) this.getDetail(this.id);
|
||||
|
||||
if (this.id)
|
||||
{
|
||||
this.getDetail(this.id);
|
||||
this.initSF();
|
||||
}
|
||||
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
enterpriseType: {
|
||||
representationsCause: {
|
||||
title: '申诉原因',
|
||||
type: 'string',
|
||||
maxLength: 30,
|
||||
@ -46,7 +50,7 @@ export class OrderManagementRiskDetailComponent implements OnInit {
|
||||
change: (value, orgData) => console.log(value, orgData),
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
enterpriseTyp: {
|
||||
representationsDescribe: {
|
||||
title: '申诉描述',
|
||||
type: 'string',
|
||||
ui: {
|
||||
@ -93,11 +97,11 @@ export class OrderManagementRiskDetailComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
getDetail(id: string) {
|
||||
// this.service.request(this.service.$api_get_risk_order_detail, { id }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.i = res;
|
||||
// }
|
||||
// })
|
||||
this.service.request(this.service.$api_get_getRiskDetail, { id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.datailList = res;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
edit(item: any): void {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 11:10:14
|
||||
* @LastEditTime: 2021-12-16 10:36:33
|
||||
* @LastEditTime: 2021-12-16 17:22: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
|
||||
@ -38,7 +38,7 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" >
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name + ' (' + tab.count + ') '" (nzClick)="tabChange(i)">
|
||||
</nz-tab>
|
||||
</nz-tabset>
|
||||
@ -58,6 +58,11 @@
|
||||
<ng-template st-row="billCode" let-item let-index="index">
|
||||
<a [routerLink]="'/order-management/risk-detail/'+item.id">{{item?.billCode}}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="timeer" let-item let-index="index">
|
||||
<p>创建时间:{{item?.createTime}}</p>
|
||||
<p>装货时间:{{item?.loadTime}}</p>
|
||||
<p>卸货时间:{{item?.unloadTime}}</p>
|
||||
</ng-template>
|
||||
<ng-template st-row="billExpenseDetailVOList" let-item let-index="index">
|
||||
<div *ngFor="let i of item?.billExpenseDetailVOList">
|
||||
<p>{{i?.costName}}:¥{{i?.price}}</p>
|
||||
@ -74,15 +79,23 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-modal [(nzVisible)]="isVisibleRE" [nzWidth]="600" [nzFooter]="nzModalFooterview2" (nzOnOk)="handleOK()" nzTitle="审核" (nzOnCancel)="handleCancel('1')">
|
||||
<nz-modal [(nzVisible)]="isVisibleRE" [nzWidth]="600" [nzFooter]="nzModalFooterview2" (nzOnOk)="handleOK()" nzTitle="审核" (nzOnCancel)="handleCancel()">
|
||||
<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="default" (click)="reject()">拒绝</button>
|
||||
<button nz-button nzType="primary" (click)="handleOK()">通过</button>
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
|
||||
<ng-template #extraTemplate>
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="audit()">
|
||||
批量审核
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
import { Router } from '@angular/router';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { SupplyManagementService } from '../../services/order-management.service';
|
||||
|
||||
@ -19,6 +21,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
schema: SFSchema = {};
|
||||
schemaView: SFSchema = {};
|
||||
auditMany = false;
|
||||
auditId : any;
|
||||
isVisibleRE = false;
|
||||
_$expand = false;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ -65,7 +68,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
count: 0,
|
||||
},
|
||||
];
|
||||
constructor(public service: SupplyManagementService, public service2: ShipperBaseService, private modal: NzModalService) { }
|
||||
constructor(public service: SupplyManagementService, public service2: ShipperBaseService, private modal: NzModalService, public router: Router) { }
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -81,7 +84,6 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
this.initSTAudit();
|
||||
}
|
||||
|
||||
|
||||
@ -123,14 +125,38 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
},
|
||||
}
|
||||
},
|
||||
driverName: {
|
||||
type: 'string',
|
||||
// driverName: {
|
||||
// type: 'string',
|
||||
// title: '承运司机',
|
||||
// ui: {
|
||||
// visibleIf: {
|
||||
// _$expand: (value: boolean) => value,
|
||||
// },
|
||||
// }
|
||||
// },
|
||||
driverId: {
|
||||
title: '承运司机',
|
||||
type: 'string',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
widget: 'select',
|
||||
serverSearch: true,
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
return this.service
|
||||
.request(this.service.$api_get_getDriverInfo, { keyword: q,
|
||||
model: 1, type: 1 })
|
||||
.pipe(map((res) => (res as any[]).map((i) => ({ label: i.name, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
return of([]);
|
||||
}
|
||||
},
|
||||
}
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
no9: {
|
||||
type: 'string',
|
||||
@ -150,12 +176,12 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
},
|
||||
}
|
||||
},
|
||||
freightType: {
|
||||
wayBillType: {
|
||||
title: '运单类型',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'BulkFreightUnitPriceType' },
|
||||
params: { dictKey: 'goodresourceType' },
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
@ -208,6 +234,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' },
|
||||
{
|
||||
title: '申诉状态',
|
||||
width: '100px',
|
||||
@ -238,7 +265,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
title: '服务类型',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'serviceType',
|
||||
index: 'serviceTypeLabel',
|
||||
}, {
|
||||
title: '装货地',
|
||||
className: 'text-center',
|
||||
@ -286,7 +313,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
buttons: [
|
||||
{
|
||||
text: '审核',
|
||||
click: (_record) => this.viewEvaluate(_record),
|
||||
click: (_record) => this.audit(_record),
|
||||
},
|
||||
{
|
||||
text: '详情',
|
||||
@ -296,21 +323,55 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
},
|
||||
];
|
||||
}
|
||||
initSTAudit() {
|
||||
this.schemaView = {
|
||||
properties: {
|
||||
roleDescription: {
|
||||
title: '备注',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
placeholder: '通过可以不用填写原因 ,拒绝必须说明原因',
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 }
|
||||
initSTAudit(value: number) {
|
||||
if(value == 1) {
|
||||
this.schemaView = {
|
||||
properties: {
|
||||
billCode: {
|
||||
title: '订单号',
|
||||
type: 'string',
|
||||
default: this.auditId,
|
||||
ui: {
|
||||
widget: 'text',
|
||||
},
|
||||
},
|
||||
representationsCause: {
|
||||
title: '备注',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
placeholder: '通过可以不用填写原因 ,拒绝必须说明原因',
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 }
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
} else {
|
||||
this.schemaView = {
|
||||
properties: {
|
||||
billCode: {
|
||||
title: '',
|
||||
type: 'string',
|
||||
default: `已选${this.selectedRows?.length}条订单`,
|
||||
ui: {
|
||||
widget: 'text',
|
||||
},
|
||||
},
|
||||
representationsCause: {
|
||||
title: '备注',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
placeholder: '通过可以不用填写原因 ,拒绝必须说明原因',
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 }
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } };
|
||||
}
|
||||
/**
|
||||
@ -361,30 +422,71 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
importGoodsSource() {
|
||||
|
||||
}
|
||||
audit(item: any) {
|
||||
console.log(item)
|
||||
}
|
||||
|
||||
/*
|
||||
* 审核关闭弹窗
|
||||
view: 1
|
||||
浮动费用: 0
|
||||
查看评价: 3
|
||||
*/
|
||||
handleCancel(type: string) {
|
||||
console.log(type)
|
||||
handleCancel() {
|
||||
this.isVisibleRE = false
|
||||
}
|
||||
/**
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK() {
|
||||
|
||||
console.log(this.sfView.value)
|
||||
const parms = {
|
||||
id: this.sfView.value.billCode,
|
||||
representationsCause: this.sfView.value.representationsCause,
|
||||
}
|
||||
this.service.request(this.service.$api_get_catalogue_member, parms).subscribe((res) => {
|
||||
console.log(res)
|
||||
if(res) {
|
||||
this.service.msgSrv.success('审核通过!')
|
||||
this.isVisibleRE = false
|
||||
} else{
|
||||
this.service.msgSrv.error(res.msg)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 审核拒绝按钮
|
||||
*/
|
||||
reject() {
|
||||
console.log(this.sfView.value)
|
||||
const parms = {
|
||||
id: this.sfView.value.billCode,
|
||||
representationsCause: this.sfView.value.representationsCause,
|
||||
}
|
||||
this.service.request(this.service.$api_get_catalogue_member, parms).subscribe((res) => {
|
||||
console.log(res)
|
||||
if(res) {
|
||||
this.service.msgSrv.success('审核通过!')
|
||||
this.isVisibleRE = false
|
||||
} else{
|
||||
this.service.msgSrv.error(res.msg)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
*查看评价
|
||||
*审核
|
||||
*/
|
||||
audit(item?: any) {
|
||||
this.isVisibleRE = true
|
||||
if(item) {
|
||||
this.auditId = item.id;
|
||||
this.initSTAudit(1);
|
||||
} else {
|
||||
this.initSTAudit(2);
|
||||
}
|
||||
console.log(item)
|
||||
}
|
||||
/**
|
||||
*查看详情
|
||||
*/
|
||||
viewEvaluate(item: any) {
|
||||
this.isVisibleRE = true
|
||||
console.log(item)
|
||||
this.router.navigate(['/order-management/risk-detail', item.id])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user