车辆对接
This commit is contained in:
@ -218,7 +218,7 @@
|
||||
<button nz-button nzType="primary"(click)="modifyFreightPeople()">
|
||||
修改网络货运人
|
||||
</button>
|
||||
<button nz-button nzType="primary"(click)="modifyRate()">
|
||||
<button nz-button nzType="primary"(click)="modifycaptain()">
|
||||
修改车队长
|
||||
</button>
|
||||
<button nz-button nzType="primary" nzGhost nz-popconfirm
|
||||
|
||||
@ -16,6 +16,7 @@ import { VehicleUpdateFreightComponent } from '../../modal/vehicle/update-freigh
|
||||
import { OrderManagementService } from '../../services/order-management.service';
|
||||
import { VehicleModifyRateComponent } from '../../modal/vehicle/modify-rate/modify-rate.component';
|
||||
import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-people/freight-people.component';
|
||||
import { VehicleModifyCaptainComponent } from '../../modal/vehicle/modify-captain/modify-captain.component';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -654,7 +655,37 @@ resourceStatus: any;
|
||||
nzTitle: '修改网络货运人',
|
||||
nzWidth: 600,
|
||||
nzContent: VehicleFreightPeopleComponent,
|
||||
nzComponentParams: { data: { ids: params } },
|
||||
nzComponentParams: { data: { ids: params, } },
|
||||
nzFooter: null,
|
||||
// nzOnOk: sin => {
|
||||
// this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.service.msgSrv.success('变更运费成功');
|
||||
// modal.destroy();
|
||||
// this.st.reload();
|
||||
// }
|
||||
// });
|
||||
// return false;
|
||||
// }
|
||||
});
|
||||
}
|
||||
/**
|
||||
*修改网络货运人
|
||||
*/
|
||||
modifycaptain() {
|
||||
let params: any[] = [];
|
||||
this.selectedRows.forEach(item => {
|
||||
params.push(item.id);
|
||||
});
|
||||
if(params.length === 0) {
|
||||
this.service.msgSrv.error('请先选择订单!')
|
||||
return
|
||||
}
|
||||
const modal = this.modal.create({
|
||||
nzTitle: '修改车队长',
|
||||
nzWidth: 600,
|
||||
nzContent: VehicleModifyCaptainComponent,
|
||||
nzComponentParams: { data: { ids: params, } },
|
||||
nzFooter: null,
|
||||
// nzOnOk: sin => {
|
||||
// this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => {
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-29 20:23:48
|
||||
* @LastEditTime: 2021-12-29 20:48:59
|
||||
* @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 {SFComponent, SFNumberWidgetSchema, 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',
|
||||
@ -27,22 +27,27 @@ export class VehicleFreightPeopleComponent implements OnInit {
|
||||
|
||||
data: any;
|
||||
|
||||
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService, private service2: ShipperBaseService) {}
|
||||
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService, ) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.data)
|
||||
this.initSF(this.data);
|
||||
this.initSF();
|
||||
}
|
||||
initSF(data: any) {
|
||||
initSF() {
|
||||
this.schema = {
|
||||
enterpriseInfoName: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.service2.getNetworkFreightForwarder(),
|
||||
properties: {
|
||||
enterpriseInfoName: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getNetworkFreightForwarderHistory(this.data),
|
||||
},
|
||||
},
|
||||
},
|
||||
required: ['enterpriseInfoName']
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-15 13:17:42
|
||||
* @LastEditTime: 2021-12-29 15:12:09
|
||||
* @LastEditTime: 2021-12-30 11:11:47
|
||||
* @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\vehicle\update-freight\update-freight.component.html
|
||||
-->
|
||||
<nz-alert nzType="info" [nzMessage]="'已选择' + data?.ids?.length + '已选择条订单'" nzShowIcon></nz-alert>
|
||||
<sf style="margin-top: 15px;" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
|
||||
<sf style="margin-top: 15px;" #sf mode="edit" [schema]="schema" [ui]="ui" >
|
||||
<button class="but_rigth" nz-button nzSize="large" nzType="primary" (click)="search(sf.value)">搜索</button>
|
||||
</sf>
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">关闭</button>
|
||||
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="sf.valid">确定</button>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-29 20:07:40
|
||||
* @LastEditTime: 2021-12-30 11:13:09
|
||||
* @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
|
||||
@ -13,7 +13,7 @@ import {
|
||||
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';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
|
||||
@Component({
|
||||
selector: 'app-order-management-vehicle-modify-captain',
|
||||
@ -34,9 +34,9 @@ export class VehicleModifyCaptainComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.data)
|
||||
this.initSF(this.data);
|
||||
this.initSF();
|
||||
}
|
||||
initSF(data: any) {
|
||||
initSF() {
|
||||
this.schema = {
|
||||
enterpriseInfoName: {
|
||||
type: 'string',
|
||||
@ -77,5 +77,7 @@ export class VehicleModifyCaptainComponent implements OnInit {
|
||||
close(): void {
|
||||
this.modal.destroy();
|
||||
}
|
||||
|
||||
search(value: any) {
|
||||
console.log(value)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:31:52
|
||||
* @LastEditTime: 2021-12-24 14:43:00
|
||||
* @LastEditTime: 2021-12-29 20:44:48
|
||||
* @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\services\order-management.service.ts
|
||||
*/
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { BaseService } from 'src/app/shared/services';
|
||||
|
||||
@Injectable({
|
||||
@ -14,6 +15,7 @@ import { BaseService } from 'src/app/shared/services';
|
||||
})
|
||||
export class OrderManagementService extends BaseService {
|
||||
|
||||
$api_get_getEnterpriseNetTransHis = `/api/mdc/enterpriseNetTransHis/getEnterpriseNetTransHis`;
|
||||
$api_get_catalogue_member = `/user?_allow_anonymous=true`;
|
||||
$api_get_bulkPage_list = `/api/sdc/goodsResourceOperate/listBulkPage`;
|
||||
// 据 手机号/姓名 查询 车队长/司机
|
||||
@ -99,6 +101,29 @@ export class OrderManagementService extends BaseService {
|
||||
$api_set_getWholeOrderDetail = `/api/sdc/billOperate/getWholeOrderDetail`;
|
||||
// 修改--大宗订单详情
|
||||
$api_set_getBulkOrderDetail = `/api/sdc/billOperate/getBulkOrderDetail`;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据企业ID,获取企业历史网络货运人
|
||||
* @returns
|
||||
*/
|
||||
getNetworkFreightForwarderHistory(params: any) {
|
||||
return this.request(this.$api_get_getEnterpriseNetTransHis, params).pipe(
|
||||
map((res: any) => {
|
||||
if (!res) {
|
||||
return [];
|
||||
}
|
||||
const list = res.map((item: any) => ({
|
||||
label: item.enterpriseName,
|
||||
value: item.id
|
||||
}));
|
||||
return [{ value: '', label: '全部' }, ...list];
|
||||
})
|
||||
);
|
||||
}
|
||||
constructor(public injector: Injector) {
|
||||
super(injector)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user