车辆对接
This commit is contained in:
@ -0,0 +1,57 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2022-01-05 11:01:55
|
||||
* @LastEditTime: 2022-01-05 13:47: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\contract-management\components\contract-template-detail\contract-template-detail.component.html
|
||||
-->
|
||||
<!-- 页头 -->
|
||||
<page-header-wrapper [logo]="logo" [title]="textStatus" [content]="headerContent">
|
||||
<ng-template #logo>
|
||||
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button>
|
||||
</ng-template>
|
||||
<ng-template #headerContent>
|
||||
<div nz-row style="display: flex; justify-content: end;">
|
||||
<div nz-col >
|
||||
<button nz-button nzSize="large" nzType="default" (click)="cancel()">取消</button>
|
||||
<button class="ml-lg" nz-button nzSize="large" nzType="primary" (click)="save()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
|
||||
|
||||
<nz-card >
|
||||
<sf #sf [schema]="schema" [formData]="sfdata" [button]="'none'" [ui]="ui"></sf>
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<div nz-col nzSpan="20" style="overflow: scroll">
|
||||
<nz-card class="card-height" *ngIf="isUpdate">
|
||||
<div class="mb-md">
|
||||
<div></div>
|
||||
</div>
|
||||
<div [innerHTML]="templateHTML | safehtml"></div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="card-height" *ngIf="!isUpdate">
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col nzSpan="24">
|
||||
<input nz-input placeholder="请输入合同标题" [(ngModel)]="title" />
|
||||
</div>
|
||||
<div nz-col nzSpan="24" style="margin-top: 15px;">
|
||||
<sf #sf2 mode="edit" [schema]="schema2" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 24 }} }"
|
||||
button="none"> </sf>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nz-card>
|
||||
</div>
|
||||
</nz-card>
|
||||
<!-- <div class="mb-md save-btn">
|
||||
<button nz-button nzSize="large" nzType="default" (click)="cancel()">取消</button>
|
||||
<button class="ml-lg" nz-button nzSize="large" nzType="primary" (click)="save()">保存</button>
|
||||
</div> -->
|
||||
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-11-29 20:19:08
|
||||
* @LastEditTime: 2021-11-29 20:31:00
|
||||
* @LastEditors: your name
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\detail\detail.component.spec.ts
|
||||
*/
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { UserCenterComponentsDriverDetailComponent } from './contract-template-detail.component';
|
||||
|
||||
describe('UserCenterComponentsDriverDetailComponent', () => {
|
||||
let component: UserCenterComponentsDriverDetailComponent;
|
||||
let fixture: ComponentFixture<UserCenterComponentsDriverDetailComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [UserCenterComponentsDriverDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(UserCenterComponentsDriverDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,135 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2022-01-05 11:01:55
|
||||
* @LastEditTime: 2022-01-05 13:51: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\contract-management\components\contract-template-detail\contract-template-detail.component.ts
|
||||
*/
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFTagWidgetSchema, SFTextWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { ImageViewComponent } from 'src/app/shared/components/imagelist';
|
||||
import { ContractManagementService } from '../../services/contract-management.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-contract-management-template-detail-complaint',
|
||||
templateUrl: './contract-template-detail.component.html',
|
||||
styleUrls: ['./contract-template-detail.component.less'],
|
||||
providers: [DatePipe]
|
||||
})
|
||||
export class UserCenterComponentsDriverDetailComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
private nzModalService: NzModalService,
|
||||
public service: ContractManagementService,
|
||||
public route: ActivatedRoute,
|
||||
private datePipe: DatePipe
|
||||
) {}
|
||||
textStatus = '新建模板'
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema: SFSchema = {};
|
||||
@ViewChild('sf2', { static: false }) sf2!: SFComponent;
|
||||
schema2: SFSchema = {};
|
||||
ui!: SFUISchema;
|
||||
sfdata: any;
|
||||
title: any;
|
||||
templateHTML: any;
|
||||
isUpdate = false;
|
||||
ngOnInit() {
|
||||
this.initSF()
|
||||
this.initSF2()
|
||||
if(this.route.snapshot.queryParams.status == 3) {
|
||||
console.log('进来了吗')
|
||||
// 新建
|
||||
this.isUpdate = false;
|
||||
} else {
|
||||
// 编辑
|
||||
this.textStatus = '编辑模板';
|
||||
this.isUpdate =true;
|
||||
}
|
||||
|
||||
console.log(this.route.snapshot.params.id)
|
||||
console.log(this.route.snapshot.queryParams.status)
|
||||
}
|
||||
goBack() {
|
||||
window.history.go(-1)
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
phon: {
|
||||
type: 'string',
|
||||
title: '模版名称',
|
||||
},
|
||||
stateReceipt: {
|
||||
type: 'string',
|
||||
title: '是否回单',
|
||||
enum: [
|
||||
{ label: '需要', value: true },
|
||||
{ label: '不需要', value: false }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
errors: { required: '请选择' },
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
title: '项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
stateReceipt: value => value === true
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
}
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 8 }
|
||||
}
|
||||
};
|
||||
}
|
||||
initSF2(data?: any) {
|
||||
this.schema2 = {
|
||||
properties: {
|
||||
content: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'tinymce',
|
||||
loadingTip: 'loading...',
|
||||
config: {
|
||||
height: 650
|
||||
}
|
||||
},
|
||||
default: data?.agreementContent || ''
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
cancel() {
|
||||
|
||||
}
|
||||
|
||||
save () {
|
||||
console.log(this.sf.value);
|
||||
console.log(this.sfdata);
|
||||
console.log(this.sf2.value);
|
||||
console.log(this.title);
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 11:10:14
|
||||
* @LastEditTime: 2022-01-05 10:02:34
|
||||
* @LastEditTime: 2022-01-05 13:38:56
|
||||
* @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
|
||||
@ -38,6 +38,11 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card >
|
||||
<div class="NewBtn">
|
||||
<button nz-button nzType="primary"(click)="creatTemplate()">
|
||||
新建
|
||||
</button>
|
||||
</div>
|
||||
<div style="margin-top: 15px;">
|
||||
<st
|
||||
#st
|
||||
@ -51,47 +56,8 @@
|
||||
[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>
|
||||
<a (click)="view(item)">{{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>
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
.NewBtn{
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
@ -124,11 +124,11 @@ export class OrderManagementTemplateComponent implements OnInit {
|
||||
buttons: [
|
||||
{
|
||||
text: '编辑',
|
||||
click: (_record) => this.view(_record),
|
||||
click: (_record) => this.edit(_record),
|
||||
},
|
||||
{
|
||||
text: '删除',
|
||||
click: (_record) => this.view(_record),
|
||||
click: (_record) => this.delete(_record),
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -203,10 +203,40 @@ export class OrderManagementTemplateComponent implements OnInit {
|
||||
viewEvaluate(item: any) {
|
||||
this.channelId = item.id;
|
||||
}
|
||||
view(value: any) {
|
||||
this.router.navigate(['/order-management/complaint-detail/' + value.id])
|
||||
edit(value: any) {
|
||||
this.router.navigate(['/contract-management/template/detail/' + value.id],{
|
||||
queryParams: {
|
||||
status: 2
|
||||
}
|
||||
})
|
||||
}
|
||||
creatTemplate() {
|
||||
|
||||
this.router.navigate(['/contract-management/template/detail/' + 0], {
|
||||
queryParams: {
|
||||
status: 1
|
||||
}
|
||||
})
|
||||
}
|
||||
goBack() {
|
||||
window.history.go(-1)
|
||||
}
|
||||
view(value: any) {
|
||||
this.router.navigate(['/contract-management/template/detail/' + value.id],{
|
||||
queryParams: {
|
||||
status: 3
|
||||
}
|
||||
})
|
||||
}
|
||||
delete(value: any) {
|
||||
this.modal.confirm({
|
||||
nzTitle: '<i>删除确认</i>',
|
||||
nzOnOk: () =>
|
||||
// this.service.delMany(ids).subscribe(res => {
|
||||
// if (res === true) {
|
||||
// this.service.msgSrv.success('删除成功!');
|
||||
// }
|
||||
// })
|
||||
console.log(value)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-07 15:57:49
|
||||
* @LastEditTime: 2022-01-05 09:50:37
|
||||
* @LastEditTime: 2022-01-05 11:05:16
|
||||
* @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
|
||||
@ -9,12 +9,15 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { ContractManagementContractListComponent } from './components/contract-list/contract-list.component';
|
||||
import { UserCenterComponentsDriverDetailComponent } from './components/contract-template-detail/contract-template-detail.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 }];
|
||||
{ path: 'template/detail/:id', component: UserCenterComponentsDriverDetailComponent },
|
||||
{ path: 'policy', component: ContractManagementPolicyComponent }
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-07 15:57:49
|
||||
* @LastEditTime: 2022-01-05 09:50:29
|
||||
* @LastEditTime: 2022-01-05 11:05:11
|
||||
* @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
|
||||
@ -13,11 +13,13 @@ import { ContractManagementManagementRoutingModule } from './contract-management
|
||||
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';
|
||||
import { UserCenterComponentsDriverDetailComponent } from './components/contract-template-detail/contract-template-detail.component';
|
||||
|
||||
const COMPONENTS: any = [
|
||||
ContractManagementContractListComponent,
|
||||
ContractManagementPolicyComponent,
|
||||
OrderManagementTemplateComponent
|
||||
OrderManagementTemplateComponent,
|
||||
UserCenterComponentsDriverDetailComponent
|
||||
];
|
||||
const NOTROUTECOMPONENTS: any = [];
|
||||
@NgModule({
|
||||
|
||||
Reference in New Issue
Block a user