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 bbae2d7b..e7ff42e9 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 }} + {{ data.paymentStatus }} +

+
+
{{i?.costName}}:{{i?.price}}
+ +
+ {{item?.driverName}} +
+
+ {{item?.driverPhone}} +
+
+ +
+ {{item?.payeeName}} +
+
+ {{item?.payeePhone}} +
+
装 | {{item?.loadingTime}}
卸 | {{item?.unloadingTime}}
@@ -102,21 +134,23 @@ - + - + + {{ index + 1 }} + @@ -133,11 +167,10 @@ multiSort size="small" [bordered]="true" - [data]="datass" + [data]="service.$api_get_getChangeRecordWholeDetail" [columns]="columnsFloatView" - [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" - [res]="{ reName: { list: 'data.records', total: 'data.total' } }" - [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" + [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeViewParams }" + [res]="{ reName: { list: 'data', total: 'data.total' } }" [loadingDelay]="500" > 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 79428ffb..7b82f430 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -26,6 +26,8 @@ export class OrderManagementVehicleComponent implements OnInit { isVisibleView = false; isVisibleEvaluate = false; isVisible = false; + changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录 + changeViewId: any; // 查看运费变更记录id - 用于查看 _$expand = false; @ViewChild('st') private readonly st!: STComponent; @ViewChild('stFloat') private readonly stFloat!: STComponent; @@ -90,6 +92,16 @@ export class OrderManagementVehicleComponent implements OnInit { ...this.sf?.value, }; } + get changeParams() { + return { + id: this.changeId + }; + } + get changeViewParams() { + return { + id: this.changeViewId + }; + } get selectedRows() { return this.st?.list.filter((item) => item.checked) || []; } @@ -314,33 +326,34 @@ export class OrderManagementVehicleComponent implements OnInit { title: '运费明细', width: '100px', className: 'text-center', - render: 'billExpenseDetailVOList', + render: 'mybidDetailInfo', }, - { title: '网络货运人', index: 'enterpriseInfoId', width: '120px', className: 'text-center' }, - { title: '货主', index: 'shipperAppUserId', width: '120px', className: 'text-center' }, - { title: '关联运单号', index: 'linkUrl', width: '120px', className: 'text-center' }, + { 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: 'loadingPlace', width: '120px', className: 'text-center' }, + { title: '装货地', index: 'loadingAddressArr', width: '120px', className: 'text-center' }, { title: '卸货地', className: 'text-center', width: '120px', - index: 'dischargePlace' + index: 'unloadingAddressArr' }, { title: '货物信息', className: 'text-center', width: '120px', + render: 'goodsName' }, { title: '承运司机', className: 'text-center', width: '120px', - index: 'driverId' + render: 'driverName' }, { title: '收款人', className: 'text-center', - index: 'payeeId', + render: 'payeeName', width: '100px', }, { @@ -366,7 +379,7 @@ export class OrderManagementVehicleComponent implements OnInit { }, { text: '运费变更记录', - click: (_record) => this.OpenPrice(), + click: (_record) => this.OpenPrice(_record), }, { text: '变更运费', @@ -397,19 +410,19 @@ export class OrderManagementVehicleComponent implements OnInit { { title: '序号', className: 'text-center', - index: 'one', + render: 'order' }, { title: '操作时间', className: 'text-center', - index: 'two', + index: 'applyTime' }, { title: '操作人', className: 'text-center', - index: 'three', + index: 'applyUserName' }, - { title: '状态', index: 'externalSn', className: 'text-center' }, + { title: '状态', index: 'handleStatus', className: 'text-center' }, { title: '操作', fixed: 'right', @@ -419,9 +432,13 @@ export class OrderManagementVehicleComponent implements OnInit { text: '查看', click: (_record) => this.FloatView(_record), }, + // { + // text: '查看协议', + // click: (_record, _modal, _instance) => this.view(_record) + // }, { text: '撤销', - click: (_record) => this.audit(_record), + click: (_record) => this.revoke(_record), }, ], }, @@ -520,7 +537,9 @@ export class OrderManagementVehicleComponent implements OnInit { handleOK() { } - OpenPrice() { + OpenPrice(value: any) { + console.log(value) + this.changeId = value.id; this.isVisible = true } /** @@ -528,6 +547,8 @@ export class OrderManagementVehicleComponent implements OnInit { */ FloatView(item: any) { console.log(item) + console.log() + this.changeViewId = item.id; this.isVisibleView = true } /** @@ -573,7 +594,8 @@ export class OrderManagementVehicleComponent implements OnInit { nzWidth: '50%', nzContent: VehicleSureDepartComponent, nzComponentParams: { - i: item + i: item, + Status: 2 }, nzFooter: null }); @@ -590,4 +612,19 @@ export class OrderManagementVehicleComponent implements OnInit { nzFooter: null }); } + revoke(item: any) { + this.modal.confirm({ + nzTitle: '是否确定立即撤销费用变更!', + nzOnOk: () => + this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id}).subscribe((res) => { + console.log(res) + if(res) { + this.service.msgSrv.success('撤销成功!') + this.stFloat.reload() + } else { + this.service.msgSrv.error(res.msg) + } + }) + }); + } } diff --git a/src/app/routes/order-management/modal/bulk/sure-depart/sure-depart.component.ts b/src/app/routes/order-management/modal/bulk/sure-depart/sure-depart.component.ts index 4701dc86..64bf0ebd 100644 --- a/src/app/routes/order-management/modal/bulk/sure-depart/sure-depart.component.ts +++ b/src/app/routes/order-management/modal/bulk/sure-depart/sure-depart.component.ts @@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme'; /* * @Author: your name * @Date: 2021-12-14 14:03:07 - * @LastEditTime: 2021-12-14 16:34:52 + * @LastEditTime: 2021-12-20 16:13: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\order-management\modal\bulk\update-freight\update-freight.component.ts @@ -34,6 +34,8 @@ import { Observable, Observer } from 'rxjs'; export class SureDepartComponent implements OnInit { record: any = {}; i: any; + Status: any; + data: any ={ place1: '', place2: '' diff --git a/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts b/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts index 4022ee96..7cea770e 100644 --- a/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts +++ b/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts @@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme'; /* * @Author: your name * @Date: 2021-12-14 14:03:07 - * @LastEditTime: 2021-12-14 17:38:20 + * @LastEditTime: 2021-12-20 16:21:19 * @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 @@ -34,6 +34,7 @@ import { Observable, Observer } from 'rxjs'; export class VehicleSureArriveComponent implements OnInit { record: any = {}; i: any; + Status: any; data: any ={ place1: '', place2: '' diff --git a/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.html b/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.html index d7d289c7..ae1b3f58 100644 --- a/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.html +++ b/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.html @@ -1,21 +1,21 @@ - +
- +
- +
- +
diff --git a/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts b/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts index 55bb5932..b9b2bd1f 100644 --- a/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts +++ b/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts @@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme'; /* * @Author: your name * @Date: 2021-12-14 14:03:07 - * @LastEditTime: 2021-12-14 16:34:52 + * @LastEditTime: 2021-12-20 16:54:21 * @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 @@ -20,11 +20,13 @@ import { SFUISchema, SFUploadWidgetSchema } from '@delon/form'; +import { apiConf } from '@conf/api.conf'; import { _HttpClient } from '@delon/theme'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalRef } from 'ng-zorro-antd/modal'; -import { SupplyManagementService } from 'src/app/routes/supply-management/services/supply-management.service'; import { Observable, Observer } from 'rxjs'; +import { WaybillManagementServe } from 'src/app/routes/waybill-management/services/waybill-management.service'; +import { EAEnvironmentService, EADateUtil } from '@shared'; @Component({ selector: 'app-order-management-vehicle-sure-depart', @@ -34,162 +36,257 @@ import { Observable, Observer } from 'rxjs'; export class VehicleSureDepartComponent implements OnInit { record: any = {}; i: any; + Status: any; data: any ={ - place1: '', - place2: '' + weight: '', + volume: '' }; @ViewChild('sf', { static: false }) sf!: SFComponent; schema: SFSchema = {}; ui: SFUISchema = {}; - constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: SupplyManagementService ) {} + constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: WaybillManagementServe, private envSrv: EAEnvironmentService,) {} ngOnInit(): void { this.initSF(); + console.log(this.i) + this.data.weight = this.i?.weight + this.i.time = this.i.loadingTime; + console.log(this.Status) } initSF() { - this.schema = { - properties: { - datetime: { - type: 'string', - title: '装货时间', - format: 'date-time', - }, - no2: { - type: 'string', - title: '装货重量', - ui: { - widget: 'custom', - } - }, - no3: { - type: 'string', - title: '装货体积', - ui: { - widget: 'custom', - } - }, - no4: { - type: 'string', - title: '', - ui: { - widget: 'text', - }, - default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式', - }, - avatar: { - type: 'string', - title: '装货凭证', - ui: { - action: `/scm/cms/cms/upload/multipartFile/fileModel`, - fileType: 'image/png,image/jpeg,image/jpg', - limit: 1, - limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', - descriptionI18n: ' 提单号', - data: { - // appId: environment.appId, - }, - name: 'multipartFile', - multiple: true, - listType: 'picture-card', - change: (args: any) => { - if (args.type === 'success') { - const avatar = [ - { - uid: -1, - name: 'LOGO', - status: 'done', - url: args.fileList[0].response.url, - response: { - url: args.fileList[0].response.url - } + if(this.Status === 1) { + this.schema = { + properties: { + datetime: { + type: 'string', + title: '装货时间', + format: 'date-time', + }, + imgUrl1: { + type: 'string', + title: '装货凭证', + ui: { + widget: 'upload', + action: apiConf.fileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + descriptionI18n: '提货单', + data: { + appId: this.envSrv.env.appId, + }, + name: 'multipartFile', + beforeUpload: (file: any, fileList: any) => { + return new Observable((observer: Observer) => { + const isLt1M = file.size / 1024 / 1024 < 5; + const fileType = 'image/png,image/jpeg'; + if (fileType.indexOf(file.type) === -1) { + this.service.msgSrv.warning('图片格式不正确!'); + observer.complete(); + return; } - ]; - this.sf?.setValue('/avatar', avatar); - } - }, - beforeUpload: (file: any, _fileList: any) => { - return new Observable((observer: Observer) => { - const isLt2M = file.size / 1024 / 1024 < 5; - if (!isLt2M) { - this.service.msgSrv.warning('图片大小超过5M!'); - observer.complete(); - return; - } - observer.next(isLt2M); - observer.complete(); - }); - } - } as SFUploadWidgetSchema - }, - avatar2: { - type: 'string', - title: '', - ui: { - action: `/scm/cms/cms/upload/multipartFile/fileModel`, - fileType: 'image/png,image/jpeg,image/jpg', - limit: 1, - limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', - descriptionI18n: '人车货照片', - data: { - // appId: environment.appId, - }, - name: 'multipartFile', - multiple: true, - listType: 'picture-card', - change: (args: any) => { - if (args.type === 'success') { - const avatar = [ - { - uid: -1, - name: 'LOGO', - status: 'done', - url: args.fileList[0].response.url, - response: { - url: args.fileList[0].response.url - } + if (!isLt1M) { + this.service.msgSrv.warning('图片大小超过5M!'); + observer.complete(); + return; } - ]; - this.sf?.setValue('/avatar', avatar); - } - }, - beforeUpload: (file: any, _fileList: any) => { - return new Observable((observer: Observer) => { - const isLt2M = file.size / 1024 / 1024 < 5; - if (!isLt2M) { - this.service.msgSrv.warning('图片大小超过5M!'); + observer.next(isLt1M); observer.complete(); - return; - } - observer.next(isLt2M); - observer.complete(); - }); - } - } as SFUploadWidgetSchema - } - }, - required: ['reason'] - }; + }); + }, + multiple: false, + listType: 'picture-card', + showRequired: true, + } as SFUploadWidgetSchema, + }, + imgUrl2: { + type: 'string', + title: '', + ui: { + widget: 'upload', + action: apiConf.fileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + descriptionI18n: '人车货照片', + data: { + appId: this.envSrv.env.appId, + }, + name: 'multipartFile', + beforeUpload: (file: any, fileList: any) => { + return new Observable((observer: Observer) => { + const isLt1M = file.size / 1024 / 1024 < 5; + const fileType = 'image/png,image/jpeg'; + if (fileType.indexOf(file.type) === -1) { + this.service.msgSrv.warning('图片格式不正确!'); + observer.complete(); + return; + } + if (!isLt1M) { + this.service.msgSrv.warning('图片大小超过5M!'); + observer.complete(); + return; + } + observer.next(isLt1M); + observer.complete(); + }); + }, + multiple: false, + listType: 'picture-card', + showRequired: true, + } as SFUploadWidgetSchema, + } + }, + required: ['reason'] + }; + } else { + this.schema = { + properties: { + time: { + type: 'string', + title: '装货时间', + format: 'date-time', + }, + weight: { + type: 'string', + title: '装货重量', + ui: { + widget: 'custom', + } + }, + volume: { + type: 'string', + title: '装货体积', + ui: { + widget: 'custom', + } + }, + no4: { + type: 'string', + title: '', + ui: { + widget: 'text', + }, + default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式', + }, + imgUrl1: { + type: 'string', + title: '装货凭证', + ui: { + widget: 'upload', + action: apiConf.fileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + descriptionI18n: '提货单', + data: { + appId: this.envSrv.env.appId, + }, + name: 'multipartFile', + beforeUpload: (file: any, fileList: any) => { + return new Observable((observer: Observer) => { + const isLt1M = file.size / 1024 / 1024 < 5; + const fileType = 'image/png,image/jpeg'; + if (fileType.indexOf(file.type) === -1) { + this.service.msgSrv.warning('图片格式不正确!'); + observer.complete(); + return; + } + if (!isLt1M) { + this.service.msgSrv.warning('图片大小超过5M!'); + observer.complete(); + return; + } + observer.next(isLt1M); + observer.complete(); + }); + }, + multiple: false, + listType: 'picture-card', + showRequired: true, + } as SFUploadWidgetSchema, + }, + imgUrl2: { + type: 'string', + title: '', + ui: { + widget: 'upload', + action: apiConf.fileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + descriptionI18n: '人车货照片', + data: { + appId: this.envSrv.env.appId, + }, + name: 'multipartFile', + beforeUpload: (file: any, fileList: any) => { + return new Observable((observer: Observer) => { + const isLt1M = file.size / 1024 / 1024 < 5; + const fileType = 'image/png,image/jpeg'; + if (fileType.indexOf(file.type) === -1) { + this.service.msgSrv.warning('图片格式不正确!'); + observer.complete(); + return; + } + if (!isLt1M) { + this.service.msgSrv.warning('图片大小超过5M!'); + observer.complete(); + return; + } + observer.next(isLt1M); + observer.complete(); + }); + }, + multiple: false, + listType: 'picture-card', + showRequired: true, + } as SFUploadWidgetSchema, + } + }, + required: ['reason'] + }; + } + this.ui = { '*': { spanLabelFixed: 100, grid: { span: 20 } }, - $avatar: { grid: { span: 12} }, - $avatar2: { grid: { span: 12} }, + $imgUrl1: { grid: { span: 12} }, + $imgUrl2: { grid: { span: 12} }, }; } save(value: any): void { + console.log(value) - // this.http.post(`/user/${this.record.id}`, value).subscribe(res => { - // this.msgSrv.success('保存成功'); - // this.modal.close(true); - // }); + const params = { + id: this.i.id, + imgUrl1: value.imgUrl1.data.fullFilePath, + imgUrl2: value.imgUrl2.data.fullFilePath, + time: value.time, + volume: this.data.volume, + weight: this.data.weight + } + console.log(EADateUtil.yearToDateTime(value.time)) + params.time = EADateUtil.yearToDateTime(value.time) + console.log(params) + + // this.service.request(this.service.$api_get_insertBulkStartCarInfo, params).subscribe((res) => { + // if(res) { + // this.service.msgSrv.success('确认发车成功!') + // } else{ + // this.service.msgSrv.error(res.msg) + // } + // }) } close(): void { 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 43d4f886..0270c2e9 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,22 +1,27 @@ - - + +
-

总运费:¥{{gross}}

-

运输费:¥{{transportation}},附加费:¥{{additional}}

+

+ 总运费:¥{{ totalPrice }} + (运输费:¥{{ tranPrice }},附加费:¥{{ otherPrice }}) +

+

+ +

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 9f4c2c12..2b203488 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-15 15:52:36 + * @LastEditTime: 2021-12-20 15:57:37 * @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 @@ -21,6 +21,7 @@ import { 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'; @Component({ selector: 'app-order-management-vehicle-update-freight', @@ -28,68 +29,140 @@ import { NzModalRef } from 'ng-zorro-antd/modal'; styleUrls: ['./update-freight.component.less'] }) export class VehicleUpdateFreightComponent implements OnInit { - record: any = {}; + record: any; i: any; @ViewChild('sf', { static: false }) sf!: SFComponent; schema: SFSchema = {}; ui: SFUISchema = {}; - data: any = {}; - constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient) {} + + totalPrice = 0; + tranPrice = 0; + otherPrice = 0; + + aggreechecked = false; + constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {} ngOnInit(): void { + this.i = { + prePay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'PRE')[0]?.price || 0, + toPay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'RECE')[0]?.price || 0, + oilCardPay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'OIL')[0]?.price || 0, + receiptPay: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'BACK')[0]?.price || 0, + prePayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'PRE')[0]?.paymentStatus, + toPayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'RECE')[0]?.paymentStatus, + oilCardPayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'OIL')[0]?.paymentStatus, + receiptPayStatus: this.record?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'BACK')[0]?.paymentStatus + }; + this.tranPrice = this.i.prePay + this.i.toPay + this.i.oilCardPay + this.i.receiptPay; + this.totalPrice = this.i.prePay + this.i.toPay + this.i.oilCardPay + this.i.receiptPay + this.otherPrice; this.initSF(); - - if (this.record.id > 0) this.http.get(`/user/${this.record.id}`).subscribe(res => (this.i = res)); - } - // 运输费 - get transportation () { - console.log(this.sf?.value) - const value = Number(this.sf?.value?.number || 0) + Number(this.sf?.value?.number2 || 0) + Number(this.sf?.value?.number3 || 0) - console.log( value ) - return value || 0 - } - // 总运费 - get gross () { - const value = Number(this.transportation || 0) + Number(this.transportation || 0) - console.log( value ) - return value || 0 - } - // 附加费 - get additional () { - return 100 + this.service.request(this.service.$api_get_getFreightChangeWholeDetail, { id: this.record.id}).subscribe((res) => { + console.log(res) + console.log(this.i) + console.log(this.tranPrice) + }) } initSF() { - this.schema= { + this.schema = { properties: { - number: { type: 'number',title: '预付' ,minimum: 1, maximum: 999999999, multipleOf: 1, ui: { widgetWidth: 200 } }, - number2: { type: 'number',title: '到付' ,minimum: 1, maximum: 999999999, multipleOf: 1, ui: { widgetWidth: 200 } }, - number3: { type: 'number',title: '回单付' ,minimum: 1, maximum: 999999999, multipleOf: 1, ui: { widgetWidth: 200 } }, - name3: { + prePay: { + type: 'number', + title: '预付', + default: 0.0, + readOnly: this.i.prePayStatus !== '3', + ui: { + prefix: '¥', + widgetWidth: 200, + precision: 2, + change: (val: any) => this.changeNumVal() + } as SFNumberWidgetSchema + }, + toPay: { + type: 'number', + title: '到付', + default: 0.0, + readOnly: this.i.toPayStatus !== '3', + ui: { + prefix: '¥', + widgetWidth: 200, + precision: 2, + change: (val: any) => this.changeNumVal() + } as SFNumberWidgetSchema + }, + // oilCardPay: { + // type: 'number', + // title: '油卡', + // default: 0.0, + // readOnly: this.i.oilCardPayStatus === '1' || this.i.oilCardPayStatus === '3', + // ui: { + // prefix: '¥', + // widgetWidth: 200, + // precision: 2, + // change: (val: any) => this.changeNumVal() + // } as SFNumberWidgetSchema + // }, + receiptPay: { + type: 'number', + title: '回单付', + default: 0.0, + readOnly: this.i.receiptPayStatus !== '3', + ui: { + prefix: '¥', + widgetWidth: 200, + precision: 2, + change: (val: any) => this.changeNumVal() + } as SFNumberWidgetSchema + }, + changeCause: { type: 'string', title: '变更原因', maxLength: 100, ui: { - widgetWidth: 300, - placeholder:"选填,最多不超过100字", widget: 'textarea', autosize: { minRows: 3, maxRows: 6 } } as SFTextareaWidgetSchema - }, + } }, - required: ['name3'], - type: 'object', + required: ['changeCause'] }; - this.ui = { '*': { spanLabelFixed: 100, grid: { span: 16,gutter:8 } } + this.ui = { + '*': { + spanLabelFixed: 100, + grid: { span: 16 } + } }; } save(value: any): void { - console.log(this.sf.value) - console.log(value) - console.log(this.data) - this.http.post(`/user/${this.record.id}`, value).subscribe(res => { - this.msgSrv.success('保存成功'); - this.modal.close(true); + const editItems = this.record?.mybidDetailInfo.filter((data: any) => data.receiptPayStatus === '3'); + editItems.forEach((item: any) => { + switch (item.expenseName) { + case '预付': + item.price = this.sf.value.prePay; + break; + case '到付': + item.price = this.sf.value.toPay; + break; + case '回单付': + item.price = this.sf.value.receiptPay; + break; + default: + break; + } }); + + const params = { + id: this.record?.id, + dtos: editItems, + changeCause: this.sf.value.changeCause + }; + + // this.service.request(this.service.$api_insertFreightChangeWhole, params).subscribe((res: any) => { + // if (res) { + // this.modal.destroy(); + // } else { + // this.service.msgSrv.error(res.msg); + // } + // }); } close(): void { @@ -97,8 +170,10 @@ export class VehicleUpdateFreightComponent implements OnInit { } /** * 更新数字框 - * @param value - * @param type + * */ - changeNumVal(value: any, type: number) {} + 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; + } } diff --git a/src/app/routes/order-management/services/order-management.service.ts b/src/app/routes/order-management/services/order-management.service.ts index 04b73b60..a1a41c1e 100644 --- a/src/app/routes/order-management/services/order-management.service.ts +++ b/src/app/routes/order-management/services/order-management.service.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-03 15:31:52 - * @LastEditTime: 2021-12-20 10:00:25 + * @LastEditTime: 2021-12-20 15:30:26 * @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 @@ -33,7 +33,18 @@ export class OrderManagementService extends BaseService { // 整车详情 $api_get_getWholeBillDetail = `/api/sdc/billOperate/getWholeBillDetail`; // 根据车牌号查询车辆信息 - $api_get_getCarLicenseListByCarNo= `/api/mdc/cuc/carLicenseAudit/operate/getCarLicenseListByCarNo`; + $api_get_getCarLicenseListByCarNo= `/api/mdc/cuc/carLicenseAudit/operate/getCarLicenseListByCarNo`; + + // 查询大宗订单列表 + $api_get_listBulkPage = `/api/sdc/billOperate/listBulkPage`; + // 查看运费变更记录详情-整车 + $api_get_getChangeRecordWholeDetail = `/api/sdc/billFreightChangeRecord/getChangeRecordWholeDetail`; + // 根据订单ID查看运费变更申请记录 + $api_get_listChangeApply = `/api/sdc/billFreightChangeApplication/listChangeApply`; + // 变更运费页面-整车-整车 + $api_get_getFreightChangeWholeDetail = `/api/sdc/billFreightChangeApplication/getFreightChangeWholeDetail`; + // 订单申请撤销 + $api_get_revokeChangeRecord = `/api/sdc/billFreightChangeApplication/revokeChangeRecord`; constructor(public injector: Injector) { super(injector) } diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.spec.ts b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.spec.ts deleted file mode 100644 index 96324a8c..00000000 --- a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; -import { SupplyManagementBulkDetailComponent } from './bulk-detail.component'; - -describe('SupplyManagementBulkDetailComponent', () => { - let component: SupplyManagementBulkDetailComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ SupplyManagementBulkDetailComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(SupplyManagementBulkDetailComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts deleted file mode 100644 index 3a845938..00000000 --- a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* - * @Author: your name - * @Date: 2021-12-03 11:10:14 - * @LastEditTime: 2021-12-13 15:24:41 - * @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\supply-management\components\bulk-detail\bulk-detail.component.ts - */ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { STColumn } from '@delon/abc/st'; -import { _HttpClient } from '@delon/theme'; -import { NzMessageService } from 'ng-zorro-antd/message'; -import { NzModalService } from 'ng-zorro-antd/modal'; -import { SupplyManagementAddDriversComponent } from '../add-drivers/add-drivers.component'; -import { SupplyManagementService } from '../../services/supply-management.service'; - -@Component({ - selector: 'app-supply-management-bulk-detail', - templateUrl: './bulk-detail.component.html', - styleUrls: ['./bulk-detail.component.less'] -}) -export class SupplyManagementBulkDetailComponent implements OnInit { - isVisibleView = false - id = this.route.snapshot.params.id; - i: any; - logColumns: STColumn[] = [ - { title: '内容', index: 'theme' }, - { title: '操作人', index: 'operationUserPhone' }, - { title: '操作时间', index: ' createTime' }, - ]; - columnsFloatView: STColumn[] = [ - { title: '司机姓名', index: 'theme' }, - { title: '手机号', index: 'operationUserPhone' }, - { title: '车队长', index: ' createTime' }, - { title: '车牌号', index: ' createTime' }, - ]; - driverColums: STColumn[] = [ - { title: '司机姓名', index: 'theme' }, - { title: '手机号', index: 'operationUserPhone' }, - { title: '车牌号', index: ' createTime' }, - { title: '承运次数', index: 'operationUserPhone' }, - { title: '承运数量', index: ' createTime' }, - { - title: '操作', - fixed: 'right', - width: '200px', - className: 'text-center', - buttons: [ - { - text: '移除', - click: (_record) => this.delDiver(_record), - }, - ], - }, - ]; - dataList: any; - constructor( - private route: ActivatedRoute, - private msgSrv: NzMessageService, - private service: SupplyManagementService, - private modal: NzModalService, - private router: Router,private ar: ActivatedRoute - ) { - - } - - ngOnInit(): void { - this.getDetailList(); - } - // 获取录单员 - getDetailList() { - const params = { - id: this.id - }; - this.service.request(`${this.service.$api_get_getBulkDetail}`, params).subscribe((res) => { - console.log(res) - this.dataList = res - }) - } - /** - * 移除司机 - */ - delDiver(item: any) { - const { id } = item; - this.modal.confirm({ - nzTitle: '删除确认', - nzContent: `请仔细核对,避免误操作!
是否删除?
`, - nzOnOk: () => { - // this.service.http.post(this.service.$api_del_driver, { id }).subscribe((res) => { - // if (res) { - // this.service.msgSrv.success('数据删除成功!'); - // // this.st1.reload(); - // } else { - // this.service.msgSrv.error('删除失败!'); - // } - // }); - }, - }); - } - - /** - * 指派熟车 - */ - assignedCar() { - const modalRef = this.modal.create({ - nzTitle: '指派熟车', - nzWidth: '90%', - nzContent: SupplyManagementAddDriversComponent, - nzComponentParams: { - i: this.i, - }, - nzFooter: null, - }); - } - - goBack() { - window.history.go(-1); - } - // 修改货源 - modification() { - this.router.navigate(['/supply-management/bulk-amend', this.id], { - queryParams: { - sta: 3 - }, - }) - } - // 再下一单 - nextOrder() { - this.router.navigate(['/supply-management/bulk-amend', this.id], { - queryParams: { - sta: 4 - }, - }) - } - - handleCancel() { - this.isVisibleView = false - } - handleOK() { - - } - NowAssign() { - this.isVisibleView = true - } -} diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail-old/vehicle-detail.component.html similarity index 69% rename from src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html rename to src/app/routes/supply-management/components/vehicle-detail-old/vehicle-detail.component.html index f3073e98..0accc6a0 100644 --- a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/supply-management/components/vehicle-detail-old/vehicle-detail.component.html @@ -17,7 +17,7 @@ @@ -48,6 +48,7 @@

装货地:{{item?.detailedAddress}}

联系人:{{item?.appUserName}}/{{item?.contractTelephone}}

发货日期:{{item?.createTime}}

+

卸货地:{{item?.detailedAddress}}

@@ -59,11 +60,10 @@
-

货物信息

+

货物信息

货物名称:{{item?.goodsName}}

货物数量:{{item?.weight}}吨/{{item?.volume}}立方

-

剩余:{{item?.weight}}吨/{{item?.volume}}立方

用车需求:{{item?.vehicleDemand}}

@@ -73,21 +73,25 @@

承运信息

网络货运人:{{dataList?.carrierInformationVO?.enterpriseInfoName}}

服务类型:{{dataList?.carrierInformationVO?.serviceType === 1 ? '抢单' : '指派'}}

-

当前指派

+

司机姓名:{{dataList?.carrierInformationVO?.driverName}}

+

手机号:{{dataList?.carrierInformationVO?.driverTelephone}}

+

车牌号:{{dataList?.carrierInformationVO?.driverLicensePlate}}

-

关联运单

-

待发车 ({{dataList?.goodsInfoList?.goodsName}})

-

运输中 ({{dataList?.goodsInfoList?.goodsName}})

-

待签收 ({{dataList?.goodsInfoList?.goodsName}})

-

已完成 ({{dataList?.goodsInfoList?.goodsName}})

-

已取消 ({{dataList?.goodsInfoList?.goodsName}})

+

服务信息

+

货物价值:{{dataList?.goodsInfoList?.goodsName}}

+

保价费金额:{{dataList?.goodsInfoList?.goodsName}}

补充信息

+

{{dataList?.supplementaryInformationVO?.stateReceipt === 2 ? '不需要回单' : '需要回单'}}

+

联系人:{{dataList?.supplementaryInformationVO?.receiptUserId}}

+

联系电话:{{dataList?.supplementaryInformationVO?.remarks}}

+

所在地区:{{dataList?.supplementaryInformationVO?.remarks}}

+

详细地址:{{dataList?.supplementaryInformationVO?.receiptAddress}}

备注:{{dataList?.supplementaryInformationVO?.remarks}}

@@ -96,15 +100,18 @@

运费信息

-

到货后15天内支付运费

-

以发货为准,保留小数

- +

预付:{{dataList?.shippingInformationVO?.prePay | currency: '¥' }}

+

油卡:{{dataList?.shippingInformationVO?.oilCardPay | currency: '¥'}}

+

到付:{{dataList?.shippingInformationVO?.toPay | currency: '¥'}}

+

回单付:{{dataList?.shippingInformationVO?.receiptPay | currency: '¥'}}

+

保险费:{{dataList?.shippingInformationVO?.insuranceFee | currency: '¥'}}

+

附加费保险费:{{dataList?.shippingInformationVO?.appendFee | currency: '¥'}}

-

{{dataList?.freightPrice }}元/吨

+

{{dataList?.shippingInformationVO?.totalFee | currency: '¥' }}

@@ -116,19 +123,4 @@ - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.less b/src/app/routes/supply-management/components/vehicle-detail-old/vehicle-detail.component.less similarity index 100% rename from src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.less rename to src/app/routes/supply-management/components/vehicle-detail-old/vehicle-detail.component.less diff --git a/src/app/routes/supply-management/components/vehicle-detail-old/vehicle-detail.component.spec.ts b/src/app/routes/supply-management/components/vehicle-detail-old/vehicle-detail.component.spec.ts new file mode 100644 index 00000000..eae95066 --- /dev/null +++ b/src/app/routes/supply-management/components/vehicle-detail-old/vehicle-detail.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { SupplyManagementVehicleDetailComponent } from './vehicle-detail.component'; + +describe('SupplyManagementVehicleDetailComponent', () => { + let component: SupplyManagementVehicleDetailComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ SupplyManagementVehicleDetailComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SupplyManagementVehicleDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/supply-management/components/vehicle-detail-old/vehicle-detail.component.ts b/src/app/routes/supply-management/components/vehicle-detail-old/vehicle-detail.component.ts new file mode 100644 index 00000000..bd2a83c0 --- /dev/null +++ b/src/app/routes/supply-management/components/vehicle-detail-old/vehicle-detail.component.ts @@ -0,0 +1,80 @@ +/* + * @Author: your name + * @Date: 2021-12-03 11:10:14 + * @LastEditTime: 2021-12-09 20:54:28 + * @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\supply-management\components\vehicle-detail\vehicle-detail.component.ts + */ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn } from '@delon/abc/st'; +import { _HttpClient } from '@delon/theme'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { SupplyManagementService } from '../../services/supply-management.service'; + +@Component({ + selector: 'app-supply-management-vehicle-detail', + templateUrl: './vehicle-detail.component.html', + styleUrls: ['./vehicle-detail.component.less'] +}) +export class SupplyManagementVehicleDetailComponentOld implements OnInit { + + id = this.route.snapshot.params.id; + i: any; + dataList: any; + logColumns: STColumn[] = [ + { title: '内容', index: 'theme' }, + { title: '操作人', index: 'operationUserPhone' }, + { title: '操作时间', index: ' createTime' }, + ]; + + constructor( + private route: ActivatedRoute, + private msgSrv: NzMessageService, + private service: SupplyManagementService, + private router: Router,private ar: ActivatedRoute + ) { + + } + + ngOnInit(): void { + console.log(this.id) + if(this.id) { + this.getDetailList(this.id) + } + } + + // 获取录单员 + getDetailList(id: any) { + const params = { + id: id + }; + this.service.request(`${this.service.$api_get_getCompleteVehicleDetail}`, params).subscribe((res) => { + console.log(res) + this.dataList = res + }) + } + // 修改货源 + modification() { + this.router.navigate(['/supply-management/vehicle-amend', this.id], { + queryParams: { + sta: 1 + }, + }) + } + // 再下一单 + nextOrder() { + this.router.navigate(['/supply-management/vehicle-amend', this.id], { + queryParams: { + sta: 2 + }, + }) + } + + + + goBack() { + window.history.go(-1); + } +} diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html index 0accc6a0..e3eebd6d 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html @@ -1,126 +1,168 @@ - - - - - - -
-
- - {{ dataList?.resourceCode }} - - 待接单 - 已接单 - 已取消 - - -
- 修改货源 - 取消货源 - 再下一单 +
+ + + + + +
+ +

货源编码 : {{ i?.resourceCode }}

+
+
+
网络货运人:{{i?.carrierInformationVO?.enterpriseInfoName}}
+
+ + + + +
+
+
+
+ 总费用:{{totalExpensePrice | currency}} +
+
+ +
+ {{ i?.externalResourceCode }} + {{i?.enterpriseProjectId}} + {{i?.createUserId}} + {{i?.dispatchName}} 18100000000 + {{i?.serviceTypeLabel}} +
+
+
+ +
+
+ + + + + +
+
+
+ +
+
+
+
+
+
+
+

装货地:{{item?.province}}{{item?.city}}{{item?.area}}{{item.detailedAddress}}

+

联系人:{{item?.appUserName}}/{{item?.contractTelephone}}

+
+
- - +

装货时间:{{i?.loadingTime}}

+
+
+
+
+
+
+
+
+

卸货地:{{item?.province}}{{item?.city}}{{item?.area}}{{item?.detailedAddress}}

+

联系人:{{item?.appUserName}}/{{item?.contractTelephone}}

+
+
+
+

卸货时间:{{i?.unloadingTime}}

+
+
-
- - - - -
-
- -
- {{ dataList?.enterpriseProjectId }} - {{ dataList?.externalResourceCode }} - {{ dataList?.enterpriseProjectId }} - {{ dataList?.dispatchName }} -
- -
-
-
-
-

装卸货信息

-
-

装货地:{{item?.detailedAddress}}

-

联系人:{{item?.appUserName}}/{{item?.contractTelephone}}

-

发货日期:{{item?.createTime}}

+ -
-
-

卸货地:{{item?.detailedAddress}}

-

联系人:{{item?.appUserName}}/{{item?.contractTelephone}}

-

卸货日期:{{item?.modifyTime}}

+ + + 货物信息 + + + {{item.goodsName}} + + + {{item.weight}}顿,{{item.volume}}方,{{item.number}}件 + + + + + 承运信息 + + {{i?.carrierInformationVO?.driverName}} + + + {{i?.carrierInformationVO?.driverTelephone}} + + + {{i?.carrierInformationVO?.driverLicensePlate}} + + + + + + + + {{i?.carrierInformationVO?.serviceTypeLabel}} + + + {{i?.goodsValue}} + + + {{i?.insuranceAmount |currency}} 元 + + + + + + +
+ {{(item.price * item.rate) | currency}} + (含附加费)
-
-
-
-
-
-
-

货物信息

-

货物名称:{{item?.goodsName}}

-

货物数量:{{item?.weight}}吨/{{item?.volume}}立方

-

用车需求:{{item?.vehicleDemand}}

-
-
-
-
-
-

承运信息

-

网络货运人:{{dataList?.carrierInformationVO?.enterpriseInfoName}}

-

服务类型:{{dataList?.carrierInformationVO?.serviceType === 1 ? '抢单' : '指派'}}

-

司机姓名:{{dataList?.carrierInformationVO?.driverName}}

-

手机号:{{dataList?.carrierInformationVO?.driverTelephone}}

-

车牌号:{{dataList?.carrierInformationVO?.driverLicensePlate}}

-
-
-
-
-

服务信息

-

货物价值:{{dataList?.goodsInfoList?.goodsName}}

-

保价费金额:{{dataList?.goodsInfoList?.goodsName}}

-
-
-
-

补充信息

-

{{dataList?.supplementaryInformationVO?.stateReceipt === 2 ? '不需要回单' : '需要回单'}}

-

联系人:{{dataList?.supplementaryInformationVO?.receiptUserId}}

-

联系电话:{{dataList?.supplementaryInformationVO?.remarks}}

-

所在地区:{{dataList?.supplementaryInformationVO?.remarks}}

-

详细地址:{{dataList?.supplementaryInformationVO?.receiptAddress}}

-

备注:{{dataList?.supplementaryInformationVO?.remarks}}

-
-
- -
-
-

运费信息

-
-

预付:{{dataList?.shippingInformationVO?.prePay | currency: '¥' }}

-

油卡:{{dataList?.shippingInformationVO?.oilCardPay | currency: '¥'}}

-

到付:{{dataList?.shippingInformationVO?.toPay | currency: '¥'}}

-

回单付:{{dataList?.shippingInformationVO?.receiptPay | currency: '¥'}}

-

保险费:{{dataList?.shippingInformationVO?.insuranceFee | currency: '¥'}}

-

附加费保险费:{{dataList?.shippingInformationVO?.appendFee | currency: '¥'}}

-
-
- -
+ + +
-

{{dataList?.shippingInformationVO?.totalFee | currency: '¥' }}

+

+ + + {{totalExpensePrice | currency}} + + (运费¥3500.00含附加运费¥191.98) +

-
-
- -
- - - - -
- \ No newline at end of file + + + + + {{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}} + + + {{i?.supplementaryInformationVO?.receiptTypeLabel}} + + + {{i?.supplementaryInformationVO?.area}} + + + {{i?.supplementaryInformationVO?.address}} + + + {{i?.supplementaryInformationVO?.remarks}} + + + + + + + +
diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.less b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.less index a1566606..e963d1b7 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.less +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.less @@ -1,37 +1,84 @@ -:host{ - .btn-size{ - font-size: 14px; +:host { + .source-info { + min-height: 210px; + + p { + margin-bottom: .5em; } - .bdr{ - border-right: 1px solid #ccc; + } + + .btn-size { + font-size: 14px; + } + + .bdr { + border-right: 1px solid #ccc; + } + + .bdl { + border-left: 1px solid #ccc; + } + + .title { + font-weight: bold; + font-size: 26; + } + + .freight-info-box { + width: 95%; + + p { + margin-bottom: 5px; } - .bdl{ - border-left: 1px solid #ccc; + } + + .freigth-label { + display: inline-block; + width: 50px; + text-align: right; + } + + ::ng-deep { + .approval-status { + .ant-steps { + width: 70%; + margin: 0 auto; + } } - .title{ - font-size: 26; - font-weight: bold; - } - .source-info{ - p{ - margin-bottom: .5em; - } - } - .freight-info-box{ - width: 95%; - } - .freigth-label{ - display: inline-block; - width: 50px; - text-align: right; + } + + .handling-info { + min-height: 176px; + border: 1px solid #ccc; + + .loading-row { + display: flex; } - ::ng-deep{ - .approval-status{ - .ant-steps{ - width: 70%; - margin: 0 auto; - } - } + .handling-info-icon { + width: 32px; + height: 32px; + margin-right: 24px; + color: #fff; + line-height: 32px; + text-align: center; + border-radius: 50%; + + &.loading-bg { + background-color: #50D4AB; + } + + &.unloaing-bg { + background: #F66F6A; + } } -} \ No newline at end of file + + .info { + flex: 1; + } + + .time-info { + margin-left: 56px; + } + } +} diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.spec.ts b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.spec.ts index eae95066..cb740ab1 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.spec.ts +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.spec.ts @@ -7,9 +7,9 @@ describe('SupplyManagementVehicleDetailComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ SupplyManagementVehicleDetailComponent ] + declarations: [SupplyManagementVehicleDetailComponent] }) - .compileComponents(); + .compileComponents(); })); beforeEach(() => { diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts index 93ba23ac..a223044f 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts @@ -1,17 +1,12 @@ -/* - * @Author: your name - * @Date: 2021-12-03 11:10:14 - * @LastEditTime: 2021-12-09 20:54:28 - * @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\supply-management\components\vehicle-detail\vehicle-detail.component.ts - */ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STColumn } from '@delon/abc/st'; import { _HttpClient } from '@delon/theme'; import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; import { SupplyManagementService } from '../../services/supply-management.service'; +import { SupplyManagementAssignedCarComponent } from '../assigned-car/assigned-car.component'; +import { SupplyManagementUpdateExternalSnComponent } from '../update-external-sn/update-external-sn.component'; @Component({ selector: 'app-supply-management-vehicle-detail', @@ -22,59 +17,144 @@ export class SupplyManagementVehicleDetailComponent implements OnInit { id = this.route.snapshot.params.id; i: any; - dataList: any; logColumns: STColumn[] = [ { title: '内容', index: 'theme' }, { title: '操作人', index: 'operationUserPhone' }, { title: '操作时间', index: ' createTime' }, ]; + serviceType: any = { + 1: '抢单', + 2: '指派' + } + status: any = { 1: '待接单', 2: '已接单', 3: '已取消' }; + totalExpensePrice = 0; + expenseColumns: STColumn[] = [ + { + title: '款项', + width: '150px', + className: 'text-center', + index: 'expenseName' + }, + { + title: '总费用(元)', + width: '150px', + className: 'text-center', + render: 'total' + }, + { + title: '协议金额(元)', + width: '150px', + className: 'text-center', + index: 'price' + }, + ]; constructor( private route: ActivatedRoute, private msgSrv: NzMessageService, private service: SupplyManagementService, - private router: Router,private ar: ActivatedRoute + public modal: NzModalService, + public router: Router ) { } ngOnInit(): void { - console.log(this.id) - if(this.id) { - this.getDetailList(this.id) - } + this.getGoodsSourceDetail() } - // 获取录单员 - getDetailList(id: any) { - const params = { - id: id - }; - this.service.request(`${this.service.$api_get_getCompleteVehicleDetail}`, params).subscribe((res) => { - console.log(res) - this.dataList = res + getGoodsSourceDetail() { + this.service.request(this.service.$api_get_getCompleteVehicleDetail, { id: this.id }).subscribe(res => { + const expenseList = res?.expenseList || []; + this.totalExpensePrice = 0; + expenseList.forEach((e: any) => { + this.totalExpensePrice += e?.price * e?.rate; + }); + this.i = { ...res, totalExpensePrice: this.totalExpensePrice }; + }) } - // 修改货源 - modification() { - this.router.navigate(['/supply-management/vehicle-amend', this.id], { + /** + * 修改货源 + */ + updateGoodsSource(record: any) { + this.router.navigate(['./pbg/onecar-publish'], { queryParams: { - sta: 1 - }, + id: record?.id, + type: 'edit' + } }) } - // 再下一单 - nextOrder() { - this.router.navigate(['/supply-management/vehicle-amend', this.id], { + + /** + * 取消货源 + */ + cancleGoodsSource() { + this.modal.confirm({ + nzTitle: '确定取消货源吗?', + nzContent: `取消后不可恢复,谨慎操作`, + nzOnOk: () => + this.service.msgSrv.success('操作成功!') + // this.service.request(this.service.$api_cancle_goods_source, { id: this.i.id }).subscribe((res) => { + // if (res === true) { + // this.service.msgSrv.success('操作成功!'); + // this.getGoodsSourceDetail(); + // } + // }), + }) + } + + /** + *再下一单 + * @param record + */ + placeOrder(record: any) { + this.router.navigate(['./pbg/onecar-publish'], { queryParams: { - sta: 2 - }, + id: record?.id, + type: 'add' + } }) } + /** + * 编辑外部货源号 + * @param item st当前行对象 + */ + editEnternalSn(item: any) { + const modalRef = this.modal.create({ + nzWidth: '400px', + nzContent: SupplyManagementUpdateExternalSnComponent, + nzComponentParams: { + orderObject: item, + }, + nzFooter: null, + nzClosable: false + }); + } + /** + * 重新指派 + */ + assignedCar(item: any) { + const modalRef = this.modal.create({ + nzTitle: '指派熟车', + nzWidth: '1200px', + nzContent: SupplyManagementAssignedCarComponent, + nzComponentParams: { + i: item, + }, + nzFooter: null, + }); + modalRef.afterClose.subscribe((result) => { + if (result) { + this.getGoodsSourceDetail(); + } + }); + } goBack() { window.history.go(-1); } + } 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 22c6a8d1..1a7f44a1 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -83,13 +83,13 @@ export class SupplyManagementVehicleComponent implements OnInit { } as SFSelectWidgetSchema, }, goodsName: { - type: 'string', title: '货物名称', - + type: 'string', + default: '', ui: { - widget: 'dict-select', - // params: { dictKey: 'GoodsName' }, - placeholder: '请选择', + widget: 'select', + // asyncData: () =>[] + } as SFSelectWidgetSchema, }, loadingPlace: { @@ -280,7 +280,7 @@ export class SupplyManagementVehicleComponent implements OnInit { { text: '取消货源', // iif: item => item.auditStatus === 1 || item.auditStatus === 2, - // click: (_record) => this.delOne(_record), + click: (_record) => this.cancleGoodsSource(_record), }, { text: '再下一单', @@ -288,7 +288,7 @@ export class SupplyManagementVehicleComponent implements OnInit { }, { text: '重新指派', - click: (_record) => this.assignedCar(_record), + // click: (_record) => this.assignedCar(_record), // iif: item => item.auditStatus === 2, }, ], @@ -431,6 +431,23 @@ export class SupplyManagementVehicleComponent implements OnInit { }, }) } + /** + * 取消货源 + */ + cancleGoodsSource(record: any) { + this.modal.confirm({ + nzTitle: '确定取消货源吗?', + nzContent: `取消后不可恢复,谨慎操作`, + nzOnOk: () => + this.service.request(this.service.$api_cancle_goods_source, [record.id]).subscribe((res) => { + if (res === true) { + this.service.msgSrv.success('操作成功!'); + this.st?.reload(); + this.getGoodsSourceStatistical(); + } + }), + }) + } // 获取货源状态统计 getGoodsSourceStatistical() { this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 1 }).subscribe(res => { diff --git a/src/app/routes/supply-management/services/supply-management.service.ts b/src/app/routes/supply-management/services/supply-management.service.ts index 75f53f67..277c0c3c 100644 --- a/src/app/routes/supply-management/services/supply-management.service.ts +++ b/src/app/routes/supply-management/services/supply-management.service.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-03 11:10:14 - * @LastEditTime: 2021-12-14 20:09:41 + * @LastEditTime: 2021-12-20 14:26:54 * @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\supply-management\services\supply-management.service.ts @@ -13,6 +13,8 @@ import { BaseService } from 'src/app/shared/services'; providedIn: 'root' }) export class SupplyManagementService extends BaseService { + // 取消货源 + $api_cancle_goods_source = `/api/sdc/goodsResourceOperate/cancelSource`; // 整车获取货源表详情 $api_get_getCompleteVehicleDetail = `/api/sdc/goodsResourceOperate/getWholeDetail`; // 大宗获取货源表详情 diff --git a/src/app/routes/supply-management/supply-management-routing.module.ts b/src/app/routes/supply-management/supply-management-routing.module.ts index 0f8c3ce9..ba93122e 100644 --- a/src/app/routes/supply-management/supply-management-routing.module.ts +++ b/src/app/routes/supply-management/supply-management-routing.module.ts @@ -1,8 +1,8 @@ /* * @Author: your name * @Date: 2021-12-03 11:10:14 - * @LastEditTime: 2021-12-06 13:51:59 - * @LastEditors: your name + * @LastEditTime: 2021-12-20 13:38:33 + * @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\supply-management\supply-management-routing.module.ts */ @@ -11,7 +11,6 @@ import { RouterModule, Routes } from '@angular/router'; import { SupplyManagementIndexComponent } from './components/index/index.component'; import { SupplyManagementBulkComponent } from './components/bulk/bulk.component'; import { SupplyManagementVehicleComponent } from './components/vehicle/vehicle.component'; -import { SupplyManagementBulkDetailComponent } from './components/bulk-detail/bulk-detail.component'; import { SupplyManagementVehicleDetailComponent } from './components/vehicle-detail/vehicle-detail.component'; import { SupplyManagementAddDriversComponent } from './components/add-drivers/add-drivers.component'; import { SupplyManagementOnecarPublishComponent } from './components/onecar-publish/onecar-publish.component'; @@ -19,7 +18,7 @@ import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/ const routes: Routes = [ { path: 'index', component: SupplyManagementIndexComponent }, - { path: 'bulk-detail/:id', component: SupplyManagementBulkDetailComponent }, + // { path: 'bulk-detail/:id', component: SupplyManagementBulkDetailComponent }, { path: 'vehicle-detail/:id', component: SupplyManagementVehicleDetailComponent }, { path: 'add-drivers', component: SupplyManagementAddDriversComponent }, { path: 'vehicle-amend/:id', component: SupplyManagementOnecarPublishComponent }, diff --git a/src/app/routes/supply-management/supply-management.module.ts b/src/app/routes/supply-management/supply-management.module.ts index c7d1458d..5d72caf9 100644 --- a/src/app/routes/supply-management/supply-management.module.ts +++ b/src/app/routes/supply-management/supply-management.module.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-03 11:10:14 - * @LastEditTime: 2021-12-14 20:40:01 + * @LastEditTime: 2021-12-20 13:38:26 * @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\supply-management\supply-management.module.ts @@ -17,7 +17,6 @@ import { SupplyManagementUpdateFreightComponent } from './components/update-frei import { SupplyManagementAssignedCarComponent } from './components/assigned-car/assigned-car.component'; import { SupplyManagementQrcodePageComponent } from './components/qrcode-page/qrcode-page.component'; import { SupplyManagementUpdateExternalSnComponent } from './components/update-external-sn/update-external-sn.component'; -import { SupplyManagementBulkDetailComponent } from './components/bulk-detail/bulk-detail.component'; import { SupplyManagementVehicleDetailComponent } from './components/vehicle-detail/vehicle-detail.component'; import { SupplyManagementAddDriversComponent } from './components/add-drivers/add-drivers.component'; import { SupplyManagementOnecarPublishComponent } from './components/onecar-publish/onecar-publish.component'; @@ -28,6 +27,7 @@ import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/ import { PublishAddressListComponent } from './components/onecar-publish/address-list/address-list.component'; import { PublishSuccessComponent } from './components/onecar-publish/publish-success/publish-success.component'; + const COMPONENTS: Type[] = [ SupplyManagementIndexComponent, SupplyManagementBulkComponent, @@ -37,7 +37,6 @@ const COMPONENTS: Type[] = [ SupplyManagementAssignedCarComponent, SupplyManagementQrcodePageComponent, SupplyManagementUpdateExternalSnComponent, - SupplyManagementBulkDetailComponent, SupplyManagementVehicleDetailComponent, SupplyManagementAddDriversComponent, SupplyManagementOnecarPublishComponent, diff --git a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html index eb663fcd..9e71aa21 100644 --- a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html @@ -1,7 +1,7 @@ +
+

{{ item?.price| currency: '¥' }}

+
+
-
货主支付
- 司机运输费22 - 1000.00 - 未支付 -
-
- 附加费 - 1000.00 - 未支付 +
货主支付
+
+

{{ item?.price| currency: '¥' }}

+
@@ -149,4 +148,13 @@
- \ No newline at end of file + + + + + + + + + + diff --git a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts index 4d433df5..4be84cd0 100644 --- a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-03 15:31:52 - * @LastEditTime: 2021-12-17 14:38:14 + * @LastEditTime: 2021-12-20 13:55: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\components\vehicle-detail\vehicle-detail.component.ts @@ -12,7 +12,7 @@ import { STColumn } from '@delon/abc/st'; import { _HttpClient } from '@delon/theme'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; -import { SupplyManagementService } from '../../services/waybill-management.service'; +import { WaybillManagementServe } from '../../services/waybill-management.service'; @Component({ selector: 'app-supply-management-vehicle-detail', templateUrl: './vehicle-detail.component.html', @@ -21,7 +21,9 @@ import { SupplyManagementService } from '../../services/waybill-management.servi export class WaybillManagementVehicleDetailComponent implements OnInit { id = this.route.snapshot.params.id; + isVisible = false; i: any; + imges: any; logColumns: STColumn[] = [ { title: '时间', index: 'operationUserPhone' }, { title: '地点', index: ' createTime' }, @@ -31,7 +33,7 @@ export class WaybillManagementVehicleDetailComponent implements OnInit { constructor( private route: ActivatedRoute, private msgSrv: NzMessageService, - private service: SupplyManagementService, + private service: WaybillManagementServe, private modalService: NzModalService ) { @@ -65,5 +67,24 @@ export class WaybillManagementVehicleDetailComponent implements OnInit { goBack() { window.history.go(-1); } - +handleCancel() { + this.isVisible = false +} +handleOK() { + this.isVisible = false +} +agreement(value: any) { + console.log('123') + console.log(value) + if(value === '1') { + this.imges = this.i?.supplementAgreement + } else if (value === '2') { + this.imges = this.i?.loadingCertificate + } else if (value === '3') { + this.imges = this.i?.unLoadingCertificate + } else if (value === '4') { + this.imges = this.i?.receiptCertificate + } + this.isVisible = true; +} } 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 a843e7cc..33c951b7 100644 --- a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts @@ -6,7 +6,7 @@ import { ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { of } from 'rxjs'; import { map } from 'rxjs/operators'; -import { SupplyManagementService } from '../../services/waybill-management.service'; +import { WaybillManagementServe } from '../../services/waybill-management.service'; @Component({ @@ -51,7 +51,7 @@ tabs = { receivedQuantity: 0, stayQuantity: 0 }; - constructor(public service: SupplyManagementService, private modal: NzModalService, public service2: ShipperBaseService) { } + constructor(public service: WaybillManagementServe, private modal: NzModalService, public service2: ShipperBaseService) { } /** * 查询参数 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 68817659..894775db 100644 --- a/src/app/routes/waybill-management/services/waybill-management.service.ts +++ b/src/app/routes/waybill-management/services/waybill-management.service.ts @@ -1,3 +1,4 @@ +import { WaybillManagementBulkComponent } from './../components/bulk/bulk.component'; /* * @Author: your name * @Date: 2021-12-07 14:52:29 @@ -12,7 +13,7 @@ import { BaseService } from 'src/app/shared/services'; @Injectable({ providedIn: 'root' }) -export class SupplyManagementService extends BaseService { +export class WaybillManagementServe extends BaseService { $api_get_catalogue_member = `/user?_allow_anonymous=true`; $api_del_driver = ``; @@ -35,6 +36,10 @@ export class SupplyManagementService extends BaseService { // 根据车牌号查询车辆信息 $api_get_getCarLicenseListByCarNo= `/api/mdc/cuc/carLicenseAudit/operate/getCarLicenseListByCarNo`; + + // 大宗确认发车 + $api_get_insertBulkStartCarInfo= `/api/sdc/wayBillOperate/insertBulkStartCarInfo`; + constructor(public injector: Injector) { super(injector) } diff --git a/src/app/shared/utils/date.util.ts b/src/app/shared/utils/date.util.ts index 51e9cdb6..f5a7ab35 100644 --- a/src/app/shared/utils/date.util.ts +++ b/src/app/shared/utils/date.util.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-11-29 10:04:12 - * @LastEditTime: 2021-12-15 20:50:49 + * @LastEditTime: 2021-12-20 16:55: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\shared\utils\date.util.ts @@ -67,6 +67,8 @@ export class EADateUtil { * @returns YYYY-MM-DD 00:00:00 */ static yearToDateTime(start: Date): number { + console.log('222') + console.log(start) let Dates : any=''; if(typeof(start) !== 'string') { var c = new Date(start);