车辆对接

This commit is contained in:
wangshiming
2021-12-16 21:09:21 +08:00
parent ee61a26e60
commit 76fcfb0682
15 changed files with 88 additions and 38 deletions

View File

@ -260,6 +260,7 @@ export class OrderManagementBulkComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'goodresource:settlement:type' }, params: { dictKey: 'goodresource:settlement:type' },
containAllLable:true,
placeholder: '请选择', placeholder: '请选择',
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
@ -286,6 +287,7 @@ export class OrderManagementBulkComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'service:type' }, params: { dictKey: 'service:type' },
containAllLable:true,
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },

View File

@ -182,6 +182,7 @@ export class OrderManagementRiskComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'goodresourceType' }, params: { dictKey: 'goodresourceType' },
containAllLable:true,
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
@ -193,6 +194,7 @@ export class OrderManagementRiskComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'BulkFreightUnitPriceType' }, params: { dictKey: 'BulkFreightUnitPriceType' },
containAllLable:true,
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },

View File

@ -278,6 +278,7 @@ export class OrderManagementVehicleComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'ServiceType' }, params: { dictKey: 'ServiceType' },
containAllLable:true,
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },

View File

@ -42,14 +42,14 @@
<div nz-row> <div nz-row>
<div nz-col nzSpan="6"> <div nz-col nzSpan="6">
<div class="source-info"> <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> <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?.detailedAddress}}</p>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p> <p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
<p>发货日期:{{item?.createTime}}</p> <p>发货日期:{{item?.createTime}}</p>
</div> </div>
<div *ngIf="item.type === 2"> <div *ngIf="item.type === 2 || item.type === '2'">
<p>卸货地:{{item?.detailedAddress}}</p> <p>卸货地:{{item?.detailedAddress}}</p>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p> <p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
<p>卸货日期:{{item?.modifyTime}}</p> <p>卸货日期:{{item?.modifyTime}}</p>
@ -60,7 +60,7 @@
<div nz-col nzSpan="5"> <div nz-col nzSpan="5">
<div class="source-info bdr bdl pl-md"> <div class="source-info bdr bdl pl-md">
<h3 style="font-weight: 700;">货物信息</h3> <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?.goodsName}}</p>
<p>货物数量:{{item?.weight}}吨/{{item?.volume}}立方</p> <p>货物数量:{{item?.weight}}吨/{{item?.volume}}立方</p>
<p>剩余:{{item?.weight}}吨/{{item?.volume}}立方</p> <p>剩余:{{item?.weight}}吨/{{item?.volume}}立方</p>

View File

@ -206,7 +206,8 @@
</nz-card> </nz-card>
<nz-card> <nz-card>
<div class="align-center"> <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> <button nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">司机抢单</button>
</div> </div>
</nz-card> </nz-card>

View File

@ -82,6 +82,7 @@ export class SupplyManagementBulkComponent implements OnInit {
widget: 'dict-select', widget: 'dict-select',
containsAllLable: true, containsAllLable: true,
params: { dictKey: 'service:type' }, params: { dictKey: 'service:type' },
containAllLable:true,
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
@ -94,6 +95,7 @@ export class SupplyManagementBulkComponent implements OnInit {
widget: 'dict-select', widget: 'dict-select',
containsAllLable: true, containsAllLable: true,
params: { dictKey: 'goodresource:settlement:type' }, params: { dictKey: 'goodresource:settlement:type' },
containAllLable:true,
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },

View File

@ -10,7 +10,7 @@ import {
SFUISchema SFUISchema
} from '@delon/form'; } from '@delon/form';
import { _HttpClient } from '@delon/theme'; import { _HttpClient } from '@delon/theme';
import { AmapPoiPickerComponent,AmapService } from '@shared'; import { AmapPoiPickerComponent,AmapService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component'; import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
import { SupplyManagementService } from '../../services/supply-management.service'; import { SupplyManagementService } from '../../services/supply-management.service';
@ -54,7 +54,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
private route: ActivatedRoute, private route: ActivatedRoute,
private modalService: NzModalService, private modalService: NzModalService,
public service: SupplyManagementService, public service: SupplyManagementService,
private amapService: AmapService private amapService: AmapService,
public shipperSrv: ShipperBaseService
) { ) {
this.validateForm1 = fb.group({ this.validateForm1 = fb.group({
loadingTime: [null, []], loadingTime: [null, []],
@ -121,26 +122,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
}, },
enterpriseProjectId: { enterpriseProjectId: {
type: 'string',
title: '项目', title: '项目',
enum: [ type: 'string',
{ label: '项目1', value: '1' }, default: '',
{ label: '项目2', value: '2' }
],
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', visibleIf: {
allowClear: true _$expand: (value: boolean) => value,
// asyncData: () => },
// this.service.loadChildData2('0', '2').pipe( asyncData: () =>
// map((data: any) => { this.shipperSrv.getEnterpriseProject()
// return data.map((m: any) => { } as SFSelectWidgetSchema,
// return { label: m.name, value: m.id };
// });
// }),
// ),
// change: (i) => this.updateCategory(i, '/categoryId2'),
} as SFSelectWidgetSchema
}, },
enterpriseInfoName: { enterpriseInfoName: {
type: 'string', type: 'string',
@ -216,8 +208,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
type: 'string', type: 'string',
title: '货物名称', title: '货物名称',
ui: { ui: {
widget: 'dict-select', // widget: 'dict-select',
params: { dictKey: 'GoodsName' }, // params: { dictKey: 'GoodsName' },
placeholder: '请选择' placeholder: '请选择'
} }
}, },

View File

@ -42,15 +42,15 @@
<div nz-row> <div nz-row>
<div nz-col nzSpan="6"> <div nz-col nzSpan="6">
<div class="source-info"> <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> <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?.detailedAddress}}</p>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p> <p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
<p>发货日期:{{item?.createTime}}</p> <p>发货日期:{{item?.createTime}}</p>
</div> </div>
<div *ngIf="item.type === 2"> <div *ngIf="item.type === 2 || item.type === '2'">
<p>卸货地:{{item?.detailedAddress}}</p> <p>卸货地:{{item?.detailedAddress}}</p>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p> <p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
<p>卸货日期:{{item?.modifyTime}}</p> <p>卸货日期:{{item?.modifyTime}}</p>
@ -60,7 +60,7 @@
</div> </div>
<div nz-col nzSpan="5"> <div nz-col nzSpan="5">
<div class="source-info bdr bdl pl-md"> <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> <h3 *ngIf="i === 0" style="font-weight: 700;">货物信息</h3>
<p>货物名称:{{item?.goodsName}}</p> <p>货物名称:{{item?.goodsName}}</p>
<p>货物数量:{{item?.weight}}吨/{{item?.volume}}立方</p> <p>货物数量:{{item?.weight}}吨/{{item?.volume}}立方</p>

