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

This commit is contained in:
Taric Xin
2022-01-05 14:11:33 +08:00
24 changed files with 1051 additions and 52 deletions

View File

@ -3,7 +3,7 @@ import { Router } from '@angular/router';
import { STComponent, STColumn, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { TicketService } from '../../services/contract-management.service';
import { ContractManagementService } from '../../services/contract-management.service';
@Component({
selector: 'app-contract-management-contract-list',
@ -25,7 +25,7 @@ export class ContractManagementContractListComponent implements OnInit {
reqParams = {};
selectedRows: any[] = [];
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
constructor(public service: ContractManagementService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {
this.initST()

View File

@ -0,0 +1,97 @@
<!--
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2022-01-05 10:02:34
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\vehicle\vehicle.component.html
-->
<!-- 搜索表单 -->
<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]="service.http.loading"
(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" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button nzType="primary"
>导出</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</ng-container>
</div>
</nz-card>
<nz-card >
<div style="margin-top: 15px;">
<st
#st
[bordered]="true"
[data]="service.$api_get_operate_listPage"
[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] }"
[loadingDelay]="500"
[loading]="service.http.loading"
>
<ng-template st-row="complaintCode" let-item let-index="index">
<a [routerLink]="'/order-management/complaint-detail/'+item.id">{{item.complaintCode}}</a>
</ng-template>
<ng-template st-row="complainant" let-item let-index="index">
<div>
{{item?.complainant?.name}}
</div>
</ng-template>
<ng-template st-row="complainant" let-item let-index="index">
<div>
{{item?.complainant?.name}}
</div>
</ng-template>
<!-- <ng-template st-row="externalSn" let-item let-index="index">
<span class="mr-xs">{{111111}}</span>
<a (click)="editEnternalSn(item)">编辑</a>
</ng-template> -->
<ng-template st-row="enStatusStr27878" let-item let-index="index">
<div class="mr-xs" nzPopoverTitle="Title" nz-popover [nzPopoverContent]="contentTemplate">{{item.no}}</div>
</ng-template>
<ng-template st-row="feiong" let-item let-index="index">
<div style="color: aqua;" >
{{item.no}}
</div>
</ng-template>
<ng-template #contentTemplate>
<div>
<p>预付¥200.00</p>
<p>到付¥200.00</p>
<p>油卡¥200.00</p>
<p>回单付¥200.00</p>
<p>小计¥200.00</p>
<p>附加费¥200.00</p>
</div>
</ng-template>
</st>
</div>
</nz-card>
<ng-template #extraTemplate>
<div>
<button nz-button nzType="primary"(click)="creatTemplate()">
新建
</button>
</div>
</ng-template>

View File

@ -0,0 +1,32 @@
/*
* @Author: your name
* @Date: 2021-12-07 14:27:59
* @LastEditTime: 2021-12-07 14:28:59
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\components\risk\risk.component.spec.ts
*/
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { OrderManagementTemplateComponent } from './contract-template.component';
describe('OrderManagementTemplateComponent', () => {
let component: OrderManagementTemplateComponent;
let fixture: ComponentFixture<OrderManagementTemplateComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ OrderManagementTemplateComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OrderManagementTemplateComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,212 @@
import { Router } from '@angular/router';
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { map } from 'rxjs/operators';
import { ContractManagementService } from '../../services/contract-management.service';
@Component({
selector: 'app-contract-management-template-complaint',
templateUrl: './contract-template.component.html',
styleUrls: ['./contract-template.component.less']
})
export class OrderManagementTemplateComponent implements OnInit {
ui: SFUISchema = {};
uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {};
auditMany = false;
_$expand = false;
channelId: any;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
columns: STColumn[] = [];
datass: any = [
{
one: '1',
two: '1',
three: '1',
id: 1
},
{
one: '2',
two: '2',
three: '2',
id: 2
},
];
constructor(
public service: ContractManagementService,
private modal: NzModalService,
private router: Router
) { }
/**
* 查询参数
*/
get reqParams() {
return {
...this.sf?.value,
};
}
get selectedRows() {
return this.st?.list.filter((item) => item.checked) || [];
}
ngOnInit(): void {
this.initSF();
this.initST();
this.initSTAudit();
}
/**
* 初始化查询表单
*/
initSF() {
this.schema = {
properties: {
complaintCode: {
type: 'string',
title: '模板名称',
},
serviceType: {
title: '模板类型',
type: 'string',
default: '',
ui: {
widget: 'dict-select',
params: { dictKey: 'service:type' },
containAllLable:true,
visibleIf: {
_$expand: (value: boolean) => value,
},
} as SFSelectWidgetSchema,
},
},
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{
title: '合同模板名称',
className: 'text-center',
render: 'complaintCode'
},
{
title: '模板类型',
className: 'text-center',
index: 'wayBillCode'
},
{
title: '单据类型',
index: 'complainantTime',
className: 'text-center',
},
{ title: '创建人', index: 'driverId', width: '120px', className: 'text-center' },
{
title: '创建时间',
className: 'text-center',
render: 'complainant'
},
{
title: '操作',
fixed: 'right',
className: 'text-left',
buttons: [
{
text: '编辑',
click: (_record) => this.view(_record),
},
{
text: '删除',
click: (_record) => this.view(_record),
},
],
},
];
}
initSTAudit() {
this.schemaView = {
properties: {
handleResult: {
title: '处理结果',
type: 'string',
maxLength: 50,
ui: {
placeholder: '最多不超过50字',
widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 }
},
},
},
required: ['handleResult']
};
this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } };
}
/**
* 查询字段个数
*/
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) {
console.log(item)
}
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
/*
* 审核关闭弹窗
view: 1
浮动费用: 0
查看评价: 3
*/
handleCancel(type: string) {
const paramsa = {
handleStatus: 0,
id: this.channelId
}
// this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{
// console.log(res)
// if(res) {
// this.service.msgSrv.success('已拒绝!')
// this.isVisibleRE = false
// } else{
// this.service.msgSrv.error(res?.msg)
// }
// })
}
/**
/**
*查看评价
*/
viewEvaluate(item: any) {
this.channelId = item.id;
}
view(value: any) {
this.router.navigate(['/order-management/complaint-detail/' + value.id])
}
creatTemplate() {
}
}

View File

@ -0,0 +1,65 @@
<page-header [action]="phActionTpl">
<ng-template #phActionTpl> </ng-template>
</page-header>
<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]="service.http.loading"
(formSubmit)="st?.load(1)"
(formReset)="resetSF()"
></sf>
</div>
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<ng-container>
<div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</ng-container>
</div>
</nz-card>
<nz-card>
<st
#st
[data]="service.$api_get_getPremiumInformationPage"
[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] }"
[loadingDelay]="500"
[loading]="service.http.loading"
>
</st>
</nz-card>
<ng-template #promoterModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80">
<sv-container col="1">
<sv label="传入值" [col]="1">
{{paramValue}}
</sv>
</sv-container>
</div>
</div>
</ng-template>

View File

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

View File

@ -0,0 +1,205 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { ContractManagementService } from '../../services/contract-management.service';
import { Router } from '@angular/router';
@Component({
selector: 'app-contract-management-policy',
templateUrl: './policy.component.html'
})
export class ContractManagementPolicyComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
@ViewChild('auditModal', { static: false })
auditModal!: any;
schema: SFSchema = {};
columns: STColumn[] = [];
ui: SFUISchema = {};
@ViewChild('promoterModal', { static: false })
promoterModal!: any;
_$expand = false;
selectedRows: any[] = [];
paramValue = '';
constructor(public service: ContractManagementService, private modal: NzModalService, private router: Router) {}
/**
* 查询参数
*/
get reqParams() {
const params: any = {
...(this.sf && this.sf.value)
};
delete params.expand;
return params;
}
ngOnInit(): void {
this.initST();
this.initSF();
}
openDetail(item?: any) {
this.paramValue = item?.paramValue
const modal = this.modal.create({
nzTitle: '传入值',
nzContent: this.promoterModal,
nzOnOk: () => {
return;
}
});
}
initST() {
this.columns = [
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' },
{
title: '订单ID',
width: '100px',
className: 'text-center',
index: 'billId'
},
{
title: '项目ID',
width: '100px',
className: 'text-center',
index: 'enterpriseProjectId'
},
{
title: '保险公司',
width: '100px',
className: 'text-center',
index: 'insuranceCompany'
},
{
title: '投保金额',
width: '100px',
className: 'text-center',
index: 'insureAmount'
},
{
title: '保单号',
width: '100px',
className: 'text-center',
index: 'policyNo'
},
{
title: '保单地址',
width: '100px',
className: 'text-center',
index: 'policyUrl'
},
{
title: '保费',
width: '100px',
className: 'text-center',
index: 'premium'
},
{
title: '处理消息',
width: '100px',
className: 'text-center',
index: 'processMessage'
},
{
title: '处理结果',
width: '100px',
className: 'text-center',
index: 'processResult'
},
{
title: '操作',
width: '170px',
className: 'text-center',
buttons: [
{
text: '查看传入值',
click: item => {
this.openDetail(item)
}
}
]
}
];
}
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
billId: {
type: 'string',
title: '订单id'
},
enterpriseProjectId: {
type: 'string',
title: '项目id'
},
insuranceCompany: {
type: 'string',
title: '保险公司'
},
policyNo: {
type: 'string',
title: '保单号'
},
processResult: {
type: 'string',
title: '处理结果',
enum: [
{ label: '全部', value: '' },
{ label: '成功', value: 1 },
{ label: '失败', value: 2 }
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true
}
}
},
type: 'object'
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
stChange(e: STChange): void {
switch (e.type) {
case 'checkbox':
this.selectedRows = e.checkbox!;
break;
case 'filter':
this.st.load();
break;
}
}
}

