Merge branch 'develop_fl' into develop

This commit is contained in:
frank.fang
2022-04-20 13:18:28 +08:00
13 changed files with 698 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2021-12-06 20:20:26
* @LastEditors : Shiming
* @LastEditTime : 2022-01-26 09:27:28
* @FilePath : \\tms-obc-web\\src\\app\\routes\\interface-docking\\components\\set\\set.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="''" [logo]="logo">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
</page-header-wrapper>
<nz-card>
<app-insurance-table></app-insurance-table>
</nz-card>

View File

@ -0,0 +1,94 @@
:host {
.btn-size {
font-size: 14px;
}
.bdr {
border-right: 1px solid #ccc;
}
.bdl {
border-left: 1px solid #ccc;
}
.source-info {
p {
margin-bottom: .5em;
}
}
.freight-info-box {
width: 95%;
}
.freigth-label {
display : inline-block;
width : 50px;
text-align: right;
}
::ng-deep {
.approval-status {
.ant-steps {
width : 70%;
margin: 0 auto;
}
}
// .ant-tabs-top>.ant-tabs-nav,
// .ant-tabs-bottom>.ant-tabs-nav,
// .ant-tabs-top>div>.ant-tabs-nav,
// .ant-tabs-bottom>div>.ant-tabs-nav {
// margin: 0;
// }
// .ant-anchor-ink::before {
// width: 0;
// }
// .ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,
// .ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,
// .ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,
// .ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab {
// margin-left: 40px
// }
}
.leftPadding {
padding-right: 100px;
}
.handling-info {
min-height: 100px;
border: 1px solid #ccc;
.loading-row {
display: flex;
}
.handling-info-icon {
width: 32px;
height: 32px;
margin-right: 24px;
color: #fff;
line-height: 32px;
text-align: center;
border-radius: 50%;
&.loading-bg {
background-color: #50D4AB;
}
&.unloaing-bg {
background: #F66F6A;
}
}
.info {
flex: 1;
}
.time-info {
margin-left: 56px;
}
}
}

View File

@ -0,0 +1,24 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { interfaceDockingSetComponent } from './set.component';
describe('interfaceDockingSetComponent', () => {
let component: interfaceDockingSetComponent;
let fixture: ComponentFixture<interfaceDockingSetComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ interfaceDockingSetComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(interfaceDockingSetComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,40 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2021-12-06 20:20:26
* @LastEditors : Shiming
* @LastEditTime : 2022-01-25 20:43:37
* @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\components\\set\\set.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { NzMessageService } from 'ng-zorro-antd/message';
import {InterfaceDockingService} from '../../services/interface-docking.service';
@Component({
selector: 'app-interface-docking-set',
templateUrl: './set.component.html',
styleUrls: ['./set.component.less']
})
export class interfaceDockingSetComponent implements OnInit {
constructor(
private route: ActivatedRoute,
private msgSrv: NzMessageService,
private service: InterfaceDockingService,
) {
}
ngOnInit(): void {
this.initData()
}
initData() {
}
goBack() {
window.history.go(-1);
}
}

View File

@ -0,0 +1,85 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming
* @LastEditTime : 2022-02-28 17:00:48
* @FilePath : \\tms-obc-web\\src\\app\\routes\\interface-docking\\components\\waybill\\waybill.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper>
<nz-card>
<div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 -->
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
<sf
#sf
[schema]="schema"
[ui]="ui"
[mode]="'search'"
[disabled]="!sf?.valid"
[loading]="false"
(formSubmit)="st?.load(1)"
(formReset)="resetSF()"
></sf>
</div>
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<ng-container *ngIf="queryFieldCount > 4">
<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" [nzLoading]="service.http.loading" (click)="search()" acl [acl-ability]="['WAYBILL-LIST-search']">查询</button>
<button nz-button nzType="primary" [disabled]="false" acl [acl-ability]="['WAYBILL-LIST-export']" (click)="exprot()">导出</button>
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</ng-container>
</div>
</nz-card>
<nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
<nz-tab [nzTitle]="'新建(' + tabs?.billStatus1 + ')'"></nz-tab>
<nz-tab [nzTitle]="'运单已发送(' + tabs?.billStatus2 + ')'"></nz-tab>
<nz-tab [nzTitle]="'司机信息已获取(' + tabs?.billStatus3 + ')'"></nz-tab>
<nz-tab [nzTitle]="'司机信息已反馈(' + tabs?.billStatus4 + ')'"></nz-tab>
<nz-tab [nzTitle]="'签收单号已接收(' + tabs?.billStatus5 + ')'"></nz-tab>
<nz-tab [nzTitle]="'签收单号已反馈(' + tabs?.billStatus6 + ')'"></nz-tab>
<nz-tab [nzTitle]="'报道已接收(' + tabs?.billStatus7 + ')'"></nz-tab>
<nz-tab [nzTitle]="'报道已反馈(' + tabs?.billStatus8 + ')'"></nz-tab>
<nz-tab [nzTitle]="'发运已接收(' + tabs?.billStatus9 + ')'"></nz-tab>
<nz-tab [nzTitle]="'发运已反馈(' + tabs?.billStatus10 + ')'"></nz-tab>
<nz-tab [nzTitle]="'签收已接收(' + tabs?.billStatus11 + ')'"></nz-tab>
<nz-tab [nzTitle]="'签收已反馈(' + tabs?.billStatus12 + ')'"></nz-tab>
<nz-tab [nzTitle]="'POD已获取(' + tabs?.billStatus13 + ')'"></nz-tab>
<nz-tab [nzTitle]="'POD已反馈(' + tabs?.billStatus14 + ')'"></nz-tab>
</nz-tabset>
<div style="margin-top: 15px">
<st
#st
[bordered]="true"
[scroll]="{ x: '2000px' }"
[data]="service.$api_waybillInfo_list"
[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, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="false"
>
</st>
</div>
</nz-card>
<ng-template #extraTemplate>
</ng-template>

View File

@ -0,0 +1,13 @@
:host {
p{
margin-bottom: 0
}
.left_btn {
width: 50px;
height: 32px;
padding-left: 8px;
line-height:32px;
background-color: #d7d7d7;
}
}

View File

@ -0,0 +1,35 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2021-12-06 20:03:28
* @LastEditors : Shiming
* @LastEditTime : 2022-01-25 17:22:11
* @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\components\\waybill\\waybill.component.spec.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import {interfaceDockingWaybillComponent} from './waybill.component';
describe('interfaceDockingWaybillComponent', () => {
let component: interfaceDockingWaybillComponent;
let fixture: ComponentFixture<interfaceDockingWaybillComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ interfaceDockingWaybillComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(interfaceDockingWaybillComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,287 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { map } from 'rxjs/operators';
import { ShipperBaseService } from '@shared';
import {InterfaceDockingService} from "../../services/interface-docking.service";
@Component({
selector: 'app-interface-docking-waybill',
templateUrl: './waybill.component.html',
styleUrls: ['./waybill.component.less']
})
export class interfaceDockingWaybillComponent implements OnInit {
ui: SFUISchema = {};
uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {};
auditMany = false;
isVisibleView = false;
isVisibleEvaluate = false;
isVisible = false;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('stFloat') private readonly stFloat!: STComponent;
@ViewChild('stFloatView') private readonly stFloatView!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
columns: STColumn[] = [];
resourceStatus: any;
tabs = {
totalCount: 0,
billStatus1: 0,
billStatus2: 0,
billStatus3: 0,
billStatus4: 0,
billStatus5: 0,
billStatus6: 0,
billStatus7: 0,
billStatus8: 0,
billStatus9: 0,
billStatus10: 0,
billStatus11: 0,
billStatus12: 0,
billStatus13: 0,
billStatus14: 0
};
constructor(
public service: InterfaceDockingService,
public shipperservice: ShipperBaseService,
) { }
/**
* 查询参数
*/
get reqParams() {
const a: any = {};
if (this.resourceStatus) {
a.billStatus = this.resourceStatus;
}
const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
return {
...a,
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || ''
},
planDeliverTime: {
start: this.sf?.value?.planDeliverTime?.[0] || '',
end: this.sf?.value?.planDeliverTime?.[1] || ''
},
};
}
get selectedRows() {
return this.st?.list.filter(item => item.checked) || [];
}
search() {
this.st?.load(1);
this.getGoodsSourceStatistical();
}
getGoodsSourceStatistical() {
this.tabs = {
totalCount: 0,
billStatus1: 0,
billStatus2: 0,
billStatus3: 0,
billStatus4: 0,
billStatus5: 0,
billStatus6: 0,
billStatus7: 0,
billStatus8: 0,
billStatus9: 0,
billStatus10: 0,
billStatus11: 0,
billStatus12: 0,
billStatus13: 0,
billStatus14: 0
};
const params: any = Object.assign({}, this.reqParams || {});
delete params.status;
this.service.request(this.service.$api_listStatisticalStatus, params).subscribe((res: any) => {
if (res) {
let totalCount = 0;
res.forEach((element: any) => {
if (element.statusLabel === '新建') {
this.tabs.billStatus1 = element.quantity;
} else if (element.statusLabel === '运单已发送') {
this.tabs.billStatus2 = element.quantity;
} else if (element.statusLabel === '司机信息已获取') {
this.tabs.billStatus3 = element.quantity;
} else if (element.statusLabel === '司机信息已反馈') {
this.tabs.billStatus4 = element.quantity;
} else if (element.statusLabel === '签收单号已接收') {
this.tabs.billStatus5 = element.quantity;
} else if (element.statusLabel === '签收单号已反馈') {
this.tabs.billStatus6 = element.quantity;
} else if (element.statusLabel === '报道已接收') {
this.tabs.billStatus7 = element.quantity;
} else if (element.statusLabel === '报道已反馈') {
this.tabs.billStatus8 = element.quantity;
} else if (element.statusLabel === '发运已接收') {
this.tabs.billStatus9 = element.quantity;
} else if (element.statusLabel === '发运已反馈') {
this.tabs.billStatus10 = element.quantity;
} else if (element.statusLabel === '签收已接收') {
this.tabs.billStatus11 = element.quantity;
} else if (element.statusLabel === '签收已反馈') {
this.tabs.billStatus12 = element.quantity;
} else if (element.statusLabel === 'POD已获取') {
this.tabs.billStatus13 = element.quantity;
} else if (element.statusLabel === 'POD已反馈') {
this.tabs.billStatus14 = element.quantity;
}
totalCount += element.quantity;
});
this.tabs.totalCount = totalCount;
}
});
}
selectChange(e: number) {
this.resourceStatus = e;
this.initST();
setTimeout(() => {
this.st.load();
}, 500);
}
ngOnInit(): void {
this.getGoodsSourceStatistical();
this.initSF();
this.initST();
}
/**
* 初始化查询表单
*/
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
blNo: {
type: 'string',
title: '运单号'
},
status: {
title: '运单状态',
type: 'string',
ui: {
widget: 'dict-select',
params: { dictKey: 'api:bill:status' },
containsAllLabel: true,
} as SFSelectWidgetSchema
},
source: {
title: '运单来源',
type: 'string',
ui: {
widget: 'dict-select',
params: { dictKey: 'api:bill:source' },
containsAllLabel: true,
} as SFSelectWidgetSchema
},
planDeliverTime: {
title: '计划发货时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFDateWidgetSchema
},
createTime: {
title: '创建时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFDateWidgetSchema
},
},
type: 'object'
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
// 获取城市列表
getRegionCode(regionCode: any) {
console.log(regionCode);
return this.service
.request(this.service.$api_get_enterprise_project, { id: regionCode })
.pipe(
map(res =>
res.map((item: any) => ({
label: item.projectName,
value: item.id
}))
)
)
.subscribe(res => {
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
});
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{ title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' },
{
title: '运单号',
width: '180px',
fixed: 'left',
className: 'text-left',
render: 'blNo',
index: 'blNo'
},
{
title: '运单状态',
width: '250px',
className: 'text-left',
index: 'statusLabel'
},
{ title: '运单来源', index: 'sourceLabel', width: '220px', className: 'text-left' },
{ title: '计划发货时间', index: 'planDeliverTime', width: '220px', className: 'text-left' },
{ title: '创建时间', index: 'createTime', width: '220px', className: 'text-left' },
{ title: '件数', index: 'quantity', width: '220px', className: 'text-left' },
{ title: '重量', index: 'weight', width: '180px', className: 'text-left' },
{ title: '体积', index: 'volume', width: '180px', className: 'text-left' },
];
}
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) { }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
exprot() {
this.service.downloadFile(this.service.$api_get_asyncExport, { ...this.reqParams, pageSize: -1 });
}
}

View File

@ -0,0 +1,25 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-06 09:24:00
* @LastEditors : Shiming
* @LastEditTime : 2022-01-25 17:21:54
* @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\interface-docking-routing.module.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {interfaceDockingWaybillComponent} from './components/waybill/waybill.component';
import {interfaceDockingSetComponent} from './components/set/set.component';
const routes: Routes = [
{ path: 'list', component: interfaceDockingWaybillComponent },
{ path: 'list-set/:id', component: interfaceDockingSetComponent },
]
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class InterfaceDockingRoutingModule { }

View File

@ -0,0 +1,23 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-06 09:24:00
* @LastEditors : Shiming
* @LastEditTime : 2022-01-25 20:45:45
* @FilePath : \\tms-obc-web\\src\\app\\routes\\interface-docking\\interface-docking.module.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { NgModule, Type } from '@angular/core';
import { InsuranceTableModule, SharedModule } from '@shared';
import { interfaceDockingWaybillComponent } from './components/waybill/waybill.component';
import { interfaceDockingSetComponent } from './components/set/set.component';
import { InterfaceDockingRoutingModule } from './interface-docking-routing.module';
const COMPONENTS: Type<void>[] = [interfaceDockingWaybillComponent, interfaceDockingSetComponent];
@NgModule({
imports: [SharedModule, InterfaceDockingRoutingModule, InsuranceTableModule],
declarations: COMPONENTS
})
export class InterfaceDockingModule {}

View File

@ -0,0 +1,39 @@
/*
* @Description :
* @Version : 1.0
* @Author : fangliang
* @Date : 2022-04-14
* @LastEditors : fangliang
* @LastEditTime : 2022-04-14
* @FilePath : \\tms-obc-web\\src\\app\\routes\\interface-docking\\services\\interface-docking.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Injectable, Injector } from '@angular/core';
import { EACacheService, ShipperBaseService } from '@shared';
import { map } from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})
export class InterfaceDockingService extends ShipperBaseService {
// 查询运单信息表
public $api_waybillInfo_list = '/api/sdc/dock/bill/list/page';
public $api_listStatisticalStatus = '/api/sdc/dock/bill/listStatisticalStatus';
// 保险费列表数据导出接口
$api_get_asyncExport = `/api/sdc/premiumInfo/asyncExport`;
public reviewPDF(url: string) {
if (!url) {
return;
}
this.openURL(url);
}
constructor(public injector: Injector) {
super(injector);
}
}

View File

@ -77,6 +77,10 @@ const routes: Routes = [
},
{ path: 'datatable', loadChildren: () => import('./datatable/datatable.module').then((m) => m.DatatableModule) },
{ path: 'tax', loadChildren: () => import('./tax-management/taxmanagement.module').then((m) => m.TaxManagementModule) },
{
path: 'interface-docking',
loadChildren: () => import('./interface-docking/interface-docking.module').then(m => m.InterfaceDockingModule)
},
]
},
// passport

View File

@ -210,6 +210,15 @@
"link": "/insurance-management/list"
}]
},
{
"text": "接口对接",
"icon": "iconfont icon-yundan-copy",
"group": true,
"children": [{
"text": "运单列表",
"link": "/interface-docking/list"
}]
},
{
"text": "财务管理",
"icon": "iconfont icon-caiwu-copy",