车辆对接
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-30 19:36:30
|
||||
* @LastEditTime: 2021-12-31 13:50:41
|
||||
* @LastEditors: your name
|
||||
* @LastEditTime: 2022-01-04 10:34:31
|
||||
* @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\financial-management\services\freight-account.service.ts
|
||||
*/
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { BaseService, ShipperBaseService } from '@shared';
|
||||
import { BaseService, EACacheService, ShipperBaseService } from '@shared';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@ -57,7 +57,7 @@ export class FreightAccountService extends ShipperBaseService {
|
||||
// 根据费用头ID查询费用单及开票明细
|
||||
$api_get_cost_detail = '/api/fcc/ficoFeeL/detail';
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
constructor(public injector: Injector,public eaCacheSrv: EACacheService) {
|
||||
super(injector, eaCacheSrv);
|
||||
}
|
||||
}
|
||||
|
||||
@ -638,6 +638,11 @@ resourceStatus: any;
|
||||
// return false;
|
||||
// }
|
||||
});
|
||||
modal.afterClose.subscribe((result) => {
|
||||
if (result) {
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
*修改网络货运人
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-15 13:17:42
|
||||
* @LastEditTime: 2021-12-29 15:12:09
|
||||
* @LastEditTime: 2022-01-04 11:10:46
|
||||
* @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
|
||||
@ -10,5 +10,5 @@
|
||||
<sf style="margin-top: 15px;" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></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>
|
||||
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" >确定</button>
|
||||
</div>
|
||||
|
||||
@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2021-12-29 15:02:47
|
||||
* @LastEditTime: 2022-01-04 11:21:29
|
||||
* @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
|
||||
@ -42,17 +42,12 @@ export class VehicleModifyRateComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.data)
|
||||
this.initSF(this.data);
|
||||
this.initSF();
|
||||
}
|
||||
initSF(data: any) {
|
||||
const info = {
|
||||
prePay: data.list?.filter((item: any) => item.costCode === 'PRE')[0],
|
||||
toPay: data.list?.filter((item: any) => item.costCode === 'RECE')[0],
|
||||
receiptPay: data.list?.filter((item: any) => item.costCode === 'BACK')[0]
|
||||
};
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
prePay: {
|
||||
additionalRate: {
|
||||
type: 'number',
|
||||
title: '附加费率',
|
||||
ui: {
|
||||
@ -62,7 +57,7 @@ export class VehicleModifyRateComponent implements OnInit {
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
},
|
||||
required: ['prePay']
|
||||
required: ['additionalRate']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
@ -73,14 +68,23 @@ export class VehicleModifyRateComponent implements OnInit {
|
||||
}
|
||||
|
||||
save(value: any): void {
|
||||
|
||||
if(!this.sf.value?.additionalRate) {
|
||||
this.service.msgSrv.warning('请填写附加费!')
|
||||
return;
|
||||
}
|
||||
console.log(this.sf.value)
|
||||
const params = {
|
||||
};
|
||||
ids: this.data?.ids,
|
||||
...this.sf.value
|
||||
|
||||
this.service.request(this.service.$api_get_insertFreightChangeWhole, params).subscribe((res: any) => {
|
||||
};
|
||||
console.log(params)
|
||||
this.service.request(this.service.$api_set_updateAdditionalRateBatch, params).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.modal.destroy();
|
||||
this.modal.close(true);
|
||||
this.service.msgSrv.success('变更运费成功');
|
||||
} else {
|
||||
this.service.msgSrv.error(res?.msg)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:31:52
|
||||
* @LastEditTime: 2022-01-04 09:32:27
|
||||
* @LastEditTime: 2022-01-04 11:07:08
|
||||
* @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 { ShipperBaseService } from '@shared';
|
||||
import { EACacheService, ShipperBaseService } from '@shared';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@ -103,6 +103,8 @@ export class OrderManagementService extends ShipperBaseService {
|
||||
$api_set_getBulkOrderDetail = `/api/sdc/billOperate/getBulkOrderDetail`;
|
||||
// 批量修改网络货运人
|
||||
$api_set_updateEnterpriseInfoBatch = `/api/sdc/billOperate/updateEnterpriseInfoBatch`;
|
||||
// 批量修改附加费率
|
||||
$api_set_updateAdditionalRateBatch = `/api/sdc/billOperate/updateAdditionalRateBatch`;
|
||||
|
||||
|
||||
|
||||
@ -129,7 +131,7 @@ export class OrderManagementService extends ShipperBaseService {
|
||||
})
|
||||
);
|
||||
}
|
||||
constructor(public injector: Injector) {
|
||||
super(injector)
|
||||
constructor(public injector: Injector,public eaCacheSrv: EACacheService) {
|
||||
super(injector,eaCacheSrv)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { map } from 'rxjs/operators';
|
||||
@ -10,6 +10,8 @@ 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';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
|
||||
@Component({
|
||||
selector: 'app-supply-management-vehicle',
|
||||
@ -35,19 +37,28 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
stayQuantity: 0
|
||||
};
|
||||
resourceStatus: any;
|
||||
constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
|
||||
constructor(
|
||||
public service: SupplyManagementService,
|
||||
private modal: NzModalService,
|
||||
private router: Router,
|
||||
private ar: ActivatedRoute,
|
||||
public shipperSrv: ShipperBaseService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
const a: any = {};
|
||||
const params = Object.assign({}, this.sf?.value || {});
|
||||
delete params._$expand;
|
||||
const a: any = {
|
||||
...params
|
||||
};
|
||||
if (this.resourceStatus) {
|
||||
a.resourceStatus = this.resourceStatus;
|
||||
}
|
||||
return {
|
||||
...a,
|
||||
...this.sf?.value
|
||||
};
|
||||
}
|
||||
get selectedRows() {
|
||||
@ -262,27 +273,42 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
title: '卸货地',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
shipperAppUserName: {
|
||||
shipperAppUserId: {
|
||||
type: 'string',
|
||||
title: '货主',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
serverSearch: true,
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
onSearch: (q: any) => {
|
||||
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))))
|
||||
.toPromise();
|
||||
} else {
|
||||
return of([]);
|
||||
}
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
asyncData: () => this.shipperSrv.getEnterpriseProject(),
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
goodsName: {
|
||||
title: '所属项目',
|
||||
type: 'string',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
// asyncData: () =>[]
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
serviceType: {
|
||||
title: '服务类型',
|
||||
type: 'string',
|
||||
@ -306,17 +332,17 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
enterpriseInfoName: {
|
||||
enterpriseInfoId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
allowClear: true
|
||||
// asyncData: () => this.getCatalogueMember(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-29 13:12:35
|
||||
* @LastEditTime: 2021-12-30 15:59:07
|
||||
* @LastEditTime: 2022-01-04 10:36:02
|
||||
* @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\ticket-management\services\ticket.service.ts
|
||||
*/
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { EACacheService, ShipperBaseService } from '@shared';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@ -47,7 +47,7 @@ export class TicketService extends ShipperBaseService {
|
||||
// 保存开票申请费用明细
|
||||
$api_ficoVatappFee_save = '/api/fcc/ficoVatappFee/save';
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
constructor(public injector: Injector,public eaCacheSrv: EACacheService) {
|
||||
super(injector, eaCacheSrv);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-11-29 15:22:34
|
||||
* @LastEditTime: 2021-12-13 11:25:12
|
||||
* @LastEditTime: 2022-01-04 10:11:16
|
||||
* @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\usercenter\services\usercenter.service.ts
|
||||
*/
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { cacheConf } from '@conf/cache.conf';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { EACacheService, ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { ImageViewComponent } from 'src/app/shared/components/imagelist';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@ -106,8 +106,8 @@ export class UsermanageService extends ShipperBaseService {
|
||||
// 身份证识别
|
||||
$api_ocr_recognize_id_card = '/api/mdc/pbc/hwc/ocr/recognizeIdCard';
|
||||
|
||||
constructor(public injector: Injector, private nzModalService: NzModalService) {
|
||||
super(injector);
|
||||
constructor(public injector: Injector, private nzModalService: NzModalService, public eaCacheSrv: EACacheService) {
|
||||
super(injector,eaCacheSrv);
|
||||
}
|
||||
|
||||
showImg(url: any) {
|
||||
|
||||
@ -1,14 +1,8 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-29 17:20:03
|
||||
* @LastEditTime: 2021-12-29 20:43:13
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\shared\services\business\shipper-base.service.ts
|
||||
*/
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { BaseService } from '../core/base.service';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { cacheConf } from '@conf/cache.conf';
|
||||
import { EACacheService } from '..';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@ -17,10 +11,13 @@ export class ShipperBaseService extends BaseService {
|
||||
$api_get_carless_carrier = ``; // 获取承运人
|
||||
$api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList `; // 所属项目列表
|
||||
$api_get_staff_list = `/api/mdc/cuc/userApp/getStaffList`; //查询企业项目员工列表(录单员)
|
||||
$api_get_network_freight_forwarder = `/api/mdc/cuc/networkTransporter/findAll`; // 获取网络货运人
|
||||
$api_get_network_freight_forwarder_list = `/api/mdc/cuc/networkTransporter/findAll`; // 获取网络货运人
|
||||
$api_get_network_freight_forwarder_one = `/api/mdc/cuc/networkTransporter/get`; // 获取网络货运人
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
envCache: any;
|
||||
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
|
||||
super(injector);
|
||||
this.envCache = this.eaCacheSrv.get(cacheConf.env);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -28,19 +25,20 @@ export class ShipperBaseService extends BaseService {
|
||||
* @returns
|
||||
*/
|
||||
getCarlessCarrier() {
|
||||
return;
|
||||
const params = {};
|
||||
const params = {
|
||||
};
|
||||
return this.request(this.$api_get_carless_carrier, params, 'POST').pipe(
|
||||
map(res => {
|
||||
map((res) => {
|
||||
if (res) {
|
||||
res.map((m: any) => {
|
||||
return { label: m.platformName, value: m.operationId };
|
||||
});
|
||||
}
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取所属项目
|
||||
* @returns
|
||||
@ -51,51 +49,95 @@ export class ShipperBaseService extends BaseService {
|
||||
if (!res) {
|
||||
return [];
|
||||
}
|
||||
const list = res.map((item: any) => ({
|
||||
label: item.projectName,
|
||||
value: item.enterpriseId
|
||||
}));
|
||||
return [{ value: '', label: '全部' }, ...list];
|
||||
const list = res.map(((item: any) => {
|
||||
return {
|
||||
label: item.projectName,
|
||||
value: item.enterpriseId
|
||||
}
|
||||
}))
|
||||
const obj = [{ value: '', label: '全部' }];
|
||||
return [...obj, ...list];
|
||||
})
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取录单员
|
||||
* @returns
|
||||
*/
|
||||
getStaffList(params = {}) {
|
||||
getStaffList(params = {},containerAll = true) {
|
||||
return this.request(this.$api_get_staff_list, params).pipe(
|
||||
map((res: any) => {
|
||||
if (!res) {
|
||||
return [];
|
||||
}
|
||||
const list = res.map((item: any) => ({
|
||||
label: item.name,
|
||||
value: item.userId
|
||||
}));
|
||||
return [{ value: '', label: '全部' }, ...list];
|
||||
const list = res.map(((item: any) => {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.userId
|
||||
}
|
||||
}))
|
||||
const obj = [];
|
||||
if (containerAll) {
|
||||
obj.push({ label: '全部', value: '' })
|
||||
}
|
||||
return [...obj, ...list];
|
||||
})
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网络货运人
|
||||
/**
|
||||
* 获取调度员
|
||||
* @returns
|
||||
*/
|
||||
getNetworkFreightForwarder(params = {}) {
|
||||
return this.request(this.$api_get_network_freight_forwarder, params).pipe(
|
||||
getStaffList2(params = {}) {
|
||||
return this.request(this.$api_get_staff_list, params).pipe(
|
||||
map((res: any) => {
|
||||
if (!res) {
|
||||
return [];
|
||||
}
|
||||
const list = res.map(((item: any) => {
|
||||
return {
|
||||
label: `${item.name}/${item.telephone}`,
|
||||
value: item.userId
|
||||
}
|
||||
}))
|
||||
return [...list];
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网络货运人
|
||||
* @returns
|
||||
*/
|
||||
getNetworkFreightForwarder(params = {}, containerAll = false) {
|
||||
return this.request(this.$api_get_network_freight_forwarder_list, params).pipe(
|
||||
map((res: any) => {
|
||||
if (!res) {
|
||||
return [];
|
||||
}
|
||||
const list = res.map((item: any) => ({
|
||||
label: item.enterpriseName,
|
||||
value: item.id
|
||||
}));
|
||||
return [{ value: '', label: '全部' }, ...list];
|
||||
const list = res.map(((item: any) => {
|
||||
return {
|
||||
label: item.enterpriseName,
|
||||
value: item.id
|
||||
}
|
||||
}))
|
||||
const obj = [];
|
||||
if (containerAll) {
|
||||
obj.push({ label: '全部', value: '' })
|
||||
}
|
||||
return [...obj, ...list];
|
||||
})
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID获取网络货运人
|
||||
* @returns
|
||||
*/
|
||||
getNetworkTransporterById(id: string) {
|
||||
return this.request(this.$api_get_network_freight_forwarder_one, { id });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user