车辆对接
This commit is contained in:
@ -6,8 +6,7 @@ import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||
import { SupplyManagementVehicleAssignedCarComponent,
|
||||
} from '../assigned-car/assigned-car.component';
|
||||
import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/assigned-car.component';
|
||||
import { SupplyManagementUpdateExternalSnComponent } from '../update-external-sn/update-external-sn.component';
|
||||
import { SupplyManagementUpdateFreightComponent } from '../update-freight/update-freight.component';
|
||||
import { of } from 'rxjs';
|
||||
@ -38,12 +37,12 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
};
|
||||
resourceStatus: any;
|
||||
constructor(
|
||||
public service: SupplyManagementService,
|
||||
private modal: NzModalService,
|
||||
private router: Router,
|
||||
public service: SupplyManagementService,
|
||||
private modal: NzModalService,
|
||||
private router: Router,
|
||||
private ar: ActivatedRoute,
|
||||
public shipperSrv: ShipperBaseService
|
||||
) {}
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -58,7 +57,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
a.resourceStatus = this.resourceStatus;
|
||||
}
|
||||
return {
|
||||
...a,
|
||||
...a
|
||||
};
|
||||
}
|
||||
get selectedRows() {
|
||||
@ -158,9 +157,9 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
* 重新指派
|
||||
*/
|
||||
/**
|
||||
* 重新指派
|
||||
*/
|
||||
assignedCar(item: any) {
|
||||
* 重新指派
|
||||
*/
|
||||
assignedCar(item: any) {
|
||||
const { id } = item;
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '指派熟车',
|
||||
@ -170,12 +169,11 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
i: item,
|
||||
status: 'anew',
|
||||
params: { id },
|
||||
url: this.service.$api_save_assign_vehicle,
|
||||
url: this.service.$api_save_assign_vehicle
|
||||
},
|
||||
nzFooter: null,
|
||||
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe((result) => {
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
this.st.reload();
|
||||
}
|
||||
@ -222,7 +220,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
/**
|
||||
* 代发货源
|
||||
*/
|
||||
releaseGoods() {
|
||||
@ -236,7 +234,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
nzTitle: '<b>确定取消货源吗?</b>',
|
||||
nzContent: `<b>取消后不可恢复,谨慎操作</b>`,
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_cancle_goods_source, {id: record.id}).subscribe(res => {
|
||||
this.service.request(this.service.$api_cancle_goods_source, { id: record.id }).subscribe(res => {
|
||||
if (res === true) {
|
||||
this.service.msgSrv.success('操作成功!');
|
||||
this.st?.reload();
|
||||
@ -288,17 +286,17 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
onSearch: (q: any) => {
|
||||
console.log(q)
|
||||
console.log(q);
|
||||
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([]);
|
||||
}
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
@ -306,11 +304,10 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'select',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
asyncData: () =>
|
||||
this.shipperSrv.getEnterpriseProject()
|
||||
} as SFSelectWidgetSchema,
|
||||
asyncData: () => this.shipperSrv.getEnterpriseProject()
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
serviceType: {
|
||||
title: '服务类型',
|
||||
@ -364,39 +361,40 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
className: 'text-center',
|
||||
render: 'resourceCode'
|
||||
},
|
||||
// {
|
||||
// title: '服务类型',
|
||||
// index: 'serviceType',
|
||||
// width: '120px',
|
||||
// className: 'text-center',
|
||||
// type: 'enum',
|
||||
// enum: { '1': '抢单', '2': '指派' }
|
||||
// },
|
||||
{ title: '货主', index: 'shipperAppUserName', width: '120px' },
|
||||
{
|
||||
title: '货主',
|
||||
index: 'shipperAppUserName',
|
||||
width: '180px',
|
||||
className: 'text-center' },
|
||||
{
|
||||
title: '项目名称',
|
||||
index: 'enterpriseProjectName',
|
||||
width: '120px'
|
||||
width: '180px',
|
||||
className: 'text-center'
|
||||
},
|
||||
{
|
||||
title: '装货地',
|
||||
index: 'loadingAddressArr',
|
||||
width: '200px'
|
||||
width: '200px',
|
||||
className: 'text-center'
|
||||
},
|
||||
{
|
||||
title: '卸货地',
|
||||
index: 'unloadingAddressArr',
|
||||
width: '200px'
|
||||
width: '200px',
|
||||
className: 'text-center'
|
||||
},
|
||||
{
|
||||
title: '货物名称',
|
||||
index: 'goodsName',
|
||||
width: '150px'
|
||||
width: '150px',
|
||||
className: 'text-center'
|
||||
},
|
||||
{
|
||||
title: '货物数量',
|
||||
width: '130px',
|
||||
width: '200px',
|
||||
index: 'goodsNumber',
|
||||
className: 'text-center',
|
||||
format: item => item.goodsNumber.join('/')
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user