fix bug
This commit is contained in:
@ -8,6 +8,7 @@ import { SupplyManagementService } from '../../services/order-management.service
|
|||||||
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
|
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
|
||||||
import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component';
|
import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component';
|
||||||
import { SureDepartComponent } from '../../modal/bulk/sure-depart/sure-depart.component';
|
import { SureDepartComponent } from '../../modal/bulk/sure-depart/sure-depart.component';
|
||||||
|
import { SureArriveComponent } from '../../modal/bulk/sure-arrive/sure-arrive.component';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -415,6 +416,10 @@ export class OrderManagementBulkComponent implements OnInit {
|
|||||||
text: '确认发车',
|
text: '确认发车',
|
||||||
click: (_record) => this.sureDepart(_record),
|
click: (_record) => this.sureDepart(_record),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: '确认到车',
|
||||||
|
click: (_record) => this.sureArrive(_record),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -605,6 +610,19 @@ export class OrderManagementBulkComponent implements OnInit {
|
|||||||
nzFooter: null
|
nzFooter: null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// *变更运费
|
||||||
|
|
||||||
|
sureArrive(item: any) {
|
||||||
|
const modalRef = this.modal.create({
|
||||||
|
nzTitle: '确认到车',
|
||||||
|
nzWidth: '50%',
|
||||||
|
nzContent: SureArriveComponent,
|
||||||
|
nzComponentParams: {
|
||||||
|
i: item
|
||||||
|
},
|
||||||
|
nzFooter: null
|
||||||
|
});
|
||||||
|
}
|
||||||
userAction() {
|
userAction() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
* @Author: your name
|
||||||
* @Date: 2021-12-14 15:53:03
|
* @Date: 2021-12-14 15:53:03
|
||||||
* @LastEditTime: 2021-12-14 15:57:08
|
* @LastEditTime: 2021-12-14 16:19:03
|
||||||
* @LastEditors: your name
|
* @LastEditors: Please set LastEditors
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\sure-depart\sure-depart.component.html
|
* @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">
|
<div class="modal-footer">
|
||||||
<button nz-button type="button" (click)="close()">关闭</button>
|
<button nz-button type="button" (click)="close()">关闭</button>
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
|
|||||||
/*
|
/*
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-12-14 14:03:07
|
* @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
|
* @LastEditors: Please set LastEditors
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts
|
* @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 {
|
export class SureDepartComponent implements OnInit {
|
||||||
record: any = {};
|
record: any = {};
|
||||||
i: any;
|
i: any;
|
||||||
|
data: any ={
|
||||||
|
place1: '',
|
||||||
|
place2: ''
|
||||||
|
};
|
||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
schema: SFSchema = {};
|
schema: SFSchema = {};
|
||||||
ui: SFUISchema = {};
|
ui: SFUISchema = {};
|
||||||
@ -45,39 +49,45 @@ export class SureDepartComponent implements OnInit {
|
|||||||
initSF() {
|
initSF() {
|
||||||
this.schema = {
|
this.schema = {
|
||||||
properties: {
|
properties: {
|
||||||
createTime: {
|
datetime: {
|
||||||
title: '创建时间',
|
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
title: '装货时间',
|
||||||
widget: 'date',
|
format: 'date-time',
|
||||||
mode: 'range',
|
|
||||||
format: 'yyyy-MM-dd',
|
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value,
|
|
||||||
},
|
|
||||||
} as SFDateWidgetSchema,
|
|
||||||
},
|
},
|
||||||
name3: {
|
no2: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '投诉详情',
|
title: '装货重量',
|
||||||
maxLength: 100,
|
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'textarea',
|
widget: 'custom',
|
||||||
autosize: { minRows: 4, maxRows: 6 }
|
}
|
||||||
} as SFTextareaWidgetSchema
|
},
|
||||||
|
no3: {
|
||||||
|
type: 'string',
|
||||||
|
title: '装货体积',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
no4: {
|
||||||
|
type: 'string',
|
||||||
|
title: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'text',
|
||||||
|
},
|
||||||
|
default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式',
|
||||||
},
|
},
|
||||||
avatar: {
|
avatar: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '上传凭证',
|
title: '装货凭证',
|
||||||
ui: {
|
ui: {
|
||||||
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
|
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
|
||||||
fileType: 'image/png,image/jpeg,image/jpg',
|
fileType: 'image/png,image/jpeg,image/jpg',
|
||||||
limit: 5,
|
limit: 1,
|
||||||
limitFileCount: 5,
|
limitFileCount: 1,
|
||||||
resReName: 'url',
|
resReName: 'url',
|
||||||
urlReName: 'url',
|
urlReName: 'url',
|
||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
descriptionI18n: '不超过5张,单张大小不超过5M,支持.jpg、.jpeg和 .png格式',
|
descriptionI18n: ' 提单号',
|
||||||
data: {
|
data: {
|
||||||
// appId: environment.appId,
|
// appId: environment.appId,
|
||||||
},
|
},
|
||||||
@ -102,7 +112,55 @@ export class SureDepartComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
beforeUpload: (file: any, _fileList: any) => {
|
beforeUpload: (file: any, _fileList: any) => {
|
||||||
return new Observable((observer: Observer<boolean>) => {
|
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) {
|
if (!isLt2M) {
|
||||||
this.service.msgSrv.warning('图片大小超过5M!');
|
this.service.msgSrv.warning('图片大小超过5M!');
|
||||||
observer.complete();
|
observer.complete();
|
||||||
@ -121,7 +179,9 @@ export class SureDepartComponent implements OnInit {
|
|||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 100,
|
spanLabelFixed: 100,
|
||||||
grid: { span: 20 }
|
grid: { span: 20 }
|
||||||
}
|
},
|
||||||
|
$avatar: { grid: { span: 12} },
|
||||||
|
$avatar2: { grid: { span: 12} },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
save(value: any): void {
|
save(value: any): void {
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import { OrderManagementVehicleDetailComponent } from './components/vehicle-deta
|
|||||||
|
|
||||||
import { OrderManagementVehicleComponent } from './components/vehicle/vehicle.component';
|
import { OrderManagementVehicleComponent } from './components/vehicle/vehicle.component';
|
||||||
import { ConfirReceiptComponent } from './modal/bulk/confir-receipt/confir-receipt.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 { SureDepartComponent } from './modal/bulk/sure-depart/sure-depart.component';
|
||||||
import { UpdateFreightComponent } from './modal/bulk/update-freight/update-freight.component';
|
import { UpdateFreightComponent } from './modal/bulk/update-freight/update-freight.component';
|
||||||
import { OrderManagementRoutingModule } from './order-management-routing.module';
|
import { OrderManagementRoutingModule } from './order-management-routing.module';
|
||||||
@ -37,7 +38,8 @@ const COMPONENTS: Type<void>[] = [
|
|||||||
OrderManagementComplaintComponent,
|
OrderManagementComplaintComponent,
|
||||||
UpdateFreightComponent,
|
UpdateFreightComponent,
|
||||||
ConfirReceiptComponent,
|
ConfirReceiptComponent,
|
||||||
SureDepartComponent
|
SureDepartComponent,
|
||||||
|
SureArriveComponent
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
Reference in New Issue
Block a user