Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
||||||
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading"
|
<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 (click)="resetSF()">重置</button>
|
||||||
<button nz-button nzType="link" (click)="expandToggle()">
|
<button nz-button nzType="link" (click)="expandToggle()">
|
||||||
{{ !_$expand ? '展开' : '收起' }}
|
{{ !_$expand ? '展开' : '收起' }}
|
||||||
@ -48,14 +48,15 @@
|
|||||||
</nz-alert>
|
</nz-alert>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<st #st [data]="service.$api_listDetailed_page" [columns]="columns" [req]="{ params: reqParams }"
|
<st #st [data]="service.$api_listDetailed_page" [columns]="columns" [req]="{ params: reqParams }" [loading]="false"
|
||||||
[loading]="false" [scroll]="{ x: '1200px', y: '370px' }" (change)="stChange($event)">
|
[scroll]="{ x: '1200px', y: '370px' }" (change)="stChange($event)">
|
||||||
<ng-template st-row="contractCode" let-item let-index="index">
|
<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>
|
||||||
<ng-template st-row="signingObject" let-item let-index="index">
|
<ng-template st-row="signingObject" let-item let-index="index">
|
||||||
<span *ngIf="item.signingObject == 0"></span>
|
<span *ngIf="item.signingObject == 0"></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</st>
|
</st>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|||||||
@ -75,7 +75,8 @@
|
|||||||
[loading]="false"
|
[loading]="false"
|
||||||
>
|
>
|
||||||
<ng-template st-row="templateName" let-item let-index="index">
|
<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>
|
||||||
<ng-template st-row="signingObject" let-item let-index="index">
|
<ng-template st-row="signingObject" let-item let-index="index">
|
||||||
<span *ngIf="item?.signingObject == 1">货主</span>
|
<span *ngIf="item?.signingObject == 1">货主</span>
|
||||||
|
|||||||
@ -75,7 +75,8 @@
|
|||||||
[loading]="false"
|
[loading]="false"
|
||||||
>
|
>
|
||||||
<ng-template st-row="templateName" let-item let-index="index">
|
<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>
|
</st>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -137,8 +137,6 @@ export class FreightAccountService extends ShipperBaseService {
|
|||||||
// 根据预收款ID获取核销信息明细
|
// 根据预收款ID获取核销信息明细
|
||||||
$api_get_advance_collection_hrxiao = '/api/fcc/ficoAhxH/getAhxHByYskblaId';
|
$api_get_advance_collection_hrxiao = '/api/fcc/ficoAhxH/getAhxHByYskblaId';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 运营导出充值信息 充值记录导出
|
// 运营导出充值信息 充值记录导出
|
||||||
$api_get_exportPageByOperator = '/api/fcc/rechargeInfo/exportPageByOperator';
|
$api_get_exportPageByOperator = '/api/fcc/rechargeInfo/exportPageByOperator';
|
||||||
// 运营端导出交易流水明细
|
// 运营端导出交易流水明细
|
||||||
@ -205,21 +203,22 @@ export class FreightAccountService extends ShipperBaseService {
|
|||||||
if (!url) {
|
if (!url) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const uA = window.navigator.userAgent; // 判断浏览器内核
|
this.openURL(url);
|
||||||
const isIE =
|
// const uA = window.navigator.userAgent; // 判断浏览器内核
|
||||||
/msie\s|trident\/|edge\//i.test(uA) &&
|
// const isIE =
|
||||||
!!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
|
// /msie\s|trident\/|edge\//i.test(uA) &&
|
||||||
const objectUrl = url;
|
// !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
|
||||||
const a = document.createElement('a');
|
// const objectUrl = url;
|
||||||
document.body.appendChild(a);
|
// const a = document.createElement('a');
|
||||||
a.href = objectUrl;
|
// document.body.appendChild(a);
|
||||||
a.download = `回单.pdf`;
|
// a.href = objectUrl;
|
||||||
if (isIE) {
|
// a.download = `回单.pdf`;
|
||||||
// 兼容IE11无法触发下载的问题
|
// if (isIE) {
|
||||||
(navigator as any).msSaveBlob(url, a.download);
|
// // 兼容IE11无法触发下载的问题
|
||||||
} else {
|
// (navigator as any).msSaveBlob(url, a.download);
|
||||||
a.click();
|
// } else {
|
||||||
}
|
// a.click();
|
||||||
a.remove();
|
// }
|
||||||
|
// a.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,12 +19,11 @@ import { map } from 'rxjs/operators';
|
|||||||
export class InsuranceManagementService extends ShipperBaseService {
|
export class InsuranceManagementService extends ShipperBaseService {
|
||||||
// 获取货主企业列表
|
// 获取货主企业列表
|
||||||
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
|
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
|
||||||
// 查询保险费信息表
|
// 查询保险费信息表
|
||||||
public $api_premiumInfo_list = '/api/sdc/premiumInfo/list/page';
|
public $api_premiumInfo_list = '/api/sdc/premiumInfo/list/page';
|
||||||
// 统计保险单状态数量
|
// 统计保险单状态数量
|
||||||
public $api_listStatisticalStatus = '/api/sdc/premiumInfo/listStatisticalStatus';
|
public $api_listStatisticalStatus = '/api/sdc/premiumInfo/listStatisticalStatus';
|
||||||
|
|
||||||
|
|
||||||
// 保险费公司认证
|
// 保险费公司认证
|
||||||
$api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`;
|
$api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`;
|
||||||
// 退保费
|
// 退保费
|
||||||
@ -36,24 +35,25 @@ export class InsuranceManagementService extends ShipperBaseService {
|
|||||||
if (!url) {
|
if (!url) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const uA = window.navigator.userAgent; // 判断浏览器内核
|
this.openURL(url);
|
||||||
const isIE =
|
// const uA = window.navigator.userAgent; // 判断浏览器内核
|
||||||
/msie\s|trident\/|edge\//i.test(uA) &&
|
// const isIE =
|
||||||
!!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
|
// /msie\s|trident\/|edge\//i.test(uA) &&
|
||||||
const objectUrl = url;
|
// !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
|
||||||
const a = document.createElement('a');
|
// const objectUrl = url;
|
||||||
document.body.appendChild(a);
|
// const a = document.createElement('a');
|
||||||
console.log('5555');
|
// document.body.appendChild(a);
|
||||||
|
// console.log('5555');
|
||||||
|
|
||||||
a.href = objectUrl;
|
// a.href = objectUrl;
|
||||||
a.download = '保单.pdf';
|
// a.download = '保单.pdf';
|
||||||
if (isIE) {
|
// if (isIE) {
|
||||||
// 兼容IE11无法触发下载的问题
|
// // 兼容IE11无法触发下载的问题
|
||||||
(navigator as any).msSaveBlob(url, a.download);
|
// (navigator as any).msSaveBlob(url, a.download);
|
||||||
} else {
|
// } else {
|
||||||
a.click();
|
// a.click();
|
||||||
}
|
// }
|
||||||
a.remove();
|
// a.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(public injector: Injector) {
|
constructor(public injector: Injector) {
|
||||||
|
|||||||
@ -180,7 +180,7 @@ export class OrderManagementAbnormalWarningComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
carNos: {
|
carNo: {
|
||||||
title: '车牌号',
|
title: '车牌号',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
|
|||||||
@ -128,7 +128,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
if(value ==='1'){
|
if(value ==='1'){
|
||||||
this.modalTitle = '附件信息';
|
this.modalTitle = '附件信息';
|
||||||
// this.modalcontent = this.i?.contractContent?.contractContent;
|
// this.modalcontent = this.i?.contractContent?.contractContent;
|
||||||
this.service.reviewPDF(this.i?.contractContent?.contractFilePath)
|
// this.service.reviewPDF(this.i?.contractContent?.contractFilePath)
|
||||||
|
this.service.openURL(this.i?.contractContent?.contractFilePath);
|
||||||
}else if(value === '2'){
|
}else if(value === '2'){
|
||||||
this.modalTitle = '补充协议';
|
this.modalTitle = '补充协议';
|
||||||
this.modalcontent = this.i?.supplementContent?.contractContent;
|
this.modalcontent = this.i?.supplementContent?.contractContent;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import { OrderManagementService } from '../../services/order-management.service'
|
|||||||
export class OrderManagementVehicleDetailComponent implements OnInit {
|
export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||||
id = this.route.snapshot.params.id;
|
id = this.route.snapshot.params.id;
|
||||||
modalcontent: any;
|
modalcontent: any;
|
||||||
modalTitle:string = '';
|
modalTitle: string = '';
|
||||||
trajectory = 'car';
|
trajectory = 'car';
|
||||||
mapList: any[] = []; //地图点位数据组
|
mapList: any[] = []; //地图点位数据组
|
||||||
pois: any[] = [];
|
pois: any[] = [];
|
||||||
@ -55,7 +55,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
title: '支付状态',
|
title: '支付状态',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
index: 'paymentStatusLabel',
|
index: 'paymentStatusLabel'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
constructor(
|
constructor(
|
||||||
@ -97,15 +97,15 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
console.log('风险详情')
|
console.log('风险详情');
|
||||||
console.log(res)
|
console.log(res);
|
||||||
this.abnormalList = res
|
this.abnormalList = res;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
console.log('异常预警')
|
console.log('异常预警');
|
||||||
console.log(res)
|
console.log(res);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -132,15 +132,15 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
this.router.navigate(['order-management/vehicle-detailChange', this.id]);
|
this.router.navigate(['order-management/vehicle-detailChange', this.id]);
|
||||||
}
|
}
|
||||||
agreement(value: any) {
|
agreement(value: any) {
|
||||||
if(value ==='1'){
|
if (value === '1') {
|
||||||
this.modalTitle = '附件信息';
|
// this.modalTitle = '附件信息';
|
||||||
this.modalcontent = this.i?.contractContent?.contractContent;
|
// this.modalcontent = this.i?.contractContent?.contractContent;
|
||||||
|
this.service.openURL(this.i?.contractContent?.contractFilePath);
|
||||||
}else if(value === '2'){
|
} else if (value === '2') {
|
||||||
this.modalTitle = '补充协议';
|
this.modalTitle = '补充协议';
|
||||||
this.modalcontent = this.i?.supplementContent?.contractContent;
|
this.modalcontent = this.i?.supplementContent?.contractContent;
|
||||||
|
this.isVisible = true;
|
||||||
}
|
}
|
||||||
this.isVisible = true;
|
|
||||||
}
|
}
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.isVisible = false;
|
this.isVisible = false;
|
||||||
|
|||||||
@ -189,7 +189,6 @@ export class OrderManagementService extends ShipperBaseService {
|
|||||||
// 查询异常预警表
|
// 查询异常预警表
|
||||||
$api_get_abnormalWarning = `/api/sdc/abnormalWarning/list/page`;
|
$api_get_abnormalWarning = `/api/sdc/abnormalWarning/list/page`;
|
||||||
|
|
||||||
|
|
||||||
// 异步导出运营后台大宗订单列表
|
// 异步导出运营后台大宗订单列表
|
||||||
$api_get_asyncExportBulkList = `/api/sdc/billOperate/asyncExportBulkList`;
|
$api_get_asyncExportBulkList = `/api/sdc/billOperate/asyncExportBulkList`;
|
||||||
// 异步导出运营后台整车订单列表
|
// 异步导出运营后台整车订单列表
|
||||||
@ -248,21 +247,22 @@ export class OrderManagementService extends ShipperBaseService {
|
|||||||
if (!url) {
|
if (!url) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const uA = window.navigator.userAgent; // 判断浏览器内核
|
this.openURL(url);
|
||||||
const isIE =
|
// const uA = window.navigator.userAgent; // 判断浏览器内核
|
||||||
/msie\s|trident\/|edge\//i.test(uA) &&
|
// const isIE =
|
||||||
!!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
|
// /msie\s|trident\/|edge\//i.test(uA) &&
|
||||||
const objectUrl = url;
|
// !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
|
||||||
const a = document.createElement('a');
|
// const objectUrl = url;
|
||||||
document.body.appendChild(a);
|
// const a = document.createElement('a');
|
||||||
a.href = objectUrl;
|
// document.body.appendChild(a);
|
||||||
a.download = '附件.pdf';
|
// a.href = objectUrl;
|
||||||
if (isIE) {
|
// a.download = '附件.pdf';
|
||||||
// 兼容IE11无法触发下载的问题
|
// if (isIE) {
|
||||||
(navigator as any).msSaveBlob(url, a.download);
|
// // 兼容IE11无法触发下载的问题
|
||||||
} else {
|
// (navigator as any).msSaveBlob(url, a.download);
|
||||||
a.click();
|
// } else {
|
||||||
}
|
// a.click();
|
||||||
a.remove();
|
// }
|
||||||
|
// a.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -436,13 +436,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
map((res: any) => {
|
map((res: any) => {
|
||||||
return [...res];
|
return [...res];
|
||||||
})
|
})
|
||||||
)
|
);
|
||||||
},
|
},
|
||||||
change: (tag: any, org: any) => {
|
change: (tag: any, org: any) => {
|
||||||
if(tag === '3'){
|
if (tag === '3') {
|
||||||
this.sf5.setValue('/insurancePremium', null);
|
this.sf5.setValue('/insurancePremium', null);
|
||||||
this.sf5.setValue('/insuranceRate', null);
|
this.sf5.setValue('/insuranceRate', null);
|
||||||
}else {
|
} else {
|
||||||
this.getInsurersPrice(tag);
|
this.getInsurersPrice(tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -455,7 +455,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
visibleIf: { insuranceType: (value: string) => value === '0' }
|
visibleIf: { insuranceType: (value: string) => value === '0' }
|
||||||
} ,
|
}
|
||||||
},
|
},
|
||||||
type2: {
|
type2: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -468,7 +468,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
insurancePremium: {
|
insurancePremium: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '服务包费用',
|
title: '服务包费用',
|
||||||
readOnly:true,
|
readOnly: true,
|
||||||
ui: {
|
ui: {
|
||||||
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
||||||
}
|
}
|
||||||
@ -495,9 +495,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
visibleIf: { insuranceType: (value: string) => value === '1' }
|
visibleIf: { insuranceType: (value: string) => value === '1' }
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
required: [ 'insurancePremium']
|
required: ['insurancePremium']
|
||||||
};
|
};
|
||||||
this.ui5 = {
|
this.ui5 = {
|
||||||
'*': {
|
'*': {
|
||||||
@ -562,8 +562,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
receiptUserPhone: {
|
receiptUserPhone: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '联系电话',
|
title: '联系电话',
|
||||||
|
format: 'mobile',
|
||||||
maxLength: 11,
|
maxLength: 11,
|
||||||
ui: {
|
ui: {
|
||||||
|
errors: {
|
||||||
|
format: '请输入正确联系电话格式'
|
||||||
|
},
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
receiptType: value => value === '2'
|
receiptType: value => value === '2'
|
||||||
}
|
}
|
||||||
@ -955,8 +959,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
...this.sf6.value,
|
...this.sf6.value,
|
||||||
expenseDTOList: expenseList,
|
expenseDTOList: expenseList,
|
||||||
paymentDays: this.sf7.value.paymentDays,
|
paymentDays: this.sf7.value.paymentDays,
|
||||||
subtotal :this.sf7.value.subtotal,
|
subtotal: this.sf7.value.subtotal,
|
||||||
total:this.sf7.value.total,
|
total: this.sf7.value.total,
|
||||||
estimatedKilometers: this.totalDistance,
|
estimatedKilometers: this.totalDistance,
|
||||||
estimatedTravelTime: this.totalTime,
|
estimatedTravelTime: this.totalTime,
|
||||||
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
|
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
|
||||||
@ -999,42 +1003,42 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
nzContent: AmapPoiPickerComponent,
|
nzContent: AmapPoiPickerComponent,
|
||||||
nzWidth: 900,
|
nzWidth: 900,
|
||||||
nzOnOk: item => {
|
nzOnOk: item => {
|
||||||
if(item?.poi) {
|
if (item?.poi) {
|
||||||
const poi = item.poi;
|
const poi = item.poi;
|
||||||
const locList = poi.pois;
|
const locList = poi.pois;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'start':
|
case 'start':
|
||||||
this.startInfo[index].detailedAddress = poi.formattedAddress;
|
this.startInfo[index].detailedAddress = poi.formattedAddress;
|
||||||
this.startInfo[index].longitude = locList[0];
|
this.startInfo[index].longitude = locList[0];
|
||||||
this.startInfo[index].latitude = locList[1];
|
this.startInfo[index].latitude = locList[1];
|
||||||
this.startInfo[index].province = poi.addressComponent.province;
|
this.startInfo[index].province = poi.addressComponent.province;
|
||||||
this.startInfo[index].city = poi.addressComponent.city;
|
this.startInfo[index].city = poi.addressComponent.city;
|
||||||
this.startInfo[index].area = poi.addressComponent.district;
|
this.startInfo[index].area = poi.addressComponent.district;
|
||||||
break;
|
break;
|
||||||
case 'end':
|
case 'end':
|
||||||
this.endInfo[index].detailedAddress = poi.formattedAddress;
|
this.endInfo[index].detailedAddress = poi.formattedAddress;
|
||||||
this.endInfo[index].longitude = locList[0];
|
this.endInfo[index].longitude = locList[0];
|
||||||
this.endInfo[index].latitude = locList[1];
|
this.endInfo[index].latitude = locList[1];
|
||||||
this.endInfo[index].province = poi.addressComponent.province;
|
this.endInfo[index].province = poi.addressComponent.province;
|
||||||
this.endInfo[index].city = poi.addressComponent.city;
|
this.endInfo[index].city = poi.addressComponent.city;
|
||||||
this.endInfo[index].area = poi.addressComponent.district;
|
this.endInfo[index].area = poi.addressComponent.district;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
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 +1197,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) {
|
getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) {
|
||||||
console.log(insuranceType);
|
console.log(insuranceType);
|
||||||
console.log(this.totalDistance);
|
console.log(this.totalDistance);
|
||||||
if (insuranceType !== '3' && this.totalDistance > 0) {
|
if (insuranceType !== '3' && this.totalDistance > 0) {
|
||||||
const params = {
|
const params = {
|
||||||
insuranceType,
|
insuranceType,
|
||||||
goodsValue: this.sf4.value.goodsValue,
|
goodsValue: this.sf4.value.goodsValue,
|
||||||
@ -1210,14 +1214,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 运费信息价格变更
|
// 运费信息价格变更
|
||||||
priceChange(event:any, i:any){
|
priceChange(event: any, i: any) {
|
||||||
i.setValue(event);
|
i.setValue(event);
|
||||||
if(event>=99999){
|
if (event >= 99999) {
|
||||||
this.modalService.warning({
|
this.modalService.warning({
|
||||||
nzTitle: '可输入的最大金额为99999元',
|
nzTitle: '可输入的最大金额为99999元'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.payChange()
|
this.payChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
</nz-tabset>
|
</nz-tabset>
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
<st #st [scroll]="{ x: '1200px',y:'450px' }" [data]="service.$api_get_individual_income_page" [columns]="columns"
|
<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>
|
</st>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<ng-template #extraTemplate>
|
<ng-template #extraTemplate>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
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 { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||||
import { ShipperBaseService } from '@shared';
|
import { ShipperBaseService } from '@shared';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
@ -32,16 +32,15 @@ export class TaxManagementIndividualIncomeComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(public service: TaxManagementService) {}
|
constructor(public service: TaxManagementService) {}
|
||||||
|
|
||||||
/**
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
* 查询参数
|
Object.assign(requestOptions.body, { declareStatus: this.selectedIndex });
|
||||||
*/
|
if (this.sf) {
|
||||||
get reqParams() {
|
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||||
const params = Object.assign({}, this.sf?.value || {}, {
|
delete requestOptions.body._$expand;
|
||||||
declareStatus: this.selectedIndex
|
}
|
||||||
});
|
this.selectedRows = [];
|
||||||
delete params._$expand;
|
return requestOptions;
|
||||||
return { ...params };
|
};
|
||||||
}
|
|
||||||
|
|
||||||
stChange(e: STChange): void {
|
stChange(e: STChange): void {
|
||||||
switch (e.type) {
|
switch (e.type) {
|
||||||
|
|||||||
@ -177,7 +177,7 @@ export class InvoiceRequestedDetailComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
routeToOrder(item: any) {
|
routeToOrder(item: any) {
|
||||||
if (item.billType === 1) {
|
if (item.billType === '1') {
|
||||||
this.router.navigate(['/order-management/vehicle/vehicle-detail/' + item.billHId]);
|
this.router.navigate(['/order-management/vehicle/vehicle-detail/' + item.billHId]);
|
||||||
} else {
|
} else {
|
||||||
this.router.navigate(['/order-management/bulk/bulk-detail/' + item.billHId]);
|
this.router.navigate(['/order-management/bulk/bulk-detail/' + item.billHId]);
|
||||||
|
|||||||
@ -151,21 +151,22 @@ export class TicketService extends ShipperBaseService {
|
|||||||
if (!url) {
|
if (!url) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const uA = window.navigator.userAgent; // 判断浏览器内核
|
this.openURL(url);
|
||||||
const isIE =
|
// const uA = window.navigator.userAgent; // 判断浏览器内核
|
||||||
/msie\s|trident\/|edge\//i.test(uA) &&
|
// const isIE =
|
||||||
!!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
|
// /msie\s|trident\/|edge\//i.test(uA) &&
|
||||||
const objectUrl = url;
|
// !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
|
||||||
const a = document.createElement('a');
|
// const objectUrl = url;
|
||||||
document.body.appendChild(a);
|
// const a = document.createElement('a');
|
||||||
a.href = objectUrl;
|
// document.body.appendChild(a);
|
||||||
a.download = '面单.pdf';
|
// a.href = objectUrl;
|
||||||
if (isIE) {
|
// a.download = '面单.pdf';
|
||||||
// 兼容IE11无法触发下载的问题
|
// if (isIE) {
|
||||||
(navigator as any).msSaveBlob(url, a.download);
|
// // 兼容IE11无法触发下载的问题
|
||||||
} else {
|
// (navigator as any).msSaveBlob(url, a.download);
|
||||||
a.click();
|
// } else {
|
||||||
}
|
// a.click();
|
||||||
a.remove();
|
// }
|
||||||
|
// a.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -287,7 +287,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
|||||||
* @param infoItem
|
* @param infoItem
|
||||||
*/
|
*/
|
||||||
selectedPOI(infoItem: InfoItem) {
|
selectedPOI(infoItem: InfoItem) {
|
||||||
this.infoWindow.setContent(infoItem.content || `地址: <pre>${infoItem.title}</pre>`);
|
this.infoWindow.setContent(infoItem.content || `地址: <pre style="font-weight: bold;">${infoItem.title}</pre>`);
|
||||||
this.infoWindow.open(this.aMap, infoItem.position);
|
this.infoWindow.open(this.aMap, infoItem.position);
|
||||||
this.infoWindow.setPosition(infoItem.position);
|
this.infoWindow.setPosition(infoItem.position);
|
||||||
// 地图定位居中
|
// 地图定位居中
|
||||||
|
|||||||
@ -34,7 +34,7 @@ import { IBase } from '../../interfaces';
|
|||||||
import { EAFileUtil } from '../../utils';
|
import { EAFileUtil } from '../../utils';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class BaseService implements IBase {
|
export class BaseService implements IBase {
|
||||||
// 新增实例接口地址
|
// 新增实例接口地址
|
||||||
@ -94,7 +94,7 @@ export class BaseService implements IBase {
|
|||||||
parameter: any = {},
|
parameter: any = {},
|
||||||
method: 'POST' | 'GET',
|
method: 'POST' | 'GET',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Observable<any> {
|
): Observable<any> {
|
||||||
if (paramType === 'FORM') {
|
if (paramType === 'FORM') {
|
||||||
parameter = this.getFormData(parameter);
|
parameter = this.getFormData(parameter);
|
||||||
@ -104,7 +104,7 @@ export class BaseService implements IBase {
|
|||||||
return this.http
|
return this.http
|
||||||
.request(method, url, {
|
.request(method, url, {
|
||||||
body: paramInBody ? parameter : null,
|
body: paramInBody ? parameter : null,
|
||||||
params: paramInBody ? null : parameter,
|
params: paramInBody ? null : parameter
|
||||||
})
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
map((res: any) => {
|
map((res: any) => {
|
||||||
@ -122,7 +122,7 @@ export class BaseService implements IBase {
|
|||||||
this.msgSrv.warning(res.msg);
|
this.msgSrv.warning(res.msg);
|
||||||
return allowBadCode ? res : null;
|
return allowBadCode ? res : null;
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ export class BaseService implements IBase {
|
|||||||
parameter: any = {},
|
parameter: any = {},
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Observable<any> {
|
): Observable<any> {
|
||||||
return this.httpRequest(url, parameter, method, paramInBody, paramType);
|
return this.httpRequest(url, parameter, method, paramInBody, paramType);
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ export class BaseService implements IBase {
|
|||||||
parameter: any = {},
|
parameter: any = {},
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return this.request(url, parameter, method, paramInBody, paramType).toPromise();
|
return this.request(url, parameter, method, paramInBody, paramType).toPromise();
|
||||||
}
|
}
|
||||||
@ -165,7 +165,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_add_one,
|
url: string = this.$api_add_one,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Observable<any> {
|
): Observable<any> {
|
||||||
return this.request(url, parameter, method, paramInBody, paramType);
|
return this.request(url, parameter, method, paramInBody, paramType);
|
||||||
}
|
}
|
||||||
@ -175,7 +175,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_add_one,
|
url: string = this.$api_add_one,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return this.addOne(parameter, url, method, paramInBody, paramType).toPromise();
|
return this.addOne(parameter, url, method, paramInBody, paramType).toPromise();
|
||||||
}
|
}
|
||||||
@ -185,7 +185,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_add_many,
|
url: string = this.$api_add_many,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Observable<any> {
|
): Observable<any> {
|
||||||
return this.request(url, parameter, method, paramInBody, paramType);
|
return this.request(url, parameter, method, paramInBody, paramType);
|
||||||
}
|
}
|
||||||
@ -195,7 +195,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_add_many,
|
url: string = this.$api_add_many,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return this.addMany(parameter, url, method, paramInBody, paramType).toPromise();
|
return this.addMany(parameter, url, method, paramInBody, paramType).toPromise();
|
||||||
}
|
}
|
||||||
@ -206,7 +206,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_del_one,
|
url: string = this.$api_del_one,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Observable<any> {
|
): Observable<any> {
|
||||||
return this.request(url, parameter, method, paramInBody, paramType);
|
return this.request(url, parameter, method, paramInBody, paramType);
|
||||||
}
|
}
|
||||||
@ -216,7 +216,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_del_one,
|
url: string = this.$api_del_one,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return this.delOne(parameter, url, method, paramInBody, paramType).toPromise();
|
return this.delOne(parameter, url, method, paramInBody, paramType).toPromise();
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_del_many,
|
url: string = this.$api_del_many,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Observable<any> {
|
): Observable<any> {
|
||||||
return this.request(url, parameter, method, paramInBody, paramType);
|
return this.request(url, parameter, method, paramInBody, paramType);
|
||||||
}
|
}
|
||||||
@ -236,7 +236,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_del_many,
|
url: string = this.$api_del_many,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return this.delMany(parameter, url, method, paramInBody, paramType).toPromise();
|
return this.delMany(parameter, url, method, paramInBody, paramType).toPromise();
|
||||||
}
|
}
|
||||||
@ -247,7 +247,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_edit_one,
|
url: string = this.$api_edit_one,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Observable<any> {
|
): Observable<any> {
|
||||||
return this.request(url, parameter, method, paramInBody, paramType);
|
return this.request(url, parameter, method, paramInBody, paramType);
|
||||||
}
|
}
|
||||||
@ -257,7 +257,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_edit_one,
|
url: string = this.$api_edit_one,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return this.updateOne(parameter, url, method, paramInBody, paramType).toPromise();
|
return this.updateOne(parameter, url, method, paramInBody, paramType).toPromise();
|
||||||
}
|
}
|
||||||
@ -267,7 +267,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_edit_many,
|
url: string = this.$api_edit_many,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Observable<any> {
|
): Observable<any> {
|
||||||
return this.request(url, parameter, method, paramInBody, paramType);
|
return this.request(url, parameter, method, paramInBody, paramType);
|
||||||
}
|
}
|
||||||
@ -277,7 +277,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_edit_many,
|
url: string = this.$api_edit_many,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return this.updateMany(parameter, url, method, paramInBody, paramType).toPromise();
|
return this.updateMany(parameter, url, method, paramInBody, paramType).toPromise();
|
||||||
}
|
}
|
||||||
@ -290,7 +290,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_get_one,
|
url: string = this.$api_get_one,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Observable<any> {
|
): Observable<any> {
|
||||||
return this.request(url, parameter, method, paramInBody, paramType);
|
return this.request(url, parameter, method, paramInBody, paramType);
|
||||||
}
|
}
|
||||||
@ -300,7 +300,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_get_one,
|
url: string = this.$api_get_one,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return this.getOne(parameter, url, method, paramInBody, paramType).toPromise();
|
return this.getOne(parameter, url, method, paramInBody, paramType).toPromise();
|
||||||
}
|
}
|
||||||
@ -313,12 +313,12 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_get_many,
|
url: string = this.$api_get_many,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Observable<any[]> {
|
): Observable<any[]> {
|
||||||
return this.httpRequest(url, parameter, method, paramInBody, paramType).pipe(
|
return this.httpRequest(url, parameter, method, paramInBody, paramType).pipe(
|
||||||
map((res) => {
|
map(res => {
|
||||||
return (res as any[]) || [];
|
return (res as any[]) || [];
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -327,7 +327,7 @@ export class BaseService implements IBase {
|
|||||||
url: string = this.$api_get_many,
|
url: string = this.$api_get_many,
|
||||||
method: 'POST' | 'GET' = 'POST',
|
method: 'POST' | 'GET' = 'POST',
|
||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON'
|
||||||
): Promise<any[]> {
|
): Promise<any[]> {
|
||||||
return this.getMany(parameter, url, method, paramInBody, paramType).toPromise();
|
return this.getMany(parameter, url, method, paramInBody, paramType).toPromise();
|
||||||
}
|
}
|
||||||
@ -352,19 +352,19 @@ export class BaseService implements IBase {
|
|||||||
paramInBody: boolean = true,
|
paramInBody: boolean = true,
|
||||||
paramType: 'JSON' | 'FORM' = 'JSON',
|
paramType: 'JSON' | 'FORM' = 'JSON',
|
||||||
allowBadCode: boolean = true,
|
allowBadCode: boolean = true,
|
||||||
async: boolean = true,
|
async: boolean = true
|
||||||
): Observable<any> | Promise<any> {
|
): Observable<any> | Promise<any> {
|
||||||
if (allowBadCode) {
|
if (allowBadCode) {
|
||||||
url += `?_allow_badcode=true`;
|
url += `?_allow_badcode=true`;
|
||||||
}
|
}
|
||||||
const response = this.httpRequest(url, parameter, method, paramInBody, paramType).pipe(
|
const response = this.httpRequest(url, parameter, method, paramInBody, paramType).pipe(
|
||||||
tap((res) => {
|
tap(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.msgSrv.success(`创建下载任务成功,请前往下载任务列表下载您的文件!`);
|
this.msgSrv.success(`创建下载任务成功,请前往下载任务列表下载您的文件!`);
|
||||||
window.open('#/download');
|
window.open('#/download');
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
return async ? response.toPromise() : response;
|
return async ? response.toPromise() : response;
|
||||||
}
|
}
|
||||||
@ -396,11 +396,15 @@ export class BaseService implements IBase {
|
|||||||
this.msgSrv.warning(m.msg);
|
this.msgSrv.warning(m.msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
)
|
)
|
||||||
.toPromise();
|
.toPromise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openURL(url: string) {
|
||||||
|
window.open(url);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直接下载文件
|
* 直接下载文件
|
||||||
*/
|
*/
|
||||||
@ -464,19 +468,19 @@ export class BaseService implements IBase {
|
|||||||
*/
|
*/
|
||||||
getDict(key: string): Observable<any[]> {
|
getDict(key: string): Observable<any[]> {
|
||||||
return this.http.post(this.$api_get_dict, { dict: key }).pipe(
|
return this.http.post(this.$api_get_dict, { dict: key }).pipe(
|
||||||
map((res) => {
|
map(res => {
|
||||||
if (res.success === true) {
|
if (res.success === true) {
|
||||||
return res.data.map((r: any) => {
|
return res.data.map((r: any) => {
|
||||||
return {
|
return {
|
||||||
label: r.itemValue,
|
label: r.itemValue,
|
||||||
value: r.itemKey,
|
value: r.itemKey
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.msgSrv.warning(`获取取字典【${key}】时发生错误:${res.msg || '未知错误!'}`);
|
this.msgSrv.warning(`获取取字典【${key}】时发生错误:${res.msg || '未知错误!'}`);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -508,7 +512,7 @@ export class BaseService implements IBase {
|
|||||||
if (paramsIndex > -1) {
|
if (paramsIndex > -1) {
|
||||||
const paramsStr = url.substr(paramsIndex + 1);
|
const paramsStr = url.substr(paramsIndex + 1);
|
||||||
const params = paramsStr.split('&');
|
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] : '';
|
const value = keyMap ? keyMap.split('=')[1] : '';
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user