diff --git a/src/app/routes/interface-docking/components/set/set.component.html b/src/app/routes/interface-docking/components/set/set.component.html new file mode 100644 index 00000000..4b5ffd64 --- /dev/null +++ b/src/app/routes/interface-docking/components/set/set.component.html @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/src/app/routes/interface-docking/components/set/set.component.less b/src/app/routes/interface-docking/components/set/set.component.less new file mode 100644 index 00000000..1d17aeb7 --- /dev/null +++ b/src/app/routes/interface-docking/components/set/set.component.less @@ -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; + } + } +} \ No newline at end of file diff --git a/src/app/routes/interface-docking/components/set/set.component.spec.ts b/src/app/routes/interface-docking/components/set/set.component.spec.ts new file mode 100644 index 00000000..d51491b0 --- /dev/null +++ b/src/app/routes/interface-docking/components/set/set.component.spec.ts @@ -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; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ interfaceDockingSetComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(interfaceDockingSetComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/interface-docking/components/set/set.component.ts b/src/app/routes/interface-docking/components/set/set.component.ts new file mode 100644 index 00000000..5d1dd8ab --- /dev/null +++ b/src/app/routes/interface-docking/components/set/set.component.ts @@ -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); + } + +} diff --git a/src/app/routes/interface-docking/components/waybill/waybill.component.html b/src/app/routes/interface-docking/components/waybill/waybill.component.html new file mode 100644 index 00000000..38cb1a05 --- /dev/null +++ b/src/app/routes/interface-docking/components/waybill/waybill.component.html @@ -0,0 +1,85 @@ + + + + + + + + + + + + 4"> + + + + + 查询 + 导出 + 重置 + + {{ !_$expand ? '展开' : '收起' }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/routes/interface-docking/components/waybill/waybill.component.less b/src/app/routes/interface-docking/components/waybill/waybill.component.less new file mode 100644 index 00000000..149a0bc9 --- /dev/null +++ b/src/app/routes/interface-docking/components/waybill/waybill.component.less @@ -0,0 +1,13 @@ + + :host { + p{ + margin-bottom: 0 + } + .left_btn { + width: 50px; + height: 32px; + padding-left: 8px; + line-height:32px; + background-color: #d7d7d7; + } + } \ No newline at end of file diff --git a/src/app/routes/interface-docking/components/waybill/waybill.component.spec.ts b/src/app/routes/interface-docking/components/waybill/waybill.component.spec.ts new file mode 100644 index 00000000..29567897 --- /dev/null +++ b/src/app/routes/interface-docking/components/waybill/waybill.component.spec.ts @@ -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; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ interfaceDockingWaybillComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(interfaceDockingWaybillComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/interface-docking/components/waybill/waybill.component.ts b/src/app/routes/interface-docking/components/waybill/waybill.component.ts new file mode 100644 index 00000000..33229810 --- /dev/null +++ b/src/app/routes/interface-docking/components/waybill/waybill.component.ts @@ -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 }); + } + +} diff --git a/src/app/routes/interface-docking/interface-docking-routing.module.ts b/src/app/routes/interface-docking/interface-docking-routing.module.ts new file mode 100644 index 00000000..f6136aa8 --- /dev/null +++ b/src/app/routes/interface-docking/interface-docking-routing.module.ts @@ -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 { } diff --git a/src/app/routes/interface-docking/interface-docking.module.ts b/src/app/routes/interface-docking/interface-docking.module.ts new file mode 100644 index 00000000..fd73d4bd --- /dev/null +++ b/src/app/routes/interface-docking/interface-docking.module.ts @@ -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[] = [interfaceDockingWaybillComponent, interfaceDockingSetComponent]; + +@NgModule({ + imports: [SharedModule, InterfaceDockingRoutingModule, InsuranceTableModule], + declarations: COMPONENTS +}) +export class InterfaceDockingModule {} diff --git a/src/app/routes/interface-docking/services/interface-docking.service.ts b/src/app/routes/interface-docking/services/interface-docking.service.ts new file mode 100644 index 00000000..f39ca88d --- /dev/null +++ b/src/app/routes/interface-docking/services/interface-docking.service.ts @@ -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); + } +} diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index 544a7684..205ce968 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -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 diff --git a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts index 72ec17f0..4989cbd6 100644 --- a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts +++ b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts @@ -516,7 +516,7 @@ export class NetworkFreightComponent implements OnInit { } // 基础设置 settingAction(item?: any) { - this.nzModalService.create({ + const modalRef = this.nzModalService.create({ nzTitle: '系统配置', nzContent: DynamicSettingModalComponent, nzWidth: 900, @@ -526,6 +526,12 @@ export class NetworkFreightComponent implements OnInit { }, nzFooter: null }); + modalRef.afterClose.subscribe((res: boolean) => { + if (res) { + this.resetSF; + this.st.load(); + } + }) } // 应用设置 settingApp(item?: any) { diff --git a/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts b/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts index 0de00c17..2c296136 100644 --- a/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts +++ b/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-10 16:06:17 * @LastEditors : Shiming - * @LastEditTime : 2022-03-22 10:05:15 + * @LastEditTime : 2022-04-20 10:00:02 * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-modal\\dynamic-setting-modal.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 1aee4bad..cda6f21b 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -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",