Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
Taric Xin
2022-03-28 17:36:20 +08:00
14 changed files with 574 additions and 67 deletions

View File

@ -88,6 +88,8 @@ export class OrderManagementBulkComponent implements OnInit {
}
const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
console.log(params);
if (this.sf) {
Object.assign(requestOptions.body, {
...a,
@ -467,10 +469,10 @@ export class OrderManagementBulkComponent implements OnInit {
width: '180px',
className: 'text-left',
format: (item: any) =>
`${item.goodsName}/
${item.goodsWeight || '0'}吨/
${item.goodsVolume || '0'}方/
${item.goodsNumber || '0'}`
`${item?.goodsName}/
${item?.weight || '0'}吨/
${item?.volume || '0'}方/
${item?.goodsNumber || '0'}`
},
{
title: '运费单价',

View File

@ -29,6 +29,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
isVisibleEvaluate = false;
isVisible = false;
loading: boolean = true;
paramsList: any;
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
changeViewId: any; // 查看运费变更记录id - 用于查看
ViewCause: any; // 变更运费查看数据
@ -97,36 +98,25 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
if (this.resourceStatus) {
a.billStatus = this.resourceStatus;
}
const params: any = Object.assign({}, this.sf?.value || {});
const params: any = Object.assign({}, this.sf?.value || this.paramsList);
delete params._$expand;
return {
...a,
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || ''
}
};
}
beforeReq = (requestOptions: STRequestOptions) => {
const a: any = {};
if (this.resourceStatus) {
a.billStatus = this.resourceStatus;
Object.assign(requestOptions.body, {
...a
});
}
const params: any = Object.assign({}, this.sf?.value || {});
const params: any = Object.assign({}, this.sf?.value || this.paramsList);
delete params._$expand;
if (this.sf) {
this.paramsList = params
Object.assign(requestOptions.body, {
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || ''
}
...a,
...this.paramsList,
});
}
this.loading = true;
return requestOptions;
};
@ -282,14 +272,19 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
containsAllLable: true
} as SFSelectWidgetSchema
},
// createTime: {
// title: '创建时间',
// type: 'string',
// ui: {
// widget: 'date',
// mode: 'range',
// format: 'yyyy-MM-dd'
// } as SFDateWidgetSchema
// },
createTime: {
title: '创建时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
title: '创建时间',
ui: { widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd' } as SFDateWidgetSchema,
},
riskStatus: {
type: 'string',
@ -578,7 +573,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
this.resourceStatus = e;
this.initST();
setTimeout(() => {
this.st.load(1);
this.st.load();
}, 500);
}
/**

View File

@ -61,6 +61,7 @@ import { BannerComponentsAddComponent } from './knowledge/banner/components/add/
import { PersonalPartnerDetailComponent } from './partner-list/components/personal-partner-detail/personal-partner-detail.component';
import { ParterAdviceFeedbackListComponent } from './advice-feedback/components/list/list.component';
import { ParterAdviceFeedbackDetailComponent } from './advice-feedback/components/feedback-detail/feedback-detail.component';
import { ParterRebateManageMentAddPartnerListComponent } from './rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component';
const COMPONENTS: any[] = [
PartnerBusinessStatisticsIndexComponent,
@ -111,7 +112,8 @@ const COMPONENTS: any[] = [
BannerComponentsAddComponent,
PersonalPartnerDetailComponent,
ParterAdviceFeedbackListComponent,
ParterAdviceFeedbackDetailComponent
ParterAdviceFeedbackDetailComponent,
ParterRebateManageMentAddPartnerListComponent
];
@NgModule({

View File

@ -0,0 +1,38 @@
<nz-card>
<div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 -->
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
<sf #sf [schema]="schema" [ui]="ui" [mode]="'search'" [disabled]="!sf?.valid" [loading]="false"
(formSubmit)="search()" (formReset)="resetSF()"></sf>
</div>
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<ng-container *ngIf="queryFieldCount > 4">
<div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="false" (click)="search()" acl
[acl-ability]="['AbnormalAppear-serach']">查询</button>
<button nz-button (click)="resetSF()" acl [acl-ability]="['AbnormalAppear-reset']">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</ng-container>
</div>
</nz-card>
<nz-card class="content-box">
<st #st [data]="service.$api_get_rebateConfig" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"
[scroll]="{ x: '2000px' }">
</st>
<ng-template #extraTemplate>
<button *ngIf="selectedIndex===0" (click)="batchReply()" nz-button nzType="primary" acl
[acl-ability]="['AbnormalAppear-batchReply']">批量回复</button>
</ng-template>
</nz-card>

View File

@ -0,0 +1,20 @@
:host::ng-deep{
.search-box{
.ant-card-body{
padding-bottom: 18px;
}
}
.content-box{
.ant-card-body{
padding-top: 14px;
}
}
.imgBox {
display: flex;
img {
width: 60px !important;
}
}
}

View File

@ -0,0 +1,220 @@
import { Component, OnInit, ViewChild, Type } from '@angular/core';
import { STComponent, STColumn, STChange } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { RebateManagementService } from '../../../services/rebate-management.service';
@Component({
selector: 'app-add-partnerlist',
templateUrl: './add-partnerlist.component.html',
styleUrls: ['./add-partnerlist.component.less']
})
export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
ui: SFUISchema = {};
i: any;
schema: SFSchema = {};
addSchema: SFSchema = {};
_$expand = false;
editText = '';
formData: any;
isVisible = false;
edit = false;
editId = false;
selectedIndex = 0;
columns: STColumn[] = [
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' },
{ title: '异常编号', index: 'exceptionCode', width: '140px', className: 'text-left', },
{ title: '订单号', index: 'billCode', width: '160px', className: 'text-left', },
{ title: '装货地', index: 'loadingAddressArr', width: '220px', className: 'text-left', },
{ title: '卸货地', index: 'unloadingAddressArr', width: '220px', className: 'text-left', },
{ title: '承运司机', index: 'driver', width: '180px', className: 'text-left', },
{ title: '异常信息', index: 'exceptionContent', width: '100px', className: 'text-left', },
{ title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '150px', className: 'text-left', },
{ title: '上报时间', index: 'createTime', width: '140px', className: 'text-left', },
{
title: '操作', index: 'createTime', width: '90px', className: 'text-left',
buttons: [
{
text: '回复',
click: _record => this.reply(_record),
acl: { ability: ['AbnormalAppear-reply'] }
},
]
},
];
columns2: STColumn[] = [
{ title: '异常编号', index: 'exceptionCode', width: '140px', className: 'text-left' },
{ title: '订单号', index: 'billCode', width: '160px', className: 'text-left' },
{ title: '装货地', index: 'loadingAddressArr', width: '220px', className: 'text-left' },
{ title: '卸货地', index: 'unloadingAddressArr', width: '220px', className: 'text-left' },
{ title: '承运司机', index: 'driver', width: '180px', className: 'text-left' },
{ title: '异常信息', index: 'exceptionContent', width: '100px', className: 'text-left' },
{ title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '150px', className: 'text-left' },
{ title: '上报时间', index: 'createTime', width: '140px', className: 'text-left' },
{ title: '回复内容', index: 'replyContent', width: '150px', className: 'text-left' },
{ title: '回复人', index: 'replyAppUserName', width: '90px', className: 'text-left' },
{ title: '回复时间', index: 'replyTime', width: '140px', className: 'text-left' },
];
get reqParams() {
let params: any = { ...this.sf?.value };
if (params.reportingTime) {
const reportingTime = { start: this.sf?.value?.reportingTime?.[0], end: this.sf?.value?.reportingTime?.[1] }
params.reportingTime = reportingTime;
}
return params;
}
get selectedRows() {
return this.st?.list.filter(item => item.checked) || [];
}
constructor(
public service: RebateManagementService,
private nzModalService: NzModalService,
public shipperSrv: ShipperBaseService,
private modal: NzModalService,
) { }
ngOnInit(): void {
this.initSF()
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
exceptionCode: {
type: 'string',
title: '异常编号',
ui: { placeholder: '请输入' }
},
billCode: {
type: 'string',
title: '订单号',
ui: {
placeholder: '最多100个订单空号隔开',
}
},
exceptionType: {
title: '异常类型',
type: 'string',
ui: {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'exception:report:type' },
} as SFSelectWidgetSchema
},
driverName: {
title: '承运司机',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
carNo: {
title: '车牌号',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
reportingTime: {
title: '上报时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFDateWidgetSchema
}
}
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
search() {
if (this.selectedIndex === 0) {
this.st?.load(1)
}
}
selectedIndexChange(event: any) {
if (this.selectedIndex === 0) {
this.st?.load(1)
}
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
}
// 回复操作
reply(item: any) {
// const modalRef = this.modal.create({
// nzTitle: '回复',
// nzWidth: 700,
// nzContent: AbnormalReplyComponent,
// nzComponentParams: {
// i: item
// },
// nzFooter: null
// });
// modalRef.afterClose.subscribe((res) => {
// if (res) {
// this.resetSF;
// this.st.load();
// }
// });
}
// 批量回复操作
batchReply() {
// if (this.selectedRows.length === 0) {
// this.service.msgSrv.warning('请勾选数据!')
// return;
// }
// const modalRef = this.modal.create({
// nzTitle: '批量回复',
// nzContent: AbnormalreplyBatchComponent,
// nzComponentParams: {
// selectedRows: this.selectedRows
// },
// nzFooter: null
// });
// modalRef.afterClose.subscribe(() => {
// this.resetSF;
// this.st.load();
// });
}
}

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming
* @LastEditTime : 2022-03-21 13:53:31
* @LastEditTime : 2022-03-28 15:39:27
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -33,7 +33,7 @@
<nz-option nzValue="jack" nzLabel="Jack"></nz-option>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
</nz-select>
&nbsp;&nbsp;<span >添加</span>
&nbsp;&nbsp;<span (click)="add()">添加</span>
</sv>
&nbsp;&nbsp;<sv label="优先级" col="1">
<nz-select ngModel="lucy" style="max-width: 400px; min-width: 200px;">
@ -49,6 +49,17 @@
<textarea style="max-width: 400px; min-width: 200px;" rows="4" nz-input [(ngModel)]="inputValue"></textarea>
</sv>
</sv-container>
<div>
<button>返回</button>
<button>提交</button>
</div>
</div>
</nz-card>
<nz-card>
<div class="align-center">
<button nz-button nzType="primary" (click)="goBack()">取消</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit()"
acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交</button
>
</div>
</nz-card>

View File

@ -1,10 +1,10 @@
/*
* @Description :
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-03-21 09:26:45
* @LastEditors : Shiming
* @LastEditTime : 2022-03-21 13:44:34
* @LastEditTime : 2022-03-28 14:45:41
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -16,6 +16,7 @@ import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/fo
import { processSingleSort, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { RebateManagementService } from '../../../services/rebate-management.service';
import { ParterRebateManageMentAddPartnerListComponent } from '../add-partnerlist/add-partnerlist.component';
@Component({
selector: 'app-parter-channel-rebate-management-add',
styleUrls: ['./add.component.less'],
@ -26,7 +27,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
toFixedValue: Number = 2;
radioValue = 'A';
precision = 2;
inputValue= '';
inputValue = '';
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema1!: SFSchema;
constructor(
@ -34,7 +35,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
public ar: ActivatedRoute,
public service: RebateManagementService,
private modal: NzModalService,
public shipperservice: ShipperBaseService,
public shipperservice: ShipperBaseService
) {}
initSF(data?: any) {
this.schema1 = {
@ -55,6 +56,28 @@ export class ParterRebateManageMentAddComponent implements OnInit {
};
}
ngOnInit() {
this.initSF()
this.initSF();
}
submit() {}
goBack() {
window.history.go(-1);
}
/**
*申请退款
*/
add(item?: any) {
const modalRef = this.modal.create({
nzTitle: '申请退款',
nzContent: ParterRebateManageMentAddPartnerListComponent,
nzComponentParams: {
i: item,
},
nzFooter: null
});
modalRef.afterClose.subscribe((res: boolean) => {
if (res) {
}
});
}
}

