From b2a03a42d1ff4eb6e1e27c95663376adc014378d Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 1 Apr 2022 13:16:30 +0800 Subject: [PATCH 1/4] fix bug --- .../bulk-detail-change.component.html | 12 +-- .../bulk-detail/bulk-detail.component.html | 16 ++-- .../components/bulk/bulk.component.html | 8 +- .../compliance-audit.component.html | 6 +- .../receipts-audit.component.html | 6 +- .../receipts-audit.component.ts | 4 +- .../components/risk/risk.component.html | 10 +- .../vehicle-detail-change.component.html | 14 +-- .../vehicle-detail.component.html | 96 +++++++++++-------- .../components/vehicle/vehicle.component.html | 4 +- .../index/partner-list.component.ts | 2 +- .../components/bulk/bulk.component.html | 4 +- .../vehicle-detail.component.html | 8 +- .../vehicle-detail.component.ts | 4 +- 14 files changed, 108 insertions(+), 86 deletions(-) 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 index e01bc599..532c7369 100644 --- 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 @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-24 16:58:02 * @LastEditors : Shiming - * @LastEditTime : 2022-03-11 16:40:47 + * @LastEditTime : 2022-04-01 10:58:50 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -33,8 +33,8 @@ {{ i?.goodsResource?.shipperAppUserName }} {{i?.goodsResource?.enterpriseProjectName}} {{i?.goodsResource?.serviceTypeLabel}} - {{i?.createUserName}} /{{i?.createUserPhone}} - {{i?.goodsResource?.dispatchName}}/{{i?.goodsResource?.dispatchPhone}} + {{i?.createUserName}} {{ i?.createUserPhone ? "/" + i?.createUserPhone : ''}} + {{i?.goodsResource?.dispatchName}}{{ i?.goodsResource?.dispatchPhone ? "/" + i?.goodsResource?.dispatchPhone : ''}} @@ -236,10 +236,10 @@ - {{ i?.carModel }}/{{ i?.carLength }} + {{ i?.carModel }}{{ i?.carLength ? "/" + i?.carLength : ''}} - {{i?.driverName}}/{{i?.driverPhone}}/{{i?.carNo}} + {{i?.driverName}}{{ i?.driverPhone ? "/" + i?.driverPhone : ''}}{{ i?.carNo ? "/" + i?.carNo : ''}} {{ i?.driverCarModelLabel }},{{ i?.driverCarLengthLabel }}米,{{ i?.driverCarWeight }}吨 @@ -275,7 +275,7 @@ 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}%) -
车队长:{{ i?.payeeName }}/{{ i?.payeePhone }}
+
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" + i?.payeePhone : ''}}
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 876944ea..1bb3fc7c 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 @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-06 20:20:26 * @LastEditors : Shiming - * @LastEditTime : 2022-03-30 17:39:43 + * @LastEditTime : 2022-04-01 10:56:13 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -43,8 +43,8 @@ {{ i?.goodsResource?.shipperAppUserName }} {{ i?.goodsResource?.enterpriseProjectName }} {{ i?.goodsResource?.serviceTypeLabel }} - {{ i?.createUserName }} /{{ i?.createUserPhone }} - {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} + {{ i?.createUserName }} {{ i?.createUserPhone ? "/" + i?.createUserPhone : ''}} + {{ i?.goodsResource?.dispatchName }}{{ i?.goodsResource?.dispatchPhone ? "/" + i?.goodsResource?.dispatchPhone : ''}} {{ i?.goodsResource?.resourceCode }} {{ i?.wayBill?.wayBillCode }} {{ i?.goodsResource?.paymentDays }} @@ -83,8 +83,8 @@ {{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 - {{ i?.carModel }}/{{ i?.carLength }} - {{ i?.driverName }}/{{ i?.driverPhone }}{{ i?.carNo }} + {{ i?.carModel }}{{ i?.carLength ? "/" + i?.carLength : ''}} + {{ i?.driverName }}{{i?.driverPhone ? "/" + i?.driverPhone : ''}}{{ i?.carNo ? "/" + i?.carNo : ''}} {{ i?.driverCarModelLabel }},{{ i?.driverCarLengthLabel }}米,{{ i?.driverCarWeight }}吨 @@ -76,13 +76,13 @@
卸 | {{ item?.unloadTime }}
-
{{ item?.driverName }}/{{ item?.driverPhone }}/{{ item?.carNo }}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}}
-
{{ item?.payeeName }}/{{ item?.payeePhone }}
+
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
-
{{ item?.createUserName }}/{{ item?.createUserPhone }}
+
{{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }}
{{ item.billCode }} diff --git a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html index f586416d..ea93a1a5 100644 --- a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html +++ b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-03-29 14:28:39 + * @LastEditTime : 2022-04-01 10:59:54 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\compliance-audit\\compliance-audit.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -81,10 +81,10 @@
卸 | {{ item?.unloadingTime }}
-
{{ item?.driverName }}/{{ item?.driverPhone }}/{{ item?.carNo }}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : '' }}
-
{{ item?.payeeName }}/{{ item?.payeePhone }}
+
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
{{ item.billCode }} 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 6fa93400..684c8358 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-03-25 13:44:11 + * @LastEditTime : 2022-04-01 11:00:38 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\receipts-audit\\receipts-audit.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -92,10 +92,10 @@
卸 | {{ item?.unloadingTime }}
-
{{ item?.driverName }}/{{ item?.driverPhone }}/{{ item?.carNo }}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" + item?.carNo : '' }}
-
{{ item?.payeeName }}/{{ item?.payeePhone }}
+
{{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }}
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 93919f4d..fad07423 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 @@ -555,10 +555,10 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { // this.getGoodsSourceStatistical(); // }) { - this.service.downloadFile(this.service.$api_createBillTakeGoods,{billIds: params.join(',')}) + this.service.downloadFile(this.service.$api_createBillTakeGoods,params) - this.service.downloadFile(this.service.$api_createBillDischargeGoods,{billIds: params.join(',')})} + this.service.downloadFile(this.service.$api_createBillDischargeGoods,params)} }); } diff --git a/src/app/routes/order-management/components/risk/risk.component.html b/src/app/routes/order-management/components/risk/risk.component.html index b211966d..2bde8ffd 100644 --- a/src/app/routes/order-management/components/risk/risk.component.html +++ b/src/app/routes/order-management/components/risk/risk.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-03-24 19:53:19 + * @LastEditTime : 2022-04-01 11:02:21 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\risk\\risk.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -84,10 +84,10 @@ -
{{ item?.driverName }}/{{ item?.driverPhone }}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}}
-
{{ item?.payeeName }}/{{ item?.payeePhone }}
+
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
@@ -97,8 +97,8 @@

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

