diff --git a/src/app/routes/financial-management/components/abnormal-gold/clearing-modal/clearing-modal.component.ts b/src/app/routes/financial-management/components/abnormal-gold/clearing-modal/clearing-modal.component.ts index b96e5fe3..592e7bc4 100644 --- a/src/app/routes/financial-management/components/abnormal-gold/clearing-modal/clearing-modal.component.ts +++ b/src/app/routes/financial-management/components/abnormal-gold/clearing-modal/clearing-modal.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { apiConf } from '@conf/api.conf'; import { SFComponent, SFSchema, SFTextWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form'; +import { ShipperBaseService } from '@shared'; import { NzModalRef } from 'ng-zorro-antd/modal'; import { FreightAccountService } from '../../../services/freight-account.service'; @@ -35,7 +36,11 @@ export class ClearingModalComponent implements OnInit { } }; - constructor(private modal: NzModalRef, public service: FreightAccountService) {} + constructor( + private modal: NzModalRef, + public service: FreightAccountService, + public shipperservice: ShipperBaseService, + ) {} ngOnInit(): void { this.initSF(this.i); @@ -51,13 +56,18 @@ export class ClearingModalComponent implements OnInit { } as SFTextWidgetSchema, default: '10000.00' }, - name2: { - title: '网络货运人', + enterpriseInfoId: { type: 'string', + title: '网络货运人', ui: { - widget: 'text' - } as SFTextWidgetSchema, - default: '天津怡亚通物流科技有限公司' + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value, + }, + allowClear: true, + asyncData: () => this.shipperservice.getNetworkFreightForwarder(), + }, }, name3: { title: '银行类型', diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts index 584b883c..455893c2 100644 --- a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts @@ -74,7 +74,7 @@ loadTime: any; // 货源单设置回显 public service: OrderManagementService, private modalService: NzModalService, private amapService: AmapService, - public service2: ShipperBaseService, + public shipperservice: ShipperBaseService, fb: FormBuilder, private envSrv: EAEnvironmentService, ) { @@ -528,7 +528,7 @@ initSF3() { // ui: { // placeholder: '请选择', // widget: 'select', - // asyncData: () => this.service2.getNetworkFreightForwarder(), + // asyncData: () => this.shipperservice.getNetworkFreightForwarder(), // visibleIf: { // _$expand: (value: boolean) => value, // }, diff --git a/src/app/routes/order-management/components/bulk/bulk.component.html b/src/app/routes/order-management/components/bulk/bulk.component.html index 399a2165..4d697063 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.html +++ b/src/app/routes/order-management/components/bulk/bulk.component.html @@ -1,7 +1,7 @@ - - - + +
-

- 总运费:{{ data.totalFreight | currency }} -

-

运输费:{{ data.freight | currency}},附加费:{{ data.surcharge | currency }}

-
\ No newline at end of file +

+ 总运费:{{ data.totalFreight |currency }} +

+

运输费:{{ data.freight |currency }},附加费:{{ data.surcharge |currency}}

+ + diff --git a/src/app/routes/order-management/modal/bulk/update-freight/update-freight.component.ts b/src/app/routes/order-management/modal/bulk/update-freight/update-freight.component.ts index 134a72f5..702ba68e 100644 --- a/src/app/routes/order-management/modal/bulk/update-freight/update-freight.component.ts +++ b/src/app/routes/order-management/modal/bulk/update-freight/update-freight.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-14 14:03:07 - * @LastEditTime: 2022-01-13 13:33:14 + * @LastEditTime: 2022-01-17 17:02:25 * @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 @@ -12,6 +12,7 @@ import { SFSelectWidgetSchema, SFStringWidgetSchema, SFTextWidgetSchema } from '@delon/form'; +import { NzModalRef } from 'ng-zorro-antd/modal'; import { Subscription } from 'rxjs'; import { OrderManagementService } from '../../../services/order-management.service'; @@ -28,7 +29,7 @@ export class UpdateFreightComponent implements OnInit { data: any; calculateSub!: Subscription; - constructor(private service: OrderManagementService) {} + constructor(private service: OrderManagementService,private modal: NzModalRef, ) {} ngOnInit(): void { this.schema = this.initSF(this.data); @@ -44,8 +45,10 @@ export class UpdateFreightComponent implements OnInit { type: 'object', properties: { freightPrice: { - type: 'string', + type: 'number', title: '运费单价', + minimum:0, + maximum:99999, ui: { addOnAfter: data.freightTypeLabel, placeholder: '请输入', @@ -104,6 +107,8 @@ export class UpdateFreightComponent implements OnInit { type: 'number', title: '装货重量', default: data.acceptWeight, + minimum:0, + maximum:99999, ui: { unit: '吨', placeholder: '请输入', @@ -118,8 +123,10 @@ export class UpdateFreightComponent implements OnInit { type: 'number', title: '装货体积', default: data.acceptVolume, + minimum:0, + maximum:99999, ui: { - unit: '方', + unit: '吨', placeholder: '请输入', grid: { span: 12 @@ -132,6 +139,8 @@ export class UpdateFreightComponent implements OnInit { type: 'number', title: '卸货重量', default: data.settlementWeight, + minimum:0, + maximum:99999, ui: { unit: '吨', placeholder: '请输入', @@ -146,8 +155,10 @@ export class UpdateFreightComponent implements OnInit { type: 'number', title: '卸货体积', default: data.settlementVolume, + minimum:0, + maximum:99999, ui: { - unit: '方', + unit: '吨', placeholder: '请输入', grid: { span: 12 @@ -179,23 +190,36 @@ export class UpdateFreightComponent implements OnInit { } changeNumVal() { - console.log(this.sf.valid) - if(this.sf.valid) { - console.log(this.sf.valid) + if (this.calculateSub) { + this.calculateSub.unsubscribe(); } - // if (this.calculateSub) { - // this.calculateSub.unsubscribe(); - // } - // this.calculateSub = this.service - // .request(this.service.$api_calculate_cost, { billId: this.data.billId, ...this.sf.value, changeCause: '' }) - // .subscribe((res: any) => { - // if (res) { - // Object.assign(this.data, { - // totalFreight: res.totalFreight, - // freight: res.freight, - // surcharge: res.surcharge - // }); - // } - // }); + this.calculateSub = this.service + .request(this.service.$api_calculate_cost, { billId: this.data.billId, ...this.sf.value, changeCause: '' }) + .subscribe(res => { + if (res) { + Object.assign(this.data, { + totalFreight: res.totalFreight, + freight: res.freight, + surcharge: res.surcharge + }); + } + }); + } + + save(value: any): void { + if(!this.sf.valid){ + this.sf.validator({ emitError: true }); + return; + } + this.service.request(this.service.$api_change_bulk, { billId: this.data.billId, ...this.sf.value }).subscribe(res => { + if (res) { + this.service.msgSrv.success('变更运费成功'); + this.modal.destroy(true); + } + }); + } + + close(): void { + this.modal.destroy(); } } diff --git a/src/app/routes/order-management/modal/vehicle/freight-people/freight-people.component.ts b/src/app/routes/order-management/modal/vehicle/freight-people/freight-people.component.ts index 80a50ae7..2168d5f1 100644 --- a/src/app/routes/order-management/modal/vehicle/freight-people/freight-people.component.ts +++ b/src/app/routes/order-management/modal/vehicle/freight-people/freight-people.component.ts @@ -2,7 +2,7 @@ import { Params } from '@angular/router'; /* * @Author: your name * @Date: 2021-12-14 14:03:07 - * @LastEditTime: 2022-01-04 09:37:50 + * @LastEditTime: 2022-01-17 16:20:06 * @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 @@ -12,6 +12,7 @@ import {SFComponent, SFNumberWidgetSchema, SFSchema, SFUISchema} from '@delon/fo 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'; @Component({ @@ -28,7 +29,12 @@ export class VehicleFreightPeopleComponent implements OnInit { data: any; - constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService, ) {} + constructor( + private modal: NzModalRef, + private msgSrv: NzMessageService, + public service: OrderManagementService, + public shipperservice: ShipperBaseService, + ) {} ngOnInit(): void { console.log(this.data) @@ -37,7 +43,7 @@ export class VehicleFreightPeopleComponent implements OnInit { initSF() { this.schema = { properties: { - enterpriseInfoName: { + enterpriseInfoId: { type: 'string', title: '网络货运人', ui: { @@ -47,7 +53,7 @@ export class VehicleFreightPeopleComponent implements OnInit { _$expand: (value: boolean) => value, }, allowClear: true, - asyncData: () => this.service.getNetworkFreightForwarderHistory(this.data), + asyncData: () => this.shipperservice.getNetworkFreightForwarder(), }, }, }, diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index f37c3c6f..4475bde8 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -37,7 +37,12 @@ export class SupplyManagementBulkComponent implements OnInit { receivedQuantity: 0, stayQuantity: 0 }; - constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router,public service2: ShipperBaseService) { } + constructor( + public service: SupplyManagementService, + private modal: NzModalService, + private router: Router, + public shipperservice: ShipperBaseService + ) { } ngOnInit(): void { this.initSF(); @@ -53,10 +58,33 @@ export class SupplyManagementBulkComponent implements OnInit { if(this.resourceStatus) { a.resourceStatus = this.resourceStatus } - return { + const params: any = Object.assign({}, this.sf?.value || {}); + delete params._$expand; + return { ...a, - ...this.sf?.value, - }; + ...params, + releaseTime: { + start: this.sf?.value?.releaseTime?.[0] || '', + end: this.sf?.value?.releaseTime?.[1] || '', + }, + deadlineTime: { + start: this.sf?.value?.deadlineTime?.[0] || '', + end: this.sf?.value?.deadlineTime?.[1] || '', + }, + }; + + // const a:any = {}; + // if(this.resourceStatus) { + // a.resourceStatus = this.resourceStatus + // } + // return { + // ...a, + // ...this.sf?.value, + // createTime: { + // start: this.sf.value.createTime?.[0] || null, + // end: this.sf.value.createTime?.[1] || null, + // } + // }; } search() { this.st?.load(1); @@ -108,7 +136,7 @@ export class SupplyManagementBulkComponent implements OnInit { }, } as SFSelectWidgetSchema, }, - createTime: { + releaseTime: { title: '发布时间', type: 'string', ui: { @@ -142,7 +170,7 @@ export class SupplyManagementBulkComponent implements OnInit { _$expand: (value: boolean) => value, }, allowClear: true, - asyncData: () => this.service2.getNetworkFreightForwarder(), + asyncData: () => this.shipperservice.getNetworkFreightForwarder(), }, }, shipperAppUserId: { diff --git a/src/app/routes/sys-setting/components/close-account/close-account.component.ts b/src/app/routes/sys-setting/components/close-account/close-account.component.ts index 5fd15502..41c25906 100644 --- a/src/app/routes/sys-setting/components/close-account/close-account.component.ts +++ b/src/app/routes/sys-setting/components/close-account/close-account.component.ts @@ -55,7 +55,7 @@ export class CloseAccountComponent implements OnInit { constructor( public service: SystemService, private nzModalService: NzModalService, - public service2: ShipperBaseService, + public shipperservice: ShipperBaseService, ) {} ngOnInit(): void { @@ -106,7 +106,7 @@ export class CloseAccountComponent implements OnInit { ui: { placeholder: '请选择', widget: 'select', - asyncData: () => this.service2.getNetworkFreightForwarder(), + asyncData: () => this.shipperservice.getNetworkFreightForwarder(), visibleIf: { _$expand: (value: boolean) => value, }, @@ -144,7 +144,7 @@ export class CloseAccountComponent implements OnInit { ui: { placeholder: '请选择', widget: 'select', - asyncData: () => this.service2.getNetworkFreightForwarder(), + asyncData: () => this.shipperservice.getNetworkFreightForwarder(), visibleIf: { _$expand: (value: boolean) => value, }, diff --git a/src/app/routes/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index b179f663..066eced9 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; -import { DynamicSettingModalComponent } from '@shared'; +import { DynamicSettingModalComponent, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component'; import { UsermanageService } from '../../../services/usercenter.service'; @@ -22,7 +22,12 @@ export class FreightComponentsListComponent implements OnInit { @ViewChild('promoterModal', { static: false }) promoterModal!: any; promotersTelephone = ''; - constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} + constructor( + public service: UsermanageService, + private modal: NzModalService, + private router: Router, + private ar: ActivatedRoute, + public shipperservice: ShipperBaseService) {} /** * 查询参数 @@ -108,13 +113,26 @@ export class FreightComponentsListComponent implements OnInit { showRequired: false } }, + // networkTransporter: { + // title: '网络货运人', + // type: 'string', + // ui: { + // placeholder: '请输入', + // showRequired: false + // } + // }, networkTransporter: { - title: '网络货运人', type: 'string', + title: '网络货运人', ui: { - placeholder: '请输入', - showRequired: false - } + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value, + }, + allowClear: true, + asyncData: () => this.shipperservice.getNetworkFreightForwarder(), + }, }, source: { type: 'string', diff --git a/src/app/routes/waybill-management/components/bulk/bulk.component.ts b/src/app/routes/waybill-management/components/bulk/bulk.component.ts index 83a6b864..9cb4a7d1 100644 --- a/src/app/routes/waybill-management/components/bulk/bulk.component.ts +++ b/src/app/routes/waybill-management/components/bulk/bulk.component.ts @@ -61,7 +61,7 @@ tabs = { constructor( public service: WaybillManagementServe, private modal: NzModalService, - public service2: ShipperBaseService) { } + public shipperservice: ShipperBaseService) { } /** * 查询参数 @@ -224,13 +224,13 @@ tabs = { }, } as SFDateWidgetSchema, }, - isRiskSheet: { + riskStatus: { type: 'string', title: '是否风险单', enum: [ { label: '全部', value: '' }, - { label: '是', value: '1' }, - { label: '否', value: '2' } + { label: '是', value: '3' }, + { label: '否', value: '1' } ], ui: { widget: 'select', @@ -250,7 +250,7 @@ tabs = { _$expand: (value: boolean) => value, }, allowClear: true, - asyncData: () => this.service2.getNetworkFreightForwarder(), + asyncData: () => this.shipperservice.getNetworkFreightForwarder(), }, }, settlementBasis: { @@ -276,7 +276,7 @@ tabs = { _$expand: (value: boolean) => value }, asyncData: () => - this.service2.loadConfigByKey('goods.name.config.type').pipe( + this.shipperservice.loadConfigByKey('goods.name.config.type').pipe( map((data: any) => { return data[0].children?.map((m: any) => { return { label: m.name, value: m.id }; diff --git a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts index f3e054cd..5eb56cd6 100644 --- a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts @@ -58,7 +58,7 @@ export class WaybillManagementVehicleComponent implements OnInit { constructor( public service: WaybillManagementServe, private modal: NzModalService, - public service2: ShipperBaseService) {} + public shipperservice: ShipperBaseService) {} /** * 查询参数 @@ -233,13 +233,13 @@ export class WaybillManagementVehicleComponent implements OnInit { } } as SFDateWidgetSchema }, - isRiskSheet: { + riskStatus: { type: 'string', title: '是否风险单', enum: [ { label: '全部', value: '' }, - { label: '是', value: '1' }, - { label: '否', value: '2' } + { label: '是', value: '3' }, + { label: '否', value: '1' } ], ui: { widget: 'select', @@ -259,7 +259,7 @@ export class WaybillManagementVehicleComponent implements OnInit { _$expand: (value: boolean) => value }, allowClear: true, - asyncData: () => this.service2.getNetworkFreightForwarder() + asyncData: () => this.shipperservice.getNetworkFreightForwarder() } }, // goodsName: { @@ -283,7 +283,7 @@ export class WaybillManagementVehicleComponent implements OnInit { _$expand: (value: boolean) => value }, asyncData: () => - this.service2.loadConfigByKey('goods.name.config.type').pipe( + this.shipperservice.loadConfigByKey('goods.name.config.type').pipe( map((data: any) => { return data[0].children?.map((m: any) => { return { label: m.name, value: m.id }; diff --git a/src/app/routes/waybill-management/services/waybill-management.service.ts b/src/app/routes/waybill-management/services/waybill-management.service.ts index d5ab48d6..d133c543 100644 --- a/src/app/routes/waybill-management/services/waybill-management.service.ts +++ b/src/app/routes/waybill-management/services/waybill-management.service.ts @@ -2,7 +2,7 @@ import { WaybillManagementBulkComponent } from './../components/bulk/bulk.compon /* * @Author: your name * @Date: 2021-12-07 14:52:29 - * @LastEditTime: 2022-01-12 14:34:04 + * @LastEditTime: 2022-01-17 15:06:56 * @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\waybill-management\services\waybill-management.service.ts @@ -52,8 +52,10 @@ export class WaybillManagementServe extends BaseService { // 查询CRM客户信息表 $api_get_crmCustomer_page = '/api/mdc/cuc/crmCustomer/list/page'; - // 查询运营端异常上报 + // 查询运营端未回复异常上报 $api_get_listOperatePage = '/api/sdc/exceptionReport/listOperateUnReplyPage'; + // 查询运营端已回复异常上报 + $api_get_listOperateReplyPage = '/api/sdc/exceptionReport/listOperateReplyPage'; // 获取货主企业列表 public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';