车辆对接

This commit is contained in:
wangshiming
2021-12-16 20:28:23 +08:00
parent 7150f45b31
commit 4350fecab1
23 changed files with 494 additions and 231 deletions

View File

@ -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,
},

View File

@ -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>

View File

@ -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 {

View File

@ -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>

View File

@ -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])
}
}

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-16 09:41:13
* @LastEditTime: 2021-12-16 16:54:25
* @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\services\order-management.service.ts
@ -26,7 +26,7 @@ export class SupplyManagementService extends BaseService {
$api_get_listRiskPage = `/api/sdc/billRiskOperate/listRiskPage`;
// 风险单详情查询
$api_get_getRiskDetail = `/api/sdc/billRiskOperate/getRiskDetail`;
// 风险单列表查询
// 风险单审核
$api_get_listRisk_audit = `/api/sdc/billRiskOperate/audit`;
constructor(public injector: Injector) {
super(injector)

View File

@ -80,7 +80,8 @@ export class SupplyManagementBulkComponent implements OnInit {
default: '',
ui: {
widget: 'dict-select',
params: { dictKey: 'ServiceType' },
containsAllLable: true,
params: { dictKey: 'service:type' },
visibleIf: {
_$expand: (value: boolean) => value,
},
@ -89,13 +90,10 @@ export class SupplyManagementBulkComponent implements OnInit {
settlementBasis: {
title: '结算依据',
type: 'string',
enum: [
{ label: '全部', value: '' },
{ label: '以收货为准', value: '1' },
{ label: '以发货为准', value: '2' },
],
ui: {
widget: 'select',
widget: 'dict-select',
containsAllLable: true,
params: { dictKey: 'goodresource:settlement:type' },
visibleIf: {
_$expand: (value: boolean) => value,
},
@ -180,8 +178,8 @@ export class SupplyManagementBulkComponent implements OnInit {
className: 'text-center',
render: 'resourceCode'
},
{ title: '服务类型', render: 'serviceType', width: '120px', className: 'text-center' },
{ title: '货主', index: 'shipperAppUserNmae', width: '120px', className: 'text-center' },
{ title: '服务类型', index: 'serviceTypeLabel', width: '120px', className: 'text-center' },
{ title: '货主', index: 'shipperAppUserName', width: '120px', className: 'text-center' },
{ title: '项目名称', index: 'enterpriseProjectName', width: '120px', className: 'text-center' },
{ title: '关联订单', render: 'orderSn', width: '120px', className: 'text-center' },
{ title: '货物信息', render: 'goodsInfos', width: '180px', className: 'text-center' },
@ -221,8 +219,8 @@ export class SupplyManagementBulkComponent implements OnInit {
type: 'badge',
width: '120px',
badge: {
1: { text: '待接单', color: 'success' },
2: { text: '已接单', color: 'warning' },
'1': { text: '待接单', color: 'success' },
'2': { text: '已接单', color: 'warning' },
},
},
{
@ -244,10 +242,10 @@ export class SupplyManagementBulkComponent implements OnInit {
type: 'badge',
width: '170px',
badge: {
1: { text: '待审核', color: 'warning' },
2: { text: '审核通过', color: 'success' },
3: { text: '不通过', color: 'default' },
4: { text: '已取消', color: 'default' },
'1': { text: '待审核', color: 'warning' },
'2': { text: '审核通过', color: 'success' },
'3': { text: '不通过', color: 'default' },
'4': { text: '已取消', color: 'default' },
},
},
{

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-13 14:52:49
* @LastEditTime: 2021-12-16 20:16:30
* @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
@ -83,7 +83,7 @@ size="small"
<span *ngIf="item?.serviceType === 2 || item?.serviceType === '2'">指派</span>
</ng-template>
<ng-template st-row="totalAmount" let-item let-index="index">
<div class="mr-xs" nzPopoverTitle="Title" nz-popover [nzPopoverContent]="contentTemplate">{{item.no}}</div>
<div class="mr-xs" nzPopoverTitle="Title" nz-popover [nzPopoverContent]="contentTemplate">{{item.totalAmount}}</div>
</ng-template>
<ng-template #contentTemplate>
<div>

View File

@ -76,10 +76,10 @@ export class SupplyManagementVehicleComponent implements OnInit {
serviceType: {
title: '服务类型',
type: 'string',
default: '',
ui: {
widget: 'dict-select',
params: { dictKey: 'ServiceType' },
containsAllLable: true,
params: { dictKey: 'service:type' },
} as SFSelectWidgetSchema,
},
goodsName: {
@ -88,7 +88,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'GoodsName' },
// params: { dictKey: 'GoodsName' },
placeholder: '请选择',
} as SFSelectWidgetSchema,
},
@ -124,7 +124,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
type: 'string',
ui: {
widget: 'dict-select',
params: { dictKey: 'GoodsResourceAuditStatus' },
params: { dictKey: 'goodresource:audit:status' },
visibleIf: {
_$expand: (value: boolean) => value,
},
@ -176,7 +176,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
className: 'text-center',
render: 'resourceCode'
},
{ title: '服务类型', index: 'serviceType', width: '120px', className: 'text-center',render: 'serviceType'},
{ title: '服务类型', index: 'serviceTypeLabel', width: '120px', className: 'text-center',render: 'serviceType'},
{ title: '货主', index: 'shipperAppUserName', width: '120px', className: 'text-center' },
{
title: '项目名称',
@ -241,7 +241,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
{
title: '创建时间',
width: '170px',
index: 'releaseTime',
index: 'createTime',
className: 'text-center',
},
{
@ -251,10 +251,10 @@ export class SupplyManagementVehicleComponent implements OnInit {
type: 'badge',
width: '170px',
badge: {
1: { text: '待审核', color: 'warning' },
2: { text: '审核通过', color: 'success' },
3: { text: '不通过', color: 'default' },
4: { text: '已取消', color: 'default' },
'1': { text: '待审核', color: 'warning' },
'2': { text: '审核通过', color: 'success' },
'3': { text: '不通过', color: 'default' },
'4': { text: '已取消', color: 'default' },
},
},
{

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-11-29 15:22:34
* @LastEditTime: 2021-12-13 10:02:18
* @LastEditTime: 2021-12-16 13:34:20
* @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\usercenter\components\freight\list\list.component.html
@ -60,10 +60,10 @@
[loading]="service.http.loading"
>
<ng-template st-row="carLength" let-item let-index="index">
<div>{{item?.carModel}}-{{item?.carLength? item?.carLength + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '吨' : ''}}</div>
<div>{{item?.carModelLabel}}-{{item?.carLength? item?.carLength + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '吨' : ''}}</div>
</ng-template>
<ng-template st-row="isSelf" let-item let-index="index">
<div>{{item?.carModel}}-{{item?.carLength? item?.carLength + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '吨' : ''}}</div>
<div>{{item?.carModelLabel}}-{{item?.carLength? item?.carLength + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '吨' : ''}}</div>
</ng-template>
<ng-template st-row="contactsPhone" let-item let-index="index">
<div

View File

@ -130,7 +130,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
this.columns = [
// { title: '', type: 'checkbox', className: 'text-center' },
{ title: '车牌号', className: 'text-center', index: 'carNo' },
{ title: '车牌颜色', className: 'text-center', index: 'carNoColor' },
{ title: '车牌颜色', className: 'text-center', index: 'carModelLabel' },
{ title: '车型-车长-载重', className: 'text-center', render: 'carLength' },
{ title: '是否挂靠', className: 'text-center', render: 'isSelf' },
{ title: '所有人', className: 'text-center', index: 'carOwner' },
@ -138,18 +138,15 @@ export class VehicleComponentsAuditComponent implements OnInit {
{
title: '审核状态',
className: 'text-center',
index: 'enStatusStr2',
index: 'approvalStatus',
type: 'badge',
badge: {
10: { text: '待审核', color: 'default' },
20: { text: '审核通过', color: 'success' },
30: { text: '驳回', color: 'warning' },
// { label: '未提交', value: '-1' },
// { label: '草稿', value: 0},
// { label: '待审核', value: 10 },
// { label: '审核通过', value: 20 },
// { label: '驳回', value: 30 },
// { label: '证件过期', value: 40 },
'-1': { text: '未上传', color: 'default' },
0: { text: '草稿', color: 'warning' },
10: { text: '待审核', color: 'warning' },
20: { text: '已审核', color: 'success' },
30: { text: '已驳回', color: 'error' },
40: { text: '证件过期', color: 'error' },
},
},
{ title: '申请时间', className: 'text-center', render: 'isSelf' },
@ -161,7 +158,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
{
text: '查看',
click: (item) => {
this.router.navigate(['./detail', item.id], { relativeTo: this.ar });
this.router.navigate(['./detail', item.id], { relativeTo: this.ar,queryParams: { carId: item.carId } });
// this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } });
},
},
@ -170,7 +167,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
];
}
daoyun(item: any) {
this.router.navigate(['./view', item.id], { relativeTo: this.ar });
this.router.navigate(['./view', item], { relativeTo: this.ar });
}
expandToggle() {
this._$expand = !this._$expand;

View File

@ -8,9 +8,15 @@
<ng-template #content>
<sv-container col="3">
<h2>车牌号:{{detailData?.carNo}}</h2>
<sv-title style="font-weight: 700;">待审核
<div style="float: right;">
<ng-container *ngIf="!isEdit">
<sv-title style="font-weight: 700;">
<span *ngIf="detailData?.approvalStatus === 1 || detailData?.approvalStatus === '1'">未上传</span>
<span *ngIf="detailData?.approvalStatus === 0 || detailData?.approvalStatus === '0'">草稿</span>
<span *ngIf="detailData?.approvalStatus === 10 || detailData?.approvalStatus === '10'">待审核</span>
<span *ngIf="detailData?.approvalStatus === 20 || detailData?.approvalStatus === '20'">已审核</span>
<span *ngIf="detailData?.approvalStatus === 30 || detailData?.approvalStatus === '30'">已驳回</span>
<span *ngIf="detailData?.approvalStatus === 40 || detailData?.approvalStatus === '40'">证件过期</span>
<div style="float: right;" *ngIf="detailData?.approvalStatus === 10 || detailData?.approvalStatus === '10'">
<ng-container *ngIf="!isEdit ">
<button nz-button nzType="default" nzDanger (click)="approveDriver()">通过</button>
<button nz-button nzType="default" nzDanger (click)="rejectedDriver()">驳回</button>
<button nz-button nzType="default" nzDanger (click)="ratify()">修改</button>
@ -84,8 +90,8 @@
<sv-container col="1" class="mt-md">
<sv label="车头照">
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.carFrontPhoto,key:'carFrontPhoto'}">
</ng-container>
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.carFrontPhotoWatermark,key:'carFrontPhotoWatermark',hover: 'PhotoWatermark2'}">
</ng-container>
</sv>
</sv-container>
<nz-divider></nz-divider>
@ -150,10 +156,12 @@
</sv-container>
<sv-container col="1">
<sv label="行驶证照片">
<!-- <app-imagelist [imgList]="[detailData?.certificatePhotoFront,detailData?.certificatePhotoBack,detailData?.certificatePhotoFrontWatermark,detailData?.certificatePhotoBackWatermark]"></app-imagelist> -->
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFront,key:'certificatePhotoFront'}">
</ng-container>
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFrontWatermark,key:'certificatePhotoFrontWatermark',hover: 'FrontWatermark'}">
</ng-container>
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoBackWatermark,key:'certificatePhotoBackWatermark',hover: 'BackWatermark'}">
</ng-container>
</sv>
</sv-container>
<nz-divider></nz-divider>
@ -180,9 +188,8 @@
[nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''"></nz-date-picker>
</sv>
<sv label="道路运输证照片">
<!-- <app-imagelist [imgList]="[detailData?.roadTransportPhoto,detailData?.roadTransportPhotoWatermark ]"></app-imagelist> -->
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.roadTransportPhoto,key:'roadTransportPhoto'}">
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.roadTransportPhotoWatermark,key:'roadTransportPhotoWatermark', hover: 'Watermark'}" >
</ng-container>
</sv>
</sv-container>
@ -194,11 +201,14 @@
[req]="{ method: 'POST', allInBody: true, params: reqParams }"
[res]="{ reName: { list: 'data', total: 'data' } }"
[ngStyle]="{ margin: '1rem 0' }" multiSort size="small" [page]="{ show: false }">
<ng-template st-row="isSelf" let-item let-index="index">
<div nz-tooltip [nzTooltipTitle]="item.enterpriseName">
<div>
{{ item?.isSelf ? '是' : '否' }}
</div>
<ng-template st-row="auditStatusEnum" let-item let-index="index">
<div>
<span *ngIf="item?.auditStatusEnum === -1 || item?.auditStatusEnum === '-1'">未上传</span>
<span *ngIf="item?.auditStatusEnum === 0 || item?.auditStatusEnum === '0'">草稿</span>
<span *ngIf="item?.auditStatusEnum === 10 || item?.auditStatusEnum === '10'">待审核</span>
<span *ngIf="item?.auditStatusEnum === 20 || item?.auditStatusEnum === '20'">已审核</span>
<span *ngIf="item?.auditStatusEnum === 30 || item?.auditStatusEnum === '30'">已驳回</span>
<span *ngIf="item?.auditStatusEnum === 40 || item?.auditStatusEnum === '40'">证件过期</span>
</div>
</ng-template>
</st>
@ -228,7 +238,7 @@
</ng-container>
<div *ngIf="image" (mouseover)="detailData[hover]=true" (mouseleave)="detailData[hover]=false"
(click)="$event.cancelBubble=true" class="image-hover">
<img [src]="image" style="width: 200px;height: 160px;" />
<img (click)="showImg(image)" [src]="image" style="width: 200px;height: 160px;" />
<div class="mask" *ngIf="detailData[hover] && isEdit"></div>
<div class="mask-over" *ngIf="detailData[hover] && isEdit">
<i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon" (click)="deleteImg(key)"></i>

View File

@ -12,6 +12,8 @@ import { VehicleService } from '../../../services/vehicle.service';
// import { VehicleComponentsListEditComponent } from '../edit/edit.component';
// import { VehicleImgViewComponent } from '../img-view/img-view.component';
import { EADateUtil } from '@shared';
import { VehicleImgViewComponent } from '../../list/img-view/img-view.component';
import { VehicleComponentsListEditComponent } from '../../list/edit/edit.component';
@Component({
selector: 'app-Vehicle-components-Audit-detail',
@ -31,20 +33,21 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
approvalOpinion = '';
uploadURl = apiConf.waterFileUpload;
disabledUpload = false;
constructor(public service: VehicleService, private route: ActivatedRoute, private nzModalService: NzModalService) {}
constructor(public service: VehicleService, private route: ActivatedRoute, private nzModalService: NzModalService, private modal: ModalHelper,) {}
ngOnInit() {
this.getSelectList();
console.log(this.route.snapshot.params)
this.getDetailList();
this.initST();
}
initST() {
this.columns = [
{ title: '认证司机', index: 'name', width: 300, className: 'text-center' },
{ title: '司机手机号', index: 'mobile', width: 300, className: 'text-center' },
{ title: '是否挂靠', render: 'isSelf', width: 300, className: 'text-center' },
{ title: '录入人员', index: 'totalPrice', width: 300, className: 'text-center' },
{ title: '司机姓名', index: 'name', className: 'text-center' },
{ title: '司机手机号', index: 'mobile', className: 'text-center' },
{ title: '身份证号', index: 'idCardNo', className: 'text-center' },
{ title: '挂靠协议', render: 'auditStatusEnum', className: 'text-center' },
{
title: '车主申明/挂靠协议',
fixed: 'right',
@ -52,20 +55,22 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
className: 'text-left',
buttons: [
{
text: '查看协议'
// click: _record => this.viewEvaluate(_record)
text: '查看协议',
click: (_record) => this.viewEvaluate(_record),
iif: item => item.auditStatusEnum == 10 || item.auditStatusEnum == 20,
},
{
text: '上传协议'
// click: _record => this.updateEvaluate(_record)
}
text: '上传协议',
click: (_record) => this.updateEvaluate(_record),
iif: item => item.auditStatusEnum == -1,
},
]
}
];
}
getDetailList() {
console.log(this.route.snapshot?.params?.id);
console.log(this.route.snapshot.queryParams.carId);
const params = {
id: this.route.snapshot?.params?.id
};
@ -78,11 +83,12 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
approveDriver() {
this.nzModalService.confirm({
nzTitle: '审核通过',
nzContent: `<p>车牌号:${this.detailData?.licenseNo}</p><p>是否确认通过审核`,
nzContent: `<p>车牌号:${this.detailData?.carNo}</p><p>是否确认通过审核`,
nzOnOk: () => {
this.adjuctUser(
{
auditStatus: 20
approvalStatus: 20,
id: this.route.snapshot?.params?.id,
},
'审核成功'
);
@ -101,7 +107,8 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
}
this.adjuctUser(
{
auditStatus: 30,
id: this.route.snapshot?.params?.id,
approvalStatus: 30,
approvalOpinion: this.approvalOpinion
},
'审核驳回成功'
@ -147,7 +154,7 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
* 查询参数
*/
get reqParams() {
return { id: this.route.snapshot?.params?.id };
return { id: this.route.snapshot.queryParams.carId };
}
showImg(url: any) {
const params = {
@ -171,7 +178,7 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
}
private adjuctUser(params: any, msg: string) {
this.service.request(this.service.$api_get_operate_get, { ...params }).subscribe(res => {
this.service.request(this.service.$api_get_operate_audit, { ...params }).subscribe(res => {
if (res) {
this.service.msgSrv.success(msg);
}
@ -225,4 +232,14 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
})
return value;
}
viewEvaluate(item: any) {
this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe(() => {
this.st.reload();
});
}
updateEvaluate(item: any) {
this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe(() => {
this.st.reload();
});
}
}

View File

@ -8,7 +8,7 @@
</ng-template>
<ng-template #content>
<sv-container col="1">
<sv-title style="font-weight: 700;">待审核
<sv-title style="font-weight: 700;">
<div style="float: right;">
<ng-container *ngIf="!isEdit">
<button nz-button nzType="default" nzDanger (click)="ratify()">修改</button>
@ -82,7 +82,7 @@
<sv label="车头照">
<!-- <app-imagelist [imgList]="[detailData?.carFrontPhotoWatermark, detailData?.carFrontPhotoWatermark]"></app-imagelist> -->
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.carFrontPhoto,key:'carFrontPhoto'}">
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.carFrontPhotoWatermark,key:'carFrontPhotoWatermark',hover: 'PhotoWatermark2'}">
</ng-container>
</sv>
</sv-container>
@ -152,9 +152,11 @@
</sv-container>
<sv-container col="1">
<sv label="行驶证照片">
<!-- <app-imagelist [imgList]="[detailData?.certificatePhotoFront,detailData?.certificatePhotoBack,detailData?.certificatePhotoFrontWatermark,detailData?.certificatePhotoBackWatermark]"></app-imagelist> -->
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFront,key:'certificatePhotoFront'}">
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFrontWatermark,key:'certificatePhotoFrontWatermark',hover: 'FrontWatermark'}">
</ng-container>
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoBackWatermark,key:'certificatePhotoBackWatermark',hover: 'BackWatermark'}">
</ng-container>
</sv>
</sv-container>
@ -184,7 +186,7 @@
<sv label="道路运输证照片">
<!-- <app-imagelist [imgList]="[detailData?.roadTransportPhoto,detailData?.roadTransportPhotoWatermark ]"></app-imagelist> -->
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.roadTransportPhoto,key:'roadTransportPhoto'}">
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.roadTransportPhotoWatermark,key:'roadTransportPhotoWatermark', hover: 'Watermark'}" >
</ng-container>
</sv>
</sv-container>
@ -204,11 +206,14 @@
size="small"
[page]="{ show: false }"
>
<ng-template st-row="isSelf" let-item let-index="index">
<div nz-tooltip [nzTooltipTitle]="item.enterpriseName">
<div>
{{ item?.isSelf ? '是' : '否' }}
</div>
<ng-template st-row="auditStatusEnum" let-item let-index="index">
<div>
<span *ngIf="item?.auditStatusEnum === -1 || item?.auditStatusEnum === '-1'">未上传</span>
<span *ngIf="item?.auditStatusEnum === 0 || item?.auditStatusEnum === '0'">草稿</span>
<span *ngIf="item?.auditStatusEnum === 10 || item?.auditStatusEnum === '10'">待审核</span>
<span *ngIf="item?.auditStatusEnum === 20 || item?.auditStatusEnum === '20'">已审核</span>
<span *ngIf="item?.auditStatusEnum === 30 || item?.auditStatusEnum === '30'">已驳回</span>
<span *ngIf="item?.auditStatusEnum === 40 || item?.auditStatusEnum === '40'">证件过期</span>
</div>
</ng-template>
</st>
@ -247,7 +252,7 @@
</ng-container>
<div *ngIf="image" (mouseover)="detailData[hover]=true" (mouseleave)="detailData[hover]=false"
(click)="$event.cancelBubble=true" class="image-hover">
<img [src]="image" style="width: 200px;height: 160px;" />
<img (click)="showImg(image)" [src]="image" style="width: 200px;height: 160px;" />
<div class="mask" *ngIf="detailData[hover] && isEdit"></div>
<div class="mask-over" *ngIf="detailData[hover] && isEdit">
<i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon" (click)="deleteImg(key)"></i>

View File

@ -19,7 +19,6 @@ import { EADateUtil } from '@shared';
})
export class VehicleComponentsListDetailComponent implements OnInit {
i: any;
url = `/rule?_allow_anonymous=true`;
@ViewChild('st', { static: false }) st!: STComponent;
isShow = false;
isVisible = false;
@ -89,10 +88,10 @@ export class VehicleComponentsListDetailComponent implements OnInit {
}
initST() {
this.columns =[
{ title: '认证司机', index: 'name', width: 300, className: 'text-center' },
{ title: '司机姓名', index: 'name', width: 300, className: 'text-center' },
{ title: '司机手机号', index: 'mobile', width: 300, className: 'text-center' },
{ title: '是否挂靠', render: 'isSelf', width: 300, className: 'text-center' },
{ title: '录入人员', index: 'totalPrice', width: 300, className: 'text-center' },
{ title: '挂靠协议', render: 'auditStatusEnum', className: 'text-center' },
{ title: '录入人员', index: 'saveUser', className: 'text-center' },
{
title: '车主申明/挂靠协议',
fixed: 'right',
@ -102,10 +101,12 @@ export class VehicleComponentsListDetailComponent implements OnInit {
{
text: '查看协议',
click: (_record) => this.viewEvaluate(_record),
iif: item => item.auditStatusEnum == 10 || item.auditStatusEnum == 20,
},
{
text: '上传协议',
click: (_record) => this.updateEvaluate(_record),
iif: item => item.auditStatusEnum == -1,
},
],
},
@ -172,7 +173,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
})
return value;
}
// 获取录单员
//
getDetailList() {
console.log( this.route.snapshot?.params?.id)
const params = {
@ -198,7 +199,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
*/
viewEvaluate(item: any) {
this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe(() => {
// this.st.reload();
this.st.reload();
});
}
/**
@ -206,8 +207,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
*/
updateEvaluate(item: any) {
this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe(() => {
// this.st.reload();
// this.getInfo();
this.st.reload();
});
}
handleOK() {
@ -260,13 +260,15 @@ export class VehicleComponentsListDetailComponent implements OnInit {
this.detailData.roadTransportStartTime = EADateUtil.yearToDate(this.detailData?.roadTransportStartTime)
this.detailData.roadTransportEndTime = EADateUtil.yearToDate(this.detailData?.roadTransportEndTime)
// EADateUtil.timestampToDate('')
console.log(this.detailData)
this.service.request(this.service.$api_get_update, this.detailData).subscribe((res)=>{
console.log(res)
if(res) {
this.getDetailList()
}
})
}
// if(typeof(this.validateForm1.value.unloadingTime) !== 'string' ) {
// var c = new Date(this.validateForm1.value.unloadingTime);
// this.validateForm1.value.unloadingTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds())
// }
private initData() {
return {
carNo: '',

View File

@ -1,15 +1,14 @@
<!--
* @Author: your name
* @Date: 2021-12-07 17:20:23
* @LastEditTime: 2021-12-07 17:22:40
* @LastEditors: your name
* @LastEditTime: 2021-12-16 16:16:27
* @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\vehicle\components\list\edit\edit.component.html
-->
<div class="modal-header">
<div class="modal-title">{{ i.typeName }}</div>
</div>
<!-- <nz-spin *ngIf="!i" class="modal-spin"></nz-spin> -->
<div>
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'" [formData]="formData">
</sf>

View File

@ -1,9 +1,11 @@
import { Params } from '@angular/router';
import { Component, OnInit, ViewChild, Type } from '@angular/core';
import { SFComponent, SFSchema, SFUISchema, SFUploadWidgetSchema, SFTextareaWidgetSchema } from '@delon/form';
import { EAEnvironmentService, CaptchaComponent, EAUserService } from '@shared';
import { Observable, Observer } from 'rxjs';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { apiConf } from '@conf/api.conf';
import { VehicleService } from '../../../services/vehicle.service';
@Component({
selector: 'app-setting-components-info-edit',
@ -34,16 +36,16 @@ export class VehicleComponentsListEditComponent implements OnInit {
this.initSF();
}
initInfo() {
if (this.infoData.enterpriseLogo) {
if (this.infoData.carProtocal) {
this.formData = {
enterpriseLogo: [
carProtocal: [
{
uid: 'logo',
name: 'LOGO',
status: 'done',
url: this.infoData.enterpriseLogo,
url: this.infoData.carProtocal,
response: {
url: this.infoData.enterpriseLogo,
url: this.infoData.carProtocal,
},
},
],
@ -54,41 +56,25 @@ export class VehicleComponentsListEditComponent implements OnInit {
// 依据类型初始表单
this.schema = {
properties: {
enterpriseLogo: {
carProtocal: {
type: 'string',
title: 'Logo',
title: '车主申明/挂靠协议',
ui: {
widget: 'upload',
action: `/cms/upload/multipartFile/fileModel`,
// fileType: 'image/png,image/jpeg,image/gif,image/bmp',
action: apiConf.fileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'url',
urlReName: 'url',
descriptionI18n: '支持JPG、GIF、PNG、JPEG格式图片小于2M',
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
change: (args) => {
if (args.type === 'success') {
const avatar = [
{
uid: 'logo',
name: 'LOGO',
status: 'done',
url: args.fileList[0].response.url,
response: {
url: args.fileList[0].response.url,
},
},
];
this.sf?.setValue('/enterpriseLogo', avatar);
}
},
beforeUpload: (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 2;
const isLt1M = file.size / 1024 / 1024 < 5;
const fileType = 'image/png,image/jpeg';
if (fileType.indexOf(file.type) === -1) {
this.service.msgSrv.warning('图片格式不正确!');
@ -96,7 +82,7 @@ export class VehicleComponentsListEditComponent implements OnInit {
return;
}
if (!isLt1M) {
this.service.msgSrv.warning('图片大小超过2M!');
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
@ -110,7 +96,7 @@ export class VehicleComponentsListEditComponent implements OnInit {
} as SFUploadWidgetSchema,
},
},
required: ['enterpriseLogo'],
required: ['carProtocal'],
};
this.ui = {
'*': {
@ -124,6 +110,17 @@ export class VehicleComponentsListEditComponent implements OnInit {
this.modal.destroy();
}
sure() {
const params ={
carProtocal: this.sf.value.carProtocal?.data?.fullFilePath,
id: this.i.id
}
this.service.request(this.service.$api_get_upLoadCarProtocal, params).subscribe((res) => {
if(res) {
this.modal.destroy();
this.service.msgSrv.success('上传协议成功!')
} else {
this.service.msgSrv.error(res.msg)
}
})
}
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-07 17:30:18
* @LastEditTime: 2021-12-15 17:39:01
* @LastEditTime: 2021-12-16 15:19:12
* @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\vehicle\components\list\img-view\img-view.component.html
@ -18,13 +18,14 @@
<div class="modal-title">查看协议</div>
</div>
<div class="text-center">
{{this.i?.carProtocal}}
<div class="text-center"><img [src]="i?.carProtocal" /></div>
</div>
<div *nzModalFooter>
<button nz-button nzType="default" (click)="cancel">取消</button>
<button nz-button nzType="primary" (click)="cancel">确定</button>
<button nz-button nzType="default" >驳回</button>
<button nz-button nzType="primary" (click)="cancel">通过</button>
<button *ngIf="i?.auditStatusEnum == 20 || i?.auditStatusEnum == 30" nz-button nzType="default" (click)="cancel()">取消</button>
<button *ngIf="i?.auditStatusEnum == 20 || i?.auditStatusEnum == 30" nz-button nzType="primary" (click)="cancel()">确定</button>
<button *ngIf="i?.auditStatusEnum == 10" nz-button nzType="default" (click)="reject()">驳回</button>
<button *ngIf="i?.auditStatusEnum == 10" nz-button nzType="primary" (click)="okCancel()">通过</button>
</div>
<style>
.text-center img {

View File

@ -1,7 +1,16 @@
/*
* @Author: your name
* @Date: 2021-12-07 17:30:18
* @LastEditTime: 2021-12-16 15:31:13
* @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\vehicle\components\list\img-view\img-view.component.ts
*/
import { Component, OnInit } from '@angular/core';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { VehicleService } from '../../../services/vehicle.service';
@Component({
selector: 'app-setting-components-info-img-view',
@ -11,15 +20,43 @@ export class VehicleImgViewComponent implements OnInit {
record: any = {};
i: any;
constructor(private modal: NzModalRef, public msgSrv: NzMessageService, public http: _HttpClient) {}
constructor(private modal: NzModalRef, public msgSrv: NzMessageService, public http: _HttpClient, public service: VehicleService) {}
ngOnInit(): void {
console.log(this.i?.carProtocal, 66666666666);
// this.http.get(`/user/${this.record.id}`).subscribe(res => this.i = res);
console.log(this.i);
}
cancel() {
this.modal.destroy();
}
// 驳回
reject() {
const params ={
approvalStatus: 30,
id: this.i.id
}
this.service.request(this.service.$api_get_auditCarProtocal_audit, params).subscribe((res) => {
if(res) {
this.modal.destroy();
this.service.msgSrv.success('已驳回')
} else {
this.service.msgSrv.error(res.msg)
}
})
}
// 通过
okCancel() {
const params ={
approvalStatus: 20,
id: this.i.id
}
this.service.request(this.service.$api_get_auditCarProtocal_audit, params).subscribe((res) => {
if(res) {
this.modal.destroy();
this.service.msgSrv.success('已通过')
} else {
this.service.msgSrv.error(res.msg)
}
})
}
}

View File

@ -218,7 +218,7 @@ export class VehicleComponentsListComponent implements OnInit {
{
text: '查看',
click: (item) => {
this.router.navigate(['./detail', item.id], { relativeTo: this.ar });
this.router.navigate(['./detail', item.id], { relativeTo: this.ar,queryParams: { carId: item.carId } });
// this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } });
},
},

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-11-29 15:22:34
* @LastEditTime: 2021-12-16 10:45:08
* @LastEditTime: 2021-12-16 15:57:25
* @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\usercenter\services\usercenter.service.ts
@ -30,6 +30,21 @@ export class VehicleService extends BaseService {
$api_get_queryDriverByCarId = `/api/mdc/cuc/carLicenseAudit/operate/queryDriverByCarId`;
// 详情需要的下拉框数据
$api_get_getDictValue = `/api/mdc/pbc/dictItems/getDictValue`;
// 审核司机车辆认证(审核列表)
$api_get_operate_audit = `/api/mdc/cuc/carLicenseAudit/operate/audit`;
// 审核司机挂靠协议(审核列表)
$api_get_auditCarProtocal_audit = `/api/mdc/cuc/carLicenseAudit/operate/auditCarProtocal`;
// 更新司机车辆审核信息(审核列表)
$api_get_update_audit = `/api/mdc/cuc/carLicenseAudit/operate/update`;
// 更新司机车辆审核信息
$api_get_update= `/api/mdc/cuc/carLicense/operate/update`;
// 上传司机挂靠协议
$api_get_upLoadCarProtocal= `/api/mdc/cuc/carLicenseAudit/operate/upLoadCarProtocal`;
constructor(public injector: Injector) {
super(injector);

View File

@ -1,8 +1,9 @@
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 { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { SupplyManagementService } from '../../services/waybill-management.service';
@ -13,7 +14,6 @@ import { SupplyManagementService } from '../../services/waybill-management.servi
styleUrls: ['./vehicle.component.less']
})
export class WaybillManagementVehicleComponent implements OnInit {
url = `/user?_allow_anonymous=true`;
ui: SFUISchema = {};
schema: SFSchema = {};
auditMany = false;
@ -118,7 +118,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
},
no1: {
type: 'string',
title: '托运公司'
title: '货主'
},
no3: {
type: 'string',
@ -156,14 +156,29 @@ export class WaybillManagementVehicleComponent implements OnInit {
},
}
},
no10: {
brandId2: {
title: '车队长',
type: 'string',
title: '收款人',
ui: {
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: 2 })
.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,
},
sex: {
title: '支付状态',
@ -207,6 +222,33 @@ export class WaybillManagementVehicleComponent implements OnInit {
asyncData: () => this.getCatalogueMember(),
},
},
appId2: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.getCatalogueMember(),
},
},
appId4: {
type: 'string',
title: '货物名称',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.getCatalogueMember(),
},
},
},
type: 'object',
};

View File

@ -1,3 +1,11 @@
/*
* @Author: your name
* @Date: 2021-12-07 14:52:29
* @LastEditTime: 2021-12-16 19:46:55
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\waybill-management\services\waybill-management.service.ts
*/
import { Injectable, Injector } from '@angular/core';
import { BaseService } from 'src/app/shared/services';
@ -8,6 +16,8 @@ export class SupplyManagementService extends BaseService {
$api_get_catalogue_member = `/user?_allow_anonymous=true`;
$api_del_driver = ``;
// 据 手机号/姓名 查询 车队长/司机
$api_get_getDriverInfo = `/api/mdc/cuc/user/getDriverInfo`;
constructor(public injector: Injector) {
super(injector)
}