-

重量/体积:{{ i?.weight }}吨/{{ i?.volume }}方

-

车型/车长:{{ i?.carModelLabel }}/ {{ i?.carLengthLabel }}

+

重量/体积:{{ i?.weight ? i?.weight + '吨' : '' }}{{ i?.volume ? "/" + i?.volume + '方' : ''}}

+

车型/车长:{{ i?.carModelLabel }} {{ i?.carLengthLabel ? "/" + i?.carLengthLabel : ''}}

diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html index fc70c914..31a07be6 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-23 13:39:58 * @LastEditors : Shiming - * @LastEditTime : 2022-03-23 14:46:17 + * @LastEditTime : 2022-04-01 11:08:44 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -32,8 +32,10 @@ {{ i?.goodsResource?.shipperAppUserName }} {{ i?.goodsResource?.enterpriseProjectName }} {{ i?.goodsResource?.serviceTypeLabel }} - {{ i?.createUserName || i?.goodsResource?.createUserName }} /{{ i?.createUserPhone || i?.goodsResource?.createUserPhone }} - {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} + {{ i?.createUserName }} {{ i?.createUserPhone ? '/' + i?.createUserPhone : '' }} + {{ i?.goodsResource?.dispatchName }}{{ i?.goodsResource?.dispatchPhone ? '/' + i?.goodsResource?.dispatchPhone : '' }} + {{ i?.externalBillCode }} {{ i?.goodsResource?.resourceCode }} {{ i?.wayBillId }} @@ -216,10 +218,10 @@ - {{ i?.carModel }}/{{ i?.carLength }} + {{ i?.carModel }}{{ i?.carLength ? '/' + i?.carLength : '' }} - {{i?.driverName}}/{{i?.driverPhone}}/{{i?.carNo}} + {{ i?.driverName }}{{i?.driverPhone ? "/" + i?.driverPhone : ''}}{{ i?.carNo ? "/" + i?.carNo : ''}} @@ -251,7 +253,7 @@ 总计:{{ i?.totalAmount | currency }} (运费{{ i?.totalFreight | currency }}, 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}% )
-
车队长:{{ i?.payeeName }}/{{ i?.payeePhone }}
+
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" + i?.payeePhone : ''}}
diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index fc61bbff..12a00d05 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-30 09:36:23 + * @LastEditTime : 2022-04-01 11:06:21 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -15,24 +15,26 @@
-
+

