diff --git a/src/app/routes/order-management/modal/vehicle/freight-people copy/freight-people.component.html b/src/app/routes/order-management/modal/vehicle/freight-people copy/freight-people.component.html new file mode 100644 index 00000000..71ed039e --- /dev/null +++ b/src/app/routes/order-management/modal/vehicle/freight-people copy/freight-people.component.html @@ -0,0 +1,14 @@ + + + + diff --git a/src/app/routes/order-management/modal/vehicle/freight-people copy/freight-people.component.less b/src/app/routes/order-management/modal/vehicle/freight-people copy/freight-people.component.less new file mode 100644 index 00000000..30444d6b --- /dev/null +++ b/src/app/routes/order-management/modal/vehicle/freight-people copy/freight-people.component.less @@ -0,0 +1,7 @@ + .left_btn { + width: 50px; + height: 32px; + padding-left: 8px; + line-height:32px; + background-color: #d7d7d7; + } \ No newline at end of file diff --git a/src/app/routes/order-management/modal/vehicle/freight-people copy/freight-people.component.ts b/src/app/routes/order-management/modal/vehicle/freight-people copy/freight-people.component.ts new file mode 100644 index 00000000..6adcf7cd --- /dev/null +++ b/src/app/routes/order-management/modal/vehicle/freight-people copy/freight-people.component.ts @@ -0,0 +1,81 @@ +/* + * @Author: your name + * @Date: 2021-12-14 14:03:07 + * @LastEditTime: 2021-12-29 17:02:54 + * @LastEditors: Please set LastEditors + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts + */ +import { Component, Input, OnInit, ViewChild } from '@angular/core'; +import { + SFComponent, SFSchema, SFUISchema +} from '@delon/form'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { OrderManagementService } from '../../../services/order-management.service'; +import { ShipperBaseService } from './../../../../../shared/services/business/shipper-base.service'; + +@Component({ + selector: 'app-order-management-vehicle-freight-people', + templateUrl: './freight-people.component.html', + styleUrls: ['./freight-people.component.less'] +}) +export class VehicleFreightPeopleComponent implements OnInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + schema: SFSchema = {}; + ui: SFUISchema = {}; + + aggreechecked = false; + + @Input() + data: any; + + constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService, private service2: ShipperBaseService) {} + + ngOnInit(): void { + console.log(this.data) + this.initSF(this.data); + } + initSF(data: any) { + this.schema = { + enterpriseInfoName: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value, + }, + allowClear: true, + asyncData: () => this.service2.getNetworkFreightForwarder(), + }, + }, + required: ['enterpriseInfoName'] + }; + this.ui = { + '*': { + spanLabelFixed: 100, + grid: { span: 16 } + } + }; + } + + save(value: any): void { + + const params = { + }; + + this.service.request(this.service.$api_get_insertFreightChangeWhole, params).subscribe((res: any) => { + if (res) { + this.modal.destroy(); + this.service.msgSrv.success('变更运费成功'); + } + }); + } + + close(): void { + this.modal.destroy(); + } + +} 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 1be3be20..1e4c7152 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 @@ -122,13 +122,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { title: '货主', type: 'string', maxLength: 30, - enum: [], ui: { widget: 'select', - serverSearch: true, + // serverSearch: true, searchDebounceTime: 300, searchLoadingText: '搜索中...', - onSearch: (q: any) => { if (!!q) { return this.service @@ -766,13 +764,18 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { res?.forEach((element: any) => { List.push({ label: element.enterpriseName, value: element.id } ) }); + console.log(List) + this.sf1.getProperty('/shipperAppUserId')!.schema.enum = List; + this.sf1.getProperty('/shipperAppUserId')!.widget.reset(List); }) - this.schema1.shipperAppUserId.enum = List + } + if(res?.shipperAppUserId) { + this.getRegionCode(res?.shipperAppUserId) } this.sf1data = { - enterpriseProjectId: res?.enterpriseProjectId , - enterpriseInfoName: res?.enterpriseInfoName , - externalResourceCode: res?.externalResourceCode , + // enterpriseProjectId: res?.enterpriseProjectId, + enterpriseInfoName: res?.enterpriseInfoName, + externalResourceCode: res?.externalResourceCode, dispatchId: res?.dispatchId , } if(this.PageStatus === '整车修改') {