edit
This commit is contained in:
@ -1,12 +1,13 @@
|
|||||||
import { query } from '@angular/animations';
|
import { query } from '@angular/animations';
|
||||||
import { CurrencyPipe } from '@angular/common';
|
import { CurrencyPipe } from '@angular/common';
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, ViewChild } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/form';
|
||||||
import { isTemplateRef } from 'ng-zorro-antd/core/util';
|
import { isTemplateRef } from 'ng-zorro-antd/core/util';
|
||||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
|
|
||||||
import { TicketService } from '../../services/ticket.service';
|
import { TicketService } from '../../services/ticket.service';
|
||||||
import { PrintOrderModalComponent } from './print-order-modal/print-order-modal.component';
|
import { PrintOrderModalComponent } from './print-order-modal/print-order-modal.component';
|
||||||
import { RequestedInvoiceModalComponent } from './requested-invoice-modal/requested-invoice-modal.component';
|
import { RequestedInvoiceModalComponent } from './requested-invoice-modal/requested-invoice-modal.component';
|
||||||
@ -16,7 +17,7 @@ import { RequestedInvoiceModalComponent } from './requested-invoice-modal/reques
|
|||||||
templateUrl: './invoice-requested.component.html',
|
templateUrl: './invoice-requested.component.html',
|
||||||
styleUrls: ['./invoice-requested.component.less', '../../../commom/less/box.less']
|
styleUrls: ['./invoice-requested.component.less', '../../../commom/less/box.less']
|
||||||
})
|
})
|
||||||
export class InvoiceRequestedComponent implements OnInit {
|
export class InvoiceRequestedComponent {
|
||||||
@ViewChild('st', { static: true })
|
@ViewChild('st', { static: true })
|
||||||
st!: STComponent;
|
st!: STComponent;
|
||||||
@ViewChild('sf', { static: false })
|
@ViewChild('sf', { static: false })
|
||||||
@ -33,8 +34,6 @@ export class InvoiceRequestedComponent implements OnInit {
|
|||||||
selectedRows: any[] = [];
|
selectedRows: any[] = [];
|
||||||
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
|
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
|
||||||
|
|
||||||
beforeReq = (requestOptions: STRequestOptions) => {
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
if (this.resourceStatus) {
|
if (this.resourceStatus) {
|
||||||
Object.assign(requestOptions.body, { sts: this.resourceStatus });
|
Object.assign(requestOptions.body, { sts: this.resourceStatus });
|
||||||
@ -219,6 +218,11 @@ export class InvoiceRequestedComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
nzFooter: null
|
nzFooter: null
|
||||||
});
|
});
|
||||||
|
modal.afterClose.subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.st.load(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -421,7 +425,7 @@ export class InvoiceRequestedComponent implements OnInit {
|
|||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
text: '订单明细<br/>',
|
text: '订单明细<br/>',
|
||||||
click: item => this.router.navigate(['/ticket/invoice-requested/detail/' + item?.id], { queryParams: { sts: item.sts } })
|
click: item => this.router.navigate([`/ticket/invoice-requested/detail/${item?.id}`], { queryParams: { sts: item.sts } })
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '查看原因<br/>',
|
text: '查看原因<br/>',
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<app-requested-detail [id]="id"></app-requested-detail>
|
<app-requested-detail [id]="id"></app-requested-detail>
|
||||||
|
|
||||||
<st
|
<st
|
||||||
#st
|
#st1
|
||||||
[data]="service.$api_get_invoice_requested_order_detail"
|
[data]="service.$api_get_invoice_requested_order_detail"
|
||||||
[columns]="columns"
|
[columns]="columns"
|
||||||
bordered
|
bordered
|
||||||
|
|||||||
@ -6,9 +6,10 @@
|
|||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\components\\invoice-requested\\requested-invoice-modal\\requested-invoice-modal.component.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\components\\invoice-requested\\requested-invoice-modal\\requested-invoice-modal.component.ts
|
||||||
*/
|
*/
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, ViewChild } from '@angular/core';
|
||||||
import { STChange, STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
|
import { STChange, STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
|
||||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||||
|
|
||||||
import { TicketService } from '../../../services/ticket.service';
|
import { TicketService } from '../../../services/ticket.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -16,16 +17,14 @@ import { TicketService } from '../../../services/ticket.service';
|
|||||||
templateUrl: './requested-invoice-modal.component.html',
|
templateUrl: './requested-invoice-modal.component.html',
|
||||||
styleUrls: ['./requested-invoice-modal.component.less']
|
styleUrls: ['./requested-invoice-modal.component.less']
|
||||||
})
|
})
|
||||||
export class RequestedInvoiceModalComponent implements OnInit {
|
export class RequestedInvoiceModalComponent {
|
||||||
@ViewChild('st', { static: false })
|
@ViewChild('st1', { static: false })
|
||||||
st!: STComponent;
|
st1!: STComponent;
|
||||||
columns: STColumn[] = this.initST();
|
columns: STColumn[] = this.initST();
|
||||||
id: any;
|
id: any;
|
||||||
selectedRows: any[] = [];
|
selectedRows: any[] = [];
|
||||||
constructor(public service: TicketService, private nzModalService: NzModalService, private modal: NzModalRef) {}
|
constructor(public service: TicketService, private nzModalService: NzModalService, private modal: NzModalRef) {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
|
||||||
|
|
||||||
beforeReq = (requestOptions: STRequestOptions) => {
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
Object.assign(requestOptions.body, { vatappHId: this.id });
|
Object.assign(requestOptions.body, { vatappHId: this.id });
|
||||||
return requestOptions;
|
return requestOptions;
|
||||||
@ -33,6 +32,7 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 移除订单
|
* 移除订单
|
||||||
|
*
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
removeOrder(item: any[]) {
|
removeOrder(item: any[]) {
|
||||||
@ -45,7 +45,7 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
|||||||
this.service.request(this.service.$api_remove_bill, ids).subscribe(res => {
|
this.service.request(this.service.$api_remove_bill, ids).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.service.msgSrv.success('移除成功');
|
this.service.msgSrv.success('移除成功');
|
||||||
this.modal.destroy();
|
this.modal.destroy(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -57,7 +57,7 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
|||||||
this.selectedRows = e.checkbox!;
|
this.selectedRows = e.checkbox!;
|
||||||
break;
|
break;
|
||||||
case 'filter':
|
case 'filter':
|
||||||
this.st.load();
|
this.st1.load();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
|||||||
width: 90,
|
width: 90,
|
||||||
type: 'widget',
|
type: 'widget',
|
||||||
className: 'text-right',
|
className: 'text-right',
|
||||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.billkpmoney }) }
|
widget: { type: 'currency-chy', params: ({ record }: any) => ({ value: record.billkpmoney }) }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '运输费',
|
title: '运输费',
|
||||||
@ -86,7 +86,7 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
|||||||
width: 90,
|
width: 90,
|
||||||
type: 'widget',
|
type: 'widget',
|
||||||
className: 'text-right',
|
className: 'text-right',
|
||||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney2 }) }
|
widget: { type: 'currency-chy', params: ({ record }: any) => ({ value: record.fjfmoney2 }) }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '附加费',
|
title: '附加费',
|
||||||
@ -94,7 +94,7 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
|||||||
width: 90,
|
width: 90,
|
||||||
type: 'widget',
|
type: 'widget',
|
||||||
className: 'text-right',
|
className: 'text-right',
|
||||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney }) }
|
widget: { type: 'currency-chy', params: ({ record }: any) => ({ value: record.fjfmoney }) }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
@ -104,7 +104,7 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
|||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: '移除',
|
text: '移除',
|
||||||
click: item => this.removeOrder([item])
|
click: (item: any) => this.removeOrder([item])
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -116,17 +116,19 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const selectedRows = this.selectedRows.map(item => {
|
const selectedRows = this.selectedRows.map(item => {
|
||||||
delete item._values;
|
return { ...item };
|
||||||
return item;
|
|
||||||
});
|
});
|
||||||
const params = {
|
const params = {
|
||||||
ficoVatappBillVOList: selectedRows,
|
ficoVatappBillVOList: selectedRows.map(item => {
|
||||||
|
delete item._values;
|
||||||
|
return item;
|
||||||
|
}),
|
||||||
id: this.id
|
id: this.id
|
||||||
};
|
};
|
||||||
this.service.request(this.service.$api_get_applyFicoVatinv, params).subscribe((res: any) => {
|
this.service.request(this.service.$api_get_applyFicoVatinv, params).subscribe((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.service.msgSrv.success('开票成功');
|
this.service.msgSrv.success('开票成功');
|
||||||
this.modal.destroy();
|
this.modal.destroy(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { Component, Input, OnChanges, OnInit, Output, SimpleChanges, EventEmitter } from '@angular/core';
|
|
||||||
import { BaseService } from 'src/app/shared/services';
|
|
||||||
import { throwError } from 'rxjs';
|
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||||
|
import { Component, Input, OnChanges, OnInit, Output, SimpleChanges, EventEmitter, OnDestroy } from '@angular/core';
|
||||||
import { amapConf } from '@conf/amap.config';
|
import { amapConf } from '@conf/amap.config';
|
||||||
|
import { throwError } from 'rxjs';
|
||||||
|
import { BaseService } from 'src/app/shared/services';
|
||||||
declare var AMap: any;
|
declare var AMap: any;
|
||||||
declare var AMapUI: any;
|
declare var AMapUI: any;
|
||||||
declare var Loca: any;
|
declare var Loca: any;
|
||||||
@ -13,7 +13,7 @@ const CONFIG = amapConf;
|
|||||||
templateUrl: './amap-path-simplifier.component.html',
|
templateUrl: './amap-path-simplifier.component.html',
|
||||||
styleUrls: ['./amap-path-simplifier.component.less']
|
styleUrls: ['./amap-path-simplifier.component.less']
|
||||||
})
|
})
|
||||||
export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
aMap: any;
|
aMap: any;
|
||||||
pathSimplifierIns: any;
|
pathSimplifierIns: any;
|
||||||
geocoder: any;
|
geocoder: any;
|
||||||
@ -32,7 +32,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
mapHeight = '500px';
|
mapHeight = '500px';
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
clcikPointEvent = new EventEmitter<any>();
|
readonly clcikPointEvent = new EventEmitter<any>();
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
pois: any = [];
|
pois: any = [];
|
||||||
@ -45,7 +45,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
this.setPathIndex(this.selectedIndex);
|
this.setPathIndex(this.selectedIndex);
|
||||||
}
|
}
|
||||||
if (changes?.MapList?.currentValue && this?.pathSimplifierIns && changes.MapList?.currentValue.length > 0) {
|
if (changes?.MapList?.currentValue && this?.pathSimplifierIns && changes.MapList?.currentValue.length > 0) {
|
||||||
console.log(this.MapList);
|
// console.log(this.MapList);
|
||||||
this.pathList = [
|
this.pathList = [
|
||||||
{
|
{
|
||||||
name: '路线1',
|
name: '路线1',
|
||||||
@ -130,7 +130,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
getHoverTitle: function (pathData: any, pathIndex: any, pointIndex: any) {
|
getHoverTitle: function (pathData: any, pathIndex: any, pointIndex: any) {
|
||||||
if (pointIndex >= 0) {
|
if (pointIndex >= 0) {
|
||||||
//point
|
//point
|
||||||
return pathData.name + ',' + pathData.points[pointIndex].name;
|
return `${pathData.name},${pathData.points[pointIndex].name}`;
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
@ -147,7 +147,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
|
|
||||||
this.pathSimplifierIns.on('pointClick', (e: any, info: any) => {
|
this.pathSimplifierIns.on('pointClick', (e: any, info: any) => {
|
||||||
this.clcikPointEvent.emit({ e, info });
|
this.clcikPointEvent.emit({ e, info });
|
||||||
console.log('Click: ' + info.pathData.points[info.pointIndex].name);
|
console.log(`Click: ${info.pathData.points[info.pointIndex].name}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setData(pathList: Array<any>) {
|
setData(pathList: any[]) {
|
||||||
this.pathSimplifierIns.setData(pathList);
|
this.pathSimplifierIns.setData(pathList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 根据经纬度获取地址信息 */
|
/** 根据经纬度获取地址信息 */
|
||||||
getPoiByPositon(position: Array<string>) {
|
getPoiByPositon(position: string[]) {
|
||||||
this.geocoder.getAddress(position, (status: any, result: any) => {
|
this.geocoder.getAddress(position, (status: any, result: any) => {
|
||||||
if (status === 'complete' && result.info === 'OK') {
|
if (status === 'complete' && result.info === 'OK') {
|
||||||
// result中对应详细地理坐标信息
|
// result中对应详细地理坐标信息
|
||||||
@ -239,6 +239,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 选中标点,设置窗口信息
|
* 选中标点,设置窗口信息
|
||||||
|
*
|
||||||
* @param location
|
* @param location
|
||||||
*/
|
*/
|
||||||
selectedPOI(location: any) {
|
selectedPOI(location: any) {
|
||||||
@ -250,6 +251,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 增加标记点
|
* 增加标记点
|
||||||
|
*
|
||||||
* @param poi
|
* @param poi
|
||||||
*/
|
*/
|
||||||
setPOI(poi: POI) {
|
setPOI(poi: POI) {
|
||||||
@ -278,5 +280,5 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
export interface POI {
|
export interface POI {
|
||||||
markerLabel: string;
|
markerLabel: string;
|
||||||
color: string;
|
color: string;
|
||||||
position: Array<string>;
|
position: string[];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user