解决冲突

This commit is contained in:
wangshiming
2022-04-07 10:08:57 +08:00
parent a477278651
commit 2ed180822c
10 changed files with 473 additions and 6 deletions

View File

@ -12,7 +12,7 @@
<!-- <page-header-wrapper [title]="'运营报表'"></page-header-wrapper> -->
<div nz-row [nzGutter]="24">
<div nz-col class="gutter-row" [nzSpan]="8">
<nz-card nzTitle="2022全年交易情况">
<nz-card nzTitle="">
<nz-row [nzGutter]="16">
<nz-col [nzSpan]="12">
<nz-statistic [nzValue]="(1949101 | number)!" [nzTitle]="'成交额'"></nz-statistic>

View File

@ -5,7 +5,7 @@ import { map } from 'rxjs/operators';
* @Author : Shiming
* @Date : 2022-04-06 10:57:56
* @LastEditors : Shiming
* @LastEditTime : 2022-04-07 01:48:44
* @LastEditTime : 2022-04-07 09:30:20
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -56,8 +56,15 @@ export class DatatableDatascreenComponent implements OnInit {
ngOnInit(): void {
this.initST()
this.initOrderST()
this.initData()
this.initLineData()
}
initData(){
this.service.request(this.service.$api_getAnnualTransactions).subscribe((res: any) => {
console.log(res);
})
}
initLineData(){
for (let i = 0; i < 20; i += 1) {
this.chartData.push({

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-27 10:30:56
* @LastEditors : Shiming
* @LastEditTime : 2022-04-06 13:47:25
* @LastEditTime : 2022-04-07 09:30:16
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\services\\data.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -66,6 +66,24 @@ export class DataService extends BaseService {
$api_statistics_totalAdd = `/api/mdc/cuc/statistics/totalAdd`;
// 数据大屏-本年全年交易情况
$api_getAnnualTransactions = `/api/sdc/reportDataLargeScreen/getAnnualTransactions`;
// 数据大屏-客户统计(货主,合伙人,司机,车辆)
$api_getCustomerStatistics = `/api/sdc/reportDataLargeScreen/getCustomerStatistics`;
// 数据大屏-实时货源
$api_getRealTimeSupply = `/api/sdc/reportDataLargeScreen/getRealTimeSupply`;
// 数据大屏-实时运单风控
$api_getRealTimeWaybillRiskControl = `/api/sdc/reportDataLargeScreen/getRealTimeWaybillRiskControl`;
// 数据大屏-本月发货量排名
$api_getShipmentRanking = `/api/sdc/reportDataLargeScreen/getShipmentRanking`;
// 数据大屏-今日交易情况
$api_getTradingToday = `/api/sdc/reportDataLargeScreen/getTradingToday`;
// 数据大屏-本月交易趋势
$api_getTradingTrend = `/api/sdc/reportDataLargeScreen/getTradingTrend`;
// 数据大屏-交易额(今日,本月,累计)
$api_getTransactionAmount = `/api/sdc/reportDataLargeScreen/getTransactionAmount`;
constructor(public injector: Injector) {
super(injector);

View File

@ -0,0 +1,93 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming
* @LastEditTime : 2022-04-07 10:07:36
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\abnormal-warning\\abnormal-warning.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]="['ORDER-COMPLIANCE-AUDIT-search']"
>查询</button
>
<button nz-button nzType="primary" [disabled]="false" acl [acl-ability]="['ORDER-COMPLIANCE-AUDIT-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>
<div style="margin-top: 15px">
<st
#st
[bordered]="true"
[scroll]="{ x: '2000px' }"
[data]="service.$api_get_abnormalWarning"
[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"
>
<ng-template st-row="driverName" let-item let-index="index">
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : '' }} </div>
</ng-template>
<ng-template st-row="payeeName" let-item let-index="index">
<div> {{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }} </div>
</ng-template>
<ng-template st-row="billCode" let-item let-index="index">
<!-- <a *ngIf="item.billType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
<a *ngIf="item.billType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id" [queryParams]="{ sts :1}">{{ item.billCode }}</a>
<a *ngIf="item.billType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a> -->
<div>
<span>{{ item?.billStatusLabel }}</span>
</div>
<div>
<span >{{item?.billTypeLabel}}{{item?.serviceTypeLabel === item?.billTypeLabel ? '':item?.serviceTypeLabel}}</span>
</div>
</ng-template>
</st>
</div>
</nz-card>

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-04-07 09:43:16
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\abnormal-warning\\abnormal-warning.component.spec.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { OrderManagementAbnormalWarningComponent } from './abnormal-warning.component';
describe('OrderManagementAbnormalWarningComponent', () => {
let component: OrderManagementAbnormalWarningComponent;
let fixture: ComponentFixture<OrderManagementAbnormalWarningComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ OrderManagementAbnormalWarningComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OrderManagementAbnormalWarningComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,294 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { map } from 'rxjs/operators';
import { OrderManagementService } from '../../services/order-management.service';
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component';
import { of } from 'rxjs';
import { ShipperBaseService } from '@shared';
import { Router } from '@angular/router';
import { OneCarOrderAppealComponent } from '../../modal/audit/appeal/appeal.component';
@Component({
selector: 'app-order-management-abnormal-warning',
templateUrl: './abnormal-warning.component.html',
styleUrls: ['./abnormal-warning.component.less']
})
export class OrderManagementAbnormalWarningComponent implements OnInit {
ui: SFUISchema = {};
uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {};
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
changeViewId: any; // 查看运费变更记录id - 用于查看
auditId: any;
auditIdR: any;
auditMany = false;
isVisibleView = false;
isVisibleEvaluate = false;
isVisible = false;
isVisibleRE = false;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
@ViewChild('stFloat') private readonly stFloat!: STComponent;
@ViewChild('stFloatView') private readonly stFloatView!: STComponent;
columns: STColumn[] = [];
columnsFloat: STColumn[] = [];
columnsFloatView: STColumn[] = [];
ViewCause: any; // 变更运费查看数据
tabs = {
totalCount: 0,
qualifiedtity: 0,
spotQuantity: 0,
unstayQuantity: 0
};
constructor(
public service: OrderManagementService,
private modal: NzModalService,
public shipperservice: ShipperBaseService,
private router: Router
) { }
/**
* 查询参数
*/
get reqParams() {
const a: any = {};
const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
return {
...a,
...params,
warningTime: {
start: this.sf?.value?.warningTime?.[0] || '',
end: this.sf?.value?.warningTime?.[1] || ''
}
};
}
get changeParams() {
return {
id: this.changeId
};
}
get selectedRows() {
return this.st?.list.filter(item => item.checked) || [];
}
get changeViewParams() {
return {
id: this.changeViewId
};
}
search() {
this.st?.load(1);
}
ngOnInit(): void {
this.initSF();
this.initST();
}
/**
* 初始化查询表单
*/
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
billCode: {
type: 'string',
title: '订单号',
ui: {
}
},
wayBillCode: {
type: 'string',
title: '运单号',
ui: {
}
},
serviceType: {
title: '服务类型',
type: 'string',
default: '',
ui: {
widget: 'dict-select',
params: { dictKey: 'service:type' },
containsAllLabel: true,
} as SFSelectWidgetSchema
},
resourceType: {
title: '货源类型',
type: 'string',
default: '',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
},
widget: 'dict-select',
params: { dictKey: 'goodresource:type' },
containsAllLabel: true,
} as SFSelectWidgetSchema
},
shipperAppUserId: {
type: 'string',
title: '货主',
ui: {
widget: 'select',
serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
}
},
} as SFSelectWidgetSchema
},
loadingPlace: {
type: 'string',
title: '装货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
dischargePlace: {
type: 'string',
title: '卸货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
driverName: {
title: '承运司机',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
carNo: {
title: '车牌号',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
warningTime: {
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 } } };
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{
title: '运单号',
width: '180px',
fixed: 'left',
className: 'text-left',
index: 'wayCode'
},
{
title: '订单号',
width: '180px',
fixed: 'left',
className: 'text-left',
index: 'billCode'
},
{ title: '服务类型', index: 'serviceTypeLabel', width: '220px', className: 'text-left' },
{ title: '货主', index: 'shipperName', width: '220px', className: 'text-left' },
{ title: '装货地', index: 'loadingAddressArr', width: '220px', className: 'text-left' },
{ title: '卸货地', index: 'unloadingAddressArr', width: '220px', className: 'text-left' },
{ title: '司机', render: 'driverName', width: '180px', className: 'text-left' },
{ title: '车牌号', index: 'carNo', width: '180px', className: 'text-left' },
{ title: '预警类型', index: 'warningTypeLabel', width: '180px', className: 'text-left' },
{
title: '预警时间',
className: 'text-left',
width: '180px',
index: 'warningTime'
},
{
title: '位置描述',
className: 'text-left',
width: '250px',
render: 'goodsName'
},
{
title: '提醒内容',
className: 'text-left',
width: '250px',
index: 'warningContent',
},
];
}
/**
* 查询字段个数
*/
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.asyncExport(this.reqParams, this.service.$api_get_asyncExportSpotCheckList);
}
}

View File

@ -4,12 +4,13 @@
* @Author : Shiming
* @Date : 2022-01-06 09:24:00
* @LastEditors : Shiming
* @LastEditTime : 2022-02-10 11:34:03
* @LastEditTime : 2022-04-07 09:43:47
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\order-management-routing.module.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { OrderManagementAbnormalWarningComponent } from './components/abnormal-warning/abnormal-warning.component';
import { OrderManagementBulkDetailChangeComponent } from './components/bulk-detail-change/bulk-detail-change.component';
import { OrderManagementBulkeDetailComponent } from './components/bulk-detail/bulk-detail.component';
import { OrderManagementBulkComponent } from './components/bulk/bulk.component';
@ -36,6 +37,7 @@ const routes: Routes = [
{ path: 'complaint-detail/:id', component: OrderManagementComplaintDetailComponent },
{ path: 'receipts-audit', component: OrderManagementReceiptsAuditComponent },
{ path: 'compliance-audit', component: OrderManagementComplianceAuditComponent },
{ path: 'abnormal-warning', component: OrderManagementAbnormalWarningComponent },
]
@NgModule({
imports: [RouterModule.forChild(routes)],

View File

@ -11,6 +11,7 @@
import { NgModule, Type } from '@angular/core';
import { SharedModule } from '@shared';
import { OrderManagementAbnormalWarningComponent } from './components/abnormal-warning/abnormal-warning.component';
import { OrderManagementBulkDetailChangeComponent } from './components/bulk-detail-change/bulk-detail-change.component';
import { OrderManagementBulkeDetailComponent } from './components/bulk-detail/bulk-detail.component';
import { OrderManagementBulkComponent } from './components/bulk/bulk.component';
@ -66,7 +67,8 @@ const COMPONENTS: Type<void>[] = [
OrderManagementComplianceAuditComponent,
OneCarOrderCancelConfirmComponent,
OneCarOrderViewtrackComponent,
OneCarOrderAppealComponent
OneCarOrderAppealComponent,
OrderManagementAbnormalWarningComponent
];
@NgModule({

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-03 15:31:52
* @LastEditors : Shiming
* @LastEditTime : 2022-04-06 11:03:58
* @LastEditTime : 2022-04-07 09:49:44
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -186,6 +186,9 @@ export class OrderManagementService extends ShipperBaseService {
// 查看申述记录
$api_get_getOrderComplaintDetail = `/api/sdc/billOperate/getOrderComplaintDetail`;
// 查询异常预警表
$api_get_abnormalWarning = `/api/sdc/abnormalWarning/list/page`;
// 异步导出运营后台大宗订单列表
$api_get_asyncExportBulkList = `/api/sdc/billOperate/asyncExportBulkList`;