票务
This commit is contained in:
		| @ -0,0 +1,61 @@ | ||||
| <page-header-wrapper [title]="'开票订单明细'" [logo]="logo"> | ||||
|     <ng-template #logo> | ||||
|         <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()"> | ||||
|             <i nz-icon nzType="left" nzTheme="outline"></i> | ||||
|         </button> | ||||
|     </ng-template> | ||||
| </page-header-wrapper> | ||||
|  | ||||
| <nz-card> | ||||
|     <nz-row [nzGutter]="16"> | ||||
|         <nz-col [nzXl]="4" [nzLg]="8" [nzSm]="12"> | ||||
|             <nz-statistic nzValue="05101010" [nzTitle]="'发票号码'" [nzValueStyle]="{'font-size':'21px'}"> | ||||
|             </nz-statistic> | ||||
|         </nz-col> | ||||
|         <nz-col [nzXl]="4" [nzLg]="8" [nzSm]="12"> | ||||
|             <nz-statistic nzValue="100000.00" [nzTitle]="'开票金额'" [nzValueStyle]="{'font-size':'21px'}"> | ||||
|             </nz-statistic> | ||||
|         </nz-col> | ||||
|         <nz-col [nzXl]="3" [nzLg]="8" [nzSm]="12"> | ||||
|             <nz-statistic nzValue="20" [nzTitle]="'订单数'" [nzValueStyle]="{'font-size':'21px'}"></nz-statistic> | ||||
|         </nz-col> | ||||
|         <nz-col [nzXl]="3" [nzLg]="8" [nzSm]="12"> | ||||
|             <nz-statistic nzValue="2021-10-11" [nzTitle]="'开票日期'" [nzValueStyle]="{'font-size':'21px'}"></nz-statistic> | ||||
|         </nz-col> | ||||
|         <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12"> | ||||
|             <nz-statistic nzValue="茅台集团股份有限公司" [nzTitle]="'托运人'" [nzValueStyle]="{'font-size':'21px'}"></nz-statistic> | ||||
|         </nz-col> | ||||
|         <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="18"> | ||||
|             <nz-statistic nzValue="天津怡亚通物流科技有限公司" [nzTitle]="'开票方'" [nzValueStyle]="{'font-size':'21px'}"> | ||||
|             </nz-statistic> | ||||
|         </nz-col> | ||||
|     </nz-row> | ||||
| </nz-card> | ||||
|  | ||||
| <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: 90,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.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> | ||||
|     <st #st [data]="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> | ||||
| </nz-card> | ||||
| @ -0,0 +1,24 @@ | ||||
| :host::ng-deep { | ||||
|     .search-box { | ||||
|         .ant-card-body { | ||||
|             padding-bottom: 18px; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     .content-box { | ||||
|         .ant-card-body { | ||||
|             padding-top: 16px; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| .expend-options { | ||||
|     margin-top: 0px; | ||||
| } | ||||
|  | ||||
| @media (min-width: 990px) { | ||||
|     .expend-options { | ||||
|         margin-top: -40px; | ||||
|     } | ||||
|  | ||||
| } | ||||
| @ -0,0 +1,121 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { Router } from '@angular/router'; | ||||
| import { STComponent, STColumn, STChange } from '@delon/abc/st'; | ||||
| import { SFComponent, SFSchema } from '@delon/form'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { TicketService } from '../../../services/system.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-invoiced-list-detail', | ||||
|   templateUrl: './invoiced-list-detail.component.html', | ||||
|   styleUrls: ['./invoiced-list-detail.component.less'] | ||||
| }) | ||||
| export class InvoicedListDetailComponent implements OnInit { | ||||
|   url = `/rule?_allow_anonymous=true`; | ||||
|   @ViewChild('st', { static: true }) | ||||
|   st!: STComponent; | ||||
|   @ViewChild('sf', { static: false }) | ||||
|   sf!: SFComponent; | ||||
|   columns: STColumn[] = [ | ||||
|     { title: '订单号', index: 'no' }, | ||||
|     { title: '外部订单号', index: 'callNo' }, | ||||
|     { title: '装货地', index: 'callNo' }, | ||||
|     { title: '卸货地', index: 'callNo' }, | ||||
|     { title: '货物名称', index: 'callNo' }, | ||||
|     { title: '重量/体积', index: 'callNo' }, | ||||
|     { title: '开票金额', index: 'callNo' }, | ||||
|     { title: '总费用', index: 'callNo' }, | ||||
|     { title: '基础运费', index: 'callNo' }, | ||||
|     { title: '附加费', index: 'callNo' }, | ||||
|   ]; | ||||
|   searchSchema: SFSchema = { | ||||
|     properties: { | ||||
|       expand: { | ||||
|         type: 'boolean', | ||||
|         ui: { | ||||
|           hidden: true | ||||
|         } | ||||
|       }, | ||||
|       orderSn: { | ||||
|         type: 'string', | ||||
|         title: '订单号', | ||||
|         ui: { | ||||
|           autocomplete: 'off' | ||||
|         } | ||||
|       }, | ||||
|       orderSn2: { | ||||
|         type: 'string', | ||||
|         title: '外部订单号', | ||||
|         ui: { | ||||
|           autocomplete: 'off' | ||||
|         } | ||||
|       }, | ||||
|       orderSn3: { | ||||
|         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); | ||||
|           }, | ||||
|           visibleIf: { | ||||
|             expand: (value: boolean) => value | ||||
|           } | ||||
|         }, | ||||
|         default: '' | ||||
|       } | ||||
|     } | ||||
|   }; | ||||
|  | ||||
|   reqParams = {}; | ||||
|   _$expand = false; | ||||
|   constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} | ||||
|  | ||||
|   ngOnInit(): void {} | ||||
|  | ||||
|   stChange(e: STChange): void { | ||||
|     switch (e.type) { | ||||
|       case 'filter': | ||||
|         this.st.load(); | ||||
|         break; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   goBack() { | ||||
|     history.go(-1); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 重置表单 | ||||
|    */ | ||||
|   resetSF() { | ||||
|     this.sf.reset(); | ||||
|     this._$expand = false; | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 伸缩查询条件 | ||||
|    */ | ||||
|   expandToggle() { | ||||
|     this._$expand = !this._$expand; | ||||
|     this.sf?.setValue('/expand', this._$expand); | ||||
|   } | ||||
| } | ||||
| @ -1 +1,72 @@ | ||||
| <p>invoiced-list 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: 90,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.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 (click)="this.editInvoice(null)">填写物流</button> | ||||
|         <button nz-button (click)="this.editInvoice(null)">作废发票</button> | ||||
|         <div class="ml-md"> | ||||
|             已选择 | ||||
|             <strong class="text-primary">{{ selectedRows.length }}</strong> 条数据   开票金额总计 <strong>{{ | ||||
|                 totalCallNo }}</strong> | ||||
|             <a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> | ||||
|         </div> | ||||
|     </div> | ||||
|  | ||||
|     <st #st [data]="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: '370px' }" (change)="stChange($event)"> | ||||
|         <ng-template st-row="logostics" let-item let-index="index"> | ||||
|             {{item.callNo}} | ||||
|             <a (click)="showlogosticsLogs(item)">查看物流</a> | ||||
|         </ng-template> | ||||
|  | ||||
|     </st> | ||||
| </nz-card> | ||||
|  | ||||
| <ng-template #logosticsModal> | ||||
|     <div nz-row nzGutter="8"> | ||||
|         <div nz-col nzSpan="24" se-container [labelWidth]="120"> | ||||
|             <se [col]="1" label="快递公司"> | ||||
|                 <nz-select nzPlaceHolder="请选择"> | ||||
|                     <nz-option nzValue="jack" nzLabel="Jack"></nz-option> | ||||
|                     <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option> | ||||
|                 </nz-select> | ||||
|             </se> | ||||
|             <se [col]="1" label="物流单号"> | ||||
|                 <input nz-input placeholder="请输入" /> | ||||
|             </se> | ||||
|         </div> | ||||
|     </div> | ||||
| </ng-template> | ||||
|  | ||||
| <ng-template #logosticsLogsModal> | ||||
|     <p class="mb-xl"> | ||||
|         顺丰快递:SF123456789 | ||||
|         <nz-tag [nzColor]="'#2db7f5'" class="ml-md">已签收</nz-tag> | ||||
|     </p> | ||||
|     <app-logistics-time-line></app-logistics-time-line> | ||||
| </ng-template> | ||||
| @ -0,0 +1,30 @@ | ||||
| :host::ng-deep { | ||||
|     .search-box { | ||||
|         .ant-card-body { | ||||
|             padding-bottom: 18px; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     .content-box { | ||||
|         .ant-card-body { | ||||
|             padding-top: 16px; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     nz-range-picker { | ||||
|         width: 100%; | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
| .expend-options { | ||||
|     margin-top: 0px; | ||||
| } | ||||
|  | ||||
|  | ||||
| @media (min-width: 1200px) { | ||||
|     .expend-options { | ||||
|         margin-top: -40px; | ||||
|     } | ||||
|  | ||||
| } | ||||
| @ -1,4 +1,9 @@ | ||||
| import { Component, OnInit } from '@angular/core'; | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { Router } from '@angular/router'; | ||||
| import { STComponent, STColumn, STChange } from '@delon/abc/st'; | ||||
| import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { TicketService } from '../../services/system.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-invoiced-list', | ||||
| @ -6,10 +11,185 @@ import { Component, OnInit } from '@angular/core'; | ||||
|   styleUrls: ['./invoiced-list.component.less'] | ||||
| }) | ||||
| export class InvoicedListComponent implements OnInit { | ||||
|   url = `/rule?_allow_anonymous=true`; | ||||
|   @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[] = [ | ||||
|     { 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' }, | ||||
|     { title: '快递信息', render: 'logostics' }, | ||||
|     { | ||||
|       title: '操作', | ||||
|       buttons: [ | ||||
|         { | ||||
|           text: '作废发票', | ||||
|           click: item => this.deletedInvoice(item) | ||||
|         }, | ||||
|         { | ||||
|           text: '预览发票', | ||||
|           click: item => this.routeTo(item) | ||||
|         }, | ||||
|         { | ||||
|           text: '填写物流', | ||||
|           click: item => this.editInvoice(item) | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|   ]; | ||||
|   searchSchema: SFSchema = { | ||||
|     properties: { | ||||
|       expand: { | ||||
|         type: 'boolean', | ||||
|         ui: { | ||||
|           hidden: true | ||||
|         } | ||||
|       }, | ||||
|       orderSn: { | ||||
|         type: 'string', | ||||
|         title: '发票号码', | ||||
|         ui: { | ||||
|           autocomplete: 'off' | ||||
|         } | ||||
|       }, | ||||
|       orderSn2: { | ||||
|         type: 'string', | ||||
|         title: '申请编号', | ||||
|         ui: { | ||||
|           autocomplete: 'off' | ||||
|         } | ||||
|       }, | ||||
|       createTime: { | ||||
|         title: '开票日期', | ||||
|         type: 'string', | ||||
|         ui: { | ||||
|           widget: 'date', | ||||
|           mode: 'range', | ||||
|           format: 'yyyy-MM-dd' | ||||
|         } as SFDateWidgetSchema | ||||
|       }, | ||||
|       receiveName: { | ||||
|         type: 'string', | ||||
|         title: '托运人', | ||||
|         enum: [{ label: '全部', value: '全部' }], | ||||
|         ui: { | ||||
|           widget: 'select', | ||||
|           placeholder: '请选择', | ||||
|           change: (i: any) => { | ||||
|             this.sf.value.receiveName = i; | ||||
|             this.sf?.setValue('/receiveName', i); | ||||
|           }, | ||||
|           visibleIf: { | ||||
|             expand: (value: boolean) => value | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|       receiveName2: { | ||||
|         type: 'string', | ||||
|         title: '无车承运人', | ||||
|         enum: [{ label: '全部', value: '全部' }], | ||||
|         ui: { | ||||
|           widget: 'select', | ||||
|           placeholder: '请选择', | ||||
|           change: (i: any) => { | ||||
|             this.sf.value.receiveName2 = i; | ||||
|             this.sf?.setValue('/receiveName2', i); | ||||
|           }, | ||||
|           visibleIf: { | ||||
|             expand: (value: boolean) => value | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   }; | ||||
|  | ||||
|   constructor() { } | ||||
|   reqParams = {}; | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|   _$expand = false; | ||||
|  | ||||
|   selectedRows: any[] = []; | ||||
|   totalCallNo = 0; | ||||
|   constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} | ||||
|  | ||||
|   ngOnInit(): void {} | ||||
|  | ||||
|   stChange(e: STChange): void { | ||||
|     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(); | ||||
|         break; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   approval(): void {} | ||||
|  | ||||
|   add(): void {} | ||||
|  | ||||
|   routeTo(item: any) { | ||||
|     this.router.navigate(['/ticket/invoice-list-detail/1']); | ||||
|   } | ||||
|  | ||||
|   delete(item: any) { | ||||
|     this.st.removeRow(item); | ||||
|   } | ||||
|  | ||||
|   editInvoice(item: any) { | ||||
|     const modal = this.nzModalService.create({ | ||||
|       nzTitle: '填写物流/修改物流', | ||||
|       nzContent: this.logosticsModal, | ||||
|       nzOnOk: () => {} | ||||
|     }); | ||||
|     modal.afterClose.subscribe(res => { | ||||
|       this.st.load(); | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   deletedInvoice(item: any) { | ||||
|     this.nzModalService.warning({ | ||||
|       nzTitle: '确定将所选发票作废?', | ||||
|       nzCancelText: '取消', | ||||
|       nzOnOk: () => {} | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   showlogosticsLogs(item: any) { | ||||
|     this.nzModalService.create({ | ||||
|       nzTitle: '查看物流', | ||||
|       nzWidth: 600, | ||||
|       nzContent: this.logosticsLogsModal, | ||||
|       nzFooter: [] | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 重置表单 | ||||
|    */ | ||||
|   resetSF() { | ||||
|     this.sf.reset(); | ||||
|     this._$expand = false; | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 伸缩查询条件 | ||||
|    */ | ||||
|   expandToggle() { | ||||
|     this._$expand = !this._$expand; | ||||
|     this.sf?.setValue('/expand', this._$expand); | ||||
|   } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user