Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { query } from '@angular/animations';
|
||||
import { CurrencyPipe } from '@angular/common';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
@ -13,7 +14,8 @@ import { RequestedInvoiceModalComponent } from './requested-invoice-modal/reques
|
||||
@Component({
|
||||
selector: 'app-invoice-requested',
|
||||
templateUrl: './invoice-requested.component.html',
|
||||
styleUrls: ['./invoice-requested.component.less']
|
||||
styleUrls: ['./invoice-requested.component.less'],
|
||||
providers: [CurrencyPipe]
|
||||
})
|
||||
export class InvoiceRequestedComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
@ -30,7 +32,12 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
|
||||
totalCallNo = 0;
|
||||
selectedRows: any[] = [];
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
|
||||
constructor(
|
||||
public service: TicketService,
|
||||
private nzModalService: NzModalService,
|
||||
private router: Router,
|
||||
private currencyPipe: CurrencyPipe
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
@ -354,18 +361,42 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '', index: 'key', type: 'checkbox' },
|
||||
{ title: '申请编号', render: 'vatappcode', width: 150 },
|
||||
{ title: '申请编号', render: 'vatappcode', width: 180 },
|
||||
{ title: '网络货运人', index: 'ltdName', width: 120 },
|
||||
{ title: '购买方', index: 'projectName', width: 90 },
|
||||
{ title: '订单数', index: 'ordlines', width: 90 },
|
||||
{ title: '申请金额', index: 'applyAmount', width: 100 },
|
||||
{ title: '运输费', index: 'fjfmoney2', width: 90 },
|
||||
{ title: '附加费', index: 'fjfmoney', width: 90 },
|
||||
{ title: '已开票金额', index: 'invoicedMoney', width: 120 },
|
||||
{ title: '开户行', index: 'bankName', width: 90 },
|
||||
{ title: '银行账户', index: 'bankAccount', width: 100 },
|
||||
{ title: '注册地址', index: 'registerAddr', width: 100 },
|
||||
{ title: '注册电话', index: 'registerPhone', width: 100 },
|
||||
{
|
||||
title: '申请金额',
|
||||
index: 'applyAmount',
|
||||
width: 100,
|
||||
type: 'currency',
|
||||
format: item => `${this.currencyPipe.transform(item.applyAmount)}`
|
||||
},
|
||||
{
|
||||
title: '运输费',
|
||||
index: 'fjfmoney2',
|
||||
width: 90,
|
||||
type: 'currency',
|
||||
format: item => `${this.currencyPipe.transform(item.fjfmoney2)}`
|
||||
},
|
||||
{
|
||||
title: '附加费',
|
||||
index: 'fjfmoney',
|
||||
width: 90,
|
||||
type: 'currency',
|
||||
format: item => `${this.currencyPipe.transform(item.fjfmoney)}`
|
||||
},
|
||||
{
|
||||
title: '已开票金额',
|
||||
index: 'invoicedMoney',
|
||||
width: 120,
|
||||
type: 'currency',
|
||||
format: item => `${this.currencyPipe.transform(item.invoicedMoney)}`
|
||||
},
|
||||
{ title: '开户行', index: 'bankName', width: 160 },
|
||||
{ title: '银行账户', index: 'bankAccount', width: 140 },
|
||||
{ title: '注册地址', index: 'registerAddr', width: 140 },
|
||||
{ title: '注册电话', index: 'registerPhone', width: 120 },
|
||||
{ title: '服务名称', index: 'vatname', width: 100 },
|
||||
{ title: '销货清单', index: 'isdetail', width: 100 },
|
||||
{ title: '其他要求', index: 'otherremarks', width: 100 },
|
||||
|
||||
@ -10,4 +10,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.text-truncate {
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
@ -20,43 +20,29 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
||||
@ViewChild('st', { static: false })
|
||||
st!: STComponent;
|
||||
columns: STColumn[] = this.initST();
|
||||
headerInfo: any;
|
||||
id: any;
|
||||
info = {};
|
||||
selectedRows: any[] = [];
|
||||
totalCallNo = 0;
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService,private modal: NzModalRef,) {}
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService, private modal: NzModalRef) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initData()
|
||||
}
|
||||
initData() {
|
||||
this.service.request(this.service.$api_get_invoice_requested_header_detail, { id: this.id }).subscribe(res => {
|
||||
console.log(res);
|
||||
if (res) {
|
||||
this.headerInfo = res;
|
||||
}
|
||||
});
|
||||
}
|
||||
ngOnInit(): void {}
|
||||
|
||||
/**
|
||||
* 移除订单
|
||||
* @returns
|
||||
*/
|
||||
removeOrder(item: any[]) {
|
||||
console.log(item)
|
||||
console.log(item);
|
||||
this.nzModalService.warning({
|
||||
nzTitle: '确定从当前批次中移除所有订单?',
|
||||
nzContent: '移除后相关订单可以重新提交开票申请',
|
||||
nzOnOk: () => {
|
||||
// const ids = this.selectedRows.map(order => order.billHId);
|
||||
// this.service.request(this.service.$api_remove_bill, ids).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.service.msgSrv.success('移除成功');
|
||||
// this.loadHeadInfo();
|
||||
// this.st.reload();
|
||||
// }
|
||||
// });
|
||||
const ids = this.selectedRows.map(order => order.billHId);
|
||||
this.service.request(this.service.$api_remove_bill, ids).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('移除成功');
|
||||
this.modal.destroy();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -64,7 +50,6 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
this.selectedRows = e.checkbox!;
|
||||
this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.callNo, 0);
|
||||
break;
|
||||
case 'filter':
|
||||
this.st.load();
|
||||
@ -74,17 +59,17 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '', index: 'key', type: 'checkbox' },
|
||||
{ title: '订单号', index: 'no', width: 150 },
|
||||
{ title: '订单完成日期', index: 'updatedAt', type: 'date', width: 150 },
|
||||
{ title: '所属项目', index: 'callNo', width: 120 },
|
||||
{ title: '订单类型', index: 'callNo', width: 90 },
|
||||
{ title: '装货地', index: 'callNo', width: 90 },
|
||||
{ title: '卸货地', index: 'callNo', width: 100 },
|
||||
{ title: '货物信息', index: 'callNo', width: 90 },
|
||||
{ title: '承运司机', index: 'callNo', width: 140, format: item => `特朗普</br>13789040523</br>粤GT8419` },
|
||||
{ title: '总费用', index: 'callNo', width: 90 },
|
||||
{ title: '运输费', index: 'callNo', width: 90 },
|
||||
{ title: '附加费', index: 'callNo', width: 90 },
|
||||
{ title: '订单号', index: 'billHCode', width: 150 },
|
||||
{ title: '订单完成日期', index: 'billTime', type: 'date', width: 150 },
|
||||
{ title: '所属项目', index: 'projectIdName', width: 120 },
|
||||
{ title: '订单类型', index: 'billTypeName', width: 90 },
|
||||
{ title: '装货地', index: 'loadingfrom', width: 150 },
|
||||
{ title: '卸货地', index: 'loadingto', width: 150 },
|
||||
{ title: '货物信息', index: 'goodsinfo', width: 150 },
|
||||
{ title: '承运司机', index: 'driverinfo', width: 150 },
|
||||
{ title: '总费用', index: 'vatmoney', width: 90 },
|
||||
{ title: '运输费', index: 'fjfmoney2', width: 90 },
|
||||
{ title: '附加费', index: 'fjfmoney', width: 90 },
|
||||
{
|
||||
title: '操作',
|
||||
width: 80,
|
||||
@ -100,15 +85,23 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
||||
];
|
||||
}
|
||||
saveManage() {
|
||||
console.log(this.selectedRows)
|
||||
console.log('11111')
|
||||
const params = {
|
||||
ficoVatappBillVOList: this.selectedRows,
|
||||
id: this.id
|
||||
if (this.selectedRows?.length <= 0) {
|
||||
this.service.msgSrv.warning('请选择订单');
|
||||
return;
|
||||
}
|
||||
const selectedRows = this.selectedRows.map(item => {
|
||||
delete item._values;
|
||||
return item;
|
||||
});
|
||||
const params = {
|
||||
ficoVatappBillVOList: selectedRows,
|
||||
id: this.id
|
||||
};
|
||||
this.service.request(this.service.$api_get_applyFicoVatinv, params).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
})
|
||||
this.modal.destroy();
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功');
|
||||
this.modal.destroy();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { CurrencyPipe } from '@angular/common';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
@ -8,7 +9,8 @@ import { TicketService } from '../../services/ticket.service';
|
||||
@Component({
|
||||
selector: 'app-invoiced-list',
|
||||
templateUrl: './invoiced-list.component.html',
|
||||
styleUrls: ['./invoiced-list.component.less']
|
||||
styleUrls: ['./invoiced-list.component.less'],
|
||||
providers: [CurrencyPipe]
|
||||
})
|
||||
export class InvoicedListComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
@ -26,7 +28,12 @@ export class InvoicedListComponent implements OnInit {
|
||||
|
||||
selectedRows: any[] = [];
|
||||
totalCallNo = 0;
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
|
||||
constructor(
|
||||
public service: TicketService,
|
||||
private nzModalService: NzModalService,
|
||||
private router: Router,
|
||||
private currencyPipe: CurrencyPipe
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
@ -178,10 +185,16 @@ export class InvoicedListComponent implements OnInit {
|
||||
{ title: '网络货运人', index: 'ltdId', width: 120 },
|
||||
{ title: '购买人', index: 'artoname', width: 90 },
|
||||
{ title: '订单数', index: 'ordlines', width: 90 },
|
||||
{ title: '价税合计', index: 'vatmoney', width: 100 },
|
||||
{ title: '金额', index: 'vatnotax', width: 90 },
|
||||
{
|
||||
title: '价税合计',
|
||||
index: 'vatmoney',
|
||||
width: 100,
|
||||
type: 'currency',
|
||||
format: item => `${this.currencyPipe.transform(item.vatmoney)}`
|
||||
},
|
||||
{ title: '金额', index: 'vatnotax', width: 90, type: 'currency', format: item => `${this.currencyPipe.transform(item.vatnotax)}` },
|
||||
{ title: '税率', index: 'vatrate', width: 90 },
|
||||
{ title: '税额', index: 'disvattax', width: 90 },
|
||||
{ title: '税额', index: 'disvattax', width: 90, type: 'currency', format: item => `${this.currencyPipe.transform(item.disvattax) || ''}` },
|
||||
{ title: '开票日期', index: 'invoicedate', type: 'date', width: 150 },
|
||||
{
|
||||
title: '快递信息',
|
||||
|
||||
Reference in New Issue
Block a user