Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
wangshiming
2021-12-29 13:12:35 +08:00
17 changed files with 448 additions and 307 deletions

View File

@ -9,21 +9,24 @@
<nz-card> <nz-card>
<nz-row [nzGutter]="16"> <nz-row [nzGutter]="16">
<nz-col [nzXl]="9" [nzLg]="8" [nzSm]="12"> <nz-col [nzXl]="9" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="天津怡亚通物流科技有限公司(平安)" [nzTitle]="'张三13812345678'" <nz-statistic [nzValue]="params?.ltdName+'('+(params?.bankType===1?'平安':'浦发')+')'"
[nzValueStyle]="{'font-size':'16px','font-weight':'bold'}" class="bold"> [nzTitle]="params.name+'('+params.phone+')'" [nzValueStyle]="{'font-size':'16px','font-weight':'bold'}"
class="bold">
</nz-statistic> </nz-statistic>
</nz-col> </nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12"> <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="100,000,000.00 元" [nzTitle]="'账户余额'" <nz-statistic [nzValue]="(params?.availableBalance || 0)+'' " [nzTitle]="'账户余额'"
[nzValueStyle]="{'font-size':'16px',color:'red'}"> [nzValueStyle]="{'font-size':'16px',color:'red'}">
</nz-statistic> </nz-statistic>
</nz-col> </nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12"> <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="100,000.00 元" [nzTitle]="'收入金额'" [nzValueStyle]="{'font-size':'16px',color:'red'}"> <nz-statistic [nzValue]="(info?.incomeAmount || 0) +''" [nzTitle]="'收入金额'"
[nzValueStyle]="{'font-size':'16px',color:'red'}">
</nz-statistic> </nz-statistic>
</nz-col> </nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12"> <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="100,000.00 元" [nzTitle]="'支出金额'" [nzValueStyle]="{'font-size':'16px',color:'red'}"> <nz-statistic [nzValue]="(info?.payAmount || 0) +''" [nzTitle]="'支出金额'"
[nzValueStyle]="{'font-size':'16px',color:'red'}">
</nz-statistic> </nz-statistic>
</nz-col> </nz-col>
</nz-row> </nz-row>
@ -50,9 +53,9 @@
</nz-card> </nz-card>
<nz-card class="content-box" nzBordered> <nz-card class="content-box" nzBordered>
<st #st [data]="service.$mock_url" [columns]="columns" <st #st [data]="service.$api_get_shipper_or_driver_account_detail" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }"></st> [loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }" (change)="stChange($event)"></st>
</nz-card> </nz-card>

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router'; import { ActivatedRoute, 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 } from '@delon/form'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
@ -19,17 +19,58 @@ export class DriverAccountDetailComponent implements OnInit {
searchSchema: SFSchema = this.initSF(); searchSchema: SFSchema = this.initSF();
_$expand = false; _$expand = false;
constructor(public service: FreightAccountService) {}
ngOnInit(): void {} info: any = {};
params: any = {};
constructor(public service: FreightAccountService, private route: ActivatedRoute) {
this.params = route.snapshot.queryParams;
}
ngOnInit(): void {
this.loadInfo();
}
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, {
ltdid: this.params.ltdid,
projectId: this.params.projectId,
enterpriseId: this.params.enterpriseId,
roleId: this.params.roleId
});
if (this.sf) { if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf.value }); Object.assign(requestOptions.body, { ...this.sf.value });
} }
return requestOptions; return requestOptions;
}; };
loadInfo() {
console.log(1);
this.service
.request(this.service.$api_get_driver_account_balance_detail, {
...this.sf?.value,
ltdid: this.params.ltdid,
projectId: this.params.projectId,
enterpriseId: this.params.enterpriseId,
roleId: this.params.roleId,
pageIndex: this.st.pi,
pageSize: this.st.ps,
createTime: {
start: this.sf?.value?.createTime?.[0] || null,
end: this.sf?.value?.createTime?.[1] || null
}
})
.subscribe(res => {
if (res) {
this.info = res;
}
});
}
stChange(e: STChange): void {
console.log(e);
}
exportList() { exportList() {
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps }); this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
} }
@ -67,9 +108,10 @@ export class DriverAccountDetailComponent implements OnInit {
title: '交易时间', title: '交易时间',
type: 'string', type: 'string',
ui: { ui: {
widget: 'date', widget: 'sl-from-to-search',
mode: 'range', format: 'yyyy-MM-dd',
format: 'yyyy-MM-dd' placeholder: '请选择',
nzShowTime: true
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
orderSn2: { orderSn2: {

View File

@ -1,4 +1,4 @@
<page-header-wrapper title="货主账户"> <page-header-wrapper title="司机账户">
</page-header-wrapper> </page-header-wrapper>
<nz-card class="search-box"> <nz-card class="search-box">
@ -22,7 +22,7 @@
</nz-card> </nz-card>
<nz-card class="content-box"> <nz-card class="content-box">
<st #st [data]="service.$api_get_account_balance" [columns]="columns" <st #st [data]="service.$api_get_driver_account_page" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"

View File

@ -61,17 +61,17 @@ export class DriverAccountComponent implements OnInit {
hidden: true hidden: true
} }
}, },
tenantName: { name: {
type: 'string', type: 'string',
title: '司机姓名', title: '司机姓名',
ui: { placeholder: '请输入' } ui: { placeholder: '请输入' }
}, },
phone: { idNo: {
type: 'string', type: 'string',
title: '证件号码', title: '证件号码',
ui: { placeholder: '请输入' } ui: { placeholder: '请输入' }
}, },
page: { phone: {
type: 'string', type: 'string',
title: '手机号', title: '手机号',
ui: { ui: {
@ -126,9 +126,9 @@ export class DriverAccountComponent implements OnInit {
title: '创建时间', title: '创建时间',
type: 'string', type: 'string',
ui: { ui: {
widget: 'date', widget: 'sl-from-to-search',
mode: 'range',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
placeholder: '请选择',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
@ -140,15 +140,15 @@ export class DriverAccountComponent implements OnInit {
private initST(): STColumn[] { private initST(): STColumn[] {
return [ return [
{ title: '司机姓名', index: 'tenantName' }, { title: '司机姓名', index: 'name' },
{ title: '证件号码', index: 'description' }, { title: '证件号码', index: 'idNo' },
{ title: '手机号', index: 'description' }, { title: '手机号', index: 'phone' },
{ title: '网络货运人', index: 'ltdid' }, { title: '网络货运人', index: 'ltdName' },
{ title: '银行类型', index: 'description', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } }, { title: '银行类型', index: 'bankType', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } },
{ title: '虚拟账户', index: 'virtualAccount' }, { title: '虚拟账户', index: 'virtualAccount' },
{ title: '可用余额', index: 'availableBalance' }, { title: '可用余额', index: 'availableBalance' },
{ title: '冻结余额', index: 'freezeBalance' }, { title: '冻结余额', index: 'freezeBalance' },
{ title: '本月累计提现金额', index: 'description', width: 150 }, { title: '本月累计提现金额', index: 'withdrawBalance', width: 150 },
{ title: '账户总余额', index: 'availableBalance' }, { title: '账户总余额', index: 'availableBalance' },
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 }, { title: '创建时间', index: 'createTime', type: 'date', width: 150 },
{ {
@ -156,7 +156,20 @@ export class DriverAccountComponent implements OnInit {
buttons: [ buttons: [
{ {
text: '查看明细', text: '查看明细',
click: item => this.router.navigate(['/financial-management/driver-account/detail/1']) click: item =>
this.router.navigate(['/financial-management/driver-account/detail/' + item.id], {
queryParams: {
name: item.name,
phone: item.phone,
ltdName: item.ltdName,
bankType: item.bankType,
projectId: item.projectId,
availableBalance: item.availableBalance,
enterpriseId: item.enterpriseId,
roleId: item.roleId,
ltdid: item.ltdid
}
})
} }
] ]
} }

View File

@ -9,17 +9,18 @@
<nz-card> <nz-card>
<nz-row [nzGutter]="16"> <nz-row [nzGutter]="16">
<nz-col [nzXl]="9" [nzLg]="8" [nzSm]="12"> <nz-col [nzXl]="9" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="天津怡亚通物流科技有限公司(浦发)" [nzTitle]="'茅台集团股份有限公司'" <nz-statistic [nzValue]="params.ltdName+'('+(params.bankType===1?'平安':'浦发')+')'"
[nzValueStyle]="{'font-size':'16px','font-weight':'bold'}" class="bold"> [nzTitle]="params.tenantName" [nzValueStyle]="{'font-size':'16px','font-weight':'bold'}" class="bold">
</nz-statistic> </nz-statistic>
</nz-col> </nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12"> <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="100,000,000.00 元" [nzTitle]="'账户余额'" <nz-statistic [nzValue]="params?.availableBalance+'' " [nzTitle]="'账户余额'"
[nzValueStyle]="{'font-size':'16px',color:'red'}"> [nzValueStyle]="{'font-size':'16px',color:'red'}">
</nz-statistic> </nz-statistic>
</nz-col> </nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12"> <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
<nz-statistic [nzValue]="(info?.incomeAmount || 0) +''" [nzTitle]="'收入金额'" [nzValueStyle]="{'font-size':'16px',color:'red'}"> <nz-statistic [nzValue]="(info?.incomeAmount || 0) +''" [nzTitle]="'收入金额'"
[nzValueStyle]="{'font-size':'16px',color:'red'}">
</nz-statistic> </nz-statistic>
</nz-col> </nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12"> <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
@ -38,7 +39,8 @@
[button]="'none'"></sf> [button]="'none'"></sf>
</div> </div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"> <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> <button nz-button nzType="primary" [nzLoading]="service.http.loading"
(click)="st?.load(1);loadInfo();">查询</button>
<button nz-button (click)="resetSF()">重置</button> <button nz-button (click)="resetSF()">重置</button>
<button nz-button (click)="exportList()"> 导出</button> <button nz-button (click)="exportList()"> 导出</button>
<button nz-button nzType="link" (click)="expandToggle()"> <button nz-button nzType="link" (click)="expandToggle()">
@ -50,9 +52,9 @@
</nz-card> </nz-card>
<nz-card class="content-box" nzBordered> <nz-card class="content-box" nzBordered>
<st #st [data]="service.$api_get_balance_by_shipper" [columns]="columns" <st #st [data]="service.$api_get_shipper_or_driver_account_detail" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterReq }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }"></st> [loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }" (change)="stChange($event)"></st>
</nz-card> </nz-card>

View File

@ -19,30 +19,55 @@ export class FreightAccountDetailComponent implements OnInit {
searchSchema: SFSchema = this.initSF(); searchSchema: SFSchema = this.initSF();
info: any = {}; info: any = {};
params: any = {};
_$expand = false; _$expand = false;
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private route: ActivatedRoute) {} constructor(public service: FreightAccountService, private nzModalService: NzModalService, private route: ActivatedRoute) {
this.params = route.snapshot.queryParams;
}
ngOnInit(): void {} ngOnInit(): void {
this.loadInfo();
}
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { transactionNumber: this.route.snapshot.params.id }); Object.assign(requestOptions.body, {
ltdid: this.params.ltdid,
projectId: this.params.projectId,
enterpriseId: this.params.enterpriseId,
roleId: this.params.roleId
});
if (this.sf) { if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf.value }); Object.assign(requestOptions.body, { ...this.sf.value });
} }
return requestOptions; return requestOptions;
}; };
afterReq = (data: any[], rawData?: any) => { loadInfo() {
console.log(data, rawData); this.service
if (rawData?.success) { .request(this.service.$api_get_shipper_account_balance_detail, {
this.info = { ...this.sf.value,
incomeAmount: rawData.data.rawData, ltdid: this.params.ltdid,
payAmount: rawData.data.payAmount projectId: this.params.projectId,
}; enterpriseId: this.params.enterpriseId,
} roleId: this.params.roleId,
return data; pageIndex: this.st.pi,
}; pageSize: this.st.ps,
createTime: {
start: this.sf.value.createTime?.[0] || null,
end: this.sf.value.createTime?.[1] || null
}
})
.subscribe(res => {
if (res) {
this.info = res;
}
});
}
stChange(e: STChange): void {
console.log(e);
}
exportList() { exportList() {
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps }); this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
@ -81,9 +106,10 @@ export class FreightAccountDetailComponent implements OnInit {
title: '交易时间', title: '交易时间',
type: 'string', type: 'string',
ui: { ui: {
widget: 'date', widget: 'sl-from-to-search',
mode: 'range', format: 'yyyy-MM-dd',
format: 'yyyy-MM-dd' placeholder: '请选择',
nzShowTime: true
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
transactionNumber: { transactionNumber: {

View File

@ -22,7 +22,7 @@
</nz-card> </nz-card>
<nz-card class="content-box"> <nz-card class="content-box">
<st #st [data]="service.$api_get_account_balance" [columns]="columns" <st #st [data]="service.$api_get_shipper_account_page" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"

View File

@ -70,12 +70,12 @@ export class FreightAccountComponent implements OnInit {
title: '企业名称', title: '企业名称',
ui: { placeholder: '请输入' } ui: { placeholder: '请输入' }
}, },
phone: { name: {
type: 'string', type: 'string',
title: '联系人', title: '联系人',
ui: { placeholder: '请输入' } ui: { placeholder: '请输入' }
}, },
page: { phone: {
type: 'string', type: 'string',
title: '联系人电话', title: '联系人电话',
ui: { ui: {
@ -126,9 +126,9 @@ export class FreightAccountComponent implements OnInit {
title: '创建时间', title: '创建时间',
type: 'string', type: 'string',
ui: { ui: {
widget: 'date', widget: 'sl-from-to-search',
mode: 'range',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
placeholder: '请选择',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
@ -141,13 +141,13 @@ export class FreightAccountComponent implements OnInit {
private initST(): STColumn[] { private initST(): STColumn[] {
return [ return [
{ title: '企业名称', index: 'tenantName' }, { title: '企业名称', index: 'tenantName' },
{ title: '联系人', index: 'description' }, { title: '联系人', index: 'name' },
{ title: '联系人电话', index: 'description' }, { title: '联系人电话', index: 'phone' },
{ title: '网络货运人', index: 'ltdid' }, { title: '网络货运人', index: 'ltdName' },
{ title: '银行类型', index: 'bankType', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } }, { title: '银行类型', index: 'bankType', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } },
{ title: '虚拟账户', index: 'virtualAccount' }, { title: '虚拟账户', index: 'virtualAccount' },
{ title: '可用余额', index: 'availableBalance' }, { title: '可用余额', index: 'availableBalance' },
{ title: '冻结余额', index: 'freezeBalance' }, { title: '冻结余额', index: 'availableBalance' },
{ title: '累计消费金额', index: 'description' }, { title: '累计消费金额', index: 'description' },
{ title: '账户总余额', render: 'availableBalance' }, { title: '账户总余额', render: 'availableBalance' },
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 }, { title: '创建时间', index: 'createTime', type: 'date', width: 150 },
@ -162,7 +162,19 @@ export class FreightAccountComponent implements OnInit {
buttons: [ buttons: [
{ {
text: '查看明细', text: '查看明细',
click: item => this.router.navigate(['/financial-management/freight-account/detail/' + item.id]) click: item =>
this.router.navigate(['/financial-management/freight-account/detail/' + item.id], {
queryParams: {
tenantName: item.tenantName,
ltdName: item.ltdName,
bankType: item.bankType,
availableBalance: item.availableBalance,
projectId: item.projectId,
enterpriseId: item.enterpriseId,
roleId: item.roleId,
ltdid: item.ltdid
}
})
} }
] ]
} }

View File

@ -7,8 +7,17 @@ import { BaseService, ShipperBaseService } from '@shared';
export class FreightAccountService extends ShipperBaseService { export class FreightAccountService extends ShipperBaseService {
$mock_url = '/rule?_allow_anonymous=true'; $mock_url = '/rule?_allow_anonymous=true';
// 获取账户余额信息 // 运营端获取货主账户信息
$api_get_account_balance = '/api/fcc/accountBalance/getAccountBalance'; $api_get_shipper_account_page = '/api/fcc/accountBalance/getShipperAccountBalanceByOperator';
// 运营端获取司机账户信息
$api_get_driver_account_page = '/api/fcc/accountBalance/getDriverAccountBalanceByOperator';
// 运营端获取货主账户明细信息
$api_get_shipper_or_driver_account_detail = '/api/fcc/accountBalance/getShipperAccountBalanceDetailByOperator';
// 运营端端获取货主交易收入与支出金额
$api_get_shipper_account_balance_detail = '/api/fcc/accountBalanceDetail/getAccountBalanceShipperIncomeDetailByOperator';
// 运营端端获取司机交易收入与支出金额
$api_get_driver_account_balance_detail = '/api/fcc/accountBalanceDetail/getAccountBalanceDriverIncomeDetailByOperator';
// 货主端获取账户余额交易明细 // 货主端获取账户余额交易明细
$api_get_balance_by_shipper = '/api/fcc/accountBalanceDetail/getAccountBalanceByShipperPage'; $api_get_balance_by_shipper = '/api/fcc/accountBalanceDetail/getAccountBalanceByShipperPage';

View File

@ -14,8 +14,6 @@ export class UserLogsComponent implements OnInit {
@ViewChild('sf', { static: false }) @ViewChild('sf', { static: false })
sf!: SFComponent; sf!: SFComponent;
url = `/rule?_allow_anonymous=true`;
searchSchema: SFSchema = { searchSchema: SFSchema = {
properties: { properties: {
expand: { expand: {

View File

@ -10,56 +10,57 @@
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="150" col="1"> <div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="150" col="1">
<se label="网络货运人"> <se label="网络货运人">
天津怡亚通物流科技有限公司 {{headerInfo?.ltdidName}}
</se> </se>
<se label="申请编号"> <se label="申请编号">
VP2021012010 {{headerInfo?.vatappHId}}
</se> </se>
<se label="已开/全部订单数"> <se label="已开/全部订单数">
50/100 {{headerInfo?.vatinvBillNum}} / {{headerInfo?.ordlines}}
</se> </se>
<se label="已开/全部发票金额"> <se label="已开/全部发票金额">
5000.00/10000.00 {{headerInfo?.vatinvHAmount}} / {{headerInfo?.vatinvHAmount}}
</se> </se>
<se label="网络货运人"> <se label="已开发票张数">
2 2
</se> </se>
</div> </div>
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1"> <div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<se label="购买方"> <se label="购买方">
茅台股份有限公司 {{headerInfo?.projectName}}
</se> </se>
<se label="纳税号"> <se label="纳税号">
912301046656930913 {{headerInfo?.taxNumber}}
</se> </se>
<se label="地址"> <se label="地址">
贵州省贵阳市 {{headerInfo?.registerAddr}}
</se> </se>
<se label="电话"> <se label="电话">
075588393198 {{headerInfo?.registerPhone}}
</se> </se>
<se label="开户行"> <se label="开户行">
中国工商银行股份有限公司哈贵阳支行 {{headerInfo?.bankName}}
</se> </se>
<se label="银行账户"> <se label="银行账户">
3500044119068126788 {{headerInfo?.bankAccount}}
</se> </se>
</div> </div>
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1"> <div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<se label="服务名称"> <se label="服务名称">
运输服务费 {{headerInfo?.vatname}}
</se> </se>
<se label="销货清单"> <se label="销货清单">
需要 {{headerInfo?.isdetail}}
</se> </se>
<se label="其他要求"> <se label="其他要求">
单位按吨 {{headerInfo?.otherremarks}}
</se> </se>
<se label="票面备注"> <se label="票面备注">
<p style="margin-bottom: 0;margin-top: 5px;">起运地:广东省深圳市南山区</p> {{headerInfo?.vatremarks}}
<!-- <p style="margin-bottom: 0;margin-top: 5px;">起运地:广东省深圳市南山区</p>
<p style="margin-bottom: 0;">目的地:湖北省武汉市青山区</p> <p style="margin-bottom: 0;">目的地:湖北省武汉市青山区</p>
<p style="margin-bottom: 0;">货物名称:钢材</p> <p style="margin-bottom: 0;">货物名称:钢材</p>
<p style="margin-bottom: 0;">车型车牌:高栏车 粤B36889</p> <p style="margin-bottom: 0;">车型车牌:高栏车 粤B36889</p> -->
</se> </se>
</div> </div>
</div> </div>
@ -99,9 +100,13 @@
</div> </div>
</div> </div>
<st #st [data]="service.$mock_url" [columns]="columns" <st #st [data]="service.$api_get_invoice_requested_order_detail" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '200px' }" (change)="stChange($event)"></st> [loading]="service.http.loading" [scroll]="{ x:'1200px',y: '200px' }" (change)="stChange($event)">
<ng-template st-row="billHCode" let-item let-index="index" let-column="column">
<a class="text-primary" (click)="routeToOrder(item)"> {{ item.billHCode }}</a>
</ng-template>
</st>
</nz-card> </nz-card>

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Router } from '@angular/router'; import { ActivatedRoute, 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, SFTextWidgetSchema } from '@delon/form'; import { SFComponent, SFSchema, SFDateWidgetSchema, SFTextWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
@ -25,10 +25,30 @@ export class InvoiceRequestedDetailComponent implements OnInit {
selectedRows: any[] = []; selectedRows: any[] = [];
totalCallNo = 0; totalCallNo = 0;
_$expand = false; _$expand = false;
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
vatappHId = null;
headerInfo: any = {};
constructor(
public service: TicketService,
private nzModalService: NzModalService,
private route: ActivatedRoute,
private router: Router
) {
this.vatappHId = route.snapshot.params.id;
this.loadHeadInfo();
}
ngOnInit(): void {} ngOnInit(): void {}
loadHeadInfo() {
this.service.request(this.service.$api_get_invoice_requested_header_detail, { vatappHId: this.vatappHId }).subscribe(res => {
console.log(res);
if (res) {
this.headerInfo = res;
}
});
}
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) { if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf.value }); Object.assign(requestOptions.body, { ...this.sf.value });
@ -85,7 +105,14 @@ export class InvoiceRequestedDetailComponent implements OnInit {
nzTitle: '确定从当前批次中移除所选订单?', nzTitle: '确定从当前批次中移除所选订单?',
nzContent: '移除后相关订单可以重新提交开票申请', nzContent: '移除后相关订单可以重新提交开票申请',
nzOnOk: () => { nzOnOk: () => {
console.log(this.selectedRows); const ids = this.selectedRows.map(order => order.billHId);
this.service.request(this.service.$api_remove_bill, ids).subscribe(res => {
if (res) {
this.service.msgSrv.success('移除成功');
this.loadHeadInfo();
this.st.reload();
}
});
} }
}); });
} }
@ -94,6 +121,14 @@ export class InvoiceRequestedDetailComponent implements OnInit {
history.go(-1); history.go(-1);
} }
routeToOrder(item: any) {
if (item.billType === 1) {
this.router.navigate(['/order-management/vehicle-detail/' + item.billHCode]);
} else {
this.router.navigate(['/order-management/bulk-detail/' + item.billHCode]);
}
}
/** /**
* 重置表单 * 重置表单
*/ */
@ -118,14 +153,14 @@ export class InvoiceRequestedDetailComponent implements OnInit {
hidden: true hidden: true
} }
}, },
orderSn: { billHCode: {
type: 'string', type: 'string',
title: '订单号', title: '订单号',
ui: { ui: {
placeholder: '请输入' placeholder: '请输入'
} }
}, },
receiveName: { vatappSts: {
type: 'string', type: 'string',
title: '开票状态', title: '开票状态',
enum: [ enum: [
@ -143,17 +178,21 @@ export class InvoiceRequestedDetailComponent implements OnInit {
}, },
default: '' default: ''
}, },
orderSn2: { vatinvcode: {
type: 'string', type: 'string',
title: '发票号码', title: '发票号码',
ui: { ui: {
placeholder: '请输入' placeholder: '请输入'
} }
}, },
receiveName2: { billType: {
type: 'string', type: 'string',
title: '订单类型', title: '订单类型',
enum: [{ label: '全部', value: '' }], enum: [
{ label: '全部', value: '' },
{ label: '整车', value: '1' },
{ label: '大宗', value: '2' }
],
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
@ -163,7 +202,7 @@ export class InvoiceRequestedDetailComponent implements OnInit {
}, },
default: '' default: ''
}, },
orderS2n2: { driverinfo: {
type: 'string', type: 'string',
title: '运司机', title: '运司机',
ui: { ui: {
@ -183,18 +222,17 @@ export class InvoiceRequestedDetailComponent implements OnInit {
} }
} }
}, },
receiveN2ame2: { projectId: {
title: '项目',
type: 'string', type: 'string',
title: '所属项目', default: '',
enum: [{ label: '全部', value: '' }],
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} },
}, asyncData: () => this.service.getEnterpriseProject()
default: '' }
} }
} }
}; };
@ -203,22 +241,22 @@ export class InvoiceRequestedDetailComponent implements OnInit {
private initST(): STColumn[] { private initST(): STColumn[] {
return [ return [
{ title: '', index: 'key', type: 'checkbox' }, { title: '', index: 'key', type: 'checkbox' },
{ title: '订单号', index: 'no', width: 150 }, { title: '订单号', render: 'billHCode', width: 150 },
{ title: '订单完成日期', index: 'updatedAt', type: 'date', width: 150 }, { title: '订单完成日期', index: 'billTime', type: 'date', width: 150 },
{ title: '开票状态', index: 'callNo', width: 100 }, { title: '开票状态', index: 'vatappSts', width: 100 },
{ title: '所属项目', index: 'callNo', width: 100 }, { title: '所属项目', index: 'projectId', width: 100 },
{ title: '订单类型', index: 'callNo', width: 100 }, { title: '订单类型', index: 'billType', width: 100, type: 'enum', enum: { 1: '整车', 2: '大宗' } },
{ title: '装货地', index: 'callNo', width: 90 }, { title: '装货地', index: 'loadingfrom', width: 90 },
{ title: '卸货地', index: 'callNo', width: 90 }, { title: '卸货地', index: 'loadingto', width: 90 },
{ title: '货物信息', index: 'callNo', width: 100 }, { title: '货物信息', index: 'goodsinfo', width: 100 },
{ title: '承运司机', index: 'callNo', width: 140, format: item => `特朗普</br>13789040523</br>粤GT8419` }, { title: '承运司机', index: 'driverinfo', width: 140 },
{ title: '申请金额', index: 'callNo', width: 100 }, { title: '申请金额', index: 'billkpmoney', width: 100 },
{ title: '运输费', index: 'callNo', width: 90 }, { title: '运输费', index: 'fjfmoney2', width: 90 },
{ title: '附加费', index: 'callNo', width: 90 }, { title: '附加费', index: 'fjfmoney', width: 90 },
{ title: '开票金额', index: 'callNo', width: 100 }, { title: '开票金额', index: 'billkpmoney', width: 100 },
{ title: '税率', index: 'callNo', width: 90 }, { title: '税率', index: 'billvatrate', width: 90 },
{ title: '发票号码', index: 'callNo', width: 100 }, { title: '发票号码', index: 'vatinvcode', width: 100 },
{ title: '开票日期', index: 'updatedAt', type: 'date', width: 150 } { title: '开票日期', index: 'vatinvtime', type: 'date', width: 150 }
]; ];
} }
} }

View File

@ -43,11 +43,15 @@
</ng-template> </ng-template>
<st #st [data]="service.$mock_url" [columns]="columns" <st #st [data]="service.$api_get_invoice_requested_page" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }" (change)="stChange($event)"></st> [loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }" (change)="stChange($event)">
<ng-template st-row="vatappcode" let-item let-index="index" let-column="column">
{{ item.vatappcode }} <br> <label class="text-primary">待受理</label>
</ng-template>
</st>
</nz-card> </nz-card>
<ng-template #rejectModal> <ng-template #rejectModal>

View File

@ -32,7 +32,13 @@ export class InvoiceRequestedComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) { if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf.value }); Object.assign(requestOptions.body, {
...this.sf.value,
createTime: {
start: this.sf.value.createTime?.[0] || null,
end: this.sf.value.createTime?.[1] || null
}
});
} }
return requestOptions; return requestOptions;
}; };
@ -46,10 +52,6 @@ export class InvoiceRequestedComponent implements OnInit {
} }
} }
approval(): void {}
add(): void {}
rejectAction(item: any[]) { rejectAction(item: any[]) {
const modal = this.nzModalService.create({ const modal = this.nzModalService.create({
nzTitle: '驳回', nzTitle: '驳回',
@ -128,8 +130,8 @@ export class InvoiceRequestedComponent implements OnInit {
{ {
type: 'default', type: 'default',
label: '移除', label: '移除',
onClick: (com) => { onClick: com => {
com?.removeOrder(com.data) com?.removeOrder(com.data);
} }
}, },
{ {
@ -175,14 +177,14 @@ export class InvoiceRequestedComponent implements OnInit {
hidden: true hidden: true
} }
}, },
orderSn: { vatappcode: {
type: 'string', type: 'string',
title: '申请编号', title: '申请编号',
ui: { ui: {
placeholder: '请输入' placeholder: '请输入'
} }
}, },
orderSn2: { billHCode: {
type: 'string', type: 'string',
title: '订单号', title: '订单号',
ui: { ui: {
@ -196,55 +198,50 @@ export class InvoiceRequestedComponent implements OnInit {
placeholder: '请输入' placeholder: '请输入'
} }
}, },
receiveName2: { projectId: {
title: '项目',
type: 'string', type: 'string',
title: '购买方', default: '',
enum: [
{ label: '全部', value: '全部' },
{ label: '企业认证审核', value: '企业认证审核' },
{ label: '企业管理员审核', value: '企业管理员审核' }
],
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} },
asyncData: () => this.service.getEnterpriseProject()
} }
}, },
receiveName3: { ltd: {
type: 'string', type: 'string',
title: '网络货运人', title: '网络货运人',
enum: [{ label: '全部', value: '全部' }],
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} },
} allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder()
},
default: ''
}, },
receiveName23: { otherReq: {
type: 'string', type: 'string',
title: '其他需求', title: '其他需求',
enum: [ enum: [{ label: '全部', value: '' }],
{ label: '全部', value: '全部' },
{ label: '有', value: '有' },
{ label: '无', value: '无' }
],
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} },
default: ''
}, },
receiveName: { sts: {
type: 'string', type: 'string',
title: '处理进度', title: '处理进度',
enum: [ enum: [
{ label: '全部', value: '全部' }, { label: '全部', value: '' },
{ label: '待审核', value: '待审核' }, { label: '待审核', value: '待审核' },
{ label: '处理中', value: '处理中' }, { label: '处理中', value: '处理中' },
{ label: '已完成', value: '已完成' }, { label: '已完成', value: '已完成' },
@ -257,27 +254,29 @@ export class InvoiceRequestedComponent implements OnInit {
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} },
default: ''
}, },
createTime: { createTime: {
title: '申请时间', title: '申请时间',
type: 'string', type: 'string',
ui: { ui: {
widget: 'date', widget: 'sl-from-to-search',
mode: 'range',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
placeholder: '请选择',
nzShowTime: true,
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
re2ceiveName: { isdetail: {
type: 'string', type: 'string',
title: '销货清单', title: '销货清单',
enum: [ enum: [
{ label: '全部', value: '全部' }, { label: '全部', value: '' },
{ label: '需要', value: '需要' }, { label: '需要', value: 1 },
{ label: '不需要', value: '不需要' } { label: '不需要', value: 0 }
], ],
ui: { ui: {
widget: 'select', widget: 'select',
@ -285,7 +284,8 @@ export class InvoiceRequestedComponent implements OnInit {
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} },
default: ''
} }
} }
}; };
@ -294,23 +294,23 @@ export class InvoiceRequestedComponent implements OnInit {
private initST(): STColumn[] { private initST(): STColumn[] {
return [ return [
{ title: '', index: 'key', type: 'checkbox' }, { title: '', index: 'key', type: 'checkbox' },
{ title: '申请编号', index: 'no', width: 150, format: item => `VP202110012313</br><label class="text-primary">待受理</label>` }, { title: '申请编号', render: 'vatappcode', width: 150 },
{ title: '网络货运人', index: 'callNo', width: 120 }, { title: '网络货运人', index: 'ltdName', width: 120 },
{ title: '购买方', index: 'callNo', width: 90 }, { title: '购买方', index: 'projectName', width: 90 },
{ title: '订单数', index: 'callNo', width: 90 }, { title: '订单数', index: 'ordlines', width: 90 },
{ title: '申请金额', index: 'callNo', width: 100 }, { title: '申请金额', index: 'applyAmount', width: 100 },
{ title: '运输费', index: 'callNo', width: 90 }, { title: '运输费', index: 'fjfmoney2', width: 90 },
{ title: '附加费', index: 'callNo', width: 90 }, { title: '附加费', index: 'fjfmoney', width: 90 },
{ title: '已开票金额', index: 'callNo', width: 120 }, { title: '已开票金额', index: 'invoicedMoney', width: 120 },
{ title: '开户行', index: 'callNo', width: 90 }, { title: '开户行', index: 'bankName', width: 90 },
{ title: '银行账户', index: 'callNo', width: 100 }, { title: '银行账户', index: 'bankAccount', width: 100 },
{ title: '注册地址', index: 'callNo', width: 100 }, { title: '注册地址', index: 'registerAddr', width: 100 },
{ title: '注册电话', index: 'callNo', width: 100 }, { title: '注册电话', index: 'registerPhone', width: 100 },
{ title: '服务名称', index: 'callNo', width: 100 }, { title: '服务名称', index: 'vatname', width: 100 },
{ title: '销货清单', index: 'callNo', width: 100 }, { title: '销货清单', index: 'isdetail', width: 100 },
{ title: '其他要求', index: 'callNo', width: 100 }, { title: '其他要求', index: 'otherremarks', width: 100 },
{ title: '申请人', index: 'callNo', width: 90 }, { title: '申请人', index: 'applyName', width: 90 },
{ title: '申请时间', index: 'updatedAt', type: 'date', width: 150 }, { title: '申请时间', index: 'applyTime', type: 'date', width: 150 },
{ {
title: '操作', title: '操作',
width: 150, width: 150,
@ -330,7 +330,7 @@ export class InvoiceRequestedComponent implements OnInit {
}, },
{ {
text: '订单明细', text: '订单明细',
click: item => this.router.navigate(['/ticket/invoice-requested/detail/1']) click: item => this.router.navigate(['/ticket/invoice-requested/detail/' + item.vatappcode])
}, },
{ {
text: '下载对账单' text: '下载对账单'

View File

@ -1,13 +1,21 @@
import { Injectable, Injector } from '@angular/core'; import { Injectable, Injector } from '@angular/core';
import { BaseService } from 'src/app/shared/services'; import { ShipperBaseService } from '@shared';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
export class TicketService extends BaseService { export class TicketService extends ShipperBaseService {
$mock_url = '/rule?_allow_anonymous=true'; $mock_url = '/rule?_allow_anonymous=true';
// 运营端查询发票申请记录
$api_get_invoice_requested_page = '/api/fcc/ficoVatappH/queryOperateVatappHList';
// 获取开票申请订单明细头部信息
$api_get_invoice_requested_header_detail = '/api/fcc/ficoVatappBill/getDetailHeadByVatappHId';
// 货主/运营端获取开票申请订单明细
$api_get_invoice_requested_order_detail = '/api/fcc/ficoVatappBill/getDetailByVatapp';
// 删除开票申请订单明细
$api_remove_bill = '/api/fcc/ficoVatappBill/deletebatch';
constructor(public injector: Injector) { constructor(public injector: Injector) {
super(injector); super(injector);
} }

View File

@ -7,12 +7,10 @@ import {
SFComponent, SFComponent,
SFDateWidgetSchema, SFDateWidgetSchema,
SFSchema, SFSchema,
SFSchemaEnum,
SFTextareaWidgetSchema, SFTextareaWidgetSchema,
SFUISchema, SFUISchema,
SFUploadWidgetSchema SFUploadWidgetSchema
} from '@delon/form'; } from '@delon/form';
import { NzMessageService } from 'ng-zorro-antd/message';
import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service'; import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service';
const IMAGECONFIG = { const IMAGECONFIG = {
@ -79,6 +77,13 @@ export class FreightComponentsListNewComponent implements OnInit {
ngOnInit() {} ngOnInit() {}
submitForm() { submitForm() {
if (!this.sf1.valid || !this.sf.valid) {
this.sf.validator({ emitError: true });
this.sf1.validator({ emitError: true });
this.service.msgSrv.warning('请修改填写错误信息');
return;
}
const sfVlaue = this.sf.value; const sfVlaue = this.sf.value;
const params = {}; const params = {};
Object.assign( Object.assign(
@ -113,114 +118,99 @@ export class FreightComponentsListNewComponent implements OnInit {
} }
/* /*
* 根据地区code查询地区详情 * 根据地区code查询地区列表
* code请求参数
* type参数 name获取省市区名称fullcode获取省市区code
* num参数 1第一个地区选择2第二个地区选择
*/ */
getRegionDetailByCode(regionCode: any) { getRegionDetailByCode(regionCode: any) {
// 根据地区code查询地区详情
return this.service.request(this.service.$api_get_region_by_code, { regionCode }); return this.service.request(this.service.$api_get_region_by_code, { regionCode });
} }
checkIdCard(imgurl: any, isFront: number, type: number) { // 识别身份证 参数isFrontfront-正面、back-背面type0-申请人身份证1-法定代表人身份证
// 识别身份证 参数isFront0-正面、1-背面type0-申请人身份证1-法定代表人身份证 checkIdCard(imgurl: any, isFront: string, type: number) {
const params = { const params = {
idCardImagePath: imgurl, idCardUrl: imgurl,
isFront side: isFront
}; };
// this.service.request(this.service.$api_checkIdCard, params).subscribe((res) => { this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => {
// if (res) { if (res) {
// if (type === 0) { if (type === 1) {
// // 申请人身份证 // 法定代表人证件照
// if (isFront === 0) { if (isFront === 'front') {
// // 正面 // 正面
// if (res.name) { if (res.name) {
// this.sf.setValue('/name', res.name); this.sf1.setValue('/legalPersonIdentityDTO/name', res.name);
// } }
// if (res.idCardNumber) { if (res.number) {
// this.sf.setValue('/certificateNumber', res.idCardNumber); this.sf1.setValue('/legalPersonIdentityDTO/certificateType', 0);
// } this.sf1.setValue('/legalPersonIdentityDTO/certificateNumber', res.number);
// } }
// if (isFront === 1) { }
// // 背面 if (isFront === 'back') {
// if (res.validFrom) { // 背面
// this.sf.setValue('/validStartTime', res.validFrom); if (res.validFrom) {
// } this.sf1.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom);
// if (res.validTo) { }
// this.sf.setValue('/validEndTime', res.validTo); if (res.validTo) {
// } this.sf1.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo);
// } this.sf1.setValue('/legalPersonIdentityDTO/isLoingDate', false);
// } } else {
// if (type === 1) { this.sf1.setValue('/legalPersonIdentityDTO/isLoingDate', true);
// // 法定代表人身份证 }
// if (isFront === 0) { }
// // 正面 }
// if (res.name) { // 企业管理员证件照
// this.sf1.setValue('/name', res.name); if (type === 0) {
// } if (isFront === 'front') {
// if (res.idCardNumber) { // 正面
// this.sf1.setValue('/certificateNumber', res.idCardNumber); if (res.name) {
// } this.sf.setValue('/name', res.name);
// } }
// if (isFront === 1) { if (res.number) {
// // 背面 this.sf.setValue('/certificateNumber', res.number);
// if (res.validFrom) { }
// this.sf1.setValue('/validStartTime', res.validFrom); }
// } }
// if (res.validTo) { }
// this.sf1.setValue('/validEndTime', res.validTo); });
// }
// }
// }
// }
// });
} }
// 识别营业执照
checkBusinessLicense(imgurl: any) { checkBusinessLicense(imgurl: any) {
// 识别营业执照 this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => {
const params = { if (res) {
licenseImagePath: imgurl if (res.registrationNumber) {
}; this.sf1.setValue('/unifiedSocialCreditCode', res.registrationNumber);
// this.service.request(this.service.$api_checkBusinessLicense, params).subscribe((res) => { }
// if (res) { if (res.name) {
// if (res.unifiedSocialCreditCode) { this.sf1.setValue('/enterpriseName', res.name);
// this.sf1.setValue('/unifiedSocialCreditCode', res.unifiedSocialCreditCode); }
// } if (res.type) {
// if (res.enterpriseName) { this.sf1.setValue('/enterpriseType', res.type);
// this.sf1.setValue('/enterpriseName', res.enterpriseName); }
// } if (res.addressRegionCodes) {
// if (res.enterpriseType) { this.sf1.setValue('/enterpriseAddressCode', res.addressRegionCodes);
// this.sf1.setValue('/enterpriseType', res.enterpriseType); }
// } if (res.address) {
// if (res.addressRegionCodes) { this.sf1.setValue('/enterpriseAddress', res.address);
// this.sf1.setValue('/region', res.addressRegionCodes); }
// } if (res.registeredCapital) {
// if (res.address) { this.sf1.setValue('/registrationCapital', res.registeredCapital);
// this.sf1.setValue('/enterpriseAddress', res.address); }
// } if (res.foundDate) {
// if (res.foundDate) { this.sf1.setValue('/enterpriseRegistrationTime', res.foundDate);
// this.sf1.setValue('/enterpriseRegistrationTime', res.foundDate); }
// } if (res.businessTermStartDate) {
// if (res.registeredCapital) { this.sf1.setValue('/operatingStartTime', res.businessTermStartDate);
// this.sf1.setValue('/registrationCapital', res.registeredCapital); }
// } if (res.businessTermEndDate) {
// if (res.businessTermStartDate) { this.sf1.setValue('/operatingEndTime', res.businessTermEndDate);
// this.sf1.setValue('/operatingStartTime', res.businessTermStartDate); } else {
// } this.sf1.setValue('/isLoingDate', true);
// if (res.businessTermEndDate) { }
// this.sf1.setValue('/operatingEndTime', res.businessTermEndDate); if (res.businessScope) {
// } this.sf1.setValue('/businessScope', res.businessScope);
// if (res.businessScope) { }
// this.sf1.setValue('/businessScope', res.businessScope); }
// } });
// const len = res.addressRegionCodes.length - 1;
// this.enterpriseAddressCode = res.addressRegionCodes[len];
// this.enterpriseAddressCodeStr = res.addressRegionNames;
// if (!res.businessTermEndDate) {
// this.sf1.setValue('/dateType', true);
// }
// }
// });
} }
goBack() { goBack() {
@ -438,7 +428,7 @@ export class FreightComponentsListNewComponent implements OnInit {
change: args => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFileWatermarkPath, 0, 1); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 1);
} }
} }
} as SFUploadWidgetSchema } as SFUploadWidgetSchema
@ -455,7 +445,7 @@ export class FreightComponentsListNewComponent implements OnInit {
change: args => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFileWatermarkPath, 0, 1); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 1);
} }
} }
} as SFUploadWidgetSchema } as SFUploadWidgetSchema
@ -531,19 +521,11 @@ export class FreightComponentsListNewComponent implements OnInit {
grid: { span: 6 }, grid: { span: 6 },
class: 'input-back', class: 'input-back',
widget: 'checkbox', widget: 'checkbox',
change: i=> this.sf1?.setValue('/legalPersonIdentityDTO/validEndTime', null), change: i => this.sf1?.setValue('/legalPersonIdentityDTO/validEndTime', null)
} as SFCheckboxWidgetSchema } as SFCheckboxWidgetSchema
} }
}, },
required: [ required: ['certificatePhotoFront', 'certificatePhotoBack', 'name', 'certificateType', 'certificateNumber', 'validStartTime']
'tipsC',
'certificatePhotoFront',
'certificatePhotoBack',
'name',
'certificateType',
'certificateNumber',
'validStartTime',
]
} }
}, },
required: [ required: [
@ -610,7 +592,7 @@ export class FreightComponentsListNewComponent implements OnInit {
change: args => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.sf.setValue('/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); this.sf.setValue('/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFileWatermarkPath, 0, 1); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 0);
} }
} }
} as SFUploadWidgetSchema } as SFUploadWidgetSchema
@ -632,7 +614,6 @@ export class FreightComponentsListNewComponent implements OnInit {
change: args => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFileWatermarkPath, 0, 1);
} }
} }
} as SFUploadWidgetSchema } as SFUploadWidgetSchema
@ -668,7 +649,6 @@ export class FreightComponentsListNewComponent implements OnInit {
change: args => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.sf.setValue('/creditPhoto', args.fileList[0].response.data.fullFilePath); this.sf.setValue('/creditPhoto', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFileWatermarkPath, 0, 1);
} }
} }
} as SFUploadWidgetSchema } as SFUploadWidgetSchema
@ -705,21 +685,17 @@ export class FreightComponentsListNewComponent implements OnInit {
networkTransporter: { networkTransporter: {
type: 'string', type: 'string',
title: '网络货运人', title: '网络货运人',
enum: [
{ label: '全部', value: 0 },
{ label: '大宗发货', value: 20 }
],
default: 0,
ui: { ui: {
grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
widget: 'select', widget: 'select',
visibleIf: { placeholder: '请选择',
expand: (value: boolean) => value allowClear: true,
} asyncData: () => this.service.getNetworkFreightForwarder()
} },
default: ''
} }
}, },
required: ['createBank', '银行账号', 'adminMobile', 'name', 'certificateNumber', 'tipsD', 'creditPhoto'] required: ['createBank', 'bankAccount', 'adminMobile', 'name', 'certificateNumber', 'tipsD', 'creditPhoto']
}; };
} }
} }

