From d919231f874337ee965448f88524e07b314b9209 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 21 Jan 2022 13:24:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=89=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../receipts-audit.component.html | 99 +--- .../receipts-audit.component.ts | 253 +-------- .../voucher-view/voucher-view.component.html | 30 ++ .../voucher-view/voucher-view.component.less | 7 + .../voucher-view/voucher-view.component.ts | 481 ++++++++++++++++++ .../order-management.module.ts | 6 +- 6 files changed, 553 insertions(+), 323 deletions(-) create mode 100644 src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.html create mode 100644 src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.less create mode 100644 src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html index 6ecd3f78..c06ff1d0 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-01-21 10:47:36 + * @LastEditTime : 2022-01-21 11:17:05 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\receipts-audit\\receipts-audit.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -119,101 +119,8 @@ - - - - - - {{ index + 1 }} - - -
- 待确认 - 已确认 - 已撤销 - 拒绝 -
-
-
-
- - - - -
- - - - -
- -
元/吨
-
-
-
- - - - {{ item.amountBeforeChange | currency}} - - - ¥{{ item.amountchangeValue | number: '0.2-2'}} - - - {{ item.amountAfterChange | currency}} - - -
变更原因:{{ViewCause?.changeCause}}
-
拒绝原因:{{ViewCause?.refuseCause}}
-
注:附加费依据调整后的运输费用重新计算
-
- - - - -
- - - - - -
- 评分: -
评价内容:
-
-
- -
- 暂无评价内容 -
-
-
-
- - - - -
@@ -226,9 +133,9 @@
- + -->
\ No newline at end of file diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts index b91695de..5202ec6f 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts @@ -10,6 +10,7 @@ import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-r import { of } from 'rxjs'; import { ShipperBaseService } from '@shared'; import { Router } from '@angular/router'; +import { orderManagementVoucherViewComponent } from '../../modal/audit/voucher-view/voucher-view.component'; @Component({ selector: 'app-order-management-receipts-audit', @@ -26,35 +27,10 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { isVisibleEvaluate = false; isVisible = false; _$expand = false; - changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录 - changeViewId: any; // 查看运费变更记录id - 用于查看 - ViewCause: any; // 变更运费查看数据 - sfViewFormData: any; // 变更运费查看的sf 数据 @ViewChild('st') private readonly st!: STComponent; - @ViewChild('stFloat') private readonly stFloat!: STComponent; - @ViewChild('stFloatView') private readonly stFloatView!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; - @ViewChild('sfFre', { static: false }) sfFre!: SFComponent; - @ViewChild('sfView', { static: false }) sfView!: SFComponent; columns: STColumn[] = []; - columnsFloat: STColumn[] = []; - columnsFloatView: STColumn[] = []; - demoValue: any; resourceStatus: any; - datass: any = [ - { - one: '1', - two: '1', - three: '1', - id: 1 - }, - { - one: '2', - two: '2', - three: '2', - id: 2 - } - ]; tabs = { cancelQuantity: 0, receivedQuantity: 0, @@ -93,11 +69,6 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { get selectedRows() { return this.st?.list.filter(item => item.checked) || []; } - get changeParams() { - return { - id: this.changeId - }; - } search() { this.st?.load(1); this.getGoodsSourceStatistical(); @@ -139,9 +110,6 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { this.getGoodsSourceStatistical(); this.initSF(); this.initST(); - this.initSTFloat(); - this.initSTFloatView(); - this.initSFView(); } /** @@ -295,42 +263,6 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { }; this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } - /** - * 初始化查询表单 - */ - initSFView() { - this.schemaView = { - properties: { - freightPrice: { - type: 'string', - title: '运费单价' - }, - rule: { - title: '', - type: 'string', - ui: { - widget: 'dict-select', - params: { dictKey: 'goodresource:rounding:rules' }, - visibleIf: { - _$expand: (value: boolean) => value - } - } as SFSelectWidgetSchema - }, - settlementBasis: { - type: 'string', - title: '结算重量', - ui: { - widget: 'dict-select', - params: { dictKey: 'goodresource:settlement:type' }, - visibleIf: { - _$expand: (value: boolean) => value - } - } as SFSelectWidgetSchema - } - } - }; - this.uiView = { '*': { spanLabelFixed: 80, grid: { span: 12, gutter: 4 } } }; - } /** * 初始化数据列表 @@ -408,94 +340,29 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { buttons: [ { text: '通过', - click: _record => this.viewEvaluate(_record), - iif: item => item.billStatus == '5' + click: _record => console.log('1'), + // iif: item => item.billStatus == '5' }, { text: '生成电子单据', - click: _record => this.OpenPrice(_record), - iif: item => - item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '6' + click: _record => this.generate(_record), + // iif: item => item.billStatus == '4' }, { text: '修改', - click: _record => this.updateFreight(_record), - iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' + click: _record => this.modification(_record), + // iif: item => item.billStatus == '4' }, ] } ]; } - initSTFloat() { - this.columnsFloat = [ - { - title: '序号', - className: 'text-center', - render: 'order' - }, - { - title: '操作时间', - className: 'text-center', - index: 'applyTime' - }, - { - title: '操作人', - className: 'text-center', - index: 'applyUserName' - }, - { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, - { - title: '操作', - fixed: 'right', - className: 'text-left', - buttons: [ - { - text: '查看', - click: _record => this.FloatView(_record) - }, - // { - // text: '查看协议', - // click: (_record, _modal, _instance) => this.view(_record) - // }, - { - text: '撤销', - click: _record => this.revoke(_record), - iif: item => item.handleStatus === '1' || item.handleStatus === 1 - } - ] - } - ]; - } - initSTFloatView() { - this.columnsFloatView = [ - { - title: '费用名称', - width: '100px', - className: 'text-center', - index: 'costName' - }, - { - title: '变更前', - width: '100px', - className: 'text-center', - index: 'amountAfterChange', - render: 'amountAfterChange' - }, - { title: '变更值', index: 'amountchangeValue', width: '120px', className: 'text-center', render: 'amountchangeValue' }, - { title: '变更后', index: 'amountBeforeChange', render: 'amountBeforeChange', width: '120px', className: 'text-center' } - ]; - } /** * 查询字段个数 */ get queryFieldCount(): number { return Object.keys(this.schema?.properties || {}).length; } - get changeViewParams() { - return { - id: this.changeViewId - }; - } /** * 伸缩查询条件 */ @@ -518,74 +385,19 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { importGoodsSource() {} audit(item: any) {} - /* - * 审核关闭弹窗 - view: 1 - 浮动费用: 0 - 查看评价: 3 - */ - handleCancel(type: string) { - if (type === '0') { - this.isVisible = false; - } else if (type === '1') { - console.log(type); - this.isVisibleView = false; - } else if (type === '2') { - this.isVisibleEvaluate = false; - } - } /** * 审核通过按钮 */ handleOK() {} OpenPrice(item: any) { - this.changeId = item.id; this.isVisible = true; } - /** - * 浮动费用查看 - */ - FloatView(item: any) { - this.changeViewId = item.id; - this.service.request(this.service.$api_getChangeRecordBulkDetail, { id: this.changeViewId }).subscribe(res => { - this.ViewCause = res; - }); - this.isVisibleView = true; - } - /** - *查看评价 - */ - viewEvaluate(item: any) { - this.isVisibleEvaluate = true; - } - /** - *变更运费 - */ - updateFreight(item: any) { - this.service.request(this.service.$api_getFreightChangeBulkDetail, { id: item.id }).subscribe(data => { - if (data) { - const modal = this.modal.create({ - nzTitle: '变更运费', - nzWidth: 580, - nzContent: UpdateFreightComponent, - nzComponentParams: { data: { ...data, billId: item.id } }, - nzFooter: null - }); - modal.afterClose.subscribe(_ => { - this.st.reload(1); - this.getGoodsSourceStatistical(); - }); - } - }); - } - - // *确认签收 - - confirmReceipt(item: any) { + // 修改 + modification(item: any) { const modalRef = this.modal.create({ - nzTitle: '确认签收', + nzTitle: '修改', nzWidth: '50%', - nzContent: ConfirReceiptComponent, + nzContent: orderManagementVoucherViewComponent, nzComponentParams: { i: item, Status: 1 @@ -594,20 +406,25 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { }); modalRef.afterClose.subscribe((result: any) => { this.st.load(1); - this.getGoodsSourceStatistical(); - }); + this.getGoodsSourceStatistical() + }); } - userAction() { - let params: any[] = []; - this.selectedRows.forEach(item => { - params.push(item.id); - }); - this.service.request(this.service.$api_get_batchSignBulkOrder, params).subscribe(res => { - if (res) { - this.st.load(1); - this.getGoodsSourceStatistical(); - } + // 生成电子单据 + generate(item: any) { + const modalRef = this.modal.create({ + nzTitle: '查看凭证', + nzWidth: '50%', + nzContent: orderManagementVoucherViewComponent, + nzComponentParams: { + i: item, + Status: 2 + }, + nzFooter: null }); + modalRef.afterClose.subscribe((result: any) => { + this.st.load(1); + this.getGoodsSourceStatistical() + }); } // 取消订单 cancellation(item: any) { @@ -628,20 +445,6 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { }) }); } - revoke(item: any) { - this.modal.confirm({ - nzTitle: '是否确定立即撤销费用变更!', - nzOnOk: () => - this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id }).subscribe(res => { - if (res) { - this.service.msgSrv.success('撤销成功!'); - this.stFloat.reload(); - this.st?.reload(1); - this.getGoodsSourceStatistical(); - } - }) - }); - } // 修改订单 changeOrder(value: any) { this.router.navigate(['order-management/bulk-detailChange', value.id]); diff --git a/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.html b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.html new file mode 100644 index 00000000..47ab667b --- /dev/null +++ b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.html @@ -0,0 +1,30 @@ + + + + +
+ +
+
+
+ +
+ +
+
+
+
+ + diff --git a/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.less b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.less new file mode 100644 index 00000000..30444d6b --- /dev/null +++ b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.less @@ -0,0 +1,7 @@ + .left_btn { + width: 50px; + height: 32px; + padding-left: 8px; + line-height:32px; + background-color: #d7d7d7; + } \ No newline at end of file diff --git a/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts new file mode 100644 index 00000000..1c090997 --- /dev/null +++ b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts @@ -0,0 +1,481 @@ + +import { Component, OnInit, ViewChild } from '@angular/core'; +import { DatePipe } from '@angular/common'; +import { + SFComponent, + SFCustomWidgetSchema, + SFDateWidgetSchema, + SFNumberWidgetSchema, + SFRadioWidgetSchema, + SFSchema, + SFSelectWidgetSchema, + SFTextareaWidgetSchema, + 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 { 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-voucher-view', + templateUrl: './voucher-view.component.html', + styleUrls: ['./voucher-view.component.less'], + providers: [DatePipe] +}) +export class orderManagementVoucherViewComponent implements OnInit { + record: any = {}; + i: any; + formData: any; + Status: any; + data: any ={ + 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: 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: { + imgUrl3: { + 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, + }, + imgUrl4: { + 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: '单张大小不超过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'] + }; + }else { + 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) => { + 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: '卸货凭证', + 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, + }, + imgUrl2: { + 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, + } + }, + required: ['time', 'weight' ] + }; + } + this.ui = { + '*': { + spanLabelFixed: 100, + grid: { span: 20 } + }, + $imgUrl1: { grid: { span: 12} }, + $imgUrl2: { grid: { span: 12} }, + $imgUrl3: { grid: { span: 12} }, + $imgUrl4: { grid: { span: 12} }, + }; + } + save(value: any): void { + 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(true); + } + }) + } 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(true); + } + }) + } + + } + // 确认到车界面信息(两个只能看的图片) + 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(true); + } + +} diff --git a/src/app/routes/order-management/order-management.module.ts b/src/app/routes/order-management/order-management.module.ts index 14436268..6b2a6a5e 100644 --- a/src/app/routes/order-management/order-management.module.ts +++ b/src/app/routes/order-management/order-management.module.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-06 09:24:00 * @LastEditors : Shiming - * @LastEditTime : 2022-01-19 17:10:24 + * @LastEditTime : 2022-01-21 11:12:17 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\order-management.module.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -23,6 +23,7 @@ import { OrderManagementVehicleDetailChangeComponent } from './components/vehicl import { OrderManagementVehicleDetailComponent } from './components/vehicle-detail/vehicle-detail.component'; import { OrderManagementVehicleComponent } from './components/vehicle/vehicle.component'; +import { orderManagementVoucherViewComponent } from './modal/audit/voucher-view/voucher-view.component'; import { ConfirReceiptComponent } from './modal/bulk/confir-receipt/confir-receipt.component'; import { UpdateFreightComponent } from './modal/bulk/update-freight/update-freight.component'; import { OneCarOrderCancelComponent } from './modal/vehicle/cancel/cancel.component'; @@ -56,7 +57,8 @@ const COMPONENTS: Type[] = [ VehicleFreightPeopleComponent, VehicleModifyCaptainComponent, OrderManagementComplaintDetailComponent, - OrderManagementReceiptsAuditComponent + OrderManagementReceiptsAuditComponent, + orderManagementVoucherViewComponent ]; @NgModule({