edit
This commit is contained in:
		| @ -114,8 +114,9 @@ | ||||
|       <st #invoiceST [data]="service.$api_get_invoice_details" [columns]="invoiceColumns" size="small" bordered="true" | ||||
|         [page]="{}" [req]="{ process: beforeReq }" [loading]="false" [scroll]="{ x: '1200px', y: '250px' }"> | ||||
|         <ng-template st-row="vatname" let-item let-index="index"> | ||||
|           <nz-select *ngIf="isEdit" [ngModel]="item.owner" | ||||
|           <nz-select *ngIf="isEdit" [ngModel]="item.vatname" | ||||
|             (ngModelChange)="invoiceST.setRow(index, { vatname: $event })" style="width: 100%"> | ||||
|             <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of services"></nz-option> | ||||
|           </nz-select> | ||||
|           <ng-container *ngIf="!isEdit">{{ item.vatname }}</ng-container> | ||||
|         </ng-template> | ||||
|  | ||||
| @ -42,6 +42,8 @@ export class InvoiceDetailComponent implements OnInit { | ||||
|   type: any = 1; | ||||
|  | ||||
|   selectedIndex = 0; | ||||
|  | ||||
|   services: any[] = []; | ||||
|   constructor(public service: TicketService, private route: ActivatedRoute) { | ||||
|     this.isCanEdit = route.snapshot.queryParams.type === '1'; | ||||
|     const expressno = route.snapshot.queryParams.expressno; | ||||
| @ -54,7 +56,9 @@ export class InvoiceDetailComponent implements OnInit { | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ngOnInit(): void {} | ||||
|   ngOnInit(): void { | ||||
|     this.getDictByKey(); | ||||
|   } | ||||
|  | ||||
|   beforeReq = (requestOptions: STRequestOptions) => { | ||||
|     Object.assign(requestOptions.body, { vatinvHId: this.id }); | ||||
| @ -67,6 +71,12 @@ export class InvoiceDetailComponent implements OnInit { | ||||
|     return requestOptions; | ||||
|   }; | ||||
|  | ||||
|   getDictByKey() { | ||||
|     this.service.request('/api/mdc/pbc/dictItems/getDictValue', { dictKey: 'invoice:service:type' }).subscribe(res => { | ||||
|       this.services = res; | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   loadInvoiceHeader(id: string) { | ||||
|     this.service.request(this.service.$api_get_invoice_header_detail, { id }).subscribe(res => { | ||||
|       if (res) { | ||||
| @ -87,7 +97,23 @@ export class InvoiceDetailComponent implements OnInit { | ||||
|   } | ||||
|  | ||||
|   saveInvoices() { | ||||
|     this.isEdit = false; | ||||
|     const list = this.invoiceST._data.map(item => { | ||||
|       const rs = { ...item }; | ||||
|       delete rs._values; | ||||
|       return rs; | ||||
|     }); | ||||
|     this.service | ||||
|       .request(this.service.$api_update_evatinh, { | ||||
|         id: this.id, | ||||
|         updatEvatinvDetailDTO: list | ||||
|       }) | ||||
|       .subscribe(res => { | ||||
|         if (res) { | ||||
|           this.service.msgSrv.success('修改成功'); | ||||
|           this.invoiceST.load(1); | ||||
|           this.isEdit = false; | ||||
|         } | ||||
|       }); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|  | ||||
| @ -420,7 +420,7 @@ export class InvoiceRequestedComponent { | ||||
|     return [ | ||||
|       { title: '', index: 'key', type: 'checkbox' }, | ||||
|       { title: '申请编号', render: 'vatappcode', width: 190 }, | ||||
|       { title: '发票类型', index: 'vatapptypeLable', width: 140 }, | ||||
|       { title: '发票类型', index: 'vatapptypeLabel', width: 140 }, | ||||
|       { title: '网络货运人', index: 'ltdName', width: 170 }, | ||||
|       { title: '货主名称', index: 'artoName', width: 170 }, | ||||
|       { title: '订单数', index: 'ordlines', width: 90 }, | ||||
| @ -459,7 +459,7 @@ export class InvoiceRequestedComponent { | ||||
|           params: ({ record }) => ({ value: record.invoicedMoney }) | ||||
|         } | ||||
|       }, | ||||
|       { title: '已开票张数', index: 'invoicedNum', width: 160 }, | ||||
|       { title: '已开票张数', className: 'text-right', index: 'invoicedNum', width: 160 }, | ||||
|       { title: '开户行', index: 'bankName', width: 160 }, | ||||
|       { title: '银行账户', index: 'bankAccount', width: 140 }, | ||||
|       { title: '注册地址', index: 'registerAddr', width: 140 }, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user