This commit is contained in:
Taric Xin
2022-01-18 15:49:09 +08:00
parent 7775b39bc6
commit 9d1ba35333
28 changed files with 699 additions and 179 deletions

View File

@ -71,10 +71,11 @@
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="100">
<se [col]="1" label="开票日期" required>
<input nz-input placeholder="请输入" />
<nz-date-picker [(ngModel)]="openInfo.invoicedate" nzPlaceHolder="请选择" style=" width: 100%;">
</nz-date-picker>
</se>
<se [col]="1" label="开票日期" required>
<input nz-input placeholder="请输入" />
<se [col]="1" label="发票号码" required>
<input nz-input [(ngModel)]="openInfo.invoiceno" placeholder="请输入" />
</se>
</div>
</div>

View File

@ -3,6 +3,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema, SFSelectWidgetSchema } from '@delon/form';
import { dateTimePickerUtil } from '@delon/util';
import { NzModalService } from 'ng-zorro-antd/modal';
import { TicketService } from '../../services/ticket.service';
import { RequestedInvoiceModalComponent } from '../invoice-requested/requested-invoice-modal/requested-invoice-modal.component';
@ -28,6 +29,8 @@ export class CancellationInvoiceComponent implements OnInit {
selectedRows: any[] = [];
totalCallNo = 0;
openInfo: any = { invoicedate: null, invoiceno: null };
constructor(
public service: TicketService,
private nzModalService: NzModalService,
@ -58,26 +61,47 @@ export class CancellationInvoiceComponent implements OnInit {
};
}
selectChange(e: any) {
console.log(e);
this.resourceStatus = e;
this.initST();
setTimeout(() => {
this.st.load();
}, 500);
}
approval(): void {}
add(): void {}
/**
* 手工开票
* @param item
*/
requestedAction(item: any) {
this.openInfo = { invoicedate: null, invoiceno: null };
const modal = this.nzModalService.create({
nzTitle: '发票确认',
nzContent: this.requestedModal,
nzOnOk: () => {}
nzOnOk: () => {
if (!this.openInfo?.invoicedate || !this.openInfo?.invoiceno) {
this.service.msgSrv.warning('请填开票信息');
return false;
}
const params = {
invoiceno: this.openInfo.invoiceno,
invoicedate: dateTimePickerUtil.format(this.openInfo.invoicedate)
};
this.service
.request(this.service.$api_apply_fico_invoic, {
id: item.id,
vatinvcode: item.vatinvcode,
...params
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('开票成功');
this.st.load(1);
modal.destroy;
}
});
return false;
}
});
}
@ -262,9 +286,23 @@ export class CancellationInvoiceComponent implements OnInit {
type: 'currency',
format: item => `${this.currencyPipe.transform(item.vatmoney)}`
},
{ title: '金额', index: 'vatnotax', width: 100, type: 'currency', format: item => `${this.currencyPipe.transform(item.vatnotax)}` },
{
title: '金额',
index: 'vatnotax',
width: 100,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatnotax }) }
},
{ title: '税率', index: 'billvatrate', width: 90, className: 'text-right' },
{ title: '税额', index: 'vattax', width: 90, type: 'currency', format: item => `${this.currencyPipe.transform(item.vattax)}` },
{
title: '税额',
index: 'vattax',
width: 90,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vattax }) }
},
{ title: '服务名称', index: 'vatname', width: 100 },
{ title: '销货清单', index: 'isdetail', width: 90 },
{ title: '票面备注', render: 'vatremarks', width: 250 },

View File

