Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
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 { map } from 'rxjs/operators';
|
||||
@ -8,6 +8,8 @@ import { SupplyManagementService } from '../../services/order-management.service
|
||||
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
|
||||
import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component';
|
||||
import { SureDepartComponent } from '../../modal/bulk/sure-depart/sure-depart.component';
|
||||
import { SureArriveComponent } from '../../modal/bulk/sure-arrive/sure-arrive.component';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -140,14 +142,29 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
},
|
||||
}
|
||||
},
|
||||
no7: {
|
||||
type: 'string',
|
||||
brandId: {
|
||||
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',
|
||||
@ -158,15 +175,30 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
},
|
||||
}
|
||||
},
|
||||
no10: {
|
||||
type: 'string',
|
||||
brandId2: {
|
||||
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: 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: '支付状态',
|
||||
type: 'string',
|
||||
@ -415,6 +447,10 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
text: '确认发车',
|
||||
click: (_record) => this.sureDepart(_record),
|
||||
},
|
||||
{
|
||||
text: '确认到车',
|
||||
click: (_record) => this.sureArrive(_record),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@ -605,6 +641,19 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
// *变更运费
|
||||
|
||||
sureArrive(item: any) {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '确认到车',
|
||||
nzWidth: '50%',
|
||||
nzContent: SureArriveComponent,
|
||||
nzComponentParams: {
|
||||
i: item
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
userAction() {
|
||||
|
||||
}
|
||||
|
||||
@ -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/order-management.service';
|
||||
|
||||
@ -133,14 +134,29 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
},
|
||||
}
|
||||
},
|
||||
no7: {
|
||||
type: 'string',
|
||||
brandId: {
|
||||
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',
|
||||
@ -151,15 +167,30 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
},
|
||||
}
|
||||
},
|
||||
no10: {
|
||||
type: 'string',
|
||||
brandId2: {
|
||||
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: 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: '支付状态',
|
||||
type: 'string',
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 15:53:03
|
||||
* @LastEditTime: 2021-12-14 17:39:33
|
||||
* @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\modal\bulk\sure-depart\sure-depart.component.html
|
||||
-->
|
||||
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none">
|
||||
<ng-template sf-template="no2" let-me let-ui="ui" let-schema="schema">
|
||||
<div style="display: flex;">
|
||||
<nz-input-number [(ngModel)]="data.place1" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">吨</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="no3" let-me let-ui="ui" let-schema="schema">
|
||||
<div style="display: flex;">
|
||||
<nz-input-number [(ngModel)]="data.place2" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">方</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</sf>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">关闭</button>
|
||||
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [nzLoading]="http.loading"
|
||||
>确认到车</button
|
||||
>
|
||||
</div>
|
||||
@ -0,0 +1,7 @@
|
||||
.left_btn {
|
||||
width: 50px;
|
||||
height: 32px;
|
||||
padding-left: 8px;
|
||||
line-height:32px;
|
||||
background-color: #d7d7d7;
|
||||
}
|
||||
@ -0,0 +1,298 @@
|
||||
import { preloaderFinished } from '@delon/theme';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-14 17:38: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\order-management\modal\bulk\update-freight\update-freight.component.ts
|
||||
*/
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import {
|
||||
SFComponent,
|
||||
SFCustomWidgetSchema,
|
||||
SFDateWidgetSchema,
|
||||
SFNumberWidgetSchema,
|
||||
SFRadioWidgetSchema,
|
||||
SFSchema,
|
||||
SFSelectWidgetSchema,
|
||||
SFTextareaWidgetSchema,
|
||||
SFUISchema,
|
||||
SFUploadWidgetSchema
|
||||
} from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { SupplyManagementService } from 'src/app/routes/supply-management/services/supply-management.service';
|
||||
import { Observable, Observer } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'app-order-management-sure-arrive',
|
||||
templateUrl: './sure-arrive.component.html',
|
||||
styleUrls: ['./sure-arrive.component.less']
|
||||
})
|
||||
export class SureArriveComponent implements OnInit {
|
||||
record: any = {};
|
||||
i: any;
|
||||
data: any ={
|
||||
place1: '',
|
||||
place2: ''
|
||||
};
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema: SFSchema = {};
|
||||
ui: SFUISchema = {};
|
||||
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: SupplyManagementService ) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
datetime: {
|
||||
type: 'string',
|
||||
title: '卸货时间',
|
||||
format: 'date-time',
|
||||
},
|
||||
no2: {
|
||||
type: 'string',
|
||||
title: '卸货重量',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
no3: {
|
||||
type: 'string',
|
||||
title: '卸货体积',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
|
||||
avatar: {
|
||||
type: 'string',
|
||||
title: '装货凭证',
|
||||
ui: {
|
||||
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
|
||||
fileType: 'image/png,image/jpeg,image/jpg',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'url',
|
||||
urlReName: 'url',
|
||||
widget: 'upload',
|
||||
descriptionI18n: ' 提单号',
|
||||
data: {
|
||||
// appId: environment.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: true,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
const avatar = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: args.fileList[0].response.url,
|
||||
response: {
|
||||
url: args.fileList[0].response.url
|
||||
}
|
||||
}
|
||||
];
|
||||
this.sf?.setValue('/avatar', avatar);
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 5;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
}
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
avatar2: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
|
||||
fileType: 'image/png,image/jpeg,image/jpg',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'url',
|
||||
urlReName: 'url',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '人车货照片',
|
||||
data: {
|
||||
// appId: environment.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: true,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
const avatar = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: args.fileList[0].response.url,
|
||||
response: {
|
||||
url: args.fileList[0].response.url
|
||||
}
|
||||
}
|
||||
];
|
||||
this.sf?.setValue('/avatar', avatar);
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 5;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
}
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
no4: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
},
|
||||
default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式',
|
||||
},
|
||||
avatar3: {
|
||||
type: 'string',
|
||||
title: '卸货凭证',
|
||||
ui: {
|
||||
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
|
||||
fileType: 'image/png,image/jpeg,image/jpg',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'url',
|
||||
urlReName: 'url',
|
||||
widget: 'upload',
|
||||
descriptionI18n: ' 提单号',
|
||||
data: {
|
||||
// appId: environment.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: true,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
const avatar = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: args.fileList[0].response.url,
|
||||
response: {
|
||||
url: args.fileList[0].response.url
|
||||
}
|
||||
}
|
||||
];
|
||||
this.sf?.setValue('/avatar', avatar);
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 5;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
}
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
avatar4: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
|
||||
fileType: 'image/png,image/jpeg,image/jpg',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'url',
|
||||
urlReName: 'url',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '人车货照片',
|
||||
data: {
|
||||
// appId: environment.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: true,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
const avatar = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: args.fileList[0].response.url,
|
||||
response: {
|
||||
url: args.fileList[0].response.url
|
||||
}
|
||||
}
|
||||
];
|
||||
this.sf?.setValue('/avatar', avatar);
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 5;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
}
|
||||
} as SFUploadWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['reason']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 100,
|
||||
grid: { span: 20 }
|
||||
},
|
||||
$avatar: { grid: { span: 12} },
|
||||
$avatar2: { grid: { span: 12} },
|
||||
$avatar3: { grid: { span: 12} },
|
||||
$avatar4: { grid: { span: 12} },
|
||||
};
|
||||
}
|
||||
save(value: any): void {
|
||||
console.log(value)
|
||||
// this.http.post(`/user/${this.record.id}`, value).subscribe(res => {
|
||||
// this.msgSrv.success('保存成功');
|
||||
// this.modal.close(true);
|
||||
// });
|
||||
}
|
||||
|
||||
close(): void {
|
||||
this.modal.destroy();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,12 +1,25 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 15:53:03
|
||||
* @LastEditTime: 2021-12-14 15:57:08
|
||||
* @LastEditors: your name
|
||||
* @LastEditTime: 2021-12-14 16:19:03
|
||||
* @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\modal\bulk\sure-depart\sure-depart.component.html
|
||||
-->
|
||||
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none"></sf>
|
||||
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none">
|
||||
<ng-template sf-template="no2" let-me let-ui="ui" let-schema="schema">
|
||||
<div style="display: flex;">
|
||||
<nz-input-number [(ngModel)]="data.place1" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">吨</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="no3" let-me let-ui="ui" let-schema="schema">
|
||||
<div style="display: flex;">
|
||||
<nz-input-number [(ngModel)]="data.place2" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">方</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</sf>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">关闭</button>
|
||||
|
||||
@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-14 16:00:05
|
||||
* @LastEditTime: 2021-12-14 16:34:52
|
||||
* @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\modal\bulk\update-freight\update-freight.component.ts
|
||||
@ -34,6 +34,10 @@ import { Observable, Observer } from 'rxjs';
|
||||
export class SureDepartComponent implements OnInit {
|
||||
record: any = {};
|
||||
i: any;
|
||||
data: any ={
|
||||
place1: '',
|
||||
place2: ''
|
||||
};
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema: SFSchema = {};
|
||||
ui: SFUISchema = {};
|
||||
@ -45,39 +49,45 @@ export class SureDepartComponent implements OnInit {
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
createTime: {
|
||||
title: '创建时间',
|
||||
datetime: {
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFDateWidgetSchema,
|
||||
title: '装货时间',
|
||||
format: 'date-time',
|
||||
},
|
||||
name3: {
|
||||
no2: {
|
||||
type: 'string',
|
||||
title: '投诉详情',
|
||||
maxLength: 100,
|
||||
title: '装货重量',
|
||||
ui: {
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 4, maxRows: 6 }
|
||||
} as SFTextareaWidgetSchema
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
no3: {
|
||||
type: 'string',
|
||||
title: '装货体积',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
}
|
||||
},
|
||||
no4: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
},
|
||||
default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式',
|
||||
},
|
||||
avatar: {
|
||||
type: 'string',
|
||||
title: '上传凭证',
|
||||
title: '装货凭证',
|
||||
ui: {
|
||||
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
|
||||
fileType: 'image/png,image/jpeg,image/jpg',
|
||||
limit: 5,
|
||||
limitFileCount: 5,
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'url',
|
||||
urlReName: 'url',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '不超过5张,单张大小不超过5M,支持.jpg、.jpeg和 .png格式',
|
||||
descriptionI18n: ' 提单号',
|
||||
data: {
|
||||
// appId: environment.appId,
|
||||
},
|
||||
@ -102,7 +112,55 @@ export class SureDepartComponent implements OnInit {
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 1;
|
||||
const isLt2M = file.size / 1024 / 1024 < 5;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
}
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
avatar2: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
|
||||
fileType: 'image/png,image/jpeg,image/jpg',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'url',
|
||||
urlReName: 'url',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '人车货照片',
|
||||
data: {
|
||||
// appId: environment.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: true,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
const avatar = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: args.fileList[0].response.url,
|
||||
response: {
|
||||
url: args.fileList[0].response.url
|
||||
}
|
||||
}
|
||||
];
|
||||
this.sf?.setValue('/avatar', avatar);
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 5;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过5M!');
|
||||
observer.complete();
|
||||
@ -121,7 +179,9 @@ export class SureDepartComponent implements OnInit {
|
||||
'*': {
|
||||
spanLabelFixed: 100,
|
||||
grid: { span: 20 }
|
||||
}
|
||||
},
|
||||
$avatar: { grid: { span: 12} },
|
||||
$avatar2: { grid: { span: 12} },
|
||||
};
|
||||
}
|
||||
save(value: any): void {
|
||||
|
||||
@ -20,6 +20,7 @@ import { OrderManagementVehicleDetailComponent } from './components/vehicle-deta
|
||||
|
||||
import { OrderManagementVehicleComponent } from './components/vehicle/vehicle.component';
|
||||
import { ConfirReceiptComponent } from './modal/bulk/confir-receipt/confir-receipt.component';
|
||||
import { SureArriveComponent } from './modal/bulk/sure-arrive/sure-arrive.component';
|
||||
import { SureDepartComponent } from './modal/bulk/sure-depart/sure-depart.component';
|
||||
import { UpdateFreightComponent } from './modal/bulk/update-freight/update-freight.component';
|
||||
import { OrderManagementRoutingModule } from './order-management-routing.module';
|
||||
@ -37,7 +38,8 @@ const COMPONENTS: Type<void>[] = [
|
||||
OrderManagementComplaintComponent,
|
||||
UpdateFreightComponent,
|
||||
ConfirReceiptComponent,
|
||||
SureDepartComponent
|
||||
SureDepartComponent,
|
||||
SureArriveComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:31:52
|
||||
* @LastEditTime: 2021-12-14 10:14:22
|
||||
* @LastEditors: your name
|
||||
* @LastEditTime: 2021-12-14 20:10:24
|
||||
* @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
|
||||
*/
|
||||
@ -16,7 +16,11 @@ export class SupplyManagementService extends BaseService {
|
||||
|
||||
$api_get_catalogue_member = `/user?_allow_anonymous=true`;
|
||||
$api_get_bulkPage_list = `/api/sdc/goodsResourceOperate/listBulkPage`;
|
||||
// 据 手机号/姓名 查询 车队长/司机
|
||||
$api_get_getDriverInfo = `/api/mdc/cuc/user/getDriverInfo`;
|
||||
$api_del_driver = ``;
|
||||
// 获取货主企业列表
|
||||
public $api_getList = '/api/mdc/cuc/enterpriseInfo/cargoOwner/getList?_allow_anonymous=true';
|
||||
constructor(public injector: Injector) {
|
||||
super(injector)
|
||||
}
|
||||
|
||||
@ -106,6 +106,36 @@
|
||||
<div nz-col nzSpan="12">
|
||||
<sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf>
|
||||
<sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4">
|
||||
<ng-template sf-template="freightPrice" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="addOnAfterTemplate">
|
||||
<input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" placeholder="请输入" />
|
||||
</nz-input-group>
|
||||
<ng-template #addOnAfterTemplate>
|
||||
<nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)">
|
||||
<nz-option nzLabel="元/吨" nzValue="1"></nz-option>
|
||||
<nz-option nzLabel="元/方" nzValue="2"></nz-option>
|
||||
<nz-option nzLabel="元/车" nzValue="3"></nz-option>
|
||||
</nz-select>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
<ng-template sf-template="rule" let-i let-ui="ui">
|
||||
<div class="align-center">
|
||||
<nz-select [ngModel]="i.value" (ngModelChange)="i.setValue($event)" nzPlaceHolder="运费取整规则">
|
||||
<nz-option nzLabel="保留小数" nzValue="1"></nz-option>
|
||||
<nz-option nzLabel="抹除小数" nzValue="2"></nz-option>
|
||||
<nz-option nzLabel="抹除个数" nzValue="3"></nz-option>
|
||||
</nz-select>
|
||||
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"
|
||||
><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i
|
||||
></span>
|
||||
<ng-template #template2>
|
||||
<p>例如 付司机运费 = 重量*单价 = 999.99</p>
|
||||
<p>保留小数,即 999.99</p>
|
||||
<p>抹除小数,即 999.00</p>
|
||||
<p>抹除个位,即 990.00</p>
|
||||
</ng-template>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="weight" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'吨'">
|
||||
<input
|
||||
@ -150,60 +180,11 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<div class="card-title">服务信息</div>
|
||||
<div nz-row [nzGutter]="24" style="margin: 24px 0">
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div class="align-center">
|
||||
<span style="font-weight: bolder; margin-right: 24px">购买货运险</span>
|
||||
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a>《投保告知》</a></ng-template>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="12">
|
||||
<sf #sf5 [schema]="schema5" [formData]="sf5data" [button]="'none'" [ui]="ui5">
|
||||
<ng-template sf-template="goodsValue" let-i let-ui="ui">
|
||||
<div class="align-center">
|
||||
<input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" />
|
||||
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2"
|
||||
><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i
|
||||
></span>
|
||||
<ng-template #template2>注意事项:<br/>
|
||||
|
||||
①请仔细阅读《投保告知》<br/>
|
||||
|
||||
②港澳台、西藏不在投保范围内,不予承保<br/>
|
||||
|
||||
③保价费最低收费2元,请按真实货值填写,录入的所有信息必须确保真实,不如实录入的内容,不承担对应赔偿责任。</ng-template>
|
||||
</div>
|
||||
</ng-template>
|
||||
</sf>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<div class="card-title">补充信息</div>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="12">
|
||||
<sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6"></sf>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<div class="card-title">运费信息</div>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="12">
|
||||
<sf #sf7 [schema]="schema7" [formData]="sf7data" [button]="'none'" [ui]="ui7">
|
||||
<ng-template sf-template="totalFee" let-i let-ui="ui" >
|
||||
<div *ngIf="this.PageStatus === '整车修改' || this.PageStatus === '整车下一单'">{{totalFees | currency: '¥'}}</div>
|
||||
<div *ngIf="this.PageStatus === '大宗修改' || this.PageStatus === '大宗下一单'">
|
||||
<nz-input-number [(ngModel)]="totalFees" (ngModelChange)="i.setValue($event)" [nzMin]="1" [nzStep]="0.01"></nz-input-number>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="paymentDays" let-i let-ui="ui">
|
||||
<div nz-row>
|
||||
<div class="align-center">
|
||||
|
||||
@ -27,7 +27,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
sf3data: any; // 货源单设置回显
|
||||
sf4data: any; // 货源单设置回显
|
||||
sf5data: any; // 货源单设置回显
|
||||
sf6data: any; // 货源单设置回显
|
||||
sf7data: any; // 货源单设置回显
|
||||
creatTime: any; // 货源单设置回显
|
||||
modifyTime: any; // 货源单设置回显
|
||||
@ -69,13 +68,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
schema4: SFSchema = {};
|
||||
ui4!: SFUISchema;
|
||||
|
||||
@ViewChild('sf5', { static: false }) sf5!: SFComponent;
|
||||
schema5: SFSchema = {};
|
||||
ui5!: SFUISchema;
|
||||
|
||||
@ViewChild('sf6', { static: false }) sf6!: SFComponent;
|
||||
schema6: SFSchema = {};
|
||||
ui6!: SFUISchema;
|
||||
|
||||
@ViewChild('sf7', { static: false }) sf7!: SFComponent;
|
||||
schema7: SFSchema = {};
|
||||
@ -95,9 +87,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
// this.initSF2();
|
||||
this.initSF3();
|
||||
this.initSF4();
|
||||
this.initSF5();
|
||||
this.initSF6();
|
||||
this.initSF7();
|
||||
this.initdata();
|
||||
}
|
||||
|
||||
@ -244,13 +234,52 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
initSF4() {
|
||||
this.schema4 = {
|
||||
properties: {
|
||||
freightPrice: {
|
||||
type: 'string',
|
||||
title: '运费单价',
|
||||
ui: {
|
||||
errors: { required: '请选择运费单价' },
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
freightType: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
hidden: true
|
||||
},
|
||||
default: '1'
|
||||
},
|
||||
|
||||
rule: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
errors: { required: '请选择运费取整规则' }
|
||||
}
|
||||
},
|
||||
settlementBasis: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: [
|
||||
{ label: '以收货为准', value: '1' },
|
||||
{ label: '以发货为准', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '结算依据',
|
||||
errors: { required: '请选择结算依据' }
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
weight: {
|
||||
type: 'string',
|
||||
title: '货物数量',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
errors: { required: '必填项' }
|
||||
errors: { required: '请填写总重量' }
|
||||
}
|
||||
},
|
||||
volume: {
|
||||
@ -317,13 +346,22 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
} as SFSelectWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['weight', 'maxWeight', 'maxCube']
|
||||
required: ['weight', 'maxWeight', 'maxCube', 'freightPrice', 'rule', 'settlementBasis']
|
||||
};
|
||||
this.ui4 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$freightPrice: {
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$rule: {
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$settlementBasis: {
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$weight: {
|
||||
grid: { span: 8 }
|
||||
},
|
||||
@ -342,112 +380,21 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
initSF5() {
|
||||
this.schema5 = {
|
||||
properties: {
|
||||
goodsValue: {
|
||||
type: 'string',
|
||||
title: '货物价值',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
this.ui5 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
}
|
||||
};
|
||||
changeValue() {
|
||||
this.totalFees = Number(this.sf7?.value?.appendFee) + Number(this.sf7?.value?.oilCardPay) + Number(this.sf7?.value?.prePay) + Number(this.sf7?.value?.receiptPay) + Number(this.sf7?.value?.toPay)
|
||||
console.log(this.totalFees)
|
||||
}
|
||||
|
||||
initSF6() {
|
||||
this.schema6 = {
|
||||
this.schema7 = {
|
||||
properties: {
|
||||
stateReceipt: {
|
||||
paymentDays: {
|
||||
type: 'string',
|
||||
title: '是否回单',
|
||||
enum: [
|
||||
{ label: '需要', value: true },
|
||||
{ label: '不需要', value: false }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
errors: { required: '请选择' },
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
receiptType: {
|
||||
type: 'string',
|
||||
title: '回单类型',
|
||||
enum: [
|
||||
{ label: '电子回单', value: 1 },
|
||||
{ label: '纸质回单', value: 2 }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
errors: { required: '请选择' },
|
||||
visibleIf: {
|
||||
stateReceipt: value => value === true
|
||||
}
|
||||
}
|
||||
},
|
||||
receiptUserId: {
|
||||
type: 'string',
|
||||
title: '选择地址',
|
||||
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
|
||||
placeholder: '请输入',
|
||||
errors: { required: '请输入付款承诺天数' }
|
||||
}
|
||||
},
|
||||
remarks: {
|
||||
type: 'string',
|
||||
@ -460,31 +407,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
} as SFTextareaWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['stateReceipt', 'receiptType']
|
||||
};
|
||||
this.ui6 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
}
|
||||
};
|
||||
}
|
||||
changeValue() {
|
||||
this.totalFees = Number(this.sf7?.value?.appendFee) + Number(this.sf7?.value?.oilCardPay) + Number(this.sf7?.value?.prePay) + Number(this.sf7?.value?.receiptPay) + Number(this.sf7?.value?.toPay)
|
||||
console.log(this.totalFees)
|
||||
}
|
||||
initSF7() {
|
||||
this.schema7 = {
|
||||
properties: {
|
||||
totalFee: {
|
||||
type: 'string',
|
||||
title: '总费用',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
}
|
||||
}
|
||||
required: ['paymentDays']
|
||||
};
|
||||
this.ui7 = {
|
||||
'*': {
|
||||
@ -494,6 +417,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
addStartInfo(event: any) {
|
||||
if (this.startInfo.length < 5) {
|
||||
const controlId = this.startInfo.length;
|
||||
@ -567,20 +491,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
submit(): void {
|
||||
console.log('进来了')
|
||||
console.log(this.startInfo)
|
||||
debugger;
|
||||
// Object.keys(this.validateForm1.controls).forEach(key => {
|
||||
// this.validateForm1.controls[key].markAsDirty();
|
||||
// this.validateForm1.controls[key].updateValueAndValidity();
|
||||
// });
|
||||
// this.sf1.validator({ emitError: true });
|
||||
// this.sf3.validator({ emitError: true });
|
||||
// this.sf4.validator({ emitError: true });
|
||||
// this.sf6.validator({ emitError: true });
|
||||
// if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) {
|
||||
// return;
|
||||
// }
|
||||
if(typeof(this.validateForm1.value.modifyTime) !== 'string' ) {
|
||||
var c = new Date(this.validateForm1.value.modifyTime);
|
||||
this.validateForm1.value.modifyTime = c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds()
|
||||
@ -592,14 +503,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
// if (this.validateForm1.invalid) {
|
||||
// return;
|
||||
// }
|
||||
if(this.validateForm1?.value?.createTime) {
|
||||
this.startInfo.createTime = this.validateForm1?.value?.createTime
|
||||
this.startInfo.modifyTime = this.validateForm1?.value?.modifyTime
|
||||
}
|
||||
const params: any = {
|
||||
...this.sf1.value,
|
||||
...this.sf5.value,
|
||||
...this.sf6.value,
|
||||
...this.sf7.value,
|
||||
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,],
|
||||
goodsInfoDTOList: [
|
||||
{
|
||||
@ -756,41 +662,37 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
goodsName: res?.goodsInfoVOList[0]?.goodsName || '',
|
||||
}
|
||||
this.sf4data = {
|
||||
weight: res?.goodsInfoVOList[0]?.weight || '',
|
||||
volume: res?.goodsInfoVOList[0]?.volume || '',
|
||||
vehicleDemand: res?.goodsInfoVOList[0]?.vehicleDemand || '',
|
||||
maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') || '',
|
||||
// weight: res?.goodsInfoVOList[0]?.weight || '',
|
||||
// volume: res?.goodsInfoVOList[0]?.volume || '',
|
||||
// vehicleDemand: res?.goodsInfoVOList[0]?.vehicleDemand || '',
|
||||
// maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') || '',
|
||||
// maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') || '',
|
||||
// number: res?.goodsInfoVOList[0]?.number || '',
|
||||
// goodsType: res?.goodsInfoVOList[0]?.goodsType || '',
|
||||
// modifyTime: res?.goodsInfoVOList[0]?.modifyTime || '',
|
||||
// modifyUserId: res?.goodsInfoVOList[0]?.modifyUserId || '',
|
||||
// resourceId: res?.goodsInfoVOList[0]?.resourceId || '',
|
||||
// rule: res?.goodsInfoVOList[0]?.rule || '',
|
||||
// settlementBasis: res?.goodsInfoVOList[0]?.settlementBasis || '',
|
||||
|
||||
freightPrice: res?.goodsInfoVOList[0]?.freightPrice || '',
|
||||
freightType: res?.goodsInfoVOList[0]?.freightType || '',
|
||||
rule: res?.goodsInfoVOList[0]?.rule || '',
|
||||
settlementBasis: res?.goodsInfoVOList[0]?.settlementBasis || '',
|
||||
weight: res?.goodsInfoVOList[0]?.weight || '',
|
||||
volume: res?.goodsInfoVOList[0]?.volume || '',
|
||||
number: res?.goodsInfoVOList[0]?.number || '',
|
||||
maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') || '',
|
||||
number: res?.goodsInfoVOList[0]?.number || '',
|
||||
goodsType: res?.goodsInfoVOList[0]?.goodsType || '',
|
||||
modifyTime: res?.goodsInfoVOList[0]?.modifyTime || '',
|
||||
modifyUserId: res?.goodsInfoVOList[0]?.modifyUserId || '',
|
||||
resourceId: res?.goodsInfoVOList[0]?.resourceId || '',
|
||||
rule: res?.goodsInfoVOList[0]?.rule || '',
|
||||
settlementBasis: res?.goodsInfoVOList[0]?.settlementBasis || '',
|
||||
maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') || ''
|
||||
|
||||
}
|
||||
if(this.PageStatus === '大宗修改') {
|
||||
this.sf4data.id = res?.goodsInfoVOList[0]?.id;
|
||||
}
|
||||
this.totalFees = res?.freightPrice || '0';
|
||||
this.sf5data = {
|
||||
goodsValue: res?.goodsValue || '',
|
||||
}
|
||||
this.sf6data = {
|
||||
stateReceipt: res?.supplementaryInformationVO?.stateReceipt || '',
|
||||
receiptType: res?.supplementaryInformationVO?.receiptType || '',
|
||||
receiptUserId: res?.supplementaryInformationVO?.receiptUserId || '',
|
||||
remarks: res?.supplementaryInformationVO?.remarks || ''
|
||||
};
|
||||
this.sf7data = {
|
||||
prePay: res?.shippingInformationVO?.prePay || '',
|
||||
toPay: res?.shippingInformationVO?.toPay || '',
|
||||
oilCardPay: res?.shippingInformationVO?.oilCardPay || '',
|
||||
receiptPay: res?.shippingInformationVO?.receiptPay || '',
|
||||
// subtotal: res?.shippingInformationVO?.oilCardPay || '',
|
||||
appendFee: res?.shippingInformationVO?.appendFee || '',
|
||||
paymentDays: res?.shippingInformationVO?.paymentDays || '',
|
||||
}
|
||||
paymentDays: res?.paymentDays || '',
|
||||
remarks: res?.remarks || ''
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 20:08:17
|
||||
* @LastEditTime: 2021-12-14 20:09:50
|
||||
* @LastEditors: your name
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\onecar-publish\address-list\address-list.component.html
|
||||
-->
|
||||
<st
|
||||
#st
|
||||
[bordered]="true"
|
||||
[data]="service.$api_getList"
|
||||
[columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: reqProcess }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500"
|
||||
[loading]="service.http.loading"
|
||||
[widthMode]="{ type: 'strict' }"
|
||||
(change)="change($event)"
|
||||
>
|
||||
<ng-template st-row="region" let-item let-index="index"> {{ item.province }}-{{ item.city }}-{{ item.area }} </ng-template>
|
||||
</st>
|
||||
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 20:08:17
|
||||
* @LastEditTime: 2021-12-14 20:08: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\supply-management\components\onecar-publish\address-list\address-list.component.ts
|
||||
*/
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STChange, STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
|
||||
import { processSingleSort } from '@shared';
|
||||
import { NzDrawerService } from 'ng-zorro-antd/drawer';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SupplyManagementService } from 'src/app/routes/order-management/services/order-management.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-publish-address-list',
|
||||
templateUrl: './address-list.component.html'
|
||||
})
|
||||
export class PublishAddressListComponent implements OnInit {
|
||||
columns!: STColumn[];
|
||||
@ViewChild('st', { static: false })
|
||||
st!: STComponent;
|
||||
|
||||
seleteData: any;
|
||||
|
||||
spuStatus = '1'; // '1'客户地址,'2'收回单地址
|
||||
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
private drawerService: NzDrawerService,
|
||||
public service: SupplyManagementService,
|
||||
private modalService: NzModalService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
return {
|
||||
type: this.spuStatus
|
||||
};
|
||||
}
|
||||
ngOnInit() {
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '', index: 'id', type: 'radio', width: 70 },
|
||||
{
|
||||
title: '省市区',
|
||||
render: 'region'
|
||||
},
|
||||
{
|
||||
title: '详细地址',
|
||||
index: 'detailedAddress'
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
index: 'contactName'
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
index: 'contactTelephone'
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
index: 'modifyTime'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
// 排序
|
||||
reqProcess(requestOptions: STRequestOptions): STRequestOptions {
|
||||
return processSingleSort(requestOptions);
|
||||
}
|
||||
|
||||
change(ret: STChange): void {
|
||||
console.log('change', ret);
|
||||
this.seleteData = { ...ret.radio };
|
||||
}
|
||||
}
|
||||
@ -206,7 +206,17 @@
|
||||
<div class="card-title">补充信息</div>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="12">
|
||||
<sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6"></sf>
|
||||
<sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6">
|
||||
<ng-template sf-template="receiptUserId" let-i let-ui="ui">
|
||||
<input
|
||||
nz-input
|
||||
[ngModel]="i.value"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="请点击选择收回单地址"
|
||||
(click)="backBillChange()"
|
||||
/>
|
||||
</ng-template>
|
||||
</sf>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
@ -15,6 +15,7 @@ import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
|
||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||
import { debug } from 'console';
|
||||
import { PublishAddressListComponent } from './address-list/address-list.component';
|
||||
@Component({
|
||||
selector: 'app-publish-goods-onecar-publish',
|
||||
templateUrl: './onecar-publish.component.html',
|
||||
@ -396,7 +397,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
placeholder: '请点击选择收回单地址',
|
||||
validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
receiptType: value => value === 2
|
||||
}
|
||||
},
|
||||
default: '1212'
|
||||
@ -406,7 +407,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
title: '联系人',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
receiptType: value => value === 2
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
@ -416,7 +417,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
title: '联系电话',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
receiptType: value => value === 2
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
@ -426,7 +427,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
title: '所在地区',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
receiptType: value => value === 2
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
@ -437,7 +438,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
maxLength: 20,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
receiptType: value => value === 2
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
@ -628,6 +629,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
...this.sf1.value,
|
||||
...this.sf5.value,
|
||||
...this.sf6.value,
|
||||
paymentDays: this.sf7.value.paymentDays,
|
||||
loadingTime: this.validateForm1?.value?.loadingTime,
|
||||
unloadingTime: this.validateForm1?.value?.unloadingTime,
|
||||
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,],
|
||||
@ -831,7 +833,23 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
receiptPay: res?.shippingInformationVO?.receiptPay ,
|
||||
// subtotal: res?.shippingInformationVO?.oilCardPay ,
|
||||
appendFee: res?.shippingInformationVO?.appendFee ,
|
||||
paymentDays: res?.shippingInformationVO?.paymentDays ,
|
||||
paymentDays: res?.paymentDays ,
|
||||
}
|
||||
}
|
||||
backBillChange() {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '选择收回单地址',
|
||||
nzContent: PublishAddressListComponent,
|
||||
nzWidth: 900,
|
||||
nzComponentParams: { spuStatus: '2' },
|
||||
nzOnOk: item => {
|
||||
const data = item.seleteData;
|
||||
if (JSON.stringify(data) === '{}') return;
|
||||
this.sf6.setValue('/name4', data.contactName);
|
||||
this.sf6.setValue('/name5', data.contactTelephone);
|
||||
this.sf6.setValue('/name6', `${data.province}-${data.city}-${data.area}`);
|
||||
this.sf6.setValue('/receiptAddress', data.detailedAddress);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 11:10:14
|
||||
* @LastEditTime: 2021-12-13 15:39:52
|
||||
* @LastEditTime: 2021-12-14 20:09:41
|
||||
* @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\services\supply-management.service.ts
|
||||
@ -37,6 +37,8 @@ export class SupplyManagementService extends BaseService {
|
||||
$api_get_listModifyPrice = `/api/sdc/goodsInfo/listModifyPrice`;
|
||||
$api_update_price = `/api/sdc/goodsInfo/modifyPrice`; // 根据货物ID修改单价
|
||||
$api_get_goods_resource_statistical = `/api/sdc/goodsResourceOperate/StatisticalStatus`; // 统计整车、大宗货源状态数量
|
||||
// 获取货主企业列表
|
||||
public $api_getList = '/api/mdc/cuc/enterpriseInfo/cargoOwner/getList?_allow_anonymous=true';
|
||||
constructor(public injector: Injector) {
|
||||
super(injector)
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@ import { PublishGoodsChooseFamifiarComponent } from './components/choose-famifia
|
||||
import { PublishchooseFamifiarSetCaptainComponent } from './components/choose-famifiar/set-captain/set-captain.component';
|
||||
import { PublishchooseFamifiarAddComponent } from './components/choose-famifiar/add/add.component';
|
||||
import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/bulk-publish.component';
|
||||
import { PublishAddressListComponent } from './components/onecar-publish/address-list/address-list.component';
|
||||
|
||||
const COMPONENTS: Type<void>[] = [
|
||||
SupplyManagementIndexComponent,
|
||||
@ -45,7 +46,7 @@ const COMPONENTS: Type<void>[] = [
|
||||
PublishchooseFamifiarSetCaptainComponent,
|
||||
PublishchooseFamifiarAddComponent,
|
||||
SupplyManagementBulkPublishComponent,
|
||||
|
||||
PublishAddressListComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
nz-select-top-control {
|
||||
padding-left: 0px !important;
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,8 +31,8 @@
|
||||
min-width: 250px;
|
||||
|
||||
nz-select-top-control {
|
||||
cursor: text !important;
|
||||
color : #000 !important;
|
||||
cursor: text !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,18 +54,18 @@
|
||||
|
||||
.image-hover {
|
||||
.delete-icon {
|
||||
border-radius : 50%;
|
||||
color : #F55656;
|
||||
font-size : 28px;
|
||||
position : absolute;
|
||||
top : -15px;
|
||||
right : -15px;
|
||||
background-color: #ffffff;
|
||||
color : #F55656;
|
||||
font-size : 28px;
|
||||
background-color: #fff;
|
||||
border-radius : 50%;
|
||||
cursor : pointer;
|
||||
}
|
||||
|
||||
.show-icon {
|
||||
color : #ffffff;
|
||||
color : #fff;
|
||||
font-size: 30px;
|
||||
cursor : pointer;
|
||||
}
|
||||
@ -76,33 +76,33 @@
|
||||
}
|
||||
|
||||
.mask {
|
||||
position : absolute;
|
||||
width : 200px;
|
||||
height : 160px;
|
||||
margin-top : -160px;
|
||||
background-color : #4F4F4F;
|
||||
opacity : 0;
|
||||
position : absolute;
|
||||
// top : 6px;
|
||||
// left : 12px;
|
||||
border-radius : 6px;
|
||||
margin-top : -160px;
|
||||
opacity : 0;
|
||||
}
|
||||
|
||||
.mask-over {
|
||||
position : absolute;
|
||||
display : flex;
|
||||
align-items : center;
|
||||
justify-content : center;
|
||||
width : 200px;
|
||||
height : 160px;
|
||||
position : absolute;
|
||||
margin-top : -160px;
|
||||
// top : 6px;
|
||||
// left : 12px;
|
||||
border-radius : 6px;
|
||||
display : flex;
|
||||
justify-content : center;
|
||||
align-items : center;
|
||||
margin-top : -160px;
|
||||
|
||||
label {
|
||||
color : #FFF;
|
||||
font-size : 20px;
|
||||
line-height : 24px;
|
||||
letter-spacing: 0.7px;
|
||||
color : #FFFFFF;
|
||||
}
|
||||
}
|
||||
@ -7,27 +7,52 @@
|
||||
</button>
|
||||
</ng-template>
|
||||
<ng-template #content>
|
||||
<sv-container col="1">
|
||||
<sv-title style="font-weight: 700;">待审核
|
||||
<div style="float: right;">
|
||||
<ng-container *ngIf="!isEdit">
|
||||
<button nz-button nzType="default" nzDanger (click)="ratify()">修改</button>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="isEdit">
|
||||
<button nz-button nzType="default" (click)="reset()">取消</button>
|
||||
<button nz-button nzType="default" (click)="save()" nzDanger>保存</button>
|
||||
</ng-container>
|
||||
</div>
|
||||
</sv-title>
|
||||
</sv-container>
|
||||
|
||||
<sv-container col="3">
|
||||
<sv-title style="font-weight: 700;">车辆基础信息</sv-title>
|
||||
<sv label="车牌号">
|
||||
{{ detailData?.carNo }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carNo" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="车牌颜色">
|
||||
{{ detailData?.carNoColor }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carNoColor" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="车型">
|
||||
{{ detailData?.carModel }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carModel" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="车长">
|
||||
{{ detailData?.carLength }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carLength" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="是否为挂车">
|
||||
{{ detailData?.isTrailer === true ? '是' : '否'}}
|
||||
<nz-select [(ngModel)]="detailData.isTrailer" [nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit"
|
||||
[nzShowArrow]="isEdit" [nzDisabled]="!isEdit">
|
||||
<nz-option [nzValue]="false" nzLabel="否"></nz-option>
|
||||
<nz-option [nzValue]="true" nzLabel="是"></nz-option>
|
||||
</nz-select>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<sv-container col="1">
|
||||
<sv label="车头照">
|
||||
<app-imagelist [imgList]="[detailData?.carFrontPhotoWatermark, detailData?.carFrontPhotoWatermark]"></app-imagelist>
|
||||
<!-- <app-imagelist [imgList]="[detailData?.carFrontPhotoWatermark, detailData?.carFrontPhotoWatermark]"></app-imagelist> -->
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.carFrontPhotoWatermark,key:'carFrontPhotoWatermark'}">
|
||||
</ng-container>
|
||||
</sv>
|
||||
</sv-container>
|
||||
</ng-template>
|
||||
@ -36,73 +61,98 @@
|
||||
<sv-container col="3">
|
||||
<sv-title style="font-weight: 700;">行驶证信息</sv-title>
|
||||
<sv label="档案编号">
|
||||
{{ detailData?.archivesNo }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.archivesNo" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="准驾车型">
|
||||
{{ detailData?.carModel }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carModel" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="行驶证注册日期">
|
||||
{{ detailData?.driverLicenseRegisterTime }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.driverLicenseRegisterTime" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
<sv-container col="2">
|
||||
<sv label="行驶证到期日">
|
||||
{{ detailData?.driverLicenseEndTime }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.driverLicenseEndTime" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="行驶证签发机关">
|
||||
{{ detailData?.driverLicenseSigningOrg }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.driverLicenseSigningOrg" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
<sv-container col="3">
|
||||
<sv label="行驶证发证日期">
|
||||
{{ detailData?.driverLicenseGetTime }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.driverLicenseGetTime" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="车辆识别代码">
|
||||
{{ detailData?.carDistinguishCode }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carDistinguishCode" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="使用性质">
|
||||
{{ detailData?.useNature === '1' ? '营运' : '非营运'}}
|
||||
<nz-select [(ngModel)]="detailData.useNature" [nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit"
|
||||
[nzShowArrow]="isEdit" [nzDisabled]="!isEdit">
|
||||
<nz-option [nzValue]="1" nzLabel="营运"></nz-option>
|
||||
<nz-option [nzValue]="0" nzLabel="非营运"></nz-option>
|
||||
</nz-select>
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
<sv-container col="3">
|
||||
<sv label="载重(吨)">
|
||||
{{ detailData?.carLoad }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carLoad" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="整备质量">
|
||||
{{ detailData?.curbWeight }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.curbWeight" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="所有人">
|
||||
{{ detailData?.carOwner }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.carOwner" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
</sv-container>
|
||||
<sv-container col="1">
|
||||
<sv label="自有载具">
|
||||
{{ detailData?.contactsName }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.contactsName" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="行驶证照片">
|
||||
<app-imagelist [imgList]="[detailData?.certificatePhotoFront,detailData?.certificatePhotoBack,detailData?.certificatePhotoFrontWatermark,detailData?.certificatePhotoBackWatermark]"></app-imagelist>
|
||||
<!-- <app-imagelist [imgList]="[detailData?.certificatePhotoFront,detailData?.certificatePhotoBack,detailData?.certificatePhotoFrontWatermark,detailData?.certificatePhotoBackWatermark]"></app-imagelist> -->
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFront,key:'carFrontPhotoWatermark'}">
|
||||
</ng-container>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
<sv-container col="3" class="mt16">
|
||||
<sv-title style="font-weight: 700;">道路运输证信息</sv-title>
|
||||
<sv label="道路运输证号">
|
||||
{{ detailData?.roadTransportNo }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.roadTransportNo" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="经营许可证号">
|
||||
{{ detailData?.roadTransportLicenceNo }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.roadTransportLicenceNo" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="发证日期">
|
||||
{{ detailData?.roadTransportStartTime }}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.roadTransportStartTime" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="有效期至">
|
||||
{{detailData?.roadTransportEndTime}}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.roadTransportEndTime" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="道路运输证照片">
|
||||
<app-imagelist [imgList]="[detailData?.roadTransportPhoto,detailData?.roadTransportPhotoWatermark ]"></app-imagelist>
|
||||
<!-- <app-imagelist [imgList]="[detailData?.roadTransportPhoto,detailData?.roadTransportPhotoWatermark ]"></app-imagelist> -->
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFront,key:'carFrontPhotoWatermark'}">
|
||||
</ng-container>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
@ -152,4 +202,26 @@
|
||||
<button nz-button nzType="default" (click)="handleCancel('2')">取消</button>
|
||||
<button nz-button nzType="primary" (click)="handleOK()">确定</button>
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
</nz-modal>
|
||||
|
||||
<ng-template #uploadTemplate let-image="image" let-key="key" let-hover="hover">
|
||||
<nz-upload class="avatar-uploader" [nzAction]="uploadURl" nzName="multipartFile" nzListType="picture-card"
|
||||
[nzShowUploadList]="false" nzFileType="image/png,image/jpeg,image/jpg,image/gif"
|
||||
[nzDisabled]="!isEdit || disabledUpload" (nzChange)="changeUpload($event,key)">
|
||||
<ng-container *ngIf="!image && isEdit">
|
||||
<i class="upload-icon" nz-icon [nzType]="service.http.loading ? 'loading' : 'plus'"></i>
|
||||
<div class="ant-upload-text">上传</div>
|
||||
</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;" />
|
||||
<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>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<i nz-icon nzType="eye" nzTheme="fill" class="show-icon" (click)="showImg(image)"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nz-upload>
|
||||
</ng-template>
|
||||
@ -7,6 +7,9 @@ import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { VehicleService } from '../../../services/vehicle.service';
|
||||
import { VehicleComponentsListEditComponent } from '../edit/edit.component';
|
||||
import { VehicleImgViewComponent } from '../img-view/img-view.component';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { ImageViewComponent } from 'src/app/shared/components/imagelist';
|
||||
|
||||
@Component({
|
||||
selector: 'app-supplier-components-list-view',
|
||||
@ -19,17 +22,21 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
@ViewChild('st', { static: false }) st!: STComponent;
|
||||
isShow = false;
|
||||
isVisible = false;
|
||||
isEdit = false;
|
||||
modalTitle = '有效期';
|
||||
modalName = '';
|
||||
ui!: SFUISchema;
|
||||
columns!: STColumn[];
|
||||
detailData: any;
|
||||
uploadURl = apiConf.waterFileUpload;
|
||||
schema!: SFSchema;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema1!: SFSchema;
|
||||
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
|
||||
validData: any = ['suppliersType'];
|
||||
suppliersData: any = {};
|
||||
disabledUpload = false;
|
||||
detailData: any = this.getDetailList();
|
||||
tempalateData :any;
|
||||
|
||||
constructor(
|
||||
private http: _HttpClient,
|
||||
@ -38,6 +45,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
private route: ActivatedRoute,
|
||||
private modalHelper: ModalHelper,
|
||||
private msgSrv: NzMessageService,
|
||||
private nzModalService: NzModalService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
@ -145,6 +153,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
this.service.request(`${this.service.$api_get_operate_get}`, params).subscribe((res) => {
|
||||
console.log(res)
|
||||
this.detailData = res;
|
||||
this.tempalateData = res;
|
||||
})
|
||||
}
|
||||
|
||||
@ -177,4 +186,65 @@ export class VehicleComponentsListDetailComponent implements OnInit {
|
||||
handleOK() {
|
||||
|
||||
}
|
||||
ratify() {
|
||||
this.isEdit = true;
|
||||
}
|
||||
changeUpload({ file, fileList, type }: any, key: string) {
|
||||
console.log({ file, fileList, type });
|
||||
if (type === 'success') {
|
||||
this.detailData[key] = file.response.data.fullFileWatermarkPath;
|
||||
}
|
||||
}
|
||||
deleteImg(key: string) {
|
||||
this.nzModalService.warning({
|
||||
nzTitle: '是否确认删除该图片',
|
||||
nzOnOk: () => {
|
||||
this.disabledUpload = true;
|
||||
this.detailData[key] = '';
|
||||
setTimeout(() => {
|
||||
this.disabledUpload = false;
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
showImg(url: any) {
|
||||
const params = {
|
||||
imgList: [url],
|
||||
index: 0
|
||||
};
|
||||
this.nzModalService.create({ nzContent: ImageViewComponent, nzComponentParams: { params } });
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.detailData = { ...this.tempalateData };
|
||||
this.isEdit = false;
|
||||
}
|
||||
|
||||
save() {
|
||||
this.isEdit = false;
|
||||
}
|
||||
private initData() {
|
||||
return {
|
||||
carNo: '',
|
||||
carNoColor: '',
|
||||
carModel: '',
|
||||
carLength: '',
|
||||
archivesNo: '',
|
||||
driverLicenseSigningOrg: '',
|
||||
carDistinguishCode: '',
|
||||
carLoad: '',
|
||||
curbWeight: '',
|
||||
roadTransportNo: '',
|
||||
roadTransportLicenceNo: '',
|
||||
carOwner: '',
|
||||
isTrailer: null,
|
||||
useNature: null,
|
||||
driverLicenseRegisterTime: null,
|
||||
driverLicenseGetTime: null,
|
||||
driverLicenseEndTime: null,
|
||||
roadTransportStartTime: null,
|
||||
roadTransportEndTime: null,
|
||||
carFrontPhotoWatermark: ''
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ const COMPONENTS = [
|
||||
VehicleComponentsListEditComponent,
|
||||
VehicleImgViewComponent,
|
||||
VehicleComponentsAuditComponent,
|
||||
VehicleComponentsAuditDetailComponent
|
||||
VehicleComponentsAuditDetailComponent,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
Reference in New Issue
Block a user