View File

@ -75,6 +75,7 @@ export class VehicleComponentsListComponent implements OnInit {
title: '车牌颜色', title: '车牌颜色',
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
containAllLable:true,
params: { dictKey: 'CarColor' }, params: { dictKey: 'CarColor' },
}, },
}, },
@ -98,6 +99,7 @@ export class VehicleComponentsListComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'CarModel' }, params: { dictKey: 'CarModel' },
containAllLable:true,
visibleIf: { visibleIf: {
expand: (value: boolean) => value, expand: (value: boolean) => value,
}, },
@ -109,6 +111,7 @@ export class VehicleComponentsListComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'CarLength' }, params: { dictKey: 'CarLength' },
containAllLable:true,
visibleIf: { visibleIf: {
expand: (value: boolean) => value, expand: (value: boolean) => value,
}, },

View File

@ -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-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of dictList"></nz-option>
</nz-select> </nz-select>

View File

@ -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();
});
});

View File

@ -22,17 +22,24 @@ export class DictSelectComponent implements OnInit, ControlValueAccessor {
private onTouchedFn?: () => void; private onTouchedFn?: () => void;
defaultUrl = `/api/mdc/pbc/dictItems/getDictValue`; defaultUrl = `/api/mdc/pbc/dictItems/getDictValue`;
@Input() value: string = ''; // 默认选中值 @Input() value: any = '' || []; // 默认选中值
@Input() url: string = ''; // 获取字典数据的地址 @Input() url: string = ''; // 获取字典数据的地址
@Input() params = {};// 请求参数 @Input() params = {};// 请求参数
dictList: any[] = []; dictList: any[] = [];
@Input() containsAllLable = true; // 是否包含全部这一选项
@Input() mode: 'multiple' | 'tags' | 'default' = 'default';
constructor(public service: DictSelectService, public cdr: ChangeDetectorRef) { } constructor(public service: DictSelectService, public cdr: ChangeDetectorRef) { }
writeValue(geo: string): void { writeValue(geo: string): void {
if (geo == null) { if (geo == null) {
this.value = ''; if (this.mode === 'multiple' || this.mode === 'tags') {
this.value = [];
} else {
this.value = '';
}
return; return;
} }
this.value = geo; this.value = geo;
@ -45,11 +52,10 @@ export class DictSelectComponent implements OnInit, ControlValueAccessor {
} }
ngOnInit(): void { ngOnInit(): void {
this.service.getDictList(this.url || this.defaultUrl, this.params).subscribe(res => { this.service.getDictList(this.url || this.defaultUrl, this.params).subscribe(res => {
if (res) { if (res) {
this.dictList = res || []; this.dictList = res || [];
if (this.dictList.length > 0) { if (this.dictList.length > 0 && this.containsAllLable) {
const obj = { label: '全部', value: '' }; const obj = { label: '全部', value: '' };
this.dictList.unshift(obj); this.dictList.unshift(obj);
} }

View File

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-13 10:41:19 * @Date: 2021-12-16 20:41:23
* @LastEditTime: 2021-12-13 10:41:57 * @LastEditTime: 2021-12-16 20:41:42
* @LastEditors: your name * @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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 * @FilePath: \tms-obc-web\src\app\shared\components\dict-select\index.ts

View File

@ -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"> <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)" <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> </app-dict-select>
</sf-item-wrap> </sf-item-wrap>
<!-- <sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title"> <!-- <sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">

View File

@ -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 { Component, OnInit } from "@angular/core";
import { ControlWidget } from "@delon/form"; import { ControlWidget } from "@delon/form";