diff --git a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.html b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.html index 14be2c5c..32c3b243 100644 --- a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.html +++ b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-07 13:29:57 * @LastEditors : Shiming - * @LastEditTime : 2022-02-23 16:04:18 + * @LastEditTime : 2022-02-24 10:08:53 * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-frame\\contract-frame.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -29,8 +29,9 @@
- + + + diff --git a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts index 3aea4685..626112ec 100644 --- a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts +++ b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts @@ -1,14 +1,17 @@ +import { DatePipe } from '@angular/common'; import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STChange } from '@delon/abc/st'; -import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/form'; +import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema, SFSelectWidgetSchema } from '@delon/form'; +import { ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { ContractManagementService } from '../../services/contract-management.service'; @Component({ selector: 'app-contract-management-contract-frame', templateUrl: './contract-frame.component.html', - styleUrls: ['./contract-frame.component.less'] + styleUrls: ['./contract-frame.component.less'], + providers: [DatePipe] }) export class ContractManagementFrameComponent implements OnInit { url = `/rule?_allow_anonymous=true`; @@ -22,19 +25,48 @@ export class ContractManagementFrameComponent implements OnInit { columns: STColumn[] = []; ui: SFUISchema = {}; _$expand = false; - - reqParams = {}; selectedRows: any[] = []; - constructor(public service: ContractManagementService, private nzModalService: NzModalService, private router: Router) {} + constructor( + public service: ContractManagementService, + private nzModalService: NzModalService, + private router: Router, + public shipperservice: ShipperBaseService, + private datePipe: DatePipe, + ) {} ngOnInit(): void { - this.initST() - this.initSF() + this.initST(); + this.initSF(); } + /** + * 查询参数 + */ + get reqParams() { + const params = { + ...this.sf?.value, + } + delete params.signTime; + delete params._$expand; + if(this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { + params.signTime = { + start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'), + end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'), + } + } + if(this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { + params.effectiveEndTime = { + start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'), + end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'), + } + } + return { + ...params + }; + } /** * 初始化数据列表 */ - initST() { + initST() { this.columns = [ { title: '合同编号', @@ -42,14 +74,26 @@ export class ContractManagementFrameComponent implements OnInit { className: 'text-center', render: 'contractCode' }, + { + title: '签约对象', + width: '100px', + className: 'text-center', + index: 'signingObject' + }, + { + title: '合同类型', + width: '100px', + className: 'text-center', + index: 'contractType' + }, { title: '合同名称', width: '100px', className: 'text-center', - index:'contractName' + index: 'contractName' }, - { title: '托运人', index: 'shipperName', width: '120px', className: 'text-center' }, - { title: '承运人', index: 'carrierName', width: '120px', className: 'text-center' }, + { title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, + { title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' }, { title: '有效期至', className: 'text-center', @@ -75,47 +119,108 @@ export class ContractManagementFrameComponent implements OnInit { '3': { text: '已撤销', color: 'warning' }, '4': { text: '已作废', color: 'warning' }, '5': { text: '已过期', color: 'warning' }, - '7': { text: '已拒签', color: 'warning' }, - }, - }, - + '7': { text: '已拒签', color: 'warning' } + } + } ]; } - /** - * 初始化查询表单 - */ - initSF() { - this.schema = { - properties: { - _$expand: { type: 'boolean', ui: { hidden: true } }, - contractCode: { - type: 'string', - title: '合同编号', - }, - shipperName: { - type: 'string', - title: '托运人' - }, - carrierName: { - type: 'string', - title: '承运人', - }, - signTime: { - title: '签署日期', - type: 'string', - ui: { - widget: 'custom', - visibleIf: { - _$expand: (value: boolean) => value, - }, - } - }, + /** + * 初始化查询表单 + */ + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + contractCode: { + type: 'string', + title: '合同编号' }, - type: 'object', - }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; - } - /** + 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, + }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + visibleIf: { + _$expand: (value: boolean) => value + }, + asyncData: () => this.shipperservice.getNetworkFreightForwarder() + } + }, + contractObjectName: { + type: 'string', + title: '合同对象', + ui: { + visibleIf: { + _$expand: (value: boolean) => value, + }, + } + }, + signTime: { + title: '签署日期', + type: 'string', + ui: { + widget: 'custom', + visibleIf: { + _$expand: (value: boolean) => value, + }, + } + }, + effectiveEndTime: { + title: '有效期', + type: 'string', + ui: { + widget: 'custom', + visibleIf: { + _$expand: (value: boolean) => value, + }, + } + }, + esignFlowStatus: { + title: '状态', + type: 'string', + default: '', + ui: { + widget: 'dict-select', + containsAllLable: true, + params: { dictKey: 'esign:flow:status' }, + containAllLable:true, + visibleIf: { + _$expand: (value: boolean) => value, + }, + } as SFSelectWidgetSchema, + }, + }, + type: 'object' + }; + this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; + } + /** * 查询字段个数 */ get queryFieldCount(): number { @@ -193,7 +298,7 @@ export class ContractManagementFrameComponent implements OnInit { /** * 伸缩查询条件 */ - expandToggle(): void { + expandToggle(): void { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } diff --git a/src/app/routes/contract-management/components/contract-list/contract-list.component.html b/src/app/routes/contract-management/components/contract-list/contract-list.component.html index 562182fc..16e1df80 100644 --- a/src/app/routes/contract-management/components/contract-list/contract-list.component.html +++ b/src/app/routes/contract-management/components/contract-list/contract-list.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-07 15:57:49 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:16:12 + * @LastEditTime : 2022-02-23 20:11:50 * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-list\\contract-list.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -53,6 +53,10 @@ {{ item?.contractCode }} + + + + diff --git a/src/app/routes/contract-management/components/contract-list/contract-list.component.ts b/src/app/routes/contract-management/components/contract-list/contract-list.component.ts index dd3947da..24e61caa 100644 --- a/src/app/routes/contract-management/components/contract-list/contract-list.component.ts +++ b/src/app/routes/contract-management/components/contract-list/contract-list.component.ts @@ -5,6 +5,7 @@ import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema, SFSelectWidgetSc import { NzModalService } from 'ng-zorro-antd/modal'; import { ContractManagementService } from '../../services/contract-management.service'; import { DatePipe } from '@angular/common'; +import { ShipperBaseService } from '@shared'; @Component({ selector: 'app-contract-management-contract-list', @@ -47,6 +48,7 @@ export class ContractManagementContractListComponent implements OnInit { constructor( public service: ContractManagementService, private nzModalService: NzModalService, + public shipperservice: ShipperBaseService, private router: Router, private datePipe: DatePipe, ) {} @@ -67,19 +69,31 @@ export class ContractManagementContractListComponent implements OnInit { render: 'contractCode' }, { - title: '单据类型', + title: '签约对象', width: '100px', className: 'text-center', - index:'documentType' + index:'signingObject' }, { - title: '合同名称', + title: '合同类型', width: '100px', className: 'text-center', - index:'contractName' + index:'contractType' + }, + { + title: '货源类型', + width: '100px', + className: 'text-center', + index:'resourceType' + }, + { title: '合同名称', index: 'contractName', width: '120px', className: 'text-center' }, + { title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, + { + title: '合同对象', + className: 'text-center', + width: '120px', + index: 'contractObjectName' }, - { title: '托运人', index: 'shipperName', width: '120px', className: 'text-center' }, - { title: '承运人', index: 'carrierName', width: '120px', className: 'text-center' }, { title: '业务单号', className: 'text-center', @@ -126,21 +140,35 @@ export class ContractManagementContractListComponent implements OnInit { type: 'string', title: '业务单号' }, - shipperName: { + signingObject: { type: 'string', - title: '托运人' - }, - carrierName: { - type: 'string', - title: '承运人', + 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, visibleIf: { _$expand: (value: boolean) => value, }, - } + } as SFSelectWidgetSchema, }, - documentType: { - title: '单据类型', + resourceType: { + title: '货源类型', type: 'string', default: '', ui: { @@ -153,6 +181,28 @@ export class ContractManagementContractListComponent implements OnInit { }, } as SFSelectWidgetSchema, }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + visibleIf: { + _$expand: (value: boolean) => value + }, + asyncData: () => this.shipperservice.getNetworkFreightForwarder() + } + }, + contractObjectName: { + type: 'string', + title: '合同对象', + ui: { + visibleIf: { + _$expand: (value: boolean) => value, + }, + } + }, signTime: { title: '签署日期', type: 'string', @@ -163,6 +213,20 @@ export class ContractManagementContractListComponent implements OnInit { }, } }, + esignFlowStatus: { + title: '状态', + type: 'string', + default: '', + ui: { + widget: 'dict-select', + containsAllLable: true, + params: { dictKey: 'esign:flow:status' }, + containAllLable:true, + visibleIf: { + _$expand: (value: boolean) => value, + }, + } as SFSelectWidgetSchema, + }, }, type: 'object', }; diff --git a/src/app/routes/contract-management/components/contract-partner/contract-partner.component.html b/src/app/routes/contract-management/components/contract-partner/contract-partner.component.html index 14be2c5c..69819d38 100644 --- a/src/app/routes/contract-management/components/contract-partner/contract-partner.component.html +++ b/src/app/routes/contract-management/components/contract-partner/contract-partner.component.html @@ -4,8 +4,8 @@ * @Author : Shiming * @Date : 2022-01-07 13:29:57 * @LastEditors : Shiming - * @LastEditTime : 2022-02-23 16:04:18 - * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-frame\\contract-frame.component.html + * @LastEditTime : 2022-02-24 10:08:28 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-partner\\contract-partner.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -29,10 +29,11 @@
- + + +
@@ -69,7 +70,7 @@ value, - }, - } - }, + /** + * 初始化查询表单 + */ + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + contractCode: { + type: 'string', + title: '合同编号' }, - type: 'object', - }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; - } - /** + 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 + }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + visibleIf: { + _$expand: (value: boolean) => value + }, + asyncData: () => this.shipperservice.getNetworkFreightForwarder() + } + }, + contractObjectName: { + type: 'string', + title: '合同对象', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + } + } + }, + signTime: { + title: '签署日期', + type: 'string', + ui: { + widget: 'custom', + visibleIf: { + _$expand: (value: boolean) => value + } + } + }, + effectiveEndTime: { + title: '有效期', + type: 'string', + ui: { + widget: 'custom', + visibleIf: { + _$expand: (value: boolean) => value, + }, + } + }, + esignFlowStatus: { + title: '状态', + type: 'string', + default: '', + ui: { + widget: 'dict-select', + containsAllLable: true, + params: { dictKey: 'esign:flow:status' }, + containAllLable: true, + visibleIf: { + _$expand: (value: boolean) => value + } + } as SFSelectWidgetSchema + } + }, + type: 'object' + }; + this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; + } + /** * 查询字段个数 */ get queryFieldCount(): number { @@ -193,7 +298,7 @@ export class ContractManagementPartnerComponent implements OnInit { /** * 伸缩查询条件 */ - expandToggle(): void { + expandToggle(): void { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } diff --git a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts index 8e25c3eb..ec18e998 100644 --- a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts +++ b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-05 11:01:55 * @LastEditors : Shiming - * @LastEditTime : 2022-01-25 14:25:49 + * @LastEditTime : 2022-02-24 10:23:53 * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -16,12 +16,12 @@ import { NzModalService } from 'ng-zorro-antd/modal'; import { ContractManagementService } from '../../services/contract-management.service'; @Component({ - selector: 'app-contract-management-template-detail-complaint', + selector: 'app-contract-management-template-text-complaint', templateUrl: './contract-template-detail.component.html', styleUrls: ['./contract-template-detail.component.less'], providers: [DatePipe] }) -export class ContractManagementTemplateDetailComponent implements OnInit { +export class ContractManagementTemplateTextComponent implements OnInit { constructor( private nzModalService: NzModalService, public service: ContractManagementService, diff --git a/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html new file mode 100644 index 00000000..8c173c07 --- /dev/null +++ b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html @@ -0,0 +1,82 @@ + + + + +
+ +
+ +
+ + + +
+ + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ +
+ +
diff --git a/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.less b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.less new file mode 100644 index 00000000..9df98f26 --- /dev/null +++ b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.less @@ -0,0 +1,4 @@ +.NewBtn{ + float: right; + margin-bottom: 15px; +} \ No newline at end of file diff --git a/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.spec.ts b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.spec.ts new file mode 100644 index 00000000..953a80ed --- /dev/null +++ b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.spec.ts @@ -0,0 +1,35 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-01-05 09:45:47 + * @LastEditors : Shiming + * @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 { ContractManagementTemplateFrameComponent } from './contract-template-frame.component'; + +describe('ContractManagementTemplateFrameComponent', () => { + let component: ContractManagementTemplateFrameComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ ContractManagementTemplateFrameComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ContractManagementTemplateFrameComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.ts b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.ts new file mode 100644 index 00000000..573e6f1e --- /dev/null +++ b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.ts @@ -0,0 +1,250 @@ +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-frame-complaint', + templateUrl: './contract-template-frame.component.html', + styleUrls: ['./contract-template-frame.component.less'] +}) +export class ContractManagementTemplateFrameComponent 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 { + templateType: 'MX', + ...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: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + templateName: { + type: 'string', + 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 + }, + resourceType: { + title: '货源类型', + type: 'string', + default: '', + ui: { + widget: 'dict-select', + params: { dictKey: 'contract:template:type' }, + containsAllLable: 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: 'templateName' + }, + { + title: '签约对象', + width: '100px', + className: 'text-center', + index: 'signingObject' + }, + { + title: '合同类型', + width: '100px', + className: 'text-center', + index: 'contractType' + }, + { + title: '货源类型', + width: '100px', + className: 'text-center', + index: 'resourceType' + }, + { title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' }, + { + title: '创建时间', + className: 'text-center', + index: 'createTime' + }, + { + title: '操作', + fixed: 'right', + className: 'text-left', + buttons: [ + { + text: '编辑', + click: (_record) => this.edit(_record), + acl: { ability: ['CONTRACT-TEMPLATE-edit'] }, + }, + { + text: '删除', + click: (_record) => this.delete(_record), + acl: { ability: ['CONTRACT-TEMPLATE-delete'] }, + }, + ], + }, + ]; + } + 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) { + } + /** + * 重置表单 + */ + resetSF(): void { + this.sf.reset(); + this._$expand = false; + } + + edit(value: any) { + this.router.navigate(['/contract-management/template/text/' + value.id],{ + queryParams: { + status: 2 + } + }) + } + creatTemplate() { + this.router.navigate(['/contract-management/template/text/' + 0], { + queryParams: { + status: 1 + } + }) + } + goBack() { + window.history.go(-1) + } + view(value: any) { + this.router.navigate(['/contract-management/template/text/' + value.id],{ + queryParams: { + status: 3 + } + }) + } + delete(value: any) { + this.modal.confirm({ + nzTitle: '删除确认', + nzOnOk: () => + this.service.request(this.service.$api_deletebatch_contractTemplate, [value.id]).subscribe(res => { + if (res) { + this.service.msgSrv.success('删除成功!'); + this.st.reload(1) + } + }) + }); + } +} diff --git a/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html new file mode 100644 index 00000000..8c173c07 --- /dev/null +++ b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html @@ -0,0 +1,82 @@ + + + + +
+ +
+ +
+ + + +
+ + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ +
+ +
diff --git a/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.less b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.less new file mode 100644 index 00000000..9df98f26 --- /dev/null +++ b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.less @@ -0,0 +1,4 @@ +.NewBtn{ + float: right; + margin-bottom: 15px; +} \ No newline at end of file diff --git a/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.spec.ts b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.spec.ts new file mode 100644 index 00000000..8d20aa3b --- /dev/null +++ b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.spec.ts @@ -0,0 +1,35 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-01-05 09:45:47 + * @LastEditors : Shiming + * @LastEditTime : 2022-02-24 14:09:28 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-partner\\contract-template-partner.component.spec.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ + +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ContractManagementTemplatePartnerComponent } from './contract-template-partner.component'; + +describe('ContractManagementTemplatePartnerComponent', () => { + let component: ContractManagementTemplatePartnerComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ ContractManagementTemplatePartnerComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ContractManagementTemplatePartnerComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.ts b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.ts new file mode 100644 index 00000000..6123de09 --- /dev/null +++ b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.ts @@ -0,0 +1,250 @@ +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-partner-complaint', + templateUrl: './contract-template-partner.component.html', + styleUrls: ['./contract-template-partner.component.less'] +}) +export class ContractManagementTemplatePartnerComponent 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 { + templateType: 'MX', + ...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: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + templateName: { + type: 'string', + 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 + }, + resourceType: { + title: '货源类型', + type: 'string', + default: '', + ui: { + widget: 'dict-select', + params: { dictKey: 'contract:template:type' }, + containsAllLable: 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: 'templateName' + }, + { + title: '签约对象', + width: '100px', + className: 'text-center', + index: 'signingObject' + }, + { + title: '合同类型', + width: '100px', + className: 'text-center', + index: 'contractType' + }, + { + title: '货源类型', + width: '100px', + className: 'text-center', + index: 'resourceType' + }, + { title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' }, + { + title: '创建时间', + className: 'text-center', + index: 'createTime' + }, + { + title: '操作', + fixed: 'right', + className: 'text-left', + buttons: [ + { + text: '编辑', + click: (_record) => this.edit(_record), + acl: { ability: ['CONTRACT-TEMPLATE-edit'] }, + }, + { + text: '删除', + click: (_record) => this.delete(_record), + acl: { ability: ['CONTRACT-TEMPLATE-delete'] }, + }, + ], + }, + ]; + } + 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) { + } + /** + * 重置表单 + */ + resetSF(): void { + this.sf.reset(); + this._$expand = false; + } + + edit(value: any) { + this.router.navigate(['/contract-management/template/text/' + value.id],{ + queryParams: { + status: 2 + } + }) + } + creatTemplate() { + this.router.navigate(['/contract-management/template/text/' + 0], { + queryParams: { + status: 1 + } + }) + } + goBack() { + window.history.go(-1) + } + view(value: any) { + this.router.navigate(['/contract-management/template/text/' + value.id],{ + queryParams: { + status: 3 + } + }) + } + delete(value: any) { + this.modal.confirm({ + nzTitle: '删除确认', + nzOnOk: () => + this.service.request(this.service.$api_deletebatch_contractTemplate, [value.id]).subscribe(res => { + if (res) { + this.service.msgSrv.success('删除成功!'); + this.st.reload(1) + } + }) + }); + } +} diff --git a/src/app/routes/contract-management/components/contract-template/contract-template.component.html b/src/app/routes/contract-management/components/contract-template/contract-template.component.html index 7b8d13d9..8c173c07 100644 --- a/src/app/routes/contract-management/components/contract-template/contract-template.component.html +++ b/src/app/routes/contract-management/components/contract-template/contract-template.component.html @@ -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. --> -
@@ -28,9 +27,16 @@
- +
- + + + + + + + +
-
diff --git a/src/app/routes/passport/components/order-agreement/order-agreement.component.html b/src/app/routes/passport/components/order-agreement/order-agreement.component.html index c56608d8..89e01a91 100644 --- a/src/app/routes/passport/components/order-agreement/order-agreement.component.html +++ b/src/app/routes/passport/components/order-agreement/order-agreement.component.html @@ -1,3 +1,13 @@ +

diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index 2585caa1..162df5b9 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -19,6 +19,7 @@ import { AuthGuard } from '../core/guards/auth.guard'; // dashboard pages import { DashboardComponent } from './dashboard/dashboard.component'; +import { OrderAgreementComponent } from './passport/components/order-agreement/order-agreement.component'; const routes: Routes = [ { @@ -74,6 +75,11 @@ const routes: Routes = [ ] }, // passport + { + path: 'agreement', + component: OrderAgreementComponent, + data: { title: '协议', titleI18n: 'app.login.agreement' } + }, { path: '', loadChildren: () => import('./passport/passport.module').then(m => m.PassportModule) }, { path: 'exception', loadChildren: () => import('./exception/exception.module').then(m => m.ExceptionModule) }, // 单页不包裹Layout diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html index 7de4a2a1..6fb0dc32 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html @@ -220,22 +220,12 @@
服务信息
-
- -
-
-
-
-
- 购买货运险 - -
-
-
- 推荐投保,填写货值自动估保费,司机接单后不可退保。详见《投保告知》 -
-
+
+ + + + 推荐投保,填写货值自动估保费,司机接单后不可退保。详见《投保告知》
value === '2' } } as SFCheckboxWidgetSchema, default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'] - } - } - }; - this.ui55 = { - '*': { - spanLabelFixed: 100, - grid: { span: 24 } - }, - $insuranceType: { - grid: { span: 12 } - } - }; - } - initSF5() { - this.schema5 = { - properties: { + }, + freeInsurance: { + type: 'string', + title: '赠送保险', + ui: { + widget: 'custom', + visibleIf: { insuranceType: (value: string) => value !== '3' } + } + }, + insurancePackagedGoods:{ + type: 'string', + title: '货物包装', + ui: { + widget: 'dict-select', + params: { dictKey: 'insure:packaged:goods' }, + visibleIf: { insuranceType: (value: string) => value !== '3' } + } as SFSelectWidgetSchema + }, + hidenField:{ + type: 'string', + title: '', + default:' ', + ui: { + widget:'text' + } + }, goodsValue: { type: 'string', title: '货物价值', ui: { - widget: 'custom' + widget: 'custom', + visibleIf: { insuranceType: (value: string) => value !== '3' } } }, insurancePremium: { type: 'string', title: '', ui: { - widget: 'custom' + widget: 'custom', + visibleIf: { insuranceType: (value: string) => value !== '3' } } }, insuranceRate: { @@ -460,12 +467,22 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { hidden: true } } - } + }, + required: ['insurancePackagedGoods'] }; this.ui5 = { '*': { spanLabelFixed: 115, grid: { span: 12 } + }, + $type1:{ + grid: { span: 24 } + }, + $type2:{ + grid: { span: 24 } + }, + $freeInsurance:{ + grid: { span: 24 } } }; } @@ -871,7 +888,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { loadingTime: this.validateForm1?.value?.loadingTime, unloadingTime: this.validateForm1?.value?.unloadingTime, unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo], - insuranceType: this.sf55.value.insuranceType, goodsInfoDTOList: [ { ...this.sf4.value, @@ -1112,12 +1128,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } this.totalFees = res?.shippingInformationVO?.totalFee || '0'; this.sf5data = { - goodsValue: res?.goodsValue, + insuranceType: res?.insuranceType || '', + goodsValue: res?.goodsValue || '', insurancePremium: res?.insurancePremium || '', - insuranceRate: res?.insuranceRate || '' - }; - this.sf55data = { - insuranceType: res?.insuranceType || '' + insuranceRate: res?.insuranceRate || '', + insurancePackagedGoods: res?.insurancePackagedGoods || '', }; this.sf6data = { stateReceipt: res?.stateReceipt, diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.html b/src/app/routes/supply-management/components/release-publish/release-publish.component.html index 7218b087..00e854cd 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.html +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.html @@ -219,26 +219,15 @@
-
服务信息
-
- -
-
-
-
-
- 购买货运险 - -
-
-
- 推荐投保,填写货值自动估保费,司机接单后不可退保。详见《投保告知》 -
-
+
+ + + + 推荐投保,填写货值自动估保费,司机接单后不可退保。详见《投保告知》
value === '1' } + } as SFCheckboxWidgetSchema, + default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'] + }, + type2: { + type: 'string', + title: '', + enum: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'], + readOnly: true, + ui: { + widget: 'checkbox', + visibleIf: { insuranceType: (value: string) => value === '2' } + } as SFCheckboxWidgetSchema, + default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'] + }, + freeInsurance: { + type: 'string', + title: '赠送保险', + ui: { + widget: 'custom', + visibleIf: { insuranceType: (value: string) => value !== '3' } + } + }, + insurancePackagedGoods:{ + type: 'string', + title: '货物包装', + ui: { + widget: 'dict-select', + params: { dictKey: 'insure:packaged:goods' }, + visibleIf: { insuranceType: (value: string) => value !== '3' } + } as SFSelectWidgetSchema + }, + hidenField:{ + type: 'string', + title: '', + default:' ', + ui: { + widget:'text' + } + }, goodsValue: { type: 'string', title: '货物价值', ui: { - widget: 'custom' + widget: 'custom', + visibleIf: { insuranceType: (value: string) => value !== '3' } } }, insurancePremium: { type: 'string', title: '', ui: { - widget: 'custom' + widget: 'custom', + visibleIf: { insuranceType: (value: string) => value !== '3' } } }, insuranceRate: { @@ -420,62 +477,22 @@ export class SupplyManagementReleasePublishComponent implements OnInit { hidden: true } } - } + }, + required: ['insurancePackagedGoods'] }; this.ui5 = { '*': { spanLabelFixed: 115, grid: { span: 12 } - } - }; - } - initSF55() { - this.schema55 = { - properties: { - insuranceType: { - type: 'string', - title: '增值服务套餐', - enum: [ - { label: '不购买', value: '0' }, - { label: '套餐一', value: '1' }, - { label: '套餐二', value: '2' } - ], - ui: { - widget: 'select' - }, - default:'0' - }, - type1: { - type: 'string', - title: '', - enum: ['车辆实时定位', '轨迹查询', '数据保护','赠送基本险'], - readOnly: true, - ui: { - widget: 'checkbox', - visibleIf: {insuranceType: (value: string) => value ==='1'}, - } as SFCheckboxWidgetSchema, - default: ['车辆实时定位', '轨迹查询', '数据保护','赠送基本险'], - }, - type2: { - type: 'string', - title: '', - enum: ['车辆实时定位', '轨迹查询', '数据保护','专属技术服务','赠送综合险'], - readOnly: true, - ui: { - widget: 'checkbox', - visibleIf: {insuranceType: (value: string) => value ==='2'}, - } as SFCheckboxWidgetSchema, - default: ['车辆实时定位', '轨迹查询', '数据保护','专属技术服务','赠送综合险'], - } - } - }; - this.ui55 = { - '*': { - spanLabelFixed: 100, + }, + $type1:{ grid: { span: 24 } }, - $insuranceType: { - grid: { span: 12 } + $type2:{ + grid: { span: 24 } + }, + $freeInsurance:{ + grid: { span: 24 } } }; }