Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
Taric Xin
2022-02-28 20:37:01 +08:00
9 changed files with 148 additions and 69 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

@ -1,10 +1,11 @@
import { OnChanges } from '@angular/core';
/* /*
* @Description : * @Description :
* @Version : 1.0 * @Version : 1.0
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-05 11:01:55 * @Date : 2022-01-05 11:01:55
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-02-24 20:06:26 * @LastEditTime : 2022-02-28 20:22:46
* @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -29,7 +30,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
public route: ActivatedRoute, public route: ActivatedRoute,
private datePipe: DatePipe, private datePipe: DatePipe,
private router: Router, private router: Router,
public shipperservice: ShipperBaseService, public shipperservice: ShipperBaseService
) {} ) {}
textStatus = '新建模板'; textStatus = '新建模板';
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
@ -40,6 +41,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
sfdata: any; sfdata: any;
sfdata2: any; sfdata2: any;
title: any; title: any;
Types: any;
templateHTML: any; templateHTML: any;
detailList: any = { detailList: any = {
templateName: '' templateName: ''
@ -76,17 +78,57 @@ export class ContractManagementTemplateTextComponent implements OnInit {
templateType: { templateType: {
title: '模板类型', title: '模板类型',
type: 'string', type: 'string',
default: '', enum: [
{ label: '框架合同', value: 'KJ' },
{ label: '明细合同', value: 'MX' },
{ label: '合伙人合同', value: 'HHR' }
],
ui: { ui: {
widget: 'dict-select', widget: 'select',
params: { dictKey: 'contract:template:type' }, placeholder: '请选择',
containAllLable: true, change: (tag: any, org: any) => {
visibleIf: { console.log(tag);
_$expand: (value: boolean) => value switch (tag) {
case 'MX':
this.Types = [
{ label: '订单合同', value: '1' },
{ label: '订单补充协议', value: '2' },
{ label: '运单合同', value: '3' },
{ label: '运单补充协议', value: '4' },
{ label: '委托代收合同', value: '5' }
];
this.sf.getProperty('/contractType')!.schema.enum = this.Types;
this.sf.getProperty('/contractType')!.widget.reset(this.Types);
this.sf.setValue('/contractType', this.Types);
return;
break;
case 'KJ':
this.Types = [
{ label: '网络货物运输服务合同', value: '6' },
{ label: '运输服务承揽合同', value: '7' }
];
this.sf.getProperty('/contractType')!.schema.enum = this.Types;
this.sf.getProperty('/contractType')!.widget.reset(this.Types);
this.sf.setValue('/contractType', this.Types);
return;
break;
case 'HHR':
this.Types = [
{ label: '企业合伙人入驻合同', value: '8' },
{ label: '个人合伙人入驻合同', value: '9' }
];
this.sf.getProperty('/contractType')!.schema.enum = this.Types;
this.sf.getProperty('/contractType')!.widget.reset(this.Types);
this.sf.setValue('/contractType', this.Types);
return;
break;
default:
break;
}
} }
} as SFSelectWidgetSchema }
}, },
signingObject: { signingObject: {
type: 'string', type: 'string',
title: '承包商对象', title: '承包商对象',
enum: [ enum: [
@ -101,13 +143,11 @@ export class ContractManagementTemplateTextComponent implements OnInit {
contractType: { contractType: {
title: '合同类型', title: '合同类型',
type: 'string', type: 'string',
default: '', enum: this.Types,
ui: { ui: {
widget: 'dict-select', widget: 'select',
containsAllLable: true, placeholder: '请选择'
params: { dictKey: 'contract:type' }, }
containAllLable: true,
} as SFSelectWidgetSchema
}, },
resourceType: { resourceType: {
title: '货源类型', title: '货源类型',
@ -120,7 +160,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
visibleIf: { visibleIf: {
templateType: value => value === 'MX' templateType: value => value === 'MX'
} }
} as SFSelectWidgetSchema, } as SFSelectWidgetSchema
}, },
enterpriseInfoId: { enterpriseInfoId: {
type: 'string', type: 'string',
@ -134,7 +174,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
}, },
asyncData: () => this.shipperservice.getNetworkFreightForwarder() asyncData: () => this.shipperservice.getNetworkFreightForwarder()
} }
}, }
}, },
required: ['templateName', 'templateType'] required: ['templateName', 'templateType']
}; };
@ -169,7 +209,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
this.service.request(url, { id: this.route.snapshot.params.id }).subscribe(res => { this.service.request(url, { id: this.route.snapshot.params.id }).subscribe(res => {
if (res) { if (res) {
this.detailList = res; this.detailList = res;
this.title = this.detailList?.templateName this.title = this.detailList?.templateName;
this.sfdata = res; this.sfdata = res;
this.sfdata2 = res; this.sfdata2 = res;
} }
@ -195,7 +235,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
...this.sf2.value, ...this.sf2.value,
templateTitle: this.title || this.detailList.templateName templateTitle: this.title || this.detailList.templateName
}; };
console.log(params) console.log(params);
this.service.request(this.service.$api_save_contractTemplate, params).subscribe((res: any) => { this.service.request(this.service.$api_save_contractTemplate, params).subscribe((res: any) => {
if (res) { if (res) {
this.service.msgSrv.success('保存成功!'); this.service.msgSrv.success('保存成功!');

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

@ -927,20 +927,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
// 提交前协议弹窗 // 提交前协议弹窗
agreementConfirm(submitType?: string) { agreementConfirm(submitType?: string) {
const modalRef = this.modalService.create({
nzTitle: '运输协议',
nzContent: TranAgreementComponent,
nzWidth: 900,
nzFooter: null
});
modalRef.afterClose.subscribe(result => {
if (result) {
this.submit(submitType);
}
});
}
// 提交
submit(submitType?: string): void {
//装卸货信息 //装卸货信息
const LoadingList = this.startInfo.concat(this.endInfo); const LoadingList = this.startInfo.concat(this.endInfo);
@ -995,6 +981,23 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
expenseDTOList: expenseList, expenseDTOList: expenseList,
paymentDays: this.sf7.value.paymentDays paymentDays: this.sf7.value.paymentDays
}; };
const modalRef = this.modalService.create({
nzTitle: '运输协议',
nzContent: TranAgreementComponent,
nzWidth: 900,
nzFooter: null,
nzComponentParams: {Object: params,}
});
modalRef.afterClose.subscribe(result => {
if (result) {
this.submit(submitType, params);
}
});
}
// 提交
submit(submitType?: string,params?: any): void {
// const params: any = { // const params: any = {
// ...this.sf1.value, // ...this.sf1.value,
// ...this.sf5.value, // ...this.sf5.value,

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>
<div class=""> <nz-alert nzType="warning" nzMessage="二维码用于司机扫码抢单" nzShowIcon></nz-alert>
<h2>公司名称 : {{ i?.enterpriseInfoName }}</h2> <div style="width: 50%;margin: 0 auto;">
<qr [value]="i.id" #qr></qr> <div class="">
<div class="mb-sm" *ngFor="let address of i?.loadingAddressArr">卸货地 : {{ address }}</div>
<div class="mb-sm" *ngFor="let address of i?.unloadingAddressArr">装货地 : {{ address }}</div> <h2> {{i?.enterpriseInfoName}}</h2>
<div class="mb-sm">截止时间 : {{ i?.deadlineTime }}</div> <qr [value]="qrCodeValue" #qr></qr>
<div>Tips : 二维码用于司机扫码抢单</div> <div class="mb-sm" *ngFor="let address of i?.loadingAddressArr">卸货地 : {{address}}</div>
<div class="mb-sm" *ngFor="let address of i?.unloadingAddressArr">装货地 : {{address}}</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 20:33:56
* @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.
*/ */
@ -18,14 +18,31 @@ import { SupplyManagementService } from '../../services/supply-management.servic
styleUrls: ['./tran-agreement.component.less'] styleUrls: ['./tran-agreement.component.less']
}) })
export class TranAgreementComponent { export class TranAgreementComponent {
Object: any;
agreement:any; agreement:any;
constructor(private modal: NzModalRef,public service: SupplyManagementService,) { constructor(private modal: NzModalRef,public service: SupplyManagementService,) {
} }
ngOnInit() { ngOnInit() {
this.service.request(this.service.$api_getContractContent,{type:'6'}).subscribe((res) => { console.log(Object)
const params = {
contractType:'1',
enterpriseInfoId: '',
parametersDTO: {
// 回单付
back: '',
// 发货地址
consignorAddress: '',
// 发货时间
consignorDate: '',
// 发货时间
// consignorDate: '',
}
}
this.service.request(this.service.$api_getContractContent,params).subscribe((res) => {
if (res) { if (res) {
this.agreement = res; this.agreement = res;
} }