edit
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
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 } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { TicketService } from '../../services/ticket.service';
|
||||
@ -8,135 +8,15 @@ import { TicketService } from '../../services/ticket.service';
|
||||
@Component({
|
||||
selector: 'app-etc-invoiced-logs',
|
||||
templateUrl: './etc-invoiced-logs.component.html',
|
||||
styleUrls: ['./etc-invoiced-logs.component.less']
|
||||
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
|
||||
})
|
||||
export class ETCInvoicedLogsComponent 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: '里程(km)', index: 'callNo' },
|
||||
{ title: '交易id', index: 'callNo' },
|
||||
{ title: '交易金额(元)', index: 'callNo' },
|
||||
{ title: '发票金额(元)', index: 'callNo' },
|
||||
{ title: '税率', index: 'callNo' },
|
||||
{ title: '税额(元)', index: 'callNo' },
|
||||
{ title: '价税合计(元)', index: 'callNo' },
|
||||
{ title: '交易时间', index: 'updatedAt', type: 'date' },
|
||||
{ title: '开票日期', index: 'updatedAt', type: 'date' },
|
||||
{ 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: {
|
||||
placeholder: '请输入',
|
||||
autocomplete: 'off'
|
||||
}
|
||||
},
|
||||
orderSn1: {
|
||||
type: 'string',
|
||||
title: '运单号',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
autocomplete: 'off'
|
||||
}
|
||||
},
|
||||
orderSn2: {
|
||||
type: 'string',
|
||||
title: '车牌号',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
autocomplete: 'off'
|
||||
}
|
||||
},
|
||||
createTime: {
|
||||
title: '交易时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
createTime2: {
|
||||
title: '开票日期',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
} 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);
|
||||
},
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
reqParams = {};
|
||||
columns: STColumn[] = this.initST();
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
_$expand = false;
|
||||
|
||||
@ -144,19 +24,17 @@ export class ETCInvoicedLogsComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'filter':
|
||||
this.st.load();
|
||||
break;
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
approval(): void {}
|
||||
|
||||
add(): void {}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
routeTo(item: any) {
|
||||
return;
|
||||
this.router.navigate(['/ticket/invoice-requested-detail/1']);
|
||||
}
|
||||
|
||||
@ -175,4 +53,121 @@ export class ETCInvoicedLogsComponent 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: '请输入',
|
||||
autocomplete: 'off'
|
||||
}
|
||||
},
|
||||
orderS2n1: {
|
||||
type: 'string',
|
||||
title: '订单号',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
orderSn1: {
|
||||
type: 'string',
|
||||
title: '运单号',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
orderSn2: {
|
||||
type: 'string',
|
||||
title: '车牌号',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
createTime: {
|
||||
title: '交易时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
createTime2: {
|
||||
title: '开票日期',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
receiveName2: {
|
||||
type: 'string',
|
||||
title: '销售方',
|
||||
enum: [{ label: '全部', value: '全部' }],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
ltdId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
},
|
||||
asyncData: () => this.service.getNetworkFreightForwarder()
|
||||
},
|
||||
default: ''
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '发票号码', index: 'no', width: 100, type: 'link', click: item => this.routeTo(item) },
|
||||
{ title: '发票代码', index: 'callNo', width: 100 },
|
||||
{ title: '订单号', index: 'callNo', width: 100 },
|
||||
{ title: '运单号', index: 'callNo', width: 100 },
|
||||
{ title: '入站口', index: 'callNo', width: 100 },
|
||||
{ title: '出站口', index: 'callNo', width: 100 },
|
||||
{ title: '司机', render: 'call3No', width: 140 },
|
||||
{ title: '车牌号', index: 'callNo', width: 100 },
|
||||
{ title: '里程(km)', index: 'callNo', width: 120 },
|
||||
{ title: '交易id', index: 'callNo', width: 100 },
|
||||
{ title: '交易金额(元)', index: 'callNo', width: 130 },
|
||||
{ title: '税率', index: 'callNo', width: 90 },
|
||||
{ title: '金额(元)', index: 'callNo', width: 120 },
|
||||
{ title: '税额(元)', index: 'callNo', width: 120 },
|
||||
{ title: '价税合计(元)', index: 'callNo', width: 130 },
|
||||
{ title: '交易时间', index: 'updatedAt', type: 'date', width: 150 },
|
||||
{ title: '开票日期', index: 'updatedAt', type: 'date', width: 150 },
|
||||
{ title: '销售方', index: 'callNo', width: 90 },
|
||||
{ title: '网络货运人', index: 'callNo', width: 120 }
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user