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 e7ff42e9..ee3c8dbc 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 @@ - - - - 100元/吨 - 100元/方 - 100元/车 - - -
-
以发货为准 / 以收货为准
-
保留小数/抹除小数/抹除个数
-
-
-
- - -
xx吨
-
- -
xx吨
-
-
- - -
xx吨
-
- -
xx吨
-
-
- - -
1000元
+ + + -
张三 / 18888888888 / 粤GJ401
-
- -
李四 / 1888888888
-
+
{{ i.driverName }} / {{ i.driverTelephone }} / {{ i.carNo }}
+
+ +
{{ i.payeeName }} / {{ i.payeePhone }}
+
- + +
+ +
请上传图片
+
+
+ + + + +
diff --git a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts index cf36f707..36ab5bfd 100644 --- a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts +++ b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts @@ -1,12 +1,12 @@ -import { preloaderFinished } from '@delon/theme'; /* * @Author: your name - * @Date: 2021-12-14 14:03:07 - * @LastEditTime: 2021-12-15 14:08:34 + * @Date: 2021-12-15 13:17:42 + * @LastEditTime: 2021-12-21 09:34:52 * @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 + * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\confir-receipt\confir-receipt.component.ts */ + import { Component, OnInit, ViewChild } from '@angular/core'; import { SFComponent, @@ -18,10 +18,21 @@ import { SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload'; import { _HttpClient } from '@delon/theme'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalRef } from 'ng-zorro-antd/modal'; - +import { OrderManagementService } from '../../../services/order-management.service'; +import { Observable, Observer } from 'rxjs'; +import { STColumn } from '@delon/abc/st'; +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-order-management-vehicle-confir-receipt', templateUrl: './confir-receipt.component.html', @@ -30,24 +41,130 @@ import { NzModalRef } from 'ng-zorro-antd/modal'; export class VehicleConfirReceiptComponent implements OnInit { record: any = {}; i:any; + Status: any + columns!: STColumn[]; + previewVisible1 = false; + dataInfo: any; + detailList: any data: any = {}; - constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient) {} + previewImage1 = ''; + listImagUrls: any[] = []; + constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient,public service: OrderManagementService) {} ngOnInit(): void { + this.initData() } save(): void { - // this.http.post(`/user/${this.record.id}`, value).subscribe(res => { - // this.msgSrv.success('保存成功'); - // this.modal.close(true); - // }); + this.service.request(this.service.$api_get_signWholeOrder, {id: this.i?.id}).subscribe((res: any) => { + console.log(res) + if(res) { + this.service.msgSrv.success('确认签收成功!') + } else { + this.service.msgSrv.error(res.msg) + } + }) } - + handlePreview1 = async (file: NzUploadFile) => { + if (!file.url && !file.preview) { + file.preview = await getBase64(file.originFileObj!); + } + this.previewImage1 = file.url || file.preview; + this.previewVisible1 = true; + }; close(): void { this.modal.destroy(); } - userAction() { + + 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(); + }); + }; + initData() { + // this.dataInfo = [ + // { + // prePay: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'PRE')[0]?.price || 0, + // toPay: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'RECE')[0]?.price || 0, + // receiptPay: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'OIL')[0]?.price || 0, + // traiPrice: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseName === '运输费')[0]?.price || 0 + // } + // ]; + // if (this.i?.receiptCertificate?.length > 0) { + // this.i?.receiptCertificate.forEach((element: any) => { + // const image = { + // url: element, + // status: 'done', + // uid: '-1' + // }; + // this.listImagUrls.push(image); + // }); + // } + // 大宗 + this.service.request(this.service.$api_get_getWholeSignForDetail, {id: this.i?.id}).subscribe((res: any) => { + console.log(res) + this.dataInfo = res; + }) + } + initST() { + this.columns = [ + { + title: '预付', + index: 'prePay' + }, + { + title: '到付', + index: 'toPay' + }, + // { + // title: '油卡', + // index: 'name3' + // }, + { + title: '回单付', + index: 'receiptPay' + }, + { + title: '总运费', + index: 'traiPrice' + } + ]; + } + + handleChange1(info: NzUploadChangeParam): void { + switch (info.file.status) { + case 'uploading': + break; + case 'done': + const resData = info.file.response.data; + const arr = [ + { + url: resData.fullFilePath, + status: 'done', + uid: '-1' + } + ]; + this.listImagUrls = arr; + break; + case 'error': + this.service.msgSrv.error('网络错误'); + break; + } } } diff --git a/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.html b/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.html index c3a17c73..f9b9654f 100644 --- a/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.html +++ b/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.html @@ -1,21 +1,21 @@ - - + +
- +
- +
- +
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 7cea770e..e18d8ba7 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 @@ -1,13 +1,6 @@ -import { preloaderFinished } from '@delon/theme'; -/* - * @Author: your name - * @Date: 2021-12-14 14:03:07 - * @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 - */ + import { Component, OnInit, ViewChild } from '@angular/core'; +import { DatePipe } from '@angular/common'; import { SFComponent, SFCustomWidgetSchema, @@ -20,151 +13,127 @@ 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 { WaybillManagementServe } from 'src/app/routes/waybill-management/services/waybill-management.service'; import { Observable, Observer } from 'rxjs'; +import { EAEnvironmentService } from '@shared'; @Component({ selector: 'app-order-management-vehicle-sure-arrive', templateUrl: './sure-arrive.component.html', - styleUrls: ['./sure-arrive.component.less'] + styleUrls: ['./sure-arrive.component.less'], + providers: [DatePipe] }) export class VehicleSureArriveComponent implements OnInit { record: any = {}; i: any; + formData: any; Status: any; data: any ={ - place1: '', - place2: '' + weight: 0, + volume: 0 }; @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 datePipe: DatePipe,private envSrv: EAEnvironmentService, ) {} ngOnInit(): void { + console.log(this.i) + this.initData() + this.i.time = this.i.loadingTime; this.initSF(); } initSF() { + if(this.Status === 1) { + this.schema = { properties: { - datetime: { + time: { type: 'string', title: '卸货时间', format: 'date-time', }, - no2: { - type: 'string', - title: '卸货重量', - ui: { - widget: 'custom', - } - }, - no3: { - type: 'string', - title: '卸货体积', - ui: { - widget: 'custom', - } - }, - - avatar: { + imgUrl3: { type: 'string', title: '装货凭证', + readOnly: true, ui: { - action: `/scm/cms/cms/upload/multipartFile/fileModel`, - fileType: 'image/png,image/jpeg,image/jpg', + widget: 'upload', + action: apiConf.fileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', - descriptionI18n: ' 提单号', + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + descriptionI18n: '提货单', data: { - // appId: environment.appId, + appId: this.envSrv.env.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) => { + beforeUpload: (file: any, fileList: any) => { return new Observable((observer: Observer) => { - const isLt2M = file.size / 1024 / 1024 < 5; - if (!isLt2M) { + 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(isLt2M); + observer.next(isLt1M); observer.complete(); }); - } - } as SFUploadWidgetSchema + }, + multiple: false, + listType: 'picture-card', + } as SFUploadWidgetSchema, }, - avatar2: { + imgUrl4: { type: 'string', title: '', + readOnly: true, ui: { - action: `/scm/cms/cms/upload/multipartFile/fileModel`, - fileType: 'image/png,image/jpeg,image/jpg', + widget: 'upload', + action: apiConf.fileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', descriptionI18n: '人车货照片', data: { - // appId: environment.appId, + appId: this.envSrv.env.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) => { + beforeUpload: (file: any, fileList: any) => { return new Observable((observer: Observer) => { - const isLt2M = file.size / 1024 / 1024 < 5; - if (!isLt2M) { + 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(isLt2M); + observer.next(isLt1M); observer.complete(); }); - } - } as SFUploadWidgetSchema + }, + multiple: false, + listType: 'picture-card', + } as SFUploadWidgetSchema, }, no4: { type: 'string', @@ -174,124 +143,365 @@ export class VehicleSureArriveComponent implements OnInit { }, default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式', }, - avatar3: { + imgUrl1: { type: 'string', title: '卸货凭证', ui: { - action: `/scm/cms/cms/upload/multipartFile/fileModel`, - fileType: 'image/png,image/jpeg,image/jpg', + widget: 'upload', + action: apiConf.fileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', - descriptionI18n: ' 提单号', + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + descriptionI18n: '提货单', data: { - // appId: environment.appId, + appId: this.envSrv.env.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) => { + beforeUpload: (file: any, fileList: any) => { return new Observable((observer: Observer) => { - const isLt2M = file.size / 1024 / 1024 < 5; - if (!isLt2M) { + 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(isLt2M); + observer.next(isLt1M); observer.complete(); }); - } - } as SFUploadWidgetSchema + }, + multiple: false, + listType: 'picture-card', + } as SFUploadWidgetSchema, }, - avatar4: { + imgUrl2: { type: 'string', title: '', ui: { - action: `/scm/cms/cms/upload/multipartFile/fileModel`, - fileType: 'image/png,image/jpeg,image/jpg', + widget: 'upload', + action: apiConf.fileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - widget: 'upload', + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', descriptionI18n: '人车货照片', data: { - // appId: environment.appId, + appId: this.envSrv.env.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) => { + beforeUpload: (file: any, fileList: any) => { return new Observable((observer: Observer) => { - const isLt2M = file.size / 1024 / 1024 < 5; - if (!isLt2M) { + 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(isLt2M); + observer.next(isLt1M); observer.complete(); }); - } - } as SFUploadWidgetSchema + }, + multiple: false, + listType: 'picture-card', + } as SFUploadWidgetSchema, } }, - required: ['reason'] + required: ['time'] }; + }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', + } + }, + 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) => { + 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) => { + 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: '单张大小不超过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', + } 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', + } as SFUploadWidgetSchema, + } + }, + required: ['time', 'weight' ] + }; + } this.ui = { '*': { spanLabelFixed: 100, grid: { span: 20 } }, - $avatar: { grid: { span: 12} }, - $avatar2: { grid: { span: 12} }, - $avatar3: { grid: { span: 12} }, - $avatar4: { grid: { span: 12} }, + $imgUrl1: { grid: { span: 12} }, + $imgUrl2: { grid: { span: 12} }, + $imgUrl3: { grid: { span: 12} }, + $imgUrl4: { 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); - // }); - } + if(this.Status === 1) { + if(!value.time) { + this.service.msgSrv.warning('必填项为空!') + return; + } + const params = { + id: this.i.id, + imgUrl1: value.imgUrl1.data.fullFilePath, + imgUrl2: value.imgUrl2.data.fullFilePath, + time: value.time, + } + params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') + this.service.request(this.service.$api_get_insertWholeUnloadCarInfo, params).subscribe((res) => { + if(res) { + this.service.msgSrv.success('确认到车成功!') + this.modal.destroy(); + } else{ + this.service.msgSrv.error(res.msg) + } + }) + } else { + if(!value.time || !this.data.weight) { + this.service.msgSrv.warning('必填项为空!') + return; + } + console.log(value) + console.log(this.i) + 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 + } + params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') + console.log(params) + this.service.request(this.service.$api_get_insertBulkUnloadCarInfo, params).subscribe((res) => { + if(res) { + this.service.msgSrv.success('确认到车成功!') + this.modal.destroy(); + } else{ + this.service.msgSrv.error(res.msg) + } + }) + } + } + // 确认到车界面信息(两个只能看的图片) + initData() { + this.service.request(this.service.$api_get_getUnloadCarInfo, { id : this.i?.id}).subscribe((res) => { + console.log(res) + 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, + }, + }, + ], + }; + } + }) + } close(): void { this.modal.destroy(); } 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 ae1b3f58..44492a4f 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,7 +1,7 @@