This commit is contained in:
Taric Xin
2022-01-11 16:42:26 +08:00
parent eeb23fb975
commit 8e93a648a2
21 changed files with 778 additions and 45 deletions

View File

@ -1 +1,41 @@
<p>voucher-management works!</p>
<page-header-wrapper [title]="'凭证管理'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<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> 导出明细</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
<nz-card class="content-box" nzBordered>
<div class="d-flex align-items-center mb-md mt-md">
<button nz-button (click)="this.addInvoice()" nzType="primary">添加发票</button>
<div class="ml-md">
已选择
<strong class="text-primary">{{ selectedRows.length }}</strong> 张发票
<a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</div>
</div>
<st #st [data]="service.$mock_url" [columns]="columns"
[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: '370px' }" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -1,15 +1,241 @@
import { Component, OnInit } from '@angular/core';
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 } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-voucher-management',
templateUrl: './voucher-management.component.html',
styleUrls: ['./voucher-management.component.less']
styleUrls: ['../../../commom/less/box.less']
})
export class VoucherManagementComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
@ViewChild('auditModal', { static: false })
auditModal!: any;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
constructor() { }
_$expand = false;
ngOnInit(): void {
selectedRows: any[] = [];
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
beforeReq = (requestOptions: STRequestOptions) => {
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
},
invdate: {
start: this.sf.value.invdate?.[0] || null,
end: this.sf.value.invdate?.[1] || null
}
});
}
return requestOptions;
};
stChange(e: STChange): void {
switch (e.type) {
case 'checkbox':
this.selectedRows = e.checkbox!;
break;
}
}
addInvoice() {
if (this.selectedRows?.length <= 0) {
this.service.msgSrv.warning('请选择申请记录');
return;
}
const modal = this.nzModalService.create({
nzTitle: '收票信息',
nzContent: AddCollectionInvoiceModalComponent,
nzComponentParams: { i: { userId: 0 } },
nzFooter: null
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
inpinvcode: {
type: 'string',
title: '凭证号',
ui: {
autocomplete: 'off',
placeholder: '请输入'
}
},
ltdid: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder()
},
default: ''
},
invoiceno: {
type: 'string',
title: '发票号码',
ui: {
autocomplete: 'off',
placeholder: '请输入'
}
},
invtype: {
type: 'string',
title: '发票类型',
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
hrto: {
type: 'string',
title: '销售方',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
createtime: {
title: '创建时间',
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema
},
sts: {
type: 'string',
title: '收票状态',
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
invdate: {
type: 'string',
title: '发票日期',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
}
},
remarks: {
type: 'string',
title: '收票备注',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
billCode: {
type: 'string',
title: '订单号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
feecode: {
type: 'string',
title: '费用号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
}
}
};
}
private initST(): STColumn[] {
return [
{ title: '', index: 'key', type: 'checkbox' },
{ title: '收票单号', index: 'inpinvcode', type: 'link' },
{ title: '网络货运人', index: 'ltdid' },
{ title: '发票日期', index: 'invdate', type: 'date' },
{ title: '发票号', index: 'invoiceno' },
{ title: '发票金额', index: 'invmoney' },
{ title: '税额', index: 'invtax' },
{ title: '发票类型', index: 'invtype' },
{ title: '销售方', index: 'hrto' },
{ title: '创建时间', index: 'createtime', type: 'date' },
{ title: '创建人', index: 'createbyname' },
{ title: '收票状态', index: 'sts' },
{
title: '操作',
buttons: [
{
text: '浏览',
click: item => this.router.navigate(['/ticket/input-invoice/detail/' + item.id])
},
{
text: '修改',
click: item => this.router.navigate(['/ticket/input-invoice/edit/1'])
}
]
}
];
}
}

View File

@ -1 +1,41 @@
<p>voucher-summary works!</p>
<page-header-wrapper [title]="'凭证汇总'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
[class.expend-options]="_$expand">
<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 nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
<nz-card class="content-box" nzBordered>
<div class="d-flex align-items-center mb-md mt-md">
<button nz-button (click)="this.addInvoice()" nzType="primary">添加发票</button>
<div class="ml-md">
已选择
<strong class="text-primary">{{ selectedRows.length }}</strong> 张发票
<a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</div>
</div>
<st #st [data]="service.$mock_url" [columns]="columns"
[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: '370px' }" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -1,15 +1,240 @@
import { Component, OnInit } from '@angular/core';
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 } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-voucher-summary',
templateUrl: './voucher-summary.component.html',
styleUrls: ['./voucher-summary.component.less']
styleUrls: ['../../../commom/less/box.less']
})
export class VoucherSummaryComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
@ViewChild('auditModal', { static: false })
auditModal!: any;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
constructor() { }
_$expand = false;
ngOnInit(): void {
selectedRows: any[] = [];
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
beforeReq = (requestOptions: STRequestOptions) => {
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
},
invdate: {
start: this.sf.value.invdate?.[0] || null,
end: this.sf.value.invdate?.[1] || null
}
});
}
return requestOptions;
};
stChange(e: STChange): void {
switch (e.type) {
case 'checkbox':
this.selectedRows = e.checkbox!;
break;
}
}
addInvoice() {
if (this.selectedRows?.length <= 0) {
this.service.msgSrv.warning('请选择申请记录');
return;
}
const modal = this.nzModalService.create({
nzTitle: '收票信息',
nzContent: AddCollectionInvoiceModalComponent,
nzComponentParams: { i: { userId: 0 } },
nzFooter: null
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
inpinvcode: {
type: 'string',
title: '收票单号',
ui: {
autocomplete: 'off',
placeholder: '请输入'
}
},
ltdid: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder()
},
default: ''
},
invoiceno: {
type: 'string',
title: '发票号码',
ui: {
autocomplete: 'off',
placeholder: '请输入'
}
},
invtype: {
type: 'string',
title: '发票类型',
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
hrto: {
type: 'string',
title: '销售方',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
createtime: {
title: '创建时间',
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema
},
sts: {
type: 'string',
title: '收票状态',
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
invdate: {
type: 'string',
title: '发票日期',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
}
},
remarks: {
type: 'string',
title: '收票备注',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
billCode: {
type: 'string',
title: '订单号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
feecode: {
type: 'string',
title: '费用号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
}
}
};
}
private initST(): STColumn[] {
return [
{ title: '', index: 'key', type: 'checkbox' },
{ title: '收票单号', index: 'inpinvcode', type: 'link' },
{ title: '网络货运人', index: 'ltdid' },
{ title: '发票日期', index: 'invdate', type: 'date' },
{ title: '发票号', index: 'invoiceno' },
{ title: '发票金额', index: 'invmoney' },
{ title: '税额', index: 'invtax' },
{ title: '发票类型', index: 'invtype' },
{ title: '销售方', index: 'hrto' },
{ title: '创建时间', index: 'createtime', type: 'date' },
{ title: '创建人', index: 'createbyname' },
{ title: '收票状态', index: 'sts' },
{
title: '操作',
buttons: [
{
text: '浏览',
click: item => this.router.navigate(['/ticket/input-invoice/detail/' + item.id])
},
{
text: '修改',
click: item => this.router.navigate(['/ticket/input-invoice/edit/1'])
}
]
}
];
}
}

View File

@ -16,6 +16,8 @@ import { ExpensesReceivableComponent } from './components/cost-management/expens
import { ExpensesPayableComponent } from './components/cost-management/expenses-payable/expenses-payable.component';
import { PaymentOrderComponent } from './components/payment-order/payment-order.component';
import { ReceiptOrderComponent } from './components/receipt-order/receipt-order.component';
import { VoucherManagementComponent } from './components/voucher-management/voucher-management.component';
import { VoucherSummaryComponent } from './components/voucher-summary/voucher-summary.component';
const routes: Routes = [
{ path: 'freight-account', component: FreightAccountComponent },
@ -25,8 +27,8 @@ const routes: Routes = [
{ path: 'recharge-record', component: RechargeRecordComponent },
{ path: 'withdrawals-record', component: WithdrawalsRecordComponent },
{ path: 'withdrawals-record/detail/:id', component: WithdrawalsDetailComponent },
// { path: 'voucher-management', component: VoucherManagementComponent },
// { path: 'voucher-summary', component: VoucherSummaryComponent },
{ path: 'voucher-management', component: VoucherManagementComponent },
{ path: 'voucher-summary', component: VoucherSummaryComponent },
{ path: 'cost-management', component: CostManagementComponent },
{ path: 'cost-management/detail/:id', component: CostManagementDetailComponent },
{ path: 'cost-management/expenses-receivable/:id', component: ExpensesReceivableComponent },
@ -35,7 +37,7 @@ const routes: Routes = [
{ path: 'payment-record', component: PaymentRecordComponent },
{ path: 'transaction-flow', component: TransactionFlowComponent },
{ path: 'payment-order', component: PaymentOrderComponent },
{ path: 'receipt-order', component: ReceiptOrderComponent },
{ path: 'receipt-order', component: ReceiptOrderComponent }
];
@NgModule({

View File

@ -20,6 +20,8 @@ import { ExpensesReceivableComponent } from './components/cost-management/expens
import { ExpensesPayableComponent } from './components/cost-management/expenses-payable/expenses-payable.component';
import { PaymentOrderComponent } from './components/payment-order/payment-order.component';
import { ReceiptOrderComponent } from './components/receipt-order/receipt-order.component';
import { VoucherManagementComponent } from './components/voucher-management/voucher-management.component';
import { VoucherSummaryComponent } from './components/voucher-summary/voucher-summary.component';
const ROUTESCOMPONENTS = [
FreightAccountComponent,
@ -35,7 +37,9 @@ const ROUTESCOMPONENTS = [
ExpensesReceivableComponent,
ExpensesPayableComponent,
PaymentOrderComponent,
ReceiptOrderComponent
ReceiptOrderComponent,
VoucherManagementComponent,
VoucherSummaryComponent
];
const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, SettingFinancialComponent, ClearingModalComponent];

View File

@ -122,7 +122,7 @@ export class ETCBlacklistComponent implements OnInit {
return false;
}
const ids = com.selectedData.map(node => node.carId);
this.service.request(this.service.$api_save_etc_shipper, { carIds: ids }).subscribe(res => {
this.service.request(this.service.$api_save_etc_cart, { carIds: ids }).subscribe(res => {
if (res) {
this.service.msgSrv.success('添加成功');
modal.destroy();

View File

@ -22,16 +22,16 @@
<nz-card class="content-box" nzBordered>
<st #st [data]="service.$mock_url" [columns]="columns"
<st #st [data]="service.$api_get_invoice_record_page" [columns]="columns"
[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: '400px' }">
<ng-template st-row="call1No" let-item let-index="index" let-column="column">
张三<br>13812345678
{{item.driverName}}<br>{{item.driverTelephone}}
</ng-template>
<ng-template st-row="call12No" let-item let-index="index" let-column="column">
粤B88888<br>张三
{{item.licenseCarNo}}<br>{{item.licenseBelonging}}
</ng-template>
</st>
</nz-card>

View File

@ -74,21 +74,21 @@ export class ETCInvoicedListComponent implements OnInit {
hidden: true
}
},
orderSn: {
wayBillCode: {
type: 'string',
title: '运单号',
ui: {
autocomplete: 'off'
}
},
order2Sn: {
billCode: {
type: 'string',
title: '订单号',
ui: {
autocomplete: 'off'
}
},
order2S2n: {
billType: {
type: 'string',
title: '订单类型',
ui: {
@ -97,12 +97,12 @@ export class ETCInvoicedListComponent implements OnInit {
placeholder: '请选择'
}
},
receiveName: {
invoicingStatus: {
type: 'string',
title: '开票状态',
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
params: { dictKey: 'etc:invoicing:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
@ -110,7 +110,7 @@ export class ETCInvoicedListComponent implements OnInit {
},
default: ''
},
receiveName2: {
shipperId: {
type: 'string',
title: '托运人',
enum: [{ label: '全部', value: '' }],
@ -123,7 +123,7 @@ export class ETCInvoicedListComponent implements OnInit {
},
default: ''
},
ltdId: {
enterpriseInfoId: {
type: 'string',
title: '网络货运人',
ui: {
@ -143,19 +143,19 @@ export class ETCInvoicedListComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '运单号', index: 'no' },
{ title: '订单号', index: 'no' },
{ title: '开票状态', index: 'callNo' },
{ title: '订单类型', index: 'callNo' },
{ title: '装货地', index: 'callNo' },
{ title: '卸货地', index: 'callNo' },
{ title: '运单号', index: 'wayBillCode' },
{ title: '订单号', index: 'billCode' },
{ title: '开票状态', index: 'invoicingStatus', type: 'enum', enum: { '0': '待开票', '1': '开票中', '2': '已开票', '3': '开票失败' } },
{ title: '订单类型', index: 'billType' },
{ title: '装货地', index: 'loadingPlace' },
{ title: '卸货地', index: 'dischargePlace' },
{ title: '司机信息', render: 'call1No' },
{ title: '车辆信息', render: 'call12No' },
{ title: '托运人', index: 'callNo' },
{ title: '网络货运人', index: 'callNo' },
{ title: '开票金额', index: 'callNo' },
{ title: '开票张数', index: 'callNo' },
{ title: '申请时间', index: 'updatedAt', type: 'date' },
{ title: '托运人', index: 'shipperAppUserName' },
{ title: '网络货运人', index: 'enterpriseInfoName' },
{ title: '开票金额', index: 'invoicingAmount' },
{ title: '开票张数', index: 'invoicingNumber' },
{ title: '申请时间', index: 'orderReceivingTime', type: 'date' },
{
title: '操作',
buttons: [

View File

@ -18,7 +18,7 @@
</div>
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<se label="销售方" required>
{{headerInfo?.hrto}}
{{headerInfo?.hrtoName}}
</se>
<se label="发票号" required>
{{headerInfo?.invoiceno}}

View File

@ -212,16 +212,16 @@ export class InputInvoiceComponent implements OnInit {
return [
{ title: '', index: 'key', type: 'checkbox' },
{ title: '收票单号', index: 'inpinvcode', type: 'link' },
{ title: '网络货运人', index: 'ltdid' },
{ title: '网络货运人', index: 'ltdName' },
{ title: '发票日期', index: 'invdate', type: 'date' },
{ title: '发票号', index: 'invoiceno' },
{ title: '发票金额', index: 'invmoney' },
{ title: '税额', index: 'invtax' },
{ title: '发票类型', index: 'invtype' },
{ title: '销售方', index: 'hrto' },
{ title: '销售方', index: 'hrtoName' },
{ title: '创建时间', index: 'createtime', type: 'date' },
{ title: '创建人', index: 'createbyname' },
{ title: '收票状态', index: 'sts' },
{ title: '收票状态', index: 'stsLabel' },
{
title: '操作',
buttons: [

View File

@ -47,6 +47,8 @@
</div>
<button nz-button (click)="this.batchRequested()">开票</button>
<button nz-button (click)="this.rejectAction(selectedRows)">驳回</button>
<button nz-button (click)="changePice(selectedRows)">修改地址</button>
<button nz-button (click)="printOrder(selectedRows)">打印面单</button>
</div>
</ng-template>

View File

@ -6,6 +6,7 @@ import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/fo
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { TicketService } from '../../services/ticket.service';
import { PrintOrderModalComponent } from './print-order-modal/print-order-modal.component';
import { RequestedInvoiceModalComponent } from './requested-invoice-modal/requested-invoice-modal.component';
@Component({
@ -83,6 +84,51 @@ export class InvoiceRequestedComponent implements OnInit {
});
}
changePice(item: any[]) {
const modal = this.nzModalService.create({
nzTitle: '驳回',
nzContent: this.rejectModal,
nzFooter: [
{
label: '拒绝',
type: 'default',
onClick: () => {
modal.destroy();
}
},
{
label: '通过',
type: 'primary',
onClick: () => {
modal.destroy();
}
}
]
});
modal.afterClose.subscribe(res => {
this.st.load();
});
}
printOrder(item: any[]) {
if (this.selectedRows?.length <= 0) {
this.service.msgSrv.warning('请选择订单');
return;
}
const modal = this.nzModalService.create({
nzTitle: '打印面单',
nzContent: PrintOrderModalComponent,
nzWidth: 650,
nzComponentParams: { vatappcodes: this.selectedRows.map(item => item.vatappcode) },
nzFooter: null
});
modal.afterClose.subscribe(res => {
if (res) {
this.st.load();
}
});
}
showReason(item: any) {
const modal = this.nzModalService.create({
nzTitle: '查看原因',
@ -117,12 +163,10 @@ export class InvoiceRequestedComponent implements OnInit {
// id: this.id
};
this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => {
console.log(res);
if (res) {
this.service.msgSrv.success('开票成功!');
modal.destroy();
} else {
this.service.msgSrv.error(res?.msg);
this.st.load(1);
}
});
}
@ -139,6 +183,7 @@ export class InvoiceRequestedComponent implements OnInit {
if (res) {
this.service.msgSrv.success('开票成功!');
modal.destroy();
this.st.load(1);
}
});
}
@ -318,6 +363,7 @@ export class InvoiceRequestedComponent implements OnInit {
{ title: '其他要求', index: 'otherremarks', width: 100 },
{ title: '申请人', index: 'applyName', width: 90 },
{ title: '申请时间', index: 'applyTime', type: 'date', width: 150 },
{ title: '快递是否下单成功', index: 'expressHSts', width: 150, type: 'enum', enum: { true: '是', false: '否' } },
{
title: '操作',
width: 150,

View File

@ -0,0 +1,48 @@
<div nz-row class="statistics-box">
<div nz-col nzSpan="24" se-container [labelWidth]="100" col="1">
<se label="打印发票" required>
<nz-radio-group [(ngModel)]="type">
<label nz-radio [nzValue]="1">分批下单</label>
<label nz-radio [nzValue]="2">汇总下单</label>
</nz-radio-group>
</se>
<se>
{{type===1?'分批下单系统会根据网络货运人、货主以及收件地址自动拆分成多个包裹下单':'汇总下单系统会将所选申请单汇总成一个包裹下单'}}
</se>
<ng-container *ngIf="type===2">
<se label="收件地址" required>
<nz-select [(ngModel)]="data.rcontactInfo" [nzCustomTemplate]="rcontactInfosData">
<nz-option [nzValue]="item" nzLabel="Jack" *ngFor="let item of rcontactInfos"
[nzCustomContent]="true">
{{item.contact}} &nbsp; &nbsp;&nbsp; {{item.tel}}<br />
{{item.province}} {{item.city}} {{item.county}} {{item.address}}
</nz-option>
</nz-select>
<ng-template #rcontactInfosData>
{{data.rcontactInfo.contact}} &nbsp; &nbsp;&nbsp; {{data.rcontactInfo.tel}}<br />
{{data.rcontactInfo.province}} {{data.rcontactInfo.city}} {{data.rcontactInfo.county}}
{{data.rcontactInfo.address}}
</ng-template>
</se>
<se label="寄件地址" required>
<nz-select [(ngModel)]="data.scontactInfo" [nzCustomTemplate]="scontactInfosData">
<nz-option [nzValue]="item" nzLabel="Jack" *ngFor="let item of scontactInfos"
[nzCustomContent]="true">
{{item.contact}} &nbsp; &nbsp;&nbsp; {{item.tel}}<br />
{{item.province}} {{item.city}} {{item.county}} {{item.address}}
</nz-option>
</nz-select>
<ng-template #scontactInfosData>
{{data.scontactInfo.contact}} &nbsp; &nbsp;&nbsp; {{data.scontactInfo.tel}}<br />
{{data.scontactInfo.province}} {{data.scontactInfo.city}} {{data.scontactInfo.county}}
{{data.scontactInfo.address}}
</ng-template>
</se>
</ng-container>
</div>
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">取消</button>
<button nz-button type="button" nzType="primary" (click)="sure()">保存</button>
</div>

View File

@ -0,0 +1,7 @@
nz-select-top-control {
height: 65px !important;
}
cdk-virtual-scroll-viewport {
height: 100px !important;
}

View File

@ -0,0 +1,76 @@
import { Component, Input, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { map } from 'rxjs/operators';
import { TicketService } from '../../../services/ticket.service';
@Component({
selector: 'app-print-order-modal',
templateUrl: './print-order-modal.component.html',
styleUrls: ['./print-order-modal.component.less'],
encapsulation: ViewEncapsulation.None
})
export class PrintOrderModalComponent implements OnInit {
data: any = {};
type = 1;
rcontactInfos: any[] = [];
scontactInfos: any[] = [];
@Input()
vatappcodes: string[] = [];
constructor(private modal: NzModalRef, public msgSrv: NzMessageService, public service: TicketService) {}
ngOnInit(): void {
this.loadAddress();
}
loadAddress() {
this.service.request(this.service.$api_get_order_summary_path, this.vatappcodes).subscribe(res => {
if (res) {
this.rcontactInfos = res.rcontactInfos || [];
this.scontactInfos = res.scontactInfos || [];
}
});
}
sure() {
console.log(this.data);
if (this.type === 1) {
this.service.request(this.service.$api_create_express, this.vatappcodes).subscribe(res => {
if (res) {
this.service.msgSrv.success('操作成功');
this.modal.destroy(true);
}
});
} else {
if (!this.data.rcontactInfo || !this.data.scontactInfo) {
this.service.msgSrv.warning('请选择收件地址和寄件地');
return;
}
const params = {
rcontactInfo: this.data.rcontactInfo,
ltdId: this.data.scontactInfo.ltdId,
shipperId: this.data.scontactInfo.shipperId,
vatappcodes: this.vatappcodes,
scontactInfo: this.data.scontactInfo
};
delete this.data.scontactInfo.ltdId;
delete this.data.scontactInfo.shipperId;
delete this.data.scontactInfo.id;
this.service.request(this.service.$api_get_order_summary, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('操作成功');
this.modal.destroy(true);
}
});
}
}
close() {
this.modal.destroy();
}
}

View File

@ -27,6 +27,12 @@ export class TicketService extends ShipperBaseService {
$api_ficoVatinvHList = '/api/fcc/ficoVatinvH/ficoVatinvHList';
// 运营端销票处理-订单明细页面
$api_ficoVatinvDetailAll = '/api/fcc/ficoVatinvH/ficoVatinvDetailAll';
// 获取汇总下单路径
$api_get_order_summary_path = '/api/fcc/ficoExpressH/getSummaryOrderAddress';
// 新建快递单
$api_create_express = '/api/fcc/ficoExpressH/save';
// 获取汇总下单
$api_get_order_summary = '/api/fcc/ficoExpressH/summaryOrder';
// 已开发票查询
$api_get_invoice_page = '/api/fcc/ficoVatinvH/list/page';
@ -66,11 +72,13 @@ export class TicketService extends ShipperBaseService {
// ETC申请开票界面查询
$api_get_apply_invoice_page = '/api/sdc/invoiceEtcOperate/list/listEtcApplyPageList';
// ETC开票记录界面查询
$api_get_invoice_record_page = '/api/sdc/invoiceEtcOperate/list/listEtcRecordPageList';
// 进项发票查询
$api_get_input_invoice_page = '/api/fcc/ficoInpinvH/getListPage';
// 根据ID获取进项发票详情
$api_get_input_invoice_header = '/api/fcc/ficoInpinvH/get';
$api_get_input_invoice_header = '/api/fcc/ficoInpinvH/getFicoInpinvHByid';
// 查询进项发票明细
$api_get_input_invoice_detail_page = '/api/fcc/ficoInpinvL/list/page';

View File

@ -22,6 +22,7 @@ import { InputInvoiceDetailComponent } from './components/input-invoice/input-in
import { AddCollectionInvoiceModalComponent } from './components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
import { EditCollectionInvoiceComponent } from './components/input-invoice/edit-collection-invoice/edit-collection-invoice.component';
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';
const COMPONENTS: any = [
ETCInvoicedListComponent,
@ -48,7 +49,7 @@ const NOTROUTECOMPONENTS: any = [
AddCostDetailComponent
];
@NgModule({
declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS],
declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS, PrintOrderModalComponent],
imports: [CommonModule, TicketManagementRoutingModule, SharedModule]
})
export class TicketManagementModule {}

View File

@ -233,6 +233,14 @@
"hide": true,
"link": "/financial-management/cost-management/detail/:id"
},
{
"text": "凭证管理",
"link": "/financial-management/voucher-management"
},
{
"text": "凭证汇总",
"link": "/financial-management/voucher-summary"
},
{
"text": "应收费用单",
"hide": true,