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: '移除',