解决冲突
This commit is contained in:
@ -4,13 +4,12 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-12 10:52:50
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:16:18
|
||||
* @LastEditTime : 2022-02-24 10:31:05
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template\\contract-template.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
|
||||
<!-- 搜索表单 -->
|
||||
<page-header-wrapper [title]="'合同模板'"> </page-header-wrapper>
|
||||
<nz-card>
|
||||
<div nz-row nzGutter="8">
|
||||
<!-- 查询字段小于或等于3个时,不显示伸缩按钮 -->
|
||||
@ -28,9 +27,16 @@
|
||||
</div>
|
||||
|
||||
<!-- 查询字段大于3个时,根据展开状态调整布局 -->
|
||||
<ng-container *ngIf="queryFieldCount > 4">
|
||||
<ng-container>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'">
|
||||
<ng-template sf-template="signTime" let-me let-ui="ui" let-schema="schema">
|
||||
<nz-range-picker [nzShowTime]="true" [(ngModel)]="sf.value.signTime"></nz-range-picker>
|
||||
</ng-template>
|
||||
<ng-template sf-template="effectiveEndTime" let-me let-ui="ui" let-schema="schema">
|
||||
<nz-range-picker [nzShowTime]="true" [(ngModel)]="sf.value.effectiveEndTime"></nz-range-picker>
|
||||
</ng-template>
|
||||
</sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
||||
<button
|
||||
@ -40,10 +46,9 @@
|
||||
[nzLoading]="service.http.loading"
|
||||
(click)="st?.load(1)"
|
||||
acl
|
||||
[acl-ability]="['CONTRACT-TEMPLATE-search']"
|
||||
[acl-ability]="['CONTRACT-INDEX-listFrame']"
|
||||
>查询</button
|
||||
>
|
||||
<button nz-button nzType="primary" acl [acl-ability]="['CONTRACT-TEMPLATE-export']">导出</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
|
||||
@ -4,27 +4,27 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-05 09:45:47
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:16:22
|
||||
* @LastEditTime : 2022-02-24 10:25:58
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template\\contract-template.component.spec.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ContractManagementTemplateComponent } from './contract-template.component';
|
||||
import { ContractManagementTemplateDetailComponent } from './contract-template.component';
|
||||
|
||||
describe('ContractManagementTemplateComponent', () => {
|
||||
let component: ContractManagementTemplateComponent;
|
||||
let fixture: ComponentFixture<ContractManagementTemplateComponent>;
|
||||
describe('ContractManagementTemplateDetailComponent', () => {
|
||||
let component: ContractManagementTemplateDetailComponent;
|
||||
let fixture: ComponentFixture<ContractManagementTemplateDetailComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ContractManagementTemplateComponent ]
|
||||
declarations: [ ContractManagementTemplateDetailComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ContractManagementTemplateComponent);
|
||||
fixture = TestBed.createComponent(ContractManagementTemplateDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
@ -9,11 +9,11 @@ import { ContractManagementService } from '../../services/contract-management.se
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-contract-management-template-complaint',
|
||||
selector: 'app-contract-management-template-detail-complaint',
|
||||
templateUrl: './contract-template.component.html',
|
||||
styleUrls: ['./contract-template.component.less']
|
||||
})
|
||||
export class ContractManagementTemplateComponent implements OnInit {
|
||||
export class ContractManagementTemplateDetailComponent implements OnInit {
|
||||
ui: SFUISchema = {};
|
||||
uiView: SFUISchema = {};
|
||||
schema: SFSchema = {};
|
||||
@ -69,12 +69,37 @@ export class ContractManagementTemplateComponent implements OnInit {
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
templateName: {
|
||||
type: 'string',
|
||||
title: '模板名称',
|
||||
},
|
||||
templateType: {
|
||||
title: '模板类型',
|
||||
signingObject: {
|
||||
type: 'string',
|
||||
title: '签约对象',
|
||||
enum: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '货主', value: 1 },
|
||||
{ label: '司机', value: 2 }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
contractType: {
|
||||
title: '合同类型',
|
||||
type: 'string',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
params: { dictKey: 'contract:type' },
|
||||
containAllLable: true,
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
templateType2: {
|
||||
title: '货源类型',
|
||||
type: 'string',
|
||||
default: '',
|
||||
ui: {
|
||||
@ -82,7 +107,7 @@ export class ContractManagementTemplateComponent implements OnInit {
|
||||
params: { dictKey: 'contract:template:type' },
|
||||
containsAllLable: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
@ -102,14 +127,22 @@ export class ContractManagementTemplateComponent implements OnInit {
|
||||
render: 'templateName'
|
||||
},
|
||||
{
|
||||
title: '模板类型',
|
||||
title: '签约对象',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'templateType'
|
||||
index: 'signingObject'
|
||||
},
|
||||
{
|
||||
title: '单据类型',
|
||||
index: 'contractType',
|
||||
title: '合同类型',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'contractType'
|
||||
},
|
||||
{
|
||||
title: '货源类型',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index: 'contractType'
|
||||
},
|
||||
{ title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' },
|
||||
{
|
||||
@ -160,9 +193,9 @@ export class ContractManagementTemplateComponent implements OnInit {
|
||||
get queryFieldCount(): number {
|
||||
return Object.keys(this.schema?.properties || {}).length;
|
||||
}
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle(): void {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
@ -178,14 +211,14 @@ export class ContractManagementTemplateComponent implements OnInit {
|
||||
}
|
||||
|
||||
edit(value: any) {
|
||||
this.router.navigate(['/contract-management/template/detail/' + value.id],{
|
||||
this.router.navigate(['/contract-management/template/text/' + value.id],{
|
||||
queryParams: {
|
||||
status: 2
|
||||
}
|
||||
})
|
||||
}
|
||||
creatTemplate() {
|
||||
this.router.navigate(['/contract-management/template/detail/' + 0], {
|
||||
this.router.navigate(['/contract-management/template/text/' + 0], {
|
||||
queryParams: {
|
||||
status: 1
|
||||
}
|
||||
@ -195,7 +228,7 @@ export class ContractManagementTemplateComponent implements OnInit {
|
||||
window.history.go(-1)
|
||||
}
|
||||
view(value: any) {
|
||||
this.router.navigate(['/contract-management/template/detail/' + value.id],{
|
||||
this.router.navigate(['/contract-management/template/text/' + value.id],{
|
||||
queryParams: {
|
||||
status: 3
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user