车辆对接
This commit is contained in:
@ -260,6 +260,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'goodresource:settlement:type' },
|
||||
containAllLable:true,
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
@ -286,6 +287,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'service:type' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
|
||||
@ -182,6 +182,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'goodresourceType' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
@ -193,6 +194,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'BulkFreightUnitPriceType' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
|
||||
@ -278,6 +278,7 @@ export class OrderManagementVehicleComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'ServiceType' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
|
||||
@ -42,14 +42,14 @@
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="6">
|
||||
<div class="source-info">
|
||||
<div *ngFor="let item of dataList?.unLoadingPlaceList; let i = index">
|
||||
<div *ngFor="let item of dataList?.unLoadingPlaceVOList; let i = index">
|
||||
<h3 *ngIf="i === 0" style="font-weight: 700;">装卸货信息</h3>
|
||||
<div *ngIf="item?.type === 1">
|
||||
<div *ngIf="item?.type === 1 || item?.type === '1'">
|
||||
<p>装货地:{{item?.detailedAddress}}</p>
|
||||
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
|
||||
<p>发货日期:{{item?.createTime}}</p>
|
||||
</div>
|
||||
<div *ngIf="item.type === 2">
|
||||
<div *ngIf="item.type === 2 || item.type === '2'">
|
||||
<p>卸货地:{{item?.detailedAddress}}</p>
|
||||
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
|
||||
<p>卸货日期:{{item?.modifyTime}}</p>
|
||||
@ -60,7 +60,7 @@
|
||||
<div nz-col nzSpan="5">
|
||||
<div class="source-info bdr bdl pl-md">
|
||||
<h3 style="font-weight: 700;">货物信息</h3>
|
||||
<div *ngFor="let item of dataList?.goodsInfoList; let i = index">
|
||||
<div *ngFor="let item of dataList?.goodsInfoVOList; let i = index">
|
||||
<p>货物名称:{{item?.goodsName}}</p>
|
||||
<p>货物数量:{{item?.weight}}吨/{{item?.volume}}立方</p>
|
||||
<p>剩余:{{item?.weight}}吨/{{item?.volume}}立方</p>
|
||||
|
||||
@ -206,7 +206,8 @@
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<div class="align-center">
|
||||
<button nz-button nzType="primary" (click)="chooseFamifiar()">指派熟车</button>
|
||||
<button nz-button nzType="primary" (click)="chooseFamifiar()">生成二维码</button>
|
||||
<button nz-button nzType="primary" style="margin-left: 48px" (click)="chooseFamifiar()">指派熟车</button>
|
||||
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">司机抢单</button>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
@ -82,6 +82,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
params: { dictKey: 'service:type' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
@ -94,6 +95,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
params: { dictKey: 'goodresource:settlement:type' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
|
||||
@ -10,7 +10,7 @@ import {
|
||||
SFUISchema
|
||||
} from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { AmapPoiPickerComponent,AmapService } from '@shared';
|
||||
import { AmapPoiPickerComponent,AmapService, ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
|
||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||
@ -54,7 +54,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
private route: ActivatedRoute,
|
||||
private modalService: NzModalService,
|
||||
public service: SupplyManagementService,
|
||||
private amapService: AmapService
|
||||
private amapService: AmapService,
|
||||
public shipperSrv: ShipperBaseService
|
||||
) {
|
||||
this.validateForm1 = fb.group({
|
||||
loadingTime: [null, []],
|
||||
@ -121,26 +122,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
title: '项目',
|
||||
enum: [
|
||||
{ label: '项目1', value: '1' },
|
||||
{ label: '项目2', value: '2' }
|
||||
],
|
||||
type: 'string',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true
|
||||
// asyncData: () =>
|
||||
// this.service.loadChildData2('0', '2').pipe(
|
||||
// map((data: any) => {
|
||||
// return data.map((m: any) => {
|
||||
// return { label: m.name, value: m.id };
|
||||
// });
|
||||
// }),
|
||||
// ),
|
||||
// change: (i) => this.updateCategory(i, '/categoryId2'),
|
||||
} as SFSelectWidgetSchema
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
asyncData: () =>
|
||||
this.shipperSrv.getEnterpriseProject()
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
enterpriseInfoName: {
|
||||
type: 'string',
|
||||
@ -216,8 +208,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: '货物名称',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'GoodsName' },
|
||||
// widget: 'dict-select',
|
||||
// params: { dictKey: 'GoodsName' },
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
|
||||
@ -42,15 +42,15 @@
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="6">
|
||||
<div class="source-info">
|
||||
<div *ngFor="let item of dataList?.unLoadingPlaceList; let i = index">
|
||||
<div *ngFor="let item of dataList?.unLoadingPlaceVOList; let i = index">
|
||||
<h3 *ngIf="i === 0" style="font-weight: 700;">装卸货信息</h3>
|
||||
<div *ngIf="item?.type === 1">
|
||||
<div *ngIf="item?.type === 1 || item?.type === '1'">
|
||||
<p>装货地:{{item?.detailedAddress}}</p>
|
||||
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
|
||||
<p>发货日期:{{item?.createTime}}</p>
|
||||
|
||||
</div>
|
||||
<div *ngIf="item.type === 2">
|
||||
<div *ngIf="item.type === 2 || item.type === '2'">
|
||||
<p>卸货地:{{item?.detailedAddress}}</p>
|
||||
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
|
||||
<p>卸货日期:{{item?.modifyTime}}</p>
|
||||
@ -60,7 +60,7 @@
|
||||
</div>
|
||||
<div nz-col nzSpan="5">
|
||||
<div class="source-info bdr bdl pl-md">
|
||||
<div *ngFor="let item of dataList?.goodsInfoList; let i = index">
|
||||
<div *ngFor="let item of dataList?.goodsInfoVOList; let i = index">
|
||||
<h3 *ngIf="i === 0" style="font-weight: 700;">货物信息</h3>
|
||||
<p>货物名称:{{item?.goodsName}}</p>
|
||||
<p>货物数量:{{item?.weight}}吨/{{item?.volume}}立方</p>
|
||||
|
||||
@ -75,6 +75,7 @@ export class VehicleComponentsListComponent implements OnInit {
|
||||
title: '车牌颜色',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containAllLable:true,
|
||||
params: { dictKey: 'CarColor' },
|
||||
},
|
||||
},
|
||||
@ -98,6 +99,7 @@ export class VehicleComponentsListComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'CarModel' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value,
|
||||
},
|
||||
@ -109,6 +111,7 @@ export class VehicleComponentsListComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'CarLength' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value,
|
||||
},
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
<nz-select [(ngModel)]="value" (ngModelChange)="change($event)" *ngIf="dictList">
|
||||
<nz-select [(ngModel)]="value" (ngModelChange)="change($event)" *ngIf="dictList" [nzMode]="mode? mode:'default'">
|
||||
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of dictList"></nz-option>
|
||||
</nz-select>
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DictSelectComponent } from './dict-select.component';
|
||||
|
||||
describe('DictSelectComponent', () => {
|
||||
let component: DictSelectComponent;
|
||||
let fixture: ComponentFixture<DictSelectComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ DictSelectComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DictSelectComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -22,17 +22,24 @@ export class DictSelectComponent implements OnInit, ControlValueAccessor {
|
||||
private onTouchedFn?: () => void;
|
||||
|
||||
defaultUrl = `/api/mdc/pbc/dictItems/getDictValue`;
|
||||
@Input() value: string = ''; // 默认选中值
|
||||
@Input() value: any = '' || []; // 默认选中值
|
||||
@Input() url: string = ''; // 获取字典数据的地址
|
||||
@Input() params = {};// 请求参数
|
||||
|
||||
dictList: any[] = [];
|
||||
@Input() containsAllLable = true; // 是否包含全部这一选项
|
||||
@Input() mode: 'multiple' | 'tags' | 'default' = 'default';
|
||||
|
||||
|
||||
constructor(public service: DictSelectService, public cdr: ChangeDetectorRef) { }
|
||||
|
||||
writeValue(geo: string): void {
|
||||
if (geo == null) {
|
||||
this.value = '';
|
||||
if (this.mode === 'multiple' || this.mode === 'tags') {
|
||||
this.value = [];
|
||||
} else {
|
||||
this.value = '';
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.value = geo;
|
||||
@ -45,11 +52,10 @@ export class DictSelectComponent implements OnInit, ControlValueAccessor {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
this.service.getDictList(this.url || this.defaultUrl, this.params).subscribe(res => {
|
||||
if (res) {
|
||||
this.dictList = res || [];
|
||||
if (this.dictList.length > 0) {
|
||||
if (this.dictList.length > 0 && this.containsAllLable) {
|
||||
const obj = { label: '全部', value: '' };
|
||||
this.dictList.unshift(obj);
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-13 10:41:19
|
||||
* @LastEditTime: 2021-12-13 10:41:57
|
||||
* @Date: 2021-12-16 20:41:23
|
||||
* @LastEditTime: 2021-12-16 20:41:42
|
||||
* @LastEditors: your name
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\shared\components\dict-select\index.ts
|
||||
|
||||
@ -1,6 +1,14 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-13 10:36:49
|
||||
* @LastEditTime: 2021-12-16 20:39:59
|
||||
* @LastEditors: your name
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\shared\widget\dict-select\dict-select.widget.html
|
||||
-->
|
||||
<sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">
|
||||
<app-dict-select [url]="ui?.url" [ngModel]="value" [params]="ui?.params" (ngModelChange)="change($event)"
|
||||
name="sf.dict.select">
|
||||
[containsAllLable]="ui?.containsAllLable" [mode]="ui?.mode" name="sf.dict.select">
|
||||
</app-dict-select>
|
||||
</sf-item-wrap>
|
||||
<!-- <sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">
|
||||
|
||||
@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-13 10:36:49
|
||||
* @LastEditTime: 2021-12-16 20:40:03
|
||||
* @LastEditors: your name
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\shared\widget\dict-select\dict-select.widget.ts
|
||||
*/
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { ControlWidget } from "@delon/form";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user