订单号: {{ i?.billCode }}

-
+
@@ -43,8 +45,10 @@ {{ i?.goodsResource?.shipperAppUserName }} {{ i?.goodsResource?.enterpriseProjectName }} {{ i?.goodsResource?.serviceTypeLabel }} - {{ i?.createUserName || i?.goodsResource?.createUserName }} /{{ i?.createUserPhone || i?.goodsResource?.createUserPhone }} - {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} + {{ i?.createUserName }} {{ i?.createUserPhone ? '/' + i?.createUserPhone : '' }} + {{ i?.goodsResource?.dispatchName }}{{ i?.goodsResource?.dispatchPhone ? '/' + i?.goodsResource?.dispatchPhone : '' }} + {{ i?.externalBillCode }} {{ i?.goodsResource?.resourceCode }} {{ i?.wayBill?.wayBillCode }} @@ -66,9 +70,13 @@
  - + [nzStatus]="item.displayStatus === 'SHOW' ? 'finish' : 'wait'" + >
@@ -86,8 +94,8 @@ {{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 - {{ i?.carModel }}/{{ i?.carLength }} - {{ i?.driverName }}/{{ i?.driverPhone }}/{{ i?.carNo }} + {{ i?.carModel }}{{ i?.carLength ? '/' + i?.carLength : '' }} + {{ i?.driverName }}{{ i?.driverPhone ? '/' + i?.driverPhone : '' }}{{ i?.carNo ? '/' + i?.carNo : '' }} {{ i?.driverCarModelLabel }},{{ i?.driverCarLengthLabel }}米,{{ i?.driverCarWeight }}吨
@@ -108,7 +116,7 @@

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

-

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

+

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

@@ -122,7 +130,7 @@

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

-

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

+

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

@@ -135,25 +143,24 @@ - {{i?.goodsResource?.insuranceTypeLabel}} + {{ i?.goodsResource?.insuranceTypeLabel }} - {{i?.goodsResource?.goodsValue !==null?(i?.goodsResource?.goodsValue|currency)+'元':'-'}} + {{ i?.goodsResource?.goodsValue !== null ? (i?.goodsResource?.goodsValue | currency) + '元' : '-' }} - {{i?.goodsResource?.insurancePremium!==null?(i?.goodsResource?.insurancePremium |currency)+'元':'-'}} + {{ i?.goodsResource?.insurancePremium !== null ? (i?.goodsResource?.insurancePremium | currency) + '元' : '-' }} - {{ item.price | currency }} - {{ item.price + item.surcharge | currency }} + {{ item.price + item.surcharge | currency }} {{ item.surcharge | currency }} @@ -161,16 +168,16 @@
总计:{{ i?.totalAmount | currency }} (运费{{ i?.totalFreight | currency }}, - 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}% ) + 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2) }}% )
-
车队长:{{ i?.payeeName }}/{{ i?.payeePhone }}
+
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? '/' + i?.payeePhone : '' }}
- 查看附件      - 补充协议 + 查看附件      + 补充协议 @@ -190,7 +197,9 @@ {{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }} - {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} + + {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} + {{ i?.supplementaryInformationVO?.area }} @@ -213,12 +222,20 @@
- +
-
+
@@ -230,36 +247,39 @@
- + - -
- 您的订单可能存在交易风险,请及时提交申诉材料,提交成功后,平台将及时完成审核并通知您! -
+ +
您的订单可能存在交易风险,请及时提交申诉材料,提交成功后,平台将及时完成审核并通知您!
如果您的运单没有问题,可以提出申诉,并提供相关资料,我们将24小时内审核反馈
    -
  • 系统识别:{{item?.complianceTypeName}}
  • -
  • {{item?.determineDetails}},您可在企业端提交申诉材料或联系客服。
  • +
  • 系统识别:{{ item?.complianceTypeName }}
  • +
  • {{ item?.determineDetails }},您可在企业端提交申诉材料或联系客服。
  • 2021-11-07 03:20:15
