This commit is contained in:
xiaoxing.liu
2022-04-13 19:07:10 +08:00
69 changed files with 1273 additions and 1038 deletions

View File

@ -1,3 +1,4 @@
<span class="mr-md">客服电话0755-88393483</span>
<!--Search-->
<layout-pro-search class="hidden-xs"></layout-pro-search>
<!--Link-->

View File

@ -33,37 +33,37 @@ export class ContractManagementFrameComponent implements OnInit {
private router: Router,
public shipperservice: ShipperBaseService,
private datePipe: DatePipe,
) {}
) { }
ngOnInit(): void {
this.initST();
this.initSF();
}
/**
* 查询参数
*/
get reqParams() {
const params = {
...this.sf?.value,
}
delete params.signTime;
delete params._$expand;
if(this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
params.signTime = {
start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
}
}
if(this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
params.effectiveEndTime = {
start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
}
}
return {
...params
};
/**
* 查询参数
*/
get reqParams() {
const params = {
...this.sf?.value,
}
delete params.signTime;
delete params._$expand;
if (this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
params.signTime = {
start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
}
}
if (this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
params.effectiveEndTime = {
start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
}
}
return {
...params
};
}
/**
* 初始化数据列表
*/
@ -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' },
@ -157,7 +157,7 @@ export class ContractManagementFrameComponent implements OnInit {
widget: 'dict-select',
containsAllLable: true,
params: { dictKey: 'contract:type' },
containAllLable:true,
containAllLable: true,
} as SFSelectWidgetSchema,
},
enterpriseInfoId: {
@ -210,7 +210,7 @@ export class ContractManagementFrameComponent implements OnInit {
widget: 'dict-select',
containsAllLable: true,
params: { dictKey: 'esign:flow:status' },
containAllLable:true,
containAllLable: true,
visibleIf: {
_$expand: (value: boolean) => value,
},
@ -238,9 +238,9 @@ export class ContractManagementFrameComponent implements OnInit {
}
}
approval(): void {}
approval(): void { }
add(): void {}
add(): void { }
routeTo(item: any) {
this.router.navigate(['/ticket/invoice-requested-detail/1']);

View File

@ -30,7 +30,7 @@
</div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading"
(click)="st?.load(1)" acl [acl-ability]="['CONTRACT-INDEX-searchDetail']">查询</button>
(click)="st?.load(1)" acl [acl-ability]="['CONTRACT-INDEX-searchDetail']">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
@ -48,14 +48,15 @@
</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>
<span></span>
<span *ngIf="item.signingObject == 0"></span>
<span></span>
</ng-template>
</st>
</nz-card>

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

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-04-07 17:57:23
* @LastEditors : Shiming
* @LastEditTime : 2022-04-07 19:28:24
* @LastEditTime : 2022-04-13 10:22:35
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\curve\\curve.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -75,7 +75,7 @@ export class DatatableCustomindexCurveMinComponent implements OnInit,OnChanges {
this.chart = new Chart({
container: el,
autoFit: true,
height: 200,
height: 320,
});
let value: any = []
this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-04-06 10:57:56
* @LastEditors : Shiming
* @LastEditTime : 2022-04-07 19:51:32
* @LastEditTime : 2022-04-13 15:20:32
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -23,7 +23,7 @@
</div>
<div nz-row [nzGutter]="24">
<div nz-col class="gutter-row" [nzSpan]="8">
<div nz-col class="gutter-row" nzXs="12" nzSm="12" nzMd="12" nzLg="12" nzXl="8" nzXXl="8">
<nz-card nzTitle="2022全年交易情况">
<nz-row [nzGutter]="16">
<nz-col [nzSpan]="12">
@ -47,11 +47,11 @@
</nz-card>
<nz-card nzTitle="实时货源">
<st
[scroll]="{ y: '300px' }"
#st
multiSort
bordered
[columns]="columns"
[scroll]="{ y: '320px' }"
[data]="service.$api_getRealTimeSupply"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data' } }"
@ -59,7 +59,7 @@
[loading]="service.http.loading"
>
<ng-template st-row="index" let-item let-index="index">
{{ index }}
{{ index + 1 }}
</ng-template>
<ng-template st-row="weight" let-item let-index="index">
{{ item.weight ? item.weight + '吨' : '' }}
@ -72,7 +72,7 @@
</st>
</nz-card>
</div>
<div nz-col class="gutter-row" [nzSpan]="8">
<div nz-col class="gutter-row" nzXs="12" nzSm="12" nzMd="12" nzLg="12" nzXl="8" nzXXl="8">
<nz-card>
<nz-row [nzGutter]="24">
<nz-col [nzSpan]="8">
@ -86,14 +86,14 @@
</nz-col>
</nz-row>
</nz-card>
<app-datatable-customindex-map style="max-height: 600px" #map [chartData]="chartData"></app-datatable-customindex-map>
<app-datatable-customindex-map style="max-height: 680px" #map [chartData]="chartData"></app-datatable-customindex-map>
<nz-card>
<nz-row [nzGutter]="24">
<g2-bar #bar height="200" [delay]='500' repaint='true' [title]="'本月发货量排名'" [data]="salesData2" (ready)='genData()'></g2-bar>
<g2-bar #bar height="310" [delay]='500' repaint='true' [title]="'本月发货量排名'" [data]="salesData2" (ready)='genData()'></g2-bar>
</nz-row>
</nz-card>
</div>
<div nz-col class="gutter-row" [nzSpan]="8">
<div nz-col class="gutter-row" nzXs="12" nzSm="12" nzMd="12" nzLg="12" nzXl="8" nzXXl="8">
<nz-card>
<nz-row [nzGutter]="24">
<nz-col [nzSpan]="6">
@ -157,7 +157,7 @@
#st
multiSort
bordered
[scroll]="{y: '300px'}"
[scroll]="{y: '290px'}"
[columns]="orderColumns"
[data]="service.$api_getRealTimeWaybillRiskControl"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqOrderParams }"

View File

@ -5,7 +5,7 @@ import { map } from 'rxjs/operators';
* @Author : Shiming
* @Date : 2022-04-06 10:57:56
* @LastEditors : Shiming
* @LastEditTime : 2022-04-07 19:48:19
* @LastEditTime : 2022-04-13 10:25:50
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -127,7 +127,7 @@ export class DatatableDatascreenComponent implements OnInit {
*/
initST() {
this.columns = [
{ title: '序号', render: 'index', className: 'text-center', width: '70px' },
{ title: '序号', render: 'index', className: 'text-center', width: '70px', },
{ title: '发货地', index: 'loadAddress', className: 'text-center', width: '90px' },
{ title: '卸货地', index: 'dischargeAddress', className: 'text-center', width: '90px' },
{ title: '货物', index: 'goodsName', className: 'text-center', width: '90px' },
@ -138,7 +138,7 @@ export class DatatableDatascreenComponent implements OnInit {
this.orderColumns = [
{ title: '运单号', index: 'wayCode', className: 'text-center', width: '150px' },
{ title: '司机/车辆', index: 'carNo', className: 'text-center', width: '120px' },
{ title: '货主', index: 'shipperName', className: 'text-center', width: '70px' },
{ title: '货主', index: 'shipperName', className: 'text-center', width: '200px' },
{ title: '时间', index: 'createTime', className: 'text-center', width: '200px' },
{ title: '异常预警', index: 'warningTypeLabel', className: 'text-center', width: '120px' }
];

View File

@ -4,8 +4,9 @@
* @Author : Shiming
* @Date : 2022-04-06 17:57:07
* @LastEditors : Shiming
* @LastEditTime : 2022-04-07 19:44:32
* @LastEditTime : 2022-04-13 15:20:33
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\map\\map.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<g2-custom delay="200" (render)="render($event)" ></g2-custom>
<g2-custom #map div style="height: 680px; " delay="200" (render)="render($event)" ></g2-custom>
<!-- <nz-col nzXs="0" nzSm="0" nzMd="0" nzLg="14" nzXl="14" nzXXl="14" style="z-index: 9999;"></nz-col> -->

View File

@ -1,4 +1,4 @@
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild, AfterViewInit } from '@angular/core';
import { Chart } from '@antv/g2';
import DataSet from '@antv/data-set';
import { DataService } from 'src/app/routes/datatable/services/data.service';
@ -7,9 +7,11 @@ import { DataService } from 'src/app/routes/datatable/services/data.service';
templateUrl: './map.component.html',
styleUrls: ['./map.component.less']
})
export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
export class DatatableCustomindexMapComponent implements OnInit, OnChanges, AfterViewInit {
el: any;
@Input() chartData: any;
@ViewChild('auditModal', { static: false }) auditModal!: any;
@ViewChild('map',{static: false}) map!: any;
chart: any;
mapData: any;
ds!: DataSet ;
@ -18,6 +20,10 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
userDv: any;
userData: any = [];
constructor(private service: DataService, private ngZone: NgZone) {}
ngAfterViewInit(): void {
this.map.el.nativeElement.style.height = this.map.el.nativeElement.clientWidth + 'px'
this.chart.render();
}
ngOnChanges(changes: SimpleChanges): void {
if (this.chartData) {
@ -49,7 +55,6 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
this.chart = new Chart({
container: el,
autoFit: true,
height: 680,
padding: [0, 0]
});
this.chart.tooltip({
@ -85,18 +90,6 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
stroke: '#ccc',
lineWidth: 1
});
// 可视化用户数据
// this.userData = [
// { name: '山东', value: 21 },
// { name: '山东', value: 22},
// { name: '广东', value: 20, },
// { name: '广东', value: 20 },
// { name: '四川', value: 120 },
// { name: '湖南', value: 200 },
// { name: '河北', value: 30 },
// ];
let value: any = []
this.service.request(this.service.$api_getTransactionDistribution).subscribe((res: any) => {
if(res) {
@ -108,6 +101,10 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
});
console.log(value);
this.userData = value
if (!(this.userData instanceof Array) || this.userData.length === 0) {
return;
}
this.userDv = this.ds.createView().source(this.userData).transform({
geoDataView: this.worldMap,
field: 'name',

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

@ -23,13 +23,13 @@ export class DatatableOrderReportingComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
tabType!: string;
tabs: any[] = [
{ name: '待上传', value: '1' },
{ name: '上传中', value: '2' },
{ name: '已上传', value: '3' },
{ name: '异常', value: '4' },
{ name: '待上传', value: '0' },
{ name: '上传中', value: '3' },
{ name: '已上传', value: '1' },
{ name: '异常', value: '2' },
{ name: '全部', value: '' }
];
selectedIndex = '1';
selectedIndex = '0';
isLoading: boolean = false;
selectedRows: any[] = [];
constructor(
@ -53,7 +53,7 @@ export class DatatableOrderReportingComponent implements OnInit {
*/
get reqParams() {
const params = Object.assign({}, this.sf?.value || {}, {
putStatus: this.selectedIndex,
billPutStatus: this.selectedIndex,
});
delete params._$expand;
return { ...params };
@ -169,7 +169,7 @@ export class DatatableOrderReportingComponent implements OnInit {
title: '本地校验',
type: 'string',
enum: [
{ label: '校验中', value: 0 },
{ label: '检测中', value: 0 },
{ label: '通过', value: 1 },
{ label: '不通过', value: 2 }
],
@ -583,7 +583,7 @@ export class DatatableOrderReportingComponent implements OnInit {
filterCheckStatus(status: number) {
switch (status) {
case 0:
return '校验中';
return '检测中';
case 1:
return '通过';
case 2:
@ -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

@ -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

@ -19,12 +19,11 @@ import { map } from 'rxjs/operators';
export class InsuranceManagementService extends ShipperBaseService {
// 获取货主企业列表
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
// 查询保险费信息表
// 查询保险费信息表
public $api_premiumInfo_list = '/api/sdc/premiumInfo/list/page';
// 统计保险单状态数量
// 统计保险单状态数量
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

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-06 20:20:26
* @LastEditors : Shiming
* @LastEditTime : 2022-04-08 14:06:21
* @LastEditTime : 2022-04-13 19:02:35
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -15,26 +15,18 @@
</button>
</ng-template>
<ng-template #headerContent>
<div nz-row>
<div nz-row>
<button nz-button nzType="primary" nzSize="small" nzDanger>{{ i?.billStatusLabel }}</button>
<h4 class="ml-md" style="font-size: 18px">订单号: {{ i?.billCode }}</h4>
</div>
<div nz-row style="display: flex; justify-content: end" class="mb-xs">
<div nz-col >
<button
(click)="cancellation()"
nz-button
<div nz-col>
<button (click)="cancellation()" nz-button
*ngIf="i?.billStatus !== '1' && i?.billStatus !== '5' && i?.billStatus !== '6' && i?.overallPaymentStatus != '2'"
acl [acl-ability]="['ORDER-BULK-DETAIL-cancelAnOrder']"
>取消订单</button
>
<button
nz-button
*ngIf="i?.billStatus == '4' || i?.billStatus == '5' || i?.billStatus == '2' || i?.billStatus == '3'"
acl [acl-ability]="['ORDER-BULK-DETAIL-modifyOrder']"
(click)="changeOrder()"
>修改订单</button
>
acl [acl-ability]="['ORDER-BULK-DETAIL-cancelAnOrder']">取消订单</button>
<button nz-button
*ngIf="i?.billStatus == '4' || i?.billStatus == '5' || i?.billStatus == '2' || i?.billStatus == '3'" acl
[acl-ability]="['ORDER-BULK-DETAIL-modifyOrder']" (click)="changeOrder()">修改订单</button>
</div>
</div>
<div>
@ -43,8 +35,9 @@
<sv label="货主">{{ i?.goodsResource?.shipperAppUserName }} </sv>
<sv label="所属项目">{{ i?.goodsResource?.enterpriseProjectName }}</sv>
<sv label="服务类型">{{ i?.goodsResource?.serviceTypeLabel }}</sv>
<sv label="录单员">{{ i?.createUserName }} {{ i?.createUserPhone ? "/" + i?.createUserPhone : ''}} </sv>
<sv label="调度员">{{ i?.goodsResource?.dispatchName }}{{ i?.goodsResource?.dispatchPhone ? "/" + i?.goodsResource?.dispatchPhone : ''}} </sv>
<sv label="录单员">{{ i?.createUserName }} {{ i?.createUserPhone ? "/" + i?.createUserPhone : ''}} </sv>
<sv label="调度员">{{ i?.goodsResource?.dispatchName }}{{ i?.goodsResource?.dispatchPhone ? "/" +
i?.goodsResource?.dispatchPhone : ''}} </sv>
<sv label="货源编号">{{ i?.goodsResource?.resourceCode }} </sv>
<sv label="运单号">{{ i?.wayBill?.wayBillCode }}</sv>
<sv label="承诺付款天数">{{ i?.goodsResource?.paymentDays }}</sv>
@ -64,12 +57,8 @@
<div style="width: 60%; margin: 0 auto">
 
<nz-steps [nzCurrent]="i?.scheduleVOList?.length + 1" nzLabelPlacement="vertical">
<nz-step
*ngFor="let item of i?.scheduleVOList"
[nzTitle]="item.state"
[nzSubtitle]="item.stateTime"
[nzStatus]="item.displayStatus === 'SHOW' ? 'finish' : 'wait'"
></nz-step>
<nz-step *ngFor="let item of i?.scheduleVOList" [nzTitle]="item.state" [nzSubtitle]="item.stateTime"
[nzStatus]="item.displayStatus === 'SHOW' ? 'finish' : 'wait'"></nz-step>
</nz-steps>
</div>
</div>
@ -82,9 +71,11 @@
</sv>
</sv-container>
<sv-container col="2">
<sv label="货物数量"> {{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 </sv>
<sv label="货物数量">
{{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 </sv>
<sv label="用车需求">{{ i?.carModel }}{{ i?.carLength ? "/" + i?.carLength : ''}} </sv>
<sv label="承运司机"> {{ i?.driverName }}{{i?.driverPhone ? "/" + i?.driverPhone : ''}}{{ i?.carNo ? "/" + i?.carNo : ''}} </sv>
<sv label="承运司机"> {{ i?.driverName }}{{i?.driverPhone ? "/" + i?.driverPhone : ''}}{{ i?.carNo ? "/" + i?.carNo :
''}} </sv>
<sv label="车型车长载重"> {{ i?.driverCarModelLabel }},{{ i?.driverCarLengthLabel }}米,{{ i?.driverCarWeight }}吨 </sv>
<!-- <sv label="计划装货时间">
{{ i?.loadPlanTime }}
@ -93,14 +84,14 @@
{{ i?.unloadPlanTime }}
</sv> -->
<sv label="接单数量"> {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方 </sv>
<sv *ngIf="i?.billStatus =='3' || i?.billStatus =='4' || i?.billStatus =='5'" label="装货数量"> {{ i?.loadWeight }}吨,{{ i?.loadVolume }}方</sv>
<sv *ngIf="i?.billStatus =='4' || i?.billStatus =='5'" label="卸货数量"> {{ i?.settlementWeight }}吨,{{ i?.settlementVolume }}方</sv>
<sv *ngIf="i?.billStatus =='3' || i?.billStatus =='4' || i?.billStatus =='5'" label="装货数量"> {{ i?.loadWeight }}吨,{{
i?.loadVolume }}方</sv>
<sv *ngIf="i?.billStatus =='4' || i?.billStatus =='5'" label="卸货数量"> {{ i?.settlementWeight }}吨,{{
i?.settlementVolume }}方</sv>
</sv-container>
<div class="mt-md">
<h4 class="text-md"
>装货卸货信息
<span class="ml-sm text-sm"
>(
<h4 class="text-md">装货卸货信息
<span class="ml-sm text-sm">(
<label>{{ i?.loadingCount || '一' }}装</label>
<label>{{ i?.unloadingCount || '一' }}卸</label>
</span>
@ -114,7 +105,7 @@
<div class="handling-info-icon loading-bg"></div>
<div class="info">
<h4>装货地:{{ item?.province }}{{ item.city }}{{ item.area }}{{ item.detailedAddress }}</h4>
<p>联系人:{{ item.appUserName }}{{ item.contractTelephone ? "/" + item.contractTelephone : '' }}</p>
<p>联系人:{{ item.appUserName }}{{ item.contractTelephone ? "/" + item.contractTelephone : '' }}</p>
</div>
</div>
</div>
@ -127,7 +118,7 @@
<div class="handling-info-icon unloaing-bg"></div>
<div class="info">
<h4>卸货地:{{ item?.province }}{{ item.city }}{{ item.area }}{{ item.detailedAddress }}</h4>
<p>联系人:{{ item.appUserName }}{{ item.contractTelephone ? "/" + item.contractTelephone : ''}}</p>
<p>联系人:{{ item.appUserName }}{{ item.contractTelephone ? "/" + item.contractTelephone : ''}}</p>
</div>
</div>
</div>
@ -137,11 +128,12 @@
</div>
</nz-card>
<nz-card nzTitle="运费信息" #distannce3>
<h2>{{i?.freightPrice}}{{i?.freightTypeLabel}}{{ i?.settlementBasisLabel ? i?.settlementBasisLabel + '' :' ' }}{{i?.ruleLabel}}</h2>
<h2>{{i?.freightPrice}}{{i?.freightTypeLabel}}{{ i?.settlementBasisLabel ? i?.settlementBasisLabel + '' :' '
}}{{i?.ruleLabel}}</h2>
<st #st [data]="billExpenses" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
<ng-template st-row="PriceType" let-item let-index="index"> 到付 </ng-template>
<ng-template st-row="prices" let-item let-index="index">
{{ item.price + item.surcharge | currency }}
{{ item.price + item.surcharge | currency }}
</ng-template>
<ng-template st-row="price" let-item let-index="index">
{{ item.price | currency }}
@ -152,26 +144,30 @@
</st>
<div>
<div>
总计:<span style="color: #da001b; font-size: 18px">{{ i?.totalAmount | currency }}</span> (运费{{ i?.totalFreight | currency }}
总计:<span style="color: #da001b; font-size: 18px">{{ i?.totalAmount | currency }}</span> (运费{{ i?.totalFreight |
currency }}
附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}%
</div>
</div>
<div *ngIf ="i?.payeePhone && i?.payeePhone !== i?.driverPhone">车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" + i?.payeePhone : ''}}</div>
<div *ngIf="i?.payeePhone && i?.payeePhone !== i?.driverPhone">车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" +
i?.payeePhone : ''}}</div>
</nz-card>
<nz-card nzTitle="附件信息" #distannce4>
<sv-container>
<sv label="协议附件">
<a *ngIf = "i?.contractContent?.contractContent" (click)="agreement('1')">查看附件</a> &nbsp;&nbsp;&nbsp;&nbsp;
<a *ngIf = "i?.supplementContent?.contractContent" (click)="agreement('2')">补充协议</a>
<a *ngIf="i?.contractContent?.contractContent" (click)="agreement('1')">查看附件</a> &nbsp;&nbsp;&nbsp;&nbsp;
<a *ngIf="i?.supplementContent?.contractContent" (click)="agreement('2')">补充协议</a>
</sv>
</sv-container>
<sv-container col="2" class="mt-md">
<sv label="装货凭证">
<app-imagelist *ngIf="i?.loadingLadingBillFilePath || i?.loadingPeopleVehiclesGoodsFilePath" [imgList]="[i?.loadingLadingBillFilePath, i?.loadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
<app-imagelist *ngIf="i?.loadingLadingBillFilePath || i?.loadingPeopleVehiclesGoodsFilePath"
[imgList]="[i?.loadingLadingBillFilePath, i?.loadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
</sv>
<sv label="卸货凭证">
<app-imagelist *ngIf="i?.unloadingLadingBillFilePath || i?.unloadingPeopleVehiclesGoodsFilePath " [imgList]="[i?.unloadingLadingBillFilePath, i?.unloadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
<app-imagelist *ngIf="i?.unloadingLadingBillFilePath || i?.unloadingPeopleVehiclesGoodsFilePath "
[imgList]="[i?.unloadingLadingBillFilePath, i?.unloadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
</sv>
</sv-container>
</nz-card>
@ -183,7 +179,8 @@
<sv label="回单类型" *ngIf="i?.supplementaryInformationVO?.stateReceipt">
{{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }}
</sv>
<sv label="联系人" *ngIf="i?.supplementaryInformationVO?.stateReceipt"> {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} </sv>
<sv label="联系人" *ngIf="i?.supplementaryInformationVO?.stateReceipt"> {{
i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} </sv>
<sv label="所在地区" *ngIf="i?.supplementaryInformationVO?.stateReceipt">
{{ i?.supplementaryInformationVO?.area }}
</sv>
@ -206,11 +203,13 @@
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
<div nz-row>
<div nz-col [nzSpan]="12">
<st [scroll]="{y: '500px'}" style="min-height: 600px;" #st [data]="addressItems" [columns]="logColumns2" [ps]="0" [page]="{ show: false, showSize: false }">
<st [scroll]="{y: '500px'}" style="min-height: 600px;" #st [data]="addressItems" [columns]="logColumns2"
[ps]="0" [page]="{ show: false, showSize: false }">
</st>
</div>
<div nz-col [nzSpan]="12">
<amap-path-simplifier [mapWidth]="'100%'" [pois]="pois" [mapHeight]="'600px'" [mapList]="mapList"></amap-path-simplifier>
<amap-path-simplifier [mapWidth]="'100%'" [pois]="pois" [mapHeight]="'600px'" [mapList]="mapList">
</amap-path-simplifier>
</div>
</div>
</nz-card>
@ -222,9 +221,10 @@
</ng-template>
</div>
</nz-card>
<nz-card *ngIf="!route?.snapshot?.queryParams?.sts && abnormalList.length > 0">
<nz-tabset >
<nz-card>
<nz-tabset>
<nz-tab nzTitle="风险异常检测">
<div *ngIf="abnormalList.length > 0">
<div>
您的订单可能存在交易风险,请及时提交申诉材料,提交成功后,平台将及时完成审核并通知您!
</div>
@ -232,21 +232,28 @@
<ul *ngFor="let item of abnormalList">
<li>系统识别:{{item?.complianceTypeName}}</li>
<li>{{item?.determineDetails}},您可在企业端提交申诉材料或联系客服。</li>
<li>2021-11-07 03:20:15</li>
</ul>
</div>
</nz-tab>
<nz-tab nzTitle="异常预警">
<st #st [data]="addressItems" [columns]="logColumns2" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
<st #st [data]="service.$api_get_order_abnormalWarning" [columns]="logColumns3"
[res]="{ reName: { list: 'data' } }" [req]="{params:{id:route.snapshot.params.id}}"
[page]="{ show: false, showSize: false }"> </st>
</nz-tab>
<nz-tab nzTitle="操作日志">
<st #st [data]="addressItems" [columns]="logColumns2" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
<st #logSt [data]="service.$api_get_log_list" [columns]="operateLogColums"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: logParams ,lazyLoad:true}"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }">
<ng-template st-row="operator" let-item>
{{item?.operator}}/{{item.telephone}}
</ng-template>
</st>
</nz-tab>
</nz-tabset>
</nz-card>
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" nzWidth="1000px" (nzOnCancel)="handleCancel()">
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()"
nzWidth="1000px" (nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<div *ngIf="!modalcontent">暂无附件信息</div>
<div [innerHTML]="modalcontent"></div>

View File

@ -4,14 +4,14 @@
* @Author : Shiming
* @Date : 2021-12-06 20:20:26
* @LastEditors : Shiming
* @LastEditTime : 2022-04-11 22:31:18
* @LastEditTime : 2022-04-13 19:00:19
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Router } from '@angular/router';
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { STColumn } from '@delon/abc/st';
import { STColumn, STComponent } from '@delon/abc/st';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
@ -25,7 +25,8 @@ import format from 'date-fns/format';
styleUrls: ['./bulk-detail.component.less']
})
export class OrderManagementBulkeDetailComponent implements OnInit {
MapList: any[]=[];
MapList: any[] = [];
@ViewChild('logSt') logSt!: STComponent;
id = this.route.snapshot.params.id;
billExpenses: any[] = []; //运费信息表格信息
pois: any[] = [];
@ -35,11 +36,20 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
totalObj: any;
attObj: any;
modalcontent: any;
modalTitle:string = '';
modalTitle: string = '';
isVisible = false;
logColumns2: STColumn[] = [
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' },
{ title: '时间', index: 'parkBte' },
{ title: '地点', index: 'parkAdr' }
];
logColumns3: STColumn[] = [
{ title: '时间', index: 'warningTime' },
{ title: '异常预警类型', index: 'warningTypeLabel' }
];
operateLogColums: STColumn[] = [
{ title: '内容', index: 'operationContent' },
{ title: '操作人', render: 'operator' },
{ title: '操作时间', index: 'operatorTimestamp' },
];
logColumns: STColumn[] = [
{ title: '款项', index: 'expenseCodeLabel' },
@ -61,21 +71,23 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
}
}
];
get logParams() {
return { operateObject: this.i?.billCode, operateTypeList: ['3','8'] }
}
trajectory = 'car';
mapList:any[] = []; //地图点位数据组
addressItems:any[] = []; //打点地址数据组
mapList: any[] = []; //地图点位数据组
addressItems: any[] = []; //打点地址数据组
warringList: any[] = []; //打点地址数据组
constructor(
public route: ActivatedRoute,
private msgSrv: NzMessageService,
private service: OrderManagementService,
public service: OrderManagementService,
private router: Router,
private modal: NzModalService
) {
}
) {}
ngOnInit(): void {
console.log(this.route?.snapshot?.queryParams?.sts);
this.initData();
this.getTrajectory();
}
@ -85,36 +97,45 @@ 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);
this.warringList = res
}
});
setTimeout(() => {
this.logSt.load(1);
});
}
goBack() {
@ -125,11 +146,12 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
this.router.navigate(['order-management/bulk-detailChange', this.id]);
}
agreement(value: any) {
if(value ==='1'){
if (value === '1') {
this.modalTitle = '附件信息';
// this.modalcontent = this.i?.contractContent?.contractContent;
this.service.reviewPDF(this.i?.contractContent?.contractFilePath)
}else if(value === '2'){
// 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;
this.isVisible = true;
@ -163,43 +185,45 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
}
// 获取车辆轨迹
getTrajectory(){
getTrajectory() {
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
if (res) {
const points = res.trackArray;
let list :any[] = [];
let list: 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;
if(this.addressItems && this.addressItems.length > 0){
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);
});
}
}
});
}
// 获取司机轨迹
getDriverTrajectory(){
// 获取司机轨迹
getDriverTrajectory() {
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
if (res) {
const points = res.tracks;
let list :any[] = [];
let list: 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.enclosureDataAppTrack];
if(this.addressItems && this.addressItems.length > 0){
if (this.addressItems && this.addressItems.length > 0) {
this.addressItems.forEach(item => {
item.vinOutTime = this.getLocalTime(item.gtm);
item.cityName = item.appAdress;
@ -207,14 +231,14 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
}
}
});
}
trajectoryChange(event:any){
if(event ==='car'){
this.getTrajectory()
}else if(event ==='driver'){
}
trajectoryChange(event: any) {
if (event === 'car') {
this.getTrajectory();
} else if (event === 'driver') {
this.getDriverTrajectory();
}
}
}
getLocalTime(time: any) {
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
}

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-04 17:29:18
* @LastEditors : Shiming
* @LastEditTime : 2022-03-29 16:26:09
* @LastEditTime : 2022-04-13 10:50:02
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\complaint-detail\\complaint-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -24,8 +24,12 @@
<h2>投诉单号:{{datailList?.complaintCode}}</h2>
<sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'" *ngIf="schema" [formData]="datailList">
<ng-template sf-template="imgUrls" let-schema="schema" let-item let-ui="ui">
<app-imagelist [imgList]="datailList?.imgUrls"></app-imagelist>
<!-- <app-imagelist [imgList]="datailList?.imgUrls"></app-imagelist> -->
<img nz-image width="100px" height="100%" *ngFor="let item of datailList?.imgUrls" [nzSrc]="item"
style="margin:0 10px 0 0" alt="" />
</ng-template>
</sf>
</nz-card>

View File

@ -88,7 +88,7 @@ export class OrderManagementRiskComponent implements OnInit {
this.loading = false
return data.map(item => ({
...item,
disabled: item.auditStatus !== '1'
disabled: item.representationsStatus !== '2'
}));
};
search() {
@ -202,15 +202,28 @@ export class OrderManagementRiskComponent implements OnInit {
} as SFSelectWidgetSchema
},
shipperId: {
title: '托运人',
type: 'string',
title: '托运人',
ui: {
widget: 'dict-select',
params: { dictKey: 'BulkFreightUnitPriceType' },
containsAllLabel: true,
widget: 'select',
serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
}
},
onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
}
},
} as SFSelectWidgetSchema
},
enterpriseInfoId: {

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

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-28 14:42:03
* @LastEditors : Shiming
* @LastEditTime : 2022-04-08 14:06:27
* @LastEditTime : 2022-04-13 19:04:48
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -21,22 +21,12 @@
</div>
<div nz-row style="display: flex; justify-content: end" class="mb-xs">
<div nz-col>
<button
(click)="cancellation()"
nz-button
<button (click)="cancellation()" nz-button
*ngIf="i.billStatus == '4' || i.billStatus == '5' || i.billStatus == '2' || i.billStatus == '3' || i.billStatus == '1'"
acl
[acl-ability]="['ORDER-VEHICLE-DETAIL-cancelAnOrder']"
>取消订单</button
>
<button
nz-button
(click)="changeOrder()"
*ngIf="i.billStatus == '4' || i.billStatus == '5' || i.billStatus == '2' || i.billStatus == '3'"
acl
[acl-ability]="['ORDER-VEHICLE-DETAIL-modifyOrder']"
>修改订单</button
>
acl [acl-ability]="['ORDER-VEHICLE-DETAIL-cancelAnOrder']">取消订单</button>
<button nz-button (click)="changeOrder()"
*ngIf="i.billStatus == '4' || i.billStatus == '5' || i.billStatus == '2' || i.billStatus == '3'" acl
[acl-ability]="['ORDER-VEHICLE-DETAIL-modifyOrder']">修改订单</button>
</div>
</div>
<div>
@ -46,8 +36,8 @@
<sv label="所属项目">{{ i?.goodsResource?.enterpriseProjectName }}</sv>
<sv label="服务类型">{{ i?.goodsResource?.serviceTypeLabel }}</sv>
<sv label="录单员">{{ i?.createUserName }} {{ i?.createUserPhone ? '/' + i?.createUserPhone : '' }} </sv>
<sv label="调度员"
>{{ i?.goodsResource?.dispatchName }}{{ i?.goodsResource?.dispatchPhone ? '/' + i?.goodsResource?.dispatchPhone : '' }}
<sv label="调度员">{{ i?.goodsResource?.dispatchName }}{{ i?.goodsResource?.dispatchPhone ? '/' +
i?.goodsResource?.dispatchPhone : '' }}
</sv>
<sv label="外部订单号">{{ i?.externalBillCode }}</sv>
<sv label="货源编号">{{ i?.goodsResource?.resourceCode }} </sv>
@ -70,13 +60,9 @@
<div style="width: 60%; margin: 0 auto">
 
<nz-steps [nzCurrent]="i?.scheduleVOList?.length + 1" nzLabelPlacement="vertical">
<nz-step
*ngFor="let item of i?.scheduleVOList"
[nzTitle]="item.state"
[nzSubtitle]="item.stateTime"
<nz-step *ngFor="let item of i?.scheduleVOList" [nzTitle]="item.state" [nzSubtitle]="item.stateTime"
[nzDescription]="item.cancelReason ? '取消原因' + item.cancelReason : ''"
[nzStatus]="item.displayStatus === 'SHOW' ? 'finish' : 'wait'"
></nz-step>
[nzStatus]="item.displayStatus === 'SHOW' ? 'finish' : 'wait'"></nz-step>
</nz-steps>
</div>
</div>
@ -93,16 +79,16 @@
</sv>
</sv-container>
<sv-container col="2">
<sv label="货物数量"> {{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 </sv>
<sv label="货物数量">
{{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 </sv>
<sv label="用车需求">{{ i?.carModel }}{{ i?.carLength ? '/' + i?.carLength : '' }}</sv>
<sv label="承运司机"> {{ i?.driverName }}{{ i?.driverPhone ? '/' + i?.driverPhone : '' }}{{ i?.carNo ? '/' + i?.carNo : '' }} </sv>
<sv label="承运司机"> {{ i?.driverName }}{{ i?.driverPhone ? '/' + i?.driverPhone : '' }}{{ i?.carNo ? '/' + i?.carNo :
'' }} </sv>
<sv label="车型车长载重"> {{ i?.driverCarModelLabel }},{{ i?.driverCarLengthLabel }}米,{{ i?.driverCarWeight }}吨 </sv>
</sv-container>
<div class="mt-md">
<h4 class="text-md"
>装货卸货信息
<span class="ml-sm text-sm"
>(
<h4 class="text-md">装货卸货信息
<span class="ml-sm text-sm">(
<label>{{ i?.loadingCount }}装</label>
<label>{{ i?.unloadingCount }}卸</label>
)
@ -167,10 +153,12 @@
</ng-template>
</st>
<div>
总计:<span style="color: #da001b; font-size: 18px">{{ i?.totalAmount | currency }}</span> (运费{{ i?.totalFreight | currency }}
总计:<span style="color: #da001b; font-size: 18px">{{ i?.totalAmount | currency }}</span> (运费{{ i?.totalFreight |
currency }}
附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2) }}%
</div>
<div *ngIf ="i?.payeePhone && i?.payeePhone !== i?.driverPhone">车队长:{{ i?.payeeName }}{{ i?.payeePhone ? '/' + i?.payeePhone : '' }}</div>
<div *ngIf="i?.payeePhone && i?.payeePhone !== i?.driverPhone">车队长:{{ i?.payeeName }}{{ i?.payeePhone ? '/' +
i?.payeePhone : '' }}</div>
</nz-card>
<nz-card nzTitle="附件信息" #distannce4>
@ -185,7 +173,8 @@
<app-imagelist [imgList]="[i?.loadingLadingBillFilePath, i?.loadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
</sv>
<sv label="卸货凭证">
<app-imagelist [imgList]="[i?.unloadingLadingBillFilePath, i?.unloadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
<app-imagelist [imgList]="[i?.unloadingLadingBillFilePath, i?.unloadingPeopleVehiclesGoodsFilePath]">
</app-imagelist>
</sv>
</sv-container>
</nz-card>
@ -222,19 +211,13 @@
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
<div nz-row>
<div nz-col [nzSpan]="12">
<st
[scroll]="{ y: '500px' }"
style="min-height: 600px"
#st
[data]="addressItems"
[columns]="logColumns2"
[ps]="0"
[page]="{ show: false, showSize: false }"
>
<st [scroll]="{ y: '500px' }" style="min-height: 600px" #st [data]="addressItems" [columns]="logColumns2"
[ps]="0" [page]="{ show: false, showSize: false }">
</st>
</div>
<div nz-col [nzSpan]="12">
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [mapList]="mapList" [pois]="pois"></amap-path-simplifier>
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [mapList]="mapList" [pois]="pois">
</amap-path-simplifier>
</div>
</div>
</nz-card>
@ -246,33 +229,36 @@
</ng-template>
</div>
</nz-card>
<nz-card *ngIf="!route?.snapshot?.queryParams?.sts && abnormalList.length > 0">
<nz-card >
<nz-tabset>
<nz-tab nzTitle="风险异常检测">
<div *ngIf="abnormalList.length > 0">
<div> 您的订单可能存在交易风险,请及时提交申诉材料,提交成功后,平台将及时完成审核并通知您! </div>
<div>如果您的运单没有问题可以提出申诉并提供相关资料我们将24小时内审核反馈</div>
<ul *ngFor="let item of abnormalList">
<li>系统识别:{{ item?.complianceTypeName }}</li>
<li>{{ item?.determineDetails }},您可在企业端提交申诉材料或联系客服。</li>
<li>2021-11-07 03:20:15</li>
</ul>
</div>
</nz-tab>
<nz-tab nzTitle="异常预警">
<st #st [data]="addressItems" [columns]="logColumns2" [ps]="0" [page]="{ show: false, showSize: false }"> </st>
<st #st [data]="service.$api_get_order_abnormalWarning" [columns]="logColumns3"
[res]="{ reName: { list: 'data' } }" [req]="{params:{id:route.snapshot.params.id}}"
[page]="{ show: false, showSize: false }"> </st>
</nz-tab>
<nz-tab nzTitle="操作日志">
<st #st [data]="addressItems" [columns]="logColumns2" [ps]="0" [page]="{ show: false, showSize: false }"> </st>
<st #logSt [data]="service.$api_get_log_list" [columns]="operateLogColums"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: logParams ,lazyLoad:true}"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }">
<ng-template st-row="operator" let-item>
{{item?.operator}}/{{item.telephone}}
</ng-template>
</st>
</nz-tab>
</nz-tabset>
</nz-card>
<nz-modal
[(nzVisible)]="isVisible"
nzWidth="1000px"
[nzFooter]="nzModalFooter"
[nzTitle]="modalTitle"
(nzOnOk)="handleOK()"
(nzOnCancel)="handleCancel()"
>
<nz-modal [(nzVisible)]="isVisible" nzWidth="1000px" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle"
(nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<div *ngIf="!modalcontent">暂无附件信息</div>
<div [innerHTML]="modalcontent"></div>

View File

@ -4,13 +4,13 @@
* @Author : Shiming
* @Date : 2021-12-28 14:42:03
* @LastEditors : Shiming
* @LastEditTime : 2022-04-06 15:12:10
* @LastEditTime : 2022-04-13 19:06:44
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn } from '@delon/abc/st';
import { STColumn, STComponent } from '@delon/abc/st';
import { NzCardComponent } from 'ng-zorro-antd/card';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
@ -23,12 +23,14 @@ import { OrderManagementService } from '../../services/order-management.service'
})
export class OrderManagementVehicleDetailComponent implements OnInit {
id = this.route.snapshot.params.id;
@ViewChild('logSt') logSt!: STComponent;
modalcontent: any;
modalTitle:string = '';
modalTitle: string = '';
trajectory = 'car';
mapList: any[] = []; //地图点位数据组
pois: any[] = [];
addressItems: any[] = []; //打点地址数据组
warringList: any[] = []; //打点地址数据组
abnormalList: any[] = [];
i: any = {
unLoadingPlaceList: [],
@ -43,8 +45,17 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
approvalLsit: any;
isVisible = false;
logColumns2: STColumn[] = [
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' }
{ title: '时间', index: 'parkBte' },
{ title: '地点', index: 'parkAdr' }
];
logColumns3: STColumn[] = [
{ title: '时间', index: 'warningTime' },
{ title: '异常预警类型', index: 'warningTypeLabel' }
];
operateLogColums: STColumn[] = [
{ title: '内容', index: 'operationContent' },
{ title: '操作人', render: 'operator' },
{ title: '操作时间', index: 'operatorTimestamp' },
];
logColumns: STColumn[] = [
{ title: '款项', index: 'expenseCodeLabel' },
@ -55,13 +66,14 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
{
title: '支付状态',
className: 'text-center',
index: 'paymentStatusLabel',
index: 'paymentStatusLabel'
}
];
constructor(
public route: ActivatedRoute,
private msgSrv: NzMessageService,
private service: OrderManagementService,
public service: OrderManagementService,
private router: Router,
private modal: NzModalService
) {}
@ -70,23 +82,29 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
this.initData();
this.getTrajectory();
}
get logParams() {
return { operateObject: this.i?.billCode, operateTypeList: ['3','8'] }
}
initData() {
this.service.request(this.service.$api_get_getWholeBillDetail, { id: this.id }).subscribe(res => {
if (res) {
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,17 +115,21 @@ 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);
this.warringList = res
}
});
setTimeout(() => {
this.logSt.load(1);
});
}
// 取消订单
cancellation() {
@ -132,15 +154,15 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
this.router.navigate(['order-management/vehicle-detailChange', this.id]);
}
agreement(value: any) {
if(value ==='1'){
this.modalTitle = '附件信息';
this.modalcontent = this.i?.contractContent?.contractContent;
}else if(value === '2'){
if (value === '1') {
// 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;
}
this.isVisible = true;
}
handleCancel() {
this.isVisible = false;
@ -163,16 +185,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 +210,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 +233,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

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-03 15:31:52
* @LastEditors : Shiming
* @LastEditTime : 2022-04-11 22:29:34
* @LastEditTime : 2022-04-13 18:52:24
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -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`;
// 修改-大宗订单
@ -188,7 +188,7 @@ export class OrderManagementService extends ShipperBaseService {
// 查询异常预警表
$api_get_abnormalWarning = `/api/sdc/abnormalWarning/list/page`;
$api_get_order_abnormalWarning = `/api/sdc/abnormalWarning/getAbnormalWarningByBillId`;
// 异步导出运营后台大宗订单列表
$api_get_asyncExportBulkList = `/api/sdc/billOperate/asyncExportBulkList`;
@ -197,13 +197,15 @@ export class OrderManagementService extends ShipperBaseService {
// 异步导出风险单导出
$api_get_asyncExportRiskBillList = `/api/sdc/billRiskOperate/asyncExportRiskBillList`;
// 异步导出合规抽查导出
$api_get_asyncExportSpotCheckList= `/api/sdc/BillComplianceSpotCheck/asyncExportSpotCheckList`;
$api_get_asyncExportSpotCheckList = `/api/sdc/BillComplianceSpotCheck/asyncExportSpotCheckList`;
// 异步导出单据审核导出
$api_get_asyncExportExamineBillList= `/api/sdc/billExamine/asyncExportExamineBillList`;
$api_get_asyncExportExamineBillList = `/api/sdc/billExamine/asyncExportExamineBillList`;
// 异步导出单据审核导出
$api_abnormalWarning_asyncExport= `/api/sdc/abnormalWarning/asyncExport`;
$api_abnormalWarning_asyncExport = `/api/sdc/abnormalWarning/asyncExport`;
// 异步导出投诉管理导出
$api_asyncExportComplaintListDrv= `/api/sdc/complaint/operate/asyncExportComplaintListDrv`;
$api_asyncExportComplaintListDrv = `/api/sdc/complaint/operate/asyncExportComplaintListDrv`;
//操作日志
public $api_get_log_list = `/api/mdc/pbc/operationLogRecords/getOperationLogRecordsList`;
/**
* 根据企业ID获取企业历史网络货运人
* @returns
@ -248,21 +250,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

@ -124,7 +124,7 @@
<div nz-row>
<div *ngFor="let item of i?.goodsInfoVOList" nz-col nzSpan="24">
<div>
<p class="text-warning-light mb-xs text-right">货后{{ i?.paymentDays }}天内支付运费</p>
<p class="text-warning-light mb-xs text-right">货后{{ i?.paymentDays }}天内支付运费</p>
<p class="mb-xs text-right"> {{ settlementBasis[item?.settlementBasis] }}{{ rule[item?.rule] }}</p>
</div>
<nz-divider class="mb-xs mt-xs"></nz-divider>

View File

@ -11,52 +11,33 @@
</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">
<div nz-col [nzSpan]="10">
<div *ngFor="let data1 of startInfo; let idx = index">
<nz-form-item>
<nz-form-label nzRequired>装货地</nz-form-label>
<nz-form-label nzRequired>装货地</nz-form-label>
<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>
</nz-form-item>
<nz-form-item>
<nz-form-label nzRequired>联系人</nz-form-label>
<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,50 +45,32 @@
</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">
<div *ngFor="let data2 of endInfo; let idx = index">
<nz-form-item>
<nz-form-label nzRequired>卸货地</nz-form-label>
<nz-form-label nzRequired>卸货地</nz-form-label>
<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>
</nz-form-item>
<nz-form-item>
<nz-form-label nzRequired>联系人</nz-form-label>
<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,16 +85,26 @@
<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 style="font-size: 12px;"> 国家法规及行政命令禁限运货物不能托运
<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">
<nz-input-number [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="请输入" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number>
<nz-input-number [nzMax]="99999" [nzMin]="0" nzPlaceHolder="请输入" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number>
</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>
@ -198,15 +155,10 @@
<sf #sf7 [schema]="schema7" [formData]="sf7data" [button]="'none'" [ui]="ui7">
<ng-template sf-template="paymentDays" let-i let-ui="ui">
<div nz-row>
<div class="align-center" >
<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% - 45px);
.ant-alert {
padding: 0 0 0 2px;
}
}
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 }
}
};
}
@ -583,7 +600,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
}
subStartInfo(event: any, index: number, id?: any) {
if (id) {
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {});
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { });
}
this.startInfo.splice(index, 1);
this.validateForm1.removeControl(`loadAddress${index}`);
@ -611,7 +628,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
}
subEndInfo(event: any, index: number, id?: any) {
if (id) {
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {});
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { });
}
this.endInfo.splice(index, 1);
this.validateForm1.removeControl(`unloadAddress${index}`);
@ -838,43 +855,43 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
nzContent: AmapPoiPickerComponent,
nzWidth: 900,
nzOnOk: item => {
if(item?.poi) {
const poi = item.poi;
const locList = poi.location.toString().split(',');
switch (type) {
case 'start':
this.startInfo[index].detailedAddress = poi.district + poi.name;
this.startInfo[index].longitude = locList[0];
this.startInfo[index].latitude = locList[1];
this.startInfo[index].province = poi.cityInfo.province;
this.startInfo[index].city = poi.cityInfo.city;
this.startInfo[index].area = poi.cityInfo.district;
this.startInfo[index].address = poi.name;
break;
case 'end':
this.endInfo[index].detailedAddress = poi.district + poi.name;
this.endInfo[index].longitude = locList[0];
this.endInfo[index].latitude = locList[1];
this.endInfo[index].province = poi.cityInfo.province;
this.endInfo[index].city = poi.cityInfo.city;
this.endInfo[index].area = poi.cityInfo.district;
this.endInfo[index].address = poi.name;
break;
default:
break;
}
if (item?.poi) {
const poi = item.poi;
const locList = poi.location.toString().split(',');
switch (type) {
case 'start':
this.startInfo[index].detailedAddress = poi.district + poi.name;
this.startInfo[index].longitude = locList[0];
this.startInfo[index].latitude = locList[1];
this.startInfo[index].province = poi.cityInfo.province;
this.startInfo[index].city = poi.cityInfo.city;
this.startInfo[index].area = poi.cityInfo.district;
this.startInfo[index].address = poi.name;
break;
case 'end':
this.endInfo[index].detailedAddress = poi.district + poi.name;
this.endInfo[index].longitude = locList[0];
this.endInfo[index].latitude = locList[1];
this.endInfo[index].province = poi.cityInfo.province;
this.endInfo[index].city = poi.cityInfo.city;
this.endInfo[index].area = poi.cityInfo.district;
this.endInfo[index].address = poi.name;
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;
});
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;
});
}
return true
} else {
this.service.msgSrv.warning('请重新手动选择地址!')
return false
}
return true
} else {
this.service.msgSrv.warning('请重新手动选择地址!')
return false
}
}
});
}
@ -1127,4 +1144,20 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
};
});
}
checkGoodsName() {
const name = this.sf3.getValue('/goodsName1');
if (!name || name.trim().length === 0) {
return;
}
this.service.request(this.service.$api_checkGoodsName, name).subscribe(res => {
if (res === false) {
const modalRef = this.modalService.error({
nzTitle: '货物名称含有违禁词,请重新输入!',
});
modalRef.afterClose.subscribe(result => {
// this.sf3.setValue('/goodsName1', null);
});
}
});
}
}

View File

@ -11,60 +11,37 @@
</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">
<div nz-col [nzSpan]="10">
<div *ngFor="let data1 of startInfo; let idx = index">
<nz-form-item>
<nz-form-label nzRequired>装货地</nz-form-label>
<nz-form-label nzRequired>装货地</nz-form-label>
<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>
<nz-form-item>
<nz-form-label nzRequired>联系人</nz-form-label>
<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,59 +58,38 @@
</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">
<div *ngFor="let data2 of endInfo; let idx = index">
<nz-form-item>
<nz-form-label nzRequired>卸货地</nz-form-label>
<nz-form-label nzRequired>卸货地</nz-form-label>
<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>
<nz-form-item>
<nz-form-label nzRequired>联系人</nz-form-label>
<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>
@ -152,24 +108,20 @@
<div nz-row [nzGutter]="24" style="margin-top: 24px">
<div nz-col nzXs="2" nzSm="4" nzMd="8" nzLg="8" nzXl="10">
<nz-form-item>
<nz-form-label nzRequired>装货时间</nz-form-label>
<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>
<div nz-col nzXs="20" nzSm="16" nzMd="12" nzLg="8" nzXl="4"></div>
<div nz-col nzXs="2" nzSm="4" nzMd="8" nzLg="8" nzXl="10">
<nz-form-item>
<nz-form-label nzRequired>卸货时间</nz-form-label>
<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,31 +134,40 @@
<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 style="font-size: 12px;"> 国家法规及行政命令禁限运货物不能托运
<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">
<ng-template sf-template="weight" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<nz-input-number [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="总重量,必填" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number>
<nz-input-number [nzMax]="99999" [nzMin]="0" nzPlaceHolder="总重量,必填" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" 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 [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="体积" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number>
<nz-input-number [nzMax]="99999" [nzMin]="0" nzPlaceHolder="体积" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" 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 [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="件数" type="number" [ngModel]="i.value"
<nz-input-number [nzMax]="99999" [nzMin]="0" nzPlaceHolder="件数" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number>
</nz-input-group>
</ng-template>
<ng-template sf-template="goodsValue" let-i let-ui="ui">
<div class="align-center">
<nz-input-number [ngModel]="i.value" [nzMin] = "0" [nzMax]="2000000" [nzStep]="0.01"
<nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="2000000" [nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()" nzPlaceHolder="请输入0-2000000之间数值">
</nz-input-number>
</div>
@ -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>
@ -276,14 +240,14 @@
<ng-template sf-template="total" let-i let-ui="ui">{{ i.value | currency }}</ng-template>
<ng-template sf-template="paymentDays" let-i let-ui="ui">
<div nz-row class="align-center">
<div nz-col nzSpan="16">
<nz-input-number [ngModel]="i.value" [nzMin]="1" [nzMax]="30" [nzStep]="1"
(ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入1-30" [nzPrecision]="0"
[nzPrecisionMode]="'cut'"></nz-input-number>
</div>
<div nz-col nzSpan="8">
<span>&nbsp;天内支付运费</span>
</div>
<div nz-col nzSpan="16">
<nz-input-number [ngModel]="i.value" [nzMin]="1" [nzMax]="30" [nzStep]="1"
(ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入1-30" [nzPrecision]="0"
[nzPrecisionMode]="'cut'"></nz-input-number>
</div>
<div nz-col nzSpan="8">
<span>&nbsp;天内支付运费</span>
</div>
</div>
</ng-template>
</sf>
@ -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% - 45px);
.ant-alert {
padding: 0 0 0 2px;
}
}
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 }
}
};
}
@ -465,10 +482,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
)
},
change: (tag: any, org: any) => {
if(tag === '3'){
if (tag === '3') {
this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null);
}else {
} else {
this.getInsurersPrice(tag);
}
}
@ -481,7 +498,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
} ,
},
},
type2: {
type: 'string',
@ -494,7 +511,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
insurancePremium: {
type: 'string',
title: '服务包费用',
readOnly:true,
readOnly: true,
ui: {
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
@ -523,7 +540,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
},
},
required: [ 'insurancePremium']
required: ['insurancePremium']
};
this.ui5 = {
'*': {
@ -733,7 +750,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.service
.request(
this.service.$api_getAdditionalRate +
`?shipperId=${this?.sf1?.value?.shipperAppUserId || ''}&enterpriseInfoId=${items}&resourcetype='1'`
`?shipperId=${this?.sf1?.value?.shipperAppUserId || ''}&enterpriseInfoId=${items}&resourcetype='1'`
)
.subscribe(res => {
if (res) {
@ -986,9 +1003,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
];
// 运费信息
const expenseList = [
{ expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '' ,resourceId: this.sf7data?.PREresourceId || '' },
{ expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' ,resourceId: this.sf7data?.RECEresourceId || ''},
{ expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' ,resourceId: this.sf7data?.BACKresourceId || ''}
{ expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '', resourceId: this.sf7data?.PREresourceId || '' },
{ expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '', resourceId: this.sf7data?.RECEresourceId || '' },
{ expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '', resourceId: this.sf7data?.BACKresourceId || '' }
];
// 从“再下一单”过来将所有的子参数内的id都删除
if (this.PageStatus === '整车下一单') {
@ -1017,8 +1034,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
paymentDays: this.sf7.value.paymentDays,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
subtotal :this.sf7.value.subtotal,
total:this.sf7.value.total,
subtotal: this.sf7.value.subtotal,
total: this.sf7.value.total,
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
goodsValue: this.sf4.value.goodsValue
};
@ -1081,7 +1098,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
nzWidth: 900,
nzOnOk: item => {
console.log(item);
if(item?.poi) {
if (item?.poi) {
const poi = item.poi;
const locList = poi.pois;
switch (type) {
@ -1114,10 +1131,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.getInsurersPrice(); // 计算保费金额
});
}
return true
return true
} else {
this.service.msgSrv.warning('请重新手动选择地址!')
return false
return false
}
}
});
@ -1155,7 +1172,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.totalDistance = res?.estimatedKilometers;
this.totalTime = res?.estimatedTravelTime;
this.sf1data = {
resourceCode:res?.resourceCode || '',
resourceCode: res?.resourceCode || '',
enterpriseInfoName: res?.enterpriseInfoName,
enterpriseInfoId: res?.enterpriseInfoId,
dispatchPhone: res?.dispatchPhone,
@ -1423,7 +1440,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
// 计算保价费金额
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
console.log(this.totalDistance);
if (insuranceType !== '3' && this.totalDistance > 0) {
if (insuranceType !== '3' && this.totalDistance > 0) {
const params = {
insuranceType,
goodsValue: this.sf4.value.goodsValue,
@ -1440,14 +1457,31 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
});
}
}
// 运费信息价格变更
priceChange(event:any, i:any){
i.setValue(event);
if(event>=99999){
this.modalService.warning({
nzTitle: '可输入的最大金额为99999元',
// 运费信息价格变更
priceChange(event: any, i: any) {
i.setValue(event);
if (event >= 99999) {
this.modalService.warning({
nzTitle: '可输入的最大金额为99999元',
});
}
this.payChange()
}
checkGoodsName() {
const name = this.sf3.getValue('/goodsName1');
if (!name || name.trim().length === 0) {
return;
}
this.service.request(this.service.$api_checkGoodsName, name).subscribe(res => {
if (res === false) {
const modalRef = this.modalService.error({
nzTitle: '货物名称含有违禁词,请重新输入!',
});
modalRef.afterClose.subscribe(result => {
// this.sf3.setValue('/goodsName1', null);
});
}
this.payChange()
}
});
}
}

View File

@ -7,15 +7,13 @@
</page-header-wrapper>
<nz-card>
<div class="card-title">货源单设置</div>
<sf #sf1 [schema]="schema1" [button]="'none'" [ui]="ui1" [formData]="sf1data">
<ng-template sf-template="enterpriseInfoName" let-i let-ui="ui"> {{ i.value }} </ng-template>
</sf>
<sf #sf1 [schema]="schema1" [button]="'none'" [ui]="ui1" [formData]="sf1data">
<ng-template sf-template="enterpriseInfoName" let-i let-ui="ui"> {{ i.value }} </ng-template>
</sf>
</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">
@ -26,47 +24,26 @@
<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>
<nz-form-item>
<nz-form-label nzRequired>联系人</nz-form-label>
<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>
@ -83,59 +60,38 @@
</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">
<div *ngFor="let data2 of endInfo; let idx = index">
<nz-form-item>
<nz-form-label nzRequired>卸货地</nz-form-label>
<nz-form-label nzRequired>卸货地</nz-form-label>
<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>
<nz-form-item>
<nz-form-label nzRequired>联系人</nz-form-label>
<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>
@ -156,22 +112,18 @@
<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>
<div nz-col [nzSpan]="4"></div>
<div nz-col [nzSpan]="10">
<nz-form-item>
<nz-form-label nzRequired>卸货时间</nz-form-label>
<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>
@ -184,31 +136,40 @@
<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 class="sf3" [schema]="schema3" [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 style="font-size: 12px;"> 国家法规及行政命令禁限运货物不能托运
<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">
<ng-template sf-template="weight" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<nz-input-number [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="总重量,必填" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number>
<nz-input-number [nzMax]="99999" [nzMin]="0" nzPlaceHolder="总重量,必填" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" 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 [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="体积" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number>
<nz-input-number [nzMax]="99999" [nzMin]="0" nzPlaceHolder="体积" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" 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 [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="件数" type="number" [ngModel]="i.value"
<nz-input-number [nzMax]="99999" [nzMin]="0" nzPlaceHolder="件数" type="number" [ngModel]="i.value"
(ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number>
</nz-input-group>
</ng-template>
<ng-template sf-template="goodsValue" let-i let-ui="ui">
<div class="align-center">
<nz-input-number [ngModel]="i.value" [nzMin] = "0" [nzMax]="2000000" [nzStep]="0.01"
<nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="2000000" [nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()" nzPlaceHolder="请输入0-2000000之间数值">
</nz-input-number>
</div>
@ -235,8 +196,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>
@ -257,18 +218,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>
@ -277,14 +241,14 @@
<ng-template sf-template="total" let-i let-ui="ui">{{ i.value | currency }}</ng-template>
<ng-template sf-template="paymentDays" let-i let-ui="ui">
<div nz-row class="align-center">
<div nz-col nzSpan="16">
<nz-input-number [ngModel]="i.value" [nzMin]="1" [nzMax]="30" [nzStep]="1"
(ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入1-30" [nzPrecision]="0"
[nzPrecisionMode]="'cut'"></nz-input-number>
</div>
<div nz-col nzSpan="8">
<span>&nbsp;天内支付运费</span>
</div>
<div nz-col nzSpan="16">
<nz-input-number [ngModel]="i.value" [nzMin]="1" [nzMax]="30" [nzStep]="1"
(ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入1-30" [nzPrecision]="0"
[nzPrecisionMode]="'cut'"></nz-input-number>
</div>
<div nz-col nzSpan="8">
<span>&nbsp;天内支付运费</span>
</div>
</div>
</ng-template>
</sf>
@ -293,7 +257,9 @@
</nz-card>
<nz-card>
<div class="align-center">
<button nz-button nzType="primary" (click)="submitConfirm('assign')" acl [acl-ability]="['SUPPLY-VEHICLE-RELEASE-bulkDesignate']">指派熟车</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')" *ngIf="type === 'add'" acl [acl-ability]="['SUPPLY-VEHICLE-RELEASE-bulkDriverOrder']">司机抢单</button>
<button nz-button nzType="primary" (click)="submitConfirm('assign')" acl
[acl-ability]="['SUPPLY-VEHICLE-RELEASE-bulkDesignate']">指派熟车</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')"
*ngIf="type === 'add'" acl [acl-ability]="['SUPPLY-VEHICLE-RELEASE-bulkDriverOrder']">司机抢单</button>
</div>
</nz-card>

View File

@ -3,10 +3,34 @@
nz-input-number {
width: 100%;
}
nz-date-picker {
width: 94.3%;
}
.sf3 {
.goods_Tips_item {
.goods_tips {
width: calc(50% - 45px);
.ant-alert {
padding: 0 0 0 2px;
}
}
nz-form-item {
margin-bottom: 8px;
}
// .ant-form-item-control-input-content {
// display: flex;
// justify-content: end;
// }
}
}
}
i {
cursor: pointer;
}
@ -34,7 +58,10 @@
padding: 24px;
color: #7d7d7d;
font-size: 30px;
:hover{color: #52acff;}
:hover {
color: #52acff;
}
}
#container {
@ -45,6 +72,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

@ -237,6 +237,17 @@ export class SupplyManagementReleasePublishComponent 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: '货物名称',
@ -298,6 +309,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
errors: { required: '请填写货物名称' },
visibleIf: {
goodsTypeName: (value: any) => value && value === '其它'
},
blur: (value: any) => {
this.checkGoodsName();
}
}
}
@ -308,6 +322,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
'*': {
spanLabelFixed: 115,
grid: { span: 12 }
},
$goodsTips: {
grid: { span: 24 }
}
};
}
@ -436,13 +453,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
map((res: any) => {
return [...res];
})
)
);
},
change: (tag: any, org: any) => {
if(tag === '3'){
if (tag === '3') {
this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null);
}else {
} else {
this.getInsurersPrice(tag);
}
}
@ -455,7 +472,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
} ,
}
},
type2: {
type: 'string',
@ -468,7 +485,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
insurancePremium: {
type: 'string',
title: '服务包费用',
readOnly:true,
readOnly: true,
ui: {
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
@ -495,9 +512,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
}
},
required: [ 'insurancePremium']
required: ['insurancePremium']
};
this.ui5 = {
'*': {
@ -562,8 +579,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
receiptUserPhone: {
type: 'string',
title: '联系电话',
format: 'mobile',
maxLength: 11,
ui: {
errors: {
format: '请输入正确联系电话格式'
},
visibleIf: {
receiptType: value => value === '2'
}
@ -741,9 +762,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
this.service
.request(
this.service.$api_getAdditionalRate +
`?shipperId=${this?.sf1.value?.shipperAppUserId || ''}&enterpriseInfoId=${
this?.sf1.value?.enterpriseInfoName || ''
}&resourcetype='1'`
`?shipperId=${this?.sf1.value?.shipperAppUserId || ''}&enterpriseInfoId=${this?.sf1.value?.enterpriseInfoName || ''
}&resourcetype='1'`
)
.subscribe(res => {
if (res) {
@ -955,8 +975,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
...this.sf6.value,
expenseDTOList: expenseList,
paymentDays: this.sf7.value.paymentDays,
subtotal :this.sf7.value.subtotal,
total:this.sf7.value.total,
subtotal: this.sf7.value.subtotal,
total: this.sf7.value.total,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
@ -999,42 +1019,42 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
nzContent: AmapPoiPickerComponent,
nzWidth: 900,
nzOnOk: item => {
if(item?.poi) {
const poi = item.poi;
const locList = poi.pois;
switch (type) {
case 'start':
this.startInfo[index].detailedAddress = poi.formattedAddress;
this.startInfo[index].longitude = locList[0];
this.startInfo[index].latitude = locList[1];
this.startInfo[index].province = poi.addressComponent.province;
this.startInfo[index].city = poi.addressComponent.city;
this.startInfo[index].area = poi.addressComponent.district;
break;
case 'end':
this.endInfo[index].detailedAddress = poi.formattedAddress;
this.endInfo[index].longitude = locList[0];
this.endInfo[index].latitude = locList[1];
this.endInfo[index].province = poi.addressComponent.province;
this.endInfo[index].city = poi.addressComponent.city;
this.endInfo[index].area = poi.addressComponent.district;
break;
default:
break;
if (item?.poi) {
const poi = item.poi;
const locList = poi.pois;
switch (type) {
case 'start':
this.startInfo[index].detailedAddress = poi.formattedAddress;
this.startInfo[index].longitude = locList[0];
this.startInfo[index].latitude = locList[1];
this.startInfo[index].province = poi.addressComponent.province;
this.startInfo[index].city = poi.addressComponent.city;
this.startInfo[index].area = poi.addressComponent.district;
break;
case 'end':
this.endInfo[index].detailedAddress = poi.formattedAddress;
this.endInfo[index].longitude = locList[0];
this.endInfo[index].latitude = locList[1];
this.endInfo[index].province = poi.addressComponent.province;
this.endInfo[index].city = poi.addressComponent.city;
this.endInfo[index].area = poi.addressComponent.district;
break;
default:
break;
}
// 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
this.getInsurersPrice(); // 计算保费金额
});
}
return true;
} else {
this.service.msgSrv.warning('请重新手动选择地址!');
return false;
}
// 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
this.getInsurersPrice(); // 计算保费金额
});
}
return true
} else {
this.service.msgSrv.warning('请重新手动选择地址!')
return false
}
}
});
}
@ -1193,7 +1213,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) {
console.log(insuranceType);
console.log(this.totalDistance);
if (insuranceType !== '3' && this.totalDistance > 0) {
if (insuranceType !== '3' && this.totalDistance > 0) {
const params = {
insuranceType,
goodsValue: this.sf4.value.goodsValue,
@ -1210,14 +1230,31 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
});
}
}
// 运费信息价格变更
priceChange(event:any, i:any){
i.setValue(event);
if(event>=99999){
this.modalService.warning({
nzTitle: '可输入的最大金额为99999元',
});
}
this.payChange()
// 运费信息价格变更
priceChange(event: any, i: any) {
i.setValue(event);
if (event >= 99999) {
this.modalService.warning({
nzTitle: '可输入的最大金额为99999元'
});
}
this.payChange();
}
checkGoodsName() {
const name = this.sf3.getValue('/goodsName1');
if (!name || name.trim().length === 0) {
return;
}
this.service.request(this.service.$api_checkGoodsName, name).subscribe(res => {
if (res === false) {
const modalRef = this.modalService.error({
nzTitle: '货物名称含有违禁词,请重新输入!',
});
modalRef.afterClose.subscribe(result => {
// this.sf3.setValue('/goodsName1', null);
});
}
});
}
}

View File

@ -94,7 +94,7 @@
<sv-title>货物信息</sv-title>
<ng-container *ngFor="let item of i?.goodsInfoVOList">
<sv label="货物名称">
{{ item.goodsName }}
{{ item.goodsTypeName }} - {{ item.goodsName }}
</sv>
<sv label="货物数量"> {{ item.weight }}吨,{{ item.volume }}方,{{ item.number }}件 </sv>
</ng-container>
@ -190,7 +190,7 @@
</span>
<span>(运费{{ i?.totalFreight | currency }}含附加运费 {{ i?.totalSurcharge | currency }}</span>
</h3>
<div>车队长:{{ i?.payeeName }}/{{ i?.payeePhone }}/{{ i?.payeeCardNo }}</div>
<div *ngIf='i?.resourceStatus !== "1"' >车队长:{{ i?.payeeName }}/{{ i?.payeePhone }}/{{ i?.payeeCardNo }}</div>
</div>
</div>
</nz-card>
@ -220,6 +220,11 @@
[page]="{}"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }">
<ng-template st-row="operator" let-item>
<div>
{{ item?.operator }} {{ item?.telephone ? '/' + item?.telephone : '' }}
</div>
</ng-template>
</st>
</nz-card>
</div>

View File

@ -23,7 +23,7 @@ export class SupplyManagementVehicleDetailComponent implements OnInit {
}
logColumns: STColumn[] = [
{ title: '内容', index: 'operationContent' },
{ title: '操作人', index: 'operator' },
{ title: '操作人', render: 'operator' },
{ title: '操作时间', index: 'operatorTimestamp' },
];
totalObj: any;

View File

@ -172,6 +172,8 @@ export class SupplyManagementVehicleComponent implements OnInit {
type: 'default',
onClick: () => {
tipsModal.destroy();
this.st?.reload();
this.getGoodsSourceStatistical();
}
},
{
@ -182,10 +184,14 @@ export class SupplyManagementVehicleComponent implements OnInit {
if(!result?.failNumber) {
this.service.msgSrv.error('没有失败数据!');
tipsModal.destroy();
this.st?.reload();
this.getGoodsSourceStatistical();
return;
}
this.service.downloadFile(this.service.$api_getFailUploadGoodsOperateResource, result.ids)
tipsModal.destroy();
this.st?.reload();
this.getGoodsSourceStatistical();
}
},
]
@ -194,51 +200,6 @@ export class SupplyManagementVehicleComponent implements OnInit {
});
}
/**
* 修改运费
*/
updateFreight(item: any) {
const modalRef = this.modal.create({
nzTitle: '货源导入',
nzWidth: 600,
nzContent: SupplyManagementImportSupplyComponent,
nzComponentParams: {
// i: item
},
nzFooter: null
});
modalRef.afterClose.subscribe(result => {
if (result) {
const tipsModal = this.modal.create({
nzTitle: '上传提示',
nzWidth: 600,
nzContent: `<div>文件上传完成!成功<span class="text-blue-dark">${result?.successNumber}</span>条,失败<span class="text-red-dark">${result?.failNumber}</span>条!</div>`,
nzFooter: [
{
label: '取 消',
type: 'default',
onClick: () => {
tipsModal.destroy();
}
},
{
label: '下载失败数据',
type: 'primary',
onClick: () => {
this.service.downloadFile(this.service.$api_getFailUploadGoodsOperateResource, result.ids);
// this.service.request(this.service.$api_getFailUploadGoodsOperateResource, result.ids).subscribe((res: any) => {
// if (res) {
// console.log(res);
// }
// });
console.log(111);
}
}
]
});
}
});
}
/**
* 重新指派

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-03 11:10:14
* @LastEditors : Shiming
* @LastEditTime : 2022-03-11 10:35:44
* @LastEditTime : 2022-04-13 10:41:09
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -51,5 +51,5 @@
</div>
<div class="modal-footer text-right">
<button nz-button type="button" (click)="close()">取消</button>
<button nz-button type="submit" nzType="primary" (click)="save()">确定</button>
<button nz-button type="submit" nzType="primary" [nzLoading]="load" (click)="save()">确定</button>
</div>

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-03-01 15:13:03
* @LastEditors : Shiming
* @LastEditTime : 2022-03-11 10:33:44
* @LastEditTime : 2022-04-13 10:41:08
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -31,6 +31,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit {
status: boolean = true
files2: any;
schema: SFSchema = {};
load = false
ui: SFUISchema = {};
networkTransporter: any; // 网络货运人id
uploadUrl = apiConf.file_upload_url;
@ -154,12 +155,11 @@ export class SupplyManagementImportSupplyComponent implements OnInit {
});
}
save(): void {
console.log(this?.networkTransporter)
console.log(this.sf.value)
if(!this.sf.value?.shipperAppUserId || !this?.networkTransporter || !this.sf.value?.enterpriseProjectId || !this.sf.value?.fileName) {
this.service.msgSrv.error('请填写必填项并上传文件!')
return
}
this.load =true;
const formData : any= new FormData();
this.files?.forEach((file: any) => {
formData.append('file', file);
@ -172,6 +172,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit {
this.service.request(this.service.$api_goodsResourceOperateImport, formData).subscribe(res => {
if (res) {
this.service.msgSrv.success('导入成功');
this.load =false;
this.modal.destroy({ ...res });
}
});

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

@ -8,7 +8,8 @@
[button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="8" nzOffset="1">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl [acl-ability]="['SYSTEM-STAFF-list']">查询</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl
[acl-ability]="['SYSTEM-STAFF-list']">查询</button>
<button nz-button (click)="resetSF()">重置</button>
</div>
</div>
@ -18,8 +19,9 @@
<div class="d-flex justify-content-between mb-sm">
<label style="font-size: 18px;"></label>
<div>
<button nz-button nzType="primary" (click)="staffAction()" acl [acl-ability]="['SYSTEM-STAFF-add']">添加员工</button>
<button nz-button acl [acl-ability]="['SYSTEM-STAFF-export']">导出</button>
<button nz-button nzType="primary" (click)="staffAction()" acl
[acl-ability]="['SYSTEM-STAFF-add']">添加员工</button>
<button nz-button acl [acl-ability]="['SYSTEM-STAFF-export']" (click)="exportList()">导出</button>
</div>
</div>
@ -33,6 +35,6 @@
</div>
<st #st [data]="service.$api_get_enterprise_staff_page" [columns]="columns" [page]="{}"
[req]="{ params: {nameOrPhone: this.sf.value?.nameOrPhone} }" [loading]="false"
[scroll]="{ y: '370px' }" (change)="stChange($event)"></st>
[req]="{ params: {nameOrPhone: this.sf.value?.nameOrPhone} }" [loading]="false" [scroll]="{ y: '370px' }"
(change)="stChange($event)"></st>
</nz-card>

View File

@ -32,7 +32,7 @@ export class StaffManagementComponent implements OnInit {
{ title: '', index: 'key', className: 'text-center', type: 'checkbox' },
{ title: '员工姓名', className: 'text-center', index: 'name' },
{ title: '手机号码', className: 'text-center', index: 'telephone' },
{ title: '角色',className: 'text-center', index: 'roleName' },
{ title: '角色', className: 'text-center', index: 'roleName' },
{
title: '最后登录时间',
index: 'lastLoginDate',
@ -67,7 +67,8 @@ export class StaffManagementComponent implements OnInit {
},
{
text: '冻结',
iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1 && item.telephone !== this.user.phone,
iif: item =>
item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1 && item.telephone !== this.user.phone,
click: item => this.action(item, 1),
acl: { ability: ['SYSTEM-STAFF-lock'] }
},
@ -79,7 +80,8 @@ export class StaffManagementComponent implements OnInit {
},
{
text: '删除',
iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1 && item.telephone !== this.user.phone,
iif: item =>
item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1 && item.telephone !== this.user.phone,
click: item => this.action(item, 3),
acl: { ability: ['SYSTEM-STAFF-delete'] }
}
@ -167,6 +169,11 @@ export class StaffManagementComponent implements OnInit {
this.sf.reset();
}
exportList() {
const params = { nameOrPhone: this.sf.value?.nameOrPhone };
this.service.downloadFile(this.service.$api_export_staff, { ...params, pageSize: -1 });
}
private deleteStaff(params: any) {
this.service.request(this.service.$api_delete_staff, params).subscribe(res => {
if (res) {

View File

@ -15,6 +15,8 @@ import { BaseService } from 'src/app/shared/services';
export class SystemService extends BaseService {
// 分页查询企业项目员工列表
$api_get_enterprise_staff_page = '/api/mdc/cuc/userApp/getEnterpriseProjectStaffListPage';
// 分页查询企业项目员工列表
$api_export_staff = '/api/mdc/cuc/userApp/enterpriseProjectStaffExport';
// 添加员工
$api_add_staff = '/api/mdc/cuc/userApp/addStaff';
// 编辑员工

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

@ -119,7 +119,7 @@ export class TaxManagementOrderReportingComponent implements OnInit {
searchLoadingText: '搜索中...',
allowClear: true,
onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,"");
let str = q.replace(/^\s+|\s+$/g, "");
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -261,8 +261,8 @@ export class TaxManagementOrderReportingComponent implements OnInit {
{ title: '卸货地详细地址', index: 'unloadDetailedAddress', className: 'text-center', width: '180px' },
{ title: '货主名称', index: 'shipperName', className: 'text-center', width: '180px' },
{ title: '货主纳税人识别号', index: 'shipperProvinceCode', className: 'text-center', width: '180px' },
{ title: '录单时间', index: 'billCreateTime', className: 'text-center', width: '250px' },
{ title: '接单时间', index: 'wayBillCreateTime', className: 'text-center', width: '200px' },
{ title: '录单时间', index: 'recordTime', className: 'text-center', width: '250px' },
{ title: '接单时间', index: 'wayBillCreateTime', className: 'text-center', width: '200px' },
{ title: '发车时间', index: 'loadTime', className: 'text-center', width: '200px' },
{ title: '到车时间', index: 'unloadTime', className: 'text-center', width: '150px' },
{ title: '结束时间', index: 'payeeName', className: 'text-center', width: '150px' },
@ -308,7 +308,7 @@ export class TaxManagementOrderReportingComponent implements OnInit {
nzOkText: '确定',
nzCancelText: '取消',
nzOnOk: () => {
this.service.request(this.service.$api_get_recessionTaxOrder,params).subscribe((res: any) => {
this.service.request(this.service.$api_get_recessionTaxOrder, params).subscribe((res: any) => {
if (res) {
this.service.msgSrv.success('撤销成功');
this.search();
@ -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

@ -256,7 +256,7 @@ export class CancellationInvoiceComponent implements OnInit {
hidden: true
}
},
vatappHId: {
vatappHCode: {
type: 'string',
title: '申请编号',
ui: {
@ -330,18 +330,18 @@ export class CancellationInvoiceComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '', index: 'key', type: 'checkbox', fixed: 'left', width: 50, className: 'text-center' },
{ title: '分票编号', render: 'vatinvcode', width: 200 },
{ title: '分票编号', render: 'vatinvcode', width: 220 },
{
title: '申请编号',
index: 'vatappHCode',
width: 150,
width: 220,
type: 'link',
click: item => this.router.navigate(['/ticket/invoice-requested/detail/' + item?.vatappHId])
},
{ title: '申请时间', index: 'createTime', type: 'date', width: 150 },
{ title: '发票类型', index: 'vatapptypeLabel', width: 150 },
{ title: '网络货运人', index: 'ltdName', width: 160 },
{ title: '购买人', index: 'artoname', width: 160 },
{ title: '网络货运人', index: 'ltdName', width: 220 },
{ title: '购买人', index: 'artoname', width: 220 },
{ title: '订单数', index: 'ordlines', width: 90, className: 'text-right' },
{
title: '价税合计',
@ -376,7 +376,7 @@ export class CancellationInvoiceComponent implements OnInit {
},
{ title: '服务名称', index: 'vatname', width: 120 },
{ title: '销货清单', index: 'isdetail', width: 120, type: 'enum', enum: { 1: '是', 0: '否' }, className: 'text-center' },
{ title: '票面备注', index: 'remarks', width: 250 },
{ title: '票面备注', index: 'remarks', width: 300 },
{ title: '其他要求', index: 'otherremarks', width: 100 },
{
title: '操作',

View File

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

View File

@ -8,7 +8,7 @@
<nz-card class="statistics-box">
<div nz-row nzGutter="8">
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<div nz-col [nzXl]="12" [nzLg]="12" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<se label="销售方">
{{ headerInfo?.ltdName }}
</se>
@ -34,7 +34,7 @@
{{ headerInfo?.remarks }}
</se>
</div>
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<div nz-col [nzXl]="12" [nzLg]="12" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<se label="购买方">
{{ headerInfo?.artoname }}
</se>
@ -57,7 +57,7 @@
{{headerInfo?.otherremarks || '-'}}
</se>
</div>
<div *ngIf="isCanEdit && selectedIndex===2" nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" class="text-right">
<div *ngIf="isCanEdit && selectedIndex===2" nz-col [nzXl]="12" [nzLg]="12" [nzSm]="8" [nzXs]="8" class="text-right">
<ng-container *ngIf="isEdit; else elseTemplate">
<button nz-button (click)="isEdit = false; invoiceST?.load(1)">取消</button>
<button nz-button nzType="primary" (click)="saveInvoices()">保 存</button>
@ -118,7 +118,7 @@
(ngModelChange)="invoiceST.setRow(index, { vatname: $event })" style="width: 100%">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of services"></nz-option>
</nz-select>
<ng-container *ngIf="!isEdit">{{ item.vatname }}</ng-container>
<ng-container *ngIf="!isEdit">{{ item.vatnameLabel || item.vatname }}</ng-container>
</ng-template>
<ng-template st-row="vatmodel" let-item let-index="index">
<input *ngIf="isEdit" nz-input [ngModel]="item.vatmodel"

View File

@ -8,13 +8,12 @@
<nz-card class="statistics-box">
<div nz-row nzGutter="8">
<div nz-col [nzXl]="8" [nzLg]="12" nzMd="12" [nzSm]="24" [nzXs]="24" se-container [labelWidth]="150" col="1">
<se label="网络货运人">
<div nz-col [nzXl]="8" [nzLg]="12" [nzMd]="12" [nzSm]="24" [nzXs]="24" se-container [labelWidth]="150" col="1">
<se label="网络货运人" [labelWidth]="133">
{{headerInfo?.ltdidName}}
</se>
<se label="申请编号">
{{headerInfo?.vatappcode}}
</se>
<se label="已开/全部订单数">
{{headerInfo?.vatinvHNum}} / {{headerInfo?.vatinvBillNum}}
</se>
@ -31,13 +30,16 @@
{{headerInfo?.provinceName}}{{headerInfo?.cityName}}{{headerInfo?.areaName}}{{headerInfo?.reciaddr}}
</se>
</div>
<div nz-col [nzXl]="8" [nzLg]="12" nzMd="12" [nzSm]="24" [nzXs]="24" se-container [labelWidth]="100" col="1">
<div nz-col [nzXl]="8" [nzLg]="12" [nzMd]="12" [nzSm]="24" [nzXs]="24" se-container [labelWidth]="100" col="1">
<se label="购买方">
{{headerInfo?.artoName}}
</se>
<se label="纳税号">
{{headerInfo?.taxNumber}}
</se>
<se label="申请编号">
{{headerInfo?.vatappcode}}
</se>
<se label="地址">
{{headerInfo?.registerAddr}}
</se>

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

@ -212,7 +212,7 @@ export class InvoiceRequestedComponent {
label: '手工处理',
onClick: () => {
const params = {
ficoVatappBillVOList: this.selectedRows.map(item => {
ficoVatappHVOList: this.selectedRows.map(item => {
const i = Object.assign({}, { ...item });
delete i._values;
delete i._rowClassName;
@ -236,7 +236,7 @@ export class InvoiceRequestedComponent {
label: '自动开票',
onClick: () => {
const params = {
ficoVatappBillVOList: this.selectedRows.map(item => {
ficoVatappHVOList: this.selectedRows.map(item => {
const i = Object.assign({}, { ...item });
delete i._values;
delete i._rowClassName;
@ -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

@ -11,7 +11,7 @@
</se>
<ng-container *ngIf="type===2">
<se label="收件地址" required>
<nz-select [(ngModel)]="data.rcontactInfo" [nzCustomTemplate]="rcontactInfosData">
<nz-select [(ngModel)]="data.rcontactInfo" [nzCustomTemplate]="rcontactInfosData" nzDropdownClassName="print_order_select">
<nz-option [nzValue]="item" nzLabel="Jack" *ngFor="let item of rcontactInfos"
[nzCustomContent]="true">
{{item.contact}} &nbsp; &nbsp;&nbsp; {{item.tel}}<br />
@ -25,7 +25,7 @@
</ng-template>
</se>
<se label="寄件地址" required>
<nz-select [(ngModel)]="data.scontactInfo" [nzCustomTemplate]="scontactInfosData">
<nz-select [(ngModel)]="data.scontactInfo" [nzCustomTemplate]="scontactInfosData" nzDropdownClassName="print_order_select">
<nz-option [nzValue]="item" nzLabel="Jack" *ngFor="let item of scontactInfos"
[nzCustomContent]="true">
{{item.contact}} &nbsp; &nbsp;&nbsp; {{item.tel}}<br />

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

@ -17,7 +17,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
_$expand = false;
@ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
ui: SFUISchema = { '*': { spanLabelFixed: 120, grid: { lg: 8, md: 12, sm: 12, xs: 24 }, enter: () => this.st.load() } };
ui: SFUISchema = { '*': { spanLabelFixed: 130, grid: { lg: 8, md: 12, sm: 12, xs: 24 }, enter: () => this.st.load() } };
schema: SFSchema = this.initSF();
columns: STColumn[] = this.initST();
@ -199,10 +199,10 @@ export class UserCenterComponentsDriverComponent implements OnInit {
title: '从业资格证状态',
enum: [
{ label: '全部', value: '' },
{ label: '待审核', value: 10 },
{ label: '审核通过', value: 20 },
{ label: '驳回', value: 30 },
{ label: '证件过期', value: 40 }
{ label: '未提交 ', value: -1 },
{ label: '已提交', value: 1 },
{ label: '已通过', value: 2 },
{ label: '过期', value: 3 }
],
default: '',
ui: {
@ -302,10 +302,13 @@ export class UserCenterComponentsDriverComponent implements OnInit {
type: 'badge',
badge: {
'-1': { text: '未提交', color: 'default' },
10: { text: '待审核', color: 'default' },
20: { text: '审核通过', color: 'success' },
30: { text: '驳回', color: 'warning' },
40: { text: '证件过期', color: 'error' }
1: { text: '已提交', color: 'processing' },
2: { text: '通过', color: 'success' },
3: { text: '已过期', color: 'error' },
// 10: { text: '待审核', color: 'default' },
// 20: { text: '审核通过', color: 'success' },
// 30: { text: '驳回', color: 'warning' },
// 40: { text: '证件过期', color: 'error' }
},
width: 180
},

View File

@ -1,7 +1,7 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of, Subject } from 'rxjs';
@ -135,7 +135,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
expand: (value: boolean) => value
}
}
}
},
// approvalStatus: {
// type: 'string',
// title: '审核状态',
@ -155,9 +155,22 @@ export class VehicleComponentsAuditComponent implements OnInit {
// },
// },
// },
// approvalPassTime: {
// type: 'string',
// title: '审核通过时间',
// ui: {
// widget: 'sl-from-to-search',
// format: 'yyyy-MM-dd',
// placeholder: '请选择',
// nzShowTime: true,
// visibleIf: {
// expand: (value: boolean) => value
// }
// } as SFDateWidgetSchema
// }
}
};
this.ui = { '*': { spanLabelFixed: 90, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } };
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } };
}
initST() {
@ -186,6 +199,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
}
},
{ title: '申请时间', width: '180px', className: 'text-center', index: 'createTime' },
{ title: '审核通过时间', width: '180px', className: 'text-center', index: 'approvalPassTime' },
{
title: '操作',
fixed: 'right',

View File

@ -184,22 +184,22 @@ export class VehicleComponentsListComponent implements OnInit {
}
}
},
isSelfs: {
type: 'string',
title: '是否入网',
enum: [
{ label: '全部', value: '' },
{ label: '是', value: 1 },
{ label: '否', value: 0 }
],
ui: {
widget: 'select',
allowClear: true,
visibleIf: {
expand: (value: boolean) => value
}
}
}
// isSelfs: {
// type: 'string',
// title: '是否入网',
// enum: [
// { label: '全部', value: '' },
// { label: '是', value: 1 },
// { label: '否', value: 0 }
// ],
// ui: {
// widget: 'select',
// allowClear: true,
// visibleIf: {
// expand: (value: boolean) => value
// }
// }
// }
// putOnRecord: {
// type: 'string',
// title: '是否已备案',
@ -263,7 +263,7 @@ export class VehicleComponentsListComponent implements OnInit {
3: { text: '已到期', color: 'error' }
}
},
{ title: '是否入网', width: '200px', className: 'text-center', index: 'carOwner' },
// { title: '是否入网', width: '200px', className: 'text-center', index: 'carOwner' },
{ title: '所有人', width: '200px', className: 'text-center', index: 'carOwner' },
{ title: '是否挂靠', width: '150px', className: 'text-center', render: 'isSelf' },
{ title: '挂靠协议', width: '150px', className: 'text-center', render: 'approvalAuditStatus' },

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
}
];
this.setData(this.pathList);
this.setPathIndex(this.selectedIndex);
this.getPoiByPositon(this.mapList[this.mapList?.length - 1]?.lnglat);
if (this?.pathSimplifierIns) {
this.setData(this.pathList);
if (changes.mapList?.currentValue.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)
);
}
}
}
// 标点列表变更: 更新标点数据, 绘画标点
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) {
@ -143,8 +153,15 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
});
this.setData(this.pathList);
if (this.pathList.length > 0) {
if (this.mapList.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;
}

View File

@ -66,41 +66,47 @@ st {
}
nz-range-picker {
width: 100%;
word-break: break-all;
word-wrap : break-word;
width : 100%;
word-break: break-all;
word-wrap : break-word;
}
.ant-select-tree .ant-select-tree-treenode-disabled {
.ant-select-tree-checkbox {
margin: 0;
.ant-select-tree-checkbox {
margin: 0;
.ant-select-tree-checkbox-inner {
width : 0px;
border-color: #ffffff !important;
}
.ant-select-tree-checkbox-inner {
width : 0px;
border-color: #ffffff !important;
}
}
.ant-select-tree-node-content-wrapper {
color : unset;
cursor: not-allowed;
}
.ant-select-tree-node-content-wrapper {
color : unset;
cursor: not-allowed;
}
}
.area-tree-select {
.ant-select-tree .ant-select-tree-treenode-disabled {
.ant-select-tree-checkbox {
margin: 0;
.ant-select-tree .ant-select-tree-treenode-disabled {
.ant-select-tree-checkbox {
margin: 0;
.ant-select-tree-checkbox-inner {
width : 0px;
border-color: #ffffff !important;
}
}
.ant-select-tree-node-content-wrapper {
color : unset;
cursor: not-allowed;
}
.ant-select-tree-checkbox-inner {
width : 0px;
border-color: #ffffff !important;
}
}
.ant-select-tree-node-content-wrapper {
color : unset;
cursor: not-allowed;
}
}
}
.print_order_select {
cdk-virtual-scroll-viewport {
min-height: 54px;
}
}