View File

@ -1,17 +1,20 @@
/*
* @Author: your name
* @Date: 2021-12-07 15:57:49
* @LastEditTime: 2021-12-07 16:11:00
* @LastEditors: your name
* @LastEditTime: 2022-01-05 09:50:37
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\contract-management\contract-management-routing.module.ts
*/
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ContractManagementContractListComponent } from './components/contract-list/contract-list.component';
import { OrderManagementTemplateComponent } from './components/contract-template/contract-template.component';
import { ContractManagementPolicyComponent } from './components/policy/policy.component';
const routes: Routes = [
{ path: 'list', component: ContractManagementContractListComponent },
];
{ path: 'template', component: OrderManagementTemplateComponent },
{ path: 'policy', component: ContractManagementPolicyComponent }];
@NgModule({
imports: [RouterModule.forChild(routes)],

View File

@ -1,8 +1,8 @@
/*
* @Author: your name
* @Date: 2021-12-07 15:57:49
* @LastEditTime: 2021-12-07 16:11:48
* @LastEditors: your name
* @LastEditTime: 2022-01-05 09:50:29
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\contract-management\contract-management.module.ts
*/
@ -11,9 +11,13 @@ import { CommonModule } from '@angular/common';
import { SharedModule } from '@shared';
import { ContractManagementManagementRoutingModule } from './contract-management-routing.module';
import { ContractManagementContractListComponent } from './components/contract-list/contract-list.component';
import { ContractManagementPolicyComponent } from './components/policy/policy.component';
import { OrderManagementTemplateComponent } from './components/contract-template/contract-template.component';
const COMPONENTS: any = [
ContractManagementContractListComponent
ContractManagementContractListComponent,
ContractManagementPolicyComponent,
OrderManagementTemplateComponent
];
const NOTROUTECOMPONENTS: any = [];
@NgModule({

View File

@ -1,10 +1,22 @@
/*
* @Author: your name
* @Date: 2022-01-04 21:05:49
* @LastEditTime: 2022-01-05 09:51:54
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\contract-management\services\contract-management.service.ts
*/
import { Injectable, Injector } from '@angular/core';
import { BaseService } from 'src/app/shared/services';
@Injectable({
providedIn: 'root'
})
export class TicketService extends BaseService {
export class ContractManagementService extends BaseService {
$api_get_getPremiumInformationPage = `/api/sdc/billOperate/listPremiumInformationPage`;
// 查询投诉列表
$api_get_operate_listPage = `/api/sdc/complaint/operate/listPage`;
constructor(public injector: Injector) {
super(injector);
}

View File

@ -0,0 +1,53 @@
<!--
* @Author: your name
* @Date: 2021-12-16 10:19:08
* @LastEditTime: 2022-01-05 09:40:31
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\components\risk-detail\risk-detail.component.html
-->
<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>
<!-- [nzExtra]="extraTemplate" -->
<nz-card nzTitle="投诉信息" >
<h2>投诉单号:{{datailList?.id}}</h2>
<sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'" *ngIf="schema" [formData]="datailList">
<ng-template sf-template="imgUrls" let-schema="schema" let-item let-ui="ui">
<app-imagelist [imgList]="datailList?.imgUrls"></app-imagelist>
</ng-template>
</sf>
</nz-card>
<nz-card class="dealBox" nzTitle="投诉处理">
<!-- <nz-timeline class="d-block pl-md pt-md">
<nz-timeline-item *ngFor="let i of datailList" [nzDot]="dotTpl">
<ng-template #dotTpl>
<div class="md-sm p-sm icon-sm rounded-circle text-white bg-{{ i.dot.bg }}">
<i nz-icon [nzType]="i.dot.icon"></i>
</div>
</ng-template>
<div class="pl-lg">
<strong>{{ i.time }}</strong>
<div class="py-sm" [innerHTML]="i.content | html"></div>
<div class="text-grey">{{ i.tags }}</div>
</div>
</nz-timeline-item>
</nz-timeline> -->
<nz-timeline nzMode="left">
<nz-timeline-item >TMS运营管理系统
<div class="info">提交时间:{{datailList?.complainantTime}}</div>
</nz-timeline-item>
<nz-timeline-item [nzLabel]="datailList?.handleTime">运多星运营后台
<div class="info">操作人员:{{datailList?.complainantIdLabel}}</div>
<div class="info">处理详情:{{datailList?.handleDetails}}</div>
<div class="info">处理结果:{{datailList?.handleResult}}</div>
</nz-timeline-item>
</nz-timeline>
</nz-card>

View File

@ -0,0 +1,10 @@
.info{
color: #666;
}
:host{
::ng-deep{
.dealBox .ant-card-body{
width: 500px;
}
}
}

View File

@ -0,0 +1,32 @@
/*
* @Author: your name
* @Date: 2022-01-04 17:29:18
* @LastEditTime: 2022-01-04 17:31:21
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\components\complaint-detail\complaint-detail.component.spec.ts
*/
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { OrderManagementComplaintDetailComponent } from './complaint-detail.component';
describe('OrderManagementComplaintDetailComponent', () => {
let component: OrderManagementComplaintDetailComponent;
let fixture: ComponentFixture<OrderManagementComplaintDetailComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ OrderManagementComplaintDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OrderManagementComplaintDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,128 @@
import { Component, OnInit, ViewChild, ɵɵsetComponentScope } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { OrderManagementService } from '../../services/order-management.service';
// import { RiskOrderService } from '../../services/risk-order.service';
// import { CtcAppealComponent } from '../appeal/appeal.component';
@Component({
selector: 'app-oder-management-component-risk-detail',
templateUrl: './complaint-detail.component.html',
styleUrls: ['./complaint-detail.component.less']
})
export class OrderManagementComplaintDetailComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
ui: SFUISchema = {};
schema: SFSchema = {};
// abnormalReason = [
// '司机装货轨迹异常',
// '司机卸货轨迹异常',
// '车辆装货轨迹异常',
// '司机位置未移动或运输途中未打开APP',
// '运单轨迹严重异常'
// ]
i: any;
datailList: any;
id: string = '';
constructor(private modal: NzModalService, public service: OrderManagementService, public ar: ActivatedRoute) {
this.id = this.ar.snapshot.params.id;
}
ngOnInit(): void {
if (this.id)
{
this.getDetail(this.id);
this.initSF();
}
}
initSF() {
this.schema = {
properties: {
complaintCause: {
title: '投诉原因',
type: 'string',
maxLength: 30,
ui: {
widget: 'text',
change: (value, orgData) => console.log(value, orgData),
} as SFSelectWidgetSchema,
},
complaintDetails: {
title: '投诉详情',
type: 'string',
ui: {
widget: 'textarea',
placeholder: '请输入',
autosize: {
minRows: 4,
maxRows: 4
}
},
readOnly: true
} as SFTextareaWidgetSchema,
imgUrls: {
type: 'string',
title: '上传凭证',
ui: {
widget: 'custom'
}
},
},
};
this.ui = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
},
$title1: {
spanLabelFixed: 0,
},
$title2: {
spanLabelFixed: 0,
},
$title3: {
spanLabelFixed: 0,
},
$unit: {
spanLabelFixed: 20,
grid: { span: 3 },
},
};
}
getDetail(id: string) {
this.service.request(this.service.$api_get_getComplaintDriverDetails, { id }).subscribe(res => {
if (res) {
this.datailList = res;
}
})
}
edit(item: any): void {
const modalRef = this.modal.create({
nzTitle: '申诉',
nzWidth: '40%',
// nzContent: CtcAppealComponent,
nzComponentParams: {
i: item
},
nzFooter: null
});
modalRef.afterClose.subscribe(res => {
if (res) {
}
})
}
kkk(value: any) {
console.log(value)
}
goBack() {
window.history.go(-1)
}
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-07 14:42:43
* @LastEditTime: 2022-01-04 20:50:04
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\vehicle\vehicle.component.html
@ -43,13 +43,30 @@
</nz-tab>
</nz-tabset>
<div style="margin-top: 15px;">
<!-- [req]="{ method: 'GET', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
<st
#st
[bordered]="true"
[scroll]="{ x: '2000px' }"
[data]="service.$api_get_operate_listPage"
[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] }"
[loadingDelay]="500" [loading]="service.http.loading" -->
<st #st [scroll]="{ x: '1200px' }" [data]="service.$api_get_catalogue_member" [columns]="columns">
<ng-template st-row="goodsId" let-item let-index="index">
<a [routerLink]="'/order-management/vehicle-detail/'+item.id">{{item.no}}</a>
[loadingDelay]="500"
[loading]="service.http.loading"
>
<ng-template st-row="complaintCode" let-item let-index="index">
<a [routerLink]="'/order-management/complaint-detail/'+item.id">{{item.complaintCode}}</a>
</ng-template>
<ng-template st-row="complainant" let-item let-index="index">
<div>
{{item?.complainant?.name}}
</div>
</ng-template>
<ng-template st-row="complainant" let-item let-index="index">
<div>
{{item?.complainant?.name}}
</div>
</ng-template>
<!-- <ng-template st-row="externalSn" let-item let-index="index">
<span class="mr-xs">{{111111}}</span>
@ -83,8 +100,9 @@
</sf>
</ng-container>
<ng-template #nzModalFooterview2>
<button nz-button nzType="default" (click)="handleCancel('1')">取消</button>
<button nz-button nzType="primary" (click)="handleOK()">确定</button>
<button nz-button nzType="default" (click)="handleCancel('1')">拒绝</button>
<button nz-button nzType="primary" (click)="handleOK()">通过</button>
<button nz-button nzType="primary" (click)="handleCancel2()">强制取消</button>
</ng-template>
</nz-modal>

View File

@ -1,3 +1,4 @@
import { Router } from '@angular/router';
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
@ -13,7 +14,6 @@ import { OrderManagementService } from '../../services/order-management.service'
styleUrls: ['./complaint.component.less']
})
export class OrderManagementComplaintComponent implements OnInit {
url = `/user?_allow_anonymous=true`;
ui: SFUISchema = {};
uiView: SFUISchema = {};
schema: SFSchema = {};
@ -21,6 +21,7 @@ export class OrderManagementComplaintComponent implements OnInit {
auditMany = false;
isVisibleRE = false;
_$expand = false;
channelId: any;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
@ -60,7 +61,11 @@ export class OrderManagementComplaintComponent implements OnInit {
count: 0,
}
];
constructor(public service: OrderManagementService, private modal: NzModalService) { }
constructor(
public service: OrderManagementService,
private modal: NzModalService,
private router: Router
) { }
/**
* 查询参数
@ -87,7 +92,7 @@ export class OrderManagementComplaintComponent implements OnInit {
initSF() {
this.schema = {
properties: {
no: {
complaintCode: {
type: 'string',
title: '投诉单号',
},
@ -114,44 +119,50 @@ export class OrderManagementComplaintComponent implements OnInit {
title: '投诉单号',
width: '100px',
className: 'text-center',
render: 'goodsId'
render: 'complaintCode'
},
{
title: '运单号',
width: '100px',
className: 'text-center',
render: 'goodsId'
index: 'wayBillCode'
},
{
title: '投诉时间',
width: '100px',
index: 'complainantTime',
className: 'text-center',
},
{ title: '托运方', index: 'externalSn', width: '120px', className: 'text-center' },
{ title: '司机', index: 'linkUrl', width: '120px', className: 'text-center' },
{ title: '托运方', index: 'shipperAppUserId', width: '120px', className: 'text-center' },
{ title: '司机', index: 'driverId', width: '120px', className: 'text-center' },
{
title: '投诉原因',
className: 'text-center',
width: '120px',
index: 'complaintCauseLabel'
},
{
title: '投诉状态',
className: 'text-center',
width: '120px',
index: 'complaintStatusLabel'
}, {
title: '处理结果',
className: 'text-center',
width: '120px',
index:'handleResult'
},
{
title: '投诉方',
className: 'text-center',
width: '120px',
index: 'complainantPartyLabel'
},
{
title: '投诉人',
className: 'text-center',
width: '120px',
render: 'complainant'
},
{
title: '操作',
@ -165,7 +176,7 @@ export class OrderManagementComplaintComponent implements OnInit {
},
{
text: '查看',
click: (_record) => this.viewEvaluate(_record),
click: (_record) => this.view(_record),
},
],
},
@ -174,7 +185,7 @@ export class OrderManagementComplaintComponent implements OnInit {
initSTAudit() {
this.schemaView = {
properties: {
roleDescription: {
handleResult: {
title: '处理结果',
type: 'string',
maxLength: 50,
@ -185,6 +196,7 @@ export class OrderManagementComplaintComponent implements OnInit {
},
},
},
required: ['handleResult']
};
this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } };
}
@ -247,19 +259,64 @@ export class OrderManagementComplaintComponent implements OnInit {
查看评价: 3
*/
handleCancel(type: string) {
console.log(type)
const paramsa = {
...this.sfView.value,
handleStatus: 0,
id: this.channelId
}
this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{
console.log(res)
if(res) {
this.service.msgSrv.success('已拒绝!')
this.isVisibleRE = false
} else{
this.service.msgSrv.error(res?.msg)
}
})
this.isVisibleRE = false
}
handleCancel2() {
const paramsa = {
id: this.channelId
}
this.service.request(this.service.$api_get_canelComplaint, paramsa).subscribe((res: any) =>{
console.log(res)
if(res) {
this.service.msgSrv.success('已拒绝!')
this.isVisibleRE = false
} else{
this.service.msgSrv.error(res?.msg)
}
})
this.isVisibleRE = false
}
/**
* 审核通过按钮
*/
handleOK() {
const paramsa = {
...this.sfView.value,
handleStatus: 1,
id: this.channelId
}
this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{
console.log(res)
if(res) {
this.service.msgSrv.success('已通过!')
this.isVisibleRE = false
} else{
this.service.msgSrv.error(res?.msg)
}
})
}
/**
*查看评价
*/
viewEvaluate(item: any) {
this.isVisibleRE = true
this.channelId = item.id;
}
view(value: any) {
this.router.navigate(['/order-management/complaint-detail/' + value.id])
}
}

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-24 17:48:02
* @LastEditTime: 2022-01-04 17:31:44
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\order-management-routing.module.ts
@ -14,6 +14,7 @@ import { OrderManagementBulkDetailChangeComponent } from './components/bulk-deta
import { OrderManagementBulkeDetailComponent } from './components/bulk-detail/bulk-detail.component';
import { OrderManagementBulkComponent } from './components/bulk/bulk.component';
import { OrderManagementCarManageComponent } from './components/car-manage/car-manage.component';
import { OrderManagementComplaintDetailComponent } from './components/complaint-detail/complaint-detail.component';
import { OrderManagementComplaintComponent } from './components/complaint/complaint.component';
import { OrderManagementDriverManageComponent } from './components/driver-manage/driver-manage.component';
import { OrderManagementRiskDetailComponent } from './components/risk-detail/risk-detail.component';
@ -36,6 +37,7 @@ const routes: Routes = [
{ path: 'risk', component: OrderManagementRiskComponent },
{ path: 'risk-detail/:id', component: OrderManagementRiskDetailComponent },
{ path: 'complaint', component: OrderManagementComplaintComponent },
{ path: 'complaint-detail/:id', component: OrderManagementComplaintDetailComponent },
]
@NgModule({
imports: [RouterModule.forChild(routes)],

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2021-12-29 20:07:54
* @LastEditTime: 2022-01-04 17:31:58
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\order-management.module.ts
@ -14,6 +14,7 @@ import { OrderManagementBulkDetailChangeComponent } from './components/bulk-deta
import { OrderManagementBulkeDetailComponent } from './components/bulk-detail/bulk-detail.component';
import { OrderManagementBulkComponent } from './components/bulk/bulk.component';
import { OrderManagementCarManageComponent } from './components/car-manage/car-manage.component';
import { OrderManagementComplaintDetailComponent } from './components/complaint-detail/complaint-detail.component';
import { OrderManagementComplaintComponent } from './components/complaint/complaint.component';
import { OrderManagementDriverManageComponent } from './components/driver-manage/driver-manage.component';
import { OrderManagementRiskDetailComponent } from './components/risk-detail/risk-detail.component';
@ -59,7 +60,8 @@ const COMPONENTS: Type<void>[] = [
OrderManagementBulkDetailChangeComponent,
VehicleModifyRateComponent,
VehicleFreightPeopleComponent,
VehicleModifyCaptainComponent
VehicleModifyCaptainComponent,
OrderManagementComplaintDetailComponent
];
@NgModule({

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime: 2022-01-04 11:07:08
* @LastEditTime: 2022-01-04 16:30:06
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\services\order-management.service.ts
@ -107,6 +107,16 @@ export class OrderManagementService extends ShipperBaseService {
$api_set_updateAdditionalRateBatch = `/api/sdc/billOperate/updateAdditionalRateBatch`;
// 查询投诉列表
$api_get_operate_listPage = `/api/sdc/complaint/operate/listPage`;
// 获取投诉表详情
$api_get_getComplaintDriverDetails = `/api/sdc/complaint/operate/getComplaintDriverDetails`;
// 处理投诉
$api_get_dealWithComplaint = `/api/sdc/complaint/operate/dealWithComplaint`;
// 撤销投诉
$api_get_canelComplaint = `/api/sdc/complaint/operate/canelComplaint`;

View File

@ -121,8 +121,21 @@
[nzBorderless]="!isEditDriver" [placeholder]="isEditDriver?'':'-'">
</sv>
<sv label="准驾车型">
<input nz-input type="text" [(ngModel)]="driverDetail.driverModel" [readonly]="!isEditDriver"
[nzBorderless]="!isEditDriver" [placeholder]="isEditDriver?'':'-'">
<nz-select
[nzMaxTagCount]="3"
nzPlaceHolder="Please select"
[(ngModel)]="driverDetail.driverModel"
nzMode="multiple"
[nzPlaceHolder]="isEditDriver?'':'-'" [nzBorderless]="!isEditDriver"
[nzShowArrow]="isEditDriver"
[nzDisabled]="!isEditDriver"
>
<nz-option
*ngFor="let i of contencarModel"
[nzLabel]="i.label"
[nzValue]="i.label"
></nz-option>
</nz-select>
</sv>
<sv label="有效期起">
<nz-date-picker [(ngModel)]="driverDetail.validStartTime" [nzDisabled]="!isEditDriver"

View File

@ -19,11 +19,12 @@ import { UsermanageService } from '../../../services/usercenter.service';
export class UserCenterComponentsDriverDetailComponent implements OnInit {
detailData: any;
userDetail: any;
contencarModel: any;
userIdentityDetail: any = {};
tempalateUserIdentityDetail = { ...this.userIdentityDetail };
driverDetail: any = {
licenseNo: '',
driverModel: '',
driverModel: [],
validStartTime: '',
validEndTime: '',
signingOrganization: '',
@ -35,7 +36,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
validStartTime: '',
validEndTime: '',
certificatePhotoWatermark: '',
regionCode: '',
regionCode: ''
};
tempalateLicenseDetail = { ...this.licenseDetail };
columns: STColumn[] = [
@ -75,6 +76,12 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
this.userDetail = res;
}
});
this.service.request(this.service.$api_getDictValue, { dictKey: 'driverModel' }).subscribe(res => {
if (res) {
console.log(res);
this.contencarModel = res;
}
});
// 获取用户个人信息
this.service.request(this.service.$api_get_user_identity, { id: this.route.snapshot.params.id }).subscribe(res => {
if (res) {
@ -85,8 +92,10 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
// 获取驾驶证信息
this.service.request(this.service.$api_get_driver_license, { appUserId: this.route.snapshot.params.id }).subscribe(res => {
if (res?.id) {
console.log('driverDetail' ,res);
Object.assign(res, { driverModel: res.driverModel ? res.driverModel.split(',') : [] });
console.log('driverDetail', res);
this.driverDetail = res;
this.tempalateDriverData = { ...this.driverDetail };
}
});
@ -229,7 +238,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
*/
ratify(type: number) {
if (type) {
console.log(this.driverDetail)
console.log(this.driverDetail);
this.isEditDriver = true;
} else {
this.isEditUser = true;
@ -258,20 +267,20 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
*/
initDetailByCode() {
// 根据地区code查询地区详情
this.service.request(this.service.$api_get_region_by_code, { regionCode:'' }).subscribe((res: any) => {
console.log(res)
this.adressCodeList = res
})
this.service.request(this.service.$api_get_region_by_code, { regionCode: '' }).subscribe((res: any) => {
console.log(res);
this.adressCodeList = res;
});
}
/**
* 修改驾驶证,从业资格证信息
*/
saveDriver() {
console.log(this.route.snapshot.params.id)
console.log(this.route.snapshot.params.id);
const driverDetail = this.driverDetail;
const licenseDetail = this.licenseDetail;
console.log(this.driverDetail)
console.log(this.driverDetail);
const params = {
userId: this.route.snapshot.params.id,
mobile: this.userDetail?.phone,
@ -280,7 +289,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
appUserId: driverDetail?.appUserId || this.route.snapshot.params.id,
certificatePhoto: driverDetail.certificatePhoto,
certificatePhotoWatermark: driverDetail.certificatePhotoWatermark,
driverModel: driverDetail.driverModel,
driverModel: driverDetail.driverModel.join(','),
id: driverDetail.id,
licenseNo: driverDetail.licenseNo,
signingOrganization: driverDetail.signingOrganization,
@ -311,6 +320,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
: this.datePipe.transform(licenseDetail.validStartTime, 'yyyy-MM-dd')
}
};
console.log(params)
this.service.request(this.service.$api_update_driver_license, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('修改成功');

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-11-29 15:22:34
* @LastEditTime: 2022-01-04 10:11:16
* @LastEditTime: 2022-01-05 10:30:26
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\usercenter\services\usercenter.service.ts
@ -105,6 +105,8 @@ export class UsermanageService extends ShipperBaseService {
$api_ocr_recognize_business_license = '/api/mdc/pbc/hwc/ocr/recognizeBusinessLicense';
// 身份证识别
$api_ocr_recognize_id_card = '/api/mdc/pbc/hwc/ocr/recognizeIdCard';
// 获取字典
$api_getDictValue = '/api/mdc/pbc/dictItems/getDictValue';
constructor(public injector: Injector, private nzModalService: NzModalService, public eaCacheSrv: EACacheService) {
super(injector,eaCacheSrv);

View File

@ -380,9 +380,17 @@
"icon": "anticon anticon-dashboard",
"group": true,
"children": [
{
"text": "保单管理",
"link": "/contract-management/policy"
},
{
"text": "合同列表",
"link": "/contract-management/list"
},
{
"text": "合同模板",
"link": "/contract-management/template"
}
]
},