车辆对接
This commit is contained in:
		| @ -1,3 +1,11 @@ | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-07 19:42:53 | ||||
|  * @LastEditTime: 2021-12-24 13:16:59 | ||||
|  * @LastEditors: your name | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\proxy.conf.js | ||||
|  */ | ||||
| /** | ||||
|  * For more configuration, please refer to https://angular.io/guide/build#proxying-to-a-backend-server | ||||
|  * | ||||
| @ -16,7 +24,7 @@ module.exports = { | ||||
|   // } | ||||
|   '//api': { | ||||
|     target: { | ||||
|       host: 'tms-api-test.eascs.com', | ||||
|       host: 'tms-api-dev.eascs.com', | ||||
|       protocol: 'https:', | ||||
|       port: 443 | ||||
|     }, | ||||
|  | ||||
| @ -7,8 +7,6 @@ import { map } from 'rxjs/operators'; | ||||
| import { OrderManagementService } from '../../services/order-management.service'; | ||||
| import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component'; | ||||
| import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component'; | ||||
| import { SureDepartComponent } from '../../modal/bulk/sure-depart/sure-depart.component'; | ||||
| import { SureArriveComponent } from '../../modal/bulk/sure-arrive/sure-arrive.component'; | ||||
| import { of } from 'rxjs'; | ||||
| import { ShipperBaseService } from '@shared'; | ||||
|  | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-03 15:31:52 | ||||
|  * @LastEditTime: 2021-12-23 16:36:42 | ||||
|  * @LastEditTime: 2021-12-23 17:39:40 | ||||
|  * @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.html | ||||
| @ -326,56 +326,14 @@ | ||||
|     </sv> | ||||
|   </sv-container> | ||||
|   <sv-container col="2" class="mt-md"> | ||||
|     <sv label="装货凭证"> | ||||
|       <!-- <app-imagelist [imgList]="[i?.goodsResource]"> | ||||
|       </app-imagelist> --> | ||||
|       <nz-upload | ||||
|     class="avatar-uploader" | ||||
|     [nzAction]="service.$api_upload_url" | ||||
|     [nzName]="'multipartFile'" | ||||
|     nzListType="picture-card" | ||||
|     [(nzFileList)]="listImagUrls" | ||||
|     [nzShowButton]="listImagUrls.length < 5" | ||||
|     [nzPreview]="handlePreview1" | ||||
|     [nzBeforeUpload]="beforeUpload" | ||||
|     (nzChange)="handleChange1($event)" | ||||
|   > | ||||
|     <div> | ||||
|       <i nz-icon nzType="plus"></i> | ||||
|       <div style="margin-top: 8px">请上传图片</div> | ||||
|     </div> | ||||
|   </nz-upload> | ||||
|   <nz-modal [nzVisible]="previewVisible1" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible1 = false"> | ||||
|     <ng-template #modalContent> | ||||
|       <img [src]="previewImage1" [ngStyle]="{ width: '100%' }" /> | ||||
|     </ng-template> | ||||
|   </nz-modal> | ||||
|     <sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="formData" button="none"></sf> | ||||
|     <!-- <sv label="装货凭证"> | ||||
|      | ||||
|  | ||||
|     </sv> | ||||
|     <sv label="卸货凭证"> | ||||
|       <!-- <app-imagelist [imgList]="[i?.goodsResource]"> | ||||
|       </app-imagelist> --> | ||||
|       <nz-upload | ||||
|       class="avatar-uploader" | ||||
|       [nzAction]="service.$api_upload_url" | ||||
|       [nzName]="'multipartFile'" | ||||
|       nzListType="picture-card" | ||||
|       [(nzFileList)]="listImagUrls2" | ||||
|       [nzShowButton]="listImagUrls2.length < 5" | ||||
|       [nzPreview]="handlePreview2" | ||||
|       [nzBeforeUpload]="beforeUpload" | ||||
|       (nzChange)="handleChange1($event)" | ||||
|     > | ||||
|       <div> | ||||
|         <i nz-icon nzType="plus"></i> | ||||
|         <div style="margin-top: 8px">请上传图片</div> | ||||
|       </div> | ||||
|     </nz-upload> | ||||
|     <nz-modal [nzVisible]="previewVisible2" [nzContent]="modalContent2" [nzFooter]="null" (nzOnCancel)="previewVisible2 = false"> | ||||
|       <ng-template #modalContent2> | ||||
|         <img [src]="previewImage2" [ngStyle]="{ width: '100%' }" /> | ||||
|       </ng-template> | ||||
|     </nz-modal> | ||||
|     </sv> | ||||
|   | ||||
|     </sv> --> | ||||
|   </sv-container> | ||||
| </nz-card> | ||||
| <nz-card nzTitle="补充信息"> | ||||
| @ -395,11 +353,32 @@ | ||||
|     <sv label="详细地址"> | ||||
|       {{i?.goodsResource?.receiptAddress}} | ||||
|     </sv> | ||||
|     <sv label="回单凭证"> | ||||
|       {{i?.goodsResource?.receiptAddress}} | ||||
|     </sv> | ||||
|   </sv-container> | ||||
|   <sv-container col="1" class="mt-md"> | ||||
|     <sv label="回单凭证"> | ||||
|       <!-- {{i?.goodsResource?.receiptAddress}} --> | ||||
|       <nz-upload | ||||
|       class="avatar-uploader" | ||||
|       [nzAction]="service.$api_upload_url" | ||||
|       [nzName]="'multipartFile'" | ||||
|       nzListType="picture-card" | ||||
|       [(nzFileList)]="listImagUrls" | ||||
|       [nzShowButton]="listImagUrls.length < 5" | ||||
|       [nzPreview]="handlePreview1" | ||||
|       [nzBeforeUpload]="beforeUpload" | ||||
|       (nzChange)="handleChange1($event)" | ||||
|     > | ||||
|       <div> | ||||
|         <i nz-icon nzType="plus"></i> | ||||
|         <div style="margin-top: 8px">请上传图片</div> | ||||
|       </div> | ||||
|     </nz-upload> | ||||
|     <nz-modal [nzVisible]="previewVisible1" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible1 = false"> | ||||
|       <ng-template #modalContent> | ||||
|         <img [src]="previewImage1" [ngStyle]="{ width: '100%' }" /> | ||||
|       </ng-template> | ||||
|     </nz-modal> | ||||
|     </sv> | ||||
|     <sv label="备注"> | ||||
|       {{i?.goodsResource?.remarks}} | ||||
|     </sv> | ||||
|  | ||||
| @ -51,7 +51,7 @@ | ||||
|         padding-right: 100px; | ||||
|     } | ||||
|  | ||||
|     .ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab, | ||||
|     /deep/ .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 { | ||||
|  | ||||
| @ -2,7 +2,7 @@ import { ViewChild } from '@angular/core'; | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-03 15:31:52 | ||||
|  * @LastEditTime: 2021-12-23 16:34:02 | ||||
|  * @LastEditTime: 2021-12-24 13:15:50 | ||||
|  * @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 | ||||
| @ -11,13 +11,14 @@ import { Component, OnInit } from '@angular/core'; | ||||
| import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; | ||||
| import { ActivatedRoute } from '@angular/router'; | ||||
| import { STColumn, STComponent } from '@delon/abc/st'; | ||||
| import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; | ||||
| import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form'; | ||||
| import { _HttpClient } from '@delon/theme'; | ||||
| import { AmapPoiPickerComponent, AmapService, ShipperBaseService } from '@shared'; | ||||
| 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<string | ArrayBuffer | null> { | ||||
|   return new Promise((resolve, reject) => { | ||||
| @ -49,12 +50,9 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | ||||
|   dirverPhone: any; // 货源单设置回显 | ||||
|   dirverBankCard: any; // 货源单设置回显 | ||||
|   listImagUrls: any[] = []; // 货源单设置回显 | ||||
|   listImagUrls2: any[] = []; // 货源单设置回显 | ||||
|   imges: any; | ||||
|   previewImage1 = ''; | ||||
|   previewVisible1 = false; | ||||
|   previewImage2 = ''; | ||||
|   previewVisible2 = false; | ||||
|   @ViewChild('sf3', { static: false }) sf3!: SFComponent; | ||||
|   schema3: SFSchema = {}; | ||||
|   ui3!: SFUISchema; | ||||
| @ -63,6 +61,10 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | ||||
|   schema4: SFSchema = {}; | ||||
|   isVisible = false; | ||||
|   ui4!: SFUISchema; | ||||
|   formData: any; | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   schema: SFSchema = {}; | ||||
|   ui: SFUISchema = {}; | ||||
|   constructor( | ||||
|     private route: ActivatedRoute, | ||||
|     private msgSrv: NzMessageService, | ||||
| @ -71,6 +73,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | ||||
|     private amapService: AmapService, | ||||
|     public service2: ShipperBaseService, | ||||
|     fb: FormBuilder,  | ||||
|     private envSrv: EAEnvironmentService, | ||||
|   ) { | ||||
|     this.validateForm1 = fb.group({ | ||||
|       loadingTime: [null, []], | ||||
| @ -81,11 +84,207 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | ||||
|   ngOnInit(): void { | ||||
|     console.log(this.id) | ||||
|     this.initST(); | ||||
|     this.initSF(); | ||||
|     this.initSF3(); | ||||
|     this.initSF4(); | ||||
|     this.initData() | ||||
|   } | ||||
|  | ||||
|   initSF() { | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         imgUrl3: { | ||||
|           type: 'string', | ||||
|           title: '装货凭证', | ||||
|           readOnly: true, | ||||
|           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<boolean>) => { | ||||
|                 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, | ||||
|         }, | ||||
|         imgUrl4: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           readOnly: true, | ||||
|           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<boolean>) => { | ||||
|                 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: '', | ||||
|         }, | ||||
|         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<boolean>) => { | ||||
|                 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, | ||||
|         }, | ||||
|         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<boolean>) => { | ||||
|                 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: ['imgUrl3','imgUrl1'] | ||||
|     }; | ||||
|     this.ui = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 100, | ||||
|         grid: { span: 20 } | ||||
|       }, | ||||
|       $imgUrl1: { grid: { span: 12} }, | ||||
|       $imgUrl2: { grid: { span: 12} }, | ||||
|       $imgUrl3: { grid: { span: 12} }, | ||||
|       $imgUrl4: { grid: { span: 12} }, | ||||
|       $no5: { grid: { span: 24} }, | ||||
|     }; | ||||
|   } | ||||
|   initData() { | ||||
|     this.service.request(this.service.$api_get_getWholeBillDetail, {id: this.id}).subscribe(res => { | ||||
|       console.log(res) | ||||
| @ -93,7 +292,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | ||||
|         this.i = res; | ||||
|         // 对装货凭证进行初始化 | ||||
|         let arr : any= [] | ||||
|         res.filePathList.forEach((element: any, index: any) => { | ||||
|         res?.receiptFilePath.forEach((element: any, index: any) => { | ||||
|           console.log(index) | ||||
|          arr.push(  { | ||||
|           url: element, | ||||
| @ -102,15 +301,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | ||||
|         }) | ||||
|         }); | ||||
|         this.listImagUrls = arr; | ||||
|         let arr2 : any= [] | ||||
|         res.filePathList.forEach((element: any, index: any) => { | ||||
|          arr2.push(  { | ||||
|           url: element, | ||||
|           status: 'done', | ||||
|           uid: index | ||||
|         }) | ||||
|         }); | ||||
|         this.listImagUrls2 = arr2; | ||||
|  | ||||
|         // 对装卸货信息进行初始化 | ||||
|         res?.unLoadingPlaceList.forEach((element: any) => { | ||||
| @ -150,6 +340,33 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | ||||
|             this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required)); | ||||
|           } | ||||
|         }); | ||||
|         // 对装货凭证进行初始化 | ||||
|         if (res.imgUrl1) { | ||||
|           this.formData = { | ||||
|             imgUrl3: [ | ||||
|               { | ||||
|                 uid: 'logo', | ||||
|                 name: 'LOGO', | ||||
|                 status: 'done', | ||||
|                 url: res.imgUrl1, | ||||
|                 response: { | ||||
|                   url: res.imgUrl1, | ||||
|                 }, | ||||
|               }, | ||||
|         ], | ||||
|             imgUrl4: [ | ||||
|               { | ||||
|                 uid: 'logo', | ||||
|                 name: 'LOGO', | ||||
|                 status: 'done', | ||||
|                 url: res.imgUrl2, | ||||
|                 response: { | ||||
|                   url: res.imgUrl2, | ||||
|                 }, | ||||
|               }, | ||||
|         ], | ||||
|           }; | ||||
|         } | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
| @ -171,24 +388,17 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | ||||
|   } | ||||
|   // 保存修改 | ||||
|   save() { | ||||
|     console.log(this.sf.value) | ||||
|     let imgList : any= []; | ||||
|     if(this.listImagUrls.length > 0) { | ||||
|       this.listImagUrls.forEach((res :any) => { | ||||
|       this.listImagUrls?.forEach((res :any) => { | ||||
|         if(res.url) { | ||||
|           imgList.push(res.url) | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|     console.log(imgList) | ||||
|     let imgList2 : any= []; | ||||
|     if(this.listImagUrls2.length > 0) { | ||||
|       this.listImagUrls2.forEach((res :any) => { | ||||
|         if(res.url) { | ||||
|           imgList2.push(res.url) | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|     console.log(imgList2) | ||||
|     | ||||
|     if(typeof(this.validateForm1.value.unloadingTime) !== 'string' ) { | ||||
|       var c = new Date(this.validateForm1.value.unloadingTime);   | ||||
|       this.validateForm1.value.unloadingTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds()) | ||||
| @ -197,6 +407,42 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | ||||
|       var c = new Date(this.validateForm1.value.loadingTime);   | ||||
|       this.validateForm1.value.loadingTime = 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(this.sf3.value) | ||||
|     console.log(this.sf4.value) | ||||
|     const params = { | ||||
|       id: this.id, | ||||
|       unLoadingPlaceList: [...this.startInfo, ...this.endInfo,],  | ||||
|       goodsResource: [{ | ||||
|         id: '', | ||||
|         enterpriseInfoId: 'xxx', | ||||
|  | ||||
|       }], | ||||
|       receiptFilePath: imgList, | ||||
|       goodsInfoList: [{ | ||||
|         id: '', | ||||
|         goodsName: 'xxx', | ||||
|         weight: '', | ||||
|         volume: '', | ||||
|         number: '', | ||||
|       }], | ||||
|       // 运费信息 | ||||
|       expenseList: this.i?.i?.billExpenseDetails, | ||||
|       // 收款人 | ||||
|       payeeId: '', | ||||
|       银行卡: '', | ||||
|       // 发车时间 | ||||
|       loadPlanTime: '', | ||||
|       // 到车时间 | ||||
|       unloadPlanTime: '', | ||||
|       loadingLadingBillFilePath: '', | ||||
|       loadingPeopleVehiclesGoodsFilePath: '', | ||||
|       unloadingLadingBillFilePath: '', | ||||
|       unloadingPeopleVehiclesGoodsFilePath: '', | ||||
|     } | ||||
|     console.log(params) | ||||
|     // this.service.request(this.service.$api_set_getWholeOrderDetail, params).subscribe((res: any) => { | ||||
|     //   console.log(res) | ||||
|     // }) | ||||
|   } | ||||
|   addPreZero(num: any){ | ||||
|     if(num<10){ | ||||
| @ -496,13 +742,7 @@ handlePreview1 = async (file: NzUploadFile) => { | ||||
|   this.previewImage1 = file.url || file.preview; | ||||
|   this.previewVisible1 = true; | ||||
| }; | ||||
| handlePreview2 = async (file: NzUploadFile) => { | ||||
|   if (!file.url && !file.preview) { | ||||
|     file.preview = await getBase64(file.originFileObj!); | ||||
|   } | ||||
|   this.previewImage2 = file.url || file.preview; | ||||
|   this.previewVisible2 = true; | ||||
| }; | ||||
|  | ||||
| handleChange1(info: NzUploadChangeParam): void { | ||||
|   switch (info.file.status) { | ||||
|     case 'uploading': | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-03 15:31:52 | ||||
|  * @LastEditTime: 2021-12-23 16:36:44 | ||||
|  * @LastEditTime: 2021-12-23 17:40: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\components\vehicle-detail\vehicle-detail.component.html | ||||
| @ -197,11 +197,12 @@ | ||||
|     <sv label="详细地址"> | ||||
|       {{i?.goodsResource?.receiptAddress}} | ||||
|     </sv> | ||||
|     <sv label="回单凭证"> | ||||
|       {{i?.goodsResource?.receiptAddress}} | ||||
|     </sv> | ||||
|    | ||||
|   </sv-container> | ||||
|   <sv-container col="1" class="mt-md"> | ||||
|     <sv label="回单凭证"> | ||||
|       <app-imagelist [imgList]="[imges]"></app-imagelist> | ||||
|     </sv> | ||||
|     <sv label="备注"> | ||||
|       {{i?.goodsResource?.remarks}} | ||||
|     </sv> | ||||
|  | ||||
| @ -51,7 +51,7 @@ | ||||
|         padding-right: 100px; | ||||
|     } | ||||
|  | ||||
|     .ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab, | ||||
|     /deep/ .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 { | ||||
|  | ||||
| @ -1,29 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-14 15:53:03 | ||||
|  * @LastEditTime: 2021-12-14 17:39: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\order-management\modal\bulk\sure-depart\sure-depart.component.html | ||||
| --> | ||||
| <sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none"> | ||||
|   <ng-template sf-template="no2" let-me let-ui="ui" let-schema="schema"> | ||||
|     <div style="display: flex;"> | ||||
|      <nz-input-number [(ngModel)]="data.place1" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number> | ||||
|      <div class="left_btn">吨</div> | ||||
|     </div> | ||||
|    </ng-template> | ||||
|   <ng-template sf-template="no3" let-me let-ui="ui" let-schema="schema"> | ||||
|     <div style="display: flex;"> | ||||
|      <nz-input-number [(ngModel)]="data.place2" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number> | ||||
|      <div class="left_btn">方</div> | ||||
|     </div> | ||||
|    </ng-template> | ||||
| </sf> | ||||
|  | ||||
| <div class="modal-footer"> | ||||
|   <button nz-button type="button" (click)="close()">关闭</button> | ||||
|   <button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [nzLoading]="http.loading" | ||||
|     >确认到车</button | ||||
|   > | ||||
| </div> | ||||
| @ -1,7 +0,0 @@ | ||||
|     .left_btn { | ||||
|          width: 50px; | ||||
|         height: 32px;  | ||||
|          padding-left: 8px; | ||||
|          line-height:32px;  | ||||
|          background-color: #d7d7d7; | ||||
|     } | ||||
| @ -1,298 +0,0 @@ | ||||
| import { preloaderFinished } from '@delon/theme'; | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-14 14:03:07 | ||||
|  * @LastEditTime: 2021-12-14 17:38:20 | ||||
|  * @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 | ||||
|  */ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { | ||||
|   SFComponent, | ||||
|   SFCustomWidgetSchema, | ||||
|   SFDateWidgetSchema, | ||||
|   SFNumberWidgetSchema, | ||||
|   SFRadioWidgetSchema, | ||||
|   SFSchema, | ||||
|   SFSelectWidgetSchema, | ||||
|   SFTextareaWidgetSchema, | ||||
|   SFUISchema, | ||||
|   SFUploadWidgetSchema | ||||
| } from '@delon/form'; | ||||
| 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'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-order-management-sure-arrive', | ||||
|   templateUrl: './sure-arrive.component.html', | ||||
|   styleUrls: ['./sure-arrive.component.less'] | ||||
| }) | ||||
| export class SureArriveComponent implements OnInit { | ||||
|   record: any = {}; | ||||
|   i: any; | ||||
|   data: any ={ | ||||
|     place1: '', | ||||
|     place2: '' | ||||
|   }; | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   schema: SFSchema = {}; | ||||
|   ui: SFUISchema = {}; | ||||
|   constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: SupplyManagementService ) {} | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     this.initSF(); | ||||
|   } | ||||
|   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', | ||||
|            } | ||||
|         }, | ||||
|       | ||||
|         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 | ||||
|                     } | ||||
|                   } | ||||
|                 ]; | ||||
|                 this.sf?.setValue('/avatar', avatar); | ||||
|               } | ||||
|             }, | ||||
|             beforeUpload: (file: any, _fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 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 | ||||
|                     } | ||||
|                   } | ||||
|                 ]; | ||||
|                 this.sf?.setValue('/avatar', avatar); | ||||
|               } | ||||
|             }, | ||||
|             beforeUpload: (file: any, _fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt2M = file.size / 1024 / 1024 < 5; | ||||
|                 if (!isLt2M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt2M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             } | ||||
|           } as SFUploadWidgetSchema | ||||
|         }, | ||||
|         no4: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           ui: { | ||||
|             widget: 'text', | ||||
|            }, | ||||
|            default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式', | ||||
|         }, | ||||
|         avatar3: { | ||||
|           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 | ||||
|                     } | ||||
|                   } | ||||
|                 ]; | ||||
|                 this.sf?.setValue('/avatar', avatar); | ||||
|               } | ||||
|             }, | ||||
|             beforeUpload: (file: any, _fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt2M = file.size / 1024 / 1024 < 5; | ||||
|                 if (!isLt2M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt2M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             } | ||||
|           } as SFUploadWidgetSchema | ||||
|         }, | ||||
|         avatar4: { | ||||
|           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 | ||||
|                     } | ||||
|                   } | ||||
|                 ]; | ||||
|                 this.sf?.setValue('/avatar', avatar); | ||||
|               } | ||||
|             }, | ||||
|             beforeUpload: (file: any, _fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt2M = file.size / 1024 / 1024 < 5; | ||||
|                 if (!isLt2M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt2M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             } | ||||
|           } as SFUploadWidgetSchema | ||||
|         } | ||||
|       }, | ||||
|       required: ['reason'] | ||||
|     }; | ||||
|     this.ui = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 100, | ||||
|         grid: { span: 20 } | ||||
|       }, | ||||
|       $avatar: { grid: { span: 12} }, | ||||
|       $avatar2: { grid: { span: 12} }, | ||||
|       $avatar3: { grid: { span: 12} }, | ||||
|       $avatar4: { 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); | ||||
|     // }); | ||||
|   } | ||||
|  | ||||
|   close(): void { | ||||
|     this.modal.destroy(); | ||||
|   } | ||||
|  | ||||
| } | ||||
| @ -1,7 +1,7 @@ | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-03 15:31:52 | ||||
|  * @LastEditTime: 2021-12-21 10:16:11 | ||||
|  * @LastEditTime: 2021-12-23 17:13: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\order-management\order-management.module.ts | ||||
| @ -22,7 +22,6 @@ import { OrderManagementVehicleDetailComponent } from './components/vehicle-deta | ||||
|  | ||||
| import { OrderManagementVehicleComponent } from './components/vehicle/vehicle.component'; | ||||
| import { ConfirReceiptComponent } from './modal/bulk/confir-receipt/confir-receipt.component'; | ||||
| import { SureArriveComponent } from './modal/bulk/sure-arrive/sure-arrive.component'; | ||||
| import { SureDepartComponent } from './modal/bulk/sure-depart/sure-depart.component'; | ||||
| import { UpdateFreightComponent } from './modal/bulk/update-freight/update-freight.component'; | ||||
| import { OneCarOrderCancelComponent } from './modal/vehicle/cancel/cancel.component'; | ||||
| @ -46,7 +45,6 @@ const COMPONENTS: Type<void>[] = [ | ||||
|   UpdateFreightComponent, | ||||
|   ConfirReceiptComponent, | ||||
|   SureDepartComponent, | ||||
|   SureArriveComponent, | ||||
|   VehicleUpdateFreightComponent, | ||||
|   VehicleConfirReceiptComponent, | ||||
|   VehicleSureDepartComponent, | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-03 15:31:52 | ||||
|  * @LastEditTime: 2021-12-23 13:55:10 | ||||
|  * @LastEditTime: 2021-12-23 20:49:05 | ||||
|  * @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 | ||||
| @ -89,6 +89,10 @@ export class OrderManagementService extends BaseService { | ||||
|    $api_change_bulk = `/api/sdc/billFreightChangeApplication/insertFreightChangeBulk`; | ||||
|      // 删除装卸货信息 | ||||
|   $api_delete_Wholedeletebatch = `/api/sdc/unLoadingPlace/deletebatch`; | ||||
|      // 修改-大宗订单详情 | ||||
|   $api_set_getBulkOrderDetail = `/api/sdc/billOperate/getBulkOrderDetail`; | ||||
|      // 修改-整车订单详情 | ||||
|   $api_set_getWholeOrderDetail = `/api/sdc/billOperate/getWholeOrderDetail`; | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector) | ||||
|   } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user