dev-config
This commit is contained in:
		| @ -1,10 +1,10 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { Router } from '@angular/router'; | ||||
| import { STComponent, STColumn, STChange } from '@delon/abc/st'; | ||||
| import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; | ||||
| import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/form'; | ||||
| import { NzMessageService } from 'ng-zorro-antd/message'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { TicketService } from '../../services/system.service'; | ||||
| import { TicketService } from '../../services/ticket.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-invoice-requested', | ||||
| @ -19,125 +19,8 @@ export class InvoiceRequestedComponent implements OnInit { | ||||
|   sf!: SFComponent; | ||||
|   @ViewChild('auditModal', { static: false }) | ||||
|   auditModal!: any; | ||||
|   columns: STColumn[] = [ | ||||
|     { title: '', index: 'key', type: 'checkbox' }, | ||||
|     { title: '申请编号', index: 'no' }, | ||||
|     { title: '申请时间', index: 'updatedAt', type: 'date' }, | ||||
|     { 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' }, | ||||
|     { title: '备注', index: 'callNo' }, | ||||
|     { | ||||
|       title: '操作', | ||||
|       buttons: [ | ||||
|         { | ||||
|           text: '审核', | ||||
|           click: item => this.auditAction(item) | ||||
|         }, | ||||
|         { | ||||
|           text: '去开票', | ||||
|           click: item => this.routeTo(item) | ||||
|         }, | ||||
|         { | ||||
|           text: '查看原因', | ||||
|           click: item => this.showReason(item) | ||||
|         }, | ||||
|         { | ||||
|           text: '订单明细', | ||||
|           click: item => this.routeTo(item) | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|   ]; | ||||
|   searchSchema: SFSchema = { | ||||
|     properties: { | ||||
|       expand: { | ||||
|         type: 'boolean', | ||||
|         ui: { | ||||
|           hidden: true | ||||
|         } | ||||
|       }, | ||||
|       orderSn: { | ||||
|         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: '全部' }, | ||||
|           { label: '企业认证审核', value: '企业认证审核' }, | ||||
|           { label: '企业管理员审核', value: '企业管理员审核' } | ||||
|         ], | ||||
|         ui: { | ||||
|           widget: 'select', | ||||
|           placeholder: '请选择', | ||||
|           change: (i: any) => { | ||||
|             this.sf.value.receiveName = i; | ||||
|             this.sf?.setValue('/receiveName', i); | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|       receiveName2: { | ||||
|         type: 'string', | ||||
|         title: '托运人', | ||||
|         enum: [ | ||||
|           { label: '全部', value: '全部' }, | ||||
|           { label: '企业认证审核', value: '企业认证审核' }, | ||||
|           { label: '企业管理员审核', value: '企业管理员审核' } | ||||
|         ], | ||||
|         ui: { | ||||
|           widget: 'select', | ||||
|           placeholder: '请选择', | ||||
|           change: (i: any) => { | ||||
|             this.sf.value.receiveName2 = i; | ||||
|             this.sf?.setValue('/receiveName2', i); | ||||
|           }, | ||||
|           visibleIf: { | ||||
|             expand: (value: boolean) => value | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|       receiveName3: { | ||||
|         type: 'string', | ||||
|         title: '开票方', | ||||
|         enum: [ | ||||
|           { label: '全部', value: '全部' }, | ||||
|           { label: '企业认证审核', value: '企业认证审核' }, | ||||
|           { label: '企业管理员审核', value: '企业管理员审核' } | ||||
|         ], | ||||
|         ui: { | ||||
|           widget: 'select', | ||||
|           placeholder: '请选择', | ||||
|           change: (i: any) => { | ||||
|             this.sf.value.receiveName3 = i; | ||||
|             this.sf?.setValue('/receiveName3', i); | ||||
|           }, | ||||
|           visibleIf: { | ||||
|             expand: (value: boolean) => value | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   }; | ||||
|   columns: STColumn[] = this.initST(); | ||||
|   searchSchema: SFSchema = this.initSF(); | ||||
|  | ||||
|   reqParams = {}; | ||||
|  | ||||
| @ -149,15 +32,19 @@ export class InvoiceRequestedComponent implements OnInit { | ||||
|  | ||||
|   ngOnInit(): void {} | ||||
|  | ||||
|   beforeReq = (requestOptions: STRequestOptions) => { | ||||
|     if (this.sf) { | ||||
|       this.reqParams = { ...this.sf.value }; | ||||
|     } | ||||
|     return requestOptions; | ||||
|   }; | ||||
|  | ||||
|   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; | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @ -166,7 +53,7 @@ export class InvoiceRequestedComponent implements OnInit { | ||||
|   add(): void {} | ||||
|  | ||||
|   routeTo(item: any) { | ||||
|     this.router.navigate(['/ticket/invoice-requested-detail/1']); | ||||
|     this.router.navigate(['/ticket/invoice-requested/detail/1']); | ||||
|   } | ||||
|  | ||||
|   auditAction(item: any) { | ||||
| @ -226,4 +113,177 @@ export class InvoiceRequestedComponent implements OnInit { | ||||
|     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: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         orderSn2: { | ||||
|           type: 'string', | ||||
|           title: '订单号', | ||||
|           ui: { | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         orderSn3: { | ||||
|           type: 'string', | ||||
|           title: '费用号', | ||||
|           ui: { | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         receiveName2: { | ||||
|           type: 'string', | ||||
|           title: '购买方', | ||||
|           enum: [ | ||||
|             { label: '全部', value: '全部' }, | ||||
|             { label: '企业认证审核', value: '企业认证审核' }, | ||||
|             { label: '企业管理员审核', value: '企业管理员审核' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         receiveName3: { | ||||
|           type: 'string', | ||||
|           title: '网络货运人', | ||||
|           enum: [{ label: '全部', value: '全部' }], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         receiveName23: { | ||||
|           type: 'string', | ||||
|           title: '其他需求', | ||||
|           enum: [ | ||||
|             { label: '全部', value: '全部' }, | ||||
|             { label: '有', value: '有' }, | ||||
|             { label: '无', value: '无' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         receiveName: { | ||||
|           type: 'string', | ||||
|           title: '处理进度', | ||||
|           enum: [ | ||||
|             { label: '全部', value: '全部' }, | ||||
|             { label: '待审核', value: '待审核' }, | ||||
|             { label: '处理中', value: '处理中' }, | ||||
|             { label: '已完成', value: '已完成' }, | ||||
|             { label: '已拒绝', value: '已拒绝' }, | ||||
|             { label: '已撤销', value: '已撤销' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         createTime: { | ||||
|           title: '申请时间', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'date', | ||||
|             mode: 'range', | ||||
|             format: 'yyyy-MM-dd', | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } as SFDateWidgetSchema | ||||
|         }, | ||||
|         re2ceiveName: { | ||||
|           type: 'string', | ||||
|           title: '销货清单', | ||||
|           enum: [ | ||||
|             { label: '全部', value: '全部' }, | ||||
|             { label: '需要', value: '需要' }, | ||||
|             { label: '不需要', value: '不需要' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   private initST(): STColumn[] { | ||||
|     return [ | ||||
|       { 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: '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' }, | ||||
|       { title: '申请时间', index: 'updatedAt', type: 'date' }, | ||||
|       { | ||||
|         title: '操作', | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '开票', | ||||
|             click: item => this.routeTo(item) | ||||
|           }, | ||||
|           { | ||||
|             text: '驳回', | ||||
|             click: item => this.routeTo(item) | ||||
|           }, | ||||
|           { | ||||
|             text: '查看原因', | ||||
|             click: item => this.showReason(item) | ||||
|           }, | ||||
|           { | ||||
|             text: '订单明细', | ||||
|             click: item => this.routeTo(item) | ||||
|           }, | ||||
|           { | ||||
|             text: '下载对账单', | ||||
|             click: item => this.auditAction(item) | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
|     ]; | ||||
|   } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user