车辆对接

This commit is contained in:
wangshiming
2022-01-12 09:48:10 +08:00
parent f52e7b2fc6
commit ba78e70eaf
6 changed files with 269 additions and 122 deletions

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-11-29 15:22:34
* @LastEditTime: 2021-12-16 13:34:20
* @LastEditTime: 2022-01-12 09:43:19
* @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
@ -47,7 +47,13 @@
<nz-card>
<!-- 数据列表 -->
<!-- [data]="service.$api_get_supplier_page" -->
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" >
<nz-tab [nzTitle]="'全部'"></nz-tab>
<nz-tab [nzTitle]="'待审核'"></nz-tab>
<nz-tab [nzTitle]="'未提交'"></nz-tab>
<nz-tab [nzTitle]="'审核通过'"></nz-tab>
<nz-tab [nzTitle]="'驳回'"></nz-tab>
</nz-tabset>
<st
#st
[bordered]="true"
@ -63,7 +69,7 @@
<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?.carModelLabel}}-{{item?.carLength? item?.carLength + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '' : ''}}</div>
<div >{{item?.isSelf ? '' : ''}}</div>
</ng-template>
<ng-template st-row="contactsPhone" let-item let-index="index">
<div

View File

@ -12,8 +12,7 @@ import { VehicleService } from '../../../vehicle/services/vehicle.service';
})
export class VehicleComponentsAuditComponent implements OnInit {
_$expand = false;
url = `/rule?_allow_anonymous=true`;
resourceStatus: any;
ui!: SFUISchema;
schema!: SFSchema;
columns!: STColumn[];
@ -32,16 +31,21 @@ export class VehicleComponentsAuditComponent implements OnInit {
* 查询参数
*/
get reqParams() {
const params: any = {
...(this.sf && this.sf.value),
};
if (this.sf?.value.effectiveDate) {
params.effectiveDateStart = this.sf?.value.effectiveDate[0];
params.effectiveDateEnd = this.sf?.value.effectiveDate[1];
const a:any = {};
console.log(this.resourceStatus)
if(this.resourceStatus === 1) {
a.approvalStatus = 10
} else if(this.resourceStatus === 2) {
a.approvalStatus = -1
} else if(this.resourceStatus === 3) {
a.approvalStatus = 20
} else if(this.resourceStatus === 4) {
a.approvalStatus = 30
}
delete params.effectiveDate;
delete params.expand;
return params;
return {
...a,
...this.sf?.value,
};
}
get selectedRows() {
@ -153,7 +157,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: 'carModelLabel' },
{ title: '车牌颜色', className: 'text-center', index: 'carNoColorLabel' },
{ title: '车型-车长-载重', className: 'text-center', render: 'carLength' },
{ title: '是否挂靠', className: 'text-center', render: 'isSelf' },
{ title: '所有人', className: 'text-center', index: 'carOwner' },
@ -166,13 +170,14 @@ export class VehicleComponentsAuditComponent implements OnInit {
badge: {
'-1': { text: '未上传', color: 'default' },
0: { text: '草稿', color: 'warning' },
15: { 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' },
{ title: '申请时间', className: 'text-center', index: 'createTime' },
{
title: '操作',
width: '170px',
@ -189,6 +194,16 @@ export class VehicleComponentsAuditComponent implements OnInit {
},
];
}
selectChange(e: number) {
console.log(e);
if(e>=1) {
this.resourceStatus = e;
}
this.initST();
setTimeout(() => {
this.st.load();
}, 500);
}
daoyun(item: any) {
this.router.navigate(['./view', item], { relativeTo: this.ar });
}