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

This commit is contained in:
wangshiming
2022-04-13 10:24:15 +08:00
43 changed files with 777 additions and 630 deletions

View File

@ -91,7 +91,7 @@ export class ContractManagementFrameComponent implements OnInit {
title: '合同名称',
width: '100px',
className: 'text-center',
index: 'templateName'
index: 'contractName'
},
{ title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' },
{ title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' },

View File

@ -48,10 +48,11 @@
</nz-alert>
</div>
<st #st [data]="service.$api_listDetailed_page" [columns]="columns" [req]="{ params: reqParams }"
[loading]="false" [scroll]="{ x: '1200px', y: '370px' }" (change)="stChange($event)">
<st #st [data]="service.$api_listDetailed_page" [columns]="columns" [req]="{ params: reqParams }" [loading]="false"
[scroll]="{ x: '1200px', y: '370px' }" (change)="stChange($event)">
<ng-template st-row="contractCode" let-item let-index="index">
<a [routerLink]="'/contract-management/index/detail/' + item.id">{{ item?.contractCode }}</a>
<a (click)="service.openURL(item?.contractFilePath)">{{ item?.contractCode }}</a>
<!-- <a [routerLink]="'/contract-management/index/detail/' + item.id">{{ item?.contractCode }}</a> -->
</ng-template>
<ng-template st-row="signingObject" let-item let-index="index">
<span *ngIf="item.signingObject == 0"></span>

View File

@ -75,7 +75,8 @@
[loading]="false"
>
<ng-template st-row="templateName" let-item let-index="index">
<a (click)="view(item)">{{ item.templateName }}</a>
<a (click)="service.openURL(item?.contractFilePath)">{{ item.templateName }}</a>
<!-- <a (click)="view(item)">{{ item.templateName }}</a> -->
</ng-template>
<ng-template st-row="signingObject" let-item let-index="index">
<span *ngIf="item?.signingObject == 1">货主</span>

View File

@ -75,7 +75,8 @@
[loading]="false"
>
<ng-template st-row="templateName" let-item let-index="index">
<a (click)="view(item)">{{ item.templateName }}</a>
<a (click)="service.openURL(item?.contractFilePath)">{{ item.templateName }}</a>
<!-- <a (click)="view(item)">{{ item.templateName }}</a> -->
</ng-template>
</st>
</div>

View File

@ -34,13 +34,13 @@
</ng-template>
<ng-template st-row="verifyStatus" let-item>
<a (click)="viewResult(item)" *ngIf="item?.verifyStatus === '2'">{{item?.verifyStatusLabel}}</a>
<span *ngIf="item?.verifyStatus === '1'">{{item?.verifyStatusLabel}}</span>
<span *ngIf="item?.verifyStatus !== '2'">{{item?.verifyStatusLabel}}</span>
</ng-template>
<ng-template st-row="orderCode" let-item>
<span class="text-blue-dark">{{item?.orderCode}}</span>
<a (click)="routeToOrder(item)">{{item?.orderCode}}</a>
</ng-template>
<ng-template st-row="wayBillCode" let-item>
<span class="text-blue-dark">{{item?.wayBillCode}}</span>
<a (click)="routeTowaybill(item)">{{item?.wayBillCode}}</a>
</ng-template>
<ng-template st-row="tolalAmount" let-item let-index="index">
<div class="text-right">{{item?.tolalAmount | currency }}</div>

View File

@ -163,9 +163,9 @@ export class DatatableFundReportingComponent implements OnInit {
title: '本地校验',
type: 'string',
enum: [
{ label: '校验中', value: 0 },
{ label: '通过', value: 1 },
{ label: '不通过', value: 2 }
{ label: '校验中', value: '0' },
{ label: '通过', value: '1' },
{ label: '不通过', value: '2' }
],
ui: {
placeholder: '请选择',
@ -465,6 +465,23 @@ export class DatatableFundReportingComponent implements OnInit {
}
}
routeToOrder(item: any) {
if (item.orderType === '1') {
window.open(location.origin + `/#/order-management/vehicle/vehicle-detail/${item.orderId}`);
} else {
window.open(location.origin + `/#/order-management/bulk/bulk-detail/${item.orderId}`);
}
}
routeTowaybill(item: any) {
if (item.orderType === '1') {
window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.wayBillId}`);
} else {
window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.wayBillId}`);
}
}
}

View File

@ -49,10 +49,10 @@
</ng-template>
<ng-template st-row="billCode" let-item>
<span class="text-red-dark">{{item?.billCode}}</span>
<a class="text-red-dark" (click)="routeToOrder(item)">{{item?.billCode}}</a>
</ng-template>
<ng-template st-row="wayBillCode" let-item>
<span class="text-red-dark">{{item?.wayBillCode}}</span>
<a class="text-red-dark" (click)="routeTowaybill(item)">{{item?.wayBillCode}}</a>
</ng-template>
<ng-template st-row="freightAmount" let-item let-index="index">

View File

@ -594,4 +594,22 @@ export class DatatableOrderReportingComponent implements OnInit {
}
}
routeToOrder(item: any) {
if (item.billType === '1') {
window.open(location.origin + `/#/order-management/vehicle/vehicle-detail/${item.orderId}`);
} else {
window.open(location.origin + `/#/order-management/bulk/bulk-detail/${item.orderId}`);
}
}
routeTowaybill(item: any) {
if (item.billType === '1') {
window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.waybillId}`);
} else {
window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.waybillId}`);
}
}
}

View File

@ -50,10 +50,10 @@ export class DatatableReportingvViewTrackComponent implements OnInit {
});
});
this.mapList = list;
this.addressItems = [...res.cityArray];
this.addressItems = [...res.parkArray];
if (this.addressItems && this.addressItems.length > 0) {
this.addressItems.forEach(item => {
item.vinOutTime = this.getLocalTime(item.vinOutTime);
item.parkBte = this.getLocalTime(item.parkBte);
});
}
}
@ -78,7 +78,7 @@ export class DatatableReportingvViewTrackComponent implements OnInit {
this.addressItems = [...res.enclosureDataAppTrack];
if (this.addressItems && this.addressItems.length > 0) {
this.addressItems.forEach(item => {
item.vinOutTime = item.vinOutTime ? this.getLocalTime(item.gtm) : '';
item.parkBte = item.parkBte ? this.getLocalTime(item.parkBte) : '';
item.cityName = item.appAdress;
});
}

View File

@ -13,12 +13,13 @@
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
[class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
<!-- <button nz-button nzType="primary" [disabled]="false"> 导出</button>

View File

@ -11,7 +11,7 @@ import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-voucher-summary',
templateUrl: './voucher-summary.component.html',
styleUrls: ['../../../commom/less/box.less']
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
})
export class VoucherSummaryComponent implements OnInit {
@ViewChild('st', { static: true })
@ -39,12 +39,12 @@ export class VoucherSummaryComponent implements OnInit {
Object.assign(requestOptions.body, {
...this.sf.value,
createtime: {
start: this.sf.value.createtime?.[0] || null,
end: this.sf.value.createtime?.[1] || null
start: this.sf.value.createtime?.[0] || '',
end: this.sf.value.createtime?.[1] || ''
},
vctime: {
start: this.sf.value.vctime?.[0] || null,
end: this.sf.value.vctime?.[1] || null
start: this.sf.value.vctime?.[0] || '',
end: this.sf.value.vctime?.[1] || ''
}
});
}
@ -286,8 +286,8 @@ export class VoucherSummaryComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '', index: 'key', type: 'checkbox', width: 60, className: 'text-center', fixed: 'left' },
{ title: '汇总凭证号', index: 'vc2code', type: 'link', width: 140 },
{ title: '帐套', index: 'vcltdcode', width: 120 },
{ title: '汇总凭证号', index: 'vc2code', type: 'link', width: 180 },
{ title: '帐套', index: 'vcltdcode', width: 180 },
{ title: '凭证时间', index: 'createTime', type: 'date', width: 150 },
{
title: '统计区间',
@ -307,7 +307,7 @@ export class VoucherSummaryComponent implements OnInit {
{
title: '借方金额',
index: 'drmoney',
width: 120,
width: 140,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.drmoney }) }
@ -315,7 +315,7 @@ export class VoucherSummaryComponent implements OnInit {
{
title: '贷方金额',
index: 'crmoney',
width: 120,
width: 140,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.crmoney }) }

