diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html new file mode 100644 index 00000000..5ba369fa --- /dev/null +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html @@ -0,0 +1,377 @@ + + + + + + + + + + 订单号: {{ i?.billCode }} + + + + 取消修改 + 保存修改 + + + + + + {{ i?.goodsResource?.[0]?.shipperAppUserName }} + {{i?.goodsResource?.[0]?.enterpriseProjectName}} + {{i?.goodsResource?.[0]?.serviceTypeLabel}} + {{i?.goodsResource?.[0]?.dispatchName}} 18100000000 + {{i?.goodsResource?.[0]?.dispatchName}} + + + 状态 + {{i?.billStatusLabel}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 装卸货信息预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时 + + + + + + 装货地 + + + + + + + + + + + 联系人 + + + + + + + + + + + + + + + + + + 卸货地 + + + + + + + + + + + 联系人 + + + + + + + + + + + + + 计划装货时间:{{i?.loadPlanTime}} + + + 计划卸货时间:{{i?.unloadPlanTime}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{i?.goodsInfoList?.[0]?.maxWeightLabel}}/{{i?.goodsInfoList?.[0]?.maxCubeLabel}} + + + + {{i?.driverId}} + + + + {{i?.goodsInfoList?.[0]?.weight}}顿,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 + + + + + + + + + + + + + + + + + + + + + 总计:{{i?.total | currency: '¥'}}(运费¥3500.00,附加运费¥191.98,附加费率3.5%) + 收款人: + + + + + + + + + + + + + 查看附件 + 补充协议 + + + + + + + + + + {{i?.goodsResource?.stateReceipt ?'是':'否'}} + + + {{i?.goodsResource?.receiptTypeLabel}} + + + {{i?.goodsResource?.receiptUserId}} / {{i?.supplementaryInformationVO?.phon}} + + + {{i?.goodsResource?.receiptAddress}} + + + {{i?.goodsResource?.receiptAddress}} + + + + + + + + 请上传图片 + + + + + + + + + + {{i?.goodsResource?.remarks}} + + + + + + + + + + + + + + + + + + + + + + + + 取消 + 确定 + + \ No newline at end of file diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.less b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.less new file mode 100644 index 00000000..0eb3feb0 --- /dev/null +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.less @@ -0,0 +1,86 @@ +:host { + .btn-size { + font-size: 14px; + } + + .bdr { + border-right: 1px solid #ccc; + } + + .bdl { + border-left: 1px solid #ccc; + } + + .source-info { + p { + margin-bottom: .5em; + } + } + + .freight-info-box { + width: 95%; + } + + .freigth-label { + display : inline-block; + width : 50px; + text-align: right; + } + + ::ng-deep { + .approval-status { + .ant-steps { + width : 70%; + margin: 0 auto; + } + } + + .ant-tabs-top>.ant-tabs-nav, + .ant-tabs-bottom>.ant-tabs-nav, + .ant-tabs-top>div>.ant-tabs-nav, + .ant-tabs-bottom>div>.ant-tabs-nav { + margin: 0; + } + + .ant-anchor-ink::before { + width: 0; + } + + .ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab, + .ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab, + .ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab, + .ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab { + margin-left: 40px + } + } + + .leftPadding { + padding-right: 100px; + } + + .tip-font { + margin-left: 16px; + font-weight: 500; + font-size : 12px; + } + + .card-title { + margin-bottom: 24px; + font-weight : bold; + font-size : 16px; + } + + .align-center { + display : flex; + align-items : center; + justify-content: center; + } + + #container { + width : 300px; + height: 180px; + } + .ant-col-10 { + flex: none; + } +} \ No newline at end of file diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.spec.ts b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.spec.ts new file mode 100644 index 00000000..94efd41a --- /dev/null +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { OrderManagementBulkDetailChangeComponent } from './bulk-detail-change.component'; + +describe('OrderManagementBulkDetailChangeComponent', () => { + let component: OrderManagementBulkDetailChangeComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ OrderManagementBulkDetailChangeComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(OrderManagementBulkDetailChangeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 00000000..ad3f9ac3 --- /dev/null +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts @@ -0,0 +1,752 @@ +import { ViewChild } from '@angular/core'; +/* + * @Author: your name + * @Date: 2021-12-03 15:31:52 + * @LastEditTime: 2021-12-24 17:49:31 + * @LastEditors: Please set LastEditors + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\app\routes\order-management\components\vehicle-detail\vehicle-detail.component.ts + */ +import { Component, OnInit } from '@angular/core'; +import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form'; +import { _HttpClient } from '@delon/theme'; +import { AmapPoiPickerComponent, AmapService, EAEnvironmentService, ShipperBaseService } from '@shared'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload'; +import { Observable, Observer } from 'rxjs'; +import { apiConf } from '@conf/api.conf'; +import { OrderManagementService } from '../../services/order-management.service'; +function getBase64(file: File): Promise { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve(reader.result); + reader.onerror = error => reject(error); + }); +} +@Component({ + selector: 'app-supply-management-bulk-detail-change', + templateUrl: './bulk-detail-change.component.html', + styleUrls: ['./bulk-detail-change.component.less'] +}) +export class OrderManagementBulkDetailChangeComponent implements OnInit { + validateForm1: FormGroup; + id = this.route.snapshot.params.id; + @ViewChild('distannce3', { static: false }) + i: any= {unLoadingPlaceList:[]}; + logColumns: STColumn[] =[] + totalDistance = 0.0; //总里程 + totalTime = 0.0; //路程总时间 + startInfo: any = []; // 装货信息 + endInfo: any = []; // 卸货信息 + unloadTime: any; // 货源单设置回显 +loadTime: any; // 货源单设置回显 + sf3data: any; // 货源单设置回显 + sf4data: any; // 货源单设置回显 + dirverPhone: any; // 货源单设置回显 + dirverBankCard: any; // 货源单设置回显 + listImagUrls: any[] = []; // 货源单设置回显 + dirvingMessage = []; + imges: any; + previewImage1 = ''; + previewVisible1 = false; + @ViewChild('sf3', { static: false }) sf3!: SFComponent; + schema3: SFSchema = {}; + ui3!: SFUISchema; + @ViewChild('st') st!: STComponent; + @ViewChild('sf4', { static: false }) sf4!: SFComponent; + schema4: SFSchema = {}; + isVisible = false; + ui4!: SFUISchema; + formData: any; + @ViewChild('sf', { static: false }) sf!: SFComponent; + schema: SFSchema = {}; + ui: SFUISchema = {}; + constructor( + private route: ActivatedRoute, + private router: Router, + private msgSrv: NzMessageService, + public service: OrderManagementService, + private modalService: NzModalService, + private amapService: AmapService, + public service2: ShipperBaseService, + fb: FormBuilder, + private envSrv: EAEnvironmentService, + ) { + this.validateForm1 = fb.group({ + loadTime: [null, []], + unloadTime: [null, []], + }); + } + + ngOnInit(): void { + console.log(this.id) + this.initST(); + this.initSF(); + this.initSF3(); + this.initSF4(); + this.initData() + } + initSF() { + this.schema = { + properties: { + loadingLadingBillFilePath: { + 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', + } as SFUploadWidgetSchema, + }, + loadingPeopleVehiclesGoodsFilePath: { + 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', + } as SFUploadWidgetSchema, + }, + no4: { + type: 'string', + title: '', + ui: { + widget: 'text', + }, + default: '', + }, + unloadingLadingBillFilePath: { + 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', + } as SFUploadWidgetSchema, + }, + unloadingPeopleVehiclesGoodsFilePath: { + 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', + } as SFUploadWidgetSchema, + }, + no5: { + type: 'string', + title: '', + ui: { + widget: 'text', + }, + default: '', + }, + no6: { + type: 'string', + title: '', + ui: { + widget: 'text', + }, + default: '', + }, + }, + required: ['loadingLadingBillFilePath','unloadingLadingBillFilePath'] + }; + this.ui = { + '*': { + spanLabelFixed: 100, + grid: { span: 20 } + }, + $unloadingLadingBillFilePath: { grid: { span: 12} }, + $unloadingPeopleVehiclesGoodsFilePath: { grid: { span: 12} }, + $loadingLadingBillFilePath: { grid: { span: 12} }, + $loadingPeopleVehiclesGoodsFilePath: { grid: { span: 12} }, + $no5: { grid: { span: 24} }, + }; + } + initData() { + this.service.request(this.service.$api_set_getBulkOrderDetail, {id: this.id}).subscribe(res => { + console.log(res) + if (res) { + this.i = res; + // 对装货凭证进行初始化 + let arr : any= [] + res?.receiptFilePath.forEach((element: any, index: any) => { + console.log(index) + arr.push( { + url: element, + status: 'done', + uid: index + }) + }); + this.listImagUrls = arr; + this.sf4data = res?.goodsInfoList?.[0] + // 对装卸货信息进行初始化 + res?.unLoadingPlaceList.forEach((element: any) => { + if(element.type === 1 || element.type === '1') { + const controlId = this.startInfo.length; + this.startInfo.push({ + detailedAddress: element.detailedAddress, + appUserName: element.appUserName, + contractTelephone: element.contractTelephone, + latitude: element.latitude, + longitude: element.longitude, + province: element.province, + city: element.city, + area: element.area, + type: element.type, + id: element.id + }) + this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required)); + } else if(element.type === 2 || element.type === '2') { + const controlId = this.endInfo.length; + this.endInfo.push({ + detailedAddress: element?.detailedAddress, + appUserName: element?.appUserName, + contractTelephone: element?.contractTelephone, + latitude: element.latitude, + longitude: element.longitude, + province: element.province, + city: element.city, + area: element.area, + type: element.type, + id: element.id + }) + this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required)); + } + }); + // 对装货凭证进行初始化 + if (res.loadingLadingBillFilePath) { + this.formData = { + loadingLadingBillFilePath: [ + { + uid: 'logo', + name: 'LOGO', + status: 'done', + url: res.loadingLadingBillFilePath, + response: { + url: res.loadingLadingBillFilePath, + }, + }, + ], + loadingPeopleVehiclesGoodsFilePath: [ + { + uid: 'logo', + name: 'LOGO', + status: 'done', + url: res.loadingPeopleVehiclesGoodsFilePath, + response: { + url: res.loadingPeopleVehiclesGoodsFilePath, + }, + }, + ], + unloadingLadingBillFilePath: [ + { + uid: 'logo', + name: 'LOGO', + status: 'done', + url: res.unloadingLadingBillFilePath, + response: { + url: res.unloadingLadingBillFilePath, + }, + }, + ], + unloadingPeopleVehiclesGoodsFilePath: [ + { + uid: 'logo', + name: 'LOGO', + status: 'done', + url: res.unloadingPeopleVehiclesGoodsFilePath, + response: { + url: res.unloadingPeopleVehiclesGoodsFilePath, + }, + }, + ], + }; + } + // 发车时间到车时间初始化 + this.loadTime = res.loadTime + this.unloadTime = res.unloadTime + this.dirvingMessage = res.billExpenseDetails; + + } + }) + } + + goBack() { + window.history.go(-1); + } + // 取消修改 + cancelChange() { + window.history.go(-1); + } + // 保存修改 + save() { + let imgList : any= []; + if(this.listImagUrls.length > 0) { + this.listImagUrls?.forEach((res :any) => { + if(res.url) { + imgList.push(res.url) + } + }) + } + if(typeof(this.unloadTime) !== 'string' ){ + var c = new Date(this.unloadTime); + this.unloadTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds()) + } + if(typeof(this.loadTime) !== 'string' ) { + var c = new Date(this.loadTime); + this.loadTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds()) + } + console.log('dirvingMessage=>>>>>>'+ this.dirvingMessage) + console.log( this.dirvingMessage) + console.log( this.st._data) + const params = { + id: this.id, + unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,], + receiptFilePath: imgList, + goodsInfoDTOList: [{ + id: this.i?.goodsInfoList?.[0].id, + goodsName: this.sf3.value?.goodsName, + ...this.sf4.value + }], + // 运费信息 + // 收款人 + payeeId: this.dirverPhone, + dirverBankCard: this.dirverBankCard, // 银行卡 + // 发车时间 + loadTime: this.loadTime, + // 到车时间 + unloadTime: this.unloadTime, + loadingLadingBillFilePath: this.sf.value?.loadingLadingBillFilePath?.data ? this.sf.value?.loadingLadingBillFilePath.data.fullFilePath : this.sf.value?.loadingLadingBillFilePath?.url, + + loadingPeopleVehiclesGoodsFilePath: this.sf.value?.loadingPeopleVehiclesGoodsFilePath?.data ? this.sf.value?.loadingPeopleVehiclesGoodsFilePath.data.fullFilePath : this.sf.value?.loadingPeopleVehiclesGoodsFilePath?.url, + + unloadingLadingBillFilePath: this.sf.value?.unloadingLadingBillFilePath?.data ? this.sf.value?.unloadingLadingBillFilePath.data.fullFilePath : this.sf.value?.unloadingLadingBillFilePath?.url, + + unloadingPeopleVehiclesGoodsFilePath: this.sf.value?.unloadingPeopleVehiclesGoodsFilePath?.data ? this.sf.value?.unloadingPeopleVehiclesGoodsFilePath.data.fullFilePath : this.sf.value?.unloadingPeopleVehiclesGoodsFilePath?.url, + } + console.log(params) + this.service.request(this.service.$api_set_modifyBulkOrder, params).subscribe((res: any) => { + console.log(res) + if(res) { + this.service.msgSrv.success('修改成功!'); + this.router.navigate(['/order-management/vehicle']); + } else { + this.service.msgSrv.error(res?.msg); + } + }) + } + addPreZero(num: any){ + if(num<10){ + return '0'+num; + } else { + return num; + } + } + // -------------------装卸货信息处理 + // 打开地图 + openMap(type: string, index: number) { + const modalRef = this.modalService.create({ + nzTitle: '', + nzContent: AmapPoiPickerComponent, + nzWidth: 900, + nzOnOk: item => { + const poi = item.poi; + const locList = poi.pois; + switch (type) { + case 'start': + this.startInfo[index].detailedAddress = poi.formattedAddress; + this.startInfo[index].longitude = locList[0]; + this.startInfo[index].latitude = locList[1]; + this.startInfo[index].province = poi.addressComponent.province; + this.startInfo[index].city = poi.addressComponent.city; + this.startInfo[index].area = poi.addressComponent.district; + this.startInfo[index].address = poi.formattedAddress; + break; + case 'end': + this.endInfo[index].detailedAddress = poi.formattedAddress; + this.endInfo[index].longitude = locList[0]; + this.endInfo[index].latitude = locList[1]; + this.endInfo[index].province = poi.addressComponent.province; + this.endInfo[index].city = poi.addressComponent.city; + this.endInfo[index].area = poi.addressComponent.district; + this.endInfo[index].address = poi.formattedAddress; + break; + default: + break; + } + + if (this.startInfo[0]?.area && this.endInfo[0]?.area) { + this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { + this.totalDistance = res.distance; + this.totalTime = res.time; + }); + } + } + }); +} + +initSF3() { + this.schema3 = { + properties: { + // enterpriseInfoId: { + // title: '网络货运人', + // type: 'string', + // ui: { + // placeholder: '请选择', + // widget: 'select', + // asyncData: () => this.service2.getNetworkFreightForwarder(), + // visibleIf: { + // _$expand: (value: boolean) => value, + // }, + // } + // }, + goodsName: { + type: 'string', + title: '货物名称', + ui: { + widget: 'dict-select', + params: { dictKey: 'GoodsName' }, + placeholder: '请选择' + } + }, + qita: { + type: 'string', + title: '', + ui: { + visibleIf: { + goodsName: value => value === '3' + } + } + } + }, + required: ['goodsName',] + }; + this.ui3 = { + '*': { + spanLabelFixed: 110, + grid: { span: 12 } + }, + $goodsName: { + grid: { span: 12 } + }, + $qita: { + grid: { span: 12 } + } + }; +} +initST() { + this.logColumns = [ + { title: '款项', index: 'costName' }, + { title: '总费用(元)', index: 'price' }, + { title: '协议金额(元)', render: 'price' }, + { title: '附加费(元)', index: 'surcharge' }, + { title: '附加费率(%)', render: 'paymentMethodRate' }, + { title: '支付时间', index: ' paymentTime' }, + { + title: '支付状态', + className: 'text-center', + index: 'paymentStatus', + type: 'badge', + width: '120px', + badge: { + '1': { text: '待申请', color: 'warning' }, + '2': { text: '已支付', color: 'success' }, + '3': { text: '已拒绝', color: 'warning' }, + '4': { text: '申请中', color: 'warning' }, + }, + }, + ]; +} +initSF4() { + this.schema4 = { + properties: { + weight: { + type: 'string', + title: '货物数量', + ui: { + widget: 'custom', + placeholder: '请输入', + errors: { required: '必填项' } + } + }, + volume: { + type: 'string', + title: '', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + number: { + type: 'string', + title: '', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + carmand: { + type: 'string', + title: '用车需求', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + drivers: { + type: 'string', + title: '承运司机', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + weightModel: { + type: 'string', + title: '车型车长承重', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + loadTime: { + type: 'string', + title: '发车时间', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + unloadTime: { + type: 'string', + title: '到车时间', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + + }, + required: ['weight','loadTime','unloadTime'] + }; + this.ui4 = { + '*': { + spanLabelFixed: 90, + grid: { span: 24 } + }, + $weight: { + grid: { span: 8 } + }, + $volume: { + grid: { span: 8 } + }, + $number: { + grid: { span: 8 } + }, + $carmand: { + grid: { span: 24 } + }, + $weightModel: { + grid: { span: 12 } + }, + $drivers: { + grid: { span: 12 } + }, + $loadTime: { + grid: { span: 12 } + }, + $unloadTime: { + grid: { span: 12 } + }, + }; +} +// 处理上传图片 +handlePreview1 = async (file: NzUploadFile) => { + if (!file.url && !file.preview) { + file.preview = await getBase64(file.originFileObj!); + } + this.previewImage1 = file.url || file.preview; + this.previewVisible1 = true; +}; + +handleChange1(info: NzUploadChangeParam): void { + switch (info.file.status) { + case 'uploading': + break; + case 'done': + let fileList = [...info.fileList]; + // 2. Read from response and show file link + console.log(fileList) + fileList = fileList.map((file: any) => { + if (file.response) { + file.url = file.response.data.fullFilePath; + } + return file; + }); + break; + case 'error': + this.service.msgSrv.error('网络错误'); + break; + } +} +beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]) => { + return new Observable((observer: Observer) => { + const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif' || file.type === 'image/bmp'; + if (!isJpgOrPng) { + this.service.msgSrv.warning('只能上传图片!'); + observer.complete(); + return; + } + // tslint:disable-next-line: no-non-null-assertion + const isLt2M = file.size! / 1024 / 1024 < 3; + if (!isLt2M) { + this.service.msgSrv.warning('图片大小超过3兆!'); + observer.complete(); + return; + } + observer.next(isJpgOrPng && isLt2M); + observer.complete(); + }); +}; +agreement(value: any) { + if(value === '1') { + this.imges = this.i?.supplementAgreement + } else if (value === '2') { + this.imges = this.i?.supplementAgreement + } + this.isVisible = true; +} +handleCancel() { + this.isVisible = false +} +handleOK() { +this.isVisible = false +} +} diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html index 8bb07eb2..0f45cfc6 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html @@ -1,7 +1,7 @@ - + @@ -105,7 +105,6 @@ - 计划装货时间:{{i?.goodsResource[0]?.loadingTime}} @@ -118,42 +117,51 @@ - 计划卸货时间:{{i?.goodsResource[0]?.unloadingTime}} + - - {{i?.goodsResource[0]?.enterpriseInfoName}} - - {{i?.goodsInfoList[0]?.goodsName}} + {{i?.goodsInfoList?.[0]?.goodsName}} - {{i?.goodsInfoList[0]?.weight}}顿,{{i?.goodsInfoList[0]?.volume}}方,{{i?.goodsInfoList[0]?.number}}件 + {{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 - {{i?.goodsInfoList[0]?.maxWeightLabel}}/{{i?.goodsInfoList[0]?.maxCube}} + {{i?.goodsInfoList?.[0]?.maxWeightLabel}}/{{i?.goodsInfoList?.[0]?.maxCube}} {{i?.driverId}} - {{i?.goodsInfoList[0]?.weight}}顿,{{i?.goodsInfoList[0]?.volume}}方,{{i?.goodsInfoList[0]?.number}}件 + {{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 + + + {{i?.loadPlanTime}} + + + {{i?.unloadPlanTime}} + + + {{i?.acceptWeight}}吨,{{i?.acceptVolume}}方,{{i?.acceptNumber}}件 + + + {{i?.acceptWeight}}吨,{{i?.acceptVolume}}方,{{i?.acceptNumber}}件 + + + {{i?.settlementWeight}}吨,{{i?.settlementVolume}}方,{{i?.acceptNumber}}件 - - - - + {{i?.freightPrice}}{{i?.freightTypeLabel}}(以发货为准,保留小数) @@ -164,16 +172,18 @@ - {{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}} + + 查看附件 + 补充协议 - + - + @@ -195,11 +205,12 @@ {{i?.goodsResource?.receiptAddress}} - - {{i?.goodsResource?.receiptAddress}} - + + + + {{i?.goodsResource?.remarks}} @@ -211,8 +222,8 @@ - - + @@ -220,4 +231,14 @@ - \ No newline at end of file + + + + + + + + 取消 + 确定 + + \ No newline at end of file diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.less b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.less index d5782526..287ea1bb 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.less +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.less @@ -45,16 +45,17 @@ .ant-anchor-ink::before { width: 0; } + + .ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab, + .ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab, + .ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab, + .ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab { + margin-left: 40px + } } .leftPadding { padding-right: 100px; } - .ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab, - .ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab, - .ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab, - .ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab { - margin-left: 40px - } } \ No newline at end of file diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts index e1a93ff6..9307348e 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts @@ -1,7 +1,8 @@ +import { Router } from '@angular/router'; /* * @Author: your name * @Date: 2021-12-03 15:31:52 - * @LastEditTime: 2021-12-22 10:02:00 + * @LastEditTime: 2021-12-24 17:40:51 * @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 @@ -23,12 +24,12 @@ export class OrderManagementBulkeDetailComponent implements OnInit { id = this.route.snapshot.params.id; i: any; + imges: any; + isVisible = false; logColumns: STColumn[] = [ - { title: '款项', index: 'costName' }, - { title: '总费用(元)', index: 'price' }, - { title: '协议金额(元)', index: 'price' }, + { title: '款项', index: 'expenseName' }, + { title: '运输费(元)', index: 'price' }, { title: '附加费(元)', index: 'surcharge' }, - { title: '附加费率(%)', index: 'paymentMethodRate' }, { title: '支付时间', index: ' paymentTime' }, { title: '支付状态', @@ -49,6 +50,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit { private route: ActivatedRoute, private msgSrv: NzMessageService, private service: OrderManagementService, + private router: Router, ) { } @@ -72,4 +74,23 @@ export class OrderManagementBulkeDetailComponent implements OnInit { goBack() { window.history.go(-1); } + // 修改订单 + changeOrder() { + console.log(this.id) + this.router.navigate(['order-management/bulk-detailChange', this.id]) + } + agreement(value: any) { + if(value === '1') { + this.imges = this.i?.supplementAgreement + } else if (value === '2') { + this.imges = this.i?.supplementAgreement + } + this.isVisible = true; + } + handleCancel() { + this.isVisible = false + } + handleOK() { + this.isVisible = false + } } 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 ccfb7059..a1652609 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 @@
计划装货时间:{{i?.loadPlanTime}}
计划卸货时间:{{i?.unloadPlanTime}}
计划装货时间:{{i?.goodsResource[0]?.loadingTime}}
计划卸货时间:{{i?.goodsResource[0]?.unloadingTime}}