From d865c99fc85e6a8e7dac203a440d2b4672f98170 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 6 Jan 2022 16:52:15 +0800 Subject: [PATCH 1/5] edoi --- .../components/order-agreement/order-agreement.component.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/routes/passport/components/order-agreement/order-agreement.component.ts b/src/app/routes/passport/components/order-agreement/order-agreement.component.ts index 63b72bc0..713b32cf 100644 --- a/src/app/routes/passport/components/order-agreement/order-agreement.component.ts +++ b/src/app/routes/passport/components/order-agreement/order-agreement.component.ts @@ -16,8 +16,6 @@ export class OrderAgreementComponent implements OnInit { }); } ngOnInit() { - console.log({ type: this.type }); - this.service.request(this.service.$api_get_agreement, { type: this.type }).subscribe(res => { if (res) { this.agreementContent = res; From 3261a3fc5a6569cbd27a52d779e9000d0f7bd562 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 6 Jan 2022 17:09:14 +0800 Subject: [PATCH 2/5] edit --- .../bulk-release-publish.component.ts | 114 +++++++++--------- .../choose-famifiar.component.html | 87 +++++++------ .../choose-famifiar.component.ts | 26 ++-- 3 files changed, 115 insertions(+), 112 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index a06c8751..656bb3fe 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -100,34 +100,32 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { this.initSF4(); this.initSF6(); this.startInfo = [ - { - detailedAddress: '', - appUserName: '', - contractTelephone: '', - latitude: '', - longitude: '', - province: '', - city: '', - area: '', - type: '1' - } - ]; + { + detailedAddress: '', + appUserName: '', + contractTelephone: '', + latitude: '', + longitude: '', + province: '', + city: '', + area: '', + type: '1' + } + ]; this.endInfo = [ - { - detailedAddress: '', - appUserName: '', - contractTelephone: '', - latitude: '', - longitude: '', - province: '', - city: '', - area: '', - type: '2' - } - ] + { + detailedAddress: '', + appUserName: '', + contractTelephone: '', + latitude: '', + longitude: '', + province: '', + city: '', + area: '', + type: '2' + } + ]; } - - initSF1() { this.schema1 = { @@ -144,28 +142,28 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { onSearch: (q: any) => { if (!!q) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) - .pipe(map((res: any[]) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) + .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .pipe(map((res: any[]) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { return of([]); } }, change: (q: any) => { - this.getRegionCode(q) + this.getRegionCode(q); }, visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFSelectWidgetSchema, - }, + _$expand: (value: boolean) => value + } + } as SFSelectWidgetSchema + }, enterpriseProjectId: { type: 'string', title: '项目', ui: { widget: 'select', placeholder: '请选择', - allowClear: true, + allowClear: true } as SFSelectWidgetSchema }, // enterpriseInfoName: { @@ -183,11 +181,11 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { widget: 'select', placeholder: '请选择', visibleIf: { - _$expand: (value: boolean) => value, + _$expand: (value: boolean) => value }, allowClear: true, - asyncData: () => this.shipperSrv.getNetworkFreightForwarder(), - }, + asyncData: () => this.shipperSrv.getNetworkFreightForwarder() + } }, deadlineTime: { title: '截至日期', @@ -464,7 +462,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { submitParams: item, submitUrl: this.service.$api_save_bulk_assign }, - nzWidth: 1300, + nzWidth: 1300 }); modalRef.afterClose.subscribe(result => { if (result) { @@ -472,16 +470,16 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { } }); } - // 打开下单完成页面 - openFinishPage(resourceObj: any = null) { - this.modalService.create({ - nzTitle: '', - nzContent: PublishSuccessComponent, - nzWidth: 900, - nzFooter: null, - nzComponentParams: { type: 'bulk' } - }); - } + // 打开下单完成页面 + openFinishPage(resourceObj: any = null) { + this.modalService.create({ + nzTitle: '', + nzContent: PublishSuccessComponent, + nzWidth: 900, + nzFooter: null, + nzComponentParams: { type: 'bulk' } + }); + } submit(submitType: string): void { // Object.keys(this.validateForm1.controls).forEach(key => { // this.validateForm1.controls[key].markAsDirty(); @@ -533,26 +531,24 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { nzFooter: null, nzComponentParams: { type: 'bulk' } }); - } else { - this.service.msgSrv.error(res.msg); } }); } } // 获取城市列表 getRegionCode(regionCode: any) { - console.log(regionCode) + console.log(regionCode); return this.service .request(this.service.$api_get_enterprise_project, { id: regionCode }) .pipe( - map((res) => + map(res => res.map((item: any) => ({ label: item.projectName, - value: item.id, - })), - ), + value: item.id + })) + ) ) - .subscribe((res) => { + .subscribe(res => { this.sf1.getProperty('/enterpriseProjectId')!.schema.enum = res; this.sf1.getProperty('/enterpriseProjectId')!.widget.reset(res); }); @@ -661,15 +657,15 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { if (res) { this.sf3.getProperty('/goodsNameId')!.schema.enum = res; this.sf3.getProperty('/goodsNameId')!.widget.reset(res); - if(this.sf3data?.goodsNameId){ - this.sf3.setValue('/goodsNameId',this.sf3data.goodsNameId); + if (this.sf3data?.goodsNameId) { + this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId); } } else { this.service.msgSrv.error(res.msg); } }); } - choose(){ + choose() { window.history.go(-1); } } diff --git a/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.html b/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.html index 4622fbc6..60e9165c 100644 --- a/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.html +++ b/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.html @@ -7,56 +7,53 @@ * @FilePath: \tms-obc-web\src\app\routes\supply-management\components\choose-famifiar\choose-famifiar.component.html --> + nzType="plus">添加司机
-
-
-
- -
-
- - +
+
+
+ +
+
+ + +
-
-
- - - - - - - - - - -
-
- -
已选择{{ st2Data.length }}位司机
- - - {{ item.captainName }} {{ item.captainPhone }}   - 设置 - - -
+
+ + + + + + + + + + +
+
+ +
已选择{{ st2Data.length }}位司机
+ + + {{ item.captainName }} {{ item.captainPhone }}   + 设置 + + +
- - -
+ + +
\ No newline at end of file diff --git a/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts b/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts index ea05cf33..f73d3461 100644 --- a/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts +++ b/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit, ViewChild } from '@angular/core'; +import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; @@ -46,7 +46,8 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { private drawerService: NzDrawerService, public service: SupplyManagementService, private modalService: NzModalService, - private modalHelper: ModalHelper + private modalHelper: ModalHelper, + private cdr: ChangeDetectorRef ) {} /** @@ -60,8 +61,11 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { } ngOnInit() { this.initSF(); - this.initST(); - this.initST2(); + + setTimeout(() => { + this.initST(); + this.initST2(); + }, 200); } initSF() { @@ -94,11 +98,13 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { this.columns = [ { title: '司机姓名', - index: 'name' + index: 'name', + width: 120 }, { title: '手机号', - index: 'telephone' + index: 'telephone', + width: 120 }, { title: '指定车辆', @@ -109,6 +115,7 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { title: '状态', className: 'text-center', index: 'certificationStatus', + width: 120, type: 'badge', badge: { '-1': { text: '未提交', color: 'default' }, @@ -120,6 +127,7 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { { title: '操作', className: 'text-center', + width: 80, buttons: [ { text: '选择', @@ -136,7 +144,8 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { this.columns2 = [ { title: '司机姓名', - index: 'name' + index: 'name', + width: 120 }, { title: '手机号', @@ -146,7 +155,7 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { { title: '车队长', render: 'captain', - width: '200px' + width: '100px' }, { title: '指定车辆', @@ -156,6 +165,7 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { { title: '操作', className: 'text-center', + width: 80, buttons: [ { text: '移除', From f38bca116c749dd3621029f3e490921dec169c0c Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 6 Jan 2022 19:17:42 +0800 Subject: [PATCH 3/5] edit --- .../components/freight/list/detail/detail.component.html | 3 --- .../usercenter/components/freight/list/list.component.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index 78812f48..a9efb750 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -248,9 +248,6 @@
- - diff --git a/src/app/routes/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index 0f9b6be5..9377a8d2 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -144,7 +144,7 @@ export class FreightComponentsListComponent implements OnInit { // { title: '', type: 'checkbox', className: 'text-center' }, { title: '企业名称', className: 'text-center', index: 'enterpriseName' }, { title: '联系人', className: 'text-center', index: 'contacter' }, - { title: '网络货运人', className: 'text-center', index: 'networkTransporter' }, + { title: '网络货运人', className: 'text-center', index: 'netTranName' }, { title: '常用服务', className: 'text-center', index: 'oftenUsedServices', type: 'enum', enum: { 10: '整车发货', 20: '大宗发货' } }, { title: '推广业务员', className: 'text-center', render: 'promotersTelephone' }, { title: '注册渠道', className: 'text-center', index: 'source', type: 'enum', enum: { 1: '用户注册', 2: '货主添加' } }, From 024d7ff39dc250dbbbf613304b01afd5d43f708c Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 6 Jan 2022 19:33:52 +0800 Subject: [PATCH 4/5] edit --- .../bulk-release-publish.component.html | 131 +++++------------- .../bulk-release-publish.component.ts | 46 +++--- 2 files changed, 50 insertions(+), 127 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html index 98b887bb..53824084 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html @@ -17,11 +17,9 @@ -
装卸货信息预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时
+
装卸货信息预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时
-
+
@@ -30,17 +28,11 @@
- + - +
@@ -48,23 +40,12 @@ 联系人
- + - +
@@ -72,7 +53,8 @@
- +
@@ -82,17 +64,11 @@
- + - +
@@ -100,23 +76,12 @@ 联系人
- + - +
@@ -139,7 +104,8 @@ - + + @@ -150,9 +116,8 @@ - +

例如 付司机运费 = 重量*单价 = 999.99

保留小数,即 999.99

@@ -163,41 +128,20 @@
- + - + - + @@ -214,15 +158,8 @@
- +
天内支付运费 @@ -237,10 +174,10 @@
- +
-
+ \ No newline at end of file diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index 656bb3fe..266a3e20 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; +import { FormBuilder, FormControl, FormGroup, NgForm, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { SFArrayWidgetSchema, @@ -31,7 +31,9 @@ import { PublishSuccessComponent } from '../onecar-publish/publish-success/publi styleUrls: ['./bulk-release-publish.component.less'] }) export class SupplyManagementBulkReleasePublishComponent implements OnInit { - validateForm1: FormGroup; + @ViewChild('ngForm') + ngForm!: NgForm; + sf1data: any; // 货源单设置回显 sf3data: any; // 货源单设置回显 sf4data: any; // 货源单设置回显 @@ -59,7 +61,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { ruleOptions: any; constructor( private http: _HttpClient, - fb: FormBuilder, private modalService: NzModalService, private settingSrv: SettingsService, private service: SupplyManagementService, @@ -67,16 +68,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { private route: ActivatedRoute, private amapService: AmapService, public shipperSrv: ShipperBaseService - ) { - this.validateForm1 = fb.group({ - loadAddress0: [null, [Validators.required]], - loadName0: [null, [Validators.required]], - loadPhone0: [null, [Validators.required]], - unloadAddress0: [null, [Validators.required]], - unloadName0: [null, [Validators.required]], - unloadPhone0: [null, [Validators.required]] - }); - } + ) {} @ViewChild('sf1', { static: false }) sf1!: SFComponent; schema1: SFSchema = {}; @@ -151,9 +143,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { }, change: (q: any) => { this.getRegionCode(q); - }, - visibleIf: { - _$expand: (value: boolean) => value } } as SFSelectWidgetSchema }, @@ -180,9 +169,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value - }, allowClear: true, asyncData: () => this.shipperSrv.getNetworkFreightForwarder() } @@ -481,17 +467,17 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { }); } submit(submitType: string): void { - // Object.keys(this.validateForm1.controls).forEach(key => { - // this.validateForm1.controls[key].markAsDirty(); - // this.validateForm1.controls[key].updateValueAndValidity(); - // }); - // this.sf1.validator({ emitError: true }); - // this.sf3.validator({ emitError: true }); - // this.sf4.validator({ emitError: true }); - // this.sf6.validator({ emitError: true }); - // if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) { - // return; - // } + Object.keys(this.ngForm.form.controls).forEach(key => { + this.ngForm.form.controls[key].markAsDirty(); + this.ngForm.form.controls[key].updateValueAndValidity(); + }); + this.sf1.validator({ emitError: true }); + this.sf3.validator({ emitError: true }); + this.sf4.validator({ emitError: true }); + this.sf6.validator({ emitError: true }); + if (this.ngForm.form.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) { + return; + } // //装卸货信息 const LoadingList = this.startInfo.concat(this.endInfo); From 3a39ad53fb4635fc0ef42390d7d307cb1ca0ffdd Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 6 Jan 2022 19:37:00 +0800 Subject: [PATCH 5/5] edit --- .../bulk-release-publish/bulk-release-publish.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index 266a3e20..405fdab4 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -163,7 +163,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { // }, // default: '天津市怡亚通XXXX有限公司' // }, - enterpriseInfoName: { + enterpriseInfoId: { type: 'string', title: '网络货运人', ui: {