Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -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;
|
||||
|
||||
@ -17,11 +17,9 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<div class="card-title"
|
||||
>装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div
|
||||
>
|
||||
<div class="card-title">装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div>
|
||||
|
||||
<form nz-form [formGroup]="validateForm1" role="form">
|
||||
<form #ngForm="ngForm" nz-form role="form">
|
||||
<div nz-row [nzGutter]="24">
|
||||
<div nz-col [nzSpan]="10">
|
||||
<div *ngFor="let data1 of startInfo; let idx = index">
|
||||
@ -30,17 +28,11 @@
|
||||
<nz-form-control [nzErrorTip]="'请输入装货地'">
|
||||
<div class="align-center">
|
||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="data1.detailedAddress"
|
||||
(click)="openMap('start', idx)"
|
||||
formControlName="loadAddress{{ idx }}"
|
||||
placeholder="请输入装货地"
|
||||
/>
|
||||
<input nz-input [(ngModel)]="data1.detailedAddress" (click)="openMap('start', idx)"
|
||||
name="startDetailedAddress{{ idx }}" placeholder="请输入装货地" required />
|
||||
</nz-input-group>
|
||||
<span style="padding: 0 10px"
|
||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
|
||||
></span>
|
||||
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"
|
||||
(click)="chooseAddress(idx, 'start')"></i></span>
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
@ -48,23 +40,12 @@
|
||||
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
|
||||
<div class="align-center">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="data1.appUserName"
|
||||
formControlName="loadName{{ idx }}"
|
||||
maxlength="30"
|
||||
placeholder="请输入联系人姓名"
|
||||
/>
|
||||
<input nz-input [(ngModel)]="data1.appUserName" name="startAppUserName{{ idx }}" maxlength="30"
|
||||
placeholder="请输入联系人姓名" required />
|
||||
</nz-form-control>
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
|
||||
<input
|
||||
style="margin-left: 12px"
|
||||
nz-input
|
||||
[(ngModel)]="data1.contractTelephone"
|
||||
maxlength="11"
|
||||
formControlName="loadPhone{{ idx }}"
|
||||
placeholder="请输入联系人电话"
|
||||
/>
|
||||
<input style="margin-left: 12px" nz-input [(ngModel)]="data1.contractTelephone" maxlength="11"
|
||||
name="startContractTelephone{{ idx }}" placeholder="请输入联系人电话" required/>
|
||||
</nz-form-control>
|
||||
</div>
|
||||
</nz-form-item>
|
||||
@ -72,7 +53,8 @@
|
||||
</div>
|
||||
<div nz-col [nzSpan]="4">
|
||||
<div style="display: flex; justify-content: center">
|
||||
<span style="padding: 24 px; font-size: 30px; color: #7d7d7d"><i nz-icon nzType="swap" nzTheme="outline"></i></span>
|
||||
<span style="padding: 24 px; font-size: 30px; color: #7d7d7d"><i nz-icon nzType="swap"
|
||||
nzTheme="outline"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="10">
|
||||
@ -82,17 +64,11 @@
|
||||
<nz-form-control [nzErrorTip]="'请输入卸货地'">
|
||||
<div class="align-center">
|
||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="data2.detailedAddress"
|
||||
(click)="openMap('end', idx)"
|
||||
formControlName="unloadAddress{{ idx }}"
|
||||
placeholder="请输入卸货地"
|
||||
/>
|
||||
<input nz-input [(ngModel)]="data2.detailedAddress" (click)="openMap('end', idx)"
|
||||
name="endDetailedAddress{{ idx }}" placeholder="请输入卸货地" required/>
|
||||
</nz-input-group>
|
||||
<span style="padding: 0 10px"
|
||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
|
||||
></span>
|
||||
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"
|
||||
(click)="chooseAddress(idx, 'end')"></i></span>
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
@ -100,23 +76,12 @@
|
||||
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
|
||||
<div class="align-center">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="data2.appUserName"
|
||||
maxlength="30"
|
||||
formControlName="unloadName{{ idx }}"
|
||||
placeholder="请输入联系人姓名"
|
||||
/>
|
||||
<input nz-input [(ngModel)]="data2.appUserName" maxlength="30" name="endAppUserName{{ idx }}"
|
||||
placeholder="请输入联系人姓名" required/>
|
||||
</nz-form-control>
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
|
||||
<input
|
||||
style="margin-left: 12px"
|
||||
nz-input
|
||||
[(ngModel)]="data2.contractTelephone"
|
||||
formControlName="unloadPhone{{ idx }}"
|
||||
maxlength="11"
|
||||
placeholder="请输入联系人电话"
|
||||
/>
|
||||
<input style="margin-left: 12px" nz-input [(ngModel)]="data2.contractTelephone"
|
||||
name="endUnloadPhone{{ idx }}" maxlength="11" placeholder="请输入联系人电话" required/>
|
||||
</nz-form-control>
|
||||
</div>
|
||||
</nz-form-item>
|
||||
@ -139,7 +104,8 @@
|
||||
</nz-input-group>
|
||||
<ng-template #addOnAfterTemplate>
|
||||
<nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)">
|
||||
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions"></nz-option>
|
||||
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions">
|
||||
</nz-option>
|
||||
</nz-select>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
@ -150,9 +116,8 @@
|
||||
<nz-option nzLabel="抹除小数" nzValue="2"></nz-option>
|
||||
<nz-option nzLabel="抹除个数" nzValue="3"></nz-option>
|
||||
</nz-select>
|
||||
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"
|
||||
><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i
|
||||
></span>
|
||||
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"><i nz-icon
|
||||
nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i></span>
|
||||
<ng-template #template2>
|
||||
<p>例如 付司机运费 = 重量*单价 = 999.99</p>
|
||||
<p>保留小数,即 999.99</p>
|
||||
@ -163,41 +128,20 @@
|
||||
</ng-template>
|
||||
<ng-template sf-template="weight" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'吨'">
|
||||
<input
|
||||
nz-input
|
||||
type="number"
|
||||
[ngModel]="i.value"
|
||||
min="0"
|
||||
step="0.01"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="总重量,必填"
|
||||
/>
|
||||
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
|
||||
placeholder="总重量,必填" />
|
||||
</nz-input-group>
|
||||
</ng-template>
|
||||
<ng-template sf-template="volume" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'方'">
|
||||
<input
|
||||
nz-input
|
||||
type="number"
|
||||
[ngModel]="i.value"
|
||||
min="0"
|
||||
step="0.01"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="总体积"
|
||||
/>
|
||||
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
|
||||
placeholder="总体积" />
|
||||
</nz-input-group>
|
||||
</ng-template>
|
||||
<ng-template sf-template="number" let-i let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'车'">
|
||||
<input
|
||||
nz-input
|
||||
type="number"
|
||||
[ngModel]="i.value"
|
||||
min="0"
|
||||
step="0.01"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
placeholder="总车次"
|
||||
/>
|
||||
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
|
||||
placeholder="总车次" />
|
||||
</nz-input-group>
|
||||
</ng-template>
|
||||
</sf>
|
||||
@ -214,15 +158,8 @@
|
||||
<div nz-row>
|
||||
<div class="align-center" style="width: 350px;">
|
||||
<div nz-col nzSpan="12">
|
||||
<nz-input-number
|
||||
[ngModel]="i.value"
|
||||
style="width: 150px;"
|
||||
[nzMin]="1"
|
||||
[nzMax]="30"
|
||||
[nzStep]="1"
|
||||
(ngModelChange)="i.setValue($event)"
|
||||
nzPlaceHolder="请输入1-30"
|
||||
></nz-input-number>
|
||||
<nz-input-number [ngModel]="i.value" style="width: 150px;" [nzMin]="1" [nzMax]="30" [nzStep]="1"
|
||||
(ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入1-30"></nz-input-number>
|
||||
</div>
|
||||
<div nz-col nzSpan="6">
|
||||
<span>天内支付运费</span>
|
||||
@ -237,7 +174,7 @@
|
||||
|
||||
<nz-card>
|
||||
<div class="align-center">
|
||||
<button nz-button nzType="primary" (click)="choose()">取消</button>
|
||||
<button nz-button nzType="primary" (click)="choose()">取消</button>
|
||||
|
||||
<button nz-button nzType="primary" (click)="submit('assign')">生成二维码</button>
|
||||
<button nz-button nzType="primary" (click)="submit('assign')">指派熟车</button>
|
||||
|
||||
@ -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 = {};
|
||||
@ -100,35 +92,33 @@ 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 = {
|
||||
properties: {
|
||||
@ -144,20 +134,17 @@ 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)
|
||||
},
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
this.getRegionCode(q);
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
@ -165,7 +152,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
allowClear: true
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
// enterpriseInfoName: {
|
||||
@ -176,18 +163,15 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
// },
|
||||
// default: '天津市怡亚通XXXX有限公司'
|
||||
// },
|
||||
enterpriseInfoName: {
|
||||
enterpriseInfoId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
|
||||
},
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder()
|
||||
}
|
||||
},
|
||||
deadlineTime: {
|
||||
title: '截至日期',
|
||||
@ -464,7 +448,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,28 +456,28 @@ 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();
|
||||
// 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);
|
||||
@ -533,26 +517,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 +643,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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,56 +7,53 @@
|
||||
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\choose-famifiar\choose-famifiar.component.html
|
||||
-->
|
||||
<button nz-button nzType="primary" style="margin-bottom: 24px" (click)="add()"><i nz-icon
|
||||
nzType="plus"></i>添加司机</button>
|
||||
nzType="plus"></i>添加司机</button>
|
||||
<!-- 搜索区 -->
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzSpan]="12">
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzSpan]="18">
|
||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="6">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzSpan]="18">
|
||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="6">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzSpan]="12">
|
||||
<!-- 数据列表 -->
|
||||
<st #st [bordered]="true" [data]="service.$api_getList_card" [columns]="columns" size="small"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: reqProcess}"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500" [loading]="service.http.loading" [widthMode]="{ type: 'strict' }" [scroll]="{ x: '600px' }"
|
||||
style="margin-top: 22px;">
|
||||
<ng-template st-row="userCarLicenseDesensitizationVOList" let-item let-index="index">
|
||||
<nz-select [(ngModel)]="item.default" (ngModelChange)="carChange($event, item)" style="width: 100%;">
|
||||
<nz-option nzValue="" nzLabel="不限"></nz-option>
|
||||
<nz-option [nzValue]="cart" [nzLabel]="cart.carNo"
|
||||
*ngFor="let cart of item.userCarLicenseDesensitizationVOList">
|
||||
</nz-option>
|
||||
</nz-select>
|
||||
</ng-template>
|
||||
</st>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<!-- 选中列表 -->
|
||||
<div>已选择{{ st2Data.length }}位司机</div>
|
||||
<st #st2 [bordered]="true" [data]="st2Data" [columns]="columns2" size="small"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500" [loading]="service.http.loading" [widthMode]="{ type: 'strict' }" [scroll]="{ x: '600px' }">
|
||||
<ng-template st-row="captain" let-item let-index="index">
|
||||
<span>{{ item.captainName }} {{ item.captainPhone }}</span>
|
||||
<a (click)="setCaptain(item,index)">设置</a>
|
||||
</ng-template>
|
||||
</st>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<!-- 数据列表 -->
|
||||
<st #st *ngIf="columns" [bordered]="true" [data]="service.$api_getList_card" [columns]="columns" size="small"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: reqProcess}"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500" [loading]="service.http.loading" [widthMode]="{ type: 'strict' }" [scroll]="{ x: '600px' }"
|
||||
style="margin-top: 22px;width: 100%;">
|
||||
<ng-template st-row="userCarLicenseDesensitizationVOList" let-item let-index="index">
|
||||
<nz-select [(ngModel)]="item.default" (ngModelChange)="carChange($event, item)" style="width: 100%;">
|
||||
<nz-option nzValue="" nzLabel="不限"></nz-option>
|
||||
<nz-option [nzValue]="cart" [nzLabel]="cart.carNo"
|
||||
*ngFor="let cart of item.userCarLicenseDesensitizationVOList">
|
||||
</nz-option>
|
||||
</nz-select>
|
||||
</ng-template>
|
||||
</st>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<!-- 选中列表 -->
|
||||
<div>已选择{{ st2Data.length }}位司机</div>
|
||||
<st #st2 *ngIf="columns2" [bordered]="true" [data]="st2Data" [columns]="columns2" size="small"
|
||||
[page]="{ show: false }" [scroll]="{ x: '600px',y:'300px' }" style="width: 100%;">
|
||||
<ng-template st-row="captain" let-item let-index="index">
|
||||
<span>{{ item.captainName }} {{ item.captainPhone }}</span>
|
||||
<a (click)="setCaptain(item,index)">设置</a>
|
||||
</ng-template>
|
||||
</st>
|
||||
</div>
|
||||
</div>
|
||||
<div *nzModalFooter>
|
||||
<button nz-button nzType="default" (click)="cancel()">取消</button>
|
||||
<button nz-button nzType="primary" (click)="ok()">发布并指派给司机</button>
|
||||
<button nz-button nzType="default" (click)="cancel()">取消</button>
|
||||
<button nz-button nzType="primary" (click)="ok()">发布并指派给司机</button>
|
||||
</div>
|
||||
@ -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: '移除',
|
||||
|
||||
@ -248,9 +248,6 @@
|
||||
</sv>
|
||||
<sv label="身份证照" col="1">
|
||||
<div class="d-flex">
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'licensePhotoWatermark',key2:'licensePhoto',hover:'detailPhoto'}">
|
||||
</ng-container>
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.legalPersonIdentityVO,status:isEdit,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'legalFront'}">
|
||||
</ng-container>
|
||||
|
||||
@ -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: '货主添加' } },
|
||||
|
||||
Reference in New Issue
Block a user