View File

@ -8,16 +8,14 @@
*/ */
import { Injectable, Injector } from '@angular/core'; import { Injectable, Injector } from '@angular/core';
import { _HttpClient } from '@delon/theme'; import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message'; import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { ImageViewComponent } from 'src/app/shared/components/imagelist'; import { ImageViewComponent } from 'src/app/shared/components/imagelist';
import { BaseService } from 'src/app/shared/services/core/base.service';
import { EAFileUtil } from 'src/app/shared/utils/file.util';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
export class UsermanageService extends BaseService { export class UsermanageService extends ShipperBaseService {
// 查询企业列表 // 查询企业列表
$api_get_freight_list = '/api/mdc/cuc/enterpriseInfo/operate/list/page'; $api_get_freight_list = '/api/mdc/cuc/enterpriseInfo/operate/list/page';
@ -93,6 +91,8 @@ export class UsermanageService extends BaseService {
// 根据地区code查询列表 // 根据地区code查询列表
$api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode'; $api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode';
// 根据地区code查询地区详情
$api_get_region_detail_by_code = '/api/mdc/pbc/region/getRegionDetailByCode';
// 导出企业 // 导出企业
$api_export_enterprise = '/api/mdc/cuc/enterpriseInfo/operate/export'; $api_export_enterprise = '/api/mdc/cuc/enterpriseInfo/operate/export';
@ -101,6 +101,11 @@ export class UsermanageService extends BaseService {
// 车队长导出-运营后台 // 车队长导出-运营后台
$api_export_driver_cap = '/api/mdc/userDriverExpand/export'; $api_export_driver_cap = '/api/mdc/userDriverExpand/export';
// 营业执照识别
$api_ocr_recognize_business_license = '/api/mdc/pbc/hwc/ocr/recognizeBusinessLicense';
// 身份证识别
$api_ocr_recognize_id_card = '/api/mdc/pbc/hwc/ocr/recognizeIdCard';
constructor(public injector: Injector, private nzModalService: NzModalService) { constructor(public injector: Injector, private nzModalService: NzModalService) {
super(injector); super(injector);
} }