From 97fde5d6b9b02d39afc754ddc0326626a936ac58 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 17:36:11 +0800 Subject: [PATCH 1/5] =?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 --- .../components/vehicle/vehicle.component.html | 59 +++++++++---- .../freight-config.component.html | 67 +++++++++++---- .../freight-config.component.ts | 86 +++++++++++++++---- .../insurance-table.component.html | 4 +- .../insurance-table.component.ts | 13 ++- 5 files changed, 167 insertions(+), 62 deletions(-) diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.html b/src/app/routes/supply-management/components/vehicle/vehicle.component.html index 533fd632..2d93d4c2 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.html +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.html @@ -13,12 +13,24 @@
- +
- + - - + + +
- +
- +
- + +
-
\ No newline at end of file +
diff --git a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html index 86543345..bcc338a4 100644 --- a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html +++ b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html @@ -1,23 +1,56 @@ + - +
-
- -
-
- - - -
+
+ +
+
+ + + + +
- - - - \ No newline at end of file + + + + diff --git a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts index 31f5486b..fb001c08 100644 --- a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts +++ b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { STColumn, STComponent, STRequestOptions, STData } from '@delon/abc/st'; -import { SFUISchema, SFSchema, SFComponent } from '@delon/form'; +import { SFUISchema, SFSchema, SFComponent, SFDateWidgetSchema } from '@delon/form'; import { ShipperBaseService, DynamicSettingModalComponent } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component'; @@ -17,7 +17,7 @@ export class FreightConfigComponent implements OnInit { columns: STColumn[] = this.initST(); @ViewChild('st', { static: false }) st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; - + _$expand = false; constructor(public service: UsermanageService, private modal: NzModalService, public shipperservice: ShipperBaseService) {} ngOnInit() { @@ -28,7 +28,11 @@ export class FreightConfigComponent implements OnInit { Object.assign(requestOptions.body, { listSource: 1 }); if (this.sf) { Object.assign(requestOptions.body, { - ...this.sf.value + ...this.sf.value, + createTime: { + start: this.sf?.value.effectiveDate[0], + end: this.sf?.value.effectiveDate[1] + } }); } return requestOptions; @@ -82,18 +86,25 @@ export class FreightConfigComponent implements OnInit { } this.service.downloadFile(this.service.$api_export_enterprise, params); } - + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } /** * 重置表单 */ - resetSF() { + resetSF(): void { this.sf.reset(); - this.st.reload(); + this._$expand = false; } private initSF(): SFSchema { return { properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, enterpriseName: { title: '企业名称', type: 'string', @@ -111,22 +122,47 @@ export class FreightConfigComponent implements OnInit { allowClear: true, asyncData: () => this.shipperservice.getNetworkFreightForwarder() } - } + }, + goodsSurchargeRatio: { + title: '货源单费率', + type: 'string', + ui: { + placeholder: '请输入', + showRequired: false + } + }, + contractSurchargeRatio: { + title: '合同单费率', + type: 'string', + ui: { + placeholder: '请输入', + showRequired: false, + visibleIf: { + _$expand: (value: boolean) => value + }, + } + }, + effectiveDate: { + title: '注册时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value, + }, + allowClear: true, + } as SFDateWidgetSchema, + }, } }; } initST(): STColumn[] { return [ - { title: '企业名称', className: 'text-center', index: 'enterpriseName', width: 160 }, - { title: '网络货运人', className: 'text-center', index: 'netTranName', width: 160 }, - { - title: '合同单费率', - className: 'text-right', - index: 'contractSurchargeRatio', - width: 140, - format: item => `${item.contractSurchargeRatio}%` - }, + { title: '企业名称', className: 'text-center', index: 'enterpriseName', width: 250 }, + { title: '网络货运人', className: 'text-center', index: 'netTranName', width: 250 }, { title: '货源单费率', className: 'text-right', @@ -134,10 +170,17 @@ export class FreightConfigComponent implements OnInit { width: 140, format: item => `${item.goodsSurchargeRatio}%` }, + { + title: '合同单费率', + className: 'text-right', + index: 'contractSurchargeRatio', + width: 140, + format: item => `${item.contractSurchargeRatio}%` + }, { title: '合同单业务量(元)', index: 'contractQuota', - width: 100, + width: 180, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.contractQuota }) } @@ -145,14 +188,21 @@ export class FreightConfigComponent implements OnInit { { title: '货源单业务量(元)', index: 'goodsQuota', - width: 100, + width: 180, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.goodsQuota }) } }, + { + title: '注册时间', + index: 'createTime', + width: 180, + className: 'text-right', + }, { title: '操作', width: '110px', + fixed: 'right', className: 'text-center', buttons: [ { diff --git a/src/app/shared/components/insurance-table/insurance-table.component.html b/src/app/shared/components/insurance-table/insurance-table.component.html index f70d03ab..aa1dd8a6 100644 --- a/src/app/shared/components/insurance-table/insurance-table.component.html +++ b/src/app/shared/components/insurance-table/insurance-table.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-25 20:18:52 * @LastEditors : Shiming - * @LastEditTime : 2022-02-14 10:14:19 + * @LastEditTime : 2022-02-24 17:35:11 * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -70,7 +70,7 @@
- 删除 diff --git a/src/app/shared/components/insurance-table/insurance-table.component.ts b/src/app/shared/components/insurance-table/insurance-table.component.ts index d239cdd1..030e3d81 100644 --- a/src/app/shared/components/insurance-table/insurance-table.component.ts +++ b/src/app/shared/components/insurance-table/insurance-table.component.ts @@ -64,7 +64,7 @@ export class InsuranceTableComponent implements OnInit { }; this.ui = { '*': { - spanLabelFixed: 140, + spanLabelFixed: 160, grid: { span: 24 } }, $freightPrice: { @@ -141,12 +141,11 @@ export class InsuranceTableComponent implements OnInit { deleteRow(index: number) { console.log(index); - this.data = this.data.filter((d, i) => { - console.log(d); - console.log(i); - index !== i; - }); - console.log(this.data); + var newArr = this.data.concat(); + newArr.splice(this.data.length-1,1) + // this.data = this.data.pop() + console.log(newArr); + this.data = [...newArr]; } save() { From 6dcbdfaf9453505a469a1da238eb2acd7cbdc4b7 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 19:20:58 +0800 Subject: [PATCH 2/5] =?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 --- .../components/list/list.component.ts | 19 +++++++++++++++++++ .../insurance-table.component.html | 4 ++-- .../insurance-table.component.ts | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/app/routes/insurance-management/components/list/list.component.ts b/src/app/routes/insurance-management/components/list/list.component.ts index a49f2c47..3a9cdc0c 100644 --- a/src/app/routes/insurance-management/components/list/list.component.ts +++ b/src/app/routes/insurance-management/components/list/list.component.ts @@ -269,6 +269,18 @@ export class insuranceManagementListComponent implements OnInit { } } as SFSelectWidgetSchema }, + insureRefundStatus: { + title: '退款状态', + type: 'string', + ui: { + widget: 'dict-select', + params: { dictKey: 'insure:refund:status' }, + containsAllLable: true, + visibleIf: { + _$expand: (value: boolean) => value + } + } as SFSelectWidgetSchema + }, enterpriseInfoId: { type: 'string', title: '网络货运人', @@ -452,6 +464,13 @@ export class insuranceManagementListComponent implements OnInit { render: 'processMessage', // processResult=2 }, + { + title: '退款状态', + width: '180px', + className: 'text-left', + index: 'insureRefundStatusLabel', + // processResult=2 + }, { title: '操作', fixed: 'right', diff --git a/src/app/shared/components/insurance-table/insurance-table.component.html b/src/app/shared/components/insurance-table/insurance-table.component.html index aa1dd8a6..535b647e 100644 --- a/src/app/shared/components/insurance-table/insurance-table.component.html +++ b/src/app/shared/components/insurance-table/insurance-table.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-25 20:18:52 * @LastEditors : Shiming - * @LastEditTime : 2022-02-24 17:35:11 + * @LastEditTime : 2022-02-24 19:19:42 * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -50,7 +50,7 @@ - + (含) diff --git a/src/app/shared/components/insurance-table/insurance-table.component.ts b/src/app/shared/components/insurance-table/insurance-table.component.ts index 030e3d81..6589d8ef 100644 --- a/src/app/shared/components/insurance-table/insurance-table.component.ts +++ b/src/app/shared/components/insurance-table/insurance-table.component.ts @@ -18,7 +18,7 @@ export class InsuranceTableComponent implements OnInit { schema: SFSchema = {}; ui!: SFUISchema; - formatterDollar = (value: number): string => `${value} (含)`; + formatterDollar = (value: number): string => `${value}`; minInsurancePrice: number = 0; changeSub = new Subject(); constructor(public service: BaseService, private cdr: ChangeDetectorRef) {} From 36166726ed3d24045df532f04861632fc197b00a Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 19:32:24 +0800 Subject: [PATCH 3/5] =?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 --- .../components/insurance-table/insurance-table.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/shared/components/insurance-table/insurance-table.component.html b/src/app/shared/components/insurance-table/insurance-table.component.html index 535b647e..11321837 100644 --- a/src/app/shared/components/insurance-table/insurance-table.component.html +++ b/src/app/shared/components/insurance-table/insurance-table.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-25 20:18:52 * @LastEditors : Shiming - * @LastEditTime : 2022-02-24 19:19:42 + * @LastEditTime : 2022-02-24 19:31:19 * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -28,7 +28,7 @@ + [nzScroll]="{ x: '900px' }" [nzShowPagination]="false" class="ml-xl" style="max-width: 1200px;"> 险种 From 2107de50d7bf83f804bb32ca9140dece6c7b8602 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 20:04:18 +0800 Subject: [PATCH 4/5] =?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-detail.component.ts | 88 +++++++++++++++---- .../contract-template-frame.component.html | 8 +- .../contract-template-frame.component.ts | 2 +- .../contract-template-partner.component.ts | 2 +- .../components/list/list.component.html | 4 +- 5 files changed, 81 insertions(+), 23 deletions(-) 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 ec18e998..643496c8 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-02-24 10:23:53 + * @LastEditTime : 2022-02-24 20:01:39 * @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. */ @@ -12,6 +12,7 @@ import { DatePipe } from '@angular/common'; import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { ContractManagementService } from '../../services/contract-management.service'; @@ -27,7 +28,8 @@ export class ContractManagementTemplateTextComponent implements OnInit { public service: ContractManagementService, public route: ActivatedRoute, private datePipe: DatePipe, - private router: Router + private router: Router, + public shipperservice: ShipperBaseService, ) {} textStatus = '新建模板'; @ViewChild('sf', { static: false }) sf!: SFComponent; @@ -84,19 +86,68 @@ export class ContractManagementTemplateTextComponent implements OnInit { } } as SFSelectWidgetSchema }, + // contractType: { + // title: '单据类型', + // type: 'string', + // default: '', + // ui: { + // widget: 'dict-select', + // params: { dictKey: 'contract:document:type' }, + // containAllLable: true, + // visibleIf: { + // templateType: value => value === 'MX' + // } + // } as SFSelectWidgetSchema + // }, + signingObject: { + type: 'string', + title: '承包商对象', + enum: [ + { label: '货主', value: 1 }, + { label: '司机', value: 2 } + ], + ui: { + widget: 'select', + placeholder: '请选择' + } + }, contractType: { - title: '单据类型', + title: '合同类型', type: 'string', default: '', ui: { widget: 'dict-select', - params: { dictKey: 'contract:document:type' }, + 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: { templateType: value => value === 'MX' } - } as SFSelectWidgetSchema - } + } as SFSelectWidgetSchema, + }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + visibleIf: { + templateType: value => value === 'KJ' || value === 'HHR' + }, + asyncData: () => this.shipperservice.getNetworkFreightForwarder() + } + }, }, required: ['templateName', 'templateType'] }; @@ -126,6 +177,8 @@ export class ContractManagementTemplateTextComponent implements OnInit { }; } initData(url: string) { + console.log('编辑'); + this.service.request(url, { id: this.route.snapshot.params.id }).subscribe(res => { if (res) { this.detailList = res; @@ -140,21 +193,22 @@ export class ContractManagementTemplateTextComponent implements OnInit { } save() { - if (!this.sf.value.templateName || !this.sf.value.templateType || !this.sf2.value.templateContent || !this.title) { - this.service.msgSrv.error('必填参数为空,请检查再重新保存!'); - return; - } - if (this.sf.value.templateType == 'MX') { - if (this.sf.value.contractType == '') { - this.service.msgSrv.error('必填参数为空,请检查再重新保存!'); - return; - } - } + // if (!this.sf.value.templateName || !this.sf.value.templateType || !this.sf2.value.templateContent || !this.title) { + // this.service.msgSrv.error('必填参数为空,请检查再重新保存!'); + // return; + // } + // if (this.sf.value.templateType == 'MX') { + // if (this.sf.value.contractType == '') { + // this.service.msgSrv.error('必填参数为空,请检查再重新保存!'); + // return; + // } + // } const params = { ...this.sf.value, ...this.sf2.value, - templateTitle: this.title + templateTitle: this.title || this.detailList.templateName }; + console.log(params) this.service.request(this.service.$api_save_contractTemplate, params).subscribe((res: any) => { if (res) { this.service.msgSrv.success('保存成功!'); 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 index 8c173c07..10616542 100644 --- 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 @@ -4,8 +4,8 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-02-24 10:31:05 - * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template\\contract-template.component.html + * @LastEditTime : 2022-02-24 20:01:42 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-frame\\contract-template-frame.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -77,6 +77,10 @@ {{ item.templateName }} + + 货主 + 司机 +
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 index 573e6f1e..672263af 100644 --- 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 @@ -131,7 +131,7 @@ export class ContractManagementTemplateFrameComponent implements OnInit { title: '签约对象', width: '100px', className: 'text-center', - index: 'signingObject' + render: 'signingObject' }, { title: '合同类型', 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 index 6123de09..c637a8cc 100644 --- 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 @@ -49,7 +49,7 @@ export class ContractManagementTemplatePartnerComponent implements OnInit { */ get reqParams() { return { - templateType: 'MX', + templateType: 'HHR', ...this.sf?.value, }; } diff --git a/src/app/routes/insurance-management/components/list/list.component.html b/src/app/routes/insurance-management/components/list/list.component.html index 093454e1..e4dbec7f 100644 --- a/src/app/routes/insurance-management/components/list/list.component.html +++ b/src/app/routes/insurance-management/components/list/list.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-02-17 11:13:43 + * @LastEditTime : 2022-02-24 20:03:23 * @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\components\\list\\list.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -84,7 +84,7 @@
- {{ item?.distance ? item?.distance + '公里' : '' }} + {{ item?.distance ? ((item?.distance)/1000).toFixed(4) + '公里' : '' }}
From c1749e383ccd49045f98fee0472723aec56de8b2 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 20:07:16 +0800 Subject: [PATCH 5/5] =?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-detail.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 643496c8..5d71ae62 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-02-24 20:01:39 + * @LastEditTime : 2022-02-24 20:06:26 * @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. */ @@ -103,8 +103,8 @@ export class ContractManagementTemplateTextComponent implements OnInit { type: 'string', title: '承包商对象', enum: [ - { label: '货主', value: 1 }, - { label: '司机', value: 2 } + { label: '货主', value: '1' }, + { label: '司机', value: '2' } ], ui: { widget: 'select',