解决冲突

This commit is contained in:
wangshiming
2022-02-28 20:03:30 +08:00
parent 438484699d
commit b22ef98056
7 changed files with 58 additions and 32 deletions

View File

@ -78,19 +78,19 @@ export class ContractManagementFrameComponent implements OnInit {
title: '签约对象', title: '签约对象',
width: '100px', width: '100px',
className: 'text-center', className: 'text-center',
index: 'signingObject' index: 'signingObjectLabel'
}, },
{ {
title: '合同类型', title: '合同类型',
width: '100px', width: '100px',
className: 'text-center', className: 'text-center',
index: 'contractType' index: 'contractTypeLabel'
}, },
{ {
title: '合同名称', title: '合同名称',
width: '100px', width: '100px',
className: 'text-center', className: 'text-center',
index: 'contractName' index: 'templateName'
}, },
{ title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, { title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' },
{ title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' }, { title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' },

View File

@ -131,19 +131,19 @@ export class ContractManagementTemplateDetailComponent implements OnInit {
title: '签约对象', title: '签约对象',
width: '100px', width: '100px',
className: 'text-center', className: 'text-center',
index: 'signingObject' index: 'signingObjectLabel'
}, },
{ {
title: '合同类型', title: '合同类型',
width: '100px', width: '100px',
className: 'text-center', className: 'text-center',
index: 'contractType' index: 'contractTypeLabel'
}, },
{ {
title: '货源类型', title: '货源类型',
width: '100px', width: '100px',
className: 'text-center', className: 'text-center',
index: 'resourceType' index: 'resourceTypeLabel'
}, },
{ title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' }, { title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' },
{ {

View File

@ -406,7 +406,7 @@ export class SupplyManagementBulkComponent implements OnInit {
assignedQrcode(item: any) { assignedQrcode(item: any) {
const modalRef = this.modal.create({ const modalRef = this.modal.create({
nzTitle: '二维码', nzTitle: '二维码',
nzWidth: '600px', nzWidth: '468px',
nzContent: SupplyManagementQrcodePageComponent, nzContent: SupplyManagementQrcodePageComponent,
nzComponentParams: { nzComponentParams: {
i: item, i: item,

View File

@ -4,22 +4,25 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-03 11:10:14 * @Date : 2021-12-03 11:10:14
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:28:37 * @LastEditTime : 2022-02-28 20:00:13
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\qrcode-page\\qrcode-page.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\qrcode-page\\qrcode-page.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin> <nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
<div style="width: 50%; margin: 0 auto"> <div>
<nz-alert nzType="warning" nzMessage="二维码用于司机扫码抢单" nzShowIcon></nz-alert>
<div style="width: 50%;margin: 0 auto;">
<div class=""> <div class="">
<h2>公司名称 : {{ i?.enterpriseInfoName }}</h2>
<qr [value]="i.id" #qr></qr> <h2> {{i?.enterpriseInfoName}}</h2>
<div class="mb-sm" *ngFor="let address of i?.loadingAddressArr">卸货地 : {{ address }}</div> <qr [value]="qrCodeValue" #qr></qr>
<div class="mb-sm" *ngFor="let address of i?.unloadingAddressArr">货地 : {{ address }}</div> <div class="mb-sm" *ngFor="let address of i?.loadingAddressArr">货地 : {{address}}</div>
<div class="mb-sm">截止时间 : {{ i?.deadlineTime }}</div> <div class="mb-sm" *ngFor="let address of i?.unloadingAddressArr">装货地 : {{address}}</div>
<div>Tips : 二维码用于司机扫码抢单</div> <div class="mb-sm">截止时间 : {{i?.deadlineTime}}</div>
</div>
</div>
<div class="modal-footer text-center">
<button nz-button type="submit" nzType="primary" (click)="downLoadQrcode('二维码')">下载二维码</button>
</div> </div>
</div> </div>
<div class="modal-footer text-center">
<button nz-button type="submit" nzType="primary" (click)="downLoadQrcode('二维码')">下载二维码</button>
</div>

View File

@ -1,3 +1,13 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2021-12-03 11:10:14
* @LastEditors : Shiming
* @LastEditTime : 2022-02-28 20:00:20
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\qrcode-page\\qrcode-page.component.spec.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { SupplyManagementQrcodePageComponent } from './qrcode-page.component'; import { SupplyManagementQrcodePageComponent } from './qrcode-page.component';

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-03 11:10:14 * @Date : 2021-12-03 11:10:14
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:28:46 * @LastEditTime : 2022-02-28 20:00:06
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\qrcode-page\\qrcode-page.component.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\qrcode-page\\qrcode-page.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -23,39 +23,44 @@ export class SupplyManagementQrcodePageComponent implements OnInit {
record: any = {}; record: any = {};
i: any; i: any;
schema: SFSchema = {}; schema: SFSchema = {};
qrCodeValue = '';
ui: SFUISchema = { ui: SFUISchema = {
'*': { '*': {
spanLabelFixed: 100, spanLabelFixed: 100,
grid: { span: 12 } grid: { span: 12 },
}, },
$no: { $no: {
widget: 'text' widget: 'text'
}, },
$href: { $href: {
widget: 'string' widget: 'string',
}, },
$description: { $description: {
widget: 'textarea', widget: 'textarea',
grid: { span: 24 } grid: { span: 24 },
} },
}; };
constructor(private modal: NzModalRef) {} constructor(
private modal: NzModalRef,
) { }
ngOnInit(): void { ngOnInit(): void {
console.log(this.i); this.qrCodeValue = `rid:${this.i?.id}`;
} }
downLoadQrcode(downloadName: any): void { downLoadQrcode(downloadName: any): void {
let aLink = document.createElement('a'); let aLink = document.createElement('a');
const content = this.qr.dataURL; const content = this.qr.dataURL;
let blob = this.base64ToBlob(content); //new Blob([content]); let blob = this.base64ToBlob(content); //new Blob([content]);
let evt = document.createEvent('HTMLEvents'); let evt = document.createEvent("HTMLEvents");
evt.initEvent('click', true, true); //initEvent 不加后两个参数在IE下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为 evt.initEvent("click", true, true);//initEvent 不加后两个参数在IE下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为
aLink.download = downloadName; aLink.download = downloadName;
aLink.href = URL.createObjectURL(blob); aLink.href = URL.createObjectURL(blob);
// aLink.dispatchEvent(evt); // aLink.dispatchEvent(evt);
aLink.click(); aLink.click()
} }
//base64转blob //base64转blob
@ -74,4 +79,5 @@ export class SupplyManagementQrcodePageComponent implements OnInit {
close(): void { close(): void {
this.modal.destroy(); this.modal.destroy();
} }
} }

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-06 15:01:40 * @Date : 2022-01-06 15:01:40
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-02-28 19:34:38 * @LastEditTime : 2022-02-28 19:58:01
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -25,7 +25,14 @@ export class TranAgreementComponent {
} }
ngOnInit() { ngOnInit() {
this.service.request(this.service.$api_getContractContent,{type:'6'}).subscribe((res) => { const params = {
contractType:'1',
enterpriseInfoId: '',
parametersDTO: {}
}
this.service.request(this.service.$api_getContractContent,params).subscribe((res) => {
if (res) { if (res) {
this.agreement = res; this.agreement = res;
} }