- - + - - +
- +
暂无附件信息
- +
diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.html b/src/app/routes/order-management/components/vehicle/vehicle.component.html index 835a7e4c..560ff7c0 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.html +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-03-31 16:05:06 + * @LastEditTime : 2022-04-01 11:03:39 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle\\vehicle.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -69,7 +69,7 @@
-
{{ item?.createUserName }}/{{ item?.createUserPhone }}
+
{{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }}
@@ -76,7 +76,7 @@ [loading]="false" > -
{{ item?.createUserName }}/{{ item?.createUserPhone }}
+
{{ item?.createUserName }}{{ item?.createUserPhone ? '/' + item?.createUserPhone : ''}}
diff --git a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html index 5d3eedb2..c4befd05 100644 --- a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html @@ -1,7 +1,7 @@
- -
- -
+ +
+ +
电子装货单
- -
- -
-
+ +
电子卸货单
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 index 54b91f69..b3262631 100644 --- 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 @@ -30,6 +30,7 @@ import { OrderManagementService } from '../../../services/order-management.servi export class orderManagementVoucherViewComponent implements OnInit { record: any = {}; i: any; + loadPDF: string = ''; formData: any; Status: any; data: any ={ @@ -52,6 +53,7 @@ export class orderManagementVoucherViewComponent implements OnInit { if(this.Status == 1) { this.schema = { + properties: { loadingLadingBillFilePath: { type: 'string', @@ -217,9 +219,15 @@ export class orderManagementVoucherViewComponent implements OnInit { required: ['loadingLadingBillFilePath', 'loadingPeopleVehiclesGoodsFilePath','unloadingLadingBillFilePath','unloadingPeopleVehiclesGoodsFilePath' ] }; }else { - console.log('只读') this.schema = { properties: { + no0: { + type: 'string', + title: '', + ui: { + widget: 'custom', + }, + }, loadingLadingBillFilePath: { type: 'string', title: '装货凭证', @@ -298,6 +306,7 @@ export class orderManagementVoucherViewComponent implements OnInit { listType: 'picture-card', } as SFUploadWidgetSchema, }, + no4: { type: 'string', title: '', @@ -306,6 +315,13 @@ export class orderManagementVoucherViewComponent implements OnInit { }, default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式', }, + no6: { + type: 'string', + title: '', + ui: { + widget: 'custom', + }, + }, unloadingLadingBillFilePath: { type: 'string', title: '卸货凭证', @@ -486,5 +502,41 @@ export class orderManagementVoucherViewComponent implements OnInit { close(): void { this.modal.destroy(true); } - + openlaod(value: any) { + "https://sascs-tj-tms-test.obs.cn-south-1.myhuaweicloud.com:443/854be85a81d4471ebeb9cda464dcc5eb.pdf" + let url: any = 'https://sascs-tj-tms-test.obs.cn-south-1.myhuaweicloud.com:443/854be85a81d4471ebeb9cda464dcc5eb.pdf'; + const xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'blob'; + //xhr.setRequestHeader('Authorization', 'Basic a2VybWl0Omtlcm1pdA=='); + xhr.onload = () => { + if (xhr.status === 200) { + // 获取文件blob数据并保存 + var fileName = this.getFileName(url); + console.log(xhr.response); + + // saveAs(xhr.response, fileName); + } + }; + xhr.send(); + // const disp = res.headers.get('Content-Disposition'); + // const blob = new Blob([res.body], { type: 'text/plain;charset=utf-8' }); + // const url = window.URL.createObjectURL(blob); + // const a = document.createElement('a'); + // const fileName = disp.split(';')[1].split('=')[1]; + // a.href = url; + // a.download = decodeURI(fileName); + // a.click(); + // window.URL.revokeObjectURL(url); + // console.log(value?.loadingLadingBillFilePath); + // this.loadPDF = value?.loadingLadingBillFilePath; + } + getFileName(url:any) + { + var num = url.lastIndexOf('/')+1 + var fileName = url.substring(num) + //把参数和文件名分割开 + fileName = decodeURI(fileName.split("?")[0]); + return fileName; + } } From 45d96c1dbdda5664a1a38f112a7a35bf95093717 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 1 Apr 2022 15:31:22 +0800 Subject: [PATCH 3/4] fix bug --- .../receipts-audit.component.ts | 6 +- .../voucher-view/voucher-view.component.html | 7 +-- .../voucher-view/voucher-view.component.ts | 59 ++++++------------- 3 files changed, 24 insertions(+), 48 deletions(-) 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 1a208dab..169a656f 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 @@ -397,19 +397,19 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { { text: '生成电子单据', click: _record => this.generate(_record, 2), - iif: item => item.auditStatus == '1' && !item.loadingLadingBillFilePath, + iif: item => !item.loadingLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }, }, { text: '通过', click: _record => this.sign(_record), - iif: item => item.auditStatus == '1' && !item.loadingLadingBillFilePath, + iif: item => !item.loadingLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }, }, { text: '修改', click: _record => this.modification(_record), - iif: item => item.auditStatus == '1' && !item.loadingLadingBillFilePath, + iif: item => !item.loadingLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }, }, { 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 index 80895431..7cf7bc57 100644 --- 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 @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-15 13:17:42 * @LastEditors : Shiming - * @LastEditTime : 2022-04-01 14:27:47 + * @LastEditTime : 2022-04-01 15:28:44 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\audit\\voucher-view\\voucher-view.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -12,12 +12,11 @@
- -
电子装货单
+
电子装货单
-
电子卸货单
+
电子卸货单
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 index b3262631..2a24f881 100644 --- 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 @@ -32,6 +32,7 @@ export class orderManagementVoucherViewComponent implements OnInit { i: any; loadPDF: string = ''; formData: any; + datas: any; Status: any; data: any ={ weight: 0, @@ -438,17 +439,16 @@ export class orderManagementVoucherViewComponent implements OnInit { } sure() { const params = [this.i.id]; - this.service.request(this.service.$api_get_billAuditPass, params).subscribe((res) => { - if(res) { - this.service.msgSrv.success('生成电子单据成功!') - this.modal.destroy(true); - } - }) + this.service.downloadFile(this.service.$api_createBillTakeGoods,params) + this.service.downloadFile(this.service.$api_createBillDischargeGoods,params) + this.service.msgSrv.success('生成电子单据成功!') + this.modal.destroy(true); } // 确认到车界面信息(两个只能看的图片) initData() { this.service.request(this.service.$api_get_getCredentials, { id : this.i?.id}).subscribe((res) => { console.log(res) + this.datas = res if (res.unloadingLadingBillFilePath) { this.formData = { loadingLadingBillFilePath: [ @@ -503,40 +503,17 @@ export class orderManagementVoucherViewComponent implements OnInit { this.modal.destroy(true); } openlaod(value: any) { - "https://sascs-tj-tms-test.obs.cn-south-1.myhuaweicloud.com:443/854be85a81d4471ebeb9cda464dcc5eb.pdf" - let url: any = 'https://sascs-tj-tms-test.obs.cn-south-1.myhuaweicloud.com:443/854be85a81d4471ebeb9cda464dcc5eb.pdf'; - const xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.responseType = 'blob'; - //xhr.setRequestHeader('Authorization', 'Basic a2VybWl0Omtlcm1pdA=='); - xhr.onload = () => { - if (xhr.status === 200) { - // 获取文件blob数据并保存 - var fileName = this.getFileName(url); - console.log(xhr.response); - - // saveAs(xhr.response, fileName); - } - }; - xhr.send(); - // const disp = res.headers.get('Content-Disposition'); - // const blob = new Blob([res.body], { type: 'text/plain;charset=utf-8' }); - // const url = window.URL.createObjectURL(blob); - // const a = document.createElement('a'); - // const fileName = disp.split(';')[1].split('=')[1]; - // a.href = url; - // a.download = decodeURI(fileName); - // a.click(); - // window.URL.revokeObjectURL(url); - // console.log(value?.loadingLadingBillFilePath); - // this.loadPDF = value?.loadingLadingBillFilePath; - } - getFileName(url:any) - { - var num = url.lastIndexOf('/')+1 - var fileName = url.substring(num) - //把参数和文件名分割开 - fileName = decodeURI(fileName.split("?")[0]); - return fileName; + if(value === 1) { + const a = document.createElement('a'); + console.log(this.datas?.loadingLadingBillFilePath); + a.href = this.datas?.loadingLadingBillFilePath; + a.click(); + } else { + const a = document.createElement('a'); + console.log(this.datas?.loadingPeopleVehiclesGoodsFilePath); + a.href = this.datas?.loadingPeopleVehiclesGoodsFilePath; + a.click(); + } + } } From 5f06aaf4a4f082d632bdcc4ada23010f012ba628 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 1 Apr 2022 16:00:39 +0800 Subject: [PATCH 4/4] fix bug --- .../receipts-audit/receipts-audit.component.ts | 14 ++++++++------ .../audit/voucher-view/voucher-view.component.html | 2 +- .../audit/voucher-view/voucher-view.component.ts | 14 +++++++++----- 3 files changed, 18 insertions(+), 12 deletions(-) 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 169a656f..265d5c0f 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 @@ -397,25 +397,25 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { { text: '生成电子单据', click: _record => this.generate(_record, 2), - iif: item => !item.loadingLadingBillFilePath, + iif: item => !item?.loadingLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }, }, { text: '通过', click: _record => this.sign(_record), - iif: item => !item.loadingLadingBillFilePath, + iif: item => !item?.loadingLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }, }, { text: '修改', click: _record => this.modification(_record), - iif: item => !item.loadingLadingBillFilePath, + iif: item => !item?.loadingLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }, }, { text: '查看凭证', click: _record => this.generate(_record, 3), - iif: item => item.loadingLadingBillFilePath, + iif: item => item?.loadingLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-view'] }, }, ] @@ -491,8 +491,10 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { nzFooter: null }); modalRef.afterClose.subscribe((result: any) => { - this.st.load(1); - this.getGoodsSourceStatistical() + if(result) { + this.st.load(); + this.getGoodsSourceStatistical() + } }); } // 通过 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 index 7cf7bc57..fe3fd680 100644 --- 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 @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-15 13:17:42 * @LastEditors : Shiming - * @LastEditTime : 2022-04-01 15:28:44 + * @LastEditTime : 2022-04-01 15:48:01 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\audit\\voucher-view\\voucher-view.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> 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 index 2a24f881..23477086 100644 --- 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 @@ -438,7 +438,7 @@ export class orderManagementVoucherViewComponent implements OnInit { }) } sure() { - const params = [this.i.id]; + const params = [this.i?.id]; this.service.downloadFile(this.service.$api_createBillTakeGoods,params) this.service.downloadFile(this.service.$api_createBillDischargeGoods,params) this.service.msgSrv.success('生成电子单据成功!') @@ -505,14 +505,18 @@ export class orderManagementVoucherViewComponent implements OnInit { openlaod(value: any) { if(value === 1) { const a = document.createElement('a'); - console.log(this.datas?.loadingLadingBillFilePath); a.href = this.datas?.loadingLadingBillFilePath; - a.click(); + document.body.appendChild(a); + console.log(document.body.contains(a)) + a.click(); //点击下载 + document.body.removeChild(a); //下载完成移除元素 } else { const a = document.createElement('a'); - console.log(this.datas?.loadingPeopleVehiclesGoodsFilePath); a.href = this.datas?.loadingPeopleVehiclesGoodsFilePath; - a.click(); + document.body.appendChild(a); + console.log(document.body.contains(a)) + a.click(); //点击下载 + document.body.removeChild(a); //下载完成移除元素 } }