View File

@ -137,8 +137,6 @@ export class FreightAccountService extends ShipperBaseService {
// 根据预收款ID获取核销信息明细
$api_get_advance_collection_hrxiao = '/api/fcc/ficoAhxH/getAhxHByYskblaId';
// 运营导出充值信息 充值记录导出
$api_get_exportPageByOperator = '/api/fcc/rechargeInfo/exportPageByOperator';
// 运营端导出交易流水明细
@ -205,21 +203,22 @@ export class FreightAccountService extends ShipperBaseService {
if (!url) {
return;
}
const uA = window.navigator.userAgent; // 判断浏览器内核
const isIE =
/msie\s|trident\/|edge\//i.test(uA) &&
!!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
const objectUrl = url;
const a = document.createElement('a');
document.body.appendChild(a);
a.href = objectUrl;
a.download = `回单.pdf`;
if (isIE) {
// 兼容IE11无法触发下载的问题
(navigator as any).msSaveBlob(url, a.download);
} else {
a.click();
}
a.remove();
this.openURL(url);
// const uA = window.navigator.userAgent; // 判断浏览器内核
// const isIE =
// /msie\s|trident\/|edge\//i.test(uA) &&
// !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
// const objectUrl = url;
// const a = document.createElement('a');
// document.body.appendChild(a);
// a.href = objectUrl;
// a.download = `回单.pdf`;
// if (isIE) {
// // 兼容IE11无法触发下载的问题
// (navigator as any).msSaveBlob(url, a.download);
// } else {
// a.click();
// }
// a.remove();
}
}

View File

