fix bug
This commit is contained in:
@ -532,7 +532,6 @@ export class OrderManagementBulkComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取录单员
|
|
||||||
getCatalogueMember() {
|
getCatalogueMember() {
|
||||||
const params = {
|
const params = {
|
||||||
};
|
};
|
||||||
|
|||||||
@ -0,0 +1,67 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-12-14 14:03:07
|
||||||
|
* @LastEditTime: 2021-12-14 15:43:01
|
||||||
|
* @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.html
|
||||||
|
-->
|
||||||
|
<nz-alert
|
||||||
|
style="padding-bottom: 15px;"
|
||||||
|
nzType="warning"
|
||||||
|
nzCloseable
|
||||||
|
nzMessage="签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。"
|
||||||
|
></nz-alert>
|
||||||
|
<sv-container col="1">
|
||||||
|
<sv label="货物单价">
|
||||||
|
<span>
|
||||||
|
100元/吨
|
||||||
|
100元/方
|
||||||
|
100元/车</span>
|
||||||
|
</sv>
|
||||||
|
<sv label="结算依据">
|
||||||
|
<div style="display: flex; justify-content: space-between;">
|
||||||
|
<div>以发货为准 / 以收货为准</div>
|
||||||
|
<div>保留小数/抹除小数/抹除个数</div>
|
||||||
|
</div>
|
||||||
|
</sv>
|
||||||
|
|
||||||
|
</sv-container>
|
||||||
|
<sv-container col="2">
|
||||||
|
<sv label="装货重量">
|
||||||
|
<div>xx吨</div>
|
||||||
|
</sv>
|
||||||
|
<sv label="装货体积">
|
||||||
|
<div>xx吨</div>
|
||||||
|
</sv>
|
||||||
|
</sv-container>
|
||||||
|
<sv-container col="2">
|
||||||
|
<sv label="卸货重量">
|
||||||
|
<div>xx吨</div>
|
||||||
|
</sv>
|
||||||
|
<sv label="卸货体积">
|
||||||
|
<div>xx吨</div>
|
||||||
|
</sv>
|
||||||
|
</sv-container>
|
||||||
|
<sv-container col="1">
|
||||||
|
<sv label="总运费">
|
||||||
|
<div>1000元 </div>
|
||||||
|
</sv>
|
||||||
|
<sv label="司机车辆">
|
||||||
|
<div>张三 / 18888888888 / 粤GJ401</div>
|
||||||
|
</sv>
|
||||||
|
<sv label="收款人">
|
||||||
|
<div>李四 / 1888888888</div>
|
||||||
|
</sv>
|
||||||
|
<sv label="回单凭证">
|
||||||
|
<!-- <app-imagelist
|
||||||
|
[imgList]="[userIdentityDetail?.certificatePhotoFrontWatermark,userIdentityDetail?.certificatePhotoBackWatermark]">
|
||||||
|
</app-imagelist> -->
|
||||||
|
</sv>
|
||||||
|
</sv-container>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button nz-button type="button" (click)="close()">关闭</button>
|
||||||
|
<button nz-button type="submit" nzType="primary" (click)="save()" [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,53 @@
|
|||||||
|
import { preloaderFinished } from '@delon/theme';
|
||||||
|
/*
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-12-14 14:03:07
|
||||||
|
* @LastEditTime: 2021-12-14 15:43:12
|
||||||
|
* @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,
|
||||||
|
SFNumberWidgetSchema,
|
||||||
|
SFRadioWidgetSchema,
|
||||||
|
SFSchema,
|
||||||
|
SFSelectWidgetSchema,
|
||||||
|
SFTextareaWidgetSchema,
|
||||||
|
SFUISchema
|
||||||
|
} from '@delon/form';
|
||||||
|
import { _HttpClient } from '@delon/theme';
|
||||||
|
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||||
|
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-order-management-confir-receipt',
|
||||||
|
templateUrl: './confir-receipt.component.html',
|
||||||
|
styleUrls: ['./confir-receipt.component.less']
|
||||||
|
})
|
||||||
|
export class ConfirReceiptComponent implements OnInit {
|
||||||
|
record: any = {};
|
||||||
|
i:any;
|
||||||
|
data: any = {};
|
||||||
|
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient) {}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
}
|
||||||
|
|
||||||
|
save(): void {
|
||||||
|
// this.http.post(`/user/${this.record.id}`, value).subscribe(res => {
|
||||||
|
// this.msgSrv.success('保存成功');
|
||||||
|
// this.modal.close(true);
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
close(): void {
|
||||||
|
this.modal.destroy();
|
||||||
|
}
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-12-14 15:53:03
|
||||||
|
* @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">
|
||||||
|
<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,199 @@
|
|||||||
|
import { preloaderFinished } from '@delon/theme';
|
||||||
|
/*
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-12-14 14:03:07
|
||||||
|
* @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
|
||||||
|
*/
|
||||||
|
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-depart',
|
||||||
|
templateUrl: './sure-depart.component.html',
|
||||||
|
styleUrls: ['./sure-depart.component.less']
|
||||||
|
})
|
||||||
|
export class SureDepartComponent 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',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
no4: {
|
||||||
|
type: 'string',
|
||||||
|
title: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'text',
|
||||||
|
},
|
||||||
|
default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式',
|
||||||
|
},
|
||||||
|
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
|
||||||
|
}
|
||||||
|
},
|
||||||
|
required: ['reason']
|
||||||
|
};
|
||||||
|
this.ui = {
|
||||||
|
'*': {
|
||||||
|
spanLabelFixed: 100,
|
||||||
|
grid: { span: 20 }
|
||||||
|
},
|
||||||
|
$avatar: { grid: { span: 12} },
|
||||||
|
$avatar2: { 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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-12-14 14:03:07
|
||||||
|
* @LastEditTime: 2021-12-14 15:16:40
|
||||||
|
* @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.html
|
||||||
|
-->
|
||||||
|
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
|
||||||
|
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'">
|
||||||
|
<ng-template sf-template="no" let-me let-ui="ui" let-schema="schema">
|
||||||
|
<div style="display: flex;">
|
||||||
|
<nz-input-number [(ngModel)]="data.place" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||||
|
<div class="left_btn">元/吨</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
<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>
|
||||||
|
<ng-template sf-template="no4" let-me let-ui="ui" let-schema="schema">
|
||||||
|
<div style="display: flex;">
|
||||||
|
<nz-input-number [(ngModel)]="data.place3" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||||
|
<div class="left_btn">吨</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="no5" let-me let-ui="ui" let-schema="schema">
|
||||||
|
<div style="display: flex;">
|
||||||
|
<nz-input-number [(ngModel)]="data.place4" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||||
|
<div class="left_btn">吨</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
</sf>
|
||||||
|
<nz-divider></nz-divider>
|
||||||
|
<div>
|
||||||
|
<p style="font-weight: bolder;">总运费:<span style="color: red;">¥900.00</span></p>
|
||||||
|
<p>运输费:¥800.00,附加费:¥100.00</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button nz-button type="button" (click)="close()">关闭</button>
|
||||||
|
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="!sf.valid" [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,143 @@
|
|||||||
|
import { preloaderFinished } from '@delon/theme';
|
||||||
|
/*
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-12-14 14:03:07
|
||||||
|
* @LastEditTime: 2021-12-14 15:16:27
|
||||||
|
* @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,
|
||||||
|
SFNumberWidgetSchema,
|
||||||
|
SFRadioWidgetSchema,
|
||||||
|
SFSchema,
|
||||||
|
SFSelectWidgetSchema,
|
||||||
|
SFTextareaWidgetSchema,
|
||||||
|
SFUISchema
|
||||||
|
} from '@delon/form';
|
||||||
|
import { _HttpClient } from '@delon/theme';
|
||||||
|
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||||
|
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-order-management-update-freight',
|
||||||
|
templateUrl: './update-freight.component.html',
|
||||||
|
styleUrls: ['./update-freight.component.less']
|
||||||
|
})
|
||||||
|
export class UpdateFreightComponent implements OnInit {
|
||||||
|
record: any = {};
|
||||||
|
i: any;
|
||||||
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
|
schema: SFSchema = {};
|
||||||
|
ui: SFUISchema = {};
|
||||||
|
data: any = {};
|
||||||
|
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient) {}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.initSF();
|
||||||
|
|
||||||
|
if (this.record.id > 0) this.http.get(`/user/${this.record.id}`).subscribe(res => (this.i = res));
|
||||||
|
}
|
||||||
|
initSF() {
|
||||||
|
this.schema= {
|
||||||
|
properties: {
|
||||||
|
no: {
|
||||||
|
type: 'string',
|
||||||
|
title: '运费单价',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sex: {
|
||||||
|
title: '',
|
||||||
|
type: 'string',
|
||||||
|
enum: [
|
||||||
|
{ label: '保留小数', value: 0 },
|
||||||
|
{ label: '男', value: 1 },
|
||||||
|
{ label: '女', value: 2 },
|
||||||
|
{ label: '保密', value: 3 },
|
||||||
|
],
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
} as SFSelectWidgetSchema,
|
||||||
|
},
|
||||||
|
appId: {
|
||||||
|
type: 'string',
|
||||||
|
title: '结算依据',
|
||||||
|
ui: {
|
||||||
|
width: 300,
|
||||||
|
grid: { span: 24 },
|
||||||
|
widget: 'select',
|
||||||
|
placeholder: '请选择',
|
||||||
|
allowClear: true,
|
||||||
|
// asyncData: () => this.getCatalogueMember(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
no2: {
|
||||||
|
type: 'string',
|
||||||
|
title: '装货重量',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
no3: {
|
||||||
|
type: 'string',
|
||||||
|
title: '装货体积',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
no4: {
|
||||||
|
type: 'string',
|
||||||
|
title: '卸货重量',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
no5: {
|
||||||
|
type: 'string',
|
||||||
|
title: '卸货体积',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
name3: {
|
||||||
|
type: 'string',
|
||||||
|
title: '变更原因',
|
||||||
|
maxLength: 100,
|
||||||
|
ui: {
|
||||||
|
width: 300,
|
||||||
|
placeholder:"选填,最多不超过100字",
|
||||||
|
widget: 'textarea',
|
||||||
|
autosize: { minRows: 3, maxRows: 6 }
|
||||||
|
} as SFTextareaWidgetSchema
|
||||||
|
},
|
||||||
|
},
|
||||||
|
required: ['no', 'appId'],
|
||||||
|
type: 'object',
|
||||||
|
};
|
||||||
|
this.ui = { '*': { spanLabelFixed: 100, grid: { span: 12, gutter: 4 } }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
save(value: any): void {
|
||||||
|
console.log(value)
|
||||||
|
console.log(this.data)
|
||||||
|
this.http.post(`/user/${this.record.id}`, value).subscribe(res => {
|
||||||
|
this.msgSrv.success('保存成功');
|
||||||
|
this.modal.close(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
close(): void {
|
||||||
|
this.modal.destroy();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 更新数字框
|
||||||
|
* @param value
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
changeNumVal(value: any, type: number) {}
|
||||||
|
}
|
||||||
@ -11,7 +11,9 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<div class="card-title">装卸货信息<span class="tip-font">预计公里数:-km,预计行程耗时:-小时</span></div>
|
<div class="card-title"
|
||||||
|
>装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div
|
||||||
|
>
|
||||||
<form nz-form [formGroup]="validateForm1" role="form">
|
<form nz-form [formGroup]="validateForm1" role="form">
|
||||||
<div nz-row [nzGutter]="24">
|
<div nz-row [nzGutter]="24">
|
||||||
<div nz-col [nzSpan]="8">
|
<div nz-col [nzSpan]="8">
|
||||||
|
|||||||
@ -10,11 +10,10 @@ import {
|
|||||||
SFUISchema
|
SFUISchema
|
||||||
} from '@delon/form';
|
} from '@delon/form';
|
||||||
import { _HttpClient } from '@delon/theme';
|
import { _HttpClient } from '@delon/theme';
|
||||||
import { AmapPoiPickerComponent } from '@shared';
|
import { AmapPoiPickerComponent, AmapService, ShipperBaseService } from '@shared';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
|
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
|
||||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
import { SupplyManagementService} from '../../services/supply-management.service';
|
||||||
import { debug } from 'console';
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-publish-goods-bulk-publish',
|
selector: 'app-publish-goods-bulk-publish',
|
||||||
templateUrl: './bulk-publish.component.html',
|
templateUrl: './bulk-publish.component.html',
|
||||||
@ -31,6 +30,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
creatTime: any; // 货源单设置回显
|
creatTime: any; // 货源单设置回显
|
||||||
modifyTime: any; // 货源单设置回显
|
modifyTime: any; // 货源单设置回显
|
||||||
totalFees: any; // 总数信息
|
totalFees: any; // 总数信息
|
||||||
|
totalDistance = 0.0; //总里程
|
||||||
|
totalTime = 0.0; //路程总时间
|
||||||
id = this.route.snapshot.params.id;
|
id = this.route.snapshot.params.id;
|
||||||
// // 单位
|
// // 单位
|
||||||
unit1 = '吨';
|
unit1 = '吨';
|
||||||
@ -40,7 +41,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
endInfo: any = [];
|
endInfo: any = [];
|
||||||
PageStatus = '';
|
PageStatus = '';
|
||||||
dataList: any;
|
dataList: any;
|
||||||
constructor(private http: _HttpClient, fb: FormBuilder, private router: Router, private route: ActivatedRoute, private modalService: NzModalService, public service: SupplyManagementService) {
|
constructor(private http: _HttpClient, fb: FormBuilder, private router: Router, private route: ActivatedRoute, private modalService: NzModalService, public service: SupplyManagementService, private amapService: AmapService, public service2: ShipperBaseService,) {
|
||||||
this.validateForm1 = fb.group({
|
this.validateForm1 = fb.group({
|
||||||
createTime: [null, []],
|
createTime: [null, []],
|
||||||
modifyTime: [null, []],
|
modifyTime: [null, []],
|
||||||
@ -113,16 +114,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
allowClear: true
|
allowClear: true,
|
||||||
// asyncData: () =>
|
asyncData: () => this.service2.getEnterpriseProject(),
|
||||||
// this.service.loadChildData2('0', '2').pipe(
|
|
||||||
// map((data: any) => {
|
|
||||||
// return data.map((m: any) => {
|
|
||||||
// return { label: m.name, value: m.id };
|
|
||||||
// });
|
|
||||||
// }),
|
|
||||||
// ),
|
|
||||||
// change: (i) => this.updateCategory(i, '/categoryId2'),
|
|
||||||
} as SFSelectWidgetSchema
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
enterpriseInfoName: {
|
enterpriseInfoName: {
|
||||||
@ -530,39 +523,47 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 打开地图
|
// 打开地图
|
||||||
openMap(type: string, index: number) {
|
openMap(type: string, index: number) {
|
||||||
const modalRef = this.modalService.create({
|
const modalRef = this.modalService.create({
|
||||||
nzTitle: '',
|
nzTitle: '',
|
||||||
nzContent: AmapPoiPickerComponent,
|
nzContent: AmapPoiPickerComponent,
|
||||||
nzWidth: 900,
|
nzWidth: 900,
|
||||||
nzOnOk: item => {
|
nzOnOk: item => {
|
||||||
const poi = item.poi;
|
const poi = item.poi;
|
||||||
console.log(item.poi);
|
const locList = poi.location.toString().split(',');
|
||||||
const locList = poi.location.toString().split(',');
|
switch (type) {
|
||||||
switch (type) {
|
case 'start':
|
||||||
case 'start':
|
this.startInfo[index].detailedAddress = poi.district + poi.name;
|
||||||
this.startInfo[index].detailedAddress = poi.district + poi.name;
|
this.startInfo[index].longitude = locList[0];
|
||||||
this.startInfo[index].longitude = locList[0];
|
this.startInfo[index].latitude = locList[1];
|
||||||
this.startInfo[index].latitude = locList[1];
|
this.startInfo[index].province = poi.cityInfo.province;
|
||||||
this.startInfo[index].province = poi.cityInfo.province;
|
this.startInfo[index].city = poi.cityInfo.city;
|
||||||
this.startInfo[index].city = poi.cityInfo.city;
|
this.startInfo[index].area = poi.cityInfo.district;
|
||||||
this.startInfo[index].area = poi.cityInfo.district;
|
this.startInfo[index].address = poi.name;
|
||||||
break;
|
break;
|
||||||
case 'end':
|
case 'end':
|
||||||
this.endInfo[index].detailedAddress = poi.district + poi.name;
|
this.endInfo[index].detailedAddress = poi.district + poi.name;
|
||||||
this.endInfo[index].longitude = locList[0];
|
this.endInfo[index].longitude = locList[0];
|
||||||
this.endInfo[index].latitude = locList[1];
|
this.endInfo[index].latitude = locList[1];
|
||||||
this.endInfo[index].province = poi.cityInfo.province;
|
this.endInfo[index].province = poi.cityInfo.province;
|
||||||
this.endInfo[index].city = poi.cityInfo.city;
|
this.endInfo[index].city = poi.cityInfo.city;
|
||||||
this.endInfo[index].area = poi.cityInfo.district;
|
this.endInfo[index].area = poi.cityInfo.district;
|
||||||
break;
|
this.endInfo[index].address = poi.name;
|
||||||
default:
|
break;
|
||||||
break;
|
default:
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||||
|
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => {
|
||||||
|
this.totalDistance = res.distance;
|
||||||
|
this.totalTime = res.time;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
goBack() {
|
goBack() {
|
||||||
window.history.go(-1);
|
window.history.go(-1);
|
||||||
}
|
}
|
||||||
@ -662,19 +663,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
goodsName: res?.goodsInfoVOList[0]?.goodsName || '',
|
goodsName: res?.goodsInfoVOList[0]?.goodsName || '',
|
||||||
}
|
}
|
||||||
this.sf4data = {
|
this.sf4data = {
|
||||||
// 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 || '',
|
freightPrice: res?.goodsInfoVOList[0]?.freightPrice || '',
|
||||||
freightType: res?.goodsInfoVOList[0]?.freightType || '',
|
freightType: res?.goodsInfoVOList[0]?.freightType || '',
|
||||||
rule: res?.goodsInfoVOList[0]?.rule || '',
|
rule: res?.goodsInfoVOList[0]?.rule || '',
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { Router } from '@angular/router';
|
|||||||
import { STColumn, STComponent } from '@delon/abc/st';
|
import { STColumn, STComponent } from '@delon/abc/st';
|
||||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||||
|
import { ShipperBaseService } from '@shared';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||||
@ -33,7 +34,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
|||||||
receivedQuantity: 0,
|
receivedQuantity: 0,
|
||||||
stayQuantity: 0
|
stayQuantity: 0
|
||||||
};
|
};
|
||||||
constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router) { }
|
constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router,public service2: ShipperBaseService) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initSF();
|
this.initSF();
|
||||||
@ -134,7 +135,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
|||||||
_$expand: (value: boolean) => value,
|
_$expand: (value: boolean) => value,
|
||||||
},
|
},
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
asyncData: () => this.getCatalogueMember(),
|
asyncData: () => this.service2.getEnterpriseProject(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
no4: {
|
no4: {
|
||||||
|
|||||||
@ -11,7 +11,9 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<div class="card-title">装卸货信息<span class="tip-font">预计公里数:-km,预计行程耗时:-小时</span></div>
|
<div class="card-title"
|
||||||
|
>装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div
|
||||||
|
>
|
||||||
<form nz-form [formGroup]="validateForm1" role="form">
|
<form nz-form [formGroup]="validateForm1" role="form">
|
||||||
<div nz-row [nzGutter]="24">
|
<div nz-row [nzGutter]="24">
|
||||||
<div nz-col [nzSpan]="8">
|
<div nz-col [nzSpan]="8">
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import {
|
|||||||
SFUISchema
|
SFUISchema
|
||||||
} from '@delon/form';
|
} from '@delon/form';
|
||||||
import { _HttpClient } from '@delon/theme';
|
import { _HttpClient } from '@delon/theme';
|
||||||
import { AmapPoiPickerComponent } from '@shared';
|
import { AmapPoiPickerComponent,AmapService } from '@shared';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
|
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
|
||||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||||
@ -35,6 +35,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
loadingTime: any; // 货源单设置回显
|
loadingTime: any; // 货源单设置回显
|
||||||
unloadingTime: any; // 货源单设置回显
|
unloadingTime: any; // 货源单设置回显
|
||||||
totalFees: any; // 总数信息
|
totalFees: any; // 总数信息
|
||||||
|
totalDistance = 0.0; //总里程
|
||||||
|
totalTime = 0.0; //路程总时间
|
||||||
npp =false
|
npp =false
|
||||||
id = this.route.snapshot.params.id;
|
id = this.route.snapshot.params.id;
|
||||||
// // 单位
|
// // 单位
|
||||||
@ -45,7 +47,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
endInfo: any = [];
|
endInfo: any = [];
|
||||||
PageStatus = '';
|
PageStatus = '';
|
||||||
dataList: any;
|
dataList: any;
|
||||||
constructor(private http: _HttpClient, fb: FormBuilder, private router: Router, private route: ActivatedRoute, private modalService: NzModalService, public service: SupplyManagementService) {
|
constructor(
|
||||||
|
private http: _HttpClient,
|
||||||
|
fb: FormBuilder,
|
||||||
|
private router: Router,
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private modalService: NzModalService,
|
||||||
|
public service: SupplyManagementService,
|
||||||
|
private amapService: AmapService
|
||||||
|
) {
|
||||||
this.validateForm1 = fb.group({
|
this.validateForm1 = fb.group({
|
||||||
loadingTime: [null, []],
|
loadingTime: [null, []],
|
||||||
unloadingTime: [null, []],
|
unloadingTime: [null, []],
|
||||||
@ -676,39 +686,47 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 打开地图
|
// 打开地图
|
||||||
openMap(type: string, index: number) {
|
openMap(type: string, index: number) {
|
||||||
const modalRef = this.modalService.create({
|
const modalRef = this.modalService.create({
|
||||||
nzTitle: '',
|
nzTitle: '',
|
||||||
nzContent: AmapPoiPickerComponent,
|
nzContent: AmapPoiPickerComponent,
|
||||||
nzWidth: 900,
|
nzWidth: 900,
|
||||||
nzOnOk: item => {
|
nzOnOk: item => {
|
||||||
const poi = item.poi;
|
const poi = item.poi;
|
||||||
console.log(item.poi);
|
const locList = poi.location.toString().split(',');
|
||||||
const locList = poi.location.toString().split(',');
|
switch (type) {
|
||||||
switch (type) {
|
case 'start':
|
||||||
case 'start':
|
this.startInfo[index].detailedAddress = poi.district + poi.name;
|
||||||
this.startInfo[index].detailedAddress = poi.district + poi.name;
|
this.startInfo[index].longitude = locList[0];
|
||||||
this.startInfo[index].longitude = locList[0];
|
this.startInfo[index].latitude = locList[1];
|
||||||
this.startInfo[index].latitude = locList[1];
|
this.startInfo[index].province = poi.cityInfo.province;
|
||||||
this.startInfo[index].province = poi.cityInfo.province;
|
this.startInfo[index].city = poi.cityInfo.city;
|
||||||
this.startInfo[index].city = poi.cityInfo.city;
|
this.startInfo[index].area = poi.cityInfo.district;
|
||||||
this.startInfo[index].area = poi.cityInfo.district;
|
this.startInfo[index].address = poi.name;
|
||||||
break;
|
break;
|
||||||
case 'end':
|
case 'end':
|
||||||
this.endInfo[index].detailedAddress = poi.district + poi.name;
|
this.endInfo[index].detailedAddress = poi.district + poi.name;
|
||||||
this.endInfo[index].longitude = locList[0];
|
this.endInfo[index].longitude = locList[0];
|
||||||
this.endInfo[index].latitude = locList[1];
|
this.endInfo[index].latitude = locList[1];
|
||||||
this.endInfo[index].province = poi.cityInfo.province;
|
this.endInfo[index].province = poi.cityInfo.province;
|
||||||
this.endInfo[index].city = poi.cityInfo.city;
|
this.endInfo[index].city = poi.cityInfo.city;
|
||||||
this.endInfo[index].area = poi.cityInfo.district;
|
this.endInfo[index].area = poi.cityInfo.district;
|
||||||
break;
|
this.endInfo[index].address = poi.name;
|
||||||
default:
|
break;
|
||||||
break;
|
default:
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||||
|
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => {
|
||||||
|
this.totalDistance = res.distance;
|
||||||
|
this.totalTime = res.time;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
goBack() {
|
goBack() {
|
||||||
window.history.go(-1);
|
window.history.go(-1);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
|||||||
auditMany = false;
|
auditMany = false;
|
||||||
isVisible = false;
|
isVisible = false;
|
||||||
_$expand = false;
|
_$expand = false;
|
||||||
|
|
||||||
@ViewChild('st') private readonly st!: STComponent;
|
@ViewChild('st') private readonly st!: STComponent;
|
||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
||||||
|
|||||||
@ -46,7 +46,8 @@ export class AmapPoiPickerComponent implements OnInit {
|
|||||||
'AMap.PoiPicker',
|
'AMap.PoiPicker',
|
||||||
'AMap.Scale',
|
'AMap.Scale',
|
||||||
'AMap.InfoWindow',
|
'AMap.InfoWindow',
|
||||||
'AMap.Geolocation'
|
'AMap.Geolocation',
|
||||||
|
'AMap.Geocoder'
|
||||||
],
|
],
|
||||||
AMapUI: {
|
AMapUI: {
|
||||||
// 是否加载 AMapUI,缺省不加载
|
// 是否加载 AMapUI,缺省不加载
|
||||||
@ -110,11 +111,18 @@ export class AmapPoiPickerComponent implements OnInit {
|
|||||||
|
|
||||||
infoWindow.setContent(`地址: <pre>${poi.name}</pre>`);
|
infoWindow.setContent(`地址: <pre>${poi.name}</pre>`);
|
||||||
infoWindow.open(map, marker.getPosition());
|
infoWindow.open(map, marker.getPosition());
|
||||||
|
|
||||||
map.setCenter(marker.getPosition());
|
map.setCenter(marker.getPosition());
|
||||||
//获取行政区信息
|
//获取地址所在的行政区
|
||||||
map.getCity(function (info: any) {
|
AMap.plugin('AMap.Geocoder', () => {
|
||||||
poi.cityInfo = info;
|
var geocoder = new AMap.Geocoder({
|
||||||
|
city: poi.adcode
|
||||||
|
});
|
||||||
|
geocoder.getLocation(poi.name, (status: any, result: any) => {
|
||||||
|
if (status === 'complete' && result.info === 'OK') {
|
||||||
|
// result中对应详细地理坐标信息
|
||||||
|
this.poi.cityInfo = result.geocodes[0].addressComponent;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,31 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Observable, Subject } from 'rxjs';
|
||||||
|
declare var AMap: any;
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class AmapService {
|
export class AmapService {
|
||||||
|
constructor() {}
|
||||||
|
public length = 0;
|
||||||
|
public time = 0;
|
||||||
|
|
||||||
constructor() { }
|
sub = new Subject<any>();
|
||||||
|
|
||||||
|
//计算路径驾车最优路线的长度与所需时间
|
||||||
|
drivingCompute(starts: any[], ends: any[]): Observable<any> {
|
||||||
|
AMap.plugin('AMap.Driving', () => {
|
||||||
|
let driving = new AMap.Driving({
|
||||||
|
// 驾车路线规划策略,AMap.DrivingPolicy.LEAST_TIME是最快捷模式
|
||||||
|
policy: AMap.DrivingPolicy.LEAST_TIME
|
||||||
|
});
|
||||||
|
const points = starts.concat(ends).map(item => {
|
||||||
|
return { keyword: item.address, city: item.city };
|
||||||
|
});
|
||||||
|
driving.search(points, (status: any, result: any) => {
|
||||||
|
const repData = { distance: (result.routes[0].distance / 1000).toFixed(2), time: (result.routes[0].time / 60 / 60).toFixed(2) };
|
||||||
|
this.sub.next(repData);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return this.sub;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
105
src/app/shared/services/business/shipper-base.service.ts
Normal file
105
src/app/shared/services/business/shipper-base.service.ts
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
import { Injectable, Injector } from '@angular/core';
|
||||||
|
import { BaseService } from '../core/base.service';
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class ShipperBaseService extends BaseService {
|
||||||
|
$api_get_carless_carrier = ``; // 获取承运人
|
||||||
|
$api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList `; // 所属项目列表
|
||||||
|
$api_get_staff_list = `/api/mdc/cuc/userApp/getStaffList`; //查询企业项目员工列表(录单员)
|
||||||
|
$api_get_network_freight_forwarder = ``; // 获取网络货运人
|
||||||
|
|
||||||
|
|
||||||
|
constructor(public injector: Injector) {
|
||||||
|
super(injector);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取无车承运人
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getCarlessCarrier() {
|
||||||
|
return
|
||||||
|
const params = {
|
||||||
|
};
|
||||||
|
return this.request(this.$api_get_carless_carrier, params, 'POST').pipe(
|
||||||
|
map((res) => {
|
||||||
|
if (res) {
|
||||||
|
res.map((m: any) => {
|
||||||
|
return { label: m.platformName, value: m.operationId };
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所属项目
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getEnterpriseProject(params = {}) {
|
||||||
|
return this.request(this.$api_get_enterprise_project, params).pipe(
|
||||||
|
map((res: any) => {
|
||||||
|
if (!res) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
const list = res.map(((item: any) => {
|
||||||
|
return {
|
||||||
|
label: item.projectName,
|
||||||
|
value: item.enterpriseId
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
const obj = [{ value: '', label: '全部' }];
|
||||||
|
return [...obj, ...list];
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取录单员
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getStaffList(params = {}) {
|
||||||
|
return this.request(this.$api_get_staff_list, params).pipe(
|
||||||
|
map((res: any) => {
|
||||||
|
if (!res) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
const list = res.map(((item: any) => {
|
||||||
|
return {
|
||||||
|
label: item.name,
|
||||||
|
value: item.userId
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
const obj = [{ value: '', label: '全部' }];
|
||||||
|
return [...obj, ...list];
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取网络货运人
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getNetworkFreightForwarder(params = {}) {
|
||||||
|
return this.request(this.$api_get_network_freight_forwarder, params).pipe(
|
||||||
|
map((res: any) => {
|
||||||
|
if (!res) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
const list = res.map(((item: any) => {
|
||||||
|
return {
|
||||||
|
label: item.name,
|
||||||
|
value: item.userId
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
const obj = [{ value: '', label: '全部' }];
|
||||||
|
return [...obj, ...list];
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-12-07 16:27:52
|
||||||
|
* @LastEditTime: 2021-12-14 21:09:21
|
||||||
|
* @LastEditors: your name
|
||||||
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
* @FilePath: \tms-obc-web\src\app\shared\services\index.ts
|
||||||
|
*/
|
||||||
// Core
|
// Core
|
||||||
export * from './core/base.service';
|
export * from './core/base.service';
|
||||||
export * from './core/cache.service';
|
export * from './core/cache.service';
|
||||||
@ -12,4 +20,5 @@ export * from './business/user.service';
|
|||||||
export * from './business/sl-platform.service';
|
export * from './business/sl-platform.service';
|
||||||
export * from './business/user.service';
|
export * from './business/user.service';
|
||||||
export * from './business/environment.service';
|
export * from './business/environment.service';
|
||||||
|
export * from './business/shipper-base.service';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user