From 5aec1bf8f12ce2c02d05f5eaae3700ccb3b0cf3c Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 28 Dec 2021 17:26:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qrcode-page/qrcode-page.component.html | 29 ++++++++++++------- .../qrcode-page/qrcode-page.component.ts | 28 +++++++----------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html index d9337a41..537dbbe2 100644 --- a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html +++ b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html @@ -1,14 +1,23 @@ + -
+
-

公司名称:{{i.companyName}}

+

公司名称 : {{i?.enterpriseInfoName}}

-
卸货地:{{i.adddress}}
-
装货地:{{i.adddress}}
-
截止时间:{{i.createdAt}}
-
Tips:二维码用于司机扫码抢单
+
卸货地 : {{address}}
+
装货地 : {{address}}
+
截止时间 : {{i?.deadlineTime}}
+
Tips : 二维码用于司机扫码抢单
- -
\ No newline at end of file + +
+ diff --git a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts index 475e28dc..03f637d9 100644 --- a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts +++ b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts @@ -1,9 +1,14 @@ -import { THIS_EXPR } from '@angular/compiler/src/output/output_ast'; +/* + * @Author: your name + * @Date: 2021-12-03 11:10:14 + * @LastEditTime: 2021-12-28 17:24:54 + * @LastEditors: your name + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\app\routes\supply-management\components\qrcode-page\qrcode-page.component.ts + */ import { Component, OnInit, ViewChild } from '@angular/core'; import { QRComponent } from '@delon/abc/qr'; import { SFSchema, SFUISchema } from '@delon/form'; -import { _HttpClient } from '@delon/theme'; -import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalRef } from 'ng-zorro-antd/modal'; @@ -15,16 +20,7 @@ export class SupplyManagementQrcodePageComponent implements OnInit { @ViewChild('qr') qr!: QRComponent; record: any = {}; i: any; - schema: SFSchema = { - properties: { - no: { type: 'string', title: '编号' }, - owner: { type: 'string', title: '姓名', maxLength: 15 }, - callNo: { type: 'number', title: '调用次数' }, - href: { type: 'string', title: '链接', format: 'uri' }, - description: { type: 'string', title: '描述', maxLength: 140 }, - }, - required: ['owner', 'callNo', 'href', 'description'], - }; + schema: SFSchema = {}; ui: SFUISchema = { '*': { spanLabelFixed: 100, @@ -44,15 +40,13 @@ export class SupplyManagementQrcodePageComponent implements OnInit { constructor( private modal: NzModalRef, - private msgSrv: NzMessageService, - public http: _HttpClient, ) { } ngOnInit(): void { - if (this.record.id > 0) - this.http.get(`/user/${this.record.id}`).subscribe(res => (this.i = res)); + console.log(this.i); } + downLoadQrcode(downloadName: any): void { let aLink = document.createElement('a'); const content = this.qr.dataURL;