@ -0,0 +1,16 @@
<div nz-row nzGutter="8">
<div nz-col nzSpan="20">
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 0,grid: { span: 8 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="4" class="text-right mb-md">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
</div>
</div>
<st #st [data]="url" [columns]="columns" bordered size="small"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ y: '400px' }"></st>

View File

@ -0,0 +1,112 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { TicketService } from '../../../services/ticket.service';
@Component({
selector: 'app-express-detail-modal',
templateUrl: './express-detail-modal.component.html',
styleUrls: ['./express-detail-modal.component.less']
})
export class ExpressDetailModalComponent implements OnInit {
data = [];
selectedData = [];
url = `/api/fcc/ficoExpressH/getFicoVatinvHByExpress`;
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = [
{ title: '发票号码', index: 'invoiceno', width: 160, className: 'text-left' },
{ title: '发票代码', index: 'invoiceno2', width: 160 , className: 'text-left'},
{ title: '申请编号', index: 'vatinvcode', width: 160, className: 'text-left' },
{ title: '网络货运人', index: 'ltdName', width: 120 , className: 'text-left'},
{ title: '购买人', index: 'tradeFlowNo', width: 120, className: 'text-left' },
{
title: '价税合计',
index: 'vatmoney',
width: 120,
type: 'widget',
className: 'text-right font-weight-bold',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatnotax }) }
},
{
title: '金额',
index: 'vatnotax',
width: 90,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatnotax }) }
},
{
title: '税率',
index: 'fee',
width: 90,
className: 'text-right'
},
{
title: '税额',
index: 'vattax',
width: 90,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatnotax }) }
},
{ title: '开票日期', index: 'invoicedate', type: 'date', width: 150, className: 'text-center' }
];
searchSchema: SFSchema = {
properties: {
invoiceno: {
title: '',
type: 'string',
ui: {
placeholder: '发票号码'
}
},
expressno: {
title: '',
type: 'string',
ui: {
placeholder: '申请编号'
}
},
createTime: {
title: '',
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
}
}
};
expressCode!: any;
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { expressno: this.expressCode });
if (this.sf) {
Object.assign(requestOptions.body, {
...this.sf.value,
createTime: {
start: this.sf.value.createTime?.[0] || null,
end: this.sf.value.createTime?.[1] || null
}
});
}
return requestOptions;
};
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
}
}

View File

@ -3,6 +3,7 @@ import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st
import { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { TicketService } from '../../services/ticket.service';
import { ExpressDetailModalComponent } from './express-detail-modal/express-detail-modal.component';
@Component({
selector: 'app-express-info',
@ -42,7 +43,14 @@ export class ExpressInfoComponent implements OnInit {
{ title: '快递单号', index: 'expressCode', width: 150 },
{ title: '快递公司', index: 'expresscompany', width: 120 },
{ title: '快递费用', index: 'description', width: 120 },
{ title: '发票数量', index: 'quantity', width: 120 },
{
title: '发票数量',
index: 'quantity',
width: 120,
type: 'link',
click: (record: any) => this.showDetail(record.expressCode),
className: 'text-right'
},
{ title: '寄件人姓名', index: 'sname', width: 150 },
{ title: '寄件人电话', index: 'stel', width: 150 },
{
@ -99,6 +107,25 @@ export class ExpressInfoComponent implements OnInit {
}
}
showDetail(expressCode: any) {
const modal = this.nzModalService.create({
nzTitle: '发票明细',
nzContent: ExpressDetailModalComponent,
nzNoAnimation: true,
nzWidth: 1100,
nzComponentParams: { expressCode },
nzOnOk: com => {
console.log(com.selectedData);
},
nzOkText: '导出'
});
modal.afterClose.subscribe(res => {
if (res) {
this.st.load();
}
});
}
printOrder() {
if (this.selectedRows?.length <= 0) {
this.service.msgSrv.warning('请选择快递单');

View File

@ -369,29 +369,33 @@ export class InvoiceRequestedComponent implements OnInit {
title: '申请金额',
index: 'applyAmount',
width: 100,
type: 'currency',
format: item => `${this.currencyPipe.transform(item.applyAmount)}`
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.applyAmount }) }
},
{
title: '运输费',
index: 'fjfmoney2',
width: 90,
type: 'currency',
format: item => `${this.currencyPipe.transform(item.fjfmoney2)}`
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney2 }) }
},
{
title: '附加费',
index: 'fjfmoney',
width: 90,
type: 'currency',
format: item => `${this.currencyPipe.transform(item.fjfmoney)}`
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney }) }
},
{
title: '已开票金额',
index: 'invoicedMoney',
width: 120,
type: 'currency',
format: item => `${this.currencyPipe.transform(item.invoicedMoney)}`
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.invoicedMoney }) }
},
{ title: '开户行', index: 'bankName', width: 160 },
{ title: '银行账户', index: 'bankAccount', width: 140 },

View File

@ -8,11 +8,11 @@
-->
<app-requested-detail [id]="id"></app-requested-detail>
<st #st [data]="service.$api_get_invoice_requested_order_detail" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }}"
<st #st [data]="service.$api_get_invoice_requested_order_detail" [columns]="columns" bordered size="small"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq}"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '200px' }" (change)="stChange($event)">
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '200px' }" (change)="stChange($event)" class="mt-md">
<ng-template st-row="billHCode" let-item let-index="index" let-column="column">
<a class="text-primary"> {{ item.billHCode }}</a>
</ng-template>

View File

