This commit is contained in:
wangshiming
2021-12-13 10:43:03 +08:00
parent d13b27e76b
commit cc7f7c7649
23 changed files with 572 additions and 354 deletions

View File

@ -21,7 +21,13 @@
<nz-form-control [nzErrorTip]="'请输入装货地'"> <nz-form-control [nzErrorTip]="'请输入装货地'">
<div class="align-center"> <div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1"> <nz-input-group [nzSuffix]="endInconTemp1">
<input nz-input [(ngModel)]="data.detailedAddress" [ngModelOptions]="{ standalone: true }" /> <input
nz-input
[(ngModel)]="data.detailedAddress"
(click)="openMap('start', idx)"
formControlName="loadAddress{{ idx }}"
placeholder="请输入装货地"
/>
</nz-input-group> </nz-input-group>
<span style="padding: 0 10px" <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="openMap('start', idx)"></i ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="openMap('start', idx)"></i
@ -113,13 +119,42 @@
<sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf> <sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf>
<sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4"> <sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4">
<ng-template sf-template="weight" let-i let-ui="ui"> <ng-template sf-template="weight" let-i let-ui="ui">
<nz-input-group nzAddOnAfter="吨"> <nz-input-group [nzAddOnAfter]="''">
<input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" /> <input
nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总重量,必填"
/>
</nz-input-group> </nz-input-group>
</ng-template> </ng-template>
<ng-template sf-template="volume" let-i let-ui="ui"> <ng-template sf-template="volume" let-i let-ui="ui">
<nz-input-group nzAddOnAfter="方"> <nz-input-group [nzAddOnAfter]="''">
<input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" /> <input
nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总体积"
/>
</nz-input-group>
</ng-template>
<ng-template sf-template="number" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<input
nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总车次"
/>
</nz-input-group> </nz-input-group>
</ng-template> </ng-template>
</sf> </sf>

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms'; import { FormBuilder, FormGroup,Validators,FormControl } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { import {
SFComponent, SFComponent,
@ -248,10 +248,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
properties: { properties: {
weight: { weight: {
type: 'string', type: 'string',
title: '重量/体积', title: '货物数量',
ui: { ui: {
widget: 'custom', widget: 'custom',
placeholder: '请输入' placeholder: '请输入',
errors: { required: '必填项' }
} }
}, },
volume: { volume: {
@ -262,16 +263,27 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
placeholder: '请输入' placeholder: '请输入'
} }
}, },
vehicleDemand: { number: {
type: 'string', type: 'string',
title: '用车需求', title: '',
ui: {
widget: 'custom',
placeholder: '请输入'
}
},
maxWeight: {
type: 'string',
title: '车型/车长',
enum: [ enum: [
{ label: '1', value: '1' }, { label: '1', value: '1' },
{ label: '2', value: '2' } { label: '2', value: '2' }
], ],
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择车型' placeholder: '请选择车型',
mode: 'multiple',
errors: { required: '请选择车型' }
// asyncData: () => // asyncData: () =>
// this.categoryService.loadChildData2('0', '2').pipe( // this.categoryService.loadChildData2('0', '2').pipe(
// map((data: any) => { // map((data: any) => {
@ -292,7 +304,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
], ],
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择车长' placeholder: '请选择车长',
mode: 'multiple',
errors: { required: '请选择车长' }
// asyncData: () => // asyncData: () =>
// this.categoryService.loadChildData2('0', '2').pipe( // this.categoryService.loadChildData2('0', '2').pipe(
// map((data: any) => { // map((data: any) => {
@ -304,7 +318,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
// change: (i) => this.updateCategory(i, '/categoryId2'), // change: (i) => this.updateCategory(i, '/categoryId2'),
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
} }
} },
required: ['weight', 'maxWeight', 'maxCube']
}; };
this.ui4 = { this.ui4 = {
'*': { '*': {
@ -312,12 +327,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
grid: { span: 24 } grid: { span: 24 }
}, },
$weight: { $weight: {
grid: { span: 12 } grid: { span: 8 }
}, },
$volume: { $volume: {
grid: { span: 12 } grid: { span: 8 }
}, },
$vehicleDemand: { $number: {
grid: { span: 8 }
},
$maxWeight: {
grid: { span: 12 } grid: { span: 12 }
}, },
$maxCube: { $maxCube: {
@ -354,33 +372,97 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
type: 'string', type: 'string',
title: '是否回单', title: '是否回单',
enum: [ enum: [
{ label: '', value: '1' }, { label: '需要', value: true },
{ label: '', value: '2' } { label: '不需要', value: false }
], ],
ui: { ui: {
widget: 'select', widget: 'select',
errors: { required: '请选择' },
placeholder: '请选择' placeholder: '请选择'
// asyncData: () => }
// this.categoryService.loadChildData2('0', '2').pipe( },
// map((data: any) => { receiptType: {
// return data.map((m: any) => { type: 'string',
// return { label: m.name, value: m.id }; title: '回单类型',
// }); enum: [
// }), { label: '电子回单', value: 1 },
// ), { label: '纸质回单', value: 2 }
// change: (i) => this.updateCategory(i, '/categoryId2'), ],
} as SFSelectWidgetSchema ui: {
widget: 'select',
placeholder: '请选择',
errors: { required: '请选择' },
visibleIf: {
stateReceipt: value => value === true
}
}
},
receiptUserId: {
type: 'string',
title: '选择地址',
ui: {
widget: 'custom',
placeholder: '请点击选择收回单地址',
validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
visibleIf: {
receiptType: value => value === '2'
}
},
default: '1212'
},
name4: {
type: 'string',
title: '联系人',
ui: {
visibleIf: {
receiptType: value => value === '2'
}
},
readOnly: true
},
name5: {
type: 'string',
title: '联系电话',
ui: {
visibleIf: {
receiptType: value => value === '2'
}
},
readOnly: true
},
name6: {
type: 'string',
title: '所在地区',
ui: {
visibleIf: {
receiptType: value => value === '2'
}
},
readOnly: true
},
receiptAddress: {
type: 'string',
title: '详细地址',
maxLength: 20,
ui: {
visibleIf: {
receiptType: value => value === '2'
}
},
readOnly: true
}, },
remarks: { remarks: {
type: 'string', type: 'string',
title: '备注', title: '备注',
maxLength: 200,
ui: { ui: {
widget: 'textarea', widget: 'textarea',
placeholder: '请输入', placeholder: '请输入',
autosize: { minRows: 3, maxRows: 3 } autosize: { minRows: 3, maxRows: 3 }
} as SFTextareaWidgetSchema } as SFTextareaWidgetSchema
} }
} },
required: ['stateReceipt', 'receiptType']
}; };
this.ui6 = { this.ui6 = {
'*': { '*': {
@ -468,12 +550,23 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
addStartInfo(event: any) { addStartInfo(event: any) {
this.startInfo.push({ if (this.startInfo.length < 5) {
detailedAddress: '', const controlId = this.startInfo.length;
appUserName: '', this.startInfo.push({
contractTelephone: '', detailedAddress: '',
type: 1 appUserName: '',
}); contractTelephone: '',
latitude: '',
longitude: '',
province: '',
city: '',
area: '',
type: 1
});
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
}
} }
subStartInfo(event: any, index: number, id?:any) { subStartInfo(event: any, index: number, id?:any) {
console.log(event, index, id) console.log(event, index, id)
@ -709,14 +802,5 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
if(this.PageStatus === '整车修改' || this.PageStatus === '大宗修改') { if(this.PageStatus === '整车修改' || this.PageStatus === '大宗修改') {
} }
// console.log(this.sf1.value)
// console.log(this.startInfo)
// console.log(this.endInfo)
// console.log(this.validateForm1.value)
// console.log(this.sf3.value)
// console.log(this.sf4.value)
// console.log(this.sf5.value)
// console.log(this.sf6.value)
} }
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-11-29 15:22:34 * @Date: 2021-11-29 15:22:34
* @LastEditTime: 2021-12-01 20:58:57 * @LastEditTime: 2021-12-13 10:02:18
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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 * @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\list.component.html
@ -52,21 +52,18 @@
#st #st
[bordered]="true" [bordered]="true"
[columns]="columns" [columns]="columns"
[data]='datalist' [data]='service.$api_get_userCarLicense_list'
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }" [res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loadingDelay]="500" [loadingDelay]="500"
[loading]="service.http.loading" [loading]="service.http.loading"
> >
<ng-template st-row="enterpriseName" let-item let-index="index"> <ng-template st-row="carLength" let-item let-index="index">
<div nz-tooltip [nzTooltipTitle]="item.enterpriseName"> <div>{{item?.carModel}}-{{item?.carLength? item?.carLength + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '吨' : ''}}</div>
<div </ng-template>
style="display: inline-block; max-width: 280px; margin: 0 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis" <ng-template st-row="isSelf" let-item let-index="index">
> <div>{{item?.carModel}}-{{item?.carLength? item?.carLength + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '吨' : ''}}</div>
{{ item.enterpriseName }}
</div>
</div>
</ng-template> </ng-template>
<ng-template st-row="contactsPhone" let-item let-index="index"> <ng-template st-row="contactsPhone" let-item let-index="index">
<div <div

View File

@ -5,44 +5,16 @@ import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { VehicleService } from '../../../vehicle/services/vehicle.service'; import { VehicleService } from '../../../vehicle/services/vehicle.service';
@Component({ @Component({
selector: 'app-Freight-components-list', selector: 'app-Vehicle-components-audit',
templateUrl: './audit.component.html', templateUrl: './audit.component.html',
}) })
export class VehicleComponentsListComponent implements OnInit { export class VehicleComponentsAuditComponent implements OnInit {
_$expand = false; _$expand = false;
url = `/rule?_allow_anonymous=true`; url = `/rule?_allow_anonymous=true`;
ui!: SFUISchema; ui!: SFUISchema;
schema!: SFSchema; schema!: SFSchema;
columns!: STColumn[]; columns!: STColumn[];
datalist = [
{
storeName: '企业名称',
contactsName: '152746565',
enterpriseName: '湖南',
unifiedSocialCreditCode: '45454',
contactsPhone: '*97889461561',
effectiveDateStr: '废弃eww',
enStatusStr2: '正常',
enStatusStr3: '正常',
unifiedSocialCreditCode3: '常用服务',
unifiedSocialCreditCode2: '正常',
tenantId: 1
},
{
storeName: '企业名称',
contactsName: '152746565',
enterpriseName: '湖南',
unifiedSocialCreditCode: '45454',
contactsPhone: '*97889461561',
effectiveDateStr: '废弃eww',
enStatusStr2: '正常',
enStatusStr3: '正常',
unifiedSocialCreditCode3: '常用服务',
unifiedSocialCreditCode2: '正常',
tenantId: 2
},
]
@ViewChild('st', { static: false }) st!: STComponent; @ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
@ -96,32 +68,34 @@ export class VehicleComponentsListComponent implements OnInit {
hidden: true, hidden: true,
}, },
}, },
storeName: { title: '车牌号', type: 'string', ui: { showRequired: false } }, carNo: { title: '车牌号', type: 'string', ui: { showRequired: false } },
contactsName: { carNoColor: {
title: '车型车长载重',
type: 'string', type: 'string',
ui: { title: '车牌颜色',
showRequired: false,
},
},
enStatus: {
type: 'string',
title: '运营状态',
enum: [ enum: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '正常', value: 0 }, { label: '正常', value: 0 },
{ label: '冻结', value: 1 }, { label: '冻结', value: 1 },
{ label: '废弃', value: 2 }, { label: '废弃', value: 2 },
], ],
default: '',
ui: { ui: {
widget: 'select', widget: 'select',
}, },
}, },
enStatus12: { isSelf: {
type: 'string', type: 'string',
title: '车牌颜色', title: '是否挂靠',
enum: [
{ label: '否', value: 0 },
{ label: '是', value: 1 },
],
ui: {
widget: 'select',
},
},
saveUser: {
type: 'string',
title: '录入人员',
enum: [ enum: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '正常', value: 0 }, { label: '正常', value: 0 },
@ -136,14 +110,16 @@ export class VehicleComponentsListComponent implements OnInit {
}, },
}, },
}, },
enStatus2: { approvalStatus: {
type: 'string', type: 'string',
title: '到期状态', title: '审核状态',
enum: [ enum: [
{ label: '全部', value: '' }, { label: '未提交', value: '-1' },
{ label: '正常', value: 0 }, { label: '草稿', value: 0},
{ label: '冻结', value: 1 }, { label: '待审核', value: 10 },
{ label: '废弃', value: 2 }, { label: '审核通过', value: 20 },
{ label: '驳回', value: 30 },
{ label: '证件过期', value: 40 },
], ],
default: '', default: '',
ui: { ui: {
@ -161,40 +137,30 @@ export class VehicleComponentsListComponent implements OnInit {
initST() { initST() {
this.columns = [ this.columns = [
// { title: '', type: 'checkbox', className: 'text-center' }, // { title: '', type: 'checkbox', className: 'text-center' },
{ title: '车牌号', className: 'text-center', index: 'storeName' }, { title: '车牌号', className: 'text-center', index: 'carNo' },
{ title: '车牌颜色', className: 'text-center', index: 'contactsName' }, { title: '车牌颜色', className: 'text-center', index: 'carNoColor' },
{ title: '车型-车长-载重', className: 'text-center', render: 'enterpriseName' }, { title: '车型-车长-载重', className: 'text-center', render: 'carLength' },
{ title: '承运总单量', className: 'text-center', index: 'unifiedSocialCreditCode' }, { title: '是否挂靠', className: 'text-center', render: 'isSelf' },
{ title: '运营状态', className: 'text-center', index: 'effectiveDateStr', { title: '所有人', className: 'text-center', index: 'carOwner' },
type: 'badge', { title: '录入人员', className: 'text-center', index: 'saveUser', },
badge: {
: { text: '空闲', color: 'success' },
: { text: '运输中', color: 'warning' },
: { text: '废弃', color: 'default' },
},
},
{ {
title: '行驶证到期状态', title: '审核状态',
className: 'text-center', className: 'text-center',
index: 'enStatusStr2', index: 'enStatusStr2',
type: 'badge', type: 'badge',
badge: { badge: {
: { text: '正常', color: 'success' }, 10: { text: '待审核', color: 'default' },
: { text: '冻结', color: 'warning' }, 20: { text: '审核通过', color: 'success' },
: { text: '废弃', color: 'default' }, 30: { text: '驳回', color: 'warning' },
}, // { label: '未提交', value: '-1' },
}, // { label: '草稿', value: 0},
{ // { label: '待审核', value: 10 },
title: '道运证到期状态', // { label: '审核通过', value: 20 },
className: 'text-center', // { label: '驳回', value: 30 },
index: 'enStatusStr3', // { label: '证件过期', value: 40 },
type: 'badge',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
}, },
}, },
{ title: '申请时间', className: 'text-center', render: 'isSelf' },
{ {
title: '操作', title: '操作',
width: '170px', width: '170px',

View File

@ -1,73 +1,81 @@
<ng-container > <ng-container >
<!-- 页头 --> <!-- 页头 -->
<page-header-wrapper [logo]="logo" [content]="content"> <page-header-wrapper [logo]="logo" title="车辆详情" [content]="content">
<ng-template #logo> <ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()"> <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i> <i nz-icon nzType="left" nzTheme="outline"></i>
</button> </button>
</ng-template> </ng-template>
<ng-template #content> <ng-template #content>
<div class="user-info"> <sv-container col="3">
<div style="flex: 1"> <sv-title style="font-weight: 700;">车辆基础信息</sv-title>
<div style="display: flex;"> <sv label="车牌号">
<p style="padding-right: 80px; width: 400px;">车牌号{{ detailData?.shoppFeignVO?.publicity }}</p> {{ detailData?.carNo }}
<p style="padding-right: 80px; width: 400px;">车牌颜色{{ detailData?.shoppFeignVO?.introduction }}</p> </sv>
<p >注册日期2021-09-02 12.53.32</p> <sv label="车牌颜色">
</div> {{ detailData?.carNoColor }}
<div style="display: flex;"> </sv>
<p style="padding-right: 80px; width: 400px;">车型{{ detailData?.shoppFeignVO?.introduction }}</p> <sv label="车型">
<p >车长2021-09-02 12.53.32</p> {{ detailData?.carModel }}
</div> </sv>
<sv label="车长">
{{ detailData?.carLength }}
</div> </sv>
</div> <sv label="是否为挂车">
{{ detailData?.isTrailer === true ? '是' : '否'}}
</sv>
</sv-container>
<sv-container col="1">
<sv label="车头照">
<app-imagelist [imgList]="[detailData?.carFrontPhotoWatermark, detailData?.carFrontPhotoWatermark]"></app-imagelist>
</sv>
</sv-container>
</ng-template> </ng-template>
</page-header-wrapper> </page-header-wrapper>
<nz-card> <nz-card>
<sv-container col="3"> <sv-container col="3">
<sv-title>行驶证信息</sv-title> <sv-title style="font-weight: 700;">行驶证信息</sv-title>
<sv label="档案编号"> <sv label="档案编号">
{{ detailData?.contactsName }} {{ detailData?.archivesNo }}
</sv> </sv>
<sv label="准驾车型"> <sv label="准驾车型">
{{ detailData?.contactsPhone }} {{ detailData?.carModel }}
</sv> </sv>
<sv label="行驶证注册日期"> <sv label="行驶证注册日期">
{{ detailData?.contactsPhone }} {{ detailData?.driverLicenseRegisterTime }}
</sv> </sv>
</sv-container> </sv-container>
<sv-container col="2"> <sv-container col="2">
<sv label="行驶证到期日"> <sv label="行驶证到期日">
{{ detailData?.contactsPhone }} {{ detailData?.driverLicenseEndTime }}
</sv> </sv>
<sv label="行驶证签发机关"> <sv label="行驶证签发机关">
{{ detailData?.contactsPhone }} {{ detailData?.driverLicenseSigningOrg }}
</sv> </sv>
</sv-container> </sv-container>
<sv-container col="3"> <sv-container col="3">
<sv label="行驶证发证日期"> <sv label="行驶证发证日期">
{{ detailData?.contactsName }} {{ detailData?.driverLicenseGetTime }}
</sv> </sv>
<sv label="车辆识别代码"> <sv label="车辆识别代码">
{{ detailData?.contactsPhone }} {{ detailData?.carDistinguishCode }}
</sv> </sv>
<sv label="使用性质"> <sv label="使用性质">
{{ detailData?.contactsPhone }} {{ detailData?.useNature === '1' ? '营运' : '非营运'}}
</sv> </sv>
</sv-container> </sv-container>
<sv-container col="3"> <sv-container col="3">
<sv label="载重(吨)"> <sv label="载重(吨)">
{{ detailData?.contactsName }} {{ detailData?.carLoad }}
</sv> </sv>
<sv label="整备质量"> <sv label="整备质量">
{{ detailData?.contactsPhone }} {{ detailData?.curbWeight }}
</sv> </sv>
<sv label="所有人"> <sv label="所有人">
{{ detailData?.contactsPhone }} {{ detailData?.carOwner }}
</sv> </sv>
</sv-container> </sv-container>
<sv-container col="1"> <sv-container col="1">
@ -75,47 +83,73 @@
{{ detailData?.contactsName }} {{ detailData?.contactsName }}
</sv> </sv>
<sv label="行驶证照片"> <sv label="行驶证照片">
<!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> --> <app-imagelist [imgList]="[detailData?.certificatePhotoFront,detailData?.certificatePhotoBack,detailData?.certificatePhotoFrontWatermark,detailData?.certificatePhotoBackWatermark]"></app-imagelist>
</sv> </sv>
</sv-container> </sv-container>
<nz-divider></nz-divider> <nz-divider></nz-divider>
<sv-container col="3" class="mt16"> <sv-container col="3" class="mt16">
<sv-title>道路运输证信息</sv-title> <sv-title style="font-weight: 700;">道路运输证信息</sv-title>
<sv label="道路运输证号"> <sv label="道路运输证号">
{{ detailData?.enterpriseName }} {{ detailData?.roadTransportNo }}
</sv> </sv>
<sv label="许可证起始有效期"> <sv label="经营许可证">
{{ detailData?.unifiedSocialCreditCode }} {{ detailData?.roadTransportLicenceNo }}
</sv> </sv>
<sv label="许可证截至有效期"> <sv label="发证日期">
{{ detailData?.enterpriseType }} {{ detailData?.roadTransportStartTime }}
</sv> </sv>
<sv label="营业执照"> <sv label="有效期至">
<!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> --> {{detailData?.roadTransportEndTime}}
</sv>
<sv label="道路运输证照片">
<app-imagelist [imgList]="[detailData?.roadTransportPhoto,detailData?.roadTransportPhotoWatermark ]"></app-imagelist>
</sv> </sv>
</sv-container> </sv-container>
<nz-divider></nz-divider> <nz-divider></nz-divider>
<sv-container col="2" class="mt16"> <sv-container col="2" class="mt16">
<sv-title>其他信息</sv-title> <sv-title style="font-weight: 700;">认证司机</sv-title>
<sv label="车头照">
{{ detailData?.name }}
</sv>
<sv label="车主申明或挂靠协议" >
<!-- <app-imagelist [imgList]="detailData?.certificatePhoto"></app-imagelist> -->
</sv>
</sv-container> </sv-container>
<nz-divider></nz-divider>
<st <st
#st #st
[bordered]="true" [bordered]="true"
[columns]="columns" [columns]="columns"
[data]="detailData.goodsList" [data]="service.$api_get_queryDriverByCarId"
[req]="{ method: 'POST', allInBody: true, params: reqParams }"
[res]="{ reName: { list: 'data', total: 'data' } }"
[ngStyle]="{ margin: '1rem 0' }" [ngStyle]="{ margin: '1rem 0' }"
multiSort multiSort
size="small" size="small"
[page]="{ show: false }" [page]="{ show: false }"
> >
<ng-template st-row="isSelf" let-item let-index="index">
<div nz-tooltip [nzTooltipTitle]="item.enterpriseName">
<div>
{{ item?.isSelf ? '是' : '否' }}
</div>
</div>
</ng-template>
</st> </st>
</nz-card> </nz-card>
</ng-container> </ng-container>
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('2')">
<ng-container *nzModalContent>
<nz-tabset>
<nz-tab nzTitle="我的评价">
<div>
评分: <nz-rate [ngModel]="2.5" nzAllowHalf></nz-rate>
<div><span>评价内容:</span></div>
</div>
</nz-tab>
<nz-tab nzTitle="司机评价">
<div>
暂无评价内容
</div>
</nz-tab>
</nz-tabset>
</ng-container>
<ng-template #nzModalFooterEvaluate>
<button nz-button nzType="default" (click)="handleCancel('2')">取消</button>
<button nz-button nzType="primary" (click)="handleOK()">确定</button>
</ng-template>
</nz-modal>

View File

@ -1,26 +1,26 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-11-29 20:19:08 * @Date: 2021-11-29 20:19:08
* @LastEditTime: 2021-11-29 20:31:00 * @LastEditTime: 2021-12-13 09:58:36
* @LastEditors: your name * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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\detail\detail.component.spec.ts * @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\detail\detail.component.spec.ts
*/ */
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FreightComponentsListDetailComponent } from './detail.component'; import { VehicleComponentsAuditDetailComponent } from './detail.component';
describe('FreightComponentsListDetailComponent', () => { describe('VehicleComponentsAuditDetailComponent', () => {
let component: FreightComponentsListDetailComponent; let component: VehicleComponentsAuditDetailComponent;
let fixture: ComponentFixture<FreightComponentsListDetailComponent>; let fixture: ComponentFixture<VehicleComponentsAuditDetailComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [FreightComponentsListDetailComponent], declarations: [VehicleComponentsAuditDetailComponent],
}).compileComponents(); }).compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(FreightComponentsListDetailComponent); fixture = TestBed.createComponent(VehicleComponentsAuditDetailComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });

View File

@ -4,14 +4,16 @@ import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message'; import { NzMessageService } from 'ng-zorro-antd/message';
import { UsermanageService } from '../../../services/vehicle.service'; import { VehicleService } from '../../../services/vehicle.service';
// import { VehicleComponentsListEditComponent } from '../edit/edit.component';
// import { VehicleImgViewComponent } from '../img-view/img-view.component';
@Component({ @Component({
selector: 'app-supplier-components-list-view', selector: 'app-Vehicle-components-Audit-detail',
templateUrl: './detail.component.html', templateUrl: './detail.component.html',
styleUrls: ['./detail.component.less'], styleUrls: ['./detail.component.less'],
}) })
export class VehicleComponentsListDetailComponent implements OnInit { export class VehicleComponentsAuditDetailComponent implements OnInit {
i: any; i: any;
url = `/rule?_allow_anonymous=true`; url = `/rule?_allow_anonymous=true`;
@ViewChild('st', { static: false }) st!: STComponent; @ViewChild('st', { static: false }) st!: STComponent;
@ -20,25 +22,8 @@ export class VehicleComponentsListDetailComponent implements OnInit {
modalTitle = '有效期'; modalTitle = '有效期';
modalName = ''; modalName = '';
ui!: SFUISchema; ui!: SFUISchema;
columns: STColumn[] = [ columns!: STColumn[];
{ title: '认证司机', index: 'perPrice', width: 300, className: 'text-center' }, detailData: any;
{ title: '司机手机号', index: 'goodsQuantity', width: 300, className: 'text-center' },
{ title: '录入人员', index: 'totalPrice', width: 300, className: 'text-center' },
];
detailData: any = {
goodsList: [
{
perPrice: '22323',
goodsQuantity: '项目名称',
totalPrice: '角色',
},
{
perPrice: '2259595',
goodsQuantity: '项目名称2',
totalPrice: '角色',
},
]
};
schema!: SFSchema; schema!: SFSchema;
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
schema1!: SFSchema; schema1!: SFSchema;
@ -49,19 +34,24 @@ export class VehicleComponentsListDetailComponent implements OnInit {
constructor( constructor(
private http: _HttpClient, private http: _HttpClient,
private modal: ModalHelper, private modal: ModalHelper,
public service: UsermanageService, public service: VehicleService,
private route: ActivatedRoute, private route: ActivatedRoute,
private modalHelper: ModalHelper, private modalHelper: ModalHelper,
private msgSrv: NzMessageService, private msgSrv: NzMessageService,
) {} ) {}
ngOnInit() { ngOnInit() {
console.log(this.route.snapshot); this.getDetailList();
// this.initData();
this.initSF(); this.initSF();
this.initSF1(); this.initSF1();
// this.launchSign(); this.initST();
} }
/**
* 查询参数
*/
get reqParams() {
return { id: this.route.snapshot?.params?.id };
}
/** /**
* 初始化查询表单 * 初始化查询表单
*/ */
@ -83,6 +73,30 @@ export class VehicleComponentsListDetailComponent implements OnInit {
}; };
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; this.ui = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
} }
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: '车主申明/挂靠协议',
fixed: 'right',
width: '200px',
className: 'text-left',
buttons: [
{
text: '查看协议',
click: (_record) => this.viewEvaluate(_record),
},
{
text: '上传协议',
click: (_record) => this.updateEvaluate(_record),
},
],
},
]
}
initSF1() { initSF1() {
this.schema1 = { this.schema1 = {
properties: { properties: {
@ -122,152 +136,45 @@ export class VehicleComponentsListDetailComponent implements OnInit {
required: this.validData, required: this.validData,
}; };
} }
showModal(name: any) { // 获取录单员
this.modalName = name; getDetailList() {
if (name === 'effectiveDate') { console.log( this.route.snapshot?.params?.id)
this.isShow = true;
} else {
this.isVisible = true;
}
}
async initData() {
console.log(this.route.snapshot, 'this.route.snapshot');
const params = { const params = {
tenantId: this.route.snapshot.params.id, id: this.route.snapshot?.params?.id
// tenantId: this.route.snapshot.queryParams.tenantId,
};
const res = await this.service.asyncRequest(this.service.$api_get_supplier_info, params);
// // 商品资质
// if (res.enterpriseBusinessJson) {
// res.enterpriseBusinessJson.aptitudes = res.enterpriseBusinessJson?.aptitudes ? res.enterpriseBusinessJson.aptitudes.split(',') : [];
// }
// // // 申请人身份证证件
// // res.applyUserJson.imagelist = [];
// // res.applyUserJson.imagelist.push(res.applyUserJson.certificatePhotoFront);
// // res.applyUserJson.imagelist.push(res.applyUserJson.certificatePhotoBack);
// // res.applyUserJson.imagelist.push(res.applyUserJson.handCertificate);
// 法人身份证证件
const imagelist = [];
imagelist.push(res?.certificatePhotoFront);
imagelist.push(res?.certificatePhotoBack);
res.certificatePhoto = imagelist;
// 营业执照
res.enterpriseQualificationCertificate = res.enterpriseQualificationCertificate
? res.enterpriseQualificationCertificate.split(',')
: [];
// 返回所在地
res.enterpriseAddressCodeStr = await this.getRegionFullName(res.enterpriseAddressCode);
this.detailData = res;
this.suppliersData = {
suppliersType: res?.suppliersType,
externalSuppliersId: res?.externalSuppliersId,
}; };
this.service.request(`${this.service.$api_get_operate_get}`, params).subscribe((res) => {
console.log(res)
this.detailData = res;
})
} }
/**
* 根据地区code查询地区详情
* @param code 地区代码
*/
async getRegionFullName(code: any) {
const params = {
regionCode: code,
};
const res = await this.service.asyncRequest(this.service.$api_get_region_detailByCode, params, 'POST', true);
// if (res && res.regionFullName) {
// const arr = res.regionFullName.split(',');
// res.regionFullName = arr.reverse().join('-');
// }
return res && res.regionFullName;
}
add() {
// this.modal
// .createStatic(FormEditComponent, { i: { id: 0 } })
// .subscribe(() => this.st.reload());
}
goBack() { goBack() {
window.history.go(-1); window.history.go(-1);
} }
/**
* 冻结
*/
freezeOrResume(type: number) {
console.log(type)
// this.service.http
// .post(this.service.$api_set_freezeOrResume, {
// tenantId: this.route.snapshot.params.id,
// // tenantId: this.route.snapshot.queryParams.tenantId,
// status: type,
// })
// .subscribe((res) => {
// if (res.data === true) {
// if (type === 0) {
// this.service.msgSrv.success(`启用成功!`);
// } else if (type === 1) {
// this.service.msgSrv.success(`冻结成功!`);
// }
// this.ngOnInit();
// } else {
// this.service.msgSrv.error(res.msg || '操作失败!');
// }
// });
}
PayOrResume(type: number) {
console.log(type)
// this.service.http
// .post(this.service.$api_set_freezeOrResume, {
// tenantId: this.route.snapshot.params.id,
// // tenantId: this.route.snapshot.queryParams.tenantId,
// status: type,
// })
// .subscribe((res) => {
// if (res.data === true) {
// if (type === 0) {
// this.service.msgSrv.success(`启用成功!`);
// } else if (type === 1) {
// this.service.msgSrv.success(`冻结成功!`);
// }
// this.ngOnInit();
// } else {
// this.service.msgSrv.error(res.msg || '操作失败!');
// }
// });
}
handleCancel(name: any) { handleCancel(name: any) {
if (name === 'effectiveDate') {
this.isShow = false;
} else {
this.isVisible = false;
}
}
handleOK(name: any) {
const params: any = {
tenantId: this.route.snapshot.params.id,
// tenantId: this.route.snapshot.queryParams.tenantId,
};
if (name === 'effectiveDate') { }
params.effectiveDate = this.sf?.value?.effectiveDate;
} else { /**
Object.assign(params, this.sf1?.value); *查看评价
} */
this.service.http.post(this.service.$api_set_freezeOrResume, params).subscribe((res) => { viewEvaluate(item: any) {
if (res.data === true) { // this.modal.createStatic(VehicleImgViewComponent, { i: { imgUrl: item } }).subscribe(() => {
this.service.msgSrv.success(`编辑成功!`); // // this.st.reload();
this.ngOnInit(); // });
} else { }
this.service.msgSrv.error(res.msg || '编辑失败!'); /**
} *查看评价
if (name === 'effectiveDate') { */
this.isShow = false; updateEvaluate(item: any) {
} else { // this.modal.createStatic(VehicleComponentsListEditComponent, { i: { item }, infoData: item }).subscribe(() => {
this.isVisible = false; // // this.st.reload();
} // // this.getInfo();
}); // });
}
handleOK() {
} }
} }

View File

@ -5,7 +5,7 @@ import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { VehicleService } from '../../../vehicle/services/vehicle.service'; import { VehicleService } from '../../../vehicle/services/vehicle.service';
@Component({ @Component({
selector: 'app-Freight-components-list', selector: 'app-Vehicle-components-list',
templateUrl: './list.component.html', templateUrl: './list.component.html',
}) })
export class VehicleComponentsListComponent implements OnInit { export class VehicleComponentsListComponent implements OnInit {

View File

@ -18,6 +18,8 @@ import { EAFileUtil } from 'src/app/shared/utils/file.util';
export class VehicleService extends BaseService { export class VehicleService extends BaseService {
// 查询车辆认证表 // 查询车辆认证表
$api_get_operate_list = `/api/mdc/cuc/carLicense/operate/list/page`; $api_get_operate_list = `/api/mdc/cuc/carLicense/operate/list/page`;
// 查询用户车辆认证表(审核列表)
$api_get_userCarLicense_list = `/api/mdc/cuc/userCarLicense/operate/list/page`;
// 获取车辆认证表 // 获取车辆认证表
$api_get_operate_get = `/api/mdc/cuc/carLicense/operate/get`; $api_get_operate_get = `/api/mdc/cuc/carLicense/operate/get`;
// 获取车辆认证司机列表 // 获取车辆认证司机列表

View File

@ -1,13 +1,15 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-11-29 15:22:34 * @Date: 2021-11-29 15:22:34
* @LastEditTime: 2021-12-02 11:11:39 * @LastEditTime: 2021-12-13 09:56:49
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\usercenter\usercenter-routing.module.ts * @FilePath: \tms-obc-web\src\app\routes\usercenter\usercenter-routing.module.ts
*/ */
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { VehicleComponentsAuditComponent } from './components/audit/audit.component';
import { VehicleComponentsAuditDetailComponent } from './components/audit/detail/detail.component';
import { VehicleComponentsListDetailComponent } from './components/list/detail/detail.component'; import { VehicleComponentsListDetailComponent } from './components/list/detail/detail.component';
import { VehicleComponentsListComponent } from './components/list/list.component'; import { VehicleComponentsListComponent } from './components/list/list.component';
@ -17,6 +19,8 @@ const routes: Routes = [
{ path: 'list', component: VehicleComponentsListComponent }, { path: 'list', component: VehicleComponentsListComponent },
{ path: 'list/detail/:id', component: VehicleComponentsListDetailComponent }, { path: 'list/detail/:id', component: VehicleComponentsListDetailComponent },
{ path: 'audit', component: VehicleComponentsAuditComponent },
{ path: 'audit/detail/:id', component: VehicleComponentsAuditDetailComponent },
]; ];
@NgModule({ @NgModule({

View File

@ -1,13 +1,15 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-11-29 15:22:34 * @Date: 2021-11-29 15:22:34
* @LastEditTime: 2021-12-07 17:30:51 * @LastEditTime: 2021-12-13 09:58:58
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\usercenter\usercenter.module.ts * @FilePath: \tms-obc-web\src\app\routes\usercenter\usercenter.module.ts
*/ */
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { SharedModule } from '@shared'; import { SharedModule } from '@shared';
import { VehicleComponentsAuditComponent } from './components/audit/audit.component';
import { VehicleComponentsAuditDetailComponent } from './components/audit/detail/detail.component';
import { VehicleComponentsListDetailComponent } from './components/list/detail/detail.component'; import { VehicleComponentsListDetailComponent } from './components/list/detail/detail.component';
import { VehicleComponentsListEditComponent } from './components/list/edit/edit.component'; import { VehicleComponentsListEditComponent } from './components/list/edit/edit.component';
import { VehicleImgViewComponent } from './components/list/img-view/img-view.component'; import { VehicleImgViewComponent } from './components/list/img-view/img-view.component';
@ -19,7 +21,9 @@ const COMPONENTS = [
VehicleComponentsListComponent, VehicleComponentsListComponent,
VehicleComponentsListDetailComponent, VehicleComponentsListDetailComponent,
VehicleComponentsListEditComponent, VehicleComponentsListEditComponent,
VehicleImgViewComponent VehicleImgViewComponent,
VehicleComponentsAuditComponent,
VehicleComponentsAuditDetailComponent
]; ];
@NgModule({ @NgModule({

View File

@ -0,0 +1,3 @@
<nz-select [(ngModel)]="value" (ngModelChange)="change($event)" *ngIf="dictList">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of dictList"></nz-option>
</nz-select>

View File

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DictSelectComponent } from './dict-select.component';
describe('DictSelectComponent', () => {
let component: DictSelectComponent;
let fixture: ComponentFixture<DictSelectComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ DictSelectComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(DictSelectComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,68 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, forwardRef, Input, OnInit } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { AddressComponent } from '@shared';
import { DictSelectService } from './dict-select.service';
@Component({
selector: 'app-dict-select',
templateUrl: './dict-select.component.html',
styleUrls: ['./dict-select.component.less'],
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => DictSelectComponent),
multi: true,
},
],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DictSelectComponent implements OnInit, ControlValueAccessor {
private onChangeFn?: (val: string) => void;
private onTouchedFn?: () => void;
defaultUrl = `/api/mdc/pbc/dictItems/getDictValue`;
@Input() value: string = ''; // 默认选中值
@Input() url: string = ''; // 获取字典数据的地址
@Input() params = {};// 请求参数
dictList: any[] = [];
constructor(public service: DictSelectService, public cdr: ChangeDetectorRef) { }
writeValue(geo: string): void {
if (geo == null) {
this.value = '';
return;
}
this.value = geo;
}
registerOnChange(fn: any): void {
this.onChangeFn = fn;
}
registerOnTouched(fn: any): void {
this.onTouchedFn = fn;
}
ngOnInit(): void {
this.service.getDictList(this.url || this.defaultUrl, this.params).subscribe(res => {
if (res) {
this.dictList = res || [];
if (this.dictList.length > 0) {
const obj = { label: '全部', value: '' };
this.dictList.unshift(obj);
}
this.cdr.markForCheck();
}
});
}
change($event: any) {
this.onChangeFn!($event);
}
isEmpty(val: any) {
return val === undefined || val === null || val === '';
}
}

View File

@ -0,0 +1,16 @@
import { Injectable, Injector } from '@angular/core';
import { BaseService } from '../../services/core/base.service';
@Injectable({
providedIn: 'root'
})
export class DictSelectService extends BaseService {
constructor(public injector: Injector) {
super(injector);
}
getDictList(url: string, params = {}) {
return this.request(url, params);
}
}

View File

@ -0,0 +1,11 @@
/*
* @Author: your name
* @Date: 2021-12-13 10:41:19
* @LastEditTime: 2021-12-13 10:41:57
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\shared\components\dict-select\index.ts
*/
export * from './dict-select.component.spec';
export * from './dict-select.component';
export * from './dict-select.service';

View File

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-11-29 10:04:12 * @Date: 2021-11-29 10:04:12
* @LastEditTime: 2021-12-06 15:21:46 * @LastEditTime: 2021-12-13 10:42:19
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\shared\index.ts * @FilePath: \tms-obc-web\src\app\shared\index.ts
@ -17,6 +17,7 @@ export * from './components/scrollbar/index';
export * from './components/address/index'; export * from './components/address/index';
export * from './components/captcha/index'; export * from './components/captcha/index';
export * from './components/amap/index'; export * from './components/amap/index';
export * from './components/dict-select/index';
// Utils // Utils
export * from './utils'; export * from './utils';

View File

@ -12,3 +12,4 @@ export * from './business/user.service';
export * from './business/sl-platform.service'; export * from './business/sl-platform.service';
export * from './business/user.service'; export * from './business/user.service';
export * from './business/environment.service'; export * from './business/environment.service';

View File

@ -0,0 +1,10 @@
<sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">
<app-dict-select [url]="ui?.url" [ngModel]="value" [params]="ui?.params" (ngModelChange)="change($event)"
name="sf.dict.select">
</app-dict-select>
</sf-item-wrap>
<!-- <sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">
<nz-select [(ngModel)]="schema.default">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of dictList"></nz-option>
</nz-select>
</sf-item-wrap> -->

View File

@ -0,0 +1,30 @@
import { Component, OnInit } from "@angular/core";
import { ControlWidget } from "@delon/form";
@Component({
selector: 'sf-dict-select',
templateUrl: './dict-select.widget.html',
preserveWhitespaces: false,
})
export class DictSelectWidget extends ControlWidget implements OnInit {
static readonly KEY = 'dict-select';
/**
* 字典数据数组
*/
dictList: any[] = [];
ngOnInit(): void {
}
change(value: string) {
if (this.ui.change) this.ui.change(value);
this.setValue(value);
}
}

View File

@ -1,3 +1,11 @@
/*
* @Author: your name
* @Date: 2021-12-01 15:07:23
* @LastEditTime: 2021-12-13 10:37:39
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\shared\widget\st-widget.module.ts
*/
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
@ -15,6 +23,7 @@ import { NgxTinymceModule } from 'ngx-tinymce';
// import { STWidgetRegistry } from '@delon/abc/st'; // import { STWidgetRegistry } from '@delon/abc/st';
import { SharedModule } from '../shared.module'; import { SharedModule } from '../shared.module';
import { AddressWidget } from './address/address.widget'; import { AddressWidget } from './address/address.widget';
import { DictSelectWidget } from './dict-select/dict-select.widget';
import { EditorWidget } from './editor/editor.widget'; import { EditorWidget } from './editor/editor.widget';
import { SLFromToSearchWidget } from './from-to-search/from-to-search.widget'; import { SLFromToSearchWidget } from './from-to-search/from-to-search.widget';
import { EAFromToWidget } from './from-to/from-to.widget'; import { EAFromToWidget } from './from-to/from-to.widget';
@ -33,7 +42,8 @@ export const STWIDGET_COMPONENTS = [
EAFromToWidget, EAFromToWidget,
SpecValuesWidget, SpecValuesWidget,
PropertyValuesWidget, PropertyValuesWidget,
SLFromToSearchWidget SLFromToSearchWidget,
DictSelectWidget
]; ];
@NgModule({ @NgModule({
@ -68,5 +78,6 @@ export class STWidgetModule {
widgetRegistry.register(SpecValuesWidget.KEY, SpecValuesWidget); widgetRegistry.register(SpecValuesWidget.KEY, SpecValuesWidget);
widgetRegistry.register(PropertyValuesWidget.KEY, PropertyValuesWidget); widgetRegistry.register(PropertyValuesWidget.KEY, PropertyValuesWidget);
widgetRegistry.register(SLFromToSearchWidget.KEY, SLFromToSearchWidget); widgetRegistry.register(SLFromToSearchWidget.KEY, SLFromToSearchWidget);
widgetRegistry.register(DictSelectWidget.KEY, DictSelectWidget)
} }
} }

View File

@ -285,6 +285,15 @@
"hide": true, "hide": true,
"text": "车辆详情", "text": "车辆详情",
"link": "/vehicle/list/detail/:id" "link": "/vehicle/list/detail/:id"
},
{
"text": "车辆审核列表",
"link": "/vehicle/audit"
},
{
"hide": true,
"text": "车辆审核列表详情",
"link": "/vehicle/audit/detail/:id"
} }
] ]
}, },