From 0147e0034d52e2c7e2323aec0ac69cd5edde574b Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 10:33:35 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract-frame.component.html | 7 +- .../contract-frame.component.ts | 205 ++++++++++++----- .../contract-list.component.html | 6 +- .../contract-list/contract-list.component.ts | 94 ++++++-- .../contract-partner.component.html | 11 +- .../contract-partner.component.ts | 207 +++++++++++++----- .../contract-template-detail.component.ts | 6 +- .../contract-template.component.html | 17 +- .../contract-template.component.spec.ts | 14 +- .../contract-template.component.ts | 63 ++++-- .../template/template.component.html | 26 +++ .../template/template.component.spec.ts | 24 ++ .../components/template/template.component.ts | 27 +++ .../contract-management-routing.module.ts | 8 +- .../contract-management.module.ts | 11 +- .../services/contract-management.service.ts | 4 +- 16 files changed, 565 insertions(+), 165 deletions(-) create mode 100644 src/app/routes/contract-management/components/template/template.component.html create mode 100644 src/app/routes/contract-management/components/template/template.component.spec.ts create mode 100644 src/app/routes/contract-management/components/template/template.component.ts 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/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 From 329bca0f9a8cdd4947cc7474453f7ce04823cecf Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 11:10:46 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/vehicle/modify-rate/modify-rate.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/order-management/modal/vehicle/modify-rate/modify-rate.component.ts b/src/app/routes/order-management/modal/vehicle/modify-rate/modify-rate.component.ts index 87a1a092..cf23c82c 100644 --- a/src/app/routes/order-management/modal/vehicle/modify-rate/modify-rate.component.ts +++ b/src/app/routes/order-management/modal/vehicle/modify-rate/modify-rate.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-29 14:51:07 * @LastEditors : Shiming - * @LastEditTime : 2022-02-23 16:19:27 + * @LastEditTime : 2022-02-24 11:10:33 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-rate\\modify-rate.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -42,7 +42,7 @@ export class VehicleModifyRateComponent implements OnInit { additionalRate: { type: 'number', title: '附加费率', - maximum: 100, + maximum: 99, minimum: 0, ui: { unit: '%', From cbecaeaa151eba69afa3bc09c5c4566a03222835 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 14:01:02 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract-template/contract-template.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts index 7c4d6bb6..4516544c 100644 --- a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts +++ b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts @@ -98,7 +98,7 @@ export class ContractManagementTemplateDetailComponent implements OnInit { containAllLable: true, } as SFSelectWidgetSchema }, - templateType2: { + resourceType: { title: '货源类型', type: 'string', default: '', @@ -142,7 +142,7 @@ export class ContractManagementTemplateDetailComponent implements OnInit { title: '货源类型', width: '100px', className: 'text-center', - index: 'contractType' + index: 'resourceType' }, { title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' }, { From 5fc5dd07a78c342ae9860c6c8fcfd73f7bdf9342 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 14:35:53 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract-template-frame.component.html | 82 ++++++ .../contract-template-frame.component.less | 4 + .../contract-template-frame.component.spec.ts | 35 +++ .../contract-template-frame.component.ts | 250 ++++++++++++++++++ .../contract-template-partner.component.html | 82 ++++++ .../contract-template-partner.component.less | 4 + ...ontract-template-partner.component.spec.ts | 35 +++ .../contract-template-partner.component.ts | 250 ++++++++++++++++++ .../contract-template.component.ts | 1 + .../template/template.component.html | 8 +- .../contract-management.module.ts | 8 +- .../onecar-publish.component.html | 20 +- .../onecar-publish.component.ts | 176 +++++++++--- 13 files changed, 899 insertions(+), 56 deletions(-) create mode 100644 src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html create mode 100644 src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.less create mode 100644 src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.spec.ts create mode 100644 src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.ts create mode 100644 src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html create mode 100644 src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.less create mode 100644 src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.spec.ts create mode 100644 src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.ts 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.ts b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts index 4516544c..83662ca5 100644 --- a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts +++ b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts @@ -49,6 +49,7 @@ export class ContractManagementTemplateDetailComponent implements OnInit { */ get reqParams() { return { + templateType: 'KJ', ...this.sf?.value, }; } diff --git a/src/app/routes/contract-management/components/template/template.component.html b/src/app/routes/contract-management/components/template/template.component.html index 2c06c158..fefd0d8f 100644 --- a/src/app/routes/contract-management/components/template/template.component.html +++ b/src/app/routes/contract-management/components/template/template.component.html @@ -4,8 +4,8 @@ * @Author : Shiming * @Date : 2022-01-07 13:27:10 * @LastEditors : Shiming - * @LastEditTime : 2022-02-23 19:39:38 - * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\index\\index.component.html + * @LastEditTime : 2022-02-24 14:10:45 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\template\\template.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -17,10 +17,10 @@ - + - + \ No newline at end of file diff --git a/src/app/routes/contract-management/contract-management.module.ts b/src/app/routes/contract-management/contract-management.module.ts index 6358d7e8..497ef5a2 100644 --- a/src/app/routes/contract-management/contract-management.module.ts +++ b/src/app/routes/contract-management/contract-management.module.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-04 21:05:49 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:15:08 + * @LastEditTime : 2022-02-24 14:09:24 * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\contract-management.module.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -22,6 +22,8 @@ import { ContractManagementDetailComponent } from './components/contract-detail/ import { ContractManagementPartnerComponent } from './components/contract-partner/contract-partner.component'; import { ContractManagementTemplateComponent } from './components/template/template.component'; import { ContractManagementTemplateTextComponent } from './components/contract-template-detail/contract-template-detail.component'; +import { ContractManagementTemplateFrameComponent } from './components/contract-template-frame/contract-template-frame.component'; +import { ContractManagementTemplatePartnerComponent } from './components/contract-template-partner/contract-template-partner.component'; const COMPONENTS: any = [ ContractManagementContractListComponent, @@ -33,7 +35,9 @@ const COMPONENTS: any = [ ContractManagementDetailComponent, ContractManagementPartnerComponent, ContractManagementTemplateComponent, - ContractManagementTemplateTextComponent + ContractManagementTemplateTextComponent, + ContractManagementTemplateFrameComponent, + ContractManagementTemplatePartnerComponent ]; const NOTROUTECOMPONENTS: any = []; @NgModule({ 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,15 +467,108 @@ 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 } } }; } + // 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, + // grid: { span: 24 } + // }, + // $insuranceType: { + // grid: { span: 12 } + // } + // }; + // } + // initSF5() { + // this.schema5 = { + // properties: { + // goodsValue: { + // type: 'string', + // title: '货物价值', + // ui: { + // widget: 'custom' + // } + // }, + // insurancePremium: { + // type: 'string', + // title: '', + // ui: { + // widget: 'custom' + // } + // }, + // insuranceRate: { + // type: 'string', + // title: '保险费率', + // ui: { + // hidden: true + // } + // } + // } + // }; + // this.ui5 = { + // '*': { + // spanLabelFixed: 115, + // grid: { span: 12 } + // } + // }; + // } initSF6() { this.schema6 = { properties: { @@ -871,7 +971,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, @@ -1111,13 +1210,20 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.sf4data.id = res?.goodsInfoVOList[0]?.id; } this.totalFees = res?.shippingInformationVO?.totalFee || '0'; + // this.sf5data = { + // goodsValue: res?.goodsValue, + // insurancePremium: res?.insurancePremium || '', + // insuranceRate: res?.insuranceRate || '' + // }; + // this.sf55data = { + // insuranceType: res?.insuranceType || '' + // }; 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, From d1b933fc2d3aff114b71e7f5181bc62d2d073740 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 14:37:59 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onecar-publish.component.ts | 91 ------------- .../release-publish.component.html | 21 +-- .../release-publish.component.ts | 121 ++++++++++-------- 3 files changed, 74 insertions(+), 159 deletions(-) diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index c9664a9a..3e3da31a 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -486,89 +486,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } }; } - // 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, - // grid: { span: 24 } - // }, - // $insuranceType: { - // grid: { span: 12 } - // } - // }; - // } - // initSF5() { - // this.schema5 = { - // properties: { - // goodsValue: { - // type: 'string', - // title: '货物价值', - // ui: { - // widget: 'custom' - // } - // }, - // insurancePremium: { - // type: 'string', - // title: '', - // ui: { - // widget: 'custom' - // } - // }, - // insuranceRate: { - // type: 'string', - // title: '保险费率', - // ui: { - // hidden: true - // } - // } - // } - // }; - // this.ui5 = { - // '*': { - // spanLabelFixed: 115, - // grid: { span: 12 } - // } - // }; - // } initSF6() { this.schema6 = { properties: { @@ -1210,14 +1127,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.sf4data.id = res?.goodsInfoVOList[0]?.id; } this.totalFees = res?.shippingInformationVO?.totalFee || '0'; - // this.sf5data = { - // goodsValue: res?.goodsValue, - // insurancePremium: res?.insurancePremium || '', - // insuranceRate: res?.insuranceRate || '' - // }; - // this.sf55data = { - // insuranceType: res?.insuranceType || '' - // }; this.sf5data = { insuranceType: res?.insuranceType || '', goodsValue: res?.goodsValue || '', 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 } } }; }