@ -24,7 +24,6 @@ export class InsuranceManagementService extends ShipperBaseService {
// 统计保险单状态数量
public $api_listStatisticalStatus = '/api/sdc/premiumInfo/listStatisticalStatus';
// 保险费公司认证
$api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`;
// 退保费
@ -36,24 +35,25 @@ export class InsuranceManagementService extends ShipperBaseService {
if (!url) {
return;
}
const uA = window.navigator.userAgent; // 判断浏览器内核
const isIE =
/msie\s|trident\/|edge\//i.test(uA) &&
!!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
const objectUrl = url;
const a = document.createElement('a');
document.body.appendChild(a);
console.log('5555');
this.openURL(url);
// const uA = window.navigator.userAgent; // 判断浏览器内核
// const isIE =
// /msie\s|trident\/|edge\//i.test(uA) &&
// !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
// const objectUrl = url;
// const a = document.createElement('a');
// document.body.appendChild(a);
// console.log('5555');
a.href = objectUrl;
a.download = '保单.pdf';
if (isIE) {
// 兼容IE11无法触发下载的问题
(navigator as any).msSaveBlob(url, a.download);
} else {
a.click();
}
a.remove();
// a.href = objectUrl;
// a.download = '保单.pdf';
// if (isIE) {
// // 兼容IE11无法触发下载的问题
// (navigator as any).msSaveBlob(url, a.download);
// } else {
// a.click();
// }
// a.remove();
}
constructor(public injector: Injector) {

View File

@ -180,7 +180,7 @@ export class OrderManagementAbnormalWarningComponent implements OnInit {
}
}
},
carNos: {
carNo: {
title: '车牌号',
type: 'string',
ui: {

View File

@ -76,8 +76,8 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit {
schema: SFSchema = {};
ui: SFUISchema = {};
logColumns2: STColumn[] = [
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' }
{ title: '时间', index: 'parkBte' },
{ title: '地点', index: 'parkAdr' }
];
logColumns: STColumn[] = [
{ title: '款项', index: 'expenseCodeLabel' },
@ -968,14 +968,15 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit {
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;
this.addressItems = res?.cityArray;
this.addressItems = res?.parkArray;
if (this.addressItems && this.addressItems.length > 0) {
this.addressItems.forEach(item => {
item.vinOutTime = this.getLocalTime(item.vinOutTime);
item.parkBte = this.getLocalTime(item.parkBte);
});
}
}
@ -991,7 +992,8 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit {
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;

View File

@ -38,8 +38,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
modalTitle: string = '';
isVisible = false;
logColumns2: STColumn[] = [
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' },
{ title: '时间', index: 'parkBte' },
{ title: '地点', index: 'parkAdr' }
];
logColumns: STColumn[] = [
{ title: '款项', index: 'expenseCodeLabel' },
@ -70,8 +70,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
private service: OrderManagementService,
private router: Router,
private modal: NzModalService
) {
}
) {}
ngOnInit(): void {
console.log(this.route?.snapshot?.queryParams?.sts);
@ -85,34 +84,36 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
if (res) {
this.i = res;
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA');
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE");
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data: any) => data.displayStatus !== 'HIDE');
this.pois = [
{
markerLabel: '',
markerLabel: '',
color: 'blue',
position: [res.startingPoint.longitude, res.startingPoint.latitude],
title: res.startingPoint.detailedAddress
title: `发货地:${res.startingPoint.province}${res.startingPoint.city}${res.startingPoint.area}${res.startingPoint.detailedAddress}`,
time: '计划出发时间:' + res.loadPlanTime
},
{
markerLabel: '卸',
color: 'red',
position: [res.endPoint.longitude, res.endPoint.latitude],
title: res.endPoint.detailedAddress
title: `卸货地:${res.endPoint.province}${res.endPoint.city}${res.endPoint.area}${res.endPoint.detailedAddress}`,
time: '计划卸货时间:' + res.unloadPlanTime
}
];
}
});
this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => {
if (res) {
console.log('风险详情')
console.log(res)
this.abnormalList = res
console.log('风险详情');
console.log(res);
this.abnormalList = res;
}
});
this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => {
if (res) {
console.log('异常预警')
console.log(res)
console.log('异常预警');
console.log(res);
}
});
}
@ -128,7 +129,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
if (value === '1') {
this.modalTitle = '附件信息';
// this.modalcontent = this.i?.contractContent?.contractContent;
this.service.reviewPDF(this.i?.contractContent?.contractFilePath)
// this.service.reviewPDF(this.i?.contractContent?.contractFilePath)
this.service.openURL(this.i?.contractContent?.contractFilePath);
} else if (value === '2') {
this.modalTitle = '补充协议';
this.modalcontent = this.i?.supplementContent?.contractContent;
@ -171,14 +173,15 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;
this.addressItems = res.cityArray;
this.addressItems = res.parkArray;
if (this.addressItems && this.addressItems.length > 0) {
this.addressItems.forEach(item => {
item.vinOutTime = this.getLocalTime(item.vinOutTime);
item.parkBte = this.getLocalTime(item.parkBte);
});
}
}
@ -194,7 +197,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;
@ -210,7 +214,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
}
trajectoryChange(event: any) {
if (event === 'car') {
this.getTrajectory()
this.getTrajectory();
} else if (event === 'driver') {
this.getDriverTrajectory();
}

View File

@ -57,6 +57,7 @@
<nz-timeline nzMode="left">
<nz-timeline-item [nzLabel]="item?.operatorTimestamp" nzColor="green" *ngFor="let item of logList">
<div>{{item?.operationContent}}</div>
<div *ngIf="item?.operationContent === '驳回'">驳回原因:{{i?.auditRemark}}</div>
<div>操作人:{{item?.operator}}</div>
</nz-timeline-item>
</nz-timeline>

View File

@ -90,8 +90,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
mapList: any[] = []; //地图点位数据组
addressItems: any[] = []; //打点地址数据组
logColumns2: STColumn[] = [
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' }
{ title: '时间', index: 'parkBte' },
{ title: '地点', index: 'parkAdr' }
];
constructor(
private route: ActivatedRoute,
@ -923,14 +923,15 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;
this.addressItems = res?.cityArray;
this.addressItems = res?.parkArray;
if (this.addressItems && this.addressItems.length > 0) {
this.addressItems.forEach(item => {
item.vinOutTime = this.getLocalTime(item.vinOutTime);
item.parkBte = this.getLocalTime(item.parkBte);
});
}
}
@ -946,7 +947,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;

View File

@ -43,8 +43,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
approvalLsit: any;
isVisible = false;
logColumns2: STColumn[] = [
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' }
{ title: '时间', index: 'parkBte' },
{ title: '地点', index: 'parkAdr' }
];
logColumns: STColumn[] = [
{ title: '款项', index: 'expenseCodeLabel' },
@ -55,7 +55,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
{
title: '支付状态',
className: 'text-center',
index: 'paymentStatusLabel',
index: 'paymentStatusLabel'
}
];
constructor(
@ -77,16 +77,18 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
this.i = res;
this.pois = [
{
markerLabel: '',
markerLabel: '',
color: 'blue',
position: [res.startingPoint.longitude, res.startingPoint.latitude],
title: res.startingPoint.detailedAddress
title: `发货地:${res.startingPoint.province}${res.startingPoint.city}${res.startingPoint.area}${res.startingPoint.detailedAddress}`,
time: '计划出发时间:' +res.loadPlanTime
},
{
markerLabel: '卸',
color: 'red',
position: [res.endPoint.longitude, res.endPoint.latitude],
title: res.endPoint.detailedAddress
title: `卸货地:${res.endPoint.province}${res.endPoint.city}${res.endPoint.area}${res.endPoint.detailedAddress}`,
time: '计划卸货时间:' + res.unloadPlanTime
}
];
this.billExpenses = this.i?.billExpenseDetails?.filter(
@ -97,15 +99,15 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
});
this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => {
if (res) {
console.log('风险详情')
console.log(res)
this.abnormalList = res
console.log('风险详情');
console.log(res);
this.abnormalList = res;
}
});
this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => {
if (res) {
console.log('异常预警')
console.log(res)
console.log('异常预警');
console.log(res);
}
});
}
@ -133,15 +135,15 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
}
agreement(value: any) {
if (value === '1') {
this.modalTitle = '附件信息';
this.modalcontent = this.i?.contractContent?.contractContent;
// this.modalTitle = '附件信息';
// this.modalcontent = this.i?.contractContent?.contractContent;
this.service.openURL(this.i?.contractContent?.contractFilePath);
} else if (value === '2') {
this.modalTitle = '补充协议';
this.modalcontent = this.i?.supplementContent?.contractContent;
}
this.isVisible = true;
}
}
handleCancel() {
this.isVisible = false;
}
@ -163,16 +165,16 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
let list: any[] = [];
points?.forEach((item: any) => {
list.push({
name: `${item.spd}km/h`,
name: `${item.spd}`,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;
this.addressItems = res.cityArray;
this.addressItems = res.parkArray;
if (this.addressItems && this.addressItems.length > 0) {
this.addressItems.forEach(item => {
item.vinOutTime = this.getLocalTime(item.vinOutTime);
item.parkBte = this.getLocalTime(item.parkBte);
});
}
}
@ -188,7 +190,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;
@ -210,6 +213,9 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
}
}
getLocalTime(time: any) {
if (!time) {
return '';
}
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
}
}

View File

@ -38,8 +38,8 @@ export class OneCarOrderViewtrackComponent implements OnInit {
mapList:any[] = []; //地图点位数据组
addressItems: any[] = []; //打点地址数据组
logColumns2: STColumn[] = [
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' },
{ title: '时间', index: 'parkBte' },
{ title: '地点', index: 'parkAdr' },
];
constructor(
private modalRef: NzModalRef,
@ -65,14 +65,15 @@ export class OneCarOrderViewtrackComponent implements OnInit {
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;
this.addressItems = res.cityArray;
this.addressItems = res.parkAdr;
if(this.addressItems && this.addressItems.length > 0){
this.addressItems.forEach(item => {
item.vinOutTime = this.getLocalTime(item.vinOutTime);
item.parkBte = this.getLocalTime(item.parkBte);
});
}
}
@ -88,7 +89,8 @@ export class OneCarOrderViewtrackComponent implements OnInit {
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;

View File

@ -52,7 +52,7 @@ export class OrderManagementService extends ShipperBaseService {
// 订单申请撤销
$api_get_revokeChangeRecord = `/api/sdc/billFreightChangeApplication/revokeChangeRecord`;
// 运费变更申请-整车
$api_get_insertFreightChangeWhole = `/api/sdc/billFreightChangeApplication/insertFreightChangeWhole`;
$api_get_insertFreightChangeWhole = `/api/sdc/billFreightChangeApplication/insertOperateFreightChangeWhole`;
// 取消订单
$api_get_cancelAnOrder = `/api/sdc/billOperate/cancelAnOrder`;
// 批量签收整车订单
@ -92,7 +92,7 @@ export class OrderManagementService extends ShipperBaseService {
//运费变更申请计算费用-整车
$api_getWholeSurchargeDetail = `/api/sdc/billFreightChangeApplication/getWholeSurchargeDetail`;
//运费变更申请-大宗
$api_change_bulk = `/api/sdc/billFreightChangeApplication/insertFreightChangeBulk`;
$api_change_bulk = `/api/sdc/billFreightChangeApplication/insertOperateFreightChangeBulk`;
// 删除装卸货信息
$api_delete_Wholedeletebatch = `/api/sdc/unLoadingPlace/deletebatch`;
// 修改-大宗订单
@ -189,7 +189,6 @@ export class OrderManagementService extends ShipperBaseService {
// 查询异常预警表
$api_get_abnormalWarning = `/api/sdc/abnormalWarning/list/page`;
// 异步导出运营后台大宗订单列表
$api_get_asyncExportBulkList = `/api/sdc/billOperate/asyncExportBulkList`;
// 异步导出运营后台整车订单列表
@ -248,21 +247,22 @@ export class OrderManagementService extends ShipperBaseService {
if (!url) {
return;
}
const uA = window.navigator.userAgent; // 判断浏览器内核
const isIE =
/msie\s|trident\/|edge\//i.test(uA) &&
!!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
const objectUrl = url;
const a = document.createElement('a');
document.body.appendChild(a);
a.href = objectUrl;
a.download = '附件.pdf';
if (isIE) {
// 兼容IE11无法触发下载的问题
(navigator as any).msSaveBlob(url, a.download);
} else {
a.click();
}
a.remove();
this.openURL(url);
// const uA = window.navigator.userAgent; // 判断浏览器内核
// const isIE =
// /msie\s|trident\/|edge\//i.test(uA) &&
// !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
// const objectUrl = url;
// const a = document.createElement('a');
// document.body.appendChild(a);
// a.href = objectUrl;
// a.download = '附件.pdf';
// if (isIE) {
// // 兼容IE11无法触发下载的问题
// (navigator as any).msSaveBlob(url, a.download);
// } else {
// a.click();
// }
// a.remove();
}
}

View File

@ -11,9 +11,7 @@
</nz-card>
<nz-card>
<div class="card-title"
>装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km预计行程耗时{{ totalTime }}小时</span></div
>
<div class="card-title">装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km预计行程耗时{{ totalTime }}小时</span></div>
<form nz-form [formGroup]="validateForm1" role="form">
<div nz-row [nzGutter]="24">
@ -24,14 +22,8 @@
<nz-form-control [nzErrorTip]="'请输入装货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
<input
nz-input
[(ngModel)]="data1.detailedAddress"
(click)="openMap('start', idx)"
formControlName="loadAddress{{ idx }}"
placeholder="请输入装货地"
readonly="true"
/>
<input nz-input [(ngModel)]="data1.detailedAddress" (click)="openMap('start', idx)"
formControlName="loadAddress{{ idx }}" placeholder="请输入装货地" readonly="true" />
</nz-input-group>
</div>
</nz-form-control>
@ -40,23 +32,12 @@
<nz-form-label nzRequired>联系人</nz-form-label>
<div style="display: flex ;width: 86%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
[(ngModel)]="data1.appUserName"
formControlName="loadName{{ idx }}"
maxlength="30"
placeholder="请输入联系人姓名"
/>
<input nz-input [(ngModel)]="data1.appUserName" formControlName="loadName{{ idx }}" maxlength="30"
placeholder="请输入联系人姓名" />
</nz-form-control>
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
<input
style="margin-left: 12px"
nz-input
[(ngModel)]="data1.contractTelephone"
maxlength="11"
formControlName="loadPhone{{ idx }}"
placeholder="请输入联系人电话"
/>
<input style="margin-left: 12px" nz-input [(ngModel)]="data1.contractTelephone" maxlength="11"
formControlName="loadPhone{{ idx }}" placeholder="请输入联系人电话" />
</nz-form-control>
</div>
</nz-form-item>
@ -64,8 +45,7 @@
</div>
<div nz-col [nzSpan]="4">
<div style="display: flex; justify-content: center">
<span class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap"
nzTheme="outline"></i></span>
<span class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap" nzTheme="outline"></i></span>
</div>
</div>
<div nz-col [nzSpan]="10">
@ -75,14 +55,8 @@
<nz-form-control [nzErrorTip]="'请输入卸货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
<input
nz-input
[(ngModel)]="data2.detailedAddress"
(click)="openMap('end', idx)"
formControlName="unloadAddress{{ idx }}"
placeholder="请输入卸货地"
readonly="true"
/>
<input nz-input [(ngModel)]="data2.detailedAddress" (click)="openMap('end', idx)"
formControlName="unloadAddress{{ idx }}" placeholder="请输入卸货地" readonly="true" />
</nz-input-group>
</div>
</nz-form-control>
@ -91,23 +65,12 @@
<nz-form-label nzRequired>联系人</nz-form-label>
<div style="display: flex;width: 86%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
[(ngModel)]="data2.appUserName"
maxlength="30"
formControlName="unloadName{{ idx }}"
placeholder="请输入联系人姓名"
/>
<input nz-input [(ngModel)]="data2.appUserName" maxlength="30" formControlName="unloadName{{ idx }}"
placeholder="请输入联系人姓名" />
</nz-form-control>
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
<input
style="margin-left: 12px"
nz-input
[(ngModel)]="data2.contractTelephone"
formControlName="unloadPhone{{ idx }}"
maxlength="11"
placeholder="请输入联系人电话"
/>
<input style="margin-left: 12px" nz-input [(ngModel)]="data2.contractTelephone"
formControlName="unloadPhone{{ idx }}" maxlength="11" placeholder="请输入联系人电话" />
</nz-form-control>
</div>
</nz-form-item>
@ -122,7 +85,16 @@
<div class="card-title">货物信息</div>
<div nz-row>
<div nz-col nzSpan="24">
<sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf>
<sf #sf3 [schema]="schema3" class="sf3" [formData]="sf3data" [button]="'none'" [ui]="ui3">
<ng-template class="1" sf-template="goodsTips" let-i let-ui="ui">
<nz-alert class="goods_tips" nzType="warning" [nzMessage]="tpl" nzShowIcon></nz-alert>
</ng-template>
<ng-template #tpl>
<span> 国家法规及行政命令禁限运货物不能托运
<a target="_blank" [queryParams]="{ type: 15 }" [routerLink]="['/agreement']">《禁运物品说明》</a>
</span>
</ng-template>
</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">
@ -131,7 +103,8 @@
</nz-input-group>
<ng-template #addOnAfterTemplate>
<nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions"> </nz-option>
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions">
</nz-option>
</nz-select>
</ng-template>
</ng-template>
@ -142,9 +115,8 @@
<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>
<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>
@ -155,35 +127,20 @@
</ng-template>
<ng-template sf-template="weight" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<nz-input-number
placeholder="总重量,必填"
[ngModel]="i.value"
(ngModelChange)="i.setValue($event)"
[nzMin]="1"
style="width: 100%"
></nz-input-number>
<nz-input-number placeholder="总重量,必填" [ngModel]="i.value" (ngModelChange)="i.setValue($event)" [nzMin]="1"
style="width: 100%"></nz-input-number>
</nz-input-group>
</ng-template>
<ng-template sf-template="volume" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<nz-input-number
placeholder="总体积"
[ngModel]="i.value"
(ngModelChange)="i.setValue($event)"
[nzMin]="1"
style="width: 100%"
></nz-input-number>
<nz-input-number placeholder="总体积" [ngModel]="i.value" (ngModelChange)="i.setValue($event)" [nzMin]="1"
style="width: 100%"></nz-input-number>
</nz-input-group>
</ng-template>
<ng-template sf-template="number" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<nz-input-number
placeholder="总车次"
[ngModel]="i.value"
(ngModelChange)="i.setValue($event)"
[nzMin]="1"
style="width: 100%"
></nz-input-number>
<nz-input-number placeholder="总车次" [ngModel]="i.value" (ngModelChange)="i.setValue($event)" [nzMin]="1"
style="width: 100%"></nz-input-number>
</nz-input-group>
</ng-template>
</sf>
@ -200,13 +157,8 @@
<div nz-row>
<div class="align-center">
<div nz-col nzSpan="12">
<nz-input-number
[(ngModel)]="i.value"
(ngModelChange)="i.setValue($event)"
[nzMin]="1"
[nzMax]="30"
[nzStep]="1"
></nz-input-number>
<nz-input-number [(ngModel)]="i.value" (ngModelChange)="i.setValue($event)" [nzMin]="1" [nzMax]="30"
[nzStep]="1"></nz-input-number>
</div>
<div nz-col nzSpan="12">
<span>&nbsp;天内支付运费</span>
@ -220,9 +172,12 @@
</nz-card>
<nz-card>
<div class="align-center">
<button nz-button nzType="primary" (click)="submitConfirm('qrcode')" acl [acl-ability]="['SUPPLY-VEHICLE-PLACEORDER- QRCode']">生成二维码</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('assign')" acl [acl-ability]="['SUPPLY-VEHICLE-PLACEORDER-bulkDesignate']">指派熟车</button>
<button nz-button nzType="primary" (click)="submitConfirm('qrcode')" acl
[acl-ability]="['SUPPLY-VEHICLE-PLACEORDER- QRCode']">生成二维码</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('assign')" acl
[acl-ability]="['SUPPLY-VEHICLE-PLACEORDER-bulkDesignate']">指派熟车</button>
<!-- <button nz-button nzType="primary" (click)="choose()">取消</button> -->
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')" acl [acl-ability]="['SUPPLY-VEHICLE-PLACEORDER-bulkAnotherOrder']">司机抢单</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')" acl
[acl-ability]="['SUPPLY-VEHICLE-PLACEORDER-bulkAnotherOrder']">司机抢单</button>
</div>
</nz-card>

View File

@ -3,10 +3,35 @@
nz-input-number {
width: 100%;
}
nz-date-picker {
width: 100%;
}
.sf3 {
.goods_Tips_item {
.goods_tips {
width: calc(50% - 60px);
.ant-alert {
padding: 4px;
}
}
nz-form-item {
margin-bottom: 8px;
}
// .ant-form-item-control-input-content {
// display: flex;
// justify-content: end;
// }
}
}
}
i {
cursor: pointer;
}
@ -34,7 +59,10 @@
padding: 24px;
color: #7d7d7d;
font-size: 30px;
:hover{color: #52acff;}
:hover {
color: #52acff;
}
}
#container {
@ -45,6 +73,7 @@
input[type='number'] {
-moz-appearance: textfield;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
margin: 0;

View File

@ -210,6 +210,17 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
initSF3() {
this.schema3 = {
properties: {
goodsTips: {
type: 'string',
title: '',
ui: {
widget: 'custom',
class: 'goods_Tips_item',
// visibleIf: {
// goodsTypeName: (value: any) => value && value === '其它'
// }
}
},
goodsTypeId: {
type: 'string',
title: '货物名称',
@ -271,6 +282,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
errors: { required: '请填写货物名称' },
visibleIf: {
goodsTypeName: (value: any) => value && value === '其它'
},
blur: (value: any) => {
this.checkGoodsName();
}
}
}
@ -281,6 +295,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
'*': {
spanLabelFixed: 90,
grid: { span: 12 }
},
$goodsTips: {
grid: { span: 24 }
}
};
}
@ -1127,4 +1144,16 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
};
});
}
checkGoodsName() {
this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => {
if (res === false) {
const modalRef = this.modalService.error({
nzTitle: '货物名称含有违禁词,请重新输入!',
});
modalRef.afterClose.subscribe(result => {
// this.sf3.setValue('/goodsName1', null);
});
}
});
}
}

View File

@ -11,9 +11,7 @@
</nz-card>
<nz-card>
<div class="card-title"
>装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km预计行程耗时{{ totalTime }}小时</span></div
>
<div class="card-title">装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km预计行程耗时{{ totalTime }}小时</span></div>
<form nz-form [formGroup]="validateForm1" role="form">
<div nz-row [nzGutter]="24">
@ -24,21 +22,13 @@
<nz-form-control [nzErrorTip]="'请输入装货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
<input
nz-input
[(ngModel)]="data1.detailedAddress"
(click)="openMap('start', idx)"
formControlName="loadAddress{{ idx }}"
placeholder="请输入装货地"
readonly="true"
/>
<input nz-input [(ngModel)]="data1.detailedAddress" (click)="openMap('start', idx)"
formControlName="loadAddress{{ idx }}" placeholder="请输入装货地" readonly="true" />
</nz-input-group>
<span *ngIf="idx !== 0" style="padding: 0 10px"
><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i
></span>
<span *ngIf="idx == 0" style="visibility:hidden;padding: 0 10px"
><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i
></span>
<span *ngIf="idx !== 0" style="padding: 0 10px"><i nz-icon nzType="minus-circle" nzTheme="outline"
style="color: #d9001b" (click)="subStartInfo($event, idx)"></i></span>
<span *ngIf="idx == 0" style="visibility:hidden;padding: 0 10px"><i nz-icon nzType="minus-circle"
nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i></span>
</div>
</nz-form-control>
</nz-form-item>
@ -46,25 +36,12 @@
<nz-form-label nzRequired>联系人</nz-form-label>
<div style="display: flex; width: 80.7%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
[(ngModel)]="data1.appUserName"
formControlName="loadName{{ idx }}"
name="loadName{{ idx }}"
maxlength="30"
placeholder="请输入联系人姓名"
/>
<input nz-input [(ngModel)]="data1.appUserName" formControlName="loadName{{ idx }}"
name="loadName{{ idx }}" maxlength="30" placeholder="请输入联系人姓名" />
</nz-form-control>
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
<input
style="margin-left: 12px"
nz-input
[(ngModel)]="data1.contractTelephone"
maxlength="11"
formControlName="loadPhone{{ idx }}"
name="loadPhone{{ idx }}"
placeholder="请输入联系人电话"
/>
<input style="margin-left: 12px" nz-input [(ngModel)]="data1.contractTelephone" maxlength="11"
formControlName="loadPhone{{ idx }}" name="loadPhone{{ idx }}" placeholder="请输入联系人电话" />
</nz-form-control>
</div>
</nz-form-item>
@ -81,8 +58,7 @@
</div>
<div nz-col [nzSpan]="4">
<div style="display: flex; justify-content: center">
<span class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap"
nzTheme="outline"></i></span>
<span class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap" nzTheme="outline"></i></span>
</div>
</div>
<div nz-col [nzSpan]="10">
@ -92,22 +68,14 @@
<nz-form-control [nzErrorTip]="'请输入卸货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
<input
nz-input
[(ngModel)]="data2.detailedAddress"
(click)="openMap('end', idx)"
formControlName="unloadAddress{{ idx }}"
placeholder="请输入卸货地"
name="unloadAddress{{ idx }}"
readonly="true"
/>
<input nz-input [(ngModel)]="data2.detailedAddress" (click)="openMap('end', idx)"
formControlName="unloadAddress{{ idx }}" placeholder="请输入卸货地" name="unloadAddress{{ idx }}"
readonly="true" />
</nz-input-group>
<span *ngIf="idx !== 0" style="padding: 0 10px"
><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i
></span>
<span *ngIf="idx == 0" style="visibility:hidden;padding: 0 10px"
><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i
></span>
<span *ngIf="idx !== 0" style="padding: 0 10px"><i nz-icon nzType="minus-circle" nzTheme="outline"
style="color: #d9001b" (click)="subEndInfo($event, idx)"></i></span>
<span *ngIf="idx == 0" style="visibility:hidden;padding: 0 10px"><i nz-icon nzType="minus-circle"
nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i></span>
</div>
</nz-form-control>
</nz-form-item>
@ -115,25 +83,13 @@
<nz-form-label nzRequired>联系人</nz-form-label>
<div style="display: flex; width: 80.7%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
[(ngModel)]="data2.appUserName"
maxlength="30"
formControlName="unloadName{{ idx }}"
name="unloadAddress{{ idx }}"
placeholder="请输入联系人姓名"
/>
<input nz-input [(ngModel)]="data2.appUserName" maxlength="30" formControlName="unloadName{{ idx }}"
name="unloadAddress{{ idx }}" placeholder="请输入联系人姓名" />
</nz-form-control>
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
<input
style="margin-left: 12px"
nz-input
[(ngModel)]="data2.contractTelephone"
formControlName="unloadPhone{{ idx }}"
name="unloadAddress{{ idx }}"
maxlength="11"
placeholder="请输入联系人电话"
/>
<input style="margin-left: 12px" nz-input [(ngModel)]="data2.contractTelephone"
formControlName="unloadPhone{{ idx }}" name="unloadAddress{{ idx }}" maxlength="11"
placeholder="请输入联系人电话" />
</nz-form-control>
</div>
</nz-form-item>
@ -154,12 +110,8 @@
<nz-form-item>
<nz-form-label nzRequired>装货时间</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入装货时间'">
<nz-date-picker
[nzShowTime]="{ nzFormat: 'HH' }"
nzFormat="yyyy-MM-dd HH:00前"
formControlName="loadingTime"
[nzDisabledDate]="disabledDateStart"
></nz-date-picker>
<nz-date-picker [nzShowTime]="{ nzFormat: 'HH' }" nzFormat="yyyy-MM-dd HH:00前" formControlName="loadingTime"
[nzDisabledDate]="disabledDateStart"></nz-date-picker>
</nz-form-control>
</nz-form-item>
</div>
@ -168,8 +120,8 @@
<nz-form-item>
<nz-form-label nzRequired>卸货时间</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入卸货时间'">
<nz-date-picker [nzShowTime]="{ nzFormat: 'HH' }"
nzFormat="yyyy-MM-dd HH:00前" formControlName="unloadingTime"></nz-date-picker>
<nz-date-picker [nzShowTime]="{ nzFormat: 'HH' }" nzFormat="yyyy-MM-dd HH:00前"
formControlName="unloadingTime"></nz-date-picker>
</nz-form-control>
</nz-form-item>
</div>
@ -182,7 +134,16 @@
<div class="card-title">货物信息</div>
<div nz-row>
<div nz-col nzSpan="16">
<sf #sf3 [schema]="schema3" [button]="'none'" [ui]="ui3" [formData]="sf3data"></sf>
<sf #sf3 [schema]="schema3" class="sf3" [button]="'none'" [ui]="ui3" [formData]="sf3data">
<ng-template class="1" sf-template="goodsTips" let-i let-ui="ui">
<nz-alert class="goods_tips" nzType="warning" [nzMessage]="tpl" nzShowIcon></nz-alert>
</ng-template>
<ng-template #tpl>
<span> 国家法规及行政命令禁限运货物不能托运
<a target="_blank" [queryParams]="{ type: 15 }" [routerLink]="['/agreement']">《禁运物品说明》</a>
</span>
</ng-template>
</sf>
</div>
</div>
<sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data">
@ -233,8 +194,8 @@
<ng-template sf-template="freeInsurance2" let-i let-ui="ui">
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
</ng-template>
<ng-template #template1>①香港、澳门、台湾、西藏、新疆不予承保②单次运输保额仅限200万元以内③保险详细内容及注意事项请见<a target="_blank" [queryParams]="{ type: 10 }"
[routerLink]="['/agreement']">《保险告知函》</a></ng-template>
<ng-template #template1>①香港、澳门、台湾、西藏、新疆不予承保②单次运输保额仅限200万元以内③保险详细内容及注意事项请见<a target="_blank"
[queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《保险告知函》</a></ng-template>
</sf>
</div>
</div>
@ -256,18 +217,21 @@
<div nz-col nzSpan="8">
<sf #sf7 [schema]="schema7" [button]="'none'" [ui]="ui7" [formData]="sf7data">
<ng-template sf-template="prePay" let-i let-ui="ui">
<nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2" nzPlaceHolder="请输入0-99999"
(ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb" [nzParser]="parserRmb">
<nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2"
nzPlaceHolder="请输入0-99999" (ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb"
[nzParser]="parserRmb">
</nz-input-number>
</ng-template>
<ng-template sf-template="toPay" let-i let-ui="ui">
<nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2" nzPlaceHolder="请输入0-99999"
(ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb" [nzParser]="parserRmb">
<nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2"
nzPlaceHolder="请输入0-99999" (ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb"
[nzParser]="parserRmb">
</nz-input-number>
</ng-template>
<ng-template sf-template="receiptPay" let-i let-ui="ui">
<nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2" nzPlaceHolder="请输入0-99999"
(ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb" [nzParser]="parserRmb">
<nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2"
nzPlaceHolder="请输入0-99999" (ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb"
[nzParser]="parserRmb">
</nz-input-number>
</ng-template>
<ng-template sf-template="subtotal" let-i let-ui="ui">{{ i.value | currency }}</ng-template>
@ -293,12 +257,12 @@
<nz-card>
<div class="align-center">
<button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="goBack()">取消</button>
<button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm()"
acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交修改</button
>
<button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="submitConfirm('assign')" acl [acl-ability]="['SUPPLY-BULK-PLACEORDER-vehicleDesignate']">指派熟车</button>
<button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')"
acl [acl-ability]="['SUPPLY-BULK-PLACEORDER-vehicleAnotherOrder']">司机抢单</button
>
<button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px"
(click)="submitConfirm()" acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交修改</button>
<button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="submitConfirm('assign')" acl
[acl-ability]="['SUPPLY-BULK-PLACEORDER-vehicleDesignate']">指派熟车</button>
<button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px"
(click)="submitConfirm('publish')" acl
[acl-ability]="['SUPPLY-BULK-PLACEORDER-vehicleAnotherOrder']">司机抢单</button>
</div>
</nz-card>

View File

@ -3,10 +3,35 @@
nz-input-number {
width: 100%;
}
nz-date-picker {
width: 94.3%;
}
.sf3 {
.goods_Tips_item {
.goods_tips {
width: calc(50% - 60px);
.ant-alert {
padding: 4px;
}
}
nz-form-item {
margin-bottom: 8px;
}
// .ant-form-item-control-input-content {
// display: flex;
// justify-content: end;
// }
}
}
}
i {
cursor: pointer;
}
@ -34,7 +59,10 @@
padding: 24px;
color: #7d7d7d;
font-size: 30px;
:hover{color: #52acff;}
:hover {
color: #52acff;
}
}
#container {
@ -45,11 +73,13 @@
input[type='number'] {
-moz-appearance: textfield;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
margin: 0;
-webkit-appearance: none;
}
.hides {
margin-left: 10px;
color: aqua;

View File

@ -262,6 +262,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
initSF3() {
this.schema3 = {
properties: {
goodsTips: {
type: 'string',
title: '',
ui: {
widget: 'custom',
class: 'goods_Tips_item',
// visibleIf: {
// goodsTypeName: (value: any) => value && value === '其它'
// }
}
},
goodsTypeId: {
type: 'string',
title: '货物名称',
@ -323,6 +334,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
errors: { required: '请填写货物名称' },
visibleIf: {
goodsTypeName: (value: any) => value && value === '其它'
},
blur: (value: any) => {
this.checkGoodsName();
}
}
}
@ -333,6 +347,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
'*': {
spanLabelFixed: 90,
grid: { span: 12 }
},
$goodsTips: {
grid: { span: 24 }
}
};
}
@ -1450,4 +1467,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
this.payChange()
}
checkGoodsName() {
this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => {
if (res === false) {
const modalRef = this.modalService.error({
nzTitle: '货物名称含有违禁词,请重新输入!',
});
modalRef.afterClose.subscribe(result => {
// this.sf3.setValue('/goodsName1', null);
});
}
});
}
}

View File

@ -436,7 +436,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
map((res: any) => {
return [...res];
})
)
);
},
change: (tag: any, org: any) => {
if (tag === '3') {
@ -455,7 +455,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
} ,
}
},
type2: {
type: 'string',
@ -495,7 +495,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
}
},
required: ['insurancePremium']
};
@ -562,8 +562,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
receiptUserPhone: {
type: 'string',
title: '联系电话',
format: 'mobile',
maxLength: 11,
ui: {
errors: {
format: '请输入正确联系电话格式'
},
visibleIf: {
receiptType: value => value === '2'
}
@ -1030,10 +1034,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
this.getInsurersPrice(); // 计算保费金额
});
}
return true
return true;
} else {
this.service.msgSrv.warning('请重新手动选择地址!')
return false
this.service.msgSrv.warning('请重新手动选择地址!');
return false;
}
}
});
@ -1215,9 +1219,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
i.setValue(event);
if (event >= 99999) {
this.modalService.warning({
nzTitle: '可输入的最大金额为99999元',
nzTitle: '可输入的最大金额为99999元'
});
}
this.payChange()
this.payChange();
}
}

View File

@ -180,6 +180,9 @@ export class SupplyManagementService extends BaseService {
// 发送邀请司机短信
$api_send_msg_code = `/api/mdc/pbc/smsSend/sendInviteDriver`;
// 校验货物名称是否合规
$api_checkGoodsName = '/api/sdc/goodsResourceShipper/checkGoodsName';
getDictByKey(dictKey: string) {
const params = { dictKey: dictKey };
return this.request(this.$api_getDictValue, params);

View File

@ -36,7 +36,7 @@
</nz-tabset>
<!-- 数据列表 -->
<st #st [scroll]="{ x: '1200px',y:'450px' }" [data]="service.$api_get_individual_income_page" [columns]="columns"
[req]="{ params: reqParams }" [page]="{}" [loading]="service.http.loading" (change)="stChange($event)">
[req]="{ process: beforeReq }" [page]="{}" [loading]="service.http.loading" (change)="stChange($event)">
</st>
</nz-card>
<ng-template #extraTemplate>

View File

@ -1,6 +1,6 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STChange, STColumn, STComponent, STData } from '@delon/abc/st';
import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
@ -32,16 +32,15 @@ export class TaxManagementIndividualIncomeComponent implements OnInit {
constructor(public service: TaxManagementService) {}
/**
* 查询参数
*/
get reqParams() {
const params = Object.assign({}, this.sf?.value || {}, {
declareStatus: this.selectedIndex
});
delete params._$expand;
return { ...params };
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { declareStatus: this.selectedIndex });
if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf.value });
delete requestOptions.body._$expand;
}
this.selectedRows = [];
return requestOptions;
};
stChange(e: STChange): void {
switch (e.type) {

View File

@ -499,5 +499,4 @@ export class TaxManagementOrderReportingComponent implements OnInit {
})
}
}

View File

@ -51,7 +51,7 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => {let a: string = '';
switch (this.subjectType) {
case '0':
a = this.record?.networkTransporter;
a = this.record?.networkTransporterId;
break
case '1':
a = this.record?.shipperId;
@ -60,7 +60,7 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit {
a = this.record?.driverId;
break
case '3':
a = this.record?.billId;
a = this.record?.wayBillId;
break
}
Object.assign(requestOptions.body, {

View File

@ -237,7 +237,7 @@ export class ETCBlacklistComponent implements OnInit {
}
},
params5: {
title: '司机姓名',
title: '车辆所有人',
type: 'string',
ui: {
placeholder: '请输入',

View File

@ -177,7 +177,7 @@ export class InvoiceRequestedDetailComponent implements OnInit {
}
routeToOrder(item: any) {
if (item.billType === 1) {
if (item.billType === '1') {
this.router.navigate(['/order-management/vehicle/vehicle-detail/' + item.billHId]);
} else {
this.router.navigate(['/order-management/bulk/bulk-detail/' + item.billHId]);

View File

@ -20,7 +20,7 @@
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<!-- <button nz-button> 导出</button> -->
<button nz-button (click)="exprot()"> 导出</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>

View File

@ -302,6 +302,11 @@ export class InvoiceRequestedComponent {
this.sf?.setValue('/expand', this._$expand);
}
// 导出
exprot() {
this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_export_invoice_requested_page);
}
private initSF(): SFSchema {
return {
properties: {

View File

@ -17,6 +17,8 @@ export class TicketService extends ShipperBaseService {
// 运营端查询发票申请记录
$api_get_invoice_requested_page = '/api/fcc/ficoVatappH/queryOperateVatappHList';
// 导出发票申请记录
$api_export_invoice_requested_page = '/api/fcc/ficoVatappH/reportOperateVatappHList';
// 获取开票申请订单明细头部信息
$api_get_invoice_requested_header_detail = '/api/fcc/ficoVatappBill/getDetailHeadByVatappHId';
// 货主/运营端获取开票申请订单明细
@ -74,7 +76,7 @@ export class TicketService extends ShipperBaseService {
// 获取分票发票抬头开票申请订单明细
$api_get_invoice_order_detail = '/api/fcc/ficoVatappBill/getDetailByVatinvHId';
// 货主/运营端获取开票申请订单明细导出
$api_export_invoice_order_detail = '/api/fcc/ficoVatappBill/reportDetailByVatapp';
$api_export_invoice_order_detail = '/api/fcc/ficoVatappBill/reportDetailByVatinvHId';
// 获取分票发票抬头开票申请费用明细
$api_get_invoice_cost_detail = '/api/fcc/ficoVatappFee/getDetailByVatinvHId';
// 获取分票发票明细
@ -149,21 +151,22 @@ export class TicketService extends ShipperBaseService {
if (!url) {
return;
}
const uA = window.navigator.userAgent; // 判断浏览器内核
const isIE =
/msie\s|trident\/|edge\//i.test(uA) &&
!!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
const objectUrl = url;
const a = document.createElement('a');
document.body.appendChild(a);
a.href = objectUrl;
a.download = '面单.pdf';
if (isIE) {
// 兼容IE11无法触发下载的问题
(navigator as any).msSaveBlob(url, a.download);
} else {
a.click();
}
a.remove();
this.openURL(url);
// const uA = window.navigator.userAgent; // 判断浏览器内核
// const isIE =
// /msie\s|trident\/|edge\//i.test(uA) &&
// !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
// const objectUrl = url;
// const a = document.createElement('a');
// document.body.appendChild(a);
// a.href = objectUrl;
// a.download = '面单.pdf';
// if (isIE) {
// // 兼容IE11无法触发下载的问题
// (navigator as any).msSaveBlob(url, a.download);
// } else {
// a.click();
// }
// a.remove();
}
}

View File

@ -39,8 +39,8 @@ export class WaybillManagementBulkeDetailComponent implements OnInit {
modalTitle:string = '';
unLoadingPlaceVOList: any = [];
logColumns2: STColumn[] = [
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' },
{ title: '时间', index: 'parkBte' },
{ title: '地点', index: 'parkAdr' },
];
logColumns: STColumn[] = [
{ title: '款项', index: 'costCodeLabel' },
@ -167,14 +167,15 @@ sureArrive(item: any) {
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;
this.addressItems = res.cityArray;
this.addressItems = res.parkArray;
if(this.addressItems && this.addressItems.length > 0){
this.addressItems.forEach(item => {
item.vinOutTime = this.getLocalTime(item.vinOutTime);
item.parkBte = this.getLocalTime(item.parkBte);
});
}
}
@ -190,7 +191,8 @@ sureArrive(item: any) {
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;

View File

@ -160,14 +160,15 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;
this.addressItems = res.cityArray;
this.addressItems = res.parkArray;
if (this.addressItems && this.addressItems.length > 0) {
this.addressItems.forEach(item => {
item.vinOutTime = this.getLocalTime(item.vinOutTime);
item.parkBte = this.getLocalTime(item.parkBte);
});
}
}
@ -183,7 +184,8 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro
points?.forEach((item: any) => {
list.push({
name: item.hgt,
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
time: item.gtm
});
});
this.mapList = list;

View File

@ -48,15 +48,18 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
@Output()
readonly clcikPointEvent = new EventEmitter<any>();
constructor(public service: BaseService, private amapService: AmapService) {}
constructor(public service: BaseService, private amapService: AmapService) {
this.mapInit();
}
ngOnChanges(changes: SimpleChanges): void {
// 路线图变更: 设置路线图, 指定路线图
if (changes?.pathList?.currentValue && this?.pathSimplifierIns) {
this.setData(changes.pathList?.currentValue);
this.setPathIndex(this.selectedIndex);
}
// 路径信息变更: 更新路线图, 设置路线图, 指定路线图, 获取终点地址信息并标点
if (changes?.mapList?.currentValue && this?.pathSimplifierIns && changes.mapList?.currentValue.length > 0) {
if (changes?.mapList?.currentValue) {
// console.log(this.mapList);
this.pathList = [
{
@ -64,22 +67,29 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
points: changes.mapList?.currentValue
}
];
if (this?.pathSimplifierIns) {
this.setData(this.pathList);
if (changes.mapList?.currentValue.length > 0) {
this.setPathIndex(this.selectedIndex);
this.getPoiByPositon(this.mapList[this.mapList?.length - 1]?.lnglat);
this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time));
this.getPoiByPositon(
'终',
'red',
this.mapList[this.mapList?.length - 1]?.lnglat,
'时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time)
);
}
}
}
// 标点列表变更: 更新标点数据, 绘画标点
if (changes?.pois?.currentValue) {
// console.log(this.pois);
this._pois = changes?.pois?.currentValue;
if (this?.markerList && this._pois.length > 0) {
this.markerList.render(this._pois);
}
}
}
ngOnInit(): void {
this.mapInit();
}
ngOnInit(): void {}
ngOnDestroy(): void {
// 销毁地图数据
if (this.aMap) {
@ -145,6 +155,13 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
if (this.pathList.length > 0) {
this.setPathIndex(this.selectedIndex);
this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time));
this.getPoiByPositon(
'终',
'red',
this.mapList[this.mapList?.length - 1]?.lnglat,
'时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time)
);
}
this.pathSimplifierIns.on('pointClick', (e: any, info: any) => {
@ -158,7 +175,10 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
position: info.pathData.points[info.pointIndex].lnglat,
content: `
<label style="font-weight: bold;">${result.regeocode.formattedAddress}<label/><br/>
<label style="font-weight: 400;">车速: ${info.pathData.points[info.pointIndex].name}<label/><br/>
<label style="font-weight: 400;">车速: ${info.pathData.points[info.pointIndex].name}km/h<label/><br/>
<label style="font-weight: 400;">东经: ${info.pathData.points[info.pointIndex].lnglat?.[0]}, 北纬:${
info.pathData.points[info.pointIndex].lnglat?.[1]
}<label/><br/>
<label style="font-weight: 400;">时间: ${this.amapService.formatTime(info.pathData.points[info.pointIndex].time)}<label/>
`
});
@ -179,12 +199,13 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
//返回数据项对应的Marker
getMarker: (dataItem: POI, context: any, recycledMarker: any) => {
//存在可回收利用的marker
if (recycledMarker) {
//直接更新内容返回
recycledMarker.setIconLabel(context.id);
recycledMarker.setIconStyle(dataItem.color);
return recycledMarker;
}
// if (recycledMarker) {
// //直接更新内容返回
// recycledMarker.setIconLabel(context.id);
// recycledMarker.setIconStyle(dataItem.color);
// return recycledMarker;
// }
this.SimpleMarker = SimpleMarker;
//返回一个新的Marker
return new SimpleMarker({
@ -212,6 +233,8 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
});
if (this._pois?.length > 0) {
console.log(this._pois);
//展示该数据
this.markerList.render(this._pois);
}
@ -241,7 +264,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
startNav() {
this.navigator = this.pathSimplifierIns?.createPathNavigator(this.selectedIndex, {
loop: true, //循环播放
speed: 500000 * this.navSpeed //巡航速度,单位千米/小时
speed: 50000 * this.navSpeed //巡航速度,单位千米/小时
});
this.navigator?.start();
}
@ -269,11 +292,11 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
}
/** 根据标点经纬度获取地址信息 */
getPoiByPositon(position: string[]) {
getPoiByPositon(label: string, color: string, position: string[], time: string) {
this.geocoder.getAddress(position, (status: any, result: any) => {
if (status === 'complete' && result.info === 'OK') {
// result中对应详细地理坐标信息
this._pois = [...this.pois, { markerLabel: '终', color: 'red', position: position, title: result.regeocode.formattedAddress }];
this._pois = [...this._pois, { markerLabel: label, color: color, position, title: result.regeocode.formattedAddress, time }];
if (this.markerList) {
this.markerList.render(this._pois);
}
@ -287,7 +310,14 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
* @param infoItem
*/
selectedPOI(infoItem: InfoItem) {
this.infoWindow.setContent(infoItem.content || `地址: <pre>${infoItem.title}</pre>`);
this.infoWindow.setContent(
infoItem.content ||
`
<label style="font-weight: bold;">${infoItem.title}</label><br/>
东经:${infoItem.position?.[0]}, 北纬:${infoItem.position?.[1]}<br/>
${infoItem.time}
`
);
this.infoWindow.open(this.aMap, infoItem.position);
this.infoWindow.setPosition(infoItem.position);
// 地图定位居中

View File

@ -114,6 +114,9 @@ export class AmapService {
}
formatTime(time: string): string {
if (!time) {
return '';
}
return `${time.slice(0, 4)}-${time.slice(4, 6)}-${time.slice(6, 8)} ${time.slice(9, 11)}:${time.slice(11, 13)}:${time.slice(13, 15)}`;
}
}
@ -128,6 +131,7 @@ export interface POI {
export interface InfoItem {
title?: string;
content?: string;
time?: string;
position: string[];
}

View File

@ -34,7 +34,7 @@ import { IBase } from '../../interfaces';
import { EAFileUtil } from '../../utils';
@Injectable({
providedIn: 'root',
providedIn: 'root'
})
export class BaseService implements IBase {
// 新增实例接口地址
@ -94,7 +94,7 @@ export class BaseService implements IBase {
parameter: any = {},
method: 'POST' | 'GET',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Observable<any> {
if (paramType === 'FORM') {
parameter = this.getFormData(parameter);
@ -104,7 +104,7 @@ export class BaseService implements IBase {
return this.http
.request(method, url, {
body: paramInBody ? parameter : null,
params: paramInBody ? null : parameter,
params: paramInBody ? null : parameter
})
.pipe(
map((res: any) => {
@ -122,7 +122,7 @@ export class BaseService implements IBase {
this.msgSrv.warning(res.msg);
return allowBadCode ? res : null;
}
}),
})
);
}
@ -144,7 +144,7 @@ export class BaseService implements IBase {
parameter: any = {},
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Observable<any> {
return this.httpRequest(url, parameter, method, paramInBody, paramType);
}
@ -154,7 +154,7 @@ export class BaseService implements IBase {
parameter: any = {},
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Promise<any> {
return this.request(url, parameter, method, paramInBody, paramType).toPromise();
}
@ -165,7 +165,7 @@ export class BaseService implements IBase {
url: string = this.$api_add_one,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Observable<any> {
return this.request(url, parameter, method, paramInBody, paramType);
}
@ -175,7 +175,7 @@ export class BaseService implements IBase {
url: string = this.$api_add_one,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Promise<any> {
return this.addOne(parameter, url, method, paramInBody, paramType).toPromise();
}
@ -185,7 +185,7 @@ export class BaseService implements IBase {
url: string = this.$api_add_many,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Observable<any> {
return this.request(url, parameter, method, paramInBody, paramType);
}
@ -195,7 +195,7 @@ export class BaseService implements IBase {
url: string = this.$api_add_many,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Promise<any> {
return this.addMany(parameter, url, method, paramInBody, paramType).toPromise();
}
@ -206,7 +206,7 @@ export class BaseService implements IBase {
url: string = this.$api_del_one,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Observable<any> {
return this.request(url, parameter, method, paramInBody, paramType);
}
@ -216,7 +216,7 @@ export class BaseService implements IBase {
url: string = this.$api_del_one,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Promise<any> {
return this.delOne(parameter, url, method, paramInBody, paramType).toPromise();
}
@ -226,7 +226,7 @@ export class BaseService implements IBase {
url: string = this.$api_del_many,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Observable<any> {
return this.request(url, parameter, method, paramInBody, paramType);
}
@ -236,7 +236,7 @@ export class BaseService implements IBase {
url: string = this.$api_del_many,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Promise<any> {
return this.delMany(parameter, url, method, paramInBody, paramType).toPromise();
}
@ -247,7 +247,7 @@ export class BaseService implements IBase {
url: string = this.$api_edit_one,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Observable<any> {
return this.request(url, parameter, method, paramInBody, paramType);
}
@ -257,7 +257,7 @@ export class BaseService implements IBase {
url: string = this.$api_edit_one,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Promise<any> {
return this.updateOne(parameter, url, method, paramInBody, paramType).toPromise();
}
@ -267,7 +267,7 @@ export class BaseService implements IBase {
url: string = this.$api_edit_many,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Observable<any> {
return this.request(url, parameter, method, paramInBody, paramType);
}
@ -277,7 +277,7 @@ export class BaseService implements IBase {
url: string = this.$api_edit_many,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Promise<any> {
return this.updateMany(parameter, url, method, paramInBody, paramType).toPromise();
}
@ -290,7 +290,7 @@ export class BaseService implements IBase {
url: string = this.$api_get_one,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Observable<any> {
return this.request(url, parameter, method, paramInBody, paramType);
}
@ -300,7 +300,7 @@ export class BaseService implements IBase {
url: string = this.$api_get_one,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Promise<any> {
return this.getOne(parameter, url, method, paramInBody, paramType).toPromise();
}
@ -313,12 +313,12 @@ export class BaseService implements IBase {
url: string = this.$api_get_many,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Observable<any[]> {
return this.httpRequest(url, parameter, method, paramInBody, paramType).pipe(
map((res) => {
map(res => {
return (res as any[]) || [];
}),
})
);
}
@ -327,7 +327,7 @@ export class BaseService implements IBase {
url: string = this.$api_get_many,
method: 'POST' | 'GET' = 'POST',
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
paramType: 'JSON' | 'FORM' = 'JSON'
): Promise<any[]> {
return this.getMany(parameter, url, method, paramInBody, paramType).toPromise();
}
@ -352,19 +352,19 @@ export class BaseService implements IBase {
paramInBody: boolean = true,
paramType: 'JSON' | 'FORM' = 'JSON',
allowBadCode: boolean = true,
async: boolean = true,
async: boolean = true
): Observable<any> | Promise<any> {
if (allowBadCode) {
url += `?_allow_badcode=true`;
}
const response = this.httpRequest(url, parameter, method, paramInBody, paramType).pipe(
tap((res) => {
tap(res => {
if (res.success) {
this.msgSrv.success(`创建下载任务成功,请前往下载任务列表下载您的文件!`);
window.open('#/download');
}
return res;
}),
})
);
return async ? response.toPromise() : response;
}
@ -396,11 +396,15 @@ export class BaseService implements IBase {
this.msgSrv.warning(m.msg);
return false;
}
}),
})
)
.toPromise();
}
openURL(url: string) {
window.open(url);
}
/**
* 直接下载文件
*/
@ -464,19 +468,19 @@ export class BaseService implements IBase {
*/
getDict(key: string): Observable<any[]> {
return this.http.post(this.$api_get_dict, { dict: key }).pipe(
map((res) => {
map(res => {
if (res.success === true) {
return res.data.map((r: any) => {
return {
label: r.itemValue,
value: r.itemKey,
value: r.itemKey
};
});
} else {
this.msgSrv.warning(`获取取字典【${key}】时发生错误:${res.msg || '未知错误!'}`);
return [];
}
}),
})
);
}
@ -508,7 +512,7 @@ export class BaseService implements IBase {
if (paramsIndex > -1) {
const paramsStr = url.substr(paramsIndex + 1);
const params = paramsStr.split('&');
const keyMap = params.find((e) => e.includes(paramName));
const keyMap = params.find(e => e.includes(paramName));
const value = keyMap ? keyMap.split('=')[1] : '';
return value;
}