返佣
This commit is contained in:
@ -32,33 +32,39 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
private nzModalService: NzModalService,
|
private nzModalService: NzModalService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
public shipperservice: ShipperBaseService,
|
public shipperservice: ShipperBaseService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe
|
||||||
) { }
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initST();
|
this.initST();
|
||||||
this.initSF();
|
this.initSF();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 查询参数
|
* 查询参数
|
||||||
*/
|
*/
|
||||||
get reqParams() {
|
get reqParams() {
|
||||||
const params = {
|
const params = {
|
||||||
...this.sf?.value,
|
...this.sf?.value
|
||||||
}
|
};
|
||||||
delete params.signTime;
|
delete params.signTime;
|
||||||
delete params._$expand;
|
delete params._$expand;
|
||||||
if (this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
|
if (
|
||||||
|
this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') &&
|
||||||
|
this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')
|
||||||
|
) {
|
||||||
params.signTime = {
|
params.signTime = {
|
||||||
start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
|
start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
|
||||||
end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
|
end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
if (this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
|
if (
|
||||||
|
this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') &&
|
||||||
|
this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')
|
||||||
|
) {
|
||||||
params.effectiveEndTime = {
|
params.effectiveEndTime = {
|
||||||
start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
|
start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
|
||||||
end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
|
end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
...params
|
...params
|
||||||
@ -71,7 +77,7 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
this.columns = [
|
this.columns = [
|
||||||
{
|
{
|
||||||
title: '合同编号',
|
title: '合同编号',
|
||||||
width: '100px',
|
width: '130px',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
render: 'contractCode'
|
render: 'contractCode'
|
||||||
},
|
},
|
||||||
@ -122,6 +128,19 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
'5': { text: '已过期', color: 'warning' },
|
'5': { text: '已过期', color: 'warning' },
|
||||||
'7': { text: '已拒签', color: 'warning' }
|
'7': { text: '已拒签', color: 'warning' }
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
className: 'text-center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: '80px',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: '签署',
|
||||||
|
iif: item => item.esignFlowStatus === '0' || item.esignFlowStatus === '1' || item.esignFlowStatus === '13',
|
||||||
|
click: item => this.service.StartTheProcessToESignById(item.id, () => this.st.load(1))
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -142,11 +161,11 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
enum: [
|
enum: [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: '' },
|
||||||
{ label: '货主', value: 1 },
|
{ label: '货主', value: 1 },
|
||||||
{ label: '司机', value: 2 },
|
{ label: '司机', value: 2 }
|
||||||
],
|
],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
contractType: {
|
contractType: {
|
||||||
@ -157,8 +176,8 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
widget: 'dict-select',
|
widget: 'dict-select',
|
||||||
containsAllLable: true,
|
containsAllLable: true,
|
||||||
params: { dictKey: 'contract:type' },
|
params: { dictKey: 'contract:type' },
|
||||||
containAllLable: true,
|
containAllLable: true
|
||||||
} as SFSelectWidgetSchema,
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
enterpriseInfoId: {
|
enterpriseInfoId: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -178,8 +197,8 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
title: '合同对象',
|
title: '合同对象',
|
||||||
ui: {
|
ui: {
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value,
|
_$expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
signTime: {
|
signTime: {
|
||||||
@ -188,8 +207,8 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value,
|
_$expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
effectiveEndTime: {
|
effectiveEndTime: {
|
||||||
@ -198,8 +217,8 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value,
|
_$expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
esignFlowStatus: {
|
esignFlowStatus: {
|
||||||
@ -212,10 +231,10 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
params: { dictKey: 'esign:flow:status' },
|
params: { dictKey: 'esign:flow:status' },
|
||||||
containAllLable: true,
|
containAllLable: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value,
|
_$expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
} as SFSelectWidgetSchema,
|
} as SFSelectWidgetSchema
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
type: 'object'
|
type: 'object'
|
||||||
};
|
};
|
||||||
@ -238,9 +257,9 @@ export class ContractManagementFrameComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
approval(): void { }
|
approval(): void {}
|
||||||
|
|
||||||
add(): void { }
|
add(): void {}
|
||||||
|
|
||||||
routeTo(item: any) {
|
routeTo(item: any) {
|
||||||
this.router.navigate(['/ticket/invoice-requested-detail/1']);
|
this.router.navigate(['/ticket/invoice-requested-detail/1']);
|
||||||
|
|||||||
@ -27,19 +27,22 @@ export class ContractManagementContractListComponent implements OnInit {
|
|||||||
_$expand = false;
|
_$expand = false;
|
||||||
isLoading: boolean = false;
|
isLoading: boolean = false;
|
||||||
/**
|
/**
|
||||||
* 查询参数
|
* 查询参数
|
||||||
*/
|
*/
|
||||||
get reqParams() {
|
get reqParams() {
|
||||||
const params = {
|
const params = {
|
||||||
...this.sf?.value,
|
...this.sf?.value
|
||||||
}
|
};
|
||||||
delete params.signTime;
|
delete params.signTime;
|
||||||
delete params._$expand;
|
delete params._$expand;
|
||||||
if (this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
|
if (
|
||||||
|
this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') &&
|
||||||
|
this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')
|
||||||
|
) {
|
||||||
params.signTime = {
|
params.signTime = {
|
||||||
start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
|
start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
|
||||||
end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
|
end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
...params
|
...params
|
||||||
@ -51,12 +54,12 @@ export class ContractManagementContractListComponent implements OnInit {
|
|||||||
private nzModalService: NzModalService,
|
private nzModalService: NzModalService,
|
||||||
public shipperservice: ShipperBaseService,
|
public shipperservice: ShipperBaseService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe
|
||||||
) { }
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initST()
|
this.initST();
|
||||||
this.initSF()
|
this.initSF();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化数据列表
|
* 初始化数据列表
|
||||||
@ -65,7 +68,7 @@ export class ContractManagementContractListComponent implements OnInit {
|
|||||||
this.columns = [
|
this.columns = [
|
||||||
{
|
{
|
||||||
title: '合同编号',
|
title: '合同编号',
|
||||||
width: '100px',
|
width: '130px',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
render: 'contractCode'
|
render: 'contractCode'
|
||||||
},
|
},
|
||||||
@ -106,22 +109,34 @@ export class ContractManagementContractListComponent implements OnInit {
|
|||||||
'3': { text: '已撤销', color: 'warning' },
|
'3': { text: '已撤销', color: 'warning' },
|
||||||
'4': { text: '已作废', color: 'warning' },
|
'4': { text: '已作废', color: 'warning' },
|
||||||
'5': { text: '已过期', color: 'warning' },
|
'5': { text: '已过期', color: 'warning' },
|
||||||
'7': { text: '已拒签', color: 'warning' },
|
'7': { text: '已拒签', color: 'warning' }
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
className: 'text-center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: '80px',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: '签署',
|
||||||
|
iif: item => item.esignFlowStatus === '0' || item.esignFlowStatus === '1' || item.esignFlowStatus === '13',
|
||||||
|
click: item => this.service.StartTheProcessToESignById(item.id, () => this.st.load(1))
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化查询表单
|
* 初始化查询表单
|
||||||
*/
|
*/
|
||||||
initSF() {
|
initSF() {
|
||||||
this.schema = {
|
this.schema = {
|
||||||
properties: {
|
properties: {
|
||||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||||
contractCode: {
|
contractCode: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '合同编号',
|
title: '合同编号'
|
||||||
},
|
},
|
||||||
businessCode: {
|
businessCode: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -151,7 +166,7 @@ export class ContractManagementContractListComponent implements OnInit {
|
|||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value
|
_$expand: (value: boolean) => value
|
||||||
},
|
},
|
||||||
containAllLable: true,
|
containAllLable: true
|
||||||
} as SFSelectWidgetSchema
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
resourceType: {
|
resourceType: {
|
||||||
@ -164,8 +179,8 @@ export class ContractManagementContractListComponent implements OnInit {
|
|||||||
containsAllLable: true,
|
containsAllLable: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value
|
_$expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
} as SFSelectWidgetSchema,
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
enterpriseInfoId: {
|
enterpriseInfoId: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -185,8 +200,8 @@ export class ContractManagementContractListComponent implements OnInit {
|
|||||||
title: '合同对象',
|
title: '合同对象',
|
||||||
ui: {
|
ui: {
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value,
|
_$expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
signTime: {
|
signTime: {
|
||||||
@ -196,9 +211,9 @@ export class ContractManagementContractListComponent implements OnInit {
|
|||||||
widget: 'sl-from-to-search',
|
widget: 'sl-from-to-search',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value,
|
_$expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
} as SFDateWidgetSchema,
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
esignFlowStatus: {
|
esignFlowStatus: {
|
||||||
title: '状态',
|
title: '状态',
|
||||||
@ -210,17 +225,17 @@ export class ContractManagementContractListComponent implements OnInit {
|
|||||||
containsAllLable: true,
|
containsAllLable: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value
|
_$expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
} as SFSelectWidgetSchema,
|
} as SFSelectWidgetSchema
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
type: 'object',
|
type: 'object'
|
||||||
};
|
};
|
||||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 查询字段个数
|
* 查询字段个数
|
||||||
*/
|
*/
|
||||||
get queryFieldCount(): number {
|
get queryFieldCount(): number {
|
||||||
return Object.keys(this.schema?.properties || {}).length;
|
return Object.keys(this.schema?.properties || {}).length;
|
||||||
}
|
}
|
||||||
@ -285,7 +300,7 @@ export class ContractManagementContractListComponent implements OnInit {
|
|||||||
resetSF() {
|
resetSF() {
|
||||||
this.sf.reset();
|
this.sf.reset();
|
||||||
this._$expand = false;
|
this._$expand = false;
|
||||||
this.isLoading = true
|
this.isLoading = true;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 伸缩查询条件
|
* 伸缩查询条件
|
||||||
|
|||||||
@ -70,7 +70,7 @@ export class ContractManagementPartnerComponent implements OnInit {
|
|||||||
this.columns = [
|
this.columns = [
|
||||||
{
|
{
|
||||||
title: '合同编号',
|
title: '合同编号',
|
||||||
width: '100px',
|
width: '130px',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
render: 'contractCode'
|
render: 'contractCode'
|
||||||
},
|
},
|
||||||
@ -121,6 +121,19 @@ export class ContractManagementPartnerComponent implements OnInit {
|
|||||||
'5': { text: '已过期', color: 'warning' },
|
'5': { text: '已过期', color: 'warning' },
|
||||||
'7': { text: '已拒签', color: 'warning' }
|
'7': { text: '已拒签', color: 'warning' }
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
className: 'text-center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: '80px',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: '签署',
|
||||||
|
iif: item => item.esignFlowStatus === '0' || item.esignFlowStatus === '1' || item.esignFlowStatus === '13',
|
||||||
|
click: item => this.service.StartTheProcessToESignById(item.id, () => this.st.load(1))
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,18 @@ export class ContractManagementService extends BaseService {
|
|||||||
$api_listPartner_page = `/api/sdc/contract/listPartner/page`;
|
$api_listPartner_page = `/api/sdc/contract/listPartner/page`;
|
||||||
// 获取订单合同表
|
// 获取订单合同表
|
||||||
$api_contract_get = `/api/sdc/contract/get`;
|
$api_contract_get = `/api/sdc/contract/get`;
|
||||||
|
|
||||||
|
// 发起E签宝跟据合同ID
|
||||||
|
$api_startTheProcessToESignById = `/api/sdc/contract/startTheProcessToESignById`;
|
||||||
constructor(public injector: Injector) {
|
constructor(public injector: Injector) {
|
||||||
super(injector);
|
super(injector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StartTheProcessToESignById(id: string, callback: () => void) {
|
||||||
|
this.request(this.$api_startTheProcessToESignById, { id }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,33 +2,41 @@
|
|||||||
<page-header-wrapper [title]="'数据报表'"></page-header-wrapper>
|
<page-header-wrapper [title]="'数据报表'"></page-header-wrapper>
|
||||||
<div nz-row [nzGutter]="16">
|
<div nz-row [nzGutter]="16">
|
||||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||||
<g2-card [title]="'客户预存款总额'" [bordered]="true" [total]="'¥ 126,560.00'" [footer]="footer" contentHeight="46">
|
<g2-card [title]="'客户预存款总额'" [bordered]="true" [total]="totalAdvanceDeposit?.totalAmount || '¥ 0.00万'"
|
||||||
<ng-template #footer>
|
[footer]="AdvanceDepositFooter" contentHeight="46">
|
||||||
<g2-mini-area line color="#cceafe" height="45" [data]="visitData" (clickItem)="handleClick($event)">
|
<ng-template #AdvanceDepositFooter>
|
||||||
|
<g2-mini-area line color="#cceafe" height="45" [data]="totalAdvanceDeposit?.list || []"
|
||||||
|
(clickItem)="handleClick($event)">
|
||||||
</g2-mini-area>
|
</g2-mini-area>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</g2-card>
|
</g2-card>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||||
<g2-card [title]="'业绩量总额'" [bordered]="true" [total]="'¥ 126,560.00'" [footer]="footer" contentHeight="46">
|
<g2-card [title]="'业绩量总额'" [bordered]="true" [total]="totalPerformanceVolume?.totalAmount || '¥ 0.00万'"
|
||||||
<ng-template #footer>
|
[footer]="PerformanceVolumeFooter" contentHeight="46">
|
||||||
<g2-mini-area line color="#cceafe" height="45" [data]="visitData" (clickItem)="handleClick($event)">
|
<ng-template #PerformanceVolumeFooter>
|
||||||
|
<g2-mini-area line color="#cceafe" height="45" [data]="totalPerformanceVolume?.list || []"
|
||||||
|
(clickItem)="handleClick($event)">
|
||||||
</g2-mini-area>
|
</g2-mini-area>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</g2-card>
|
</g2-card>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||||
<g2-card [title]="'司机应付总额'" [bordered]="true" [total]="'¥ 126,560.00'" [footer]="footer" contentHeight="46">
|
<g2-card [title]="'司机应付总额'" [bordered]="true" [total]="totalFreight?.totalAmount || '¥ 0.00万'" [footer]="footer"
|
||||||
|
contentHeight="46">
|
||||||
<ng-template #footer>
|
<ng-template #footer>
|
||||||
<g2-mini-area line color="#cceafe" height="45" [data]="visitData" (clickItem)="handleClick($event)">
|
<g2-mini-area line color="#cceafe" height="45" [data]="totalFreight?.list || []"
|
||||||
|
(clickItem)="handleClick($event)">
|
||||||
</g2-mini-area>
|
</g2-mini-area>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</g2-card>
|
</g2-card>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||||
<g2-card [title]="'附加费总额'" [bordered]="true" [total]="'¥ 126,560.00'" [footer]="footer" contentHeight="46">
|
<g2-card [title]="'附加费总额'" [bordered]="true" [total]="totalSurcharge?.totalAmount || '¥ 0.00万'"
|
||||||
<ng-template #footer>
|
[footer]="SurchargeFooter" contentHeight="46">
|
||||||
<g2-mini-area line color="#cceafe" height="45" [data]="visitData" (clickItem)="handleClick($event)">
|
<ng-template #SurchargeFooter>
|
||||||
|
<g2-mini-area line color="#cceafe" height="45" [data]="totalSurcharge?.list || []"
|
||||||
|
(clickItem)="handleClick($event)">
|
||||||
</g2-mini-area>
|
</g2-mini-area>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</g2-card>
|
</g2-card>
|
||||||
@ -37,32 +45,29 @@
|
|||||||
<div nz-row [nzGutter]="16">
|
<div nz-row [nzGutter]="16">
|
||||||
<div nz-col class="gutter-row" [nzSpan]="12">
|
<div nz-col class="gutter-row" [nzSpan]="12">
|
||||||
<nz-card [nzTitle]="'订单类型比例'">
|
<nz-card [nzTitle]="'订单类型比例'">
|
||||||
<g2-custom delay="100" (render)="render($event)"></g2-custom>
|
<g2-custom #g2custom delay="100"></g2-custom>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col class="gutter-row" [nzSpan]="12">
|
<div nz-col class="gutter-row" [nzSpan]="12">
|
||||||
<nz-card [nzTitle]="'大区业绩完成情况'">
|
<nz-card [nzTitle]="'大区业绩完成情况'">
|
||||||
<g2-timeline
|
<!-- <g2-timeline [data]="chartData" [titleMap]="{ y1: '订单金额(元)', y2: '' }" [height]="200" mask="MM月DD日"
|
||||||
[data]="chartData"
|
[slider]="false"></g2-timeline> -->
|
||||||
[titleMap]="{ y1: '客流量', y2: '支付笔数' }"
|
<g2-custom #RegionalPerforman delay="100"></g2-custom>
|
||||||
[height]="200"
|
|
||||||
mask="MM月DD日"
|
|
||||||
[slider]="false"
|
|
||||||
></g2-timeline>
|
|
||||||
</nz-card>
|
</nz-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div nz-row [nzGutter]="16">
|
<div nz-row [nzGutter]="16">
|
||||||
<div nz-col class="gutter-row" [nzSpan]="12">
|
<div nz-col class="gutter-row" [nzSpan]="12">
|
||||||
<nz-card [nzTitle]="'运单直付比例'">
|
<nz-card [nzTitle]="'运单直付比例'">
|
||||||
<g2-pie #pie title="销售额" subTitle="销售额" [total]="total" [valueFormat]="format" [data]="salesPieData" height="294"
|
<!-- <g2-pie #pie title="销售额" subTitle="销售额" [total]="total" [valueFormat]="format" [data]="salesPieData" height="294"
|
||||||
(clickItem)="handleClick($event)" [lineWidth]="10">
|
(clickItem)="handleClick($event)" [lineWidth]="10">
|
||||||
</g2-pie>
|
</g2-pie> -->
|
||||||
|
<g2-custom #BillDirectProportion delay="100"></g2-custom>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col class="gutter-row" [nzSpan]="12">
|
<div nz-col class="gutter-row" [nzSpan]="12">
|
||||||
<nz-card [nzTitle]="'业绩完成情况'">
|
<nz-card [nzTitle]="'业绩完成情况'">
|
||||||
<g2-bar height="200" [title]="'销售额趋势'" [data]="salesData" (clickItem)="handleClick($event)"></g2-bar>
|
<g2-bar [data]="salesData" (clickItem)="handleClick($event)" height="400"></g2-bar>
|
||||||
|
|
||||||
</nz-card>
|
</nz-card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Component, ElementRef, NgZone, OnInit, ViewChild } from '@angular/core';
|
import { ChangeDetectorRef, Component, ElementRef, NgZone, OnInit, ViewChild } from '@angular/core';
|
||||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||||
import { G2MiniAreaClickItem, G2MiniAreaData } from '@delon/chart/mini-area';
|
import { G2MiniAreaClickItem, G2MiniAreaData } from '@delon/chart/mini-area';
|
||||||
import { G2PieClickItem, G2PieComponent, G2PieData } from '@delon/chart/pie';
|
import { G2PieClickItem, G2PieComponent, G2PieData } from '@delon/chart/pie';
|
||||||
@ -6,119 +6,119 @@ import { format } from 'date-fns';
|
|||||||
import { DataService } from '../../services/data.service';
|
import { DataService } from '../../services/data.service';
|
||||||
import { Chart, registerShape, Util } from '@antv/g2';
|
import { Chart, registerShape, Util } from '@antv/g2';
|
||||||
import { G2TimelineClickItem, G2TimelineData } from '@delon/chart/timeline';
|
import { G2TimelineClickItem, G2TimelineData } from '@delon/chart/timeline';
|
||||||
|
import { CurrencyPipe } from '@angular/common';
|
||||||
|
import { LOGS } from '_mock';
|
||||||
|
import { G2CustomComponent } from '@delon/chart/custom';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-datatable-dataindex',
|
selector: 'app-datatable-dataindex',
|
||||||
templateUrl: './dataindex.component.html',
|
templateUrl: './dataindex.component.html',
|
||||||
styleUrls: ['./dataindex.component.less']
|
styleUrls: ['./dataindex.component.less'],
|
||||||
|
providers: [CurrencyPipe]
|
||||||
})
|
})
|
||||||
export class DatatableDataindexComponent implements OnInit {
|
export class DatatableDataindexComponent implements OnInit {
|
||||||
@ViewChild('pie', { static: false }) pie!: G2PieComponent;
|
@ViewChild('g2custom', { static: false }) g2custom!: G2CustomComponent;
|
||||||
chartData: G2TimelineData[] = [];
|
@ViewChild('RegionalPerforman', { static: false }) RegionalPerforman!: G2CustomComponent;
|
||||||
visitData = this.genData();
|
@ViewChild('BillDirectProportion', { static: false }) BillDirectProportion!: G2CustomComponent;
|
||||||
salesData = this.genData();
|
salesData: any[] = [];
|
||||||
salesPieData: G2PieData[] = [];
|
|
||||||
total = '';
|
|
||||||
|
|
||||||
constructor(private service: DataService, private ngZone: NgZone) {
|
totalAdvanceDeposit: { totalAmount: string; list: G2MiniAreaData[] } = { totalAmount: '0', list: this.genData() };
|
||||||
|
totalPerformanceVolume: { totalAmount: string; list: G2MiniAreaData[] } = { totalAmount: '0', list: this.genData() };
|
||||||
|
totalFreight: { totalAmount: string; list: G2MiniAreaData[] } = { totalAmount: '0', list: this.genData() };
|
||||||
|
totalSurcharge: { totalAmount: string; list: G2MiniAreaData[] } = { totalAmount: '0', list: this.genData() };
|
||||||
|
|
||||||
}
|
billTypeDatas: any = [
|
||||||
|
{ item: '货源单', count: 0, percent: 0 },
|
||||||
|
{ item: '合同单', count: 0, percent: 0 }
|
||||||
|
];
|
||||||
|
|
||||||
|
regionalPerformanceCompletion: DataPerformanceTrendVO[] = [];
|
||||||
|
|
||||||
|
constructor(private service: DataService, private currency: CurrencyPipe) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.refreshPie();
|
this.initMiniAreaData();
|
||||||
this.initLineData()
|
this.initOthersData();
|
||||||
}
|
|
||||||
initLineData(){
|
|
||||||
for (let i = 0; i < 20; i += 1) {
|
|
||||||
this.chartData.push({
|
|
||||||
time: new Date().getTime() + 1000 * 60 * 60 * 24 * i,
|
|
||||||
y1: Math.floor(Math.random() * 100) + 1000,
|
|
||||||
y2: Math.floor(Math.random() * 100) + 10,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private genData(): G2MiniAreaData[] {
|
|
||||||
const beginDay = new Date().getTime();
|
|
||||||
const res: G2MiniAreaData[] = [];
|
|
||||||
for (let i = 0; i < 20; i += 1) {
|
|
||||||
res.push({
|
|
||||||
x: format(new Date(beginDay + 1000 * 60 * 60 * 24 * i), 'yyyy-MM-dd'),
|
|
||||||
y: Math.floor(Math.random() * 100) + 10,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
refresh(): void {
|
private initMiniAreaData() {
|
||||||
this.visitData = this.genData();
|
// 客户预存款总额
|
||||||
|
this.service.request(this.service.$api_total_advance_deposit).subscribe((res: DataTotalVO) => {
|
||||||
|
if (res) {
|
||||||
|
this.totalAdvanceDeposit = this.formatMiniAreaData(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 业绩量总额
|
||||||
|
this.service.request(this.service.$api_total_performance_volume).subscribe((res: DataTotalVO) => {
|
||||||
|
if (res) {
|
||||||
|
this.totalPerformanceVolume = this.formatMiniAreaData(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 司机应付总额
|
||||||
|
this.service.request(this.service.$api_total_freight).subscribe((res: DataTotalVO) => {
|
||||||
|
if (res) {
|
||||||
|
this.totalFreight = this.formatMiniAreaData(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 业绩量总额
|
||||||
|
this.service.request(this.service.$api_total_surcharge).subscribe((res: DataTotalVO) => {
|
||||||
|
if (res) {
|
||||||
|
this.totalSurcharge = this.formatMiniAreaData(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
refreshPie(): void {
|
|
||||||
const rv = (min: number = 0, max: number = 5000) => Math.floor(Math.random() * (max - min + 1) + min);
|
private initOthersData() {
|
||||||
this.salesPieData = [
|
// 订单类型比例
|
||||||
{
|
this.service.request(this.service.$api_getBillTypeProportion).subscribe(res => {
|
||||||
x: '家用电器',
|
if (res) {
|
||||||
y: rv(),
|
this.billTypeDatas = this.formatCoordinateData(res);
|
||||||
},
|
this.initBillChart(this.g2custom['el'].nativeElement as any);
|
||||||
{
|
}
|
||||||
x: '食用酒水',
|
});
|
||||||
y: rv(),
|
// 大区业绩完成情况
|
||||||
},
|
this.service.request(this.service.$api_getBillAmount).subscribe((res: DataPerformanceTrendVO[]) => {
|
||||||
{
|
if (res) {
|
||||||
x: '个护健康',
|
this.regionalPerformanceCompletion = res.map(item => ({ ...item, time: new Date(item.time)?.getTime() }));
|
||||||
y: rv(),
|
this.initRegionalPerformanceChart(this.RegionalPerforman['el'].nativeElement as any, this.regionalPerformanceCompletion);
|
||||||
},
|
}
|
||||||
{
|
});
|
||||||
x: '服饰箱包',
|
// 订单类型比例
|
||||||
y: rv(),
|
this.service.request(this.service.$api_getWayBillDirectProportion).subscribe(res => {
|
||||||
},
|
if (res) {
|
||||||
{
|
const billTypeDatas = this.formatCoordinateData(res.map((item: any) => ({ ...item, billType: item.wayBillType })));
|
||||||
x: '母婴产品',
|
this.initBillChart(this.BillDirectProportion['el'].nativeElement as any, billTypeDatas);
|
||||||
y: rv(),
|
}
|
||||||
},
|
});
|
||||||
];
|
// 统计订单结算金额-趋势
|
||||||
if (Math.random() > 0.5) {
|
this.service.request(this.service.$api_get_bill_payment_amount).subscribe(res => {
|
||||||
this.salesPieData.push({
|
if (res) {
|
||||||
x: '其他',
|
this.salesData = this.formatBarData(res);
|
||||||
y: rv(),
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
this.total = `¥ ${this.salesPieData.reduce((pre, now) => now.y + pre, 0).toFixed(2)}`;
|
|
||||||
if (this.pie) {
|
|
||||||
// 等待组件渲染
|
|
||||||
setTimeout(() => {
|
|
||||||
console.log('a')
|
|
||||||
this.pie.changeData()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleClick(data: G2MiniAreaClickItem): void {
|
handleClick(data: G2MiniAreaClickItem): void {
|
||||||
this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`);
|
this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`);
|
||||||
}
|
}
|
||||||
format(val: number): string {
|
|
||||||
return `¥ ${val.toFixed(2)}`;
|
/**
|
||||||
}
|
* 构建订单类型秘鲁图
|
||||||
render(el: ElementRef<HTMLDivElement>): void {
|
* @param el
|
||||||
this.ngZone.runOutsideAngular(() => this.init(el.nativeElement));
|
*/
|
||||||
}
|
private initBillChart(el: HTMLElement, datas?: any[]): void {
|
||||||
private init(el: HTMLElement): void {
|
const data = datas || this.billTypeDatas;
|
||||||
const data = [
|
|
||||||
{ item: '货源单', count: 40, percent: 0.4 },
|
|
||||||
{ item: '合同单', count: 21, percent: 0.21 },
|
|
||||||
{ item: '事例三', count: 17, percent: 0.17 },
|
|
||||||
{ item: '事例四', count: 13, percent: 0.13 },
|
|
||||||
{ item: '事例五', count: 9, percent: 0.09 },
|
|
||||||
];
|
|
||||||
const chart = new Chart({
|
const chart = new Chart({
|
||||||
container: el,
|
container: el,
|
||||||
autoFit: true,
|
autoFit: true,
|
||||||
height: 400,
|
height: 400
|
||||||
});
|
});
|
||||||
// 新建一个 view 用来单独渲染Annotation
|
// 新建一个 view 用来单独渲染Annotation
|
||||||
const innerView = chart.createView();
|
const innerView = chart.createView();
|
||||||
chart.coordinate('theta', {
|
chart.coordinate('theta', {
|
||||||
radius: 0.6,
|
radius: 0.6,
|
||||||
innerRadius: 0.7,
|
innerRadius: 0.7
|
||||||
});
|
});
|
||||||
|
|
||||||
chart.data(data);
|
chart.data(data);
|
||||||
@ -127,34 +127,34 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
formatter: val => {
|
formatter: val => {
|
||||||
val = val * 100 + '%';
|
val = val * 100 + '%';
|
||||||
return val;
|
return val;
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
chart.tooltip(false);
|
chart.tooltip(false);
|
||||||
|
|
||||||
// 声明需要进行自定义图例字段: 'item'
|
// 声明需要进行自定义图例字段: 'item'
|
||||||
chart.legend('item', {
|
chart.legend('item', {
|
||||||
position: 'right', // 配置图例显示位置
|
position: 'right', // 配置图例显示位置
|
||||||
custom: true, // 关键字段,告诉 G2,要使用自定义的图例
|
custom: true, // 关键字段,告诉 G2,要使用自定义的图例
|
||||||
items: data.map((obj, index) => {
|
items: data.map((obj: any, index: any) => {
|
||||||
return {
|
return {
|
||||||
name: obj.item, // 对应 itemName
|
name: obj.item, // 对应 itemName
|
||||||
value: obj.percent, // 对应 itemValue
|
value: obj.percent, // 对应 itemValue
|
||||||
marker: {
|
marker: {
|
||||||
symbol: 'square', // marker 的形状
|
symbol: 'square', // marker 的形状
|
||||||
style: {
|
style: {
|
||||||
r: 5, // marker 图形半径
|
r: 5, // marker 图形半径
|
||||||
fill: chart.getTheme().colors10[index], // marker 颜色,使用默认颜色,同图形对应
|
fill: chart.getTheme().colors10[index] // marker 颜色,使用默认颜色,同图形对应
|
||||||
},
|
}
|
||||||
}, // marker 配置
|
} // marker 配置
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
itemValue: {
|
itemValue: {
|
||||||
style: {
|
style: {
|
||||||
fill: '#999',
|
fill: '#999'
|
||||||
}, // 配置 itemValue 样式
|
}, // 配置 itemValue 样式
|
||||||
formatter: (val: any) => `${val * 100}%` // 格式化 itemValue 内容
|
formatter: (val: any) => `${val * 100}%` // 格式化 itemValue 内容
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
chart
|
chart
|
||||||
@ -165,7 +165,7 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
.style({
|
.style({
|
||||||
fillOpacity: 1,
|
fillOpacity: 1,
|
||||||
stroke: 'white',
|
stroke: 'white',
|
||||||
lineWidth: 8,
|
lineWidth: 8
|
||||||
})
|
})
|
||||||
.state({
|
.state({
|
||||||
active: {
|
active: {
|
||||||
@ -174,12 +174,36 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
return {
|
return {
|
||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
stroke: 'white',
|
stroke: 'white',
|
||||||
strokeOpacity: shape.attr('fillOpacity'),
|
strokeOpacity: shape.attr('fillOpacity')
|
||||||
};
|
};
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
innerView
|
||||||
|
.annotation()
|
||||||
|
.text({
|
||||||
|
position: ['50%', '50%'],
|
||||||
|
content: data[0].item,
|
||||||
|
style: {
|
||||||
|
fontSize: 20,
|
||||||
|
fill: '#8c8c8c',
|
||||||
|
textAlign: 'center'
|
||||||
|
},
|
||||||
|
offsetY: -20
|
||||||
|
})
|
||||||
|
.text({
|
||||||
|
position: ['50%', '50%'],
|
||||||
|
content: data[0].count,
|
||||||
|
style: {
|
||||||
|
fontSize: 28,
|
||||||
|
fill: '#8c8c8c',
|
||||||
|
textAlign: 'center'
|
||||||
|
},
|
||||||
|
offsetY: 20
|
||||||
|
});
|
||||||
|
innerView.render(true);
|
||||||
|
|
||||||
// 移除图例点击过滤交互
|
// 移除图例点击过滤交互
|
||||||
chart.removeInteraction('legend-filter');
|
chart.removeInteraction('legend-filter');
|
||||||
chart.interaction('element-active');
|
chart.interaction('element-active');
|
||||||
@ -198,7 +222,7 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
updateAnnotation(data);
|
updateAnnotation(data);
|
||||||
} else {
|
} else {
|
||||||
// 隐藏 Annotation
|
// 隐藏 Annotation
|
||||||
clearAnnotation();
|
// clearAnnotation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -216,9 +240,9 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
style: {
|
style: {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fill: '#8c8c8c',
|
fill: '#8c8c8c',
|
||||||
textAlign: 'center',
|
textAlign: 'center'
|
||||||
},
|
},
|
||||||
offsetY: -20,
|
offsetY: -20
|
||||||
})
|
})
|
||||||
.text({
|
.text({
|
||||||
position: ['50%', '50%'],
|
position: ['50%', '50%'],
|
||||||
@ -226,11 +250,10 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
style: {
|
style: {
|
||||||
fontSize: 28,
|
fontSize: 28,
|
||||||
fill: '#8c8c8c',
|
fill: '#8c8c8c',
|
||||||
textAlign: 'center',
|
textAlign: 'center'
|
||||||
},
|
},
|
||||||
offsetX: -10,
|
offsetY: 20
|
||||||
offsetY: 20,
|
});
|
||||||
})
|
|
||||||
innerView.render(true);
|
innerView.render(true);
|
||||||
lastItem = data.item;
|
lastItem = data.item;
|
||||||
}
|
}
|
||||||
@ -242,8 +265,122 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
innerView.render(true);
|
innerView.render(true);
|
||||||
lastItem = null;
|
lastItem = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private initRegionalPerformanceChart(el: HTMLElement, data: DataPerformanceTrendVO[]) {
|
||||||
|
const chart = new Chart({
|
||||||
|
container: el,
|
||||||
|
autoFit: true,
|
||||||
|
height: 400
|
||||||
|
});
|
||||||
|
|
||||||
|
chart.data(data);
|
||||||
|
chart.scale({
|
||||||
|
time: {
|
||||||
|
alias: '日期',
|
||||||
|
type: 'time'
|
||||||
|
},
|
||||||
|
quantity: {
|
||||||
|
alias: '金额',
|
||||||
|
min: 0,
|
||||||
|
sync: true, // 将 pv 字段数值同 time 字段数值进行同步
|
||||||
|
nice: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
chart.axis('quantity', {
|
||||||
|
title: {}
|
||||||
|
});
|
||||||
|
|
||||||
|
chart.tooltip({
|
||||||
|
showCrosshairs: true,
|
||||||
|
shared: true
|
||||||
|
});
|
||||||
|
|
||||||
|
// 声明需要进行自定义图例字段: 'item'
|
||||||
|
chart.legend({
|
||||||
|
offsetY: 10,
|
||||||
|
position: 'bottom', // 配置图例显示位置
|
||||||
|
custom: true, // 关键字段,告诉 G2,要使用自定义的图例
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
name: '订单金额 (元)', // 对应 itemName
|
||||||
|
value: '' // 对应 itemValue
|
||||||
|
}
|
||||||
|
],
|
||||||
|
itemValue: {
|
||||||
|
style: {
|
||||||
|
fill: '#999'
|
||||||
|
} // 配置 itemValue 样式
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
chart.line().position('time*quantity').color('#4FAAEB');
|
||||||
|
chart.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
private formatMiniAreaData(data: DataTotalVO) {
|
||||||
|
return {
|
||||||
|
totalAmount: `${this.currency.transform(data.totalAmount || 0)}万`,
|
||||||
|
list: data.list?.map(item => ({
|
||||||
|
x: item.time,
|
||||||
|
y: item.quantity
|
||||||
|
}))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private formatCoordinateData(data: DataBillTypeProportion[]): any[] {
|
||||||
|
const total = data.map(item => item.quantity).reduce((pre, next) => pre + next);
|
||||||
|
const rs: any[] = [];
|
||||||
|
data.forEach(item => {
|
||||||
|
rs.push({
|
||||||
|
item: (BILLTYPE as any)[item.billType],
|
||||||
|
count: item.quantity,
|
||||||
|
percent: Number((item.quantity / total).toFixed(2))
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return rs;
|
||||||
|
}
|
||||||
|
|
||||||
|
private formatBarData(data: DataPerformanceTrendVO[]): any[] {
|
||||||
|
return data.map(item => ({
|
||||||
|
x: item.time,
|
||||||
|
y: item.quantity,
|
||||||
|
color: '#f50'
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
private genData(): G2MiniAreaData[] {
|
||||||
|
const beginDay = new Date().getTime();
|
||||||
|
const res: G2MiniAreaData[] = [];
|
||||||
|
for (let i = 0; i < 20; i += 1) {
|
||||||
|
res.push({
|
||||||
|
x: format(new Date(beginDay + 1000 * 60 * 60 * 24 * i), 'yyyy-MM-dd'),
|
||||||
|
y: Math.floor(Math.random() * 100) + 10
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface DataTotalVO {
|
||||||
|
totalAmount: number;
|
||||||
|
list: DataPerformanceTrendVO[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DataPerformanceTrendVO {
|
||||||
|
quantity: number;
|
||||||
|
time: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DataBillTypeProportion {
|
||||||
|
billType: BILLTYPE;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum BILLTYPE {
|
||||||
|
'HY' = '货源单',
|
||||||
|
'HT' = '合同单',
|
||||||
|
'ZF' = '直付',
|
||||||
|
'CDZ' = '车队长'
|
||||||
|
}
|
||||||
|
|||||||
@ -100,7 +100,15 @@ export class DataService extends BaseService {
|
|||||||
// 数据报表-统计订单金额-趋势
|
// 数据报表-统计订单金额-趋势
|
||||||
$api_getBillAmount = `/api/sdc/reportData/getBillAmount`;
|
$api_getBillAmount = `/api/sdc/reportData/getBillAmount`;
|
||||||
// // 数据报表-统计订单金额-趋势
|
// // 数据报表-统计订单金额-趋势
|
||||||
// $api_getBillAmount = `/api/sdc/reportData/getBillAmount`;
|
$api_get_bill_payment_amount = `/api/sdc/reportData/getBillPaymentAmount`;
|
||||||
|
// 客户预存款总额
|
||||||
|
$api_total_advance_deposit = `/api/sdc/reportData/getTotalAdvanceDeposit`;
|
||||||
|
// 业绩量总额
|
||||||
|
$api_total_performance_volume = `/api/sdc/reportData/getTotalPerformanceVolume`;
|
||||||
|
// 运费总额
|
||||||
|
$api_total_freight = `/api/sdc/reportData/getTotalFreight`;
|
||||||
|
// 附加费总额
|
||||||
|
$api_total_surcharge = `/api/sdc/reportData/getTotalSurcharge`;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,31 @@
|
|||||||
|
<page-header-wrapper [title]="'短信模板'"></page-header-wrapper>
|
||||||
|
|
||||||
|
<nz-card>
|
||||||
|
<div class="filter-wrap">
|
||||||
|
<button nz-button nzType="primary" (click)="open()"><i nz-icon nzType="plus" nzTheme="outline"></i>筛选</button>
|
||||||
|
</div>
|
||||||
|
<st #st [data]="this.service.$api_smsTemplate_page " [columns]="columns" [req]="{ process: beforeReq }"
|
||||||
|
[loading]="false" [page]="{}"></st>
|
||||||
|
</nz-card>
|
||||||
|
|
||||||
|
<nz-drawer [nzBodyStyle]="{ overflow: 'auto' }" [nzMaskClosable]="false" [nzWidth]="720" [nzVisible]="visible"
|
||||||
|
nzTitle="筛选" [nzFooter]="footerTpl" (nzOnClose)="close()">
|
||||||
|
<div *nzDrawerContent>
|
||||||
|
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true"
|
||||||
|
[button]="'none'"></sf>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ng-template #footerTpl>
|
||||||
|
<div style="float: right">
|
||||||
|
<button nz-button style="margin-right: 8px;" (click)="close()">取消</button>
|
||||||
|
<button nz-button nzType="primary" (click)="search()">确认</button>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
</nz-drawer>
|
||||||
|
|
||||||
|
<nz-modal [(nzVisible)]="isVisible" nzTitle="编辑" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
|
||||||
|
<ng-container *nzModalContent>
|
||||||
|
<sf #sfEdit [formData]="tempData" [schema]="editSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true"
|
||||||
|
[button]="'none'"></sf>
|
||||||
|
</ng-container>
|
||||||
|
</nz-modal>
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
:host::ng-deep {
|
||||||
|
.filter-wrap {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,144 @@
|
|||||||
|
|
||||||
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
|
||||||
|
import { SFComponent, SFSchema } from '@delon/form';
|
||||||
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
|
import { SystemService } from '../../services/system.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-sms-template',
|
||||||
|
templateUrl: './sms-template.component.html',
|
||||||
|
styleUrls: ['./sms-template.component.less']
|
||||||
|
})
|
||||||
|
export class SmsTemplateComponent implements OnInit {
|
||||||
|
@ViewChild('st', { static: true })
|
||||||
|
st!: STComponent;
|
||||||
|
@ViewChild('sf', { static: false })
|
||||||
|
sf!: SFComponent;
|
||||||
|
@ViewChild('sfEdit', { static: false })
|
||||||
|
sfEdit!: SFComponent;
|
||||||
|
visible = false;
|
||||||
|
isVisible = false;
|
||||||
|
tempData = {};
|
||||||
|
|
||||||
|
searchSchema: SFSchema = {
|
||||||
|
properties: {
|
||||||
|
templateCode: {
|
||||||
|
type: 'string',
|
||||||
|
title: '模板编码',
|
||||||
|
ui: { placeholder: '请输入模板编码' }
|
||||||
|
},
|
||||||
|
templateContent: {
|
||||||
|
type: 'string',
|
||||||
|
title: '模板内容',
|
||||||
|
ui: { placeholder: '请输入模板内容' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
editSchema: SFSchema = {
|
||||||
|
properties: {
|
||||||
|
templateCode: {
|
||||||
|
type: 'string',
|
||||||
|
title: '模板编码',
|
||||||
|
ui: { placeholder: '请输入模板编码' }
|
||||||
|
},
|
||||||
|
templateContent: {
|
||||||
|
type: 'string',
|
||||||
|
title: '模板内容',
|
||||||
|
ui: { placeholder: '请输入模板内容' }
|
||||||
|
},
|
||||||
|
templateName: {
|
||||||
|
type: 'string',
|
||||||
|
title: '模板名称',
|
||||||
|
ui: { placeholder: '请输入模板名称' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
columns: STColumn[] = [
|
||||||
|
{ title: '模板编码', className: 'text-center', index: 'templateCode' },
|
||||||
|
{ title: '模板内容', className: 'text-center', index: 'templateContent' },
|
||||||
|
// {
|
||||||
|
// title: '创建人', className: 'text-center', index: 'content',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
title: '更新时间',
|
||||||
|
index: 'modifyTime',
|
||||||
|
type: 'date',
|
||||||
|
className: 'text-center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: '编辑',
|
||||||
|
click: i => this.edit(i),
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
constructor(public service: SystemService, private nzModalService: NzModalService, private route: ActivatedRoute) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void { }
|
||||||
|
|
||||||
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
|
if (this.sf) {
|
||||||
|
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||||
|
}
|
||||||
|
return requestOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
edit(item: any) {
|
||||||
|
// console.log(item);
|
||||||
|
this.tempData = item;
|
||||||
|
this.isVisible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
search() {
|
||||||
|
this.st.reload(1);
|
||||||
|
this.visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
open(): void {
|
||||||
|
this.visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
close(): void {
|
||||||
|
this.visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleOk(): void {
|
||||||
|
const value = this.sfEdit.value;
|
||||||
|
const { id, templateCode, templateName, templateContent } = value
|
||||||
|
const params = {
|
||||||
|
id,
|
||||||
|
templateCode,
|
||||||
|
templateName,
|
||||||
|
templateContent
|
||||||
|
}
|
||||||
|
|
||||||
|
this.service.request(this.service.$api_smsTemplate_edit, params).subscribe(res => {
|
||||||
|
// console.log(res);
|
||||||
|
if (res) {
|
||||||
|
this.isVisible = false;
|
||||||
|
this.st.reload();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
handleCancel(): void {
|
||||||
|
this.isVisible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置表单
|
||||||
|
*/
|
||||||
|
resetSF() {
|
||||||
|
this.sf.reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-12-20 17:18:43
|
* @Date: 2021-12-20 17:18:43
|
||||||
* @LastEditTime : 2022-04-20 16:15:23
|
* @LastEditTime : 2022-04-20 16:48:26
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\services\\system.service.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\services\\system.service.ts
|
||||||
@ -182,6 +182,12 @@ export class SystemService extends BaseService {
|
|||||||
$api_getAppList: string = '';
|
$api_getAppList: string = '';
|
||||||
$api_getRoleTemplateListByAppId: string = '';
|
$api_getRoleTemplateListByAppId: string = '';
|
||||||
$api_updateRoleInfo: string = '';
|
$api_updateRoleInfo: string = '';
|
||||||
|
|
||||||
|
// 短信模板list
|
||||||
|
$api_smsTemplate_page = '/api/mdc/pbc/smsTemplate/list/page';
|
||||||
|
// 短信模板编辑
|
||||||
|
$api_smsTemplate_edit = '/api/mdc/pbc/smsTemplate/save';
|
||||||
|
|
||||||
constructor(public injector: Injector) {
|
constructor(public injector: Injector) {
|
||||||
super(injector);
|
super(injector);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import { AnnouncementMessageComponent } from './components/announcement-message/
|
|||||||
import { InsuranceSetComponent } from './components/insurance-set/insurance-set.component';
|
import { InsuranceSetComponent } from './components/insurance-set/insurance-set.component';
|
||||||
import { NetworkFreightNewComponent } from './components/network-freight/new/new.component';
|
import { NetworkFreightNewComponent } from './components/network-freight/new/new.component';
|
||||||
import { NoTeManagementComponent } from './components/note-management/note-management.component';
|
import { NoTeManagementComponent } from './components/note-management/note-management.component';
|
||||||
|
import { SmsTemplateComponent } from './components/sms-template/sms-template.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: 'staff-management', component: StaffManagementComponent },
|
{ path: 'staff-management', component: StaffManagementComponent },
|
||||||
@ -44,7 +45,8 @@ const routes: Routes = [
|
|||||||
{ path: 'close-account', component: CloseAccountComponent },
|
{ path: 'close-account', component: CloseAccountComponent },
|
||||||
// { path: 'btn-management', component: BtnManagementComponent },
|
// { path: 'btn-management', component: BtnManagementComponent },
|
||||||
{ path: 'announcement-message', component: AnnouncementMessageComponent },
|
{ path: 'announcement-message', component: AnnouncementMessageComponent },
|
||||||
{ path: 'insurance-set', component: InsuranceSetComponent }
|
{ path: 'insurance-set', component: InsuranceSetComponent },
|
||||||
|
{ path: 'sms-template', component: SmsTemplateComponent}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
@ -33,6 +33,7 @@ import { AnnouncementMessageComponent } from './components/announcement-message/
|
|||||||
import { InsuranceSetComponent } from './components/insurance-set/insurance-set.component';
|
import { InsuranceSetComponent } from './components/insurance-set/insurance-set.component';
|
||||||
import { NetworkFreightNewComponent } from './components/network-freight/new/new.component';
|
import { NetworkFreightNewComponent } from './components/network-freight/new/new.component';
|
||||||
import { NoTeManagementComponent } from './components/note-management/note-management.component';
|
import { NoTeManagementComponent } from './components/note-management/note-management.component';
|
||||||
|
import { SmsTemplateComponent } from './components/sms-template/sms-template.component';
|
||||||
|
|
||||||
const COMPONENTS = [
|
const COMPONENTS = [
|
||||||
StaffManagementComponent,
|
StaffManagementComponent,
|
||||||
@ -50,7 +51,8 @@ const COMPONENTS = [
|
|||||||
NetworkFreightNewComponent,
|
NetworkFreightNewComponent,
|
||||||
AnnouncementMessageComponent,
|
AnnouncementMessageComponent,
|
||||||
InsuranceSetComponent,
|
InsuranceSetComponent,
|
||||||
NoTeManagementComponent
|
NoTeManagementComponent,
|
||||||
|
SmsTemplateComponent
|
||||||
];
|
];
|
||||||
const NOTROUTECOMPONENTS = [
|
const NOTROUTECOMPONENTS = [
|
||||||
BuyerTranspowerComponent,
|
BuyerTranspowerComponent,
|
||||||
|
|||||||
@ -0,0 +1,98 @@
|
|||||||
|
<page-header-wrapper [title]="''"></page-header-wrapper>
|
||||||
|
|
||||||
|
<nz-card>
|
||||||
|
<!-- 搜索表单 -->
|
||||||
|
<div nz-row nzGutter="8">
|
||||||
|
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
||||||
|
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||||
|
</div>
|
||||||
|
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
||||||
|
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading" (click)="search()" >查询</button>
|
||||||
|
<button nz-button (click)="resetSF()">重置</button>
|
||||||
|
<button nz-button (click)="resetSF()">导出</button>
|
||||||
|
<button nz-button nzType="link" (click)="expandToggle()">
|
||||||
|
{{ !_$expand ? '展开' : '收起' }}
|
||||||
|
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nz-card>
|
||||||
|
<nz-card>
|
||||||
|
<nz-tabset [nzTabBarExtraContent]="extraTemplate" *ngIf="tabs.length>0">
|
||||||
|
|
||||||
|
<nz-tab *ngFor="let tab of tabs" [nzTitle]="tab.name" (nzSelect)="selectChange(tab)">
|
||||||
|
</nz-tab>
|
||||||
|
</nz-tabset>
|
||||||
|
<!-- 数据列表 -->
|
||||||
|
<st #st [scroll]="{x:'1200px'}" [data]="service.$api_getTaxOrderPage_page" [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, 50, 100] }" [loading]="service.http.loading">
|
||||||
|
<ng-template st-row="putStatus" let-item let-index="index">
|
||||||
|
<!-- <a (click)="viewAuditResult(item)" *ngIf="item?.billStatus === '2'">{{item?.billStatusLabel}}</a> -->
|
||||||
|
<span *ngIf="item?.putStatus == '0'">待上传</span>
|
||||||
|
<span *ngIf="item?.putStatus == '1'">已上传</span>
|
||||||
|
<span *ngIf="item?.putStatus == '3'">上传中</span>
|
||||||
|
<span *ngIf="item?.putStatus == '2'" style="color: red;" (click)="unnormal(item)">上传异常</span>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template st-row="invoiceNO" let-item let-index="index">
|
||||||
|
<a href="/">{{item.billCode}}</a>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template st-row="checkStatus" let-item let-index="index">
|
||||||
|
<!-- <a (click)="viewAuditResult(item)" *ngIf="item?.billStatus === '2'">{{item?.billStatusLabel}}</a> -->
|
||||||
|
<span *ngIf="item?.checkStatus == '0'">校验中</span>
|
||||||
|
<span *ngIf="item?.checkStatus == '1'">通过</span>
|
||||||
|
<!-- <span *ngIf="item?.checkStatus == '2'" style="color: red;" (click)="unnormal(item)">不通过</span> -->
|
||||||
|
<span *ngIf="item?.checkStatus == '2'" style="color: red;" (click)="viewResult(item)">不通过</span>
|
||||||
|
|
||||||
|
</ng-template>
|
||||||
|
<ng-template st-row="driverName" let-item let-index="index">
|
||||||
|
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }} </div>
|
||||||
|
</ng-template>
|
||||||
|
<!-- <ng-template st-row="localValid" let-item let-index="index">
|
||||||
|
<a (click)="viewResult(item)" *ngIf="item?.billStatus === '2'">{{item?.billStatusLabel}}</a>
|
||||||
|
<span *ngIf="item?.billStatus !== '2'">{{item?.billStatusLabel}}</span>
|
||||||
|
</ng-template> -->
|
||||||
|
<ng-template st-row="loadingPicture" let-item let-index="index">
|
||||||
|
<div class="imgBox">
|
||||||
|
<div *ngIf="item.loadingPicture">
|
||||||
|
<app-imagelist style="width: 60px" [imgList]="[item.loadingPicture]"> </app-imagelist>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template st-row="unloadPicture" let-item let-index="index">
|
||||||
|
<div class="imgBox">
|
||||||
|
<div *ngIf="item.unloadPicture">
|
||||||
|
<app-imagelist style="width: 40px" [imgList]="[item.unloadPicture]"> </app-imagelist>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template st-row="loadingLadingBill" let-item let-index="index">
|
||||||
|
<div class="imgBox">
|
||||||
|
<div *ngIf="item.loadingLadingBill">
|
||||||
|
<app-imagelist style="width: 40px" [imgList]="[item.loadingLadingBill]"> </app-imagelist>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template st-row="signatureForm" let-item let-index="index">
|
||||||
|
<div class="imgBox">
|
||||||
|
<div *ngIf="item.signatureForm">
|
||||||
|
<app-imagelist style="width: 40px" [imgList]="[item.signatureForm]"> </app-imagelist>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template st-row="orderAmount" let-item let-index="index">
|
||||||
|
<div class="text-right">{{item?.orderAmount | currency }}</div>
|
||||||
|
</ng-template>
|
||||||
|
</st>
|
||||||
|
</nz-card>
|
||||||
|
<ng-template #extraTemplate>
|
||||||
|
<div class="d-flex align-items-center">
|
||||||
|
<div class="mr-md">
|
||||||
|
已选择
|
||||||
|
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据
|
||||||
|
</div>
|
||||||
|
<button *ngIf="selectedIndex === '0' || selectedIndex === '2'" nz-button nzType="primary" (click)="upload()">上传</button>
|
||||||
|
<button *ngIf="selectedIndex === '1' || selectedIndex === '3'" nz-button nzType="primary" (click)="recall()">撤回</button>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
:host {
|
||||||
|
.text-black {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
display: inline-block;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
stroke-width: 0;
|
||||||
|
stroke: currentColor;
|
||||||
|
/* stylelint-disable-next-line order/properties-order */
|
||||||
|
fill: currentColor;
|
||||||
|
}
|
||||||
|
::ng-deep {
|
||||||
|
.imgBox {
|
||||||
|
display: flex;
|
||||||
|
img {
|
||||||
|
width: 60px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,460 @@
|
|||||||
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
|
import { STColumn, STComponent, STData } from '@delon/abc/st';
|
||||||
|
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||||
|
import { ShipperBaseService } from '@shared';
|
||||||
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
|
import { of } from 'rxjs';
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
|
import { TaxManagementService } from '../../services/tax-management.service';
|
||||||
|
import { TaxManagementInvoiceUploadSettingComponent } from './upload-setting/upload-setting.component';
|
||||||
|
import { TaxManagementInvoiceVerifyResultComponent } from './verify-result/verify-result.component';
|
||||||
|
// import { DatatableReportingUploadSettingComponent } from '../upload-setting/upload-setting.component';
|
||||||
|
// import { DatatableReportingVerifyResultComponent } from '../verify-result/verify-result.component';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-tax-management-invoice-reporting',
|
||||||
|
templateUrl: './invoice-reporting.component.html',
|
||||||
|
styleUrls: ['./invoice-reporting.component.less']
|
||||||
|
})
|
||||||
|
export class TaxManagementInvoiceReportingComponent implements OnInit {
|
||||||
|
_$expand = false;
|
||||||
|
ui!: SFUISchema;
|
||||||
|
schema!: SFSchema;
|
||||||
|
columns!: STColumn[];
|
||||||
|
@ViewChild('st', { static: false }) st!: STComponent;
|
||||||
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
|
tabType!: string;
|
||||||
|
isLoading: boolean = false;
|
||||||
|
tabs: any[] = [
|
||||||
|
{ name: '待上传', value: '0' },
|
||||||
|
{ name: '上传中', value: '3' },
|
||||||
|
{ name: '已上传', value: '1' },
|
||||||
|
{ name: '异常', value: '2' },
|
||||||
|
{ name: '全部', value: '' }
|
||||||
|
];
|
||||||
|
selectedIndex = '0'; //选择的项目
|
||||||
|
serviceTel = '';
|
||||||
|
constructor(
|
||||||
|
public service: TaxManagementService,
|
||||||
|
private router: Router,
|
||||||
|
private ar: ActivatedRoute,
|
||||||
|
public shipperservice: ShipperBaseService,
|
||||||
|
private modal: NzModalService,
|
||||||
|
public shipperSrv: ShipperBaseService
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询字段个数
|
||||||
|
*/
|
||||||
|
get queryFieldCount(): number {
|
||||||
|
return Object.keys(this.schema?.properties || {}).length;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询参数
|
||||||
|
*/
|
||||||
|
get reqParams() {
|
||||||
|
const params = Object.assign({}, this.sf?.value || {}, {
|
||||||
|
putStatus: this.selectedIndex,
|
||||||
|
});
|
||||||
|
delete params._$expand;
|
||||||
|
return { ...params };
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选中行
|
||||||
|
*/
|
||||||
|
get selectedRows() {
|
||||||
|
return this.st?.list.filter((item: any) => item.checked) || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 伸缩查询条件
|
||||||
|
*/
|
||||||
|
expandToggle() {
|
||||||
|
this._$expand = !this._$expand;
|
||||||
|
this.sf?.setValue('/_$expand', this._$expand);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置表单
|
||||||
|
*/
|
||||||
|
resetSF() {
|
||||||
|
this.sf.reset();
|
||||||
|
this._$expand = false;
|
||||||
|
this.isLoading = true
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 程序初始化入口
|
||||||
|
*/
|
||||||
|
ngOnInit() {
|
||||||
|
this.initSF();
|
||||||
|
this.initST();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化查询表单
|
||||||
|
*/
|
||||||
|
initSF() {
|
||||||
|
this.schema = {
|
||||||
|
properties: {
|
||||||
|
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||||
|
putStatus: {
|
||||||
|
title: '上传状态',
|
||||||
|
type: 'string',
|
||||||
|
default: 0,
|
||||||
|
enum: [
|
||||||
|
{ label: '全部', value: 0 },
|
||||||
|
{ label: '待上传', value: 1 },
|
||||||
|
{ label: '上传中', value: 2 },
|
||||||
|
{ label: '已上传', value: 3 },
|
||||||
|
{ label: '异常', value: 4 }
|
||||||
|
],
|
||||||
|
|
||||||
|
ui: {
|
||||||
|
placeholder: '请选择',
|
||||||
|
widget: 'select',
|
||||||
|
allowClear: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
networkTransporter: {
|
||||||
|
type: 'string',
|
||||||
|
title: '网络货运人',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
placeholder: '请选择',
|
||||||
|
allowClear: true,
|
||||||
|
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hrto: {
|
||||||
|
type: 'string',
|
||||||
|
title: '购买方',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
placeholder: '请选择',
|
||||||
|
allowClear: true,
|
||||||
|
asyncData: () => this.service.getCRMCustomerId()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
billCode: {
|
||||||
|
title: '订单号', type: 'string', ui: {
|
||||||
|
placeholder: '请输入', visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
recentlyPutTime: {
|
||||||
|
title: '开票日期',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
widget: 'sl-from-to',
|
||||||
|
type: 'date',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value,
|
||||||
|
},
|
||||||
|
} as SFDateWidgetSchema,
|
||||||
|
},
|
||||||
|
orderPayTime: {
|
||||||
|
title: '上传日期',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
widget: 'sl-from-to',
|
||||||
|
type: 'date',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value,
|
||||||
|
},
|
||||||
|
} as SFDateWidgetSchema,
|
||||||
|
},
|
||||||
|
wayBillCode: {
|
||||||
|
type: 'string',
|
||||||
|
title: '发票号码',
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入',
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
wayBillCode1: {
|
||||||
|
type: 'string',
|
||||||
|
title: '发票代码',
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入',
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sts: {
|
||||||
|
title: '发票状态',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
widget: 'dict-select',
|
||||||
|
containsAllLabel: true,
|
||||||
|
params: { dictKey: 'vatinv:status' },
|
||||||
|
containAllLable: true,
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
} as SFSelectWidgetSchema
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
this.ui = {
|
||||||
|
'*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 }, enter: () => this.search() },
|
||||||
|
$time: { grid: { span: 24 } },
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化数据列表
|
||||||
|
*/
|
||||||
|
initST() {
|
||||||
|
this.columns = [
|
||||||
|
{ title: '', type: 'checkbox', className: 'text-center', width: '60px', },
|
||||||
|
{ title: '上传状态', render: 'putStatus', className: 'text-center', width: '120px', },
|
||||||
|
{ title: '发票类型', render: 'checkStatus', className: 'text-center', width: '120px', },
|
||||||
|
{
|
||||||
|
title: '发票号码',
|
||||||
|
index: 'billCode',
|
||||||
|
render: 'invoiceNO',
|
||||||
|
className: 'text-center',
|
||||||
|
width: '150px',
|
||||||
|
},
|
||||||
|
{ title: '发票代码', index: 'wayBillCode', className: 'text-center', width: '150px', },
|
||||||
|
{
|
||||||
|
title: '网络货运人',
|
||||||
|
index: 'networkTransporterName',
|
||||||
|
className: 'text-center',
|
||||||
|
width: '180px',
|
||||||
|
},
|
||||||
|
{ title: '购买方企业名称', index: 'loadingAddress', render: 'loadingPlace', className: 'text-center', width: '200px' },
|
||||||
|
{ title: '购买方统一社会信用代码', index: 'loadingDetailedAddress', render: 'loadingPlace', className: 'text-center', width: '200px' },
|
||||||
|
{ title: '订单号', index: 'unloadAddress', render: 'dischargePlace', className: 'text-center', width: '120px' },
|
||||||
|
{ title: '货物名称', index: 'unloadDetailedAddress', className: 'text-center', width: '180px' },
|
||||||
|
{ title: '价税合计', index: 'shipperName', className: 'text-center', width: '180px' },
|
||||||
|
{ title: '开票日期', index: 'shipperProvinceCode', className: 'text-center', width: '180px' },
|
||||||
|
{ title: '发票所属月份', index: 'recordTime', className: 'text-center', width: '250px' },
|
||||||
|
{ title: '发票状态', index: 'wayBillCreateTime', className: 'text-center', width: '200px' },
|
||||||
|
{ title: '上传日期', index: 'loadTime', className: 'text-center', width: '200px' },
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*撤回
|
||||||
|
* @param record 记录实例
|
||||||
|
*/
|
||||||
|
recall() {
|
||||||
|
if (this.selectedRows.length === 0) {
|
||||||
|
this.openWainingModal('请选择需要撤回的数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let params: any[] = [];
|
||||||
|
this.selectedRows.forEach(item => {
|
||||||
|
params.push(item.id);
|
||||||
|
});
|
||||||
|
this.modal.confirm({
|
||||||
|
nzTitle: '撤回提示',
|
||||||
|
nzContent: ' 撤回后可以重新上传,重新上传会覆盖已上传数据,确定要撤回?',
|
||||||
|
nzOkText: '确定',
|
||||||
|
nzCancelText: '取消',
|
||||||
|
nzOnOk: () => {
|
||||||
|
this.service.request(this.service.$api_get_recessionTaxOrder, params).subscribe((res: any) => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success('撤销成功');
|
||||||
|
this.search();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*撤销
|
||||||
|
* @param record 记录实例
|
||||||
|
*/
|
||||||
|
resetData() {
|
||||||
|
if (this.selectedRows.length === 0) {
|
||||||
|
this.openWainingModal('请选择需要更新的数据!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let params: any[] = [];
|
||||||
|
this.selectedRows.forEach(item => {
|
||||||
|
params.push(item.billId);
|
||||||
|
});
|
||||||
|
this.service.request(this.service.$api_get_renewalOrderById, params).subscribe((res: any) => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success('更新成功');
|
||||||
|
this.st.load(1);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*撤销
|
||||||
|
* @param record 记录实例
|
||||||
|
*/
|
||||||
|
unnormal(value: any) {
|
||||||
|
// if (this.selectedRows.length === 0) {
|
||||||
|
// this.openWainingModal('请选择需要更新的数据!');
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
console.log(this.selectedRows);
|
||||||
|
let params: any[] = [];
|
||||||
|
this.selectedRows.forEach(item => {
|
||||||
|
params.push(item.id);
|
||||||
|
});
|
||||||
|
this.modal.confirm({
|
||||||
|
nzTitle: '税务审核结果',
|
||||||
|
nzContent: '订单结算时间所在月份与申报月份不一致',
|
||||||
|
nzOkText: '确定',
|
||||||
|
nzCancelText: '',
|
||||||
|
nzOnOk: () => {
|
||||||
|
this.service.request(this.service.$api_get_recessionTaxOrder, params).subscribe((res: any) => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success('撤销成功');
|
||||||
|
this.search();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
selectChange(item: any) {
|
||||||
|
console.log(item);
|
||||||
|
|
||||||
|
this.selectedIndex = item?.value || '';
|
||||||
|
setTimeout(() => {
|
||||||
|
this.st.load();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看当行数据
|
||||||
|
*/
|
||||||
|
view(record: STData) {
|
||||||
|
// this.router.navigate(['../view', record.uuid], { relativeTo: this.ar });
|
||||||
|
this.router.navigate(['../detail'], {
|
||||||
|
queryParams: {
|
||||||
|
id: record.id,
|
||||||
|
},
|
||||||
|
relativeTo: this.ar
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// appeal(item: any) {
|
||||||
|
// const modalRef = this.modal.create({
|
||||||
|
// nzTitle: '申诉',
|
||||||
|
// nzWidth: '40%',
|
||||||
|
// nzContent: CtcAppealComponent,
|
||||||
|
// nzComponentParams: {
|
||||||
|
// i: item,
|
||||||
|
// status: 'add'
|
||||||
|
// },
|
||||||
|
// nzFooter: null
|
||||||
|
// });
|
||||||
|
// modalRef.afterClose.subscribe(res => {
|
||||||
|
// if (res) {
|
||||||
|
// this.search({ representationsStatus: '' });
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传
|
||||||
|
*/
|
||||||
|
upload() {
|
||||||
|
if (this.selectedRows.length === 0) {
|
||||||
|
this.openWainingModal('请选择需要上传的数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let params: any[] = [];
|
||||||
|
this.selectedRows.forEach(item => {
|
||||||
|
params.push(item.id);
|
||||||
|
});
|
||||||
|
this.service.request(this.service.$api_get_uploadingTaxOrder, params).subscribe((res: any) => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success('上传成功');
|
||||||
|
this.st.load();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param params 上传设置
|
||||||
|
*/
|
||||||
|
uploadSetting() {
|
||||||
|
const modalRef = this.modal.create({
|
||||||
|
nzTitle: '税务上传设置',
|
||||||
|
nzWidth: 600,
|
||||||
|
nzContent: TaxManagementInvoiceUploadSettingComponent,
|
||||||
|
nzComponentParams: {},
|
||||||
|
nzFooter: null
|
||||||
|
});
|
||||||
|
modalRef.afterClose.subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.st.load();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看校验结果
|
||||||
|
*/
|
||||||
|
viewResult(item: any) {
|
||||||
|
const modalRef = this.modal.create({
|
||||||
|
nzTitle: '本地校验结果',
|
||||||
|
nzWidth: 1200,
|
||||||
|
nzContent: TaxManagementInvoiceVerifyResultComponent,
|
||||||
|
nzComponentParams: {
|
||||||
|
record: item
|
||||||
|
},
|
||||||
|
nzFooter: null
|
||||||
|
});
|
||||||
|
modalRef.afterClose.subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.st.load();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看监管审核结果
|
||||||
|
*/
|
||||||
|
viewAuditResult(record: any) {
|
||||||
|
if (record?.billStatus !== '2') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.openWainingModal('监管审核结果', record?.result)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
search() {
|
||||||
|
this.st.load(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异步导出
|
||||||
|
*/
|
||||||
|
export() {
|
||||||
|
this.service.exportStart(this.sf?.value, this.service.$api_async_export_order_reporting_list);
|
||||||
|
}
|
||||||
|
|
||||||
|
openWainingModal(content: string, title = '提示') {
|
||||||
|
this.modal.warning({
|
||||||
|
nzMask: false,
|
||||||
|
nzTitle: title,
|
||||||
|
nzContent: content,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
<nz-spin [nzSpinning]="!i"></nz-spin>
|
||||||
|
<sf *ngIf="i" #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none">
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button nz-button type="button" (click)="close()">取消</button>
|
||||||
|
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="!sf.valid"
|
||||||
|
[nzLoading]="service.http.loading">修改</button>
|
||||||
|
</div>
|
||||||
|
</sf>
|
||||||
@ -0,0 +1,110 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { SFSchema, SFUISchema } from '@delon/form';
|
||||||
|
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||||
|
import { TaxManagementService } from '../../../services/tax-management.service';
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-datatable-invoice-upload-setting',
|
||||||
|
templateUrl: './upload-setting.component.html',
|
||||||
|
})
|
||||||
|
export class TaxManagementInvoiceUploadSettingComponent implements OnInit {
|
||||||
|
record: any = {};
|
||||||
|
i: any = {};
|
||||||
|
schema!: SFSchema;
|
||||||
|
ui!: SFUISchema;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private modal: NzModalRef,
|
||||||
|
public service: TaxManagementService
|
||||||
|
) { }
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.initSF();
|
||||||
|
// this.loadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化查询表单
|
||||||
|
*/
|
||||||
|
initSF() {
|
||||||
|
this.schema = {
|
||||||
|
properties: {
|
||||||
|
no: {
|
||||||
|
type: 'string',
|
||||||
|
title: '订单数据',
|
||||||
|
enum: [
|
||||||
|
{
|
||||||
|
label: '手动上传',
|
||||||
|
value: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '自动上传',
|
||||||
|
value: '2'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
description: '开启自动上传后,订单将在支付完成且风险单校验通过后自动上传',
|
||||||
|
ui: {
|
||||||
|
widget: 'radio',
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
owner: {
|
||||||
|
type: 'string',
|
||||||
|
title: '资金数据',
|
||||||
|
enum: [
|
||||||
|
{
|
||||||
|
label: '手动上传',
|
||||||
|
value: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '自动上传',
|
||||||
|
value: '2'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
description: '开启自动上传后,订单将在支付完成且风险单校验通过后自动上传',
|
||||||
|
ui: {
|
||||||
|
widget: 'radio',
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
required: ['owner', 'no'],
|
||||||
|
}
|
||||||
|
this.ui = {
|
||||||
|
'*': {
|
||||||
|
spanLabelFixed: 100,
|
||||||
|
grid: { span: 24 },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设置数据
|
||||||
|
*/
|
||||||
|
loadData() {
|
||||||
|
this.service.request(this.service.$api_get_upload_setting, {}).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.i = res;
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
* @param value
|
||||||
|
*/
|
||||||
|
save(value: any): void {
|
||||||
|
this.service.request(this.service.$api_upload_setting_save, { ...value }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success('保存成功');
|
||||||
|
this.modal.close(true);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
close(): void {
|
||||||
|
this.modal.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
<div nz-row>
|
||||||
|
<div style="width: 10%">
|
||||||
|
<nz-tabset [nzTabPosition]="'left'" style="height: 100%">
|
||||||
|
<nz-tab [nzTitle]="item?.name" *ngFor="let item of tabs" (nzSelect)="selectTab(item)"></nz-tab>
|
||||||
|
</nz-tabset>
|
||||||
|
</div>
|
||||||
|
<div style="width: 90%">
|
||||||
|
<st
|
||||||
|
#st
|
||||||
|
[scroll]="{ x: '1000px', y: '600px' }"
|
||||||
|
[data]="service.$api_get_getTaxFieldCheckList"
|
||||||
|
[columns]="columns"
|
||||||
|
[req]="{ process: beforeReq }"
|
||||||
|
[res]="{ reName: { list: 'data', total: 'data' } , process: afterRes}"
|
||||||
|
[page]="{ show: false }"
|
||||||
|
[loading]="false"
|
||||||
|
[bordered]="true"
|
||||||
|
>
|
||||||
|
<ng-template st-row="freightDetails" let-item>
|
||||||
|
<div *ngFor="let item of item.freightDetails">
|
||||||
|
<div>{{ item.expenseName }}:{{ item.price | currency }} </div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
</st>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button nz-button type="button" (click)="close()">取消</button>
|
||||||
|
<button nz-button type="submit" nzType="primary" (click)="update()" [nzLoading]="service.http.loading">修改</button>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,139 @@
|
|||||||
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
|
||||||
|
import { SFSchema } from '@delon/form';
|
||||||
|
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||||
|
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||||
|
import { TaxManagementService } from '../../../services/tax-management.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-tax-management-Invoice-reporting-verify-result',
|
||||||
|
templateUrl: './verify-result.component.html',
|
||||||
|
})
|
||||||
|
export class TaxManagementInvoiceVerifyResultComponent implements OnInit {
|
||||||
|
searchSchema: SFSchema = {
|
||||||
|
properties: {
|
||||||
|
no: {
|
||||||
|
type: 'string',
|
||||||
|
title: '编号'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
@ViewChild('st') private readonly st!: STComponent;
|
||||||
|
columns: STColumn[] = [];
|
||||||
|
record: any = {}
|
||||||
|
subjectType: string = '0';
|
||||||
|
tabs: any[] = [
|
||||||
|
{ name: '平台信息', value: '0' },
|
||||||
|
{ name: '货主信息', value: '1' },
|
||||||
|
{ name: '司机信息', value: '2' },
|
||||||
|
{ name: '订单信息', value: '3' },
|
||||||
|
];
|
||||||
|
|
||||||
|
// get reqParams() {
|
||||||
|
// console.log(this.subjectType);
|
||||||
|
// const params ={
|
||||||
|
// subjectId: this.record?.shipperId,
|
||||||
|
// subjectType: this.subjectType,
|
||||||
|
// }
|
||||||
|
// return params;
|
||||||
|
// }
|
||||||
|
beforeReq = (requestOptions: STRequestOptions) => {let a: string = '';
|
||||||
|
switch (this.subjectType) {
|
||||||
|
case '0':
|
||||||
|
a = this.record?.networkTransporterId;
|
||||||
|
break
|
||||||
|
case '1':
|
||||||
|
a = this.record?.shipperId;
|
||||||
|
break
|
||||||
|
case '2':
|
||||||
|
a = this.record?.driverId;
|
||||||
|
break
|
||||||
|
case '3':
|
||||||
|
a = this.record?.wayBillId;
|
||||||
|
break
|
||||||
|
}
|
||||||
|
Object.assign(requestOptions.body, {
|
||||||
|
subjectId: a ,
|
||||||
|
subjectType: this.subjectType,
|
||||||
|
});
|
||||||
|
return requestOptions;
|
||||||
|
};
|
||||||
|
afterRes = (data: any[], rawData?: any) => {
|
||||||
|
console.log(data)
|
||||||
|
return data.map(item => ({
|
||||||
|
...item,
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
constructor(public service: TaxManagementService, private modalRef: NzModalRef, public router: Router) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
console.log(this.record);
|
||||||
|
|
||||||
|
this.initST();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化数据列表
|
||||||
|
*/
|
||||||
|
initST() {
|
||||||
|
this.columns = [
|
||||||
|
{ title: '序号', type: 'no', className: 'text-center', width: '60px', },
|
||||||
|
{ title: '校验字段', index: 'checkFieldName', className: 'text-center', width: '120px', },
|
||||||
|
{
|
||||||
|
title: '是否必填',
|
||||||
|
index: 'requiredStatus',
|
||||||
|
className: 'text-center',
|
||||||
|
width: '100px',
|
||||||
|
type: 'enum',
|
||||||
|
enum: {
|
||||||
|
0: '否',
|
||||||
|
1: '是'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ title: '上传值', index: 'fieldValue', className: 'text-center', width: '150px', },
|
||||||
|
{
|
||||||
|
title: '本地校验', index: 'checkStatus', className: 'text-center', width: '100px',
|
||||||
|
type: 'enum',
|
||||||
|
enum: {
|
||||||
|
0: '校验中',
|
||||||
|
1: '通过',
|
||||||
|
2: '不通过'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ title: '错误内容', index: 'remark', className: 'text-center', width: '150px', },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
add(): void {
|
||||||
|
// this.modal
|
||||||
|
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||||
|
// .subscribe(() => this.st.reload());
|
||||||
|
}
|
||||||
|
|
||||||
|
selectTab(e: any) {
|
||||||
|
setTimeout(() => {
|
||||||
|
console.log(e?.value);
|
||||||
|
|
||||||
|
this.subjectType = e?.value;
|
||||||
|
console.log(this.subjectType);
|
||||||
|
this.st.load(1);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
update() {
|
||||||
|
if (this.record?.billType === '1') {
|
||||||
|
window.open(location.origin + `/#/order-management/vehicle-detailChange/${this.record?.id}`)
|
||||||
|
|
||||||
|
} else if (this.record.billType === '2') {
|
||||||
|
window.open(location.origin + `/#/order-management/bulk-detailChange/${this.record?.id}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(): void {
|
||||||
|
this.modalRef.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -13,6 +13,7 @@ import { RouterModule, Routes } from '@angular/router';
|
|||||||
import { TaxManagementIndividualCollectComponent } from './components/individual-collect/individual-collect.component';
|
import { TaxManagementIndividualCollectComponent } from './components/individual-collect/individual-collect.component';
|
||||||
import { TaxManagementIndividualDeclareComponent } from './components/individual-declare/individual-declare.component';
|
import { TaxManagementIndividualDeclareComponent } from './components/individual-declare/individual-declare.component';
|
||||||
import { TaxManagementIndividualIncomeComponent } from './components/individual-income/individual-income.component';
|
import { TaxManagementIndividualIncomeComponent } from './components/individual-income/individual-income.component';
|
||||||
|
import { TaxManagementInvoiceReportingComponent } from './components/invoice-reporting/invoice-reporting.component';
|
||||||
import { TaxManagementOrderReportingComponent } from './components/order-reporting/order-reporting.component';
|
import { TaxManagementOrderReportingComponent } from './components/order-reporting/order-reporting.component';
|
||||||
|
|
||||||
|
|
||||||
@ -21,6 +22,7 @@ const routes: Routes = [
|
|||||||
{ path: 'income', component: TaxManagementIndividualIncomeComponent },
|
{ path: 'income', component: TaxManagementIndividualIncomeComponent },
|
||||||
{ path: 'collect', component: TaxManagementIndividualCollectComponent },
|
{ path: 'collect', component: TaxManagementIndividualCollectComponent },
|
||||||
{ path: 'declare', component: TaxManagementIndividualDeclareComponent },
|
{ path: 'declare', component: TaxManagementIndividualDeclareComponent },
|
||||||
|
{ path: 'invoiceReport', component: TaxManagementInvoiceReportingComponent },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,9 @@ import { SharedModule, SHARED_G2_MODULES } from '@shared';
|
|||||||
import { TaxManagementIndividualCollectComponent } from './components/individual-collect/individual-collect.component';
|
import { TaxManagementIndividualCollectComponent } from './components/individual-collect/individual-collect.component';
|
||||||
import { TaxManagementIndividualDeclareComponent } from './components/individual-declare/individual-declare.component';
|
import { TaxManagementIndividualDeclareComponent } from './components/individual-declare/individual-declare.component';
|
||||||
import { TaxManagementIndividualIncomeComponent } from './components/individual-income/individual-income.component';
|
import { TaxManagementIndividualIncomeComponent } from './components/individual-income/individual-income.component';
|
||||||
|
import { TaxManagementInvoiceReportingComponent } from './components/invoice-reporting/invoice-reporting.component';
|
||||||
|
import { TaxManagementInvoiceUploadSettingComponent } from './components/invoice-reporting/upload-setting/upload-setting.component';
|
||||||
|
import { TaxManagementInvoiceVerifyResultComponent } from './components/invoice-reporting/verify-result/verify-result.component';
|
||||||
import { TaxManagementOrderReportingComponent } from './components/order-reporting/order-reporting.component';
|
import { TaxManagementOrderReportingComponent } from './components/order-reporting/order-reporting.component';
|
||||||
import { TaxManagementUploadSettingComponent } from './components/order-reporting/upload-setting/upload-setting.component';
|
import { TaxManagementUploadSettingComponent } from './components/order-reporting/upload-setting/upload-setting.component';
|
||||||
import { TaxManagementOrderVerifyResultComponent } from './components/order-reporting/verify-result/verify-result.component';
|
import { TaxManagementOrderVerifyResultComponent } from './components/order-reporting/verify-result/verify-result.component';
|
||||||
@ -25,9 +28,12 @@ const COMPONENTS: Type<void>[] = [
|
|||||||
TaxManagementUploadSettingComponent,
|
TaxManagementUploadSettingComponent,
|
||||||
TaxManagementIndividualIncomeComponent,
|
TaxManagementIndividualIncomeComponent,
|
||||||
TaxManagementIndividualCollectComponent,
|
TaxManagementIndividualCollectComponent,
|
||||||
TaxManagementIndividualDeclareComponent
|
TaxManagementIndividualDeclareComponent,
|
||||||
|
TaxManagementInvoiceReportingComponent,
|
||||||
|
TaxManagementInvoiceUploadSettingComponent,
|
||||||
|
TaxManagementInvoiceVerifyResultComponent
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|||||||
@ -4,10 +4,8 @@ import { Component, ViewChild } from '@angular/core';
|
|||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/form';
|
||||||
import { ShipperBaseService } from '@shared';
|
|
||||||
import { isTemplateRef } from 'ng-zorro-antd/core/util';
|
|
||||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
|
import { delay } from 'rxjs/operators';
|
||||||
|
|
||||||
import { TicketService } from '../../services/ticket.service';
|
import { TicketService } from '../../services/ticket.service';
|
||||||
import { PrintOrderModalComponent } from './print-order-modal/print-order-modal.component';
|
import { PrintOrderModalComponent } from './print-order-modal/print-order-modal.component';
|
||||||
@ -278,22 +276,28 @@ export class InvoiceRequestedComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
downloadPdf(item: any) {
|
downloadPdf(item: any) {
|
||||||
this.service.request(this.service.$api_downloadPdf, { vatappHId: item.id }).subscribe(res => {
|
if (item?.reconciliationUrl) {
|
||||||
if (res?.reconciliationUrl) {
|
this.service.reviewPDF(item.reconciliationUrl);
|
||||||
this.service.reviewPDF(res.reconciliationUrl);
|
} else {
|
||||||
} else {
|
this.service
|
||||||
this.service
|
.request(this.service.$api_downloadPdf, { vatappHId: item.id })
|
||||||
.request(this.service.$api_download_Reconciliatio_pdf, { vatappHId: item.id, esignFlowId: res.esignFlowId })
|
.pipe(delay(3000))
|
||||||
.subscribe(rs => {
|
.subscribe(res => {
|
||||||
if (rs?.reconciliationUrl) {
|
if (res?.esignFlowId) {
|
||||||
this.service.reviewPDF(rs.reconciliationUrl);
|
this.service
|
||||||
} else {
|
.request(this.service.$api_download_Reconciliatio_pdf, { vatappHId: item.id, esignFlowId: res.esignFlowId })
|
||||||
// this.service.msgSrv.warning('获取对账单失败');
|
.subscribe(rs => {
|
||||||
}
|
if (rs?.reconciliationUrl) {
|
||||||
});
|
this.service.reviewPDF(rs.reconciliationUrl);
|
||||||
// this.service.msgSrv.warning('获取对账单失败');
|
} else {
|
||||||
}
|
// this.service.msgSrv.warning('获取对账单失败');
|
||||||
});
|
}
|
||||||
|
this.st.load(1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// this.service.msgSrv.warning('获取对账单失败');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -702,6 +702,10 @@
|
|||||||
{
|
{
|
||||||
"text": "税务申报",
|
"text": "税务申报",
|
||||||
"link": "/tax/declare"
|
"link": "/tax/declare"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "发票上传",
|
||||||
|
"link": "/tax/invoiceReport"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user