View File

@ -92,7 +92,7 @@ export class CarAddDriverComponent implements OnInit {
title: '',
ui: {
offsetControl: 6,
action: apiConf.fileUpload,
action: apiConf.waterFileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
@ -108,6 +108,18 @@ export class CarAddDriverComponent implements OnInit {
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
];
this.sf?.setValue('/certificatePhotoFrontWatermark', avatar);
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath
this.checkIdCard(args.file.response.data.fullFilePath, 'front', 0);
} else {
@ -142,7 +154,7 @@ export class CarAddDriverComponent implements OnInit {
title: '',
ui: {
offsetControl: 6,
action: apiConf.fileUpload,
action: apiConf.waterFileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
@ -158,6 +170,18 @@ export class CarAddDriverComponent implements OnInit {
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
];
this.sf?.setValue('/certificatePhotoBackWatermark', avatar);
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath
this.checkIdCard(args.file.response.data.fullFilePath, 'back', 0);
} else {

View File

@ -177,17 +177,15 @@ export class SupplyManagementVehicleComponent implements OnInit {
{
label: '下载失败数据',
type: 'primary',
loading: this.service.http.loading,
onClick: () => {
if(!result?.failNumber) {
this.service.msgSrv.error('没有失败数据!');
tipsModal.destroy();
return;
}
this.service.request(this.service.$api_getFailUploadGoodsOperateResource, result.ids).subscribe((res: any) => {
if(res) {
console.log(res);
}
})
console.log(111);
this.service.downloadFile(this.service.$api_getFailUploadGoodsOperateResource, result.ids)
tipsModal.destroy();
}
},
]

View File

@ -23,12 +23,16 @@
</div>
</ng-template>
</sf>
<sf #sf1 [compact]="true" [ui]="ui" [schema]="schema1" [button]="'none'" *ngIf="schema1">
<sf #sf1 [compact]="true" [ui]="ui2" [schema]="schema1" [button]="'none'" *ngIf="schema1">
<ng-template sf-template="roadImg" let-me let-ui="ui" let-schema="schema">
<img height="104" src="/assets/images/drivercard.png" class="borderImg" />
</ng-template>
</sf>
<sf #sf2 [compact]="true" [ui]="ui" [schema]="schema2" [button]="'none'" *ngIf="schema2">
<sf #sf2 [compact]="true" [ui]="ui3" [schema]="schema2" [button]="'none'" *ngIf="schema2">
<ng-template sf-template="agreeImg" let-me let-ui="ui" let-schema="schema">
<img height="104" src="/assets/images/jopcard.png" class="borderImg" />
</ng-template>
</sf>
<img class="drivercard" height="104" src="/assets/images/drivercard.png" />
<img class="jopcard" height="104" src="/assets/images/jopcard.png" />
<!-- <div class="example" (click)="showExample()">
查看示例
<div class="popBox" *ngIf="showCardFlag">

View File

@ -29,13 +29,13 @@
}
.drivercard{
position: absolute;
top: 50%;
top: 710px;
left: 330px;
border: solid 1px #ebf0fb;
}
.jopcard{
position: absolute;
top: 79%;
top: 1115px;
left: 330px;
border: solid 1px #ebf0fb;
}
@ -47,5 +47,11 @@
color: black;
resize:none;
}
.setCustom .ant-form-item-control{
margin-left: -100px !important
}
.borderImg{
border: solid 1px #ebf0fb;
}
}
}
}

View File

@ -22,6 +22,8 @@ export class CarSettleAddDriverComponent implements OnInit {
record: any = {};
i: any;
ui: SFUISchema = {};
ui2: SFUISchema = {};
ui3: SFUISchema = {};
schema: SFSchema = {};
schema1: SFSchema = {};
schema2: SFSchema = {};
@ -88,7 +90,7 @@ export class CarSettleAddDriverComponent implements OnInit {
title: '',
ui: {
offsetControl: 6,
action: apiConf.fileUpload,
action: apiConf.waterFileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
@ -104,7 +106,18 @@ export class CarSettleAddDriverComponent implements OnInit {
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
console.log(args.file.response.data.fullFilePath);
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
];
this.sf?.setValue('/certificatePhotoFrontWatermark', avatar);
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath;
this.checkIdCard(args.file.response.data.fullFilePath, 'front', 0);
}
@ -137,7 +150,7 @@ export class CarSettleAddDriverComponent implements OnInit {
title: '',
ui: {
offsetControl: 6,
action: apiConf.fileUpload,
action: apiConf.waterFileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
@ -153,6 +166,18 @@ export class CarSettleAddDriverComponent implements OnInit {
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
];
this.sf?.setValue('/certificatePhotoBackWatermark', avatar);
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath;
this.checkIdCard(args.file.response.data.fullFilePath, 'back', 0);
}
@ -234,7 +259,7 @@ export class CarSettleAddDriverComponent implements OnInit {
type: 'string',
title: '驾驶证照片',
ui: {
action: apiConf.fileUpload,
action: apiConf.waterFileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
@ -250,6 +275,18 @@ export class CarSettleAddDriverComponent implements OnInit {
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
];
this.sf1?.setValue('/certificatePhotoWatermark', avatar);
this.detailData.userDriverLicenseDTO.certificatePhoto = args.file.response.data.fullFilePath;
this.checkDriverCard(args.file.response.data.fullFilePath, 'front', 0);
} else {
@ -271,6 +308,14 @@ export class CarSettleAddDriverComponent implements OnInit {
// previewFile: (file: NzUploadFile) => of(file.url),
}
},
roadImg: {
title: '',
type: 'boolean',
// enum: [{ label: '长期', value: true }],
ui: {
widget: 'custom',
}
},
licenseNo: {
title: '驾驶证号',
type: 'string',
@ -351,7 +396,7 @@ export class CarSettleAddDriverComponent implements OnInit {
title: '',
ui: {
offsetControl: 6,
action: apiConf.fileUpload,
action: apiConf.waterFileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
@ -367,6 +412,18 @@ export class CarSettleAddDriverComponent implements OnInit {
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
];
this.sf2?.setValue('/certificatePhotoWatermark', avatar);
this.detailData.userPracticeSeniorityDTO.certificatePhoto = args.file.response.data.fullFilePath;
this.checkQualificationCertificate(args.file.response.data.fullFilePath);
} else {
@ -385,7 +442,15 @@ export class CarSettleAddDriverComponent implements OnInit {
observer.complete();
});
},
previewFile: (file: NzUploadFile) => of()
// previewFile: (file: NzUploadFile) => of()
}
},
agreeImg: {
title: '',
type: 'boolean',
// enum: [{ label: '长期', value: true }],
ui: {
widget: 'custom',
}
},
licenseNo: {
@ -476,6 +541,40 @@ export class CarSettleAddDriverComponent implements OnInit {
grid: { span: 3 }
}
};
this.ui2 = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
},
$titleB:{
grid: { span: 24 },
},
$certificatePhotoWatermark: {
grid: { span: 12 },
},
$roadImg: {
grid: { span: 4 },
class: 'setCustom'
},
};
this.ui3 = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
},
$titleC:{
grid: { span: 24 },
},
$certificatePhotoWatermark: {
grid: { span: 12 },
},
$agreeImg: {
grid: { span: 4 },
class: 'setCustom'
},
};
}
getRegionToThree() {
// 获取一、二、三级地区详情
@ -547,7 +646,7 @@ export class CarSettleAddDriverComponent implements OnInit {
if (side === 'front') {
// 正面
this.sf1.setValue('/licenseNo', res.number);
this.sf1.setValue('/driverModel', [res.classType.toUpperCase()]);
this.sf1.setValue('/driverModel', [res.classType?.toUpperCase()]);
this.sf1.setValue('/validStartTime', res.validFrom);
this.sf1.setValue('/validEndTime', res.validTo);
this.sf1.setValue('/signingOrganization', res.issuingAuthority);

View File

@ -102,7 +102,7 @@ export class CarSettleCarauthComponent implements OnInit {
type: 'string',
title: '车头照照片',
ui: {
action: apiConf.fileUpload,
action: apiConf.waterFileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
@ -118,6 +118,19 @@ export class CarSettleCarauthComponent implements OnInit {
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
console.log(args);
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
];
this.sf?.setValue('/carFrontPhotoWatermark', avatar);
this.detailData.carFrontPhoto = args.file.response.data.fullFilePath
}
},
@ -129,11 +142,15 @@ export class CarSettleCarauthComponent implements OnInit {
observer.complete();
return;
}
console.log(_fileList)
observer.next(isLt2M);
observer.complete();
});
},
previewFile: (file: NzUploadFile) => of(file.url),
// previewFile: (file: NzUploadFile) => of(
// file?.response?.data?.fullFilePath
// ),
}
},
carNo: {
@ -215,7 +232,7 @@ export class CarSettleCarauthComponent implements OnInit {
type: 'string',
title: '挂靠协议',
ui: {
action: apiConf.fileUpload,
action: apiConf.waterFileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
@ -231,6 +248,18 @@ export class CarSettleCarauthComponent implements OnInit {
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
];
this.sf?.setValue('/carProtocalWatermark', avatar);
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath
}
},
@ -277,7 +306,7 @@ export class CarSettleCarauthComponent implements OnInit {
type: 'string',
title: '行驶证首页照片',
ui: {
action: apiConf.fileUpload,
action: apiConf.waterFileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
@ -293,6 +322,18 @@ export class CarSettleCarauthComponent implements OnInit {
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
];
this.sf?.setValue('/certificatePhotoFrontWatermark', avatar);
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath
this.checkCarCard(args.file.response.data.fullFilePath, 'front');
} else {
@ -311,7 +352,7 @@ export class CarSettleCarauthComponent implements OnInit {
observer.complete();
});
},
previewFile: (file: NzUploadFile) => of(file.url),
// previewFile: (file: NzUploadFile) => of(file.url),
}
},
tipsB: {
@ -326,7 +367,7 @@ export class CarSettleCarauthComponent implements OnInit {
type: 'string',
title: '行驶证副页照片',
ui: {
action: apiConf.fileUpload,
action: apiConf.waterFileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
@ -342,6 +383,18 @@ export class CarSettleCarauthComponent implements OnInit {
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
];
this.sf?.setValue('/certificatePhotoBackWatermark', avatar);
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath
this.checkCarCard(args.file.response.data.fullFilePath, 'back');
} else {
@ -360,7 +413,7 @@ export class CarSettleCarauthComponent implements OnInit {
observer.complete();
});
},
previewFile: (file: NzUploadFile) => of(file.url),
// previewFile: (file: NzUploadFile) => of(file.url),
}
},
driverLicenseRegisterTime: {
@ -444,7 +497,7 @@ export class CarSettleCarauthComponent implements OnInit {
type: 'string',
title: '道运证照片',
ui: {
action: apiConf.fileUpload,
action: apiConf.waterFileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
@ -460,6 +513,18 @@ export class CarSettleCarauthComponent implements OnInit {
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
const avatar = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
];
this.sf?.setValue('/roadTransportPhotoWatermark', avatar);
this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath
this.checkTransCard(args.file.response.data.fullFilePath);
} else {
@ -478,7 +543,7 @@ export class CarSettleCarauthComponent implements OnInit {
observer.complete();
});
},
previewFile: (file: NzUploadFile) => of(file.url),
// previewFile: (file: NzUploadFile) => of(file.url),
}
},
roadImg: {