车辆对接
This commit is contained in:
		| @ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-27 14:08:49 | ||||
|  * @LastEditTime: 2021-12-30 14:15:22 | ||||
|  * @LastEditTime: 2021-12-30 15:44:54 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\ticket-management\components\cancellation-invoice\cancellation-invoice.component.html | ||||
| @ -30,10 +30,11 @@ | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card class="content-box" nzBordered> | ||||
|     <nz-tabset [nzTabBarExtraContent]="extraTemplate"> | ||||
|     <nz-tabset [nzTabBarExtraContent]="extraTemplate" (nzSelectedIndexChange)="selectChange($event)"> | ||||
|         <nz-tab nzTitle="全部"></nz-tab> | ||||
|         <nz-tab nzTitle="待处理"></nz-tab> | ||||
|         <nz-tab nzTitle="待确认"></nz-tab> | ||||
|         <nz-tab nzTitle="全部"></nz-tab> | ||||
|         <nz-tab nzTitle="已确认"></nz-tab> | ||||
|     </nz-tabset> | ||||
|     <ng-template #extraTemplate> | ||||
|         <div class="d-flex align-items-center"> | ||||
| @ -50,11 +51,20 @@ | ||||
|     </ng-template> | ||||
|  | ||||
|  | ||||
|     <st #st [data]="service.$api_ficoVatinvHList" [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 | ||||
|     #st | ||||
|     size="small" | ||||
|     [bordered]="true" | ||||
|     [scroll]="{ x: '2000px' }" | ||||
|     [data]="service.$api_ficoVatinvHList" | ||||
|     [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] }" | ||||
|     [loadingDelay]="500" | ||||
|     [loading]="service.http.loading" | ||||
|     > | ||||
|  | ||||
|         <ng-template st-row="vatinvcode" let-item let-index="index" let-column="column"> | ||||
|             {{ item.vatinvcode }} <br>  | ||||
|             <label class="text-primary" *ngIf="item.sts == '1'">待处理</label> | ||||
|  | ||||
| @ -21,7 +21,7 @@ export class CancellationInvoiceComponent implements OnInit { | ||||
|   requestedModal!: any; | ||||
|   columns: STColumn[] = this.initST(); | ||||
|   searchSchema: SFSchema = this.initSF(); | ||||
|  | ||||
|   resourceStatus = '' | ||||
|   _$expand = false; | ||||
|  | ||||
|   selectedRows: any[] = []; | ||||
| @ -30,22 +30,34 @@ export class CancellationInvoiceComponent implements OnInit { | ||||
|  | ||||
|   ngOnInit(): void {} | ||||
|  | ||||
|   beforeReq = (requestOptions: STRequestOptions) => { | ||||
|     if (this.sf) { | ||||
|       Object.assign(requestOptions.body, { ...this.sf.value }); | ||||
|   get reqParams()  { | ||||
|     // if (this.sf) { | ||||
|     //   Object.assign(requestOptions.body, { | ||||
|     //     ...this.sf.value, | ||||
|     //     sts: this?.resourceStatus, | ||||
|     //     createTime: { | ||||
|     //       start: this.sf.value.createTime?.[0] || null, | ||||
|     //       end: this.sf.value.createTime?.[1] || null | ||||
|     //     } | ||||
|     //   }); | ||||
|     // } | ||||
|     const a:any = {}; | ||||
|     if(this.resourceStatus) { | ||||
|       a.sts = this.resourceStatus  | ||||
|     } | ||||
|     return requestOptions; | ||||
|     return { | ||||
|       ...a, | ||||
|       ...this.sf?.value, | ||||
|     }; | ||||
|   }; | ||||
|  | ||||
|   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; | ||||
|     } | ||||
|   selectChange(e: any) { | ||||
|     console.log(e) | ||||
|     this.resourceStatus = e; | ||||
|     this.initST(); | ||||
|     setTimeout(() => { | ||||
|       this.st.load(); | ||||
|     }, 500); | ||||
|   } | ||||
|  | ||||
|   approval(): void {} | ||||
|  | ||||
|   add(): void {} | ||||
| @ -241,7 +253,7 @@ export class CancellationInvoiceComponent implements OnInit { | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '查看明细', | ||||
|             click: item => this.router.navigate(['ticket/cancellation-invoice/detail/1'], { queryParams: { type: 1 } }) | ||||
|             click: item => this.router.navigate(['ticket/cancellation-invoice/detail/' + item.id], { queryParams: { type: 1 } }) | ||||
|           }, | ||||
|           { | ||||
|             text: '手工开票', | ||||
|  | ||||
| @ -88,8 +88,8 @@ | ||||
|  | ||||
| <nz-card class="content-box" nzBordered> | ||||
|     <div class="d-flex align-items-center mb-md"> | ||||
|         <button nz-button (click)="openRequestedModal()">全部开票</button> | ||||
|         <button nz-button (click)="openRequestedModal()">开票</button> | ||||
|         <button nz-button (click)="openRequestedModal('1')">全部开票</button> | ||||
|         <button nz-button (click)="openRequestedModal('2')">开票</button> | ||||
|         <button nz-button (click)="removeOrder()">移除</button> | ||||
|         <div class="ml-md"> | ||||
|             已选择 | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; | ||||
| import { ActivatedRoute, Router } from '@angular/router'; | ||||
| import { ActivatedRoute, Router, Params } from '@angular/router'; | ||||
| import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; | ||||
| import { SFComponent, SFSchema, SFDateWidgetSchema, SFTextWidgetSchema } from '@delon/form'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| @ -70,16 +70,34 @@ export class InvoiceRequestedDetailComponent implements OnInit { | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   openRequestedModal() { | ||||
|   openRequestedModal(status: any) { | ||||
|     if(status === '2' && this.selectedRows.length == 0) { | ||||
|       this.service.msgSrv.warning('请选择订单!') | ||||
|       return | ||||
|     } | ||||
|     console.log(this.selectedRows) | ||||
|     const modal = this.nzModalService.create({ | ||||
|       nzTitle: '开票', | ||||
|       nzContent: RequestedDetailComponent, | ||||
|       nzWidth: 800, | ||||
|       nzComponentParams: { | ||||
|         i: this.selectedRows, | ||||
|         status: status, | ||||
|         Id: this.id | ||||
|        }, | ||||
|       nzFooter: [ | ||||
|         { | ||||
|           type: 'default', | ||||
|           label: '手工处理', | ||||
|           onClick: () => { | ||||
|             console.log('11111') | ||||
|             const params = { | ||||
|               ficoVatappBillVOList: this.selectedRows, | ||||
|               id: this.id | ||||
|             } | ||||
|             this.service.request(this.service.$api_get_applyFicoVatinv, params).subscribe((res: any) => { | ||||
|               console.log(res) | ||||
|             }) | ||||
|             modal.destroy(); | ||||
|           } | ||||
|         }, | ||||
|  | ||||
| @ -122,13 +122,34 @@ export class InvoiceRequestedComponent implements OnInit { | ||||
|           type: 'default', | ||||
|           label: '手工处理', | ||||
|           onClick: () => { | ||||
|             console.log('11111') | ||||
|             const params = { | ||||
|               ficoVatappBillVOList: this.selectedRows, | ||||
|               // id: this.id | ||||
|             } | ||||
|             this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => { | ||||
|               console.log(res) | ||||
|               if(res) { | ||||
|                 this.service.msgSrv.success('开票成功!') | ||||
|               } else { | ||||
|                 this.service.msgSrv.error(res?.msg) | ||||
|               } | ||||
|             }) | ||||
|             modal.destroy(); | ||||
|  | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           type: 'primary', | ||||
|           label: '自动开票', | ||||
|           onClick: () => { | ||||
|             const params = { | ||||
|               ficoVatappBillVOList: this.selectedRows, | ||||
|               // id: this.id | ||||
|             } | ||||
|             this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => { | ||||
|               console.log(res) | ||||
|             }) | ||||
|             modal.destroy(); | ||||
|           } | ||||
|         } | ||||
|  | ||||
| @ -1,48 +1,53 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-23 16:50:17 | ||||
|  * @LastEditTime: 2021-12-30 15:07:22 | ||||
|  * @LastEditors: your name | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\ticket-management\components\invoice-requested\requested-detail\requested-detail.component.html | ||||
| --> | ||||
| <div nz-row nzGutter="8" class="statistics-box"> | ||||
|     <div nz-col nzSpan="12" se-container [labelWidth]="100" col="1"> | ||||
|         <se label="购买方"> | ||||
|             茅台股份有限公司 | ||||
|             {{headerInfo?.projectName}} | ||||
|         </se> | ||||
|         <se label="纳税号"> | ||||
|             912301046656930913 | ||||
|             {{headerInfo?.taxNumber}} | ||||
|         </se> | ||||
|         <se label="地址"> | ||||
|             贵州省贵阳市 | ||||
|             {{headerInfo?.registerAddr}} | ||||
|         </se> | ||||
|         <se label="电话"> | ||||
|             075588393198 | ||||
|             {{headerInfo?.registerPhone}} | ||||
|         </se> | ||||
|         <se label="开户行"> | ||||
|             中国工商银行股份有限公司哈贵阳支行 | ||||
|             {{headerInfo?.bankName}} | ||||
|         </se> | ||||
|         <se label="银行账户"> | ||||
|             3500044119068126788 | ||||
|             {{headerInfo?.bankAccount}} | ||||
|         </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> | ||||
|             {{headerInfo?.vatremarks}} | ||||
|         </se> | ||||
|     </div> | ||||
|     <div nz-col nzSpan="12" se-container [labelWidth]="100" col="1"> | ||||
|         <se label="销售方"> | ||||
|             天津怡亚通物流科技有限公司 | ||||
|             {{headerInfo?.ltdidName}} | ||||
|         </se> | ||||
|         <se label="订单数"> | ||||
|             100笔 | ||||
|             {{headerInfo?.vatinvBillNum}} | ||||
|         </se> | ||||
|         <se label="开票金额"> | ||||
|             300,000.00元 | ||||
|             {{headerInfo?.vatinvHAmount}} | ||||
|         </se> | ||||
|         <se label="服务名称"> | ||||
|             运输服务费 | ||||
|             {{headerInfo?.vatname}} | ||||
|         </se> | ||||
|         <se label="销货清单"> | ||||
|             需要 | ||||
|             {{headerInfo?.isdetail}} | ||||
|         </se> | ||||
|         <se label="其他要求"> | ||||
|             单位按吨 | ||||
|             {{headerInfo?.otherremarks}} | ||||
|         </se> | ||||
|  | ||||
|     </div> | ||||
|  | ||||
| @ -1,4 +1,14 @@ | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-23 16:50:17 | ||||
|  * @LastEditTime: 2021-12-30 15:07:42 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\ticket-management\components\invoice-requested\requested-detail\requested-detail.component.ts | ||||
|  */ | ||||
| import { Component, OnInit } from '@angular/core'; | ||||
| import { TicketService } from '../../../services/ticket.service'; | ||||
|  | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-requested-detail', | ||||
| @ -6,11 +16,24 @@ import { Component, OnInit } from '@angular/core'; | ||||
|   styleUrls: ['./requested-detail.component.less'] | ||||
| }) | ||||
| export class RequestedDetailComponent implements OnInit { | ||||
|  | ||||
|   constructor() { } | ||||
|   i: any; | ||||
|   status: any; | ||||
|   Id: any; | ||||
|   headerInfo: any; | ||||
|   constructor( | ||||
|     public service: TicketService, | ||||
|   ) { } | ||||
|  | ||||
|   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; | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user