dev-config

This commit is contained in:
Taric Xin
2021-12-23 15:35:45 +08:00
parent 716bbea97c
commit 6ee9324cdb
26 changed files with 609 additions and 265 deletions

View File

@ -6,58 +6,102 @@
</ng-template>
</page-header-wrapper>
<nz-card>
<nz-row [nzGutter]="16">
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="202101201020102012" [nzTitle]="'申请编号'" [nzValueStyle]="{'font-size':'21px'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="30000.00/100000.00" [nzTitle]="'已开/全部开票金额'" [nzValueStyle]="{'font-size':'21px'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="4" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="10/20" [nzTitle]="'已开/全部运单数'" [nzValueStyle]="{'font-size':'21px'}"></nz-statistic>
</nz-col>
<nz-col [nzXl]="5" [nzLg]="12" [nzSm]="12">
<nz-statistic nzValue="茅台集团股份有限公司" [nzTitle]="'托运人'" [nzValueStyle]="{'font-size':'21px'}"></nz-statistic>
</nz-col>
<nz-col [nzXl]="5" [nzLg]="12" [nzSm]="18">
<nz-statistic nzValue="天津怡亚通物流科技有限公司" [nzTitle]="'开票方'" [nzValueStyle]="{'font-size':'21px'}">
</nz-statistic>
</nz-col>
</nz-row>
<nz-card class="statistics-box">
<div nz-row nzGutter="8">
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="150" col="1">
<se label="网络货运人">
天津怡亚通物流科技有限公司
</se>
<se label="申请编号">
VP2021012010
</se>
<se label="已开/全部订单数">
50/100
</se>
<se label="已开/全部发票金额">
5000.00/10000.00
</se>
<se label="网络货运人">
2
</se>
</div>
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<se label="购买方">
茅台股份有限公司
</se>
<se label="纳税号">
912301046656930913
</se>
<se label="地址">
贵州省贵阳市
</se>
<se label="电话">
075588393198
</se>
<se label="开户行">
中国工商银行股份有限公司哈贵阳支行
</se>
<se label="银行账户">
3500044119068126788
</se>
</div>
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<se label="服务名称">
运输服务费
</se>
<se label="销货清单">
需要
</se>
<se label="其他要求">
单位按吨
</se>
<se label="票面备注">
<p style="margin-bottom: 0;margin-top: 5px;">起运地:广东省深圳市南山区</p>
<p style="margin-bottom: 0;">目的地:湖北省武汉市青山区</p>
<p style="margin-bottom: 0;">货物名称:钢材</p>
<p style="margin-bottom: 0;">车型车牌:高栏车 粤B36889</p>
</se>
</div>
</div>
</nz-card>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="6" [nzLg]="24" [nzMd]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
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 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">
<button nz-button>全部开票</button>
<button nz-button>开票</button>
<button nz-button (click)="openRequestedModal()">全部开票</button>
<button nz-button (click)="openRequestedModal()">开票</button>
<button nz-button (click)="removeOrder()">移除</button>
<div class="ml-md">
已选择
<strong class="text-primary">{{ selectedRows.length }}</strong> 条数据&nbsp;&nbsp; 开票金额总计 <strong>{{
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据&nbsp;&nbsp; 开票金额总计 <strong
class="text-red">{{
totalCallNo }}</strong>
<a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</div>
</div>
<st #st [data]="url" [columns]="columns"
<st #st [data]="service.$mock_url" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[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: '330px' }" (change)="stChange($event)"></st>
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '200px' }" (change)="stChange($event)"></st>
</nz-card>

View File

@ -10,4 +10,30 @@
padding-top: 16px;
}
}
.statistics-box {
.ant-form-item {
margin-bottom: 0;
.ant-form-item-control-input-content {
color: #f5222d;
}
}
}
}
.expend-options {
margin-top: 0px;
}
@media (min-width: 1200px) {
.expend-options {
max-width: 400px;
position : absolute;
right : 0;
bottom : 25px;
}
}

View File

@ -1,9 +1,10 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { SFComponent, SFSchema, SFDateWidgetSchema, SFTextWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { TicketService } from '../../../services/system.service';
import { TicketService } from '../../../services/ticket.service';
import { RequestedInvoiceModalComponent } from '../requested-invoice-modal/requested-invoice-modal.component';
@Component({
selector: 'app-invoice-requested-detail',
@ -11,68 +12,19 @@ import { TicketService } from '../../../services/system.service';
styleUrls: ['./invoice-requested-detail.component.less']
})
export class InvoiceRequestedDetailComponent implements OnInit {
url = `/rule?_allow_anonymous=true`;
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = [
{ title: '', index: 'key', type: 'checkbox' },
{ title: '运单号', index: 'no' },
{ title: '开票状态', index: 'callNo' },
{ title: '开票金额', index: 'callNo' },
{ title: '总费用', index: 'callNo' },
{ title: '基础运费', index: 'callNo' },
{ title: '附加费', index: 'callNo' },
{ title: '发票号码', index: 'callNo' },
{ title: '开票日期', index: 'updatedAt', type: 'date' }
];
searchSchema: SFSchema = {
properties: {
orderSn: {
type: 'string',
title: '运单号',
ui: {
autocomplete: 'off'
}
},
receiveName: {
type: 'string',
title: '开票状态',
enum: [
{ label: '全部', value: '' },
{ label: '待受理', value: '待受理' },
{ label: '待开票', value: '待开票' },
{ label: '开票中', value: '开票中' },
{ label: '已开票', value: '已开票' },
{ label: '已撤销', value: '已撤销' },
{ label: '已拒绝', value: '已拒绝' }
],
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName = i;
this.sf?.setValue('/receiveName', i);
}
},
default: ''
},
orderSn2: {
type: 'string',
title: '发票号码',
ui: {
placeholder: '请输入',
autocomplete: 'off'
}
}
}
};
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
reqParams = {};
detail: any = {};
selectedRows: any[] = [];
totalCallNo = 0;
_$expand = false;
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
@ -89,6 +41,43 @@ export class InvoiceRequestedDetailComponent implements OnInit {
}
}
openRequestedModal() {
const modal = this.nzModalService.create({
nzTitle: '开票',
nzContent: RequestedInvoiceModalComponent,
nzWidth: 800,
nzFooter: [
{
type: 'default',
label: '手工处理',
onClick: () => {
modal.destroy();
}
},
{
type: 'primary',
label: '自动开票',
onClick: () => {
modal.destroy();
}
}
]
});
}
removeOrder() {
if (this.selectedRows?.length <= 0) {
return;
}
this.nzModalService.warning({
nzTitle: '确定从当前批次中移除所选订单?',
nzContent: '移除后相关订单可以重新提交开票申请',
nzOnOk: () => {
console.log(this.selectedRows);
}
});
}
goBack() {
history.go(-1);
}
@ -99,4 +88,125 @@ export class InvoiceRequestedDetailComponent implements OnInit {
resetSF() {
this.sf.reset();
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
orderSn: {
type: 'string',
title: '订单号',
ui: {
placeholder: '请输入'
}
},
receiveName: {
type: 'string',
title: '开票状态',
enum: [
{ label: '全部', value: '' },
{ label: '待受理', value: '待受理' },
{ label: '待开票', value: '待开票' },
{ label: '开票中', value: '开票中' },
{ label: '已开票', value: '已开票' },
{ label: '已撤销', value: '已撤销' },
{ label: '已拒绝', value: '已拒绝' }
],
ui: {
widget: 'select',
placeholder: '请选择'
},
default: ''
},
orderSn2: {
type: 'string',
title: '发票号码',
ui: {
placeholder: '请输入'
}
},
receiveName2: {
type: 'string',
title: '订单类型',
enum: [{ label: '全部', value: '' }],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
},
orderS2n2: {
type: 'string',
title: '运司机',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
orderS22n2: {
type: 'string',
title: '车牌号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
receiveN2ame2: {
type: 'string',
title: '所属项目',
enum: [{ label: '全部', value: '' }],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
}
}
};
}
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: 100 },
{ title: '所属项目', index: 'callNo', width: 100 },
{ title: '订单类型', index: 'callNo', width: 100 },
{ title: '装货地', index: 'callNo', width: 90 },
{ title: '卸货地', index: 'callNo', width: 90 },
{ title: '货物信息', index: 'callNo', width: 100 },
{ title: '承运司机', index: 'callNo', width: 100 },
{ title: '申请金额', index: 'callNo', width: 100 },
{ title: '运输费', index: 'callNo', width: 90 },
{ title: '附加费', index: 'callNo', width: 90 },
{ title: '开票金额', index: 'callNo', width: 100 },
{ title: '税率', index: 'callNo', width: 90 },
{ title: '发票号码', index: 'callNo', width: 100 },
{ title: '开票日期', index: 'updatedAt', type: 'date', width: 150 }
];
}
}