车辆对接

This commit is contained in:
wangshiming
2022-01-04 11:23:50 +08:00
parent 4f51c487cc
commit c276ce4726
9 changed files with 169 additions and 90 deletions

View File

@ -638,6 +638,11 @@ resourceStatus: any;
// return false;
// }
});
modal.afterClose.subscribe((result) => {
if (result) {
this.st.load(1);
}
});
}
/**
*修改网络货运人

View File

@ -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>

View File

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

View File

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