diff --git a/proxy.conf.js b/proxy.conf.js index d67d6ede..96ab03bb 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-07 19:42:53 - * @LastEditTime: 2022-01-13 10:20:45 + * @LastEditTime: 2022-01-13 11:05:48 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: \tms-obc-web\proxy.conf.js @@ -24,7 +24,7 @@ module.exports = { // } '//api': { target: { - host: 'tms-api-dev.eascs.com', + host: 'tms-api-test.eascs.com', protocol: 'https:', port: 443 }, 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 e9485e14..f31cd393 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?.expenseName }}:¥{{ data?.price | number:'0.2-2' }}

+ + +
+

{{ data.expenseName }}:¥{{ data.price | number:'0.2-2' }}

+
+
+ +
+

+ {{ data.expenseName }}:¥{{ data.price | number:'0.2-2' }} + 待申请 + 已拒绝 + 已支付 + 申请中 +

- -
-

- {{ data.expenseName }}:{{ data.price }} - {{ data.paymentStatusLabel }} -

-
-
{{i?.costName}}:{{i?.price}} diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.less b/src/app/routes/order-management/components/vehicle/vehicle.component.less index 29a5e65b..ee086ec9 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.less +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.less @@ -1,2 +1,5 @@ :host { + p{ + margin-bottom: 0 + } } \ No newline at end of file diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index c95cb0bd..f20bc574 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -63,7 +63,8 @@ tabs = { stayQuantity: 0, signQuantity: 0, compolatelQuantity: 0, - GoingQuantity: 0 + GoingQuantity: 0, + totalCount: 0 }; resourceStatus: any; constructor( @@ -106,10 +107,14 @@ resourceStatus: any; this.initSTFloat(); this.initSTFloatView(); } - + search() { + this.st?.load(1); + this.getGoodsSourceStatistical() + } getGoodsSourceStatistical() { this.service.request(this.service.$api_statisticalStatus).subscribe(res => { if (res) { + let totalCount = 0; res.forEach((element: any) => { if(element.billStatusLabel === '待发车') { this.tabs.stayQuantity = element.quantity @@ -124,7 +129,9 @@ resourceStatus: any; } else if (element.billStatusLabel === '已取消') { this.tabs.cancelQuantity = element.quantity } + totalCount += element.quantity }); + this.tabs.totalCount = totalCount } }) } @@ -347,36 +354,37 @@ resourceStatus: any; { title: '', type: 'checkbox', width: '50px', className: 'text-center' }, { title: '订单号', - width: '100px', + width: '200px', className: 'text-center', render: 'billCode' }, { title: '我的出价', - width: '150px', + width: '200px', + className: 'text-center', render: 'mybidInfo' }, { title: '运费明细', - width: '200px', + width: '250px', className: 'text-center', render: 'mybidDetailInfo', }, - { title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, - { title: '货主', index: 'shipperAppUserName', width: '120px', className: 'text-center' }, - { title: '关联运单号', index: 'wayBillCode', width: '120px', className: 'text-center' }, - { title: '货源编号', index: 'resourceCode', width: '120px', className: 'text-center' }, - { title: '装货地', index: 'loadingAddressArr', width: '120px', className: 'text-center' }, + { title: '网络货运人', index: 'enterpriseInfoName', width: '170px', className: 'text-center' }, + { title: '货主', index: 'shipperAppUserName', width: '170px', className: 'text-center' }, + { title: '关联运单号', index: 'wayBillCode', width: '170px', className: 'text-center' }, + { title: '货源编号', index: 'resourceCode', width: '170px', className: 'text-center' }, + { title: '装货地', index: 'loadingAddressArr', width: '170px', className: 'text-center' }, { title: '卸货地', className: 'text-center', - width: '120px', + width: '170px', index: 'unloadingAddressArr' }, { title: '货物信息', className: 'text-center', - width: '120px', + width: '170px', render: 'goodsName' }, { title: '承运司机', @@ -400,6 +408,7 @@ resourceStatus: any; title: '创建时间', className: 'text-center', index: 'creationTime', + width: '170px', }, { title: '操作', @@ -464,7 +473,7 @@ resourceStatus: any; className: 'text-center', index: 'applyUserName' }, - { title: '状态', index: 'handleStatus', className: 'text-center' }, + { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, { title: '操作', fixed: 'right', 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 390785cb..134a72f5 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: 2021-12-24 17:58:45 + * @LastEditTime: 2022-01-13 13:33:14 * @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 @@ -179,19 +179,23 @@ export class UpdateFreightComponent implements OnInit { } changeNumVal() { - if (this.calculateSub) { - this.calculateSub.unsubscribe(); + console.log(this.sf.valid) + if(this.sf.valid) { + console.log(this.sf.valid) } - 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 - }); - } - }); + // 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 + // }); + // } + // }); } } diff --git a/src/app/routes/order-management/modal/vehicle/update-freight/update-freight.component.html b/src/app/routes/order-management/modal/vehicle/update-freight/update-freight.component.html index f0f950f6..5aeb71b4 100644 --- a/src/app/routes/order-management/modal/vehicle/update-freight/update-freight.component.html +++ b/src/app/routes/order-management/modal/vehicle/update-freight/update-freight.component.html @@ -1,8 +1,8 @@ diff --git a/src/app/routes/order-management/modal/vehicle/update-freight/update-freight.component.ts b/src/app/routes/order-management/modal/vehicle/update-freight/update-freight.component.ts index bf167aaa..48b51512 100644 --- a/src/app/routes/order-management/modal/vehicle/update-freight/update-freight.component.ts +++ b/src/app/routes/order-management/modal/vehicle/update-freight/update-freight.component.ts @@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme'; /* * @Author: your name * @Date: 2021-12-14 14:03:07 - * @LastEditTime: 2021-12-21 14:56:26 + * @LastEditTime: 2022-01-13 13:38: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\routes\order-management\modal\bulk\update-freight\update-freight.component.ts @@ -22,6 +22,7 @@ import { _HttpClient } from '@delon/theme'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalRef } from 'ng-zorro-antd/modal'; import { OrderManagementService } from '../../../services/order-management.service'; +import { Subscription } from 'rxjs'; @Component({ selector: 'app-order-management-vehicle-update-freight', @@ -38,6 +39,8 @@ export class VehicleUpdateFreightComponent implements OnInit { @Input() data: any; + calculateSub!: Subscription; + constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {} ngOnInit(): void { @@ -55,6 +58,7 @@ export class VehicleUpdateFreightComponent implements OnInit { type: 'number', title: '预付', default: info.prePay?.price || 0, + minimum:0, readOnly: info.prePay?.paymentStatus === '2' || info.prePay?.paymentStatus === '4', ui: { prefix: '¥', @@ -67,6 +71,7 @@ export class VehicleUpdateFreightComponent implements OnInit { type: 'number', title: '到付', default: info.toPay?.price || 0, + minimum:0, readOnly: info.toPay?.paymentStatus === '2' || info.toPay?.paymentStatus === '4', ui: { prefix: '¥', @@ -79,6 +84,7 @@ export class VehicleUpdateFreightComponent implements OnInit { // type: 'number', // title: '油卡', // default: 0.0, + // minimum:0, // readOnly: this.i.oilCardPayStatus === '1' || this.i.oilCardPayStatus === '3', // ui: { // prefix: '¥', @@ -91,6 +97,7 @@ export class VehicleUpdateFreightComponent implements OnInit { type: 'number', title: '回单付', default: info.receiptPay?.price || 0, + minimum:0, readOnly: info.receiptPay?.paymentStatus === '2' || info.receiptPay?.paymentStatus === '4', ui: { prefix: '¥', @@ -120,6 +127,39 @@ export class VehicleUpdateFreightComponent implements OnInit { } save(value: any): void { + this.service.request(this.service.$api_get_insertFreightChangeWhole, this.getParams()).subscribe(res => { + if (res) { + this.modal.destroy(); + this.service.msgSrv.success('变更运费成功'); + } + }); + } + + close(): void { + this.modal.destroy(); + } + /** + * 更新数字框 + * + */ + changeNumVal() { + if (this.calculateSub) { + this.calculateSub.unsubscribe(); + } + this.calculateSub = this.service.request(this.service.$api_getWholeSurchargeDetail, this.getParams()).subscribe((res: any) => { + if (res) { + Object.assign(this.data, { + totalFreight: res.totalFreight, + freight: res.freight, + surcharge: res.surcharge + }); + } + }); + // this.tranPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay; + // this.totalPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay + this.otherPrice; + } + + getParams() { const editItems = this.data.list?.filter((info: any) => info.toPay?.paymentStatus !== '2' && info.toPay?.paymentStatus !== '4'); editItems.forEach((item: any) => { switch (item.costName) { @@ -142,24 +182,6 @@ export class VehicleUpdateFreightComponent implements OnInit { dtos: editItems, changeCause: this.sf.value.changeCause }; - - this.service.request(this.service.$api_get_insertFreightChangeWhole, params).subscribe((res: any) => { - if (res) { - this.modal.destroy(); - this.service.msgSrv.success('变更运费成功'); - } - }); - } - - close(): void { - this.modal.destroy(); - } - /** - * 更新数字框 - * - */ - changeNumVal() { - // this.tranPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay; - // this.totalPrice = this.sf.value.prePay + this.sf.value.toPay + this.sf.value.oilCardPay + this.sf.value.receiptPay + this.otherPrice; + return params; } } 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 556cc401..b9bd6bfa 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -193,30 +193,30 @@ export class SupplyManagementBulkComponent implements OnInit { { title: '', type: 'checkbox', width: '50px', className: 'text-center' }, { title: '货源编号', - width: '100px', + width: '200px', className: 'text-center', render: 'resourceCode' }, - { title: '服务类型', index: 'serviceTypeLabel', width: '120px', className: 'text-center' }, - { title: '货主', index: 'shipperAppUserName', width: '120px', className: 'text-center' }, - { title: '项目名称', index: 'enterpriseProjectName', width: '120px', className: 'text-center' }, - { title: '关联订单', render: 'orderSn', width: '120px', className: 'text-center' }, - { title: '货物信息', render: 'goodsInfos', width: '180px', className: 'text-center' }, + { title: '服务类型', index: 'serviceTypeLabel', width: '150px', className: 'text-center' }, + { title: '货主', index: 'shipperAppUserName', width: '200px', className: 'text-center' }, + { title: '项目名称', index: 'enterpriseProjectName', width: '200px', className: 'text-center' }, + { title: '关联订单', render: 'orderSn', width: '200px', className: 'text-center' }, + { title: '货物信息', render: 'goodsInfos', width: '200px', className: 'text-center' }, { title: '装货地', className: 'text-center', index: 'loadingAddressArr', - width: '120px', + width: '200px', }, { title: '卸货地', className: 'text-center', index: 'unloadingAddressArr', - width: '120px', + width: '200px', }, { title: '用车需求', className: 'text-center', - width: '150px', + width: '200px', render: 'useCarDemand' }, { @@ -228,7 +228,7 @@ export class SupplyManagementBulkComponent implements OnInit { { title: '结算依据', className: 'text-center', - width: '120px', + width: '200px', index: 'settlementBasis', }, { diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index 8a11cd6e..d428b570 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -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: '确定取消货源吗?', nzContent: `取消后不可恢复,谨慎操作`, 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('/') }, { diff --git a/src/app/routes/vehicle/components/audit/detail/detail.component.ts b/src/app/routes/vehicle/components/audit/detail/detail.component.ts index 82c5cd1f..ea724d6f 100644 --- a/src/app/routes/vehicle/components/audit/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/audit/detail/detail.component.ts @@ -233,13 +233,15 @@ export class VehicleComponentsAuditDetailComponent implements OnInit { return value; } viewEvaluate(item: any) { - this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe(() => { + this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe((i) => { this.st.reload(); + this.getDetailList() }); } updateEvaluate(item: any) { - this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe(() => { + this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe((i) => { this.st.reload(); + this.getDetailList() }); } } diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.ts b/src/app/routes/vehicle/components/list/detail/detail.component.ts index 8a86a26e..e85e3c60 100644 --- a/src/app/routes/vehicle/components/list/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/list/detail/detail.component.ts @@ -200,6 +200,7 @@ export class VehicleComponentsListDetailComponent implements OnInit { viewEvaluate(item: any) { this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe(() => { this.st.reload(); + this.getDetailList(); }); } /** @@ -208,6 +209,7 @@ export class VehicleComponentsListDetailComponent implements OnInit { updateEvaluate(item: any) { this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe(() => { this.st.reload(); + this.getDetailList(); }); } handleOK() { diff --git a/src/app/routes/vehicle/components/list/edit/edit.component.ts b/src/app/routes/vehicle/components/list/edit/edit.component.ts index a4160f18..183c29a0 100644 --- a/src/app/routes/vehicle/components/list/edit/edit.component.ts +++ b/src/app/routes/vehicle/components/list/edit/edit.component.ts @@ -116,7 +116,7 @@ export class VehicleComponentsListEditComponent implements OnInit { } this.service.request(this.service.$api_get_upLoadCarProtocal, params).subscribe((res) => { if(res) { - this.modal.destroy(); + this.modal.destroy(true); this.service.msgSrv.success('上传协议成功!') } else { this.service.msgSrv.error(res.msg) diff --git a/src/app/routes/vehicle/components/list/img-view/img-view.component.ts b/src/app/routes/vehicle/components/list/img-view/img-view.component.ts index 8636e0ed..9df4f200 100644 --- a/src/app/routes/vehicle/components/list/img-view/img-view.component.ts +++ b/src/app/routes/vehicle/components/list/img-view/img-view.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-07 17:30:18 - * @LastEditTime: 2021-12-16 15:31:13 + * @LastEditTime: 2022-01-13 11:27:12 * @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\vehicle\components\list\img-view\img-view.component.ts @@ -27,7 +27,7 @@ export class VehicleImgViewComponent implements OnInit { } cancel() { - this.modal.destroy(); + this.modal.destroy(true); } // 驳回 reject() { @@ -37,7 +37,7 @@ export class VehicleImgViewComponent implements OnInit { } this.service.request(this.service.$api_get_auditCarProtocal_audit, params).subscribe((res) => { if(res) { - this.modal.destroy(); + this.modal.destroy(true); this.service.msgSrv.success('已驳回') } else { this.service.msgSrv.error(res.msg) @@ -52,7 +52,7 @@ export class VehicleImgViewComponent implements OnInit { } this.service.request(this.service.$api_get_auditCarProtocal_audit, params).subscribe((res) => { if(res) { - this.modal.destroy(); + this.modal.destroy(true); this.service.msgSrv.success('已通过') } else { this.service.msgSrv.error(res.msg)