@ -7,7 +7,7 @@
* @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 { STChange, STColumn, STComponent } from '@delon/abc/st';
import { STChange, STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { TicketService } from '../../../services/ticket.service';
@ -26,6 +26,11 @@ export class RequestedInvoiceModalComponent implements OnInit {
ngOnInit(): void {}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { vatappHId: this.id });
return requestOptions;
};
/**
* 移除订单
* @returns
@ -61,15 +66,36 @@ export class RequestedInvoiceModalComponent implements OnInit {
{ title: '', index: 'key', type: 'checkbox' },
{ title: '订单号', index: 'billHCode', width: 150 },
{ title: '订单完成日期', index: 'billTime', type: 'date', width: 150 },
{ title: '所属项目', index: 'projectIdName', width: 120 },
{ title: '所属项目', index: 'projectIdName', width: 160 },
{ 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: '装货地', index: 'loadingfrom', width: 250 },
{ title: '卸货地', index: 'loadingto', width: 250 },
{ title: '货物信息', index: 'goodsinfo', width: 170 },
{ title: '承运司机', index: 'driverinfo', width: 170 },
{
title: '总费用',
index: 'vatmoney',
width: 90,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatmoney }) }
},
{
title: '运输费',
index: 'fjfmoney2',
width: 90,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney2 }) }
},
{
title: '附加费',
index: 'fjfmoney',
width: 90,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney }) }
},
{
title: '操作',
width: 80,

View File

@ -10,15 +10,12 @@ import { TicketService } from '../../services/ticket.service';
selector: 'app-invoiced-list',
templateUrl: './invoiced-list.component.html',
styleUrls: ['./invoiced-list.component.less'],
providers: [CurrencyPipe]
})
export class InvoicedListComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
@ViewChild('logosticsModal', { static: false })
logosticsModal!: any;
@ViewChild('logosticsLogsModal', { static: false })
logosticsLogsModal!: any;
columns: STColumn[] = this.initST();
@ -32,7 +29,6 @@ export class InvoicedListComponent implements OnInit {
public service: TicketService,
private nzModalService: NzModalService,
private router: Router,
private currencyPipe: CurrencyPipe
) {}
ngOnInit(): void {}
@ -59,10 +55,6 @@ export class InvoicedListComponent implements OnInit {
}
}
approval(): void {}
add(): void {}
deletedInvoice() {
if (this.selectedRows?.length <= 0) {
this.service.msgSrv.warning('请选择发票');
@ -189,12 +181,27 @@ export class InvoicedListComponent implements OnInit {
title: '价税合计',
index: 'vatmoney',
width: 100,
type: 'currency',
format: item => `${this.currencyPipe.transform(item.vatmoney)}`
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatmoney }) }
},
{
title: '金额',
index: 'vatnotax',
width: 90,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatnotax }) }
},
{ title: '金额', index: 'vatnotax', width: 90, type: 'currency', format: item => `${this.currencyPipe.transform(item.vatnotax)}` },
{ title: '税率', index: 'vatrate', width: 90 },
{ title: '税额', index: 'disvattax', width: 90, type: 'currency', format: item => `${this.currencyPipe.transform(item.disvattax) || ''}` },
{
title: '税额',
index: 'disvattax',
width: 90,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.disvattax }) }
},
{ title: '开票日期', index: 'invoicedate', type: 'date', width: 150 },
{
title: '快递信息',

View File

@ -32,6 +32,8 @@ export class TicketService extends ShipperBaseService {
$api_ficoVatinv_Detail = '/api/fcc/ficoVatinvL/getDetailByVatinvHId';
// 运营端订单明细开票处理
$api_apply_fico = '/api/fcc/ficoVatinvH/crmPushInvo';
// 运营端手工开票/确认/E税云开票成功后的回调
$api_apply_fico_invoic = '/api/fcc/ficoVatinvH/ficoVatinvInvoicing';
// 获取汇总下单路径
$api_get_order_summary_path = '/api/fcc/ficoExpressH/getSummaryOrderAddress';

View File

@ -24,6 +24,7 @@ import { EditCollectionInvoiceComponent } from './components/input-invoice/edit-
import { AddCostDetailComponent } from './components/input-invoice/add-cost-detail/add-cost-detail.component';
import { PrintOrderModalComponent } from './components/invoice-requested/print-order-modal/print-order-modal.component';
import { ExpressInfoComponent } from './components/express-info/express-info.component';
import { ExpressDetailModalComponent } from './components/express-info/express-detail-modal/express-detail-modal.component';
const COMPONENTS: any = [
ETCInvoicedListComponent,
@ -49,7 +50,8 @@ const NOTROUTECOMPONENTS: any = [
AddCartComponent,
AddCollectionInvoiceModalComponent,
AddCostDetailComponent,
PrintOrderModalComponent
PrintOrderModalComponent,
ExpressDetailModalComponent
];
